Files
weilin9999-WeiLin-Comfyui-T…/dist/javascript/main.entry.js
T

193 lines
752 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(Os){typeof define=="function"&&define.amd?define(Os):Os()})((function(){"use strict";/**
* @vue/shared v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Os(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const tn={},Ds=[],zo=()=>{},sd=()=>!1,ki=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ci=e=>e.startsWith("onUpdate:"),bn=Object.assign,Zl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Jv=Object.prototype.hasOwnProperty,Gt=(e,t)=>Jv.call(e,t),dt=Array.isArray,Ps=e=>xr(e)==="[object Map]",Rs=e=>xr(e)==="[object Set]",rd=e=>xr(e)==="[object Date]",_t=e=>typeof e=="function",cn=e=>typeof e=="string",po=e=>typeof e=="symbol",qt=e=>e!==null&&typeof e=="object",id=e=>(qt(e)||_t(e))&&_t(e.then)&&_t(e.catch),ld=Object.prototype.toString,xr=e=>ld.call(e),Xv=e=>xr(e).slice(8,-1),ud=e=>xr(e)==="[object Object]",Ei=e=>cn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Sr=Os(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$i=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Qv=/-\w/g,Wn=$i(e=>e.replace(Qv,t=>t.slice(1).toUpperCase())),Zv=/\B([A-Z])/g,Pa=$i(e=>e.replace(Zv,"-$1").toLowerCase()),Ai=$i(e=>e.charAt(0).toUpperCase()+e.slice(1)),eu=$i(e=>e?`on${Ai(e)}`:""),Vo=(e,t)=>!Object.is(e,t),Li=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},cd=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},Ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t},eh=e=>{const t=cn(e)?Number(e):NaN;return isNaN(t)?e:t};let dd;const Mi=()=>dd||(dd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ft(e){if(dt(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],a=cn(o)?ah(o):Ft(o);if(a)for(const s in a)t[s]=a[s]}return t}else if(cn(e)||qt(e))return e}const th=/;(?![^(]*\))/g,nh=/:([^]+)/,oh=/\/\*[^]*?\*\//g;function ah(e){const t={};return e.replace(oh,"").split(th).forEach(n=>{if(n){const o=n.split(nh);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function Ve(e){let t="";if(cn(e))t=e;else if(dt(e))for(let n=0;n<e.length;n++){const o=Ve(e[n]);o&&(t+=o+" ")}else if(qt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const sh=Os("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function pd(e){return!!e||e===""}function rh(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=Ra(e[o],t[o]);return n}function Ra(e,t){if(e===t)return!0;let n=rd(e),o=rd(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=po(e),o=po(t),n||o)return e===t;if(n=dt(e),o=dt(t),n||o)return n&&o?rh(e,t):!1;if(n=qt(e),o=qt(t),n||o){if(!n||!o)return!1;const a=Object.keys(e).length,s=Object.keys(t).length;if(a!==s)return!1;for(const i in e){const l=e.hasOwnProperty(i),d=t.hasOwnProperty(i);if(l&&!d||!l&&d||!Ra(e[i],t[i]))return!1}}return String(e)===String(t)}function tu(e,t){return e.findIndex(n=>Ra(n,t))}const fd=e=>!!(e&&e.__v_isRef===!0),y=e=>cn(e)?e:e==null?"":dt(e)||qt(e)&&(e.toString===ld||!_t(e.toString))?fd(e)?y(e.value):JSON.stringify(e,gd,2):String(e),gd=(e,t)=>fd(t)?gd(e,t.value):Ps(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,a],s)=>(n[nu(o,s)+" =>"]=a,n),{})}:Rs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>nu(n))}:po(t)?nu(t):qt(t)&&!dt(t)&&!ud(t)?String(t):t,nu=(e,t="")=>{var n;return po(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Cn;class md{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Cn&&(Cn.active?(this.parent=Cn,this.index=(Cn.scopes||(Cn.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Cn;try{return Cn=this,t()}finally{Cn=n}}}on(){++this._on===1&&(this.prevScope=Cn,Cn=this)}off(){if(this._on>0&&--this._on===0){if(Cn===this)Cn=this.prevScope;else{let t=Cn;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function ou(e){return new md(e)}function vd(){return Cn}function ih(e,t=!1){Cn&&Cn.cleanups.push(e)}let sn;const au=new WeakSet;class hd{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Cn&&(Cn.active?Cn.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,au.has(this)&&(au.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Td(this),bd(this);const t=sn,n=Ao;sn=this,Ao=!0;try{return this.fn()}finally{wd(this),sn=t,Ao=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)lu(t);this.deps=this.depsTail=void 0,Td(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?au.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){iu(this)&&this.run()}get dirty(){return iu(this)}}let _d=0,Tr,kr;function yd(e,t=!1){if(e.flags|=8,t){e.next=kr,kr=e;return}e.next=Tr,Tr=e}function su(){_d++}function ru(){if(--_d>0)return;if(kr){let t=kr;for(kr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Tr;){let t=Tr;for(Tr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function bd(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function wd(e){let t,n=e.depsTail,o=n;for(;o;){const a=o.prevDep;o.version===-1?(o===n&&(n=a),lu(o),lh(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=a}e.deps=t,e.depsTail=n}function iu(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(xd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function xd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Cr)||(e.globalVersion=Cr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!iu(e))))return;e.flags|=2;const t=e.dep,n=sn,o=Ao;sn=e,Ao=!0;try{bd(e);const a=e.fn(e._value);(t.version===0||Vo(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{sn=n,Ao=o,wd(e),e.flags&=-3}}function lu(e,t=!1){const{dep:n,prevSub:o,nextSub:a}=e;if(o&&(o.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)lu(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function lh(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ao=!0;const Sd=[];function Wo(){Sd.push(Ao),Ao=!1}function Ho(){const e=Sd.pop();Ao=e===void 0?!0:e}function Td(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=sn;sn=void 0;try{t()}finally{sn=n}}}let Cr=0;class uh{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class uu{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!sn||!Ao||sn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==sn)n=this.activeLink=new uh(sn,this),sn.deps?(n.prevDep=sn.depsTail,sn.depsTail.nextDep=n,sn.depsTail=n):sn.deps=sn.depsTail=n,kd(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=sn.depsTail,n.nextDep=void 0,sn.depsTail.nextDep=n,sn.depsTail=n,sn.deps===n&&(sn.deps=o)}return n}trigger(t){this.version++,Cr++,this.notify(t)}notify(t){su();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ru()}}}function kd(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)kd(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Oi=new WeakMap,cs=Symbol(""),cu=Symbol(""),Er=Symbol("");function Dn(e,t,n){if(Ao&&sn){let o=Oi.get(e);o||Oi.set(e,o=new Map);let a=o.get(n);a||(o.set(n,a=new uu),a.map=o,a.key=n),a.track()}}function da(e,t,n,o,a,s){const i=Oi.get(e);if(!i){Cr++;return}const l=d=>{d&&d.trigger()};if(su(),t==="clear")i.forEach(l);else{const d=dt(e),g=d&&Ei(n);if(d&&n==="length"){const f=Number(o);i.forEach((m,w)=>{(w==="length"||w===Er||!po(w)&&w>=f)&&l(m)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),g&&l(i.get(Er)),t){case"add":d?g&&l(i.get("length")):(l(i.get(cs)),Ps(e)&&l(i.get(cu)));break;case"delete":d||(l(i.get(cs)),Ps(e)&&l(i.get(cu)));break;case"set":Ps(e)&&l(i.get(cs));break}}ru()}function ch(e,t){const n=Oi.get(e);return n&&n.get(t)}function Ns(e){const t=Mt(e);return t===e?t:(Dn(t,"iterate",Er),fo(e)?t:t.map(Lo))}function Di(e){return Dn(e=Mt(e),"iterate",Er),e}function jo(e,t){return ga(e)?Fs(fa(e)?Lo(t):t):Lo(t)}const dh={__proto__:null,[Symbol.iterator](){return du(this,Symbol.iterator,e=>jo(this,e))},concat(...e){return Ns(this).concat(...e.map(t=>dt(t)?Ns(t):t))},entries(){return du(this,"entries",e=>(e[1]=jo(this,e[1]),e))},every(e,t){return pa(this,"every",e,t,void 0,arguments)},filter(e,t){return pa(this,"filter",e,t,n=>n.map(o=>jo(this,o)),arguments)},find(e,t){return pa(this,"find",e,t,n=>jo(this,n),arguments)},findIndex(e,t){return pa(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return pa(this,"findLast",e,t,n=>jo(this,n),arguments)},findLastIndex(e,t){return pa(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return pa(this,"forEach",e,t,void 0,arguments)},includes(...e){return pu(this,"includes",e)},indexOf(...e){return pu(this,"indexOf",e)},join(e){return Ns(this).join(e)},lastIndexOf(...e){return pu(this,"lastIndexOf",e)},map(e,t){return pa(this,"map",e,t,void 0,arguments)},pop(){return $r(this,"pop")},push(...e){return $r(this,"push",e)},reduce(e,...t){return Cd(this,"reduce",e,t)},reduceRight(e,...t){return Cd(this,"reduceRight",e,t)},shift(){return $r(this,"shift")},some(e,t){return pa(this,"some",e,t,void 0,arguments)},splice(...e){return $r(this,"splice",e)},toReversed(){return Ns(this).toReversed()},toSorted(e){return Ns(this).toSorted(e)},toSpliced(...e){return Ns(this).toSpliced(...e)},unshift(...e){return $r(this,"unshift",e)},values(){return du(this,"values",e=>jo(this,e))}};function du(e,t,n){const o=Di(e),a=o[t]();return o!==e&&!fo(e)&&(a._next=a.next,a.next=()=>{const s=a._next();return s.done||(s.value=n(s.value)),s}),a}const ph=Array.prototype;function pa(e,t,n,o,a,s){const i=Di(e),l=i!==e&&!fo(e),d=i[t];if(d!==ph[t]){const m=d.apply(e,s);return l?Lo(m):m}let g=n;i!==e&&(l?g=function(m,w){return n.call(this,jo(e,m),w,e)}:n.length>2&&(g=function(m,w){return n.call(this,m,w,e)}));const f=d.call(i,g,o);return l&&a?a(f):f}function Cd(e,t,n,o){const a=Di(e),s=a!==e&&!fo(e);let i=n,l=!1;a!==e&&(s?(l=o.length===0,i=function(g,f,m){return l&&(l=!1,g=jo(e,g)),n.call(this,g,jo(e,f),m,e)}):n.length>3&&(i=function(g,f,m){return n.call(this,g,f,m,e)}));const d=a[t](i,...o);return l?jo(e,d):d}function pu(e,t,n){const o=Mt(e);Dn(o,"iterate",Er);const a=o[t](...n);return(a===-1||a===!1)&&Bi(n[0])?(n[0]=Mt(n[0]),o[t](...n)):a}function $r(e,t,n=[]){Wo(),su();const o=Mt(e)[t].apply(e,n);return ru(),Ho(),o}const fh=Os("__proto__,__v_isRef,__isVue"),Ed=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(po));function gh(e){po(e)||(e=String(e));const t=Mt(this);return Dn(t,"has",e),t.hasOwnProperty(e)}class $d{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const a=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!a;if(n==="__v_isReadonly")return a;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(a?s?Dd:Od:s?Md:Id).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const i=dt(t);if(!a){let d;if(i&&(d=dh[n]))return d;if(n==="hasOwnProperty")return gh}const l=Reflect.get(t,n,fn(t)?t:o);if((po(n)?Ed.has(n):fh(n))||(a||Dn(t,"get",n),s))return l;if(fn(l)){const d=i&&Ei(n)?l:l.value;return a&&qt(d)?gu(d):d}return qt(l)?a?gu(l):ds(l):l}}class Ad extends $d{constructor(t=!1){super(!1,t)}set(t,n,o,a){let s=t[n];const i=dt(t)&&Ei(n);if(!this._isShallow){const g=ga(s);if(!fo(o)&&!ga(o)&&(s=Mt(s),o=Mt(o)),!i&&fn(s)&&!fn(o))return g||(s.value=o),!0}const l=i?Number(n)<t.length:Gt(t,n),d=Reflect.set(t,n,o,fn(t)?t:a);return t===Mt(a)&&(l?Vo(o,s)&&da(t,"set",n,o):da(t,"add",n,o)),d}deleteProperty(t,n){const o=Gt(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&o&&da(t,"delete",n,void 0),a}has(t,n){const o=Reflect.has(t,n);return(!po(n)||!Ed.has(n))&&Dn(t,"has",n),o}ownKeys(t){return Dn(t,"iterate",dt(t)?"length":cs),Reflect.ownKeys(t)}}class Ld extends $d{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const mh=new Ad,vh=new Ld,hh=new Ad(!0),_h=new Ld(!0),fu=e=>e,Pi=e=>Reflect.getPrototypeOf(e);function yh(e,t,n){return function(...o){const a=this.__v_raw,s=Mt(a),i=Ps(s),l=e==="entries"||e===Symbol.iterator&&i,d=e==="keys"&&i,g=a[e](...o),f=n?fu:t?Fs:Lo;return!t&&Dn(s,"iterate",d?cu:cs),bn(Object.create(g),{next(){const{value:m,done:w}=g.next();return w?{value:m,done:w}:{value:l?[f(m[0]),f(m[1])]:f(m),done:w}}})}}function Ri(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function bh(e,t){const n={get(a){const s=this.__v_raw,i=Mt(s),l=Mt(a);e||(Vo(a,l)&&Dn(i,"get",a),Dn(i,"get",l));const{has:d}=Pi(i),g=t?fu:e?Fs:Lo;if(d.call(i,a))return g(s.get(a));if(d.call(i,l))return g(s.get(l));s!==i&&s.get(a)},get size(){const a=this.__v_raw;return!e&&Dn(Mt(a),"iterate",cs),a.size},has(a){const s=this.__v_raw,i=Mt(s),l=Mt(a);return e||(Vo(a,l)&&Dn(i,"has",a),Dn(i,"has",l)),a===l?s.has(a):s.has(a)||s.has(l)},forEach(a,s){const i=this,l=i.__v_raw,d=Mt(l),g=t?fu:e?Fs:Lo;return!e&&Dn(d,"iterate",cs),l.forEach((f,m)=>a.call(s,g(f),g(m),i))}};return bn(n,e?{add:Ri("add"),set:Ri("set"),delete:Ri("delete"),clear:Ri("clear")}:{add(a){const s=Mt(this),i=Pi(s),l=Mt(a),d=!t&&!fo(a)&&!ga(a)?l:a;return i.has.call(s,d)||Vo(a,d)&&i.has.call(s,a)||Vo(l,d)&&i.has.call(s,l)||(s.add(d),da(s,"add",d,d)),this},set(a,s){!t&&!fo(s)&&!ga(s)&&(s=Mt(s));const i=Mt(this),{has:l,get:d}=Pi(i);let g=l.call(i,a);g||(a=Mt(a),g=l.call(i,a));const f=d.call(i,a);return i.set(a,s),g?Vo(s,f)&&da(i,"set",a,s):da(i,"add",a,s),this},delete(a){const s=Mt(this),{has:i,get:l}=Pi(s);let d=i.call(s,a);d||(a=Mt(a),d=i.call(s,a)),l&&l.call(s,a);const g=s.delete(a);return d&&da(s,"delete",a,void 0),g},clear(){const a=Mt(this),s=a.size!==0,i=a.clear();return s&&da(a,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=yh(a,e,t)}),n}function Ni(e,t){const n=bh(e,t);return(o,a,s)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?o:Reflect.get(Gt(n,a)&&a in o?n:o,a,s)}const wh={get:Ni(!1,!1)},xh={get:Ni(!1,!0)},Sh={get:Ni(!0,!1)},Th={get:Ni(!0,!0)},Id=new WeakMap,Md=new WeakMap,Od=new WeakMap,Dd=new WeakMap;function kh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ds(e){return ga(e)?e:Fi(e,!1,mh,wh,Id)}function Ch(e){return Fi(e,!1,hh,xh,Md)}function gu(e){return Fi(e,!0,vh,Sh,Od)}function kD(e){return Fi(e,!0,_h,Th,Dd)}function Fi(e,t,n,o,a){if(!qt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const s=a.get(e);if(s)return s;const i=kh(Xv(e));if(i===0)return e;const l=new Proxy(e,i===2?o:n);return a.set(e,l),l}function fa(e){return ga(e)?fa(e.__v_raw):!!(e&&e.__v_isReactive)}function ga(e){return!!(e&&e.__v_isReadonly)}function fo(e){return!!(e&&e.__v_isShallow)}function Bi(e){return e?!!e.__v_raw:!1}function Mt(e){const t=e&&e.__v_raw;return t?Mt(t):e}function mu(e){return!Gt(e,"__v_skip")&&Object.isExtensible(e)&&cd(e,"__v_skip",!0),e}const Lo=e=>qt(e)?ds(e):e,Fs=e=>qt(e)?gu(e):e;function fn(e){return e?e.__v_isRef===!0:!1}function S(e){return Pd(e,!1)}function Eh(e){return Pd(e,!0)}function Pd(e,t){return fn(e)?e:new $h(e,t)}class $h{constructor(t,n){this.dep=new uu,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Mt(t),this._value=n?t:Lo(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||fo(t)||ga(t);t=o?t:Mt(t),Vo(t,n)&&(this._rawValue=t,this._value=o?t:Lo(t),this.dep.trigger())}}function h(e){return fn(e)?e.value:e}const Ah={get:(e,t,n)=>t==="__v_raw"?e:h(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const a=e[t];return fn(a)&&!fn(n)?(a.value=n,!0):Reflect.set(e,t,n,o)}};function Rd(e){return fa(e)?e:new Proxy(e,Ah)}function Lh(e){const t=dt(e)?new Array(e.length):{};for(const n in e)t[n]=Mh(e,n);return t}class Ih{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=po(n)?n:String(n),this._raw=Mt(t);let a=!0,s=t;if(!dt(t)||po(this._key)||!Ei(this._key))do a=!Bi(s)||fo(s);while(a&&(s=s.__v_raw));this._shallow=a}get value(){let t=this._object[this._key];return this._shallow&&(t=h(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&fn(this._raw[this._key])){const n=this._object[this._key];if(fn(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return ch(this._raw,this._key)}}function Mh(e,t,n){return new Ih(e,t,n)}class Oh{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new uu(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&sn!==this)return yd(this,!0),!0}get value(){const t=this.dep.track();return xd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Dh(e,t,n=!1){let o,a;return _t(e)?o=e:(o=e.get,a=e.set),new Oh(o,a,n)}const Ui={},zi=new WeakMap;let ps;function Ph(e,t=!1,n=ps){if(n){let o=zi.get(n);o||zi.set(n,o=[]),o.push(e)}}function Rh(e,t,n=tn){const{immediate:o,deep:a,once:s,scheduler:i,augmentJob:l,call:d}=n,g=D=>a?D:fo(D)||a===!1||a===0?ma(D,1):ma(D);let f,m,w,b,T=!1,E=!1;if(fn(e)?(m=()=>e.value,T=fo(e)):fa(e)?(m=()=>g(e),T=!0):dt(e)?(E=!0,T=e.some(D=>fa(D)||fo(D)),m=()=>e.map(D=>{if(fn(D))return D.value;if(fa(D))return g(D);if(_t(D))return d?d(D,2):D()})):_t(e)?t?m=d?()=>d(e,2):e:m=()=>{if(w){Wo();try{w()}finally{Ho()}}const D=ps;ps=f;try{return d?d(e,3,[b]):e(b)}finally{ps=D}}:m=zo,t&&a){const D=m,V=a===!0?1/0:a;m=()=>ma(D(),V)}const I=vd(),P=()=>{f.stop(),I&&I.active&&Zl(I.effects,f)};if(s&&t){const D=t;t=(...V)=>{D(...V),P()}}let N=E?new Array(e.length).fill(Ui):Ui;const pe=D=>{if(!(!(f.flags&1)||!f.dirty&&!D))if(t){const V=f.run();if(a||T||(E?V.some((fe,O)=>Vo(fe,N[O])):Vo(V,N))){w&&w();const fe=ps;ps=f;try{const O=[V,N===Ui?void 0:E&&N[0]===Ui?[]:N,b];N=V,d?d(t,3,O):t(...O)}finally{ps=fe}}}else f.run()};return l&&l(pe),f=new hd(m),f.scheduler=i?()=>i(pe,!1):pe,b=D=>Ph(D,!1,f),w=f.onStop=()=>{const D=zi.get(f);if(D){if(d)d(D,4);else for(const V of D)V();zi.delete(f)}},t?o?pe(!0):N=f.run():i?i(pe.bind(null,!0),!0):f.run(),P.pause=f.pause.bind(f),P.resume=f.resume.bind(f),P.stop=P,P}function ma(e,t=1/0,n){if(t<=0||!qt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,fn(e))ma(e.value,t,n);else if(dt(e))for(let o=0;o<e.length;o++)ma(e[o],t,n);else if(Rs(e)||Ps(e))e.forEach(o=>{ma(o,t,n)});else if(ud(e)){for(const o in e)ma(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&ma(e[o],t,n)}return e}/**
* @vue/runtime-core v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Ar=[];let vu=!1;function CD(e,...t){if(vu)return;vu=!0,Wo();const n=Ar.length?Ar[Ar.length-1].component:null,o=n&&n.appContext.config.warnHandler,a=Nh();if(o)Bs(o,n,11,[e+t.map(s=>{var i,l;return(l=(i=s.toString)==null?void 0:i.call(s))!=null?l:JSON.stringify(s)}).join(""),n&&n.proxy,a.map(({vnode:s})=>`at <${Vp(n,s.type)}>`).join(`
`),a]);else{const s=[`[Vue warn]: ${e}`,...t];a.length&&s.push(`
`,...Fh(a)),console.warn(...s)}Ho(),vu=!1}function Nh(){let e=Ar[Ar.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function Fh(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...Bh(n))}),t}function Bh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,a=` at <${Vp(e.component,e.type,o)}`,s=">"+n;return e.props?[a,...Uh(e.props),s]:[a+s]}function Uh(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...Nd(o,e[o]))}),n.length>3&&t.push(" ..."),t}function Nd(e,t,n){return cn(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:fn(t)?(t=Nd(e,Mt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):_t(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Mt(t),n?t:[`${e}=`,t])}function Bs(e,t,n,o){try{return o?e(...o):e()}catch(a){Vi(a,t,n)}}function xo(e,t,n,o){if(_t(e)){const a=Bs(e,t,n,o);return a&&id(a)&&a.catch(s=>{Vi(s,t,n)}),a}if(dt(e)){const a=[];for(let s=0;s<e.length;s++)a.push(xo(e[s],t,n,o));return a}}function Vi(e,t,n,o=!0){const a=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||tn;if(t){let l=t.parent;const d=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const f=l.ec;if(f){for(let m=0;m<f.length;m++)if(f[m](e,d,g)===!1)return}l=l.parent}if(s){Wo(),Bs(s,null,10,[e,d,g]),Ho();return}}zh(e,n,a,o,i)}function zh(e,t,n,o=!0,a=!1){if(a)throw e;console.error(e)}const Hn=[];let Go=-1;const Us=[];let Na=null,zs=0;const Fd=Promise.resolve();let Wi=null;function yt(e){const t=Wi||Fd;return e?t.then(this?e.bind(this):e):t}function Vh(e){let t=Go+1,n=Hn.length;for(;t<n;){const o=t+n>>>1,a=Hn[o],s=Lr(a);s<e||s===e&&a.flags&2?t=o+1:n=o}return t}function hu(e){if(!(e.flags&1)){const t=Lr(e),n=Hn[Hn.length-1];!n||!(e.flags&2)&&t>=Lr(n)?Hn.push(e):Hn.splice(Vh(t),0,e),e.flags|=1,Bd()}}function Bd(){Wi||(Wi=Fd.then(Vd))}function Wh(e){dt(e)?Us.push(...e):Na&&e.id===-1?Na.splice(zs+1,0,e):e.flags&1||(Us.push(e),e.flags|=1),Bd()}function Ud(e,t,n=Go+1){for(;n<Hn.length;n++){const o=Hn[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Hn.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function zd(e){if(Us.length){const t=[...new Set(Us)].sort((n,o)=>Lr(n)-Lr(o));if(Us.length=0,Na){Na.push(...t);return}for(Na=t,zs=0;zs<Na.length;zs++){const n=Na[zs];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Na=null,zs=0}}const Lr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vd(e){try{for(Go=0;Go<Hn.length;Go++){const t=Hn[Go];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Bs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Go<Hn.length;Go++){const t=Hn[Go];t&&(t.flags&=-2)}Go=-1,Hn.length=0,zd(),Wi=null,(Hn.length||Us.length)&&Vd()}}let Ln=null,Wd=null;function Hi(e){const t=Ln;return Ln=e,Wd=e&&e.type.__scopeId||null,t}function Ut(e,t=Ln,n){if(!t||e._n)return e;const o=(...a)=>{o._d&&Qi(-1);const s=Hi(t);let i;try{i=e(...a)}finally{Hi(s),o._d&&Qi(1)}return i};return o._n=!0,o._c=!0,o._d=!0,o}function xe(e,t){if(Ln===null)return e;const n=tl(Ln),o=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[s,i,l,d=tn]=t[a];s&&(_t(s)&&(s={mounted:s,updated:s}),s.deep&&ma(i),o.push({dir:s,instance:n,value:i,oldValue:void 0,arg:l,modifiers:d}))}return e}function fs(e,t,n,o){const a=e.dirs,s=t&&t.dirs;for(let i=0;i<a.length;i++){const l=a[i];s&&(l.oldValue=s[i].value);let d=l.dir[o];d&&(Wo(),xo(d,n,8,[e.el,l,e,t]),Ho())}}function ji(e,t){if(Rn){let n=Rn.provides;const o=Rn.parent&&Rn.parent.provides;o===n&&(n=Rn.provides=Object.create(o)),n[e]=t}}function va(e,t,n=!1){const o=ya();if(o||vs){let a=vs?vs._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return n&&_t(t)?t.call(o&&o.proxy):t}}function Hh(){return!!(ya()||vs)}const jh=Symbol.for("v-scx"),Gh=()=>va(jh);function St(e,t,n){return Hd(e,t,n)}function Hd(e,t,n=tn){const{immediate:o,deep:a,flush:s,once:i}=n,l=bn({},n),d=t&&o||!t&&s!=="post";let g;if(Wr){if(s==="sync"){const b=Gh();g=b.__watcherHandles||(b.__watcherHandles=[])}else if(!d){const b=()=>{};return b.stop=zo,b.resume=zo,b.pause=zo,b}}const f=Rn;l.call=(b,T,E)=>xo(b,f,T,E);let m=!1;s==="post"?l.scheduler=b=>{Gn(b,f&&f.suspense)}:s!=="sync"&&(m=!0,l.scheduler=(b,T)=>{T?b():hu(b)}),l.augmentJob=b=>{t&&(b.flags|=4),m&&(b.flags|=2,f&&(b.id=f.uid,b.i=f))};const w=Rh(e,t,l);return Wr&&(g?g.push(w):d&&w()),w}function qh(e,t,n){const o=this.proxy,a=cn(e)?e.includes(".")?jd(o,e):()=>o[e]:e.bind(o,o);let s;_t(t)?s=t:(s=t.handler,n=t);const i=Vr(this),l=Hd(a,s.bind(o),n);return i(),l}function jd(e,t){const n=t.split(".");return()=>{let o=e;for(let a=0;a<n.length&&o;a++)o=o[n[a]];return o}}const Fa=new WeakMap,Gd=Symbol("_vte"),qd=e=>e.__isTeleport,gs=e=>e&&(e.disabled||e.disabled===""),Yh=e=>e&&(e.defer||e.defer===""),Yd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Kd=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_u=(e,t)=>{const n=e&&e.to;return cn(n)?t?t(n):null:n},Kh={name:"Teleport",__isTeleport:!0,process(e,t,n,o,a,s,i,l,d,g){const{mc:f,pc:m,pbc:w,o:{insert:b,querySelector:T,createText:E,createComment:I,parentNode:P}}=g,N=gs(t.props);let{dynamicChildren:pe}=t;const D=(O,se,le)=>{O.shapeFlag&16&&f(O.children,se,le,a,s,i,l,d)},V=(O=t)=>{const se=gs(O.props),le=O.target=_u(O.props,T),Pe=yu(le,O,E,b);le&&(i!=="svg"&&Yd(le)?i="svg":i!=="mathml"&&Kd(le)&&(i="mathml"),a&&a.isCE&&(a.ce._teleportTargets||(a.ce._teleportTargets=new Set)).add(le),se||(D(O,le,Pe),Ir(O,!1)))},fe=O=>{const se=()=>{if(Fa.get(O)===se){if(Fa.delete(O),gs(O.props)){const le=P(O.el)||n;D(O,le,O.anchor),Ir(O,!0)}V(O)}};Fa.set(O,se),Gn(se,s)};if(e==null){const O=t.el=E(""),se=t.anchor=E("");if(b(O,n,o),b(se,n,o),Yh(t.props)||s&&s.pendingBranch){fe(t);return}N&&(D(t,n,se),Ir(t,!0)),V()}else{t.el=e.el;const O=t.anchor=e.anchor,se=Fa.get(e);if(se){se.flags|=8,Fa.delete(e),fe(t);return}t.targetStart=e.targetStart;const le=t.target=e.target,Pe=t.targetAnchor=e.targetAnchor,Ie=gs(e.props),ue=Ie?n:le,we=Ie?O:Pe;if(i==="svg"||Yd(le)?i="svg":(i==="mathml"||Kd(le))&&(i="mathml"),pe?(w(e.dynamicChildren,pe,ue,a,s,i,l),Lu(e,t,!0)):d||m(e,t,ue,we,a,s,i,l,!1),N)Ie?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gi(t,n,O,g,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const ne=t.target=_u(t.props,T);ne&&Gi(t,ne,null,g,0)}else Ie&&Gi(t,le,Pe,g,1);Ir(t,N)}},remove(e,t,n,{um:o,o:{remove:a}},s){const{shapeFlag:i,children:l,anchor:d,targetStart:g,targetAnchor:f,target:m,props:w}=e,b=s||!gs(w),T=Fa.get(e);if(T&&(T.flags|=8,Fa.delete(e)),m&&(a(g),a(f)),s&&a(d),!T&&i&16)for(let E=0;E<l.length;E++){const I=l[E];o(I,t,n,b,!!I.dynamicChildren)}},move:Gi,hydrate:Jh};function Gi(e,t,n,{o:{insert:o},m:a},s=2){s===0&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:d,children:g,props:f}=e,m=s===2;if(m&&o(i,t,n),!Fa.has(e)&&(!m||gs(f))&&d&16)for(let w=0;w<g.length;w++)a(g[w],t,n,2);m&&o(l,t,n)}function Jh(e,t,n,o,a,s,{o:{nextSibling:i,parentNode:l,querySelector:d,insert:g,createText:f}},m){function w(I,P){let N=P;for(;N;){if(N&&N.nodeType===8){if(N.data==="teleport start anchor")t.targetStart=N;else if(N.data==="teleport anchor"){t.targetAnchor=N,I._lpa=t.targetAnchor&&i(t.targetAnchor);break}}N=i(N)}}function b(I,P){P.anchor=m(i(I),P,l(I),n,o,a,s)}const T=t.target=_u(t.props,d),E=gs(t.props);if(T){const I=T._lpa||T.firstChild;t.shapeFlag&16&&(E?(b(e,t),w(T,I),t.targetAnchor||yu(T,t,f,g,l(e)===T?e:null)):(t.anchor=i(e),w(T,I),t.targetAnchor||yu(T,t,f,g),m(I&&i(I),t,T,n,o,a,s))),Ir(t,E)}else E&&t.shapeFlag&16&&(b(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const Jd=Kh;function Ir(e,t){const n=e.ctx;if(n&&n.ut){let o,a;for(t?(o=e.el,a=e.anchor):(o=e.targetStart,a=e.targetAnchor);o&&o!==a;)o.nodeType===1&&o.setAttribute("data-v-owner",n.uid),o=o.nextSibling;n.ut()}}function yu(e,t,n,o,a=null){const s=t.targetStart=n(""),i=t.targetAnchor=n("");return s[Gd]=i,e&&(o(s,e,a),o(i,e,a)),i}const So=Symbol("_leaveCb"),Mr=Symbol("_enterCb");function Xd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Dt(()=>{e.isMounted=!0}),Ba(()=>{e.isUnmounting=!0}),e}const To=[Function,Array],Qd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:To,onEnter:To,onAfterEnter:To,onEnterCancelled:To,onBeforeLeave:To,onLeave:To,onAfterLeave:To,onLeaveCancelled:To,onBeforeAppear:To,onAppear:To,onAfterAppear:To,onAppearCancelled:To},Zd=e=>{const t=e.subTree;return t.component?Zd(t.component):t},Xh={name:"BaseTransition",props:Qd,setup(e,{slots:t}){const n=ya(),o=Xd();return()=>{const a=t.default&&wu(t.default(),!0),s=a&&a.length?ep(a):n.subTree?Ae():void 0;if(!s)return;const i=Mt(e),{mode:l}=i;if(o.isLeaving)return bu(s);const d=np(s);if(!d)return bu(s);let g=Or(d,i,o,n,m=>g=m);d.type!==Pn&&ms(d,g);let f=n.subTree&&np(n.subTree);if(f&&f.type!==Pn&&!_s(f,d)&&Zd(n).type!==Pn){let m=Or(f,i,o,n);if(ms(f,m),l==="out-in"&&d.type!==Pn)return o.isLeaving=!0,m.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete m.afterLeave,f=void 0},bu(s);l==="in-out"&&d.type!==Pn?m.delayLeave=(w,b,T)=>{const E=tp(o,f);E[String(f.key)]=f,w[So]=()=>{b(),w[So]=void 0,delete g.delayedLeave,f=void 0},g.delayedLeave=()=>{T(),delete g.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return s}}};function ep(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Pn){t=n;break}}return t}const Qh=Xh;function tp(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Or(e,t,n,o,a){const{appear:s,mode:i,persisted:l=!1,onBeforeEnter:d,onEnter:g,onAfterEnter:f,onEnterCancelled:m,onBeforeLeave:w,onLeave:b,onAfterLeave:T,onLeaveCancelled:E,onBeforeAppear:I,onAppear:P,onAfterAppear:N,onAppearCancelled:pe}=t,D=String(e.key),V=tp(n,e),fe=(le,Pe)=>{le&&xo(le,o,9,Pe)},O=(le,Pe)=>{const Ie=Pe[1];fe(le,Pe),dt(le)?le.every(ue=>ue.length<=1)&&Ie():le.length<=1&&Ie()},se={mode:i,persisted:l,beforeEnter(le){let Pe=d;if(!n.isMounted)if(s)Pe=I||d;else return;le[So]&&le[So](!0);const Ie=V[D];Ie&&_s(e,Ie)&&Ie.el[So]&&Ie.el[So](),fe(Pe,[le])},enter(le){if(V[D]===e)return;let Pe=g,Ie=f,ue=m;if(!n.isMounted)if(s)Pe=P||g,Ie=N||f,ue=pe||m;else return;let we=!1;le[Mr]=J=>{we||(we=!0,J?fe(ue,[le]):fe(Ie,[le]),se.delayedLeave&&se.delayedLeave(),le[Mr]=void 0)};const ne=le[Mr].bind(null,!1);Pe?O(Pe,[le,ne]):ne()},leave(le,Pe){const Ie=String(e.key);if(le[Mr]&&le[Mr](!0),n.isUnmounting)return Pe();fe(w,[le]);let ue=!1;le[So]=ne=>{ue||(ue=!0,Pe(),ne?fe(E,[le]):fe(T,[le]),le[So]=void 0,V[Ie]===e&&delete V[Ie])};const we=le[So].bind(null,!1);V[Ie]=e,b?O(b,[le,we]):we()},clone(le){const Pe=Or(le,t,n,o,a);return a&&a(Pe),Pe}};return se}function bu(e){if(Yi(e))return e=Ua(e),e.children=null,e}function np(e){if(!Yi(e))return qd(e.type)&&e.children?ep(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_t(n.default))return n.default()}}function ms(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ms(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function wu(e,t=!1,n){let o=[],a=0;for(let s=0;s<e.length;s++){let i=e[s];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:s);i.type===qe?(i.patchFlag&128&&a++,o=o.concat(wu(i.children,t,l))):(t||i.type!==Pn)&&o.push(l!=null?Ua(i,{key:l}):i)}if(a>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}function no(e,t){return _t(e)?bn({name:e.name},t,{setup:e}):e}function op(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function ap(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const qi=new WeakMap;function Dr(e,t,n,o,a=!1){if(dt(e)){e.forEach((E,I)=>Dr(E,t&&(dt(t)?t[I]:t),n,o,a));return}if(Vs(o)&&!a){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Dr(e,t,n,o.component.subTree);return}const s=o.shapeFlag&4?tl(o.component):o.el,i=a?null:s,{i:l,r:d}=e,g=t&&t.r,f=l.refs===tn?l.refs={}:l.refs,m=l.setupState,w=Mt(m),b=m===tn?sd:E=>ap(f,E)?!1:Gt(w,E),T=(E,I)=>!(I&&ap(f,I));if(g!=null&&g!==d){if(sp(t),cn(g))f[g]=null,b(g)&&(m[g]=null);else if(fn(g)){const E=t;T(g,E.k)&&(g.value=null),E.k&&(f[E.k]=null)}}if(_t(d))Bs(d,l,12,[i,f]);else{const E=cn(d),I=fn(d);if(E||I){const P=()=>{if(e.f){const N=E?b(d)?m[d]:f[d]:T()||!e.k?d.value:f[e.k];if(a)dt(N)&&Zl(N,s);else if(dt(N))N.includes(s)||N.push(s);else if(E)f[d]=[s],b(d)&&(m[d]=f[d]);else{const pe=[s];T(d,e.k)&&(d.value=pe),e.k&&(f[e.k]=pe)}}else E?(f[d]=i,b(d)&&(m[d]=i)):I&&(T(d,e.k)&&(d.value=i),e.k&&(f[e.k]=i))};if(i){const N=()=>{P(),qi.delete(e)};N.id=-1,qi.set(e,N),Gn(N,n)}else sp(e),P()}}}function sp(e){const t=qi.get(e);t&&(t.flags|=8,qi.delete(e))}Mi().requestIdleCallback,Mi().cancelIdleCallback;const Vs=e=>!!e.type.__asyncLoader,Yi=e=>e.type.__isKeepAlive;function Zh(e,t){rp(e,"a",t)}function e1(e,t){rp(e,"da",t)}function rp(e,t,n=Rn){const o=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Ki(t,o,n),n){let a=n.parent;for(;a&&a.parent;)Yi(a.parent.vnode)&&t1(o,t,n,a),a=a.parent}}function t1(e,t,n,o){const a=Ki(t,e,o,!0);go(()=>{Zl(o[t],a)},n)}function Ki(e,t,n=Rn,o=!1){if(n){const a=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...i)=>{Wo();const l=Vr(n),d=xo(t,n,e,i);return l(),Ho(),d});return o?a.unshift(s):a.push(s),s}}const ha=e=>(t,n=Rn)=>{(!Wr||e==="sp")&&Ki(e,(...o)=>t(...o),n)},n1=ha("bm"),Dt=ha("m"),ip=ha("bu"),lp=ha("u"),Ba=ha("bum"),go=ha("um"),o1=ha("sp"),a1=ha("rtg"),s1=ha("rtc");function r1(e,t=Rn){Ki("ec",e,t)}const i1="components";function l1(e,t){return c1(i1,e,!0,t)||e}const u1=Symbol.for("v-ndc");function c1(e,t,n=!0,o=!1){const a=Ln||Rn;if(a){const s=a.type;{const l=zp(s,!1);if(l&&(l===t||l===Wn(t)||l===Ai(Wn(t))))return s}const i=up(a[e]||s[e],t)||up(a.appContext[e],t);return!i&&o?s:i}}function up(e,t){return e&&(e[t]||e[Wn(t)]||e[Ai(Wn(t))])}function ot(e,t,n,o){let a;const s=n,i=dt(e);if(i||cn(e)){const l=i&&fa(e);let d=!1,g=!1;l&&(d=!fo(e),g=ga(e),e=Di(e)),a=new Array(e.length);for(let f=0,m=e.length;f<m;f++)a[f]=t(d?g?Fs(Lo(e[f])):Lo(e[f]):e[f],f,void 0,s)}else if(typeof e=="number"){a=new Array(e);for(let l=0;l<e;l++)a[l]=t(l+1,l,void 0,s)}else if(qt(e))if(e[Symbol.iterator])a=Array.from(e,(l,d)=>t(l,d,void 0,s));else{const l=Object.keys(e);a=new Array(l.length);for(let d=0,g=l.length;d<g;d++){const f=l[d];a[d]=t(e[f],f,d,s)}}else a=[];return a}function Pr(e,t,n={},o,a){if(Ln.ce||Ln.parent&&Vs(Ln.parent)&&Ln.parent.ce){const g=Object.keys(n).length>0;return t!=="default"&&(n.name=t),C(),Zt(qe,null,[st("slot",n,o&&o())],g?-2:64)}let s=e[t];s&&s._c&&(s._d=!1),C();const i=s&&cp(s(n)),l=n.key||i&&i.key,d=Zt(qe,{key:(l&&!po(l)?l:`_${t}`)+(!i&&o?"_fb":"")},i||(o?o():[]),i&&e._===1?64:-2);return!a&&d.scopeId&&(d.slotScopeIds=[d.scopeId+"-s"]),s&&s._c&&(s._d=!0),d}function cp(e){return e.some(t=>zr(t)?!(t.type===Pn||t.type===qe&&!cp(t.children)):!0)?e:null}const xu=e=>e?Fp(e)?tl(e):xu(e.parent):null,Rr=bn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>xu(e.parent),$root:e=>xu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>gp(e),$forceUpdate:e=>e.f||(e.f=()=>{hu(e.update)}),$nextTick:e=>e.n||(e.n=yt.bind(e.proxy)),$watch:e=>qh.bind(e)}),Su=(e,t)=>e!==tn&&!e.__isScriptSetup&&Gt(e,t),d1={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:a,props:s,accessCache:i,type:l,appContext:d}=e;if(t[0]!=="$"){const w=i[t];if(w!==void 0)switch(w){case 1:return o[t];case 2:return a[t];case 4:return n[t];case 3:return s[t]}else{if(Su(o,t))return i[t]=1,o[t];if(a!==tn&&Gt(a,t))return i[t]=2,a[t];if(Gt(s,t))return i[t]=3,s[t];if(n!==tn&&Gt(n,t))return i[t]=4,n[t];Tu&&(i[t]=0)}}const g=Rr[t];let f,m;if(g)return t==="$attrs"&&Dn(e.attrs,"get",""),g(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(n!==tn&&Gt(n,t))return i[t]=4,n[t];if(m=d.config.globalProperties,Gt(m,t))return m[t]},set({_:e},t,n){const{data:o,setupState:a,ctx:s}=e;return Su(a,t)?(a[t]=n,!0):o!==tn&&Gt(o,t)?(o[t]=n,!0):Gt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:a,props:s,type:i}},l){let d;return!!(n[l]||e!==tn&&l[0]!=="$"&&Gt(e,l)||Su(t,l)||Gt(s,l)||Gt(o,l)||Gt(Rr,l)||Gt(a.config.globalProperties,l)||(d=i.__cssModules)&&d[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Gt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function dp(e){return dt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Tu=!0;function p1(e){const t=gp(e),n=e.proxy,o=e.ctx;Tu=!1,t.beforeCreate&&pp(t.beforeCreate,e,"bc");const{data:a,computed:s,methods:i,watch:l,provide:d,inject:g,created:f,beforeMount:m,mounted:w,beforeUpdate:b,updated:T,activated:E,deactivated:I,beforeDestroy:P,beforeUnmount:N,destroyed:pe,unmounted:D,render:V,renderTracked:fe,renderTriggered:O,errorCaptured:se,serverPrefetch:le,expose:Pe,inheritAttrs:Ie,components:ue,directives:we,filters:ne}=t;if(g&&f1(g,o,null),i)for(const X in i){const ee=i[X];_t(ee)&&(o[X]=ee.bind(n))}if(a){const X=a.call(n,n);qt(X)&&(e.data=ds(X))}if(Tu=!0,s)for(const X in s){const ee=s[X],$e=_t(ee)?ee.bind(n,n):_t(ee.get)?ee.get.bind(n,n):zo,ve=!_t(ee)&&_t(ee.set)?ee.set.bind(n):zo,Z=$t({get:$e,set:ve});Object.defineProperty(o,X,{enumerable:!0,configurable:!0,get:()=>Z.value,set:te=>Z.value=te})}if(l)for(const X in l)fp(l[X],o,n,X);if(d){const X=_t(d)?d.call(n):d;Reflect.ownKeys(X).forEach(ee=>{ji(ee,X[ee])})}f&&pp(f,e,"c");function ie(X,ee){dt(ee)?ee.forEach($e=>X($e.bind(n))):ee&&X(ee.bind(n))}if(ie(n1,m),ie(Dt,w),ie(ip,b),ie(lp,T),ie(Zh,E),ie(e1,I),ie(r1,se),ie(s1,fe),ie(a1,O),ie(Ba,N),ie(go,D),ie(o1,le),dt(Pe))if(Pe.length){const X=e.exposed||(e.exposed={});Pe.forEach(ee=>{Object.defineProperty(X,ee,{get:()=>n[ee],set:$e=>n[ee]=$e,enumerable:!0})})}else e.exposed||(e.exposed={});V&&e.render===zo&&(e.render=V),Ie!=null&&(e.inheritAttrs=Ie),ue&&(e.components=ue),we&&(e.directives=we),le&&op(e)}function f1(e,t,n=zo){dt(e)&&(e=ku(e));for(const o in e){const a=e[o];let s;qt(a)?"default"in a?s=va(a.from||o,a.default,!0):s=va(a.from||o):s=va(a),fn(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:i=>s.value=i}):t[o]=s}}function pp(e,t,n){xo(dt(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function fp(e,t,n,o){let a=o.includes(".")?jd(n,o):()=>n[o];if(cn(e)){const s=t[e];_t(s)&&St(a,s)}else if(_t(e))St(a,e.bind(n));else if(qt(e))if(dt(e))e.forEach(s=>fp(s,t,n,o));else{const s=_t(e.handler)?e.handler.bind(n):t[e.handler];_t(s)&&St(a,s,e)}}function gp(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:a,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let d;return l?d=l:!a.length&&!n&&!o?d=t:(d={},a.length&&a.forEach(g=>Ji(d,g,i,!0)),Ji(d,t,i)),qt(t)&&s.set(t,d),d}function Ji(e,t,n,o=!1){const{mixins:a,extends:s}=t;s&&Ji(e,s,n,!0),a&&a.forEach(i=>Ji(e,i,n,!0));for(const i in t)if(!(o&&i==="expose")){const l=g1[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const g1={data:mp,props:vp,emits:vp,methods:Nr,computed:Nr,beforeCreate:jn,created:jn,beforeMount:jn,mounted:jn,beforeUpdate:jn,updated:jn,beforeDestroy:jn,beforeUnmount:jn,destroyed:jn,unmounted:jn,activated:jn,deactivated:jn,errorCaptured:jn,serverPrefetch:jn,components:Nr,directives:Nr,watch:v1,provide:mp,inject:m1};function mp(e,t){return t?e?function(){return bn(_t(e)?e.call(this,this):e,_t(t)?t.call(this,this):t)}:t:e}function m1(e,t){return Nr(ku(e),ku(t))}function ku(e){if(dt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function jn(e,t){return e?[...new Set([].concat(e,t))]:t}function Nr(e,t){return e?bn(Object.create(null),e,t):t}function vp(e,t){return e?dt(e)&&dt(t)?[...new Set([...e,...t])]:bn(Object.create(null),dp(e),dp(t??{})):t}function v1(e,t){if(!e)return t;if(!t)return e;const n=bn(Object.create(null),e);for(const o in t)n[o]=jn(e[o],t[o]);return n}function hp(){return{app:null,config:{isNativeTag:sd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let h1=0;function _1(e,t){return function(o,a=null){_t(o)||(o=bn({},o)),a!=null&&!qt(a)&&(a=null);const s=hp(),i=new WeakSet,l=[];let d=!1;const g=s.app={_uid:h1++,_component:o,_props:a,_container:null,_context:s,_instance:null,version:X1,get config(){return s.config},set config(f){},use(f,...m){return i.has(f)||(f&&_t(f.install)?(i.add(f),f.install(g,...m)):_t(f)&&(i.add(f),f(g,...m))),g},mixin(f){return s.mixins.includes(f)||s.mixins.push(f),g},component(f,m){return m?(s.components[f]=m,g):s.components[f]},directive(f,m){return m?(s.directives[f]=m,g):s.directives[f]},mount(f,m,w){if(!d){const b=g._ceVNode||st(o,a);return b.appContext=s,w===!0?w="svg":w===!1&&(w=void 0),e(b,f,w),d=!0,g._container=f,f.__vue_app__=g,tl(b.component)}},onUnmount(f){l.push(f)},unmount(){d&&(xo(l,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(f,m){return s.provides[f]=m,g},runWithContext(f){const m=vs;vs=g;try{return f()}finally{vs=m}}};return g}}let vs=null;const y1=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Wn(t)}Modifiers`]||e[`${Pa(t)}Modifiers`];function b1(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||tn;let a=n;const s=t.startsWith("update:"),i=s&&y1(o,t.slice(7));i&&(i.trim&&(a=n.map(f=>cn(f)?f.trim():f)),i.number&&(a=n.map(Ii)));let l,d=o[l=eu(t)]||o[l=eu(Wn(t))];!d&&s&&(d=o[l=eu(Pa(t))]),d&&xo(d,e,6,a);const g=o[l+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xo(g,e,6,a)}}const w1=new WeakMap;function _p(e,t,n=!1){const o=n?w1:t.emitsCache,a=o.get(e);if(a!==void 0)return a;const s=e.emits;let i={},l=!1;if(!_t(e)){const d=g=>{const f=_p(g,t,!0);f&&(l=!0,bn(i,f))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!s&&!l?(qt(e)&&o.set(e,null),null):(dt(s)?s.forEach(d=>i[d]=null):bn(i,s),qt(e)&&o.set(e,i),i)}function Xi(e,t){return!e||!ki(t)?!1:(t=t.slice(2).replace(/Once$/,""),Gt(e,t[0].toLowerCase()+t.slice(1))||Gt(e,Pa(t))||Gt(e,t))}function ED(){}function yp(e){const{type:t,vnode:n,proxy:o,withProxy:a,propsOptions:[s],slots:i,attrs:l,emit:d,render:g,renderCache:f,props:m,data:w,setupState:b,ctx:T,inheritAttrs:E}=e,I=Hi(e);let P,N;try{if(n.shapeFlag&4){const D=a||o,V=D;P=qo(g.call(V,D,f,m,b,w,T)),N=l}else{const D=t;P=qo(D.length>1?D(m,{attrs:l,slots:i,emit:d}):D(m,null)),N=t.props?l:x1(l)}}catch(D){Br.length=0,Vi(D,e,1),P=st(Pn)}let pe=P;if(N&&E!==!1){const D=Object.keys(N),{shapeFlag:V}=pe;D.length&&V&7&&(s&&D.some(Ci)&&(N=S1(N,s)),pe=Ua(pe,N,!1,!0))}return n.dirs&&(pe=Ua(pe,null,!1,!0),pe.dirs=pe.dirs?pe.dirs.concat(n.dirs):n.dirs),n.transition&&ms(pe,n.transition),P=pe,Hi(I),P}const x1=e=>{let t;for(const n in e)(n==="class"||n==="style"||ki(n))&&((t||(t={}))[n]=e[n]);return t},S1=(e,t)=>{const n={};for(const o in e)(!Ci(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function T1(e,t,n){const{props:o,children:a,component:s}=e,{props:i,children:l,patchFlag:d}=t,g=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return o?bp(o,i,g):!!i;if(d&8){const f=t.dynamicProps;for(let m=0;m<f.length;m++){const w=f[m];if(wp(i,o,w)&&!Xi(g,w))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:o===i?!1:o?i?bp(o,i,g):!0:!!i;return!1}function bp(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let a=0;a<o.length;a++){const s=o[a];if(wp(t,e,s)&&!Xi(n,s))return!0}return!1}function wp(e,t,n){const o=e[n],a=t[n];return n==="style"&&qt(o)&&qt(a)?!Ra(o,a):o!==a}function k1({vnode:e,parent:t,suspense:n},o){for(;t;){const a=t.subTree;if(a.suspense&&a.suspense.activeBranch===e&&(a.suspense.vnode.el=a.el=o,e=a),a===e)(e=t.vnode).el=o,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=o)}const xp={},Sp=()=>Object.create(xp),Tp=e=>Object.getPrototypeOf(e)===xp;function C1(e,t,n,o=!1){const a={},s=Sp();e.propsDefaults=Object.create(null),kp(e,t,a,s);for(const i in e.propsOptions[0])i in a||(a[i]=void 0);n?e.props=o?a:Ch(a):e.type.props?e.props=a:e.props=s,e.attrs=s}function E1(e,t,n,o){const{props:a,attrs:s,vnode:{patchFlag:i}}=e,l=Mt(a),[d]=e.propsOptions;let g=!1;if((o||i>0)&&!(i&16)){if(i&8){const f=e.vnode.dynamicProps;for(let m=0;m<f.length;m++){let w=f[m];if(Xi(e.emitsOptions,w))continue;const b=t[w];if(d)if(Gt(s,w))b!==s[w]&&(s[w]=b,g=!0);else{const T=Wn(w);a[T]=Cu(d,l,T,b,e,!1)}else b!==s[w]&&(s[w]=b,g=!0)}}}else{kp(e,t,a,s)&&(g=!0);let f;for(const m in l)(!t||!Gt(t,m)&&((f=Pa(m))===m||!Gt(t,f)))&&(d?n&&(n[m]!==void 0||n[f]!==void 0)&&(a[m]=Cu(d,l,m,void 0,e,!0)):delete a[m]);if(s!==l)for(const m in s)(!t||!Gt(t,m))&&(delete s[m],g=!0)}g&&da(e.attrs,"set","")}function kp(e,t,n,o){const[a,s]=e.propsOptions;let i=!1,l;if(t)for(let d in t){if(Sr(d))continue;const g=t[d];let f;a&&Gt(a,f=Wn(d))?!s||!s.includes(f)?n[f]=g:(l||(l={}))[f]=g:Xi(e.emitsOptions,d)||(!(d in o)||g!==o[d])&&(o[d]=g,i=!0)}if(s){const d=Mt(n),g=l||tn;for(let f=0;f<s.length;f++){const m=s[f];n[m]=Cu(a,d,m,g[m],e,!Gt(g,m))}}return i}function Cu(e,t,n,o,a,s){const i=e[n];if(i!=null){const l=Gt(i,"default");if(l&&o===void 0){const d=i.default;if(i.type!==Function&&!i.skipFactory&&_t(d)){const{propsDefaults:g}=a;if(n in g)o=g[n];else{const f=Vr(a);o=g[n]=d.call(null,t),f()}}else o=d;a.ce&&a.ce._setProp(n,o)}i[0]&&(s&&!l?o=!1:i[1]&&(o===""||o===Pa(n))&&(o=!0))}return o}const $1=new WeakMap;function Cp(e,t,n=!1){const o=n?$1:t.propsCache,a=o.get(e);if(a)return a;const s=e.props,i={},l=[];let d=!1;if(!_t(e)){const f=m=>{d=!0;const[w,b]=Cp(m,t,!0);bn(i,w),b&&l.push(...b)};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!s&&!d)return qt(e)&&o.set(e,Ds),Ds;if(dt(s))for(let f=0;f<s.length;f++){const m=Wn(s[f]);Ep(m)&&(i[m]=tn)}else if(s)for(const f in s){const m=Wn(f);if(Ep(m)){const w=s[f],b=i[m]=dt(w)||_t(w)?{type:w}:bn({},w),T=b.type;let E=!1,I=!0;if(dt(T))for(let P=0;P<T.length;++P){const N=T[P],pe=_t(N)&&N.name;if(pe==="Boolean"){E=!0;break}else pe==="String"&&(I=!1)}else E=_t(T)&&T.name==="Boolean";b[0]=E,b[1]=I,(E||Gt(b,"default"))&&l.push(m)}}const g=[i,l];return qt(e)&&o.set(e,g),g}function Ep(e){return e[0]!=="$"&&!Sr(e)}const Eu=e=>e==="_"||e==="_ctx"||e==="$stable",$u=e=>dt(e)?e.map(qo):[qo(e)],A1=(e,t,n)=>{if(t._n)return t;const o=Ut((...a)=>$u(t(...a)),n);return o._c=!1,o},$p=(e,t,n)=>{const o=e._ctx;for(const a in e){if(Eu(a))continue;const s=e[a];if(_t(s))t[a]=A1(a,s,o);else if(s!=null){const i=$u(s);t[a]=()=>i}}},Ap=(e,t)=>{const n=$u(t);e.slots.default=()=>n},Lp=(e,t,n)=>{for(const o in t)(n||!Eu(o))&&(e[o]=t[o])},L1=(e,t,n)=>{const o=e.slots=Sp();if(e.vnode.shapeFlag&32){const a=t._;a?(Lp(o,t,n),n&&cd(o,"_",a,!0)):$p(t,o)}else t&&Ap(e,t)},I1=(e,t,n)=>{const{vnode:o,slots:a}=e;let s=!0,i=tn;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:Lp(a,t,n):(s=!t.$stable,$p(t,a)),i=t}else t&&(Ap(e,t),i={default:1});if(s)for(const l in a)!Eu(l)&&i[l]==null&&delete a[l]},Gn=R1;function M1(e){return O1(e)}function O1(e,t){const n=Mi();n.__VUE__=!0;const{insert:o,remove:a,patchProp:s,createElement:i,createText:l,createComment:d,setText:g,setElementText:f,parentNode:m,nextSibling:w,setScopeId:b=zo,insertStaticContent:T}=e,E=($,A,W,ce=null,Ce=null,Le=null,z=void 0,k=null,H=!!A.dynamicChildren)=>{if($===A)return;$&&!_s($,A)&&(ce=j($),te($,Ce,Le,!0),$=null),A.patchFlag===-2&&(H=!1,A.dynamicChildren=null);const{type:Q,ref:Ne,shapeFlag:De}=A;switch(Q){case Fr:I($,A,W,ce);break;case Pn:P($,A,W,ce);break;case Iu:$==null&&N(A,W,ce,z);break;case qe:ue($,A,W,ce,Ce,Le,z,k,H);break;default:De&1?V($,A,W,ce,Ce,Le,z,k,H):De&6?we($,A,W,ce,Ce,Le,z,k,H):(De&64||De&128)&&Q.process($,A,W,ce,Ce,Le,z,k,H,q)}Ne!=null&&Ce?Dr(Ne,$&&$.ref,Le,A||$,!A):Ne==null&&$&&$.ref!=null&&Dr($.ref,null,Le,$,!0)},I=($,A,W,ce)=>{if($==null)o(A.el=l(A.children),W,ce);else{const Ce=A.el=$.el;A.children!==$.children&&g(Ce,A.children)}},P=($,A,W,ce)=>{$==null?o(A.el=d(A.children||""),W,ce):A.el=$.el},N=($,A,W,ce)=>{[$.el,$.anchor]=T($.children,A,W,ce,$.el,$.anchor)},pe=({el:$,anchor:A},W,ce)=>{let Ce;for(;$&&$!==A;)Ce=w($),o($,W,ce),$=Ce;o(A,W,ce)},D=({el:$,anchor:A})=>{let W;for(;$&&$!==A;)W=w($),a($),$=W;a(A)},V=($,A,W,ce,Ce,Le,z,k,H)=>{if(A.type==="svg"?z="svg":A.type==="math"&&(z="mathml"),$==null)fe(A,W,ce,Ce,Le,z,k,H);else{const Q=$.el&&$.el._isVueCE?$.el:null;try{Q&&Q._beginPatch(),le($,A,Ce,Le,z,k,H)}finally{Q&&Q._endPatch()}}},fe=($,A,W,ce,Ce,Le,z,k)=>{let H,Q;const{props:Ne,shapeFlag:De,transition:ge,dirs:Ee}=$;if(H=$.el=i($.type,Le,Ne&&Ne.is,Ne),De&8?f(H,$.children):De&16&&se($.children,H,null,ce,Ce,Au($,Le),z,k),Ee&&fs($,null,ce,"created"),O(H,$,$.scopeId,z,ce),Ne){for(const et in Ne)et!=="value"&&!Sr(et)&&s(H,et,null,Ne[et],Le,ce);"value"in Ne&&s(H,"value",null,Ne.value,Le),(Q=Ne.onVnodeBeforeMount)&&Yo(Q,ce,$)}Ee&&fs($,null,ce,"beforeMount");const Ke=D1(Ce,ge);Ke&&ge.beforeEnter(H),o(H,A,W),((Q=Ne&&Ne.onVnodeMounted)||Ke||Ee)&&Gn(()=>{try{Q&&Yo(Q,ce,$),Ke&&ge.enter(H),Ee&&fs($,null,ce,"mounted")}finally{}},Ce)},O=($,A,W,ce,Ce)=>{if(W&&b($,W),ce)for(let Le=0;Le<ce.length;Le++)b($,ce[Le]);if(Ce){let Le=Ce.subTree;if(A===Le||Dp(Le.type)&&(Le.ssContent===A||Le.ssFallback===A)){const z=Ce.vnode;O($,z,z.scopeId,z.slotScopeIds,Ce.parent)}}},se=($,A,W,ce,Ce,Le,z,k,H=0)=>{for(let Q=H;Q<$.length;Q++){const Ne=$[Q]=k?_a($[Q]):qo($[Q]);E(null,Ne,A,W,ce,Ce,Le,z,k)}},le=($,A,W,ce,Ce,Le,z)=>{const k=A.el=$.el;let{patchFlag:H,dynamicChildren:Q,dirs:Ne}=A;H|=$.patchFlag&16;const De=$.props||tn,ge=A.props||tn;let Ee;if(W&&hs(W,!1),(Ee=ge.onVnodeBeforeUpdate)&&Yo(Ee,W,A,$),Ne&&fs(A,$,W,"beforeUpdate"),W&&hs(W,!0),(De.innerHTML&&ge.innerHTML==null||De.textContent&&ge.textContent==null)&&f(k,""),Q?Pe($.dynamicChildren,Q,k,W,ce,Au(A,Ce),Le):z||ee($,A,k,null,W,ce,Au(A,Ce),Le,!1),H>0){if(H&16)Ie(k,De,ge,W,Ce);else if(H&2&&De.class!==ge.class&&s(k,"class",null,ge.class,Ce),H&4&&s(k,"style",De.style,ge.style,Ce),H&8){const Ke=A.dynamicProps;for(let et=0;et<Ke.length;et++){const ut=Ke[et],ft=De[ut],at=ge[ut];(at!==ft||ut==="value")&&s(k,ut,ft,at,Ce,W)}}H&1&&$.children!==A.children&&f(k,A.children)}else!z&&Q==null&&Ie(k,De,ge,W,Ce);((Ee=ge.onVnodeUpdated)||Ne)&&Gn(()=>{Ee&&Yo(Ee,W,A,$),Ne&&fs(A,$,W,"updated")},ce)},Pe=($,A,W,ce,Ce,Le,z)=>{for(let k=0;k<A.length;k++){const H=$[k],Q=A[k],Ne=H.el&&(H.type===qe||!_s(H,Q)||H.shapeFlag&198)?m(H.el):W;E(H,Q,Ne,null,ce,Ce,Le,z,!0)}},Ie=($,A,W,ce,Ce)=>{if(A!==W){if(A!==tn)for(const Le in A)!Sr(Le)&&!(Le in W)&&s($,Le,A[Le],null,Ce,ce);for(const Le in W){if(Sr(Le))continue;const z=W[Le],k=A[Le];z!==k&&Le!=="value"&&s($,Le,k,z,Ce,ce)}"value"in W&&s($,"value",A.value,W.value,Ce)}},ue=($,A,W,ce,Ce,Le,z,k,H)=>{const Q=A.el=$?$.el:l(""),Ne=A.anchor=$?$.anchor:l("");let{patchFlag:De,dynamicChildren:ge,slotScopeIds:Ee}=A;Ee&&(k=k?k.concat(Ee):Ee),$==null?(o(Q,W,ce),o(Ne,W,ce),se(A.children||[],W,Ne,Ce,Le,z,k,H)):De>0&&De&64&&ge&&$.dynamicChildren&&$.dynamicChildren.length===ge.length?(Pe($.dynamicChildren,ge,W,Ce,Le,z,k),(A.key!=null||Ce&&A===Ce.subTree)&&Lu($,A,!0)):ee($,A,W,Ne,Ce,Le,z,k,H)},we=($,A,W,ce,Ce,Le,z,k,H)=>{A.slotScopeIds=k,$==null?A.shapeFlag&512?Ce.ctx.activate(A,W,ce,z,H):ne(A,W,ce,Ce,Le,z,H):J($,A,H)},ne=($,A,W,ce,Ce,Le,z)=>{const k=$.component=W1($,ce,Ce);if(Yi($)&&(k.ctx.renderer=q),H1(k,!1,z),k.asyncDep){if(Ce&&Ce.registerDep(k,ie,z),!$.el){const H=k.subTree=st(Pn);P(null,H,A,W),$.placeholder=H.el}}else ie(k,$,A,W,Ce,Le,z)},J=($,A,W)=>{const ce=A.component=$.component;if(T1($,A,W))if(ce.asyncDep&&!ce.asyncResolved){X(ce,A,W);return}else ce.next=A,ce.update();else A.el=$.el,ce.vnode=A},ie=($,A,W,ce,Ce,Le,z)=>{const k=()=>{if($.isMounted){let{next:De,bu:ge,u:Ee,parent:Ke,vnode:et}=$;{const Rt=Ip($);if(Rt){De&&(De.el=et.el,X($,De,z)),Rt.asyncDep.then(()=>{Gn(()=>{$.isUnmounted||Q()},Ce)});return}}let ut=De,ft;hs($,!1),De?(De.el=et.el,X($,De,z)):De=et,ge&&Li(ge),(ft=De.props&&De.props.onVnodeBeforeUpdate)&&Yo(ft,Ke,De,et),hs($,!0);const at=yp($),rn=$.subTree;$.subTree=at,E(rn,at,m(rn.el),j(rn),$,Ce,Le),De.el=at.el,ut===null&&k1($,at.el),Ee&&Gn(Ee,Ce),(ft=De.props&&De.props.onVnodeUpdated)&&Gn(()=>Yo(ft,Ke,De,et),Ce)}else{let De;const{el:ge,props:Ee}=A,{bm:Ke,m:et,parent:ut,root:ft,type:at}=$,rn=Vs(A);hs($,!1),Ke&&Li(Ke),!rn&&(De=Ee&&Ee.onVnodeBeforeMount)&&Yo(De,ut,A),hs($,!0);{ft.ce&&ft.ce._hasShadowRoot()&&ft.ce._injectChildStyle(at,$.parent?$.parent.type:void 0);const Rt=$.subTree=yp($);E(null,Rt,W,ce,$,Ce,Le),A.el=Rt.el}if(et&&Gn(et,Ce),!rn&&(De=Ee&&Ee.onVnodeMounted)){const Rt=A;Gn(()=>Yo(De,ut,Rt),Ce)}(A.shapeFlag&256||ut&&Vs(ut.vnode)&&ut.vnode.shapeFlag&256)&&$.a&&Gn($.a,Ce),$.isMounted=!0,A=W=ce=null}};$.scope.on();const H=$.effect=new hd(k);$.scope.off();const Q=$.update=H.run.bind(H),Ne=$.job=H.runIfDirty.bind(H);Ne.i=$,Ne.id=$.uid,H.scheduler=()=>hu(Ne),hs($,!0),Q()},X=($,A,W)=>{A.component=$;const ce=$.vnode.props;$.vnode=A,$.next=null,E1($,A.props,ce,W),I1($,A.children,W),Wo(),Ud($),Ho()},ee=($,A,W,ce,Ce,Le,z,k,H=!1)=>{const Q=$&&$.children,Ne=$?$.shapeFlag:0,De=A.children,{patchFlag:ge,shapeFlag:Ee}=A;if(ge>0){if(ge&128){ve(Q,De,W,ce,Ce,Le,z,k,H);return}else if(ge&256){$e(Q,De,W,ce,Ce,Le,z,k,H);return}}Ee&8?(Ne&16&&re(Q,Ce,Le),De!==Q&&f(W,De)):Ne&16?Ee&16?ve(Q,De,W,ce,Ce,Le,z,k,H):re(Q,Ce,Le,!0):(Ne&8&&f(W,""),Ee&16&&se(De,W,ce,Ce,Le,z,k,H))},$e=($,A,W,ce,Ce,Le,z,k,H)=>{$=$||Ds,A=A||Ds;const Q=$.length,Ne=A.length,De=Math.min(Q,Ne);let ge;for(ge=0;ge<De;ge++){const Ee=A[ge]=H?_a(A[ge]):qo(A[ge]);E($[ge],Ee,W,null,Ce,Le,z,k,H)}Q>Ne?re($,Ce,Le,!0,!1,De):se(A,W,ce,Ce,Le,z,k,H,De)},ve=($,A,W,ce,Ce,Le,z,k,H)=>{let Q=0;const Ne=A.length;let De=$.length-1,ge=Ne-1;for(;Q<=De&&Q<=ge;){const Ee=$[Q],Ke=A[Q]=H?_a(A[Q]):qo(A[Q]);if(_s(Ee,Ke))E(Ee,Ke,W,null,Ce,Le,z,k,H);else break;Q++}for(;Q<=De&&Q<=ge;){const Ee=$[De],Ke=A[ge]=H?_a(A[ge]):qo(A[ge]);if(_s(Ee,Ke))E(Ee,Ke,W,null,Ce,Le,z,k,H);else break;De--,ge--}if(Q>De){if(Q<=ge){const Ee=ge+1,Ke=Ee<Ne?A[Ee].el:ce;for(;Q<=ge;)E(null,A[Q]=H?_a(A[Q]):qo(A[Q]),W,Ke,Ce,Le,z,k,H),Q++}}else if(Q>ge)for(;Q<=De;)te($[Q],Ce,Le,!0),Q++;else{const Ee=Q,Ke=Q,et=new Map;for(Q=Ke;Q<=ge;Q++){const Xt=A[Q]=H?_a(A[Q]):qo(A[Q]);Xt.key!=null&&et.set(Xt.key,Q)}let ut,ft=0;const at=ge-Ke+1;let rn=!1,Rt=0;const An=new Array(at);for(Q=0;Q<at;Q++)An[Q]=0;for(Q=Ee;Q<=De;Q++){const Xt=$[Q];if(ft>=at){te(Xt,Ce,Le,!0);continue}let ln;if(Xt.key!=null)ln=et.get(Xt.key);else for(ut=Ke;ut<=ge;ut++)if(An[ut-Ke]===0&&_s(Xt,A[ut])){ln=ut;break}ln===void 0?te(Xt,Ce,Le,!0):(An[ln-Ke]=Q+1,ln>=Rt?Rt=ln:rn=!0,E(Xt,A[ln],W,null,Ce,Le,z,k,H),ft++)}const Tn=rn?P1(An):Ds;for(ut=Tn.length-1,Q=at-1;Q>=0;Q--){const Xt=Ke+Q,ln=A[Xt],Kn=A[Xt+1],Jn=Xt+1<Ne?Kn.el||Op(Kn):ce;An[Q]===0?E(null,ln,W,Jn,Ce,Le,z,k,H):rn&&(ut<0||Q!==Tn[ut]?Z(ln,W,Jn,2):ut--)}}},Z=($,A,W,ce,Ce=null)=>{const{el:Le,type:z,transition:k,children:H,shapeFlag:Q}=$;if(Q&6){Z($.component.subTree,A,W,ce);return}if(Q&128){$.suspense.move(A,W,ce);return}if(Q&64){z.move($,A,W,q);return}if(z===qe){o(Le,A,W);for(let De=0;De<H.length;De++)Z(H[De],A,W,ce);o($.anchor,A,W);return}if(z===Iu){pe($,A,W);return}if(ce!==2&&Q&1&&k)if(ce===0)k.persisted&&!Le[So]?o(Le,A,W):(k.beforeEnter(Le),o(Le,A,W),Gn(()=>k.enter(Le),Ce));else{const{leave:De,delayLeave:ge,afterLeave:Ee}=k,Ke=()=>{$.ctx.isUnmounted?a(Le):o(Le,A,W)},et=()=>{const ut=Le._isLeaving||!!Le[So];Le._isLeaving&&Le[So](!0),k.persisted&&!ut?Ke():De(Le,()=>{Ke(),Ee&&Ee()})};ge?ge(Le,Ke,et):et()}else o(Le,A,W)},te=($,A,W,ce=!1,Ce=!1)=>{const{type:Le,props:z,ref:k,children:H,dynamicChildren:Q,shapeFlag:Ne,patchFlag:De,dirs:ge,cacheIndex:Ee,memo:Ke}=$;if(De===-2&&(Ce=!1),k!=null&&(Wo(),Dr(k,null,W,$,!0),Ho()),Ee!=null&&(A.renderCache[Ee]=void 0),Ne&256){A.ctx.deactivate($);return}const et=Ne&1&&ge,ut=!Vs($);let ft;if(ut&&(ft=z&&z.onVnodeBeforeUnmount)&&Yo(ft,A,$),Ne&6)he($.component,W,ce);else{if(Ne&128){$.suspense.unmount(W,ce);return}et&&fs($,null,A,"beforeUnmount"),Ne&64?$.type.remove($,A,W,q,ce):Q&&!Q.hasOnce&&(Le!==qe||De>0&&De&64)?re(Q,A,W,!1,!0):(Le===qe&&De&384||!Ce&&Ne&16)&&re(H,A,W),ce&&be($)}const at=Ke!=null&&Ee==null;(ut&&(ft=z&&z.onVnodeUnmounted)||et||at)&&Gn(()=>{ft&&Yo(ft,A,$),et&&fs($,null,A,"unmounted"),at&&($.el=null)},W)},be=$=>{const{type:A,el:W,anchor:ce,transition:Ce}=$;if(A===qe){Te(W,ce);return}if(A===Iu){D($);return}const Le=()=>{a(W),Ce&&!Ce.persisted&&Ce.afterLeave&&Ce.afterLeave()};if($.shapeFlag&1&&Ce&&!Ce.persisted){const{leave:z,delayLeave:k}=Ce,H=()=>z(W,Le);k?k($.el,Le,H):H()}else Le()},Te=($,A)=>{let W;for(;$!==A;)W=w($),a($),$=W;a(A)},he=($,A,W)=>{const{bum:ce,scope:Ce,job:Le,subTree:z,um:k,m:H,a:Q}=$;Mp(H),Mp(Q),ce&&Li(ce),Ce.stop(),Le&&(Le.flags|=8,te(z,$,A,W)),k&&Gn(k,A),Gn(()=>{$.isUnmounted=!0},A)},re=($,A,W,ce=!1,Ce=!1,Le=0)=>{for(let z=Le;z<$.length;z++)te($[z],A,W,ce,Ce)},j=$=>{if($.shapeFlag&6)return j($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const A=w($.anchor||$.el),W=A&&A[Gd];return W?w(W):A};let oe=!1;const B=($,A,W)=>{let ce;$==null?A._vnode&&(te(A._vnode,null,null,!0),ce=A._vnode.component):E(A._vnode||null,$,A,null,null,null,W),A._vnode=$,oe||(oe=!0,Ud(ce),zd(),oe=!1)},q={p:E,um:te,m:Z,r:be,mt:ne,mc:se,pc:ee,pbc:Pe,n:j,o:e};return{render:B,hydrate:void 0,createApp:_1(B)}}function Au({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function hs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function D1(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Lu(e,t,n=!1){const o=e.children,a=t.children;if(dt(o)&&dt(a))for(let s=0;s<o.length;s++){const i=o[s];let l=a[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[s]=_a(a[s]),l.el=i.el),!n&&l.patchFlag!==-2&&Lu(i,l)),l.type===Fr&&(l.patchFlag===-1&&(l=a[s]=_a(l)),l.el=i.el),l.type===Pn&&!l.el&&(l.el=i.el)}}function P1(e){const t=e.slice(),n=[0];let o,a,s,i,l;const d=e.length;for(o=0;o<d;o++){const g=e[o];if(g!==0){if(a=n[n.length-1],e[a]<g){t[o]=a,n.push(o);continue}for(s=0,i=n.length-1;s<i;)l=s+i>>1,e[n[l]]<g?s=l+1:i=l;g<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}function Ip(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ip(t)}function Mp(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Op(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Op(t.subTree):null}const Dp=e=>e.__isSuspense;function R1(e,t){t&&t.pendingBranch?dt(e)?t.effects.push(...e):t.effects.push(e):Wh(e)}const qe=Symbol.for("v-fgt"),Fr=Symbol.for("v-txt"),Pn=Symbol.for("v-cmt"),Iu=Symbol.for("v-stc"),Br=[];let mo=null;function C(e=!1){Br.push(mo=e?null:[])}function N1(){Br.pop(),mo=Br[Br.length-1]||null}let Ur=1;function Qi(e,t=!1){Ur+=e,e<0&&mo&&t&&(mo.hasOnce=!0)}function Pp(e){return e.dynamicChildren=Ur>0?mo||Ds:null,N1(),Ur>0&&mo&&mo.push(e),e}function L(e,t,n,o,a,s){return Pp(r(e,t,n,o,a,s,!0))}function Zt(e,t,n,o,a){return Pp(st(e,t,n,o,a,!0))}function zr(e){return e?e.__v_isVNode===!0:!1}function _s(e,t){return e.type===t.type&&e.key===t.key}const Rp=({key:e})=>e??null,Zi=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?cn(e)||fn(e)||_t(e)?{i:Ln,r:e,k:t,f:!!n}:e:null);function r(e,t=null,n=null,o=0,a=null,s=e===qe?0:1,i=!1,l=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Rp(t),ref:t&&Zi(t),scopeId:Wd,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Ln};return l?(Mu(d,n),s&128&&e.normalize(d)):n&&(d.shapeFlag|=cn(n)?8:16),Ur>0&&!i&&mo&&(d.patchFlag>0||s&6)&&d.patchFlag!==32&&mo.push(d),d}const st=F1;function F1(e,t=null,n=null,o=0,a=null,s=!1){if((!e||e===u1)&&(e=Pn),zr(e)){const l=Ua(e,t,!0);return n&&Mu(l,n),Ur>0&&!s&&mo&&(l.shapeFlag&6?mo[mo.indexOf(e)]=l:mo.push(l)),l.patchFlag=-2,l}if(J1(e)&&(e=e.__vccOpts),t){t=B1(t);let{class:l,style:d}=t;l&&!cn(l)&&(t.class=Ve(l)),qt(d)&&(Bi(d)&&!dt(d)&&(d=bn({},d)),t.style=Ft(d))}const i=cn(e)?1:Dp(e)?128:qd(e)?64:qt(e)?4:_t(e)?2:0;return r(e,t,n,o,a,i,s,!0)}function B1(e){return e?Bi(e)||Tp(e)?bn({},e):e:null}function Ua(e,t,n=!1,o=!1){const{props:a,ref:s,patchFlag:i,children:l,transition:d}=e,g=t?U1(a||{},t):a,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Rp(g),ref:t&&t.ref?n&&s?dt(s)?s.concat(Zi(t)):[s,Zi(t)]:Zi(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qe?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ua(e.ssContent),ssFallback:e.ssFallback&&Ua(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&o&&ms(f,d.clone(f)),f}function ct(e=" ",t=0){return st(Fr,null,e,t)}function Ae(e="",t=!1){return t?(C(),Zt(Pn,null,e)):st(Pn,null,e)}function qo(e){return e==null||typeof e=="boolean"?st(Pn):dt(e)?st(qe,null,e.slice()):zr(e)?_a(e):st(Fr,null,String(e))}function _a(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ua(e)}function Mu(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(dt(t))n=16;else if(typeof t=="object")if(o&65){const a=t.default;a&&(a._c&&(a._d=!1),Mu(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!Tp(t)?t._ctx=Ln:a===3&&Ln&&(Ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else _t(t)?(t={default:t,_ctx:Ln},n=32):(t=String(t),o&64?(n=16,t=[ct(t)]):n=8);e.children=t,e.shapeFlag|=n}function U1(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const a in o)if(a==="class")t.class!==o.class&&(t.class=Ve([t.class,o.class]));else if(a==="style")t.style=Ft([t.style,o.style]);else if(ki(a)){const s=t[a],i=o[a];i&&s!==i&&!(dt(s)&&s.includes(i))?t[a]=s?[].concat(s,i):i:i==null&&s==null&&!Ci(a)&&(t[a]=i)}else a!==""&&(t[a]=o[a])}return t}function Yo(e,t,n,o=null){xo(e,t,7,[n,o])}const z1=hp();let V1=0;function W1(e,t,n){const o=e.type,a=(t?t.appContext:e.appContext)||z1,s={uid:V1++,vnode:e,type:o,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new md(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Cp(o,a),emitsOptions:_p(o,a),emit:null,emitted:null,propsDefaults:tn,inheritAttrs:o.inheritAttrs,ctx:tn,data:tn,props:tn,attrs:tn,slots:tn,refs:tn,setupState:tn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return s.ctx={_:s},s.root=t?t.root:s,s.emit=b1.bind(null,s),e.ce&&e.ce(s),s}let Rn=null;const ya=()=>Rn||Ln;let el,Ou;{const e=Mi(),t=(n,o)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(o),s=>{a.length>1?a.forEach(i=>i(s)):a[0](s)}};el=t("__VUE_INSTANCE_SETTERS__",n=>Rn=n),Ou=t("__VUE_SSR_SETTERS__",n=>Wr=n)}const Vr=e=>{const t=Rn;return el(e),e.scope.on(),()=>{e.scope.off(),el(t)}},Np=()=>{Rn&&Rn.scope.off(),el(null)};function Fp(e){return e.vnode.shapeFlag&4}let Wr=!1;function H1(e,t=!1,n=!1){t&&Ou(t);const{props:o,children:a}=e.vnode,s=Fp(e);C1(e,o,s,t),L1(e,a,n||t);const i=s?j1(e,t):void 0;return t&&Ou(!1),i}function j1(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,d1);const{setup:o}=n;if(o){Wo();const a=e.setupContext=o.length>1?q1(e):null,s=Vr(e),i=Bs(o,e,0,[e.props,a]),l=id(i);if(Ho(),s(),(l||e.sp)&&!Vs(e)&&op(e),l){if(i.then(Np,Np),t)return i.then(d=>{Bp(e,d)}).catch(d=>{Vi(d,e,0)});e.asyncDep=i}else Bp(e,i)}else Up(e)}function Bp(e,t,n){_t(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:qt(t)&&(e.setupState=Rd(t)),Up(e)}function Up(e,t,n){const o=e.type;e.render||(e.render=o.render||zo);{const a=Vr(e);Wo();try{p1(e)}finally{Ho(),a()}}}const G1={get(e,t){return Dn(e,"get",""),e[t]}};function q1(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,G1),slots:e.slots,emit:e.emit,expose:t}}function tl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Rd(mu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rr)return Rr[n](e)},has(t,n){return n in t||n in Rr}})):e.proxy}const Y1=/(?:^|[-_])\w/g,K1=e=>e.replace(Y1,t=>t.toUpperCase()).replace(/[-_]/g,"");function zp(e,t=!0){return _t(e)?e.displayName||e.name:e.name||t&&e.__name}function Vp(e,t,n=!1){let o=zp(t);if(!o&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(o=a[1])}if(!o&&e){const a=s=>{for(const i in s)if(s[i]===t)return i};o=a(e.components)||e.parent&&a(e.parent.type.components)||a(e.appContext.components)}return o?K1(o):n?"App":"Anonymous"}function J1(e){return _t(e)&&"__vccOpts"in e}const $t=(e,t)=>Dh(e,t,Wr);function nn(e,t,n){try{Qi(-1);const o=arguments.length;return o===2?qt(t)&&!dt(t)?zr(t)?st(e,null,[t]):st(e,t):st(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&zr(n)&&(n=[n]),st(e,t,n))}finally{Qi(1)}}const X1="3.5.35";/**
* @vue/runtime-dom v3.5.35
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Du;const Wp=typeof window<"u"&&window.trustedTypes;if(Wp)try{Du=Wp.createPolicy("vue",{createHTML:e=>e})}catch{}const Hp=Du?e=>Du.createHTML(e):e=>e,Q1="http://www.w3.org/2000/svg",Z1="http://www.w3.org/1998/Math/MathML",ba=typeof document<"u"?document:null,jp=ba&&ba.createElement("template"),e_={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const a=t==="svg"?ba.createElementNS(Q1,e):t==="mathml"?ba.createElementNS(Z1,e):n?ba.createElement(e,{is:n}):ba.createElement(e);return e==="select"&&o&&o.multiple!=null&&a.setAttribute("multiple",o.multiple),a},createText:e=>ba.createTextNode(e),createComment:e=>ba.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ba.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,a,s){const i=n?n.previousSibling:t.lastChild;if(a&&(a===s||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===s||!(a=a.nextSibling)););else{jp.innerHTML=Hp(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=jp.content;if(o==="svg"||o==="mathml"){const d=l.firstChild;for(;d.firstChild;)l.appendChild(d.firstChild);l.removeChild(d)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},za="transition",Hr="animation",Ws=Symbol("_vtc"),Gp={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},qp=bn({},Qd,Gp),nl=(e=>(e.displayName="Transition",e.props=qp,e))((e,{slots:t})=>nn(Qh,Kp(e),t)),ys=(e,t=[])=>{dt(e)?e.forEach(n=>n(...t)):e&&e(...t)},Yp=e=>e?dt(e)?e.some(t=>t.length>1):e.length>1:!1;function Kp(e){const t={};for(const ue in e)ue in Gp||(t[ue]=e[ue]);if(e.css===!1)return t;const{name:n="v",type:o,duration:a,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:d=s,appearActiveClass:g=i,appearToClass:f=l,leaveFromClass:m=`${n}-leave-from`,leaveActiveClass:w=`${n}-leave-active`,leaveToClass:b=`${n}-leave-to`}=e,T=t_(a),E=T&&T[0],I=T&&T[1],{onBeforeEnter:P,onEnter:N,onEnterCancelled:pe,onLeave:D,onLeaveCancelled:V,onBeforeAppear:fe=P,onAppear:O=N,onAppearCancelled:se=pe}=t,le=(ue,we,ne,J)=>{ue._enterCancelled=J,Va(ue,we?f:l),Va(ue,we?g:i),ne&&ne()},Pe=(ue,we)=>{ue._isLeaving=!1,Va(ue,m),Va(ue,b),Va(ue,w),we&&we()},Ie=ue=>(we,ne)=>{const J=ue?O:N,ie=()=>le(we,ue,ne);ys(J,[we,ie]),Jp(()=>{Va(we,ue?d:s),Ko(we,ue?f:l),Yp(J)||Xp(we,o,E,ie)})};return bn(t,{onBeforeEnter(ue){ys(P,[ue]),Ko(ue,s),Ko(ue,i)},onBeforeAppear(ue){ys(fe,[ue]),Ko(ue,d),Ko(ue,g)},onEnter:Ie(!1),onAppear:Ie(!0),onLeave(ue,we){ue._isLeaving=!0;const ne=()=>Pe(ue,we);Ko(ue,m),ue._enterCancelled?(Ko(ue,w),Ru(ue)):(Ru(ue),Ko(ue,w)),Jp(()=>{ue._isLeaving&&(Va(ue,m),Ko(ue,b),Yp(D)||Xp(ue,o,I,ne))}),ys(D,[ue,ne])},onEnterCancelled(ue){le(ue,!1,void 0,!0),ys(pe,[ue])},onAppearCancelled(ue){le(ue,!0,void 0,!0),ys(se,[ue])},onLeaveCancelled(ue){Pe(ue),ys(V,[ue])}})}function t_(e){if(e==null)return null;if(qt(e))return[Pu(e.enter),Pu(e.leave)];{const t=Pu(e);return[t,t]}}function Pu(e){return eh(e)}function Ko(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ws]||(e[Ws]=new Set)).add(t)}function Va(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Ws];n&&(n.delete(t),n.size||(e[Ws]=void 0))}function Jp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let n_=0;function Xp(e,t,n,o){const a=e._endId=++n_,s=()=>{a===e._endId&&o()};if(n!=null)return setTimeout(s,n);const{type:i,timeout:l,propCount:d}=Qp(e,t);if(!i)return o();const g=i+"end";let f=0;const m=()=>{e.removeEventListener(g,w),s()},w=b=>{b.target===e&&++f>=d&&m()};setTimeout(()=>{f<d&&m()},l+1),e.addEventListener(g,w)}function Qp(e,t){const n=window.getComputedStyle(e),o=T=>(n[T]||"").split(", "),a=o(`${za}Delay`),s=o(`${za}Duration`),i=Zp(a,s),l=o(`${Hr}Delay`),d=o(`${Hr}Duration`),g=Zp(l,d);let f=null,m=0,w=0;t===za?i>0&&(f=za,m=i,w=s.length):t===Hr?g>0&&(f=Hr,m=g,w=d.length):(m=Math.max(i,g),f=m>0?i>g?za:Hr:null,w=f?f===za?s.length:d.length:0);const b=f===za&&/\b(?:transform|all)(?:,|$)/.test(o(`${za}Property`).toString());return{type:f,timeout:m,propCount:w,hasTransform:b}}function Zp(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>ef(n)+ef(e[o])))}function ef(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ru(e){return(e?e.ownerDocument:document).body.offsetHeight}function o_(e,t,n){const o=e[Ws];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ol=Symbol("_vod"),tf=Symbol("_vsh"),Hs={name:"show",beforeMount(e,{value:t},{transition:n}){e[ol]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jr(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),jr(e,!0),o.enter(e)):o.leave(e,()=>{jr(e,!1)}):jr(e,t))},beforeUnmount(e,{value:t}){jr(e,t)}};function jr(e,t){e.style.display=t?e[ol]:"none",e[tf]=!t}const a_=Symbol(""),s_=/(?:^|;)\s*display\s*:/;function r_(e,t,n){const o=e.style,a=cn(n);let s=!1;if(n&&!a){if(t)if(cn(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Gr(o,l,"")}else for(const i in t)n[i]==null&&Gr(o,i,"");for(const i in n){i==="display"&&(s=!0);const l=n[i];l!=null?l_(e,i,!cn(t)&&t?t[i]:void 0,l)||Gr(o,i,l):Gr(o,i,"")}}else if(a){if(t!==n){const i=o[a_];i&&(n+=";"+i),o.cssText=n,s=s_.test(n)}}else t&&e.removeAttribute("style");ol in e&&(e[ol]=s?o.display:"",e[tf]&&(o.display="none"))}const nf=/\s*!important$/;function Gr(e,t,n){if(dt(n))n.forEach(o=>Gr(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=i_(e,t);nf.test(n)?e.setProperty(Pa(o),n.replace(nf,""),"important"):e[o]=n}}const of=["Webkit","Moz","ms"],Nu={};function i_(e,t){const n=Nu[t];if(n)return n;let o=Wn(t);if(o!=="filter"&&o in e)return Nu[t]=o;o=Ai(o);for(let a=0;a<of.length;a++){const s=of[a]+o;if(s in e)return Nu[t]=s}return t}function l_(e,t,n,o){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&cn(o)&&n===o}const af="http://www.w3.org/1999/xlink";function sf(e,t,n,o,a,s=sh(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(af,t.slice(6,t.length)):e.setAttributeNS(af,t,n):n==null||s&&!pd(n)?e.removeAttribute(t):e.setAttribute(t,s?"":po(n)?String(n):n)}function rf(e,t,n,o,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Hp(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,d=n==null?e.type==="checkbox"?"on":"":String(n);(l!==d||!("_value"in e))&&(e.value=d),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=pd(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(a||t)}function wa(e,t,n,o){e.addEventListener(t,n,o)}function u_(e,t,n,o){e.removeEventListener(t,n,o)}const lf=Symbol("_vei");function c_(e,t,n,o,a=null){const s=e[lf]||(e[lf]={}),i=s[t];if(o&&i)i.value=o;else{const[l,d]=d_(t);if(o){const g=s[t]=g_(o,a);wa(e,l,g,d)}else i&&(u_(e,l,i,d),s[t]=void 0)}}const uf=/(?:Once|Passive|Capture)$/;function d_(e){let t;if(uf.test(e)){t={};let o;for(;o=e.match(uf);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Pa(e.slice(2)),t]}let Fu=0;const p_=Promise.resolve(),f_=()=>Fu||(p_.then(()=>Fu=0),Fu=Date.now());function g_(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const a=n.value;if(dt(a)){const s=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{s.call(o),o._stopped=!0};const i=a.slice(),l=[o];for(let d=0;d<i.length&&!o._stopped;d++){const g=i[d];g&&xo(g,t,5,l)}}else xo(a,t,5,[o])};return n.value=e,n.attached=f_(),n}const cf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,m_=(e,t,n,o,a,s)=>{const i=a==="svg";t==="class"?o_(e,o,i):t==="style"?r_(e,n,o):ki(t)?Ci(t)||c_(e,t,n,o,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):v_(e,t,o,i))?(rf(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&sf(e,t,o,i,s,t!=="value")):e._isVueCE&&(h_(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!cn(o)))?rf(e,Wn(t),o,s,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),sf(e,t,o,i))};function v_(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&cf(t)&&_t(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return cf(t)&&cn(n)?!1:t in e}function h_(e,t){const n=e._def.props;if(!n)return!1;const o=Wn(t);return Array.isArray(n)?n.some(a=>Wn(a)===o):Object.keys(n).some(a=>Wn(a)===o)}const df=new WeakMap,pf=new WeakMap,al=Symbol("_moveCb"),ff=Symbol("_enterCb"),__=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:bn({},qp,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ya(),o=Xd();let a,s;return lp(()=>{if(!a.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!x_(a[0].el,n.vnode.el,i)){a=[];return}a.forEach(y_),a.forEach(b_);const l=a.filter(w_);Ru(n.vnode.el),l.forEach(d=>{const g=d.el,f=g.style;Ko(g,i),f.transform=f.webkitTransform=f.transitionDuration="";const m=g[al]=w=>{w&&w.target!==g||(!w||w.propertyName.endsWith("transform"))&&(g.removeEventListener("transitionend",m),g[al]=null,Va(g,i))};g.addEventListener("transitionend",m)}),a=[]}),()=>{const i=Mt(e),l=Kp(i);let d=i.tag||qe;if(a=[],s)for(let g=0;g<s.length;g++){const f=s[g];f.el&&f.el instanceof Element&&(a.push(f),ms(f,Or(f,l,o,n)),df.set(f,gf(f.el)))}s=t.default?wu(t.default()):[];for(let g=0;g<s.length;g++){const f=s[g];f.key!=null&&ms(f,Or(f,l,o,n))}return st(d,null,s)}}});function y_(e){const t=e.el;t[al]&&t[al](),t[ff]&&t[ff]()}function b_(e){pf.set(e,gf(e.el))}function w_(e){const t=df.get(e),n=pf.get(e),o=t.left-n.left,a=t.top-n.top;if(o||a){const s=e.el,i=s.style,l=s.getBoundingClientRect();let d=1,g=1;return s.offsetWidth&&(d=l.width/s.offsetWidth),s.offsetHeight&&(g=l.height/s.offsetHeight),(!Number.isFinite(d)||d===0)&&(d=1),(!Number.isFinite(g)||g===0)&&(g=1),Math.abs(d-1)<.01&&(d=1),Math.abs(g-1)<.01&&(g=1),i.transform=i.webkitTransform=`translate(${o/d}px,${a/g}px)`,i.transitionDuration="0s",e}}function gf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function x_(e,t,n){const o=e.cloneNode(),a=e[Ws];a&&a.forEach(l=>{l.split(/\s+/).forEach(d=>d&&o.classList.remove(d))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const s=t.nodeType===1?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=Qp(o);return s.removeChild(o),i}const Wa=e=>{const t=e.props["onUpdate:modelValue"]||!1;return dt(t)?n=>Li(t,n):t};function S_(e){e.target.composing=!0}function mf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ko=Symbol("_assign");function vf(e,t,n){return t&&(e=e.trim()),n&&(e=Ii(e)),e}const ze={created(e,{modifiers:{lazy:t,trim:n,number:o}},a){e[ko]=Wa(a);const s=o||a.props&&a.props.type==="number";wa(e,t?"change":"input",i=>{i.target.composing||e[ko](vf(e.value,n,s))}),(n||s)&&wa(e,"change",()=>{e.value=vf(e.value,n,s)}),t||(wa(e,"compositionstart",S_),wa(e,"compositionend",mf),wa(e,"change",mf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:a,number:s}},i){if(e[ko]=Wa(i),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?Ii(e.value):e.value,d=t??"";if(l===d)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(o&&t===n||a&&e.value.trim()===d)||(e.value=d)}},on={deep:!0,created(e,t,n){e[ko]=Wa(n),wa(e,"change",()=>{const o=e._modelValue,a=js(e),s=e.checked,i=e[ko];if(dt(o)){const l=tu(o,a),d=l!==-1;if(s&&!d)i(o.concat(a));else if(!s&&d){const g=[...o];g.splice(l,1),i(g)}}else if(Rs(o)){const l=new Set(o);s?l.add(a):l.delete(a),i(l)}else i(yf(e,s))})},mounted:hf,beforeUpdate(e,t,n){e[ko]=Wa(n),hf(e,t,n)}};function hf(e,{value:t,oldValue:n},o){e._modelValue=t;let a;if(dt(t))a=tu(t,o.props.value)>-1;else if(Rs(t))a=t.has(o.props.value);else{if(t===n)return;a=Ra(t,yf(e,!0))}e.checked!==a&&(e.checked=a)}const xa={created(e,{value:t},n){e.checked=Ra(t,n.props.value),e[ko]=Wa(n),wa(e,"change",()=>{e[ko](js(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[ko]=Wa(o),t!==n&&(e.checked=Ra(t,o.props.value))}},an={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const a=Rs(t);wa(e,"change",()=>{const s=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Ii(js(i)):js(i));e[ko](e.multiple?a?new Set(s):s:s[0]),e._assigning=!0,yt(()=>{e._assigning=!1})}),e[ko]=Wa(o)},mounted(e,{value:t}){_f(e,t)},beforeUpdate(e,t,n){e[ko]=Wa(n)},updated(e,{value:t}){e._assigning||_f(e,t)}};function _f(e,t){const n=e.multiple,o=dt(t);if(!(n&&!o&&!Rs(t))){for(let a=0,s=e.options.length;a<s;a++){const i=e.options[a],l=js(i);if(n)if(o){const d=typeof l;d==="string"||d==="number"?i.selected=t.some(g=>String(g)===String(l)):i.selected=tu(t,l)>-1}else i.selected=t.has(l);else if(Ra(js(i),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function js(e){return"_value"in e?e._value:e.value}function yf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const bf={created(e,t,n){sl(e,t,n,null,"created")},mounted(e,t,n){sl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){sl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){sl(e,t,n,o,"updated")}};function T_(e,t){switch(e){case"SELECT":return an;case"TEXTAREA":return ze;default:switch(t){case"checkbox":return on;case"radio":return xa;default:return ze}}}function sl(e,t,n,o,a){const i=T_(e.tagName,n.props&&n.props.type)[a];i&&i(e,t,n,o)}const k_=["ctrl","shift","alt","meta"],C_={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>k_.some(n=>e[`${n}Key`]&&!t.includes(n))},vt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=((a,...s)=>{for(let i=0;i<t.length;i++){const l=C_[t[i]];if(l&&l(a,t))return}return e(a,...s)}))},E_={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=(a=>{if(!("key"in a))return;const s=Pa(a.key);if(t.some(i=>i===s||E_[i]===s))return e(a)}))},$_=bn({patchProp:m_},e_);let wf;function xf(){return wf||(wf=M1($_))}const Sf=((...e)=>{xf().render(...e)}),A_=((...e)=>{const t=xf().createApp(...e),{mount:n}=t;return t.mount=o=>{const a=I_(o);if(!a)return;const s=t._component;!_t(s)&&!s.render&&!s.template&&(s.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const i=n(a,!1,L_(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),i},t});function L_(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function I_(e){return cn(e)?document.querySelector(e):e}/*!
* shared v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function M_(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const rl=typeof window<"u",Ha=(e,t=!1)=>t?Symbol.for(e):Symbol(e),O_=(e,t,n)=>D_({l:e,k:t,s:n}),D_=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),wn=e=>typeof e=="number"&&isFinite(e),P_=e=>Bu(e)==="[object Date]",Gs=e=>Bu(e)==="[object RegExp]",il=e=>It(e)&&Object.keys(e).length===0,En=Object.assign,R_=Object.create,en=(e=null)=>R_(e);let Tf;const bs=()=>Tf||(Tf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:en());function kf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function Cf(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function N_(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(o,a,s)=>`${a}="${Cf(s)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(o,a,s)=>`${a}='${Cf(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(o=>{e=e.replace(o,"$1javascript&#58;")}),e}const F_=Object.prototype.hasOwnProperty;function Io(e,t){return F_.call(e,t)}const _n=Array.isArray,dn=e=>typeof e=="function",Ze=e=>typeof e=="string",zt=e=>typeof e=="boolean",Ht=e=>e!==null&&typeof e=="object",B_=e=>Ht(e)&&dn(e.then)&&dn(e.catch),Ef=Object.prototype.toString,Bu=e=>Ef.call(e),It=e=>Bu(e)==="[object Object]",U_=e=>e==null?"":_n(e)||It(e)&&e.toString===Ef?JSON.stringify(e,null,2):String(e);function Uu(e,t=""){return e.reduce((n,o,a)=>a===0?n+o:n+t+o,"")}const ll=e=>!Ht(e)||_n(e);function ul(e,t){if(ll(e)||ll(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:o,des:a}=n.pop();Object.keys(o).forEach(s=>{s!=="__proto__"&&(Ht(o[s])&&!Ht(a[s])&&(a[s]=Array.isArray(o[s])?[]:en()),ll(a[s])||ll(o[s])?a[s]=o[s]:n.push({src:o[s],des:a[s]}))})}}/*!
* message-compiler v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function z_(e,t,n){return{line:e,column:t,offset:n}}function zu(e,t,n){return{start:e,end:t}}const Yt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},V_=17;function cl(e,t,n={}){const{domain:o,messages:a,args:s}=n,i=e,l=new SyntaxError(String(i));return l.code=e,t&&(l.location=t),l.domain=o,l}function W_(e){throw e}const Jo=" ",H_="\r",Fn=`
`,j_="\u2028",G_="\u2029";function q_(e){const t=e;let n=0,o=1,a=1,s=0;const i=O=>t[O]===H_&&t[O+1]===Fn,l=O=>t[O]===Fn,d=O=>t[O]===G_,g=O=>t[O]===j_,f=O=>i(O)||l(O)||d(O)||g(O),m=()=>n,w=()=>o,b=()=>a,T=()=>s,E=O=>i(O)||d(O)||g(O)?Fn:t[O],I=()=>E(n),P=()=>E(n+s);function N(){return s=0,f(n)&&(o++,a=0),i(n)&&n++,n++,a++,t[n]}function pe(){return i(n+s)&&s++,s++,t[n+s]}function D(){n=0,o=1,a=1,s=0}function V(O=0){s=O}function fe(){const O=n+s;for(;O!==n;)N();s=0}return{index:m,line:w,column:b,peekOffset:T,charAt:E,currentChar:I,currentPeek:P,next:N,peek:pe,reset:D,resetPeek:V,skipToPeek:fe}}const Sa=void 0,Y_=".",$f="'",K_="tokenizer";function J_(e,t={}){const n=t.location!==!1,o=q_(e),a=()=>o.index(),s=()=>z_(o.line(),o.column(),o.index()),i=s(),l=a(),d={currentType:13,offset:l,startLoc:i,endLoc:i,lastType:13,lastOffset:l,lastStartLoc:i,lastEndLoc:i,braceNest:0,inLinked:!1,text:""},g=()=>d,{onError:f}=t;function m(z,k,H,...Q){const Ne=g();if(k.column+=H,k.offset+=H,f){const De=n?zu(Ne.startLoc,k):null,ge=cl(z,De,{domain:K_,args:Q});f(ge)}}function w(z,k,H){z.endLoc=s(),z.currentType=k;const Q={type:k};return n&&(Q.loc=zu(z.startLoc,z.endLoc)),H!=null&&(Q.value=H),Q}const b=z=>w(z,13);function T(z,k){return z.currentChar()===k?(z.next(),k):(m(Yt.EXPECTED_TOKEN,s(),0,k),"")}function E(z){let k="";for(;z.currentPeek()===Jo||z.currentPeek()===Fn;)k+=z.currentPeek(),z.peek();return k}function I(z){const k=E(z);return z.skipToPeek(),k}function P(z){if(z===Sa)return!1;const k=z.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function N(z){if(z===Sa)return!1;const k=z.charCodeAt(0);return k>=48&&k<=57}function pe(z,k){const{currentType:H}=k;if(H!==2)return!1;E(z);const Q=P(z.currentPeek());return z.resetPeek(),Q}function D(z,k){const{currentType:H}=k;if(H!==2)return!1;E(z);const Q=z.currentPeek()==="-"?z.peek():z.currentPeek(),Ne=N(Q);return z.resetPeek(),Ne}function V(z,k){const{currentType:H}=k;if(H!==2)return!1;E(z);const Q=z.currentPeek()===$f;return z.resetPeek(),Q}function fe(z,k){const{currentType:H}=k;if(H!==7)return!1;E(z);const Q=z.currentPeek()===".";return z.resetPeek(),Q}function O(z,k){const{currentType:H}=k;if(H!==8)return!1;E(z);const Q=P(z.currentPeek());return z.resetPeek(),Q}function se(z,k){const{currentType:H}=k;if(!(H===7||H===11))return!1;E(z);const Q=z.currentPeek()===":";return z.resetPeek(),Q}function le(z,k){const{currentType:H}=k;if(H!==9)return!1;const Q=()=>{const De=z.currentPeek();return De==="{"?P(z.peek()):De==="@"||De==="|"||De===":"||De==="."||De===Jo||!De?!1:De===Fn?(z.peek(),Q()):Ie(z,!1)},Ne=Q();return z.resetPeek(),Ne}function Pe(z){E(z);const k=z.currentPeek()==="|";return z.resetPeek(),k}function Ie(z,k=!0){const H=(Ne=!1,De="")=>{const ge=z.currentPeek();return ge==="{"||ge==="@"||!ge?Ne:ge==="|"?!(De===Jo||De===Fn):ge===Jo?(z.peek(),H(!0,Jo)):ge===Fn?(z.peek(),H(!0,Fn)):!0},Q=H();return k&&z.resetPeek(),Q}function ue(z,k){const H=z.currentChar();return H===Sa?Sa:k(H)?(z.next(),H):null}function we(z){const k=z.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function ne(z){return ue(z,we)}function J(z){const k=z.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function ie(z){return ue(z,J)}function X(z){const k=z.charCodeAt(0);return k>=48&&k<=57}function ee(z){return ue(z,X)}function $e(z){const k=z.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function ve(z){return ue(z,$e)}function Z(z){let k="",H="";for(;k=ee(z);)H+=k;return H}function te(z){let k="";for(;;){const H=z.currentChar();if(H==="{"||H==="}"||H==="@"||H==="|"||!H)break;if(H===Jo||H===Fn)if(Ie(z))k+=H,z.next();else{if(Pe(z))break;k+=H,z.next()}else k+=H,z.next()}return k}function be(z){I(z);let k="",H="";for(;k=ie(z);)H+=k;const Q=z.currentChar();if(Q&&Q!=="}"&&Q!==Sa&&Q!==Jo&&Q!==Fn&&Q!==" "){const Ne=q(z);return m(Yt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,H+Ne),H+Ne}return z.currentChar()===Sa&&m(Yt.UNTERMINATED_CLOSING_BRACE,s(),0),H}function Te(z){I(z);let k="";return z.currentChar()==="-"?(z.next(),k+=`-${Z(z)}`):k+=Z(z),z.currentChar()===Sa&&m(Yt.UNTERMINATED_CLOSING_BRACE,s(),0),k}function he(z){return z!==$f&&z!==Fn}function re(z){I(z),T(z,"'");let k="",H="";for(;k=ue(z,he);)k==="\\"?H+=j(z):H+=k;const Q=z.currentChar();return Q===Fn||Q===Sa?(m(Yt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),Q===Fn&&(z.next(),T(z,"'")),H):(T(z,"'"),H)}function j(z){const k=z.currentChar();switch(k){case"\\":case"'":return z.next(),`\\${k}`;case"u":return oe(z,k,4);case"U":return oe(z,k,6);default:return m(Yt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function oe(z,k,H){T(z,k);let Q="";for(let Ne=0;Ne<H;Ne++){const De=ve(z);if(!De){m(Yt.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${Q}${z.currentChar()}`);break}Q+=De}return`\\${k}${Q}`}function B(z){return z!=="{"&&z!=="}"&&z!==Jo&&z!==Fn}function q(z){I(z);let k="",H="";for(;k=ue(z,B);)H+=k;return H}function Y(z){let k="",H="";for(;k=ne(z);)H+=k;return H}function $(z){const k=H=>{const Q=z.currentChar();return Q==="{"||Q==="@"||Q==="|"||Q==="("||Q===")"||!Q||Q===Jo?H:(H+=Q,z.next(),k(H))};return k("")}function A(z){I(z);const k=T(z,"|");return I(z),k}function W(z,k){let H=null;switch(z.currentChar()){case"{":return k.braceNest>=1&&m(Yt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),z.next(),H=w(k,2,"{"),I(z),k.braceNest++,H;case"}":return k.braceNest>0&&k.currentType===2&&m(Yt.EMPTY_PLACEHOLDER,s(),0),z.next(),H=w(k,3,"}"),k.braceNest--,k.braceNest>0&&I(z),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),H;case"@":return k.braceNest>0&&m(Yt.UNTERMINATED_CLOSING_BRACE,s(),0),H=ce(z,k)||b(k),k.braceNest=0,H;default:{let Ne=!0,De=!0,ge=!0;if(Pe(z))return k.braceNest>0&&m(Yt.UNTERMINATED_CLOSING_BRACE,s(),0),H=w(k,1,A(z)),k.braceNest=0,k.inLinked=!1,H;if(k.braceNest>0&&(k.currentType===4||k.currentType===5||k.currentType===6))return m(Yt.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,Ce(z,k);if(Ne=pe(z,k))return H=w(k,4,be(z)),I(z),H;if(De=D(z,k))return H=w(k,5,Te(z)),I(z),H;if(ge=V(z,k))return H=w(k,6,re(z)),I(z),H;if(!Ne&&!De&&!ge)return H=w(k,12,q(z)),m(Yt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,H.value),I(z),H;break}}return H}function ce(z,k){const{currentType:H}=k;let Q=null;const Ne=z.currentChar();switch((H===7||H===8||H===11||H===9)&&(Ne===Fn||Ne===Jo)&&m(Yt.INVALID_LINKED_FORMAT,s(),0),Ne){case"@":return z.next(),Q=w(k,7,"@"),k.inLinked=!0,Q;case".":return I(z),z.next(),w(k,8,".");case":":return I(z),z.next(),w(k,9,":");default:return Pe(z)?(Q=w(k,1,A(z)),k.braceNest=0,k.inLinked=!1,Q):fe(z,k)||se(z,k)?(I(z),ce(z,k)):O(z,k)?(I(z),w(k,11,Y(z))):le(z,k)?(I(z),Ne==="{"?W(z,k)||Q:w(k,10,$(z))):(H===7&&m(Yt.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,Ce(z,k))}}function Ce(z,k){let H={type:13};if(k.braceNest>0)return W(z,k)||b(k);if(k.inLinked)return ce(z,k)||b(k);switch(z.currentChar()){case"{":return W(z,k)||b(k);case"}":return m(Yt.UNBALANCED_CLOSING_BRACE,s(),0),z.next(),w(k,3,"}");case"@":return ce(z,k)||b(k);default:{if(Pe(z))return H=w(k,1,A(z)),k.braceNest=0,k.inLinked=!1,H;if(Ie(z))return w(k,0,te(z));break}}return H}function Le(){const{currentType:z,offset:k,startLoc:H,endLoc:Q}=d;return d.lastType=z,d.lastOffset=k,d.lastStartLoc=H,d.lastEndLoc=Q,d.offset=a(),d.startLoc=s(),o.currentChar()===Sa?w(d,13):Ce(o,d)}return{nextToken:Le,currentOffset:a,currentPosition:s,context:g}}const X_="parser",Q_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function Z_(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const o=parseInt(t||n,16);return o<=55295||o>=57344?String.fromCodePoint(o):"�"}}}function e0(e={}){const t=e.location!==!1,{onError:n}=e;function o(P,N,pe,D,...V){const fe=P.currentPosition();if(fe.offset+=D,fe.column+=D,n){const O=t?zu(pe,fe):null,se=cl(N,O,{domain:X_,args:V});n(se)}}function a(P,N,pe){const D={type:P};return t&&(D.start=N,D.end=N,D.loc={start:pe,end:pe}),D}function s(P,N,pe,D){t&&(P.end=N,P.loc&&(P.loc.end=pe))}function i(P,N){const pe=P.context(),D=a(3,pe.offset,pe.startLoc);return D.value=N,s(D,P.currentOffset(),P.currentPosition()),D}function l(P,N){const pe=P.context(),{lastOffset:D,lastStartLoc:V}=pe,fe=a(5,D,V);return fe.index=parseInt(N,10),P.nextToken(),s(fe,P.currentOffset(),P.currentPosition()),fe}function d(P,N){const pe=P.context(),{lastOffset:D,lastStartLoc:V}=pe,fe=a(4,D,V);return fe.key=N,P.nextToken(),s(fe,P.currentOffset(),P.currentPosition()),fe}function g(P,N){const pe=P.context(),{lastOffset:D,lastStartLoc:V}=pe,fe=a(9,D,V);return fe.value=N.replace(Q_,Z_),P.nextToken(),s(fe,P.currentOffset(),P.currentPosition()),fe}function f(P){const N=P.nextToken(),pe=P.context(),{lastOffset:D,lastStartLoc:V}=pe,fe=a(8,D,V);return N.type!==11?(o(P,Yt.UNEXPECTED_EMPTY_LINKED_MODIFIER,pe.lastStartLoc,0),fe.value="",s(fe,D,V),{nextConsumeToken:N,node:fe}):(N.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,pe.lastStartLoc,0,Xo(N)),fe.value=N.value||"",s(fe,P.currentOffset(),P.currentPosition()),{node:fe})}function m(P,N){const pe=P.context(),D=a(7,pe.offset,pe.startLoc);return D.value=N,s(D,P.currentOffset(),P.currentPosition()),D}function w(P){const N=P.context(),pe=a(6,N.offset,N.startLoc);let D=P.nextToken();if(D.type===8){const V=f(P);pe.modifier=V.node,D=V.nextConsumeToken||P.nextToken()}switch(D.type!==9&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(D)),D=P.nextToken(),D.type===2&&(D=P.nextToken()),D.type){case 10:D.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(D)),pe.key=m(P,D.value||"");break;case 4:D.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(D)),pe.key=d(P,D.value||"");break;case 5:D.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(D)),pe.key=l(P,D.value||"");break;case 6:D.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(D)),pe.key=g(P,D.value||"");break;default:{o(P,Yt.UNEXPECTED_EMPTY_LINKED_KEY,N.lastStartLoc,0);const V=P.context(),fe=a(7,V.offset,V.startLoc);return fe.value="",s(fe,V.offset,V.startLoc),pe.key=fe,s(pe,V.offset,V.startLoc),{nextConsumeToken:D,node:pe}}}return s(pe,P.currentOffset(),P.currentPosition()),{node:pe}}function b(P){const N=P.context(),pe=N.currentType===1?P.currentOffset():N.offset,D=N.currentType===1?N.endLoc:N.startLoc,V=a(2,pe,D);V.items=[];let fe=null;do{const le=fe||P.nextToken();switch(fe=null,le.type){case 0:le.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(le)),V.items.push(i(P,le.value||""));break;case 5:le.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(le)),V.items.push(l(P,le.value||""));break;case 4:le.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(le)),V.items.push(d(P,le.value||""));break;case 6:le.value==null&&o(P,Yt.UNEXPECTED_LEXICAL_ANALYSIS,N.lastStartLoc,0,Xo(le)),V.items.push(g(P,le.value||""));break;case 7:{const Pe=w(P);V.items.push(Pe.node),fe=Pe.nextConsumeToken||null;break}}}while(N.currentType!==13&&N.currentType!==1);const O=N.currentType===1?N.lastOffset:P.currentOffset(),se=N.currentType===1?N.lastEndLoc:P.currentPosition();return s(V,O,se),V}function T(P,N,pe,D){const V=P.context();let fe=D.items.length===0;const O=a(1,N,pe);O.cases=[],O.cases.push(D);do{const se=b(P);fe||(fe=se.items.length===0),O.cases.push(se)}while(V.currentType!==13);return fe&&o(P,Yt.MUST_HAVE_MESSAGES_IN_PLURAL,pe,0),s(O,P.currentOffset(),P.currentPosition()),O}function E(P){const N=P.context(),{offset:pe,startLoc:D}=N,V=b(P);return N.currentType===13?V:T(P,pe,D,V)}function I(P){const N=J_(P,En({},e)),pe=N.context(),D=a(0,pe.offset,pe.startLoc);return t&&D.loc&&(D.loc.source=P),D.body=E(N),e.onCacheKey&&(D.cacheKey=e.onCacheKey(P)),pe.currentType!==13&&o(N,Yt.UNEXPECTED_LEXICAL_ANALYSIS,pe.lastStartLoc,0,P[pe.offset]||""),s(D,N.currentOffset(),N.currentPosition()),D}return{parse:I}}function Xo(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function t0(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function Af(e,t){for(let n=0;n<e.length;n++)Vu(e[n],t)}function Vu(e,t){switch(e.type){case 1:Af(e.cases,t),t.helper("plural");break;case 2:Af(e.items,t);break;case 6:{Vu(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function n0(e,t={}){const n=t0(e);n.helper("normalize"),e.body&&Vu(e.body,n);const o=n.context();e.helpers=Array.from(o.helpers)}function o0(e){const t=e.body;return t.type===2?Lf(t):t.cases.forEach(n=>Lf(n)),e}function Lf(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const o=e.items[n];if(!(o.type===3||o.type===9)||o.value==null)break;t.push(o.value)}if(t.length===e.items.length){e.static=Uu(t);for(let n=0;n<e.items.length;n++){const o=e.items[n];(o.type===3||o.type===9)&&delete o.value}}}}function qs(e){switch(e.t=e.type,e.type){case 0:{const t=e;qs(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let o=0;o<n.length;o++)qs(n[o]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let o=0;o<n.length;o++)qs(n[o]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;qs(t.key),t.k=t.key,delete t.key,t.modifier&&(qs(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function a0(e,t){const{filename:n,breakLineCode:o,needIndent:a}=t,s=t.location!==!1,i={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};s&&e.loc&&(i.source=e.loc.source);const l=()=>i;function d(E,I){i.code+=E}function g(E,I=!0){const P=I?o:"";d(a?P+" ".repeat(E):P)}function f(E=!0){const I=++i.indentLevel;E&&g(I)}function m(E=!0){const I=--i.indentLevel;E&&g(I)}function w(){g(i.indentLevel)}return{context:l,push:d,indent:f,deindent:m,newline:w,helper:E=>`_${E}`,needIndent:()=>i.needIndent}}function s0(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),Ys(e,t.key),t.modifier?(e.push(", "),Ys(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function r0(e,t){const{helper:n,needIndent:o}=e;e.push(`${n("normalize")}([`),e.indent(o());const a=t.items.length;for(let s=0;s<a&&(Ys(e,t.items[s]),s!==a-1);s++)e.push(", ");e.deindent(o()),e.push("])")}function i0(e,t){const{helper:n,needIndent:o}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(o());const a=t.cases.length;for(let s=0;s<a&&(Ys(e,t.cases[s]),s!==a-1);s++)e.push(", ");e.deindent(o()),e.push("])")}}function l0(e,t){t.body?Ys(e,t.body):e.push("null")}function Ys(e,t){const{helper:n}=e;switch(t.type){case 0:l0(e,t);break;case 1:i0(e,t);break;case 2:r0(e,t);break;case 6:s0(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const u0=(e,t={})=>{const n=Ze(t.mode)?t.mode:"normal",o=Ze(t.filename)?t.filename:"message.intl";t.sourceMap;const a=t.breakLineCode!=null?t.breakLineCode:n==="arrow"?";":`
`,s=t.needIndent?t.needIndent:n!=="arrow",i=e.helpers||[],l=a0(e,{filename:o,breakLineCode:a,needIndent:s});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),i.length>0&&(l.push(`const { ${Uu(i.map(f=>`${f}: _${f}`),", ")} } = ctx`),l.newline()),l.push("return "),Ys(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:d,map:g}=l.context();return{ast:e,code:d,map:g?g.toJSON():void 0}};function c0(e,t={}){const n=En({},t),o=!!n.jit,a=!!n.minify,s=n.optimize==null?!0:n.optimize,l=e0(n).parse(e);return o?(s&&o0(l),a&&qs(l),{ast:l,code:""}):(n0(l,n),u0(l,n))}/*!
* core-base v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function d0(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(bs().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(bs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Qo(e){return Ht(e)&&Wu(e)===0&&(Io(e,"b")||Io(e,"body"))}const If=["b","body"];function p0(e){return ja(e,If)}const Mf=["c","cases"];function f0(e){return ja(e,Mf,[])}const Of=["s","static"];function g0(e){return ja(e,Of)}const Df=["i","items"];function m0(e){return ja(e,Df,[])}const Pf=["t","type"];function Wu(e){return ja(e,Pf)}const Rf=["v","value"];function dl(e,t){const n=ja(e,Rf);if(n!=null)return n;throw qr(t)}const Nf=["m","modifier"];function v0(e){return ja(e,Nf)}const Ff=["k","key"];function h0(e){const t=ja(e,Ff);if(t)return t;throw qr(6)}function ja(e,t,n){for(let o=0;o<t.length;o++){const a=t[o];if(Io(e,a)&&e[a]!=null)return e[a]}return n}const Bf=[...If,...Mf,...Of,...Df,...Ff,...Nf,...Rf,...Pf];function qr(e){return new Error(`unhandled node type: ${e}`)}function Hu(e){return n=>_0(n,e)}function _0(e,t){const n=p0(t);if(n==null)throw qr(0);if(Wu(n)===1){const s=f0(n);return e.plural(s.reduce((i,l)=>[...i,Uf(e,l)],[]))}else return Uf(e,n)}function Uf(e,t){const n=g0(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=m0(t).reduce((a,s)=>[...a,ju(e,s)],[]);return e.normalize(o)}}function ju(e,t){const n=Wu(t);switch(n){case 3:return dl(t,n);case 9:return dl(t,n);case 4:{const o=t;if(Io(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Io(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw qr(n)}case 5:{const o=t;if(Io(o,"i")&&wn(o.i))return e.interpolate(e.list(o.i));if(Io(o,"index")&&wn(o.index))return e.interpolate(e.list(o.index));throw qr(n)}case 6:{const o=t,a=v0(o),s=h0(o);return e.linked(ju(e,s),a?ju(e,a):void 0,e.type)}case 7:return dl(t,n);case 8:return dl(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const y0=e=>e;let pl=en();function b0(e,t={}){let n=!1;const o=t.onError||W_;return t.onError=a=>{n=!0,o(a)},{...c0(e,t),detectError:n}}function w0(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ze(e)){zt(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||y0)(e),a=pl[o];if(a)return a;const{ast:s,detectError:i}=b0(e,{...t,location:!1,jit:!0}),l=Hu(s);return i?l:pl[o]=l}else{const n=e.cacheKey;if(n){const o=pl[n];return o||(pl[n]=Hu(e))}else return Hu(e)}}let Yr=null;function x0(e){Yr=e}function S0(e,t,n){Yr&&Yr.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const T0=k0("function:translate");function k0(e){return t=>Yr&&Yr.emit(e,t)}const Ta={INVALID_ARGUMENT:V_,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},C0=24;function ka(e){return cl(e,null,void 0)}function Gu(e,t){return t.locale!=null?zf(t.locale):zf(e.locale)}let qu;function zf(e){if(Ze(e))return e;if(dn(e)){if(e.resolvedOnce&&qu!=null)return qu;if(e.constructor.name==="Function"){const t=e();if(B_(t))throw ka(Ta.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return qu=t}else throw ka(Ta.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ka(Ta.NOT_SUPPORT_LOCALE_TYPE)}function E0(e,t,n){return[...new Set([n,..._n(t)?t:Ht(t)?Object.keys(t):Ze(t)?[t]:[n]])]}function Vf(e,t,n){const o=Ze(n)?n:Kr,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let s=a.__localeChainCache.get(o);if(!s){s=[];let i=[n];for(;_n(i);)i=Wf(s,i,t);const l=_n(t)||!It(t)?t:t.default?t.default:null;i=Ze(l)?[l]:l,_n(i)&&Wf(s,i,!1),a.__localeChainCache.set(o,s)}return s}function Wf(e,t,n){let o=!0;for(let a=0;a<t.length&&zt(o);a++){const s=t[a];Ze(s)&&(o=$0(e,t[a],n))}return o}function $0(e,t,n){let o;const a=t.split("-");do{const s=a.join("-");o=A0(e,s,n),a.splice(-1,1)}while(a.length&&o===!0);return o}function A0(e,t,n){let o=!1;if(!e.includes(t)&&(o=!0,t)){o=t[t.length-1]!=="!";const a=t.replace(/!/g,"");e.push(a),(_n(n)||It(n))&&n[a]&&(o=n[a])}return o}const Ga=[];Ga[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ga[1]={w:[1],".":[2],"[":[4],o:[7]},Ga[2]={w:[2],i:[3,0],0:[3,0]},Ga[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ga[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ga[5]={"'":[4,0],o:8,l:[5,0]},Ga[6]={'"':[4,0],o:8,l:[6,0]};const L0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function I0(e){return L0.test(e)}function M0(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function O0(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function D0(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:I0(t)?M0(t):"*"+t}function P0(e){const t=[];let n=-1,o=0,a=0,s,i,l,d,g,f,m;const w=[];w[0]=()=>{i===void 0?i=l:i+=l},w[1]=()=>{i!==void 0&&(t.push(i),i=void 0)},w[2]=()=>{w[0](),a++},w[3]=()=>{if(a>0)a--,o=4,w[0]();else{if(a=0,i===void 0||(i=D0(i),i===!1))return!1;w[1]()}};function b(){const T=e[n+1];if(o===5&&T==="'"||o===6&&T==='"')return n++,l="\\"+T,w[0](),!0}for(;o!==null;)if(n++,s=e[n],!(s==="\\"&&b())){if(d=O0(s),m=Ga[o],g=m[d]||m.l||8,g===8||(o=g[0],g[1]!==void 0&&(f=w[g[1]],f&&(l=s,f()===!1))))return;if(o===7)return t}}const Hf=new Map;function R0(e,t){return Ht(e)?e[t]:null}function N0(e,t){if(!Ht(e))return null;let n=Hf.get(t);if(n||(n=P0(t),n&&Hf.set(t,n)),!n)return null;const o=n.length;let a=e,s=0;for(;s<o;){const i=n[s];if(Bf.includes(i)&&Qo(a))return null;const l=a[i];if(l===void 0||dn(a))return null;a=l,s++}return a}const F0="11.1.12",fl=-1,Kr="en-US",jf="",Gf=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function B0(){return{upper:(e,t)=>t==="text"&&Ze(e)?e.toUpperCase():t==="vnode"&&Ht(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Ze(e)?e.toLowerCase():t==="vnode"&&Ht(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Ze(e)?Gf(e):t==="vnode"&&Ht(e)&&"__v_isVNode"in e?Gf(e.children):e}}let qf;function U0(e){qf=e}let Yf;function z0(e){Yf=e}let Kf;function V0(e){Kf=e}let Jf=null;const W0=e=>{Jf=e},H0=()=>Jf;let Xf=null;const Qf=e=>{Xf=e},j0=()=>Xf;let Zf=0;function G0(e={}){const t=dn(e.onWarn)?e.onWarn:M_,n=Ze(e.version)?e.version:F0,o=Ze(e.locale)||dn(e.locale)?e.locale:Kr,a=dn(o)?Kr:o,s=_n(e.fallbackLocale)||It(e.fallbackLocale)||Ze(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,i=It(e.messages)?e.messages:Yu(a),l=It(e.datetimeFormats)?e.datetimeFormats:Yu(a),d=It(e.numberFormats)?e.numberFormats:Yu(a),g=En(en(),e.modifiers,B0()),f=e.pluralRules||en(),m=dn(e.missing)?e.missing:null,w=zt(e.missingWarn)||Gs(e.missingWarn)?e.missingWarn:!0,b=zt(e.fallbackWarn)||Gs(e.fallbackWarn)?e.fallbackWarn:!0,T=!!e.fallbackFormat,E=!!e.unresolving,I=dn(e.postTranslation)?e.postTranslation:null,P=It(e.processor)?e.processor:null,N=zt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,pe=!!e.escapeParameter,D=dn(e.messageCompiler)?e.messageCompiler:qf,V=dn(e.messageResolver)?e.messageResolver:Yf||R0,fe=dn(e.localeFallbacker)?e.localeFallbacker:Kf||E0,O=Ht(e.fallbackContext)?e.fallbackContext:void 0,se=e,le=Ht(se.__datetimeFormatters)?se.__datetimeFormatters:new Map,Pe=Ht(se.__numberFormatters)?se.__numberFormatters:new Map,Ie=Ht(se.__meta)?se.__meta:{};Zf++;const ue={version:n,cid:Zf,locale:o,fallbackLocale:s,messages:i,modifiers:g,pluralRules:f,missing:m,missingWarn:w,fallbackWarn:b,fallbackFormat:T,unresolving:E,postTranslation:I,processor:P,warnHtmlMessage:N,escapeParameter:pe,messageCompiler:D,messageResolver:V,localeFallbacker:fe,fallbackContext:O,onWarn:t,__meta:Ie};return ue.datetimeFormats=l,ue.numberFormats=d,ue.__datetimeFormatters=le,ue.__numberFormatters=Pe,__INTLIFY_PROD_DEVTOOLS__&&S0(ue,n,Ie),ue}const Yu=e=>({[e]:en()});function Ku(e,t,n,o,a){const{missing:s,onWarn:i}=e;if(s!==null){const l=s(e,n,t,a);return Ze(l)?l:t}else return t}function Jr(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function q0(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Y0(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o<t.length;o++)if(q0(e,t[o]))return!0;return!1}function eg(e,...t){const{datetimeFormats:n,unresolving:o,fallbackLocale:a,onWarn:s,localeFallbacker:i}=e,{__datetimeFormatters:l}=e,[d,g,f,m]=Ju(...t),w=zt(f.missingWarn)?f.missingWarn:e.missingWarn;zt(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const b=!!f.part,T=Gu(e,f),E=i(e,a,T);if(!Ze(d)||d==="")return new Intl.DateTimeFormat(T,m).format(g);let I={},P,N=null;const pe="datetime format";for(let fe=0;fe<E.length&&(P=E[fe],I=n[P]||{},N=I[d],!It(N));fe++)Ku(e,d,P,w,pe);if(!It(N)||!Ze(P))return o?fl:d;let D=`${P}__${d}`;il(m)||(D=`${D}__${JSON.stringify(m)}`);let V=l.get(D);return V||(V=new Intl.DateTimeFormat(P,En({},N,m)),l.set(D,V)),b?V.formatToParts(g):V.format(g)}const tg=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Ju(...e){const[t,n,o,a]=e,s=en();let i=en(),l;if(Ze(t)){const d=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!d)throw ka(Ta.INVALID_ISO_DATE_ARGUMENT);const g=d[3]?d[3].trim().startsWith("T")?`${d[1].trim()}${d[3].trim()}`:`${d[1].trim()}T${d[3].trim()}`:d[1].trim();l=new Date(g);try{l.toISOString()}catch{throw ka(Ta.INVALID_ISO_DATE_ARGUMENT)}}else if(P_(t)){if(isNaN(t.getTime()))throw ka(Ta.INVALID_DATE_ARGUMENT);l=t}else if(wn(t))l=t;else throw ka(Ta.INVALID_ARGUMENT);return Ze(n)?s.key=n:It(n)&&Object.keys(n).forEach(d=>{tg.includes(d)?i[d]=n[d]:s[d]=n[d]}),Ze(o)?s.locale=o:It(o)&&(i=o),It(a)&&(i=a),[s.key||"",l,s,i]}function ng(e,t,n){const o=e;for(const a in n){const s=`${t}__${a}`;o.__datetimeFormatters.has(s)&&o.__datetimeFormatters.delete(s)}}function og(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:a,onWarn:s,localeFallbacker:i}=e,{__numberFormatters:l}=e,[d,g,f,m]=Xu(...t),w=zt(f.missingWarn)?f.missingWarn:e.missingWarn;zt(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const b=!!f.part,T=Gu(e,f),E=i(e,a,T);if(!Ze(d)||d==="")return new Intl.NumberFormat(T,m).format(g);let I={},P,N=null;const pe="number format";for(let fe=0;fe<E.length&&(P=E[fe],I=n[P]||{},N=I[d],!It(N));fe++)Ku(e,d,P,w,pe);if(!It(N)||!Ze(P))return o?fl:d;let D=`${P}__${d}`;il(m)||(D=`${D}__${JSON.stringify(m)}`);let V=l.get(D);return V||(V=new Intl.NumberFormat(P,En({},N,m)),l.set(D,V)),b?V.formatToParts(g):V.format(g)}const ag=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Xu(...e){const[t,n,o,a]=e,s=en();let i=en();if(!wn(t))throw ka(Ta.INVALID_ARGUMENT);const l=t;return Ze(n)?s.key=n:It(n)&&Object.keys(n).forEach(d=>{ag.includes(d)?i[d]=n[d]:s[d]=n[d]}),Ze(o)?s.locale=o:It(o)&&(i=o),It(a)&&(i=a),[s.key||"",l,s,i]}function sg(e,t,n){const o=e;for(const a in n){const s=`${t}__${a}`;o.__numberFormatters.has(s)&&o.__numberFormatters.delete(s)}}const K0=e=>e,J0=e=>"",X0="text",Q0=e=>e.length===0?"":Uu(e),Z0=U_;function rg(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function e2(e){const t=wn(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(wn(e.named.count)||wn(e.named.n))?wn(e.named.count)?e.named.count:wn(e.named.n)?e.named.n:t:t}function t2(e,t){t.count||(t.count=e),t.n||(t.n=e)}function n2(e={}){const t=e.locale,n=e2(e),o=Ht(e.pluralRules)&&Ze(t)&&dn(e.pluralRules[t])?e.pluralRules[t]:rg,a=Ht(e.pluralRules)&&Ze(t)&&dn(e.pluralRules[t])?rg:void 0,s=P=>P[o(n,P.length,a)],i=e.list||[],l=P=>i[P],d=e.named||en();wn(e.pluralIndex)&&t2(n,d);const g=P=>d[P];function f(P,N){const pe=dn(e.messages)?e.messages(P,!!N):Ht(e.messages)?e.messages[P]:!1;return pe||(e.parent?e.parent.message(P):J0)}const m=P=>e.modifiers?e.modifiers[P]:K0,w=It(e.processor)&&dn(e.processor.normalize)?e.processor.normalize:Q0,b=It(e.processor)&&dn(e.processor.interpolate)?e.processor.interpolate:Z0,T=It(e.processor)&&Ze(e.processor.type)?e.processor.type:X0,I={list:l,named:g,plural:s,linked:(P,...N)=>{const[pe,D]=N;let V="text",fe="";N.length===1?Ht(pe)?(fe=pe.modifier||fe,V=pe.type||V):Ze(pe)&&(fe=pe||fe):N.length===2&&(Ze(pe)&&(fe=pe||fe),Ze(D)&&(V=D||V));const O=f(P,!0)(I),se=V==="vnode"&&_n(O)&&fe?O[0]:O;return fe?m(fe)(se,V):se},message:f,type:T,interpolate:b,normalize:w,values:En(en(),i,d)};return I}const ig=()=>"",Co=e=>dn(e);function lg(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:a,messageCompiler:s,fallbackLocale:i,messages:l}=e,[d,g]=Qu(...t),f=zt(g.missingWarn)?g.missingWarn:e.missingWarn,m=zt(g.fallbackWarn)?g.fallbackWarn:e.fallbackWarn,w=zt(g.escapeParameter)?g.escapeParameter:e.escapeParameter,b=!!g.resolvedMessage,T=Ze(g.default)||zt(g.default)?zt(g.default)?s?d:()=>d:g.default:n?s?d:()=>d:null,E=n||T!=null&&(Ze(T)||dn(T)),I=Gu(e,g);w&&o2(g);let[P,N,pe]=b?[d,I,l[I]||en()]:ug(e,d,I,i,m,f),D=P,V=d;if(!b&&!(Ze(D)||Qo(D)||Co(D))&&E&&(D=T,V=D),!b&&(!(Ze(D)||Qo(D)||Co(D))||!Ze(N)))return a?fl:d;let fe=!1;const O=()=>{fe=!0},se=Co(D)?D:cg(e,d,N,D,V,O);if(fe)return D;const le=r2(e,N,pe,g),Pe=n2(le),Ie=a2(e,se,Pe);let ue=o?o(Ie,d):Ie;if(w&&Ze(ue)&&(ue=N_(ue)),__INTLIFY_PROD_DEVTOOLS__){const we={timestamp:Date.now(),key:Ze(d)?d:Co(D)?D.key:"",locale:N||(Co(D)?D.locale:""),format:Ze(D)?D:Co(D)?D.source:"",message:ue};we.meta=En({},e.__meta,H0()||{}),T0(we)}return ue}function o2(e){_n(e.list)?e.list=e.list.map(t=>Ze(t)?kf(t):t):Ht(e.named)&&Object.keys(e.named).forEach(t=>{Ze(e.named[t])&&(e.named[t]=kf(e.named[t]))})}function ug(e,t,n,o,a,s){const{messages:i,onWarn:l,messageResolver:d,localeFallbacker:g}=e,f=g(e,o,n);let m=en(),w,b=null;const T="translate";for(let E=0;E<f.length&&(w=f[E],m=i[w]||en(),(b=d(m,t))===null&&(b=m[t]),!(Ze(b)||Qo(b)||Co(b)));E++)if(!Y0(w,f)){const I=Ku(e,t,w,s,T);I!==t&&(b=I)}return[b,w,m]}function cg(e,t,n,o,a,s){const{messageCompiler:i,warnHtmlMessage:l}=e;if(Co(o)){const g=o;return g.locale=g.locale||n,g.key=g.key||t,g}if(i==null){const g=(()=>o);return g.locale=n,g.key=t,g}const d=i(o,s2(e,n,a,o,l,s));return d.locale=n,d.key=t,d.source=o,d}function a2(e,t,n){return t(n)}function Qu(...e){const[t,n,o]=e,a=en();if(!Ze(t)&&!wn(t)&&!Co(t)&&!Qo(t))throw ka(Ta.INVALID_ARGUMENT);const s=wn(t)?String(t):(Co(t),t);return wn(n)?a.plural=n:Ze(n)?a.default=n:It(n)&&!il(n)?a.named=n:_n(n)&&(a.list=n),wn(o)?a.plural=o:Ze(o)?a.default=o:It(o)&&En(a,o),[s,a]}function s2(e,t,n,o,a,s){return{locale:t,key:n,warnHtmlMessage:a,onError:i=>{throw s&&s(i),i},onCacheKey:i=>O_(t,n,i)}}function r2(e,t,n,o){const{modifiers:a,pluralRules:s,messageResolver:i,fallbackLocale:l,fallbackWarn:d,missingWarn:g,fallbackContext:f}=e,w={locale:t,modifiers:a,pluralRules:s,messages:(b,T)=>{let E=i(n,b);if(E==null&&(f||T)){const[,,I]=ug(f||e,b,t,l,d,g);E=i(I,b)}if(Ze(E)||Qo(E)){let I=!1;const N=cg(e,b,t,E,b,()=>{I=!0});return I?ig:N}else return Co(E)?E:ig}};return e.processor&&(w.processor=e.processor),o.list&&(w.list=o.list),o.named&&(w.named=o.named),wn(o.plural)&&(w.pluralIndex=o.plural),w}d0();/*!
* vue-i18n v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/const i2="11.1.12";function l2(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(bs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(bs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(bs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(bs().__INTLIFY_PROD_DEVTOOLS__=!1)}const oo={UNEXPECTED_RETURN_TYPE:C0,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function vo(e,...t){return cl(e,null,void 0)}const Zu=Ha("__translateVNode"),ec=Ha("__datetimeParts"),tc=Ha("__numberParts"),dg=Ha("__setPluralRules"),pg=Ha("__injectWithOption"),nc=Ha("__dispose");function Xr(e){if(!Ht(e)||Qo(e))return e;for(const t in e)if(Io(e,t))if(!t.includes("."))Ht(e[t])&&Xr(e[t]);else{const n=t.split("."),o=n.length-1;let a=e,s=!1;for(let i=0;i<o;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in a||(a[n[i]]=en()),!Ht(a[n[i]])){s=!0;break}a=a[n[i]]}if(s||(Qo(a)?Bf.includes(n[o])||delete e[t]:(a[n[o]]=e[t],delete e[t])),!Qo(a)){const i=a[n[o]];Ht(i)&&Xr(i)}}return e}function oc(e,t){const{messages:n,__i18n:o,messageResolver:a,flatJson:s}=t,i=It(n)?n:_n(o)?en():{[e]:en()};if(_n(o)&&o.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:d,resource:g}=l;d?(i[d]=i[d]||en(),ul(g,i[d])):ul(g,i)}else Ze(l)&&ul(JSON.parse(l),i)}),a==null&&s)for(const l in i)Io(i,l)&&Xr(i[l]);return i}function fg(e){return e.type}function gg(e,t,n){let o=Ht(t.messages)?t.messages:en();"__i18nGlobal"in n&&(o=oc(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const a=Object.keys(o);a.length&&a.forEach(s=>{e.mergeLocaleMessage(s,o[s])});{if(Ht(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(Ht(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function mg(e){return st(Fr,null,e,0)}const vg="__INTLIFY_META__",hg=()=>[],u2=()=>!1;let _g=0;function yg(e){return((t,n,o,a)=>e(n,o,ya()||void 0,a))}const c2=()=>{const e=ya();let t=null;return e&&(t=fg(e)[vg])?{[vg]:t}:null};function ac(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,a=e.flatJson,s=rl?S:Eh;let i=zt(e.inheritLocale)?e.inheritLocale:!0;const l=s(t&&i?t.locale.value:Ze(e.locale)?e.locale:Kr),d=s(t&&i?t.fallbackLocale.value:Ze(e.fallbackLocale)||_n(e.fallbackLocale)||It(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),g=s(oc(l.value,e)),f=s(It(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),m=s(It(e.numberFormats)?e.numberFormats:{[l.value]:{}});let w=t?t.missingWarn:zt(e.missingWarn)||Gs(e.missingWarn)?e.missingWarn:!0,b=t?t.fallbackWarn:zt(e.fallbackWarn)||Gs(e.fallbackWarn)?e.fallbackWarn:!0,T=t?t.fallbackRoot:zt(e.fallbackRoot)?e.fallbackRoot:!0,E=!!e.fallbackFormat,I=dn(e.missing)?e.missing:null,P=dn(e.missing)?yg(e.missing):null,N=dn(e.postTranslation)?e.postTranslation:null,pe=t?t.warnHtmlMessage:zt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,D=!!e.escapeParameter;const V=t?t.modifiers:It(e.modifiers)?e.modifiers:{};let fe=e.pluralRules||t&&t.pluralRules,O;O=(()=>{o&&Qf(null);const ge={version:i2,locale:l.value,fallbackLocale:d.value,messages:g.value,modifiers:V,pluralRules:fe,missing:P===null?void 0:P,missingWarn:w,fallbackWarn:b,fallbackFormat:E,unresolving:!0,postTranslation:N===null?void 0:N,warnHtmlMessage:pe,escapeParameter:D,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ge.datetimeFormats=f.value,ge.numberFormats=m.value,ge.__datetimeFormatters=It(O)?O.__datetimeFormatters:void 0,ge.__numberFormatters=It(O)?O.__numberFormatters:void 0;const Ee=G0(ge);return o&&Qf(Ee),Ee})(),Jr(O,l.value,d.value);function le(){return[l.value,d.value,g.value,f.value,m.value]}const Pe=$t({get:()=>l.value,set:ge=>{O.locale=ge,l.value=ge}}),Ie=$t({get:()=>d.value,set:ge=>{O.fallbackLocale=ge,d.value=ge,Jr(O,l.value,ge)}}),ue=$t(()=>g.value),we=$t(()=>f.value),ne=$t(()=>m.value);function J(){return dn(N)?N:null}function ie(ge){N=ge,O.postTranslation=ge}function X(){return I}function ee(ge){ge!==null&&(P=yg(ge)),I=ge,O.missing=P}const $e=(ge,Ee,Ke,et,ut,ft)=>{le();let at;try{__INTLIFY_PROD_DEVTOOLS__,o||(O.fallbackContext=t?j0():void 0),at=ge(O)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(O.fallbackContext=void 0)}if(Ke!=="translate exists"&&wn(at)&&at===fl||Ke==="translate exists"&&!at){const[rn,Rt]=Ee();return t&&T?et(t):ut(rn)}else{if(ft(at))return at;throw vo(oo.UNEXPECTED_RETURN_TYPE)}};function ve(...ge){return $e(Ee=>Reflect.apply(lg,null,[Ee,...ge]),()=>Qu(...ge),"translate",Ee=>Reflect.apply(Ee.t,Ee,[...ge]),Ee=>Ee,Ee=>Ze(Ee))}function Z(...ge){const[Ee,Ke,et]=ge;if(et&&!Ht(et))throw vo(oo.INVALID_ARGUMENT);return ve(Ee,Ke,En({resolvedMessage:!0},et||{}))}function te(...ge){return $e(Ee=>Reflect.apply(eg,null,[Ee,...ge]),()=>Ju(...ge),"datetime format",Ee=>Reflect.apply(Ee.d,Ee,[...ge]),()=>jf,Ee=>Ze(Ee)||_n(Ee))}function be(...ge){return $e(Ee=>Reflect.apply(og,null,[Ee,...ge]),()=>Xu(...ge),"number format",Ee=>Reflect.apply(Ee.n,Ee,[...ge]),()=>jf,Ee=>Ze(Ee)||_n(Ee))}function Te(ge){return ge.map(Ee=>Ze(Ee)||wn(Ee)||zt(Ee)?mg(String(Ee)):Ee)}const re={normalize:Te,interpolate:ge=>ge,type:"vnode"};function j(...ge){return $e(Ee=>{let Ke;const et=Ee;try{et.processor=re,Ke=Reflect.apply(lg,null,[et,...ge])}finally{et.processor=null}return Ke},()=>Qu(...ge),"translate",Ee=>Ee[Zu](...ge),Ee=>[mg(Ee)],Ee=>_n(Ee))}function oe(...ge){return $e(Ee=>Reflect.apply(og,null,[Ee,...ge]),()=>Xu(...ge),"number format",Ee=>Ee[tc](...ge),hg,Ee=>Ze(Ee)||_n(Ee))}function B(...ge){return $e(Ee=>Reflect.apply(eg,null,[Ee,...ge]),()=>Ju(...ge),"datetime format",Ee=>Ee[ec](...ge),hg,Ee=>Ze(Ee)||_n(Ee))}function q(ge){fe=ge,O.pluralRules=fe}function Y(ge,Ee){return $e(()=>{if(!ge)return!1;const Ke=Ze(Ee)?Ee:l.value,et=W(Ke),ut=O.messageResolver(et,ge);return Qo(ut)||Co(ut)||Ze(ut)},()=>[ge],"translate exists",Ke=>Reflect.apply(Ke.te,Ke,[ge,Ee]),u2,Ke=>zt(Ke))}function $(ge){let Ee=null;const Ke=Vf(O,d.value,l.value);for(let et=0;et<Ke.length;et++){const ut=g.value[Ke[et]]||{},ft=O.messageResolver(ut,ge);if(ft!=null){Ee=ft;break}}return Ee}function A(ge){const Ee=$(ge);return Ee??(t?t.tm(ge)||{}:{})}function W(ge){return g.value[ge]||{}}function ce(ge,Ee){if(a){const Ke={[ge]:Ee};for(const et in Ke)Io(Ke,et)&&Xr(Ke[et]);Ee=Ke[ge]}g.value[ge]=Ee,O.messages=g.value}function Ce(ge,Ee){g.value[ge]=g.value[ge]||{};const Ke={[ge]:Ee};if(a)for(const et in Ke)Io(Ke,et)&&Xr(Ke[et]);Ee=Ke[ge],ul(Ee,g.value[ge]),O.messages=g.value}function Le(ge){return f.value[ge]||{}}function z(ge,Ee){f.value[ge]=Ee,O.datetimeFormats=f.value,ng(O,ge,Ee)}function k(ge,Ee){f.value[ge]=En(f.value[ge]||{},Ee),O.datetimeFormats=f.value,ng(O,ge,Ee)}function H(ge){return m.value[ge]||{}}function Q(ge,Ee){m.value[ge]=Ee,O.numberFormats=m.value,sg(O,ge,Ee)}function Ne(ge,Ee){m.value[ge]=En(m.value[ge]||{},Ee),O.numberFormats=m.value,sg(O,ge,Ee)}_g++,t&&rl&&(St(t.locale,ge=>{i&&(l.value=ge,O.locale=ge,Jr(O,l.value,d.value))}),St(t.fallbackLocale,ge=>{i&&(d.value=ge,O.fallbackLocale=ge,Jr(O,l.value,d.value))}));const De={id:_g,locale:Pe,fallbackLocale:Ie,get inheritLocale(){return i},set inheritLocale(ge){i=ge,ge&&t&&(l.value=t.locale.value,d.value=t.fallbackLocale.value,Jr(O,l.value,d.value))},get availableLocales(){return Object.keys(g.value).sort()},messages:ue,get modifiers(){return V},get pluralRules(){return fe||{}},get isGlobal(){return o},get missingWarn(){return w},set missingWarn(ge){w=ge,O.missingWarn=w},get fallbackWarn(){return b},set fallbackWarn(ge){b=ge,O.fallbackWarn=b},get fallbackRoot(){return T},set fallbackRoot(ge){T=ge},get fallbackFormat(){return E},set fallbackFormat(ge){E=ge,O.fallbackFormat=E},get warnHtmlMessage(){return pe},set warnHtmlMessage(ge){pe=ge,O.warnHtmlMessage=ge},get escapeParameter(){return D},set escapeParameter(ge){D=ge,O.escapeParameter=ge},t:ve,getLocaleMessage:W,setLocaleMessage:ce,mergeLocaleMessage:Ce,getPostTranslationHandler:J,setPostTranslationHandler:ie,getMissingHandler:X,setMissingHandler:ee,[dg]:q};return De.datetimeFormats=we,De.numberFormats=ne,De.rt=Z,De.te=Y,De.tm=A,De.d=te,De.n=be,De.getDateTimeFormat=Le,De.setDateTimeFormat=z,De.mergeDateTimeFormat=k,De.getNumberFormat=H,De.setNumberFormat=Q,De.mergeNumberFormat=Ne,De[pg]=n,De[Zu]=j,De[ec]=B,De[tc]=oe,De}function d2(e){const t=Ze(e.locale)?e.locale:Kr,n=Ze(e.fallbackLocale)||_n(e.fallbackLocale)||It(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=dn(e.missing)?e.missing:void 0,a=zt(e.silentTranslationWarn)||Gs(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=zt(e.silentFallbackWarn)||Gs(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,i=zt(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,d=It(e.modifiers)?e.modifiers:{},g=e.pluralizationRules,f=dn(e.postTranslation)?e.postTranslation:void 0,m=Ze(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,w=!!e.escapeParameterHtml,b=zt(e.sync)?e.sync:!0;let T=e.messages;if(It(e.sharedMessages)){const V=e.sharedMessages;T=Object.keys(V).reduce((O,se)=>{const le=O[se]||(O[se]={});return En(le,V[se]),O},T||{})}const{__i18n:E,__root:I,__injectWithOption:P}=e,N=e.datetimeFormats,pe=e.numberFormats,D=e.flatJson;return{locale:t,fallbackLocale:n,messages:T,flatJson:D,datetimeFormats:N,numberFormats:pe,missing:o,missingWarn:a,fallbackWarn:s,fallbackRoot:i,fallbackFormat:l,modifiers:d,pluralRules:g,postTranslation:f,warnHtmlMessage:m,escapeParameter:w,messageResolver:e.messageResolver,inheritLocale:b,__i18n:E,__root:I,__injectWithOption:P}}function sc(e={}){const t=ac(d2(e)),{__extender:n}=e,o={id:t.id,get locale(){return t.locale.value},set locale(a){t.locale.value=a},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(a){t.fallbackLocale.value=a},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(a){t.setMissingHandler(a)},get silentTranslationWarn(){return zt(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=zt(a)?!a:a},get silentFallbackWarn(){return zt(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=zt(a)?!a:a},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(a){t.fallbackFormat=a},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(a){t.setPostTranslationHandler(a)},get sync(){return t.inheritLocale},set sync(a){t.inheritLocale=a},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(a){t.warnHtmlMessage=a!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(a){t.escapeParameter=a},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...a){return Reflect.apply(t.t,t,[...a])},rt(...a){return Reflect.apply(t.rt,t,[...a])},te(a,s){return t.te(a,s)},tm(a){return t.tm(a)},getLocaleMessage(a){return t.getLocaleMessage(a)},setLocaleMessage(a,s){t.setLocaleMessage(a,s)},mergeLocaleMessage(a,s){t.mergeLocaleMessage(a,s)},d(...a){return Reflect.apply(t.d,t,[...a])},getDateTimeFormat(a){return t.getDateTimeFormat(a)},setDateTimeFormat(a,s){t.setDateTimeFormat(a,s)},mergeDateTimeFormat(a,s){t.mergeDateTimeFormat(a,s)},n(...a){return Reflect.apply(t.n,t,[...a])},getNumberFormat(a){return t.getNumberFormat(a)},setNumberFormat(a,s){t.setNumberFormat(a,s)},mergeNumberFormat(a,s){t.mergeNumberFormat(a,s)}};return o.__extender=n,o}function p2(e,t,n){return{beforeCreate(){const o=ya();if(!o)throw vo(oo.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const s=a.i18n;if(a.__i18n&&(s.__i18n=a.__i18n),s.__root=t,this===this.$root)this.$i18n=bg(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=sc(s);const i=this.$i18n;i.__extender&&(i.__disposer=i.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=bg(e,a);else{this.$i18n=sc({__i18n:a.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&gg(t,a,a),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,i)=>this.$i18n.te(s,i),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const o=ya();if(!o)throw vo(oo.UNEXPECTED_ERROR);const a=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,a.__disposer&&(a.__disposer(),delete a.__disposer,delete a.__extender),n.__deleteInstance(o),delete this.$i18n}}}function bg(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[dg](t.pluralizationRules||e.pluralizationRules);const n=oc(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(o=>e.mergeLocaleMessage(o,n[o])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(o=>e.mergeDateTimeFormat(o,t.datetimeFormats[o])),t.numberFormats&&Object.keys(t.numberFormats).forEach(o=>e.mergeNumberFormat(o,t.numberFormats[o])),e}const rc={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function f2({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((o,a)=>[...o,...a.type===qe?a.children:[a]],[]):t.reduce((n,o)=>{const a=e[o];return a&&(n[o]=a()),n},en())}function wg(){return qe}const xg=no({name:"i18n-t",props:En({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>wn(e)||!isNaN(e)}},rc),setup(e,t){const{slots:n,attrs:o}=t,a=e.i18n||Kt({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(m=>m[0]!=="_"),i=en();e.locale&&(i.locale=e.locale),e.plural!==void 0&&(i.plural=Ze(e.plural)?+e.plural:e.plural);const l=f2(t,s),d=a[Zu](e.keypath,l,i),g=En(en(),o),f=Ze(e.tag)||Ht(e.tag)?e.tag:wg();return nn(f,g,d)}}});function g2(e){return _n(e)&&!Ze(e[0])}function Sg(e,t,n,o){const{slots:a,attrs:s}=t;return()=>{const i={part:!0};let l=en();e.locale&&(i.locale=e.locale),Ze(e.format)?i.key=e.format:Ht(e.format)&&(Ze(e.format.key)&&(i.key=e.format.key),l=Object.keys(e.format).reduce((w,b)=>n.includes(b)?En(en(),w,{[b]:e.format[b]}):w,en()));const d=o(e.value,i,l);let g=[i.key];_n(d)?g=d.map((w,b)=>{const T=a[w.type],E=T?T({[w.type]:w.value,index:b,parts:d}):[w.value];return g2(E)&&(E[0].key=`${w.type}-${b}`),E}):Ze(d)&&(g=[d]);const f=En(en(),s),m=Ze(e.tag)||Ht(e.tag)?e.tag:wg();return nn(m,f,g)}}const Tg=no({name:"i18n-n",props:En({value:{type:Number,required:!0},format:{type:[String,Object]}},rc),setup(e,t){const n=e.i18n||Kt({useScope:e.scope,__useComponent:!0});return Sg(e,t,ag,(...o)=>n[tc](...o))}});function m2(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const o=n.__getInstance(t);return o!=null?o.__composer:e.global.__composer}}function v2(e){const t=i=>{const{instance:l,value:d}=i;if(!l||!l.$)throw vo(oo.UNEXPECTED_ERROR);const g=m2(e,l.$),f=kg(d);return[Reflect.apply(g.t,g,[...Cg(f)]),g]};return{created:(i,l)=>{const[d,g]=t(l);rl&&e.global===g&&(i.__i18nWatcher=St(g.locale,()=>{l.instance&&l.instance.$forceUpdate()})),i.__composer=g,i.textContent=d},unmounted:i=>{rl&&i.__i18nWatcher&&(i.__i18nWatcher(),i.__i18nWatcher=void 0,delete i.__i18nWatcher),i.__composer&&(i.__composer=void 0,delete i.__composer)},beforeUpdate:(i,{value:l})=>{if(i.__composer){const d=i.__composer,g=kg(l);i.textContent=Reflect.apply(d.t,d,[...Cg(g)])}},getSSRProps:i=>{const[l]=t(i);return{textContent:l}}}}function kg(e){if(Ze(e))return{path:e};if(It(e)){if(!("path"in e))throw vo(oo.REQUIRED_VALUE,"path");return e}else throw vo(oo.INVALID_VALUE)}function Cg(e){const{path:t,locale:n,args:o,choice:a,plural:s}=e,i={},l=o||{};return Ze(n)&&(i.locale=n),wn(a)&&(i.plural=a),wn(s)&&(i.plural=s),[t,l,i]}function h2(e,t,...n){const o=It(n[0])?n[0]:{};(zt(o.globalInstall)?o.globalInstall:!0)&&([xg.name,"I18nT"].forEach(s=>e.component(s,xg)),[Tg.name,"I18nN"].forEach(s=>e.component(s,Tg)),[$g.name,"I18nD"].forEach(s=>e.component(s,$g))),e.directive("t",v2(t))}const _2=Ha("global-vue-i18n");function y2(e={}){const t=__VUE_I18N_LEGACY_API__&&zt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=zt(e.globalInjection)?e.globalInjection:!0,o=new Map,[a,s]=b2(e,t),i=Ha("");function l(m){return o.get(m)||null}function d(m,w){o.set(m,w)}function g(m){o.delete(m)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(m,...w){if(m.__VUE_I18N_SYMBOL__=i,m.provide(m.__VUE_I18N_SYMBOL__,f),It(w[0])){const E=w[0];f.__composerExtend=E.__composerExtend,f.__vueI18nExtend=E.__vueI18nExtend}let b=null;!t&&n&&(b=$2(m,f.global)),__VUE_I18N_FULL_INSTALL__&&h2(m,f,...w),__VUE_I18N_LEGACY_API__&&t&&m.mixin(p2(s,s.__composer,f));const T=m.unmount;m.unmount=()=>{b&&b(),f.dispose(),T()}},get global(){return s},dispose(){a.stop()},__instances:o,__getInstance:l,__setInstance:d,__deleteInstance:g};return f}function Kt(e={}){const t=ya();if(t==null)throw vo(oo.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw vo(oo.NOT_INSTALLED);const n=w2(t),o=S2(n),a=fg(t),s=x2(e,a);if(s==="global")return gg(o,e,a),o;if(s==="parent"){let d=T2(n,t,e.__useComponent);return d==null&&(d=o),d}const i=n;let l=i.__getInstance(t);if(l==null){const d=En({},e);"__i18n"in a&&(d.__i18n=a.__i18n),o&&(d.__root=o),l=ac(d),i.__composerExtend&&(l[nc]=i.__composerExtend(l)),C2(i,t,l),i.__setInstance(t,l)}return l}function b2(e,t){const n=ou(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>sc(e)):n.run(()=>ac(e));if(o==null)throw vo(oo.UNEXPECTED_ERROR);return[n,o]}function w2(e){const t=va(e.isCE?_2:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw vo(e.isCE?oo.NOT_INSTALLED_WITH_PROVIDE:oo.UNEXPECTED_ERROR);return t}function x2(e,t){return il(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function S2(e){return e.mode==="composition"?e.global:e.global.__composer}function T2(e,t,n=!1){let o=null;const a=t.root;let s=k2(t,n);for(;s!=null;){const i=e;if(e.mode==="composition")o=i.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=i.__getInstance(s);l!=null&&(o=l.__composer,n&&o&&!o[pg]&&(o=null))}if(o!=null||a===s)break;s=s.parent}return o}function k2(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function C2(e,t,n){Dt(()=>{},t),go(()=>{const o=n;e.__deleteInstance(t);const a=o[nc];a&&(a(),delete o[nc])},t)}const E2=["locale","fallbackLocale","availableLocales"],Eg=["t","rt","d","n","tm","te"];function $2(e,t){const n=Object.create(null);return E2.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s)throw vo(oo.UNEXPECTED_ERROR);const i=fn(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,a,i)}),e.config.globalProperties.$i18n=n,Eg.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s||!s.value)throw vo(oo.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,s)}),()=>{delete e.config.globalProperties.$i18n,Eg.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const $g=no({name:"i18n-d",props:En({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},rc),setup(e,t){const n=e.i18n||Kt({useScope:e.scope,__useComponent:!0});return Sg(e,t,tg,(...o)=>n[ec](...o))}});if(l2(),U0(w0),z0(N0),V0(Vf),__INTLIFY_PROD_DEVTOOLS__){const e=bs();e.__INTLIFY__=!0,x0(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}function Ag(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qr={exports:{}},A2=Qr.exports,Lg;function L2(){return Lg||(Lg=1,(function(e,t){(function(n,o){e.exports=o()})(A2,(function(){function n(c,u){var p=Object.keys(c);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(c);u&&(v=v.filter((function(_){return Object.getOwnPropertyDescriptor(c,_).enumerable}))),p.push.apply(p,v)}return p}function o(c){for(var u=1;u<arguments.length;u++){var p=arguments[u]!=null?arguments[u]:{};u%2?n(Object(p),!0).forEach((function(v){d(c,v,p[v])})):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach((function(v){Object.defineProperty(c,v,Object.getOwnPropertyDescriptor(p,v))}))}return c}function a(c){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},a(c)}function s(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}function i(c,u){for(var p=0;p<u.length;p++){var v=u[p];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(c,E(v.key),v)}}function l(c,u,p){return u&&i(c.prototype,u),Object.defineProperty(c,"prototype",{writable:!1}),c}function d(c,u,p){return(u=E(u))in c?Object.defineProperty(c,u,{value:p,enumerable:!0,configurable:!0,writable:!0}):c[u]=p,c}function g(c,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(u&&u.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),u&&m(c,u)}function f(c){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(u){return u.__proto__||Object.getPrototypeOf(u)},f(c)}function m(c,u){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,v){return p.__proto__=v,p},m(c,u)}function w(c){if(c===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c}function b(c){var u=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var p,v=f(c);if(u){var _=f(this).constructor;p=Reflect.construct(v,arguments,_)}else p=v.apply(this,arguments);return(function(x,M){if(M&&(typeof M=="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return w(x)})(this,p)}}function T(){return T=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(c,u,p){var v=(function(x,M){for(;!Object.prototype.hasOwnProperty.call(x,M)&&(x=f(x))!==null;);return x})(c,u);if(v){var _=Object.getOwnPropertyDescriptor(v,u);return _.get?_.get.call(arguments.length<3?c:p):_.value}},T.apply(this,arguments)}function E(c){var u=(function(p,v){if(typeof p!="object"||p===null)return p;var _=p[Symbol.toPrimitive];if(_!==void 0){var x=_.call(p,v);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)})(c,"string");return typeof u=="symbol"?u:u+""}var I=function(c){return!(!c||!c.Window)&&c instanceof c.Window},P=void 0,N=void 0;function pe(c){P=c;var u=c.document.createTextNode("");u.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(u)===u&&(c=c.wrap(c)),N=c}function D(c){return I(c)?c:(c.ownerDocument||c).defaultView||N.window}typeof window<"u"&&window&&pe(window);var V=function(c){return!!c&&a(c)==="object"},fe=function(c){return typeof c=="function"},O={window:function(c){return c===N||I(c)},docFrag:function(c){return V(c)&&c.nodeType===11},object:V,func:fe,number:function(c){return typeof c=="number"},bool:function(c){return typeof c=="boolean"},string:function(c){return typeof c=="string"},element:function(c){if(!c||a(c)!=="object")return!1;var u=D(c)||N;return/object|function/.test(typeof Element>"u"?"undefined":a(Element))?c instanceof Element||c instanceof u.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return V(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return V(c)&&c.length!==void 0&&fe(c.splice)}};function se(c){var u=c.interaction;if(u.prepared.name==="drag"){var p=u.prepared.axis;p==="x"?(u.coords.cur.page.y=u.coords.start.page.y,u.coords.cur.client.y=u.coords.start.client.y,u.coords.velocity.client.y=0,u.coords.velocity.page.y=0):p==="y"&&(u.coords.cur.page.x=u.coords.start.page.x,u.coords.cur.client.x=u.coords.start.client.x,u.coords.velocity.client.x=0,u.coords.velocity.page.x=0)}}function le(c){var u=c.iEvent,p=c.interaction;if(p.prepared.name==="drag"){var v=p.prepared.axis;if(v==="x"||v==="y"){var _=v==="x"?"y":"x";u.page[_]=p.coords.start.page[_],u.client[_]=p.coords.start.client[_],u.delta[_]=0}}}var Pe={id:"actions/drag",install:function(c){var u=c.actions,p=c.Interactable,v=c.defaults;p.prototype.draggable=Pe.draggable,u.map.drag=Pe,u.methodDict.drag="draggable",v.actions.drag=Pe.defaults},listeners:{"interactions:before-action-move":se,"interactions:action-resume":se,"interactions:action-move":le,"auto-start:check":function(c){var u=c.interaction,p=c.interactable,v=c.buttons,_=p.options.drag;if(_&&_.enabled&&(!u.pointerIsDown||!/mouse|pointer/.test(u.pointerType)||(v&p.options.drag.mouseButtons)!=0))return c.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(c){return O.object(c)?(this.options.drag.enabled=c.enabled!==!1,this.setPerAction("drag",c),this.setOnEvents("drag",c),/^(xy|x|y|start)$/.test(c.lockAxis)&&(this.options.drag.lockAxis=c.lockAxis),/^(xy|x|y)$/.test(c.startAxis)&&(this.options.drag.startAxis=c.startAxis),this):O.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:se,move:le,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},Ie=Pe,ue={init:function(c){var u=c;ue.document=u.document,ue.DocumentFragment=u.DocumentFragment||we,ue.SVGElement=u.SVGElement||we,ue.SVGSVGElement=u.SVGSVGElement||we,ue.SVGElementInstance=u.SVGElementInstance||we,ue.Element=u.Element||we,ue.HTMLElement=u.HTMLElement||ue.Element,ue.Event=u.Event,ue.Touch=u.Touch||we,ue.PointerEvent=u.PointerEvent||u.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function we(){}var ne=ue,J={init:function(c){var u=ne.Element,p=c.navigator||{};J.supportsTouch="ontouchstart"in c||O.func(c.DocumentTouch)&&ne.document instanceof c.DocumentTouch,J.supportsPointerEvent=p.pointerEnabled!==!1&&!!ne.PointerEvent,J.isIOS=/iP(hone|od|ad)/.test(p.platform),J.isIOS7=/iP(hone|od|ad)/.test(p.platform)&&/OS 7[^\d]/.test(p.appVersion),J.isIe9=/MSIE 9/.test(p.userAgent),J.isOperaMobile=p.appName==="Opera"&&J.supportsTouch&&/Presto/.test(p.userAgent),J.prefixedMatchesSelector="matches"in u.prototype?"matches":"webkitMatchesSelector"in u.prototype?"webkitMatchesSelector":"mozMatchesSelector"in u.prototype?"mozMatchesSelector":"oMatchesSelector"in u.prototype?"oMatchesSelector":"msMatchesSelector",J.pEventTypes=J.supportsPointerEvent?ne.PointerEvent===c.MSPointerEvent?{up:"MSPointerUp",down:"MSPointerDown",over:"mouseover",out:"mouseout",move:"MSPointerMove",cancel:"MSPointerCancel"}:{up:"pointerup",down:"pointerdown",over:"pointerover",out:"pointerout",move:"pointermove",cancel:"pointercancel"}:null,J.wheelEvent=ne.document&&"onmousewheel"in ne.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},ie=J;function X(c,u){if(c.contains)return c.contains(u);for(;u;){if(u===c)return!0;u=u.parentNode}return!1}function ee(c,u){for(;O.element(c);){if(ve(c,u))return c;c=$e(c)}return null}function $e(c){var u=c.parentNode;if(O.docFrag(u)){for(;(u=u.host)&&O.docFrag(u););return u}return u}function ve(c,u){return N!==P&&(u=u.replace(/\/deep\//g," ")),c[ie.prefixedMatchesSelector](u)}var Z=function(c){return c.parentNode||c.host};function te(c,u){for(var p,v=[],_=c;(p=Z(_))&&_!==u&&p!==_.ownerDocument;)v.unshift(_),_=p;return v}function be(c,u,p){for(;O.element(c);){if(ve(c,u))return!0;if((c=$e(c))===p)return ve(c,u)}return!1}function Te(c){return c.correspondingUseElement||c}function he(c){var u=c instanceof ne.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return u&&{left:u.left,right:u.right,top:u.top,bottom:u.bottom,width:u.width||u.right-u.left,height:u.height||u.bottom-u.top}}function re(c){var u,p=he(c);if(!ie.isIOS7&&p){var v={x:(u=(u=D(c))||N).scrollX||u.document.documentElement.scrollLeft,y:u.scrollY||u.document.documentElement.scrollTop};p.left+=v.x,p.right+=v.x,p.top+=v.y,p.bottom+=v.y}return p}function j(c){for(var u=[];c;)u.push(c),c=$e(c);return u}function oe(c){return!!O.string(c)&&(ne.document.querySelector(c),!0)}function B(c,u){for(var p in u)c[p]=u[p];return c}function q(c,u,p){return c==="parent"?$e(p):c==="self"?u.getRect(p):ee(p,c)}function Y(c,u,p,v){var _=c;return O.string(_)?_=q(_,u,p):O.func(_)&&(_=_.apply(void 0,v)),O.element(_)&&(_=re(_)),_}function $(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function A(c){return!c||"x"in c&&"y"in c||((c=B({},c)).x=c.left||0,c.y=c.top||0,c.width=c.width||(c.right||0)-c.x,c.height=c.height||(c.bottom||0)-c.y),c}function W(c,u,p){c.left&&(u.left+=p.x),c.right&&(u.right+=p.x),c.top&&(u.top+=p.y),c.bottom&&(u.bottom+=p.y),u.width=u.right-u.left,u.height=u.bottom-u.top}function ce(c,u,p){var v=p&&c.options[p];return $(Y(v&&v.origin||c.options.origin,c,u,[c&&u]))||{x:0,y:0}}function Ce(c,u){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(G){return!0},v=arguments.length>3?arguments[3]:void 0;if(v=v||{},O.string(c)&&c.search(" ")!==-1&&(c=Le(c)),O.array(c))return c.forEach((function(G){return Ce(G,u,p,v)})),v;if(O.object(c)&&(u=c,c=""),O.func(u)&&p(c))v[c]=v[c]||[],v[c].push(u);else if(O.array(u))for(var _=0,x=u;_<x.length;_++){var M=x[_];Ce(c,M,p,v)}else if(O.object(u))for(var F in u)Ce(Le(F).map((function(G){return"".concat(c).concat(G)})),u[F],p,v);return v}function Le(c){return c.trim().split(/ +/)}var z=function(c,u){return Math.sqrt(c*c+u*u)},k=["webkit","moz"];function H(c,u){c.__set||(c.__set={});var p=function(_){if(k.some((function(x){return _.indexOf(x)===0})))return 1;typeof c[_]!="function"&&_!=="__set"&&Object.defineProperty(c,_,{get:function(){return _ in c.__set?c.__set[_]:c.__set[_]=u[_]},set:function(x){c.__set[_]=x},configurable:!0})};for(var v in u)p(v);return c}function Q(c,u){c.page=c.page||{},c.page.x=u.page.x,c.page.y=u.page.y,c.client=c.client||{},c.client.x=u.client.x,c.client.y=u.client.y,c.timeStamp=u.timeStamp}function Ne(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function De(c){return c instanceof ne.Event||c instanceof ne.Touch}function ge(c,u,p){return c=c||"page",(p=p||{}).x=u[c+"X"],p.y=u[c+"Y"],p}function Ee(c,u){return u=u||{x:0,y:0},ie.isOperaMobile&&De(c)?(ge("screen",c,u),u.x+=window.scrollX,u.y+=window.scrollY):ge("page",c,u),u}function Ke(c){return O.number(c.pointerId)?c.pointerId:c.identifier}function et(c,u,p){var v=u.length>1?ft(u):u[0];Ee(v,c.page),(function(_,x){x=x||{},ie.isOperaMobile&&De(_)?ge("screen",_,x):ge("client",_,x)})(v,c.client),c.timeStamp=p}function ut(c){var u=[];return O.array(c)?(u[0]=c[0],u[1]=c[1]):c.type==="touchend"?c.touches.length===1?(u[0]=c.touches[0],u[1]=c.changedTouches[0]):c.touches.length===0&&(u[0]=c.changedTouches[0],u[1]=c.changedTouches[1]):(u[0]=c.touches[0],u[1]=c.touches[1]),u}function ft(c){for(var u={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<c.length;p++){var v=c[p];for(var _ in u)u[_]+=v[_]}for(var x in u)u[x]/=c.length;return u}function at(c){if(!c.length)return null;var u=ut(c),p=Math.min(u[0].pageX,u[1].pageX),v=Math.min(u[0].pageY,u[1].pageY),_=Math.max(u[0].pageX,u[1].pageX),x=Math.max(u[0].pageY,u[1].pageY);return{x:p,y:v,left:p,top:v,right:_,bottom:x,width:_-p,height:x-v}}function rn(c,u){var p=u+"X",v=u+"Y",_=ut(c),x=_[0][p]-_[1][p],M=_[0][v]-_[1][v];return z(x,M)}function Rt(c,u){var p=u+"X",v=u+"Y",_=ut(c),x=_[1][p]-_[0][p],M=_[1][v]-_[0][v];return 180*Math.atan2(M,x)/Math.PI}function An(c){return O.string(c.pointerType)?c.pointerType:O.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof ne.Touch?"touch":"mouse"}function Tn(c){var u=O.func(c.composedPath)?c.composedPath():c.path;return[Te(u?u[0]:c.target),Te(c.currentTarget)]}var Xt=(function(){function c(u){s(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=u}return l(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c})();Object.defineProperty(Xt.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ln=function(c,u){for(var p=0;p<u.length;p++){var v=u[p];c.push(v)}return c},Kn=function(c){return ln([],c)},Jn=function(c,u){for(var p=0;p<c.length;p++)if(u(c[p],p,c))return p;return-1},gt=function(c,u){return c[Jn(c,u)]},Fe=(function(c){g(p,c);var u=b(p);function p(v,_,x){var M;s(this,p),(M=u.call(this,_._interaction)).dropzone=void 0,M.dragEvent=void 0,M.relatedTarget=void 0,M.draggable=void 0,M.propagationStopped=!1,M.immediatePropagationStopped=!1;var F=x==="dragleave"?v.prev:v.cur,G=F.element,me=F.dropzone;return M.type=x,M.target=G,M.currentTarget=G,M.dropzone=me,M.dragEvent=_,M.relatedTarget=_.target,M.draggable=_.interactable,M.timeStamp=_.timeStamp,M}return l(p,[{key:"reject",value:function(){var v=this,_=this._interaction.dropState;if(this.type==="dropactivate"||this.dropzone&&_.cur.dropzone===this.dropzone&&_.cur.element===this.target)if(_.prev.dropzone=this.dropzone,_.prev.element=this.target,_.rejected=!0,_.events.enter=null,this.stopImmediatePropagation(),this.type==="dropactivate"){var x=_.activeDrops,M=Jn(x,(function(G){var me=G.dropzone,K=G.element;return me===v.dropzone&&K===v.target}));_.activeDrops.splice(M,1);var F=new p(_,this.dragEvent,"dropdeactivate");F.dropzone=this.dropzone,F.target=this.target,this.dropzone.fire(F)}else this.dropzone.fire(new p(_,this.dragEvent,"dragleave"))}},{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),p})(Xt);function Ue(c,u){for(var p=0,v=c.slice();p<v.length;p++){var _=v[p],x=_.dropzone,M=_.element;u.dropzone=x,u.target=M,x.fire(u),u.propagationStopped=u.immediatePropagationStopped=!1}}function Lt(c,u){for(var p=(function(x,M){for(var F=[],G=0,me=x.interactables.list;G<me.length;G++){var K=me[G];if(K.options.drop.enabled){var Se=K.options.drop.accept;if(!(O.element(Se)&&Se!==M||O.string(Se)&&!ve(M,Se)||O.func(Se)&&!Se({dropzone:K,draggableElement:M})))for(var Be=0,je=K.getAllElements();Be<je.length;Be++){var We=je[Be];We!==M&&F.push({dropzone:K,element:We,rect:K.getRect(We)})}}}return F})(c,u),v=0;v<p.length;v++){var _=p[v];_.rect=_.dropzone.getRect(_.element)}return p}function Qt(c,u,p){for(var v=c.dropState,_=c.interactable,x=c.element,M=[],F=0,G=v.activeDrops;F<G.length;F++){var me=G[F],K=me.dropzone,Se=me.element,Be=me.rect,je=K.dropCheck(u,p,_,x,Se,Be);M.push(je?Se:null)}var We=(function(Ge){for(var tt,Xe,it,xt=[],Ot=0;Ot<Ge.length;Ot++){var mt=Ge[Ot],kt=Ge[tt];if(mt&&Ot!==tt)if(kt){var to=Z(mt),mn=Z(kt);if(to!==mt.ownerDocument)if(mn!==mt.ownerDocument)if(to!==mn){xt=xt.length?xt:te(kt);var wo=void 0;if(kt instanceof ne.HTMLElement&&mt instanceof ne.SVGElement&&!(mt instanceof ne.SVGSVGElement)){if(mt===mn)continue;wo=mt.ownerSVGElement}else wo=mt;for(var Uo=te(wo,kt.ownerDocument),Da=0;Uo[Da]&&Uo[Da]===xt[Da];)Da++;var Ql=[Uo[Da-1],Uo[Da],xt[Da]];if(Ql[0])for(var Ti=Ql[0].lastChild;Ti;){if(Ti===Ql[1]){tt=Ot,xt=Uo;break}if(Ti===Ql[2])break;Ti=Ti.previousSibling}}else it=kt,(parseInt(D(Xe=mt).getComputedStyle(Xe).zIndex,10)||0)>=(parseInt(D(it).getComputedStyle(it).zIndex,10)||0)&&(tt=Ot);else tt=Ot}else tt=Ot}return tt})(M);return v.activeDrops[We]||null}function Qa(c,u,p){var v=c.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(_.activate=new Fe(v,p,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),p.type==="dragend"&&(_.deactivate=new Fe(v,p,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),v.rejected||(v.cur.element!==v.prev.element&&(v.prev.dropzone&&(_.leave=new Fe(v,p,"dragleave"),p.dragLeave=_.leave.target=v.prev.element,p.prevDropzone=_.leave.dropzone=v.prev.dropzone),v.cur.dropzone&&(_.enter=new Fe(v,p,"dragenter"),p.dragEnter=v.cur.element,p.dropzone=v.cur.dropzone)),p.type==="dragend"&&v.cur.dropzone&&(_.drop=new Fe(v,p,"drop"),p.dropzone=v.cur.dropzone,p.relatedTarget=v.cur.element),p.type==="dragmove"&&v.cur.dropzone&&(_.move=new Fe(v,p,"dropmove"),p.dropzone=v.cur.dropzone)),_}function Ia(c,u){var p=c.dropState,v=p.activeDrops,_=p.cur,x=p.prev;u.leave&&x.dropzone.fire(u.leave),u.enter&&_.dropzone.fire(u.enter),u.move&&_.dropzone.fire(u.move),u.drop&&_.dropzone.fire(u.drop),u.deactivate&&Ue(v,u.deactivate),p.prev.dropzone=_.dropzone,p.prev.element=_.element}function Za(c,u){var p=c.interaction,v=c.iEvent,_=c.event;if(v.type==="dragmove"||v.type==="dragend"){var x=p.dropState;u.dynamicDrop&&(x.activeDrops=Lt(u,p.element));var M=v,F=Qt(p,M,_);x.rejected=x.rejected&&!!F&&F.dropzone===x.cur.dropzone&&F.element===x.cur.element,x.cur.dropzone=F&&F.dropzone,x.cur.element=F&&F.element,x.events=Qa(p,0,M)}}var lr={id:"actions/drop",install:function(c){var u=c.actions,p=c.interactStatic,v=c.Interactable,_=c.defaults;c.usePlugin(Ie),v.prototype.dropzone=function(x){return(function(M,F){if(O.object(F)){if(M.options.drop.enabled=F.enabled!==!1,F.listeners){var G=Ce(F.listeners),me=Object.keys(G).reduce((function(Se,Be){return Se[/^(enter|leave)/.test(Be)?"drag".concat(Be):/^(activate|deactivate|move)/.test(Be)?"drop".concat(Be):Be]=G[Be],Se}),{}),K=M.options.drop.listeners;K&&M.off(K),M.on(me),M.options.drop.listeners=me}return O.func(F.ondrop)&&M.on("drop",F.ondrop),O.func(F.ondropactivate)&&M.on("dropactivate",F.ondropactivate),O.func(F.ondropdeactivate)&&M.on("dropdeactivate",F.ondropdeactivate),O.func(F.ondragenter)&&M.on("dragenter",F.ondragenter),O.func(F.ondragleave)&&M.on("dragleave",F.ondragleave),O.func(F.ondropmove)&&M.on("dropmove",F.ondropmove),/^(pointer|center)$/.test(F.overlap)?M.options.drop.overlap=F.overlap:O.number(F.overlap)&&(M.options.drop.overlap=Math.max(Math.min(1,F.overlap),0)),"accept"in F&&(M.options.drop.accept=F.accept),"checker"in F&&(M.options.drop.checker=F.checker),M}return O.bool(F)?(M.options.drop.enabled=F,M):M.options.drop})(this,x)},v.prototype.dropCheck=function(x,M,F,G,me,K){return(function(Se,Be,je,We,Ge,tt,Xe){var it=!1;if(!(Xe=Xe||Se.getRect(tt)))return!!Se.options.drop.checker&&Se.options.drop.checker(Be,je,it,Se,tt,We,Ge);var xt=Se.options.drop.overlap;if(xt==="pointer"){var Ot=ce(We,Ge,"drag"),mt=Ee(Be);mt.x+=Ot.x,mt.y+=Ot.y;var kt=mt.x>Xe.left&&mt.x<Xe.right,to=mt.y>Xe.top&&mt.y<Xe.bottom;it=kt&&to}var mn=We.getRect(Ge);if(mn&&xt==="center"){var wo=mn.left+mn.width/2,Uo=mn.top+mn.height/2;it=wo>=Xe.left&&wo<=Xe.right&&Uo>=Xe.top&&Uo<=Xe.bottom}return mn&&O.number(xt)&&(it=Math.max(0,Math.min(Xe.right,mn.right)-Math.max(Xe.left,mn.left))*Math.max(0,Math.min(Xe.bottom,mn.bottom)-Math.max(Xe.top,mn.top))/(mn.width*mn.height)>=xt),Se.options.drop.checker&&(it=Se.options.drop.checker(Be,je,it,Se,tt,We,Ge)),it})(this,x,M,F,G,me,K)},p.dynamicDrop=function(x){return O.bool(x)?(c.dynamicDrop=x,p):c.dynamicDrop},B(u.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),u.methodDict.drop="dropzone",c.dynamicDrop=!1,_.actions.drop=lr.defaults},listeners:{"interactions:before-action-start":function(c){var u=c.interaction;u.prepared.name==="drag"&&(u.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,u){var p=c.interaction,v=(c.event,c.iEvent);if(p.prepared.name==="drag"){var _=p.dropState;_.activeDrops=[],_.events={},_.activeDrops=Lt(u,p.element),_.events=Qa(p,0,v),_.events.activate&&(Ue(_.activeDrops,_.events.activate),u.fire("actions/drop:start",{interaction:p,dragEvent:v}))}},"interactions:action-move":Za,"interactions:after-action-move":function(c,u){var p=c.interaction,v=c.iEvent;if(p.prepared.name==="drag"){var _=p.dropState;Ia(p,_.events),u.fire("actions/drop:move",{interaction:p,dragEvent:v}),_.events={}}},"interactions:action-end":function(c,u){if(c.interaction.prepared.name==="drag"){var p=c.interaction,v=c.iEvent;Za(c,u),Ia(p,p.dropState.events),u.fire("actions/drop:end",{interaction:p,dragEvent:v})}},"interactions:stop":function(c){var u=c.interaction;if(u.prepared.name==="drag"){var p=u.dropState;p&&(p.activeDrops=null,p.events=null,p.cur.dropzone=null,p.cur.element=null,p.prev.dropzone=null,p.prev.element=null,p.rejected=!1)}}},getActiveDrops:Lt,getDrop:Qt,getDropEvents:Qa,fireDropEvents:Ia,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},mi=lr;function es(c){var u=c.interaction,p=c.iEvent,v=c.phase;if(u.prepared.name==="gesture"){var _=u.pointers.map((function(me){return me.pointer})),x=v==="start",M=v==="end",F=u.interactable.options.deltaSource;if(p.touches=[_[0],_[1]],x)p.distance=rn(_,F),p.box=at(_),p.scale=1,p.ds=0,p.angle=Rt(_,F),p.da=0,u.gesture.startDistance=p.distance,u.gesture.startAngle=p.angle;else if(M||u.pointers.length<2){var G=u.prevEvent;p.distance=G.distance,p.box=G.box,p.scale=G.scale,p.ds=0,p.angle=G.angle,p.da=0}else p.distance=rn(_,F),p.box=at(_),p.scale=p.distance/u.gesture.startDistance,p.angle=Rt(_,F),p.ds=p.scale-u.gesture.scale,p.da=p.angle-u.gesture.angle;u.gesture.distance=p.distance,u.gesture.angle=p.angle,O.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(u.gesture.scale=p.scale)}}var ta={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var u=c.actions,p=c.Interactable,v=c.defaults;p.prototype.gesturable=function(_){return O.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):O.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},u.map.gesture=ta,u.methodDict.gesture="gesturable",v.actions.gesture=ta.defaults},listeners:{"interactions:action-start":es,"interactions:action-move":es,"interactions:action-end":es,"interactions:new":function(c){c.interaction.gesture={angle:0,distance:0,scale:1,startAngle:0,startDistance:0}},"auto-start:check":function(c){if(!(c.interaction.pointers.length<2)){var u=c.interactable.options.gesture;if(u&&u.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},ur=ta;function cr(c,u,p,v,_,x,M){if(!u)return!1;if(u===!0){var F=O.number(x.width)?x.width:x.right-x.left,G=O.number(x.height)?x.height:x.bottom-x.top;if(M=Math.min(M,Math.abs((c==="left"||c==="right"?F:G)/2)),F<0&&(c==="left"?c="right":c==="right"&&(c="left")),G<0&&(c==="top"?c="bottom":c==="bottom"&&(c="top")),c==="left"){var me=F>=0?x.left:x.right;return p.x<me+M}if(c==="top"){var K=G>=0?x.top:x.bottom;return p.y<K+M}if(c==="right")return p.x>(F>=0?x.right:x.left)-M;if(c==="bottom")return p.y>(G>=0?x.bottom:x.top)-M}return!!O.element(v)&&(O.element(u)?u===v:be(v,u,_))}function Do(c){var u=c.iEvent,p=c.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var v=u;p.interactable.options.resize.square?(p.resizeAxes==="y"?v.delta.x=v.delta.y:v.delta.y=v.delta.x,v.axes="xy"):(v.axes=p.resizeAxes,p.resizeAxes==="x"?v.delta.y=0:p.resizeAxes==="y"&&(v.delta.x=0))}}var zn,kn,yo={id:"actions/resize",before:["actions/drag"],install:function(c){var u=c.actions,p=c.browser,v=c.Interactable,_=c.defaults;yo.cursors=(function(x){return x.isIe9?{x:"e-resize",y:"s-resize",xy:"se-resize",top:"n-resize",left:"w-resize",bottom:"s-resize",right:"e-resize",topleft:"se-resize",bottomright:"se-resize",topright:"ne-resize",bottomleft:"ne-resize"}:{x:"ew-resize",y:"ns-resize",xy:"nwse-resize",top:"ns-resize",left:"ew-resize",bottom:"ns-resize",right:"ew-resize",topleft:"nwse-resize",bottomright:"nwse-resize",topright:"nesw-resize",bottomleft:"nesw-resize"}})(p),yo.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,v.prototype.resizable=function(x){return(function(M,F,G){return O.object(F)?(M.options.resize.enabled=F.enabled!==!1,M.setPerAction("resize",F),M.setOnEvents("resize",F),O.string(F.axis)&&/^x$|^y$|^xy$/.test(F.axis)?M.options.resize.axis=F.axis:F.axis===null&&(M.options.resize.axis=G.defaults.actions.resize.axis),O.bool(F.preserveAspectRatio)?M.options.resize.preserveAspectRatio=F.preserveAspectRatio:O.bool(F.square)&&(M.options.resize.square=F.square),M):O.bool(F)?(M.options.resize.enabled=F,M):M.options.resize})(this,x,c)},u.map.resize=yo,u.methodDict.resize="resizable",_.actions.resize=yo.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(u){var p=u.iEvent,v=u.interaction;if(v.prepared.name==="resize"&&v.prepared.edges){var _=p,x=v.rect;v._rects={start:B({},x),corrected:B({},x),previous:B({},x),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=v.prepared.edges,_.rect=v._rects.corrected,_.deltaRect=v._rects.delta}})(c),Do(c)},"interactions:action-move":function(c){(function(u){var p=u.iEvent,v=u.interaction;if(v.prepared.name==="resize"&&v.prepared.edges){var _=p,x=v.interactable.options.resize.invert,M=x==="reposition"||x==="negate",F=v.rect,G=v._rects,me=G.start,K=G.corrected,Se=G.delta,Be=G.previous;if(B(Be,K),M){if(B(K,F),x==="reposition"){if(K.top>K.bottom){var je=K.top;K.top=K.bottom,K.bottom=je}if(K.left>K.right){var We=K.left;K.left=K.right,K.right=We}}}else K.top=Math.min(F.top,me.bottom),K.bottom=Math.max(F.bottom,me.top),K.left=Math.min(F.left,me.right),K.right=Math.max(F.right,me.left);for(var Ge in K.width=K.right-K.left,K.height=K.bottom-K.top,K)Se[Ge]=K[Ge]-Be[Ge];_.edges=v.prepared.edges,_.rect=K,_.deltaRect=Se}})(c),Do(c)},"interactions:action-end":function(c){var u=c.iEvent,p=c.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var v=u;v.edges=p.prepared.edges,v.rect=p._rects.corrected,v.deltaRect=p._rects.delta}},"auto-start:check":function(c){var u=c.interaction,p=c.interactable,v=c.element,_=c.rect,x=c.buttons;if(_){var M=B({},u.coords.cur.page),F=p.options.resize;if(F&&F.enabled&&(!u.pointerIsDown||!/mouse|pointer/.test(u.pointerType)||(x&F.mouseButtons)!=0)){if(O.object(F.edges)){var G={left:!1,right:!1,top:!1,bottom:!1};for(var me in G)G[me]=cr(me,F.edges[me],M,u._latestPointer.eventTarget,v,_,F.margin||yo.defaultMargin);G.left=G.left&&!G.right,G.top=G.top&&!G.bottom,(G.left||G.right||G.top||G.bottom)&&(c.action={name:"resize",edges:G})}else{var K=F.axis!=="y"&&M.x>_.right-yo.defaultMargin,Se=F.axis!=="x"&&M.y>_.bottom-yo.defaultMargin;(K||Se)&&(c.action={name:"resize",axes:(K?"x":"")+(Se?"y":"")})}return!c.action&&void 0}}}},defaults:{square:!1,preserveAspectRatio:!1,axis:"xy",margin:NaN,edges:null,invert:"none"},cursors:null,getCursor:function(c){var u=c.edges,p=c.axis,v=c.name,_=yo.cursors,x=null;if(p)x=_[v+p];else if(u){for(var M="",F=0,G=["top","bottom","left","right"];F<G.length;F++){var me=G[F];u[me]&&(M+=me)}x=_[M]}return x},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},na=yo,Xn={id:"actions",install:function(c){c.usePlugin(ur),c.usePlugin(na),c.usePlugin(Ie),c.usePlugin(mi)}},oa=0,co={request:function(c){return zn(c)},cancel:function(c){return kn(c)},init:function(c){if(zn=c.requestAnimationFrame,kn=c.cancelAnimationFrame,!zn)for(var u=["ms","moz","webkit","o"],p=0;p<u.length;p++){var v=u[p];zn=c["".concat(v,"RequestAnimationFrame")],kn=c["".concat(v,"CancelAnimationFrame")]||c["".concat(v,"CancelRequestAnimationFrame")]}zn=zn&&zn.bind(c),kn=kn&&kn.bind(c),zn||(zn=function(_){var x=Date.now(),M=Math.max(0,16-(x-oa)),F=c.setTimeout((function(){_(x+M)}),M);return oa=x+M,F},kn=function(_){return clearTimeout(_)})}},pt={defaults:{enabled:!1,margin:60,container:null,speed:300},now:Date.now,interaction:null,i:0,x:0,y:0,isScrolling:!1,prevTime:0,margin:0,speed:0,start:function(c){pt.isScrolling=!0,co.cancel(pt.i),c.autoScroll=pt,pt.interaction=c,pt.prevTime=pt.now(),pt.i=co.request(pt.scroll)},stop:function(){pt.isScrolling=!1,pt.interaction&&(pt.interaction.autoScroll=null),co.cancel(pt.i)},scroll:function(){var c=pt.interaction,u=c.interactable,p=c.element,v=c.prepared.name,_=u.options[v].autoScroll,x=Eo(_.container,u,p),M=pt.now(),F=(M-pt.prevTime)/1e3,G=_.speed*F;if(G>=1){var me={x:pt.x*G,y:pt.y*G};if(me.x||me.y){var K=Po(x);O.window(x)?x.scrollBy(me.x,me.y):x&&(x.scrollLeft+=me.x,x.scrollTop+=me.y);var Se=Po(x),Be={x:Se.x-K.x,y:Se.y-K.y};(Be.x||Be.y)&&u.fire({type:"autoscroll",target:p,interactable:u,delta:Be,interaction:c,container:x})}pt.prevTime=M}pt.isScrolling&&(co.cancel(pt.i),pt.i=co.request(pt.scroll))},check:function(c,u){var p;return(p=c.options[u].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(c){var u=c.interaction,p=c.pointer;if(u.interacting()&&pt.check(u.interactable,u.prepared.name))if(u.simulation)pt.x=pt.y=0;else{var v,_,x,M,F=u.interactable,G=u.element,me=u.prepared.name,K=F.options[me].autoScroll,Se=Eo(K.container,F,G);if(O.window(Se))M=p.clientX<pt.margin,v=p.clientY<pt.margin,_=p.clientX>Se.innerWidth-pt.margin,x=p.clientY>Se.innerHeight-pt.margin;else{var Be=he(Se);M=p.clientX<Be.left+pt.margin,v=p.clientY<Be.top+pt.margin,_=p.clientX>Be.right-pt.margin,x=p.clientY>Be.bottom-pt.margin}pt.x=_?1:M?-1:0,pt.y=x?1:v?-1:0,pt.isScrolling||(pt.margin=K.margin,pt.speed=K.speed,pt.start(u))}}};function Eo(c,u,p){return(O.string(c)?q(c,u,p):c)||D(p)}function Po(c){return O.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var dr={id:"auto-scroll",install:function(c){var u=c.defaults,p=c.actions;c.autoScroll=pt,pt.now=function(){return c.now()},p.phaselessTypes.autoscroll=!0,u.perAction.autoScroll=pt.defaults},listeners:{"interactions:new":function(c){c.interaction.autoScroll=null},"interactions:destroy":function(c){c.interaction.autoScroll=null,pt.stop(),pt.interaction&&(pt.interaction=null)},"interactions:stop":pt.stop,"interactions:action-move":function(c){return pt.onInteractionMove(c)}}},ts=dr;function aa(c,u){var p=!1;return function(){return p||(N.console.warn(u),p=!0),c.apply(this,arguments)}}function Qn(c,u){return c.name=u.name,c.axis=u.axis,c.edges=u.edges,c}function Cs(c){return O.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function pr(c){return O.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var fr={id:"auto-start/interactableMethods",install:function(c){var u=c.Interactable;u.prototype.getAction=function(p,v,_,x){var M=(function(F,G,me,K,Se){var Be=F.getRect(K),je=G.buttons||{0:1,1:4,3:8,4:16}[G.button],We={action:null,interactable:F,interaction:me,element:K,rect:Be,buttons:je};return Se.fire("auto-start:check",We),We.action})(this,v,_,x,c);return this.options.actionChecker?this.options.actionChecker(p,v,M,this,x,_):M},u.prototype.ignoreFrom=aa((function(p){return this._backCompatOption("ignoreFrom",p)}),"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),u.prototype.allowFrom=aa((function(p){return this._backCompatOption("allowFrom",p)}),"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),u.prototype.actionChecker=pr,u.prototype.styleCursor=Cs}};function Es(c,u,p,v,_){return u.testIgnoreAllow(u.options[c.name],p,v)&&u.options[c.name].enabled&&sa(u,p,c,_)?c:null}function gr(c,u,p,v,_,x,M){for(var F=0,G=v.length;F<G;F++){var me=v[F],K=_[F],Se=me.getAction(u,p,c,K);if(Se){var Be=Es(Se,me,K,x,M);if(Be)return{action:Be,interactable:me,element:K}}}return{action:null,interactable:null,element:null}}function mr(c,u,p,v,_){var x=[],M=[],F=v;function G(K){x.push(K),M.push(F)}for(;O.element(F);){x=[],M=[],_.interactables.forEachMatch(F,G);var me=gr(c,u,p,x,M,v,_);if(me.action&&!me.interactable.options[me.action.name].manualStart)return me;F=$e(F)}return{action:null,interactable:null,element:null}}function $s(c,u,p){var v=u.action,_=u.interactable,x=u.element;v=v||{name:null},c.interactable=_,c.element=x,Qn(c.prepared,v),c.rect=_&&v.name?_.getRect(x):null,hr(c,p),p.fire("autoStart:prepared",{interaction:c})}function sa(c,u,p,v){var _=c.options,x=_[p.name].max,M=_[p.name].maxPerElement,F=v.autoStart.maxInteractions,G=0,me=0,K=0;if(!(x&&M&&F))return!1;for(var Se=0,Be=v.interactions.list;Se<Be.length;Se++){var je=Be[Se],We=je.prepared.name;if(je.interacting()&&(++G>=F||je.interactable===c&&((me+=We===p.name?1:0)>=x||je.element===u&&(K++,We===p.name&&K>=M))))return!1}return F>0}function vr(c,u){return O.number(c)?(u.autoStart.maxInteractions=c,this):u.autoStart.maxInteractions}function ns(c,u,p){var v=p.autoStart.cursorElement;v&&v!==c&&(v.style.cursor=""),c.ownerDocument.documentElement.style.cursor=u,c.style.cursor=u,p.autoStart.cursorElement=u?c:null}function hr(c,u){var p=c.interactable,v=c.element,_=c.prepared;if(c.pointerType==="mouse"&&p&&p.options.styleCursor){var x="";if(_.name){var M=p.options[_.name].cursorChecker;x=O.func(M)?M(_,p,v,c._interacting):u.actions.map[_.name].getCursor(_)}ns(c.element,x||"",u)}else u.autoStart.cursorElement&&ns(u.autoStart.cursorElement,"",u)}var os={id:"auto-start/base",before:["actions"],install:function(c){var u=c.interactStatic,p=c.defaults;c.usePlugin(fr),p.base.actionChecker=null,p.base.styleCursor=!0,B(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),u.maxInteractions=function(v){return vr(v,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:sa,cursorElement:null}},listeners:{"interactions:down":function(c,u){var p=c.interaction,v=c.pointer,_=c.event,x=c.eventTarget;p.interacting()||$s(p,mr(p,v,_,x,u),u)},"interactions:move":function(c,u){(function(p,v){var _=p.interaction,x=p.pointer,M=p.event,F=p.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||$s(_,mr(_,x,M,F,v),v)})(c,u),(function(p,v){var _=p.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){v.fire("autoStart:before-start",p);var x=_.interactable,M=_.prepared.name;M&&x&&(x.options[M].manualStart||!sa(x,_.element,_.prepared,v)?_.stop():(_.start(_.prepared,x,_.element),hr(_,v)))}})(c,u)},"interactions:stop":function(c,u){var p=c.interaction,v=p.interactable;v&&v.options.styleCursor&&ns(p.element,"",u)}},maxInteractions:vr,withinInteractionLimit:sa,validateAction:Es},as=os,ss={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,u){var p=c.interaction,v=c.eventTarget,_=c.dx,x=c.dy;if(p.prepared.name==="drag"){var M=Math.abs(_),F=Math.abs(x),G=p.interactable.options.drag,me=G.startAxis,K=M>F?"x":M<F?"y":"xy";if(p.prepared.axis=G.lockAxis==="start"?K[0]:G.lockAxis,K!=="xy"&&me!=="xy"&&me!==K){p.prepared.name=null;for(var Se=v,Be=function(We){if(We!==p.interactable){var Ge=p.interactable.options.drag;if(!Ge.manualStart&&We.testIgnoreAllow(Ge,Se,v)){var tt=We.getAction(p.downPointer,p.downEvent,p,Se);if(tt&&tt.name==="drag"&&(function(Xe,it){if(!it)return!1;var xt=it.options.drag.startAxis;return Xe==="xy"||xt==="xy"||xt===Xe})(K,We)&&as.validateAction(tt,We,Se,v,u))return We}}};O.element(Se);){var je=u.interactables.forEachMatch(Se,Be);if(je){p.prepared.name="drag",p.interactable=je,p.element=Se;break}Se=$e(Se)}}}}}};function As(c){var u=c.prepared&&c.prepared.name;if(!u)return null;var p=c.interactable.options;return p[u].hold||p[u].delay}var vi={id:"auto-start/hold",install:function(c){var u=c.defaults;c.usePlugin(as),u.perAction.hold=0,u.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var u=c.interaction,p=As(u);p>0&&(u.autoStartHoldTimer=setTimeout((function(){u.start(u.prepared,u.interactable,u.element)}),p))},"interactions:move":function(c){var u=c.interaction,p=c.duplicate;u.autoStartHoldTimer&&u.pointerWasMoved&&!p&&(clearTimeout(u.autoStartHoldTimer),u.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var u=c.interaction;As(u)>0&&(u.prepared.name=null)}},getHoldDuration:As},Ro=vi,_r={id:"auto-start",install:function(c){c.usePlugin(as),c.usePlugin(Ro),c.usePlugin(ss)}},hi=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):O.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function rs(c){var u=c.interaction,p=c.event;u.interactable&&u.interactable.checkAndPreventDefault(p)}var Ma={id:"core/interactablePreventDefault",install:function(c){var u=c.Interactable;u.prototype.preventDefault=hi,u.prototype.checkAndPreventDefault=function(p){return(function(v,_,x){var M=v.options.preventDefault;if(M!=="never")if(M!=="always"){if(_.events.supportsPassive&&/^touch(start|move)$/.test(x.type)){var F=D(x.target).document,G=_.getDocOptions(F);if(!G||!G.events||G.events.passive!==!1)return}/^(mouse|pointer|touch)*(down|start)/i.test(x.type)||O.element(x.target)&&ve(x.target,"input,select,textarea,[contenteditable=true],[contenteditable=true] *")||x.preventDefault()}else x.preventDefault()})(this,c,p)},c.interactions.docEvents.push({type:"dragstart",listener:function(p){for(var v=0,_=c.interactions.list;v<_.length;v++){var x=_[v];if(x.element&&(x.element===p.target||X(x.element,p.target)))return void x.interactable.checkAndPreventDefault(p)}}})},listeners:["down","move","up","cancel"].reduce((function(c,u){return c["interactions:".concat(u)]=rs,c}),{})};function Zn(c,u){if(u.phaselessTypes[c])return!0;for(var p in u.map)if(c.indexOf(p)===0&&c.substr(p.length)in u.phases)return!0;return!1}function No(c){var u={};for(var p in c){var v=c[p];O.plainObject(v)?u[p]=No(v):O.array(v)?u[p]=Kn(v):u[p]=v}return u}var ra=(function(){function c(u){s(this,c),this.states=[],this.startOffset={left:0,right:0,top:0,bottom:0},this.startDelta=void 0,this.result=void 0,this.endResult=void 0,this.startEdges=void 0,this.edges=void 0,this.interaction=void 0,this.interaction=u,this.result=$o(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return l(c,[{key:"start",value:function(u,p){var v,_,x=u.phase,M=this.interaction,F=(function(me){var K=me.interactable.options[me.prepared.name],Se=K.modifiers;return Se&&Se.length?Se:["snap","snapSize","snapEdges","restrict","restrictEdges","restrictSize"].map((function(Be){var je=K[Be];return je&&je.enabled&&{options:je,methods:je._methods}})).filter((function(Be){return!!Be}))})(M);this.prepareStates(F),this.startEdges=B({},M.edges),this.edges=B({},this.startEdges),this.startOffset=(v=M.rect,_=p,v?{left:_.x-v.left,top:_.y-v.top,right:v.right-_.x,bottom:v.bottom-_.y}:{left:0,top:0,right:0,bottom:0}),this.startDelta={x:0,y:0};var G=this.fillArg({phase:x,pageCoords:p,preEnd:!1});return this.result=$o(),this.startAll(G),this.result=this.setAll(G)}},{key:"fillArg",value:function(u){var p=this.interaction;return u.interaction=p,u.interactable=p.interactable,u.element=p.element,u.rect||(u.rect=p.rect),u.edges||(u.edges=this.startEdges),u.startOffset=this.startOffset,u}},{key:"startAll",value:function(u){for(var p=0,v=this.states;p<v.length;p++){var _=v[p];_.methods.start&&(u.state=_,_.methods.start(u))}}},{key:"setAll",value:function(u){var p=u.phase,v=u.preEnd,_=u.skipModifiers,x=u.rect,M=u.edges;u.coords=B({},u.pageCoords),u.rect=B({},x),u.edges=B({},M);for(var F=_?this.states.slice(_):this.states,G=$o(u.coords,u.rect),me=0;me<F.length;me++){var K,Se=F[me],Be=Se.options,je=B({},u.coords),We=null;(K=Se.methods)!=null&&K.set&&this.shouldDo(Be,v,p)&&(u.state=Se,We=Se.methods.set(u),W(u.edges,u.rect,{x:u.coords.x-je.x,y:u.coords.y-je.y})),G.eventProps.push(We)}B(this.edges,u.edges),G.delta.x=u.coords.x-u.pageCoords.x,G.delta.y=u.coords.y-u.pageCoords.y,G.rectDelta.left=u.rect.left-x.left,G.rectDelta.right=u.rect.right-x.right,G.rectDelta.top=u.rect.top-x.top,G.rectDelta.bottom=u.rect.bottom-x.bottom;var Ge=this.result.coords,tt=this.result.rect;if(Ge&&tt){var Xe=G.rect.left!==tt.left||G.rect.right!==tt.right||G.rect.top!==tt.top||G.rect.bottom!==tt.bottom;G.changed=Xe||Ge.x!==G.coords.x||Ge.y!==G.coords.y}return G}},{key:"applyToInteraction",value:function(u){var p=this.interaction,v=u.phase,_=p.coords.cur,x=p.coords.start,M=this.result,F=this.startDelta,G=M.delta;v==="start"&&B(this.startDelta,M.delta);for(var me=0,K=[[x,F],[_,G]];me<K.length;me++){var Se=K[me],Be=Se[0],je=Se[1];Be.page.x+=je.x,Be.page.y+=je.y,Be.client.x+=je.x,Be.client.y+=je.y}var We=this.result.rectDelta,Ge=u.rect||p.rect;Ge.left+=We.left,Ge.right+=We.right,Ge.top+=We.top,Ge.bottom+=We.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(u){var p=this.interaction,v=u.phase,_=u.preEnd,x=u.skipModifiers,M=this.setAll(this.fillArg({preEnd:_,phase:v,pageCoords:u.modifiedCoords||p.coords.cur.page}));if(this.result=M,!M.changed&&(!x||x<this.states.length)&&p.interacting())return!1;if(u.modifiedCoords){var F=p.coords.cur.page,G={x:u.modifiedCoords.x-F.x,y:u.modifiedCoords.y-F.y};M.coords.x+=G.x,M.coords.y+=G.y,M.delta.x+=G.x,M.delta.y+=G.y}this.applyToInteraction(u)}},{key:"beforeEnd",value:function(u){var p=u.interaction,v=u.event,_=this.states;if(_&&_.length){for(var x=!1,M=0;M<_.length;M++){var F=_[M];u.state=F;var G=F.options,me=F.methods,K=me.beforeEnd&&me.beforeEnd(u);if(K)return this.endResult=K,!1;x=x||!x&&this.shouldDo(G,!0,u.phase,!0)}x&&p.move({event:v,preEnd:!0})}}},{key:"stop",value:function(u){var p=u.interaction;if(this.states&&this.states.length){var v=B({states:this.states,interactable:p.interactable,element:p.element,rect:null},u);this.fillArg(v);for(var _=0,x=this.states;_<x.length;_++){var M=x[_];v.state=M,M.methods.stop&&M.methods.stop(v)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(u){this.states=[];for(var p=0;p<u.length;p++){var v=u[p],_=v.options,x=v.methods,M=v.name;this.states.push({options:_,methods:x,index:p,name:M})}return this.states}},{key:"restoreInteractionCoords",value:function(u){var p=u.interaction,v=p.coords,_=p.rect,x=p.modification;if(x.result){for(var M=x.startDelta,F=x.result,G=F.delta,me=F.rectDelta,K=0,Se=[[v.start,M],[v.cur,G]];K<Se.length;K++){var Be=Se[K],je=Be[0],We=Be[1];je.page.x-=We.x,je.page.y-=We.y,je.client.x-=We.x,je.client.y-=We.y}_.left-=me.left,_.right-=me.right,_.top-=me.top,_.bottom-=me.bottom}}},{key:"shouldDo",value:function(u,p,v,_){return!(!u||u.enabled===!1||_&&!u.endOnly||u.endOnly&&!p||v==="start"&&!u.setStart)}},{key:"copyFrom",value:function(u){this.startOffset=u.startOffset,this.startDelta=u.startDelta,this.startEdges=u.startEdges,this.edges=u.edges,this.states=u.states.map((function(p){return No(p)})),this.result=$o(B({},u.result.coords),B({},u.result.rect))}},{key:"destroy",value:function(){for(var u in this)this[u]=null}}]),c})();function $o(c,u){return{rect:u,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function bo(c,u){var p=c.defaults,v={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},_=function(x){var M=x||{};for(var F in M.enabled=M.enabled!==!1,p)F in M||(M[F]=p[F]);var G={options:M,methods:v,name:u,enable:function(){return M.enabled=!0,G},disable:function(){return M.enabled=!1,G}};return G};return u&&typeof u=="string"&&(_._defaults=p,_._methods=v),_}function ia(c){var u=c.iEvent,p=c.interaction.modification.result;p&&(u.modifiers=p.eventProps)}var _i={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var u=c.interaction;u.modification=new ra(u)},"interactions:before-action-start":function(c){var u=c.interaction,p=c.interaction.modification;p.start(c,u.coords.start.page),u.edges=p.edges,p.applyToInteraction(c)},"interactions:before-action-move":function(c){var u=c.interaction,p=u.modification,v=p.setAndApply(c);return u.edges=p.edges,v},"interactions:before-action-end":function(c){var u=c.interaction,p=u.modification,v=p.beforeEnd(c);return u.edges=p.startEdges,v},"interactions:action-start":ia,"interactions:action-move":ia,"interactions:action-end":ia,"interactions:after-action-start":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-move":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:stop":function(c){return c.interaction.modification.stop(c)}}},_e=_i,ae={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},ye=(function(c){g(p,c);var u=b(p);function p(v,_,x,M,F,G,me){var K;s(this,p),(K=u.call(this,v)).relatedTarget=null,K.screenX=void 0,K.screenY=void 0,K.button=void 0,K.buttons=void 0,K.ctrlKey=void 0,K.shiftKey=void 0,K.altKey=void 0,K.metaKey=void 0,K.page=void 0,K.client=void 0,K.delta=void 0,K.rect=void 0,K.x0=void 0,K.y0=void 0,K.t0=void 0,K.dt=void 0,K.duration=void 0,K.clientX0=void 0,K.clientY0=void 0,K.velocity=void 0,K.speed=void 0,K.swipe=void 0,K.axes=void 0,K.preEnd=void 0,F=F||v.element;var Se=v.interactable,Be=(Se&&Se.options||ae).deltaSource,je=ce(Se,F,x),We=M==="start",Ge=M==="end",tt=We?w(K):v.prevEvent,Xe=We?v.coords.start:Ge?{page:tt.page,client:tt.client,timeStamp:v.coords.cur.timeStamp}:v.coords.cur;return K.page=B({},Xe.page),K.client=B({},Xe.client),K.rect=B({},v.rect),K.timeStamp=Xe.timeStamp,Ge||(K.page.x-=je.x,K.page.y-=je.y,K.client.x-=je.x,K.client.y-=je.y),K.ctrlKey=_.ctrlKey,K.altKey=_.altKey,K.shiftKey=_.shiftKey,K.metaKey=_.metaKey,K.button=_.button,K.buttons=_.buttons,K.target=F,K.currentTarget=F,K.preEnd=G,K.type=me||x+(M||""),K.interactable=Se,K.t0=We?v.pointers[v.pointers.length-1].downTime:tt.t0,K.x0=v.coords.start.page.x-je.x,K.y0=v.coords.start.page.y-je.y,K.clientX0=v.coords.start.client.x-je.x,K.clientY0=v.coords.start.client.y-je.y,K.delta=We||Ge?{x:0,y:0}:{x:K[Be].x-tt[Be].x,y:K[Be].y-tt[Be].y},K.dt=v.coords.delta.timeStamp,K.duration=K.timeStamp-K.t0,K.velocity=B({},v.coords.velocity[Be]),K.speed=z(K.velocity.x,K.velocity.y),K.swipe=Ge||M==="inertiastart"?K.getSwipe():null,K}return l(p,[{key:"getSwipe",value:function(){var v=this._interaction;if(v.prevEvent.speed<600||this.timeStamp-v.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(v.prevEvent.velocityY,v.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var x=112.5<=_&&_<247.5,M=202.5<=_&&_<337.5;return{up:M,down:!M&&22.5<=_&&_<157.5,left:x,right:!x&&(292.5<=_||_<67.5),angle:_,speed:v.prevEvent.speed,velocity:{x:v.prevEvent.velocityX,y:v.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p})(Xt);Object.defineProperties(ye.prototype,{pageX:{get:function(){return this.page.x},set:function(c){this.page.x=c}},pageY:{get:function(){return this.page.y},set:function(c){this.page.y=c}},clientX:{get:function(){return this.client.x},set:function(c){this.client.x=c}},clientY:{get:function(){return this.client.y},set:function(c){this.client.y=c}},dx:{get:function(){return this.delta.x},set:function(c){this.delta.x=c}},dy:{get:function(){return this.delta.y},set:function(c){this.delta.y=c}},velocityX:{get:function(){return this.velocity.x},set:function(c){this.velocity.x=c}},velocityY:{get:function(){return this.velocity.y},set:function(c){this.velocity.y=c}}});var nt=l((function c(u,p,v,_,x){s(this,c),this.id=void 0,this.pointer=void 0,this.event=void 0,this.downTime=void 0,this.downTarget=void 0,this.id=u,this.pointer=p,this.event=v,this.downTime=_,this.downTarget=x})),Wt=(function(c){return c.interactable="",c.element="",c.prepared="",c.pointerIsDown="",c.pointerWasMoved="",c._proxy="",c})({}),hn=(function(c){return c.start="",c.move="",c.end="",c.stop="",c.interacting="",c})({}),Nt=0,un=(function(){function c(u){var p=this,v=u.pointerType,_=u.scopeFire;s(this,c),this.interactable=null,this.element=null,this.rect=null,this._rects=void 0,this.edges=null,this._scopeFire=void 0,this.prepared={name:null,axis:null,edges:null},this.pointerType=void 0,this.pointers=[],this.downEvent=null,this.downPointer={},this._latestPointer={pointer:null,event:null,eventTarget:null},this.prevEvent=null,this.pointerIsDown=!1,this.pointerWasMoved=!1,this._interacting=!1,this._ending=!1,this._stopped=!0,this._proxy=void 0,this.simulation=null,this.doMove=aa((function(K){this.move(K)}),"The interaction.doMove() method has been renamed to interaction.move()"),this.coords={start:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},prev:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},cur:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},delta:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0},velocity:{page:{x:0,y:0},client:{x:0,y:0},timeStamp:0}},this._id=Nt++,this._scopeFire=_,this.pointerType=v;var x=this;this._proxy={};var M=function(K){Object.defineProperty(p._proxy,K,{get:function(){return x[K]}})};for(var F in Wt)M(F);var G=function(K){Object.defineProperty(p._proxy,K,{value:function(){return x[K].apply(x,arguments)}})};for(var me in hn)G(me);this._scopeFire("interactions:new",{interaction:this})}return l(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(u,p,v){var _=this.updatePointer(u,p,v,!0),x=this.pointers[_];this._scopeFire("interactions:down",{pointer:u,event:p,eventTarget:v,pointerIndex:_,pointerInfo:x,type:"down",interaction:this})}},{key:"start",value:function(u,p,v){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(u.name==="gesture"?2:1)||!p.options[u.name].enabled)&&(Qn(this.prepared,u),this.interactable=p,this.element=v,this.rect=p.getRect(v),this.edges=this.prepared.edges?B({},this.prepared.edges):{left:!0,right:!0,top:!0,bottom:!0},this._stopped=!1,this._interacting=this._doPhase({interaction:this,event:this.downEvent,phase:"start"})&&!this._stopped,this._interacting)}},{key:"pointerMove",value:function(u,p,v){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(u,p,v,!1);var _,x,M=this.coords.cur.page.x===this.coords.prev.page.x&&this.coords.cur.page.y===this.coords.prev.page.y&&this.coords.cur.client.x===this.coords.prev.client.x&&this.coords.cur.client.y===this.coords.prev.client.y;this.pointerIsDown&&!this.pointerWasMoved&&(_=this.coords.cur.client.x-this.coords.start.client.x,x=this.coords.cur.client.y-this.coords.start.client.y,this.pointerWasMoved=z(_,x)>this.pointerMoveTolerance);var F,G,me,K=this.getPointerIndex(u),Se={pointer:u,pointerIndex:K,pointerInfo:this.pointers[K],event:p,type:"move",eventTarget:v,dx:_,dy:x,duplicate:M,interaction:this};M||(F=this.coords.velocity,G=this.coords.delta,me=Math.max(G.timeStamp/1e3,.001),F.page.x=G.page.x/me,F.page.y=G.page.y/me,F.client.x=G.client.x/me,F.client.y=G.client.y/me,F.timeStamp=me),this._scopeFire("interactions:move",Se),M||this.simulation||(this.interacting()&&(Se.type=null,this.move(Se)),this.pointerWasMoved&&Q(this.coords.prev,this.coords.cur))}},{key:"move",value:function(u){u&&u.event||Ne(this.coords.delta),(u=B({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},u||{})).phase="move",this._doPhase(u)}},{key:"pointerUp",value:function(u,p,v,_){var x=this.getPointerIndex(u);x===-1&&(x=this.updatePointer(u,p,v,!1));var M=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(M),{pointer:u,pointerIndex:x,pointerInfo:this.pointers[x],event:p,eventTarget:v,type:M,curEventTarget:_,interaction:this}),this.simulation||this.end(p),this.removePointer(u,p)}},{key:"documentBlur",value:function(u){this.end(u),this._scopeFire("interactions:blur",{event:u,type:"blur",interaction:this})}},{key:"end",value:function(u){var p;this._ending=!0,u=u||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:u,interaction:this,phase:"end"})),this._ending=!1,p===!0&&this.stop()}},{key:"currentAction",value:function(){return this._interacting?this.prepared.name:null}},{key:"interacting",value:function(){return this._interacting}},{key:"stop",value:function(){this._scopeFire("interactions:stop",{interaction:this}),this.interactable=this.element=null,this._interacting=!1,this._stopped=!0,this.prepared.name=this.prevEvent=null}},{key:"getPointerIndex",value:function(u){var p=Ke(u);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Jn(this.pointers,(function(v){return v.id===p}))}},{key:"getPointerInfo",value:function(u){return this.pointers[this.getPointerIndex(u)]}},{key:"updatePointer",value:function(u,p,v,_){var x,M,F,G=Ke(u),me=this.getPointerIndex(u),K=this.pointers[me];return _=_!==!1&&(_||/(down|start)$/i.test(p.type)),K?K.pointer=u:(K=new nt(G,u,p,null,null),me=this.pointers.length,this.pointers.push(K)),et(this.coords.cur,this.pointers.map((function(Se){return Se.pointer})),this._now()),x=this.coords.delta,M=this.coords.prev,F=this.coords.cur,x.page.x=F.page.x-M.page.x,x.page.y=F.page.y-M.page.y,x.client.x=F.client.x-M.client.x,x.client.y=F.client.y-M.client.y,x.timeStamp=F.timeStamp-M.timeStamp,_&&(this.pointerIsDown=!0,K.downTime=this.coords.cur.timeStamp,K.downTarget=v,H(this.downPointer,u),this.interacting()||(Q(this.coords.start,this.coords.cur),Q(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(u,p,v),this._scopeFire("interactions:update-pointer",{pointer:u,event:p,eventTarget:v,down:_,pointerInfo:K,pointerIndex:me,interaction:this}),me}},{key:"removePointer",value:function(u,p){var v=this.getPointerIndex(u);if(v!==-1){var _=this.pointers[v];this._scopeFire("interactions:remove-pointer",{pointer:u,event:p,eventTarget:null,pointerIndex:v,pointerInfo:_,interaction:this}),this.pointers.splice(v,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(u,p,v){this._latestPointer.pointer=u,this._latestPointer.event=p,this._latestPointer.eventTarget=v}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(u,p,v,_){return new ye(this,u,this.prepared.name,p,this.element,v,_)}},{key:"_fireEvent",value:function(u){var p;(p=this.interactable)==null||p.fire(u),(!this.prevEvent||u.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=u)}},{key:"_doPhase",value:function(u){var p=u.event,v=u.phase,_=u.preEnd,x=u.type,M=this.rect;if(M&&v==="move"&&(W(this.edges,M,this.coords.delta[this.interactable.options.deltaSource]),M.width=M.right-M.left,M.height=M.bottom-M.top),this._scopeFire("interactions:before-action-".concat(v),u)===!1)return!1;var F=u.iEvent=this._createPreparedEvent(p,v,_,x);return this._scopeFire("interactions:action-".concat(v),u),v==="start"&&(this.prevEvent=F),this._fireEvent(F),this._scopeFire("interactions:after-action-".concat(v),u),!0}},{key:"_now",value:function(){return Date.now()}}]),c})();function is(c){eo(c.interaction)}function eo(c){if(!(function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)})(c))return!1;var u=c.offset.pending;return yi(c.coords.cur,u),yi(c.coords.delta,u),W(c.edges,c.rect,u),u.x=0,u.y=0,!0}function yr(c){var u=c.x,p=c.y;this.offset.pending.x+=u,this.offset.pending.y+=p,this.offset.total.x+=u,this.offset.total.y+=p}function yi(c,u){var p=c.page,v=c.client,_=u.x,x=u.y;p.x+=_,p.y+=x,v.x+=_,v.y+=x}hn.offsetBy="";var Bl={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=yr},listeners:{"interactions:new":function(c){c.interaction.offset={total:{x:0,y:0},pending:{x:0,y:0}}},"interactions:update-pointer":function(c){return(function(u){u.pointerIsDown&&(yi(u.coords.cur,u.offset.total),u.offset.pending.x=0,u.offset.pending.y=0)})(c.interaction)},"interactions:before-action-start":is,"interactions:before-action-move":is,"interactions:before-action-end":function(c){var u=c.interaction;if(eo(u))return u.move({offset:!0}),u.end(),!1},"interactions:stop":function(c){var u=c.interaction;u.offset.total.x=0,u.offset.total.y=0,u.offset.pending.x=0,u.offset.pending.y=0}}},Ul=Bl,zl=(function(){function c(u){s(this,c),this.active=!1,this.isModified=!1,this.smoothEnd=!1,this.allowResume=!1,this.modification=void 0,this.modifierCount=0,this.modifierArg=void 0,this.startCoords=void 0,this.t0=0,this.v0=0,this.te=0,this.targetOffset=void 0,this.modifiedOffset=void 0,this.currentOffset=void 0,this.lambda_v0=0,this.one_ve_v0=0,this.timeout=void 0,this.interaction=void 0,this.interaction=u}return l(c,[{key:"start",value:function(u){var p=this.interaction,v=br(p);if(!v||!v.enabled)return!1;var _=p.coords.velocity.client,x=z(_.x,_.y),M=this.modification||(this.modification=new ra(p));if(M.copyFrom(p.modification),this.t0=p._now(),this.allowResume=v.allowResume,this.v0=x,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=M.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&x>v.minSpeed&&x>v.endSpeed)this.startInertia();else{if(M.result=M.setAll(this.modifierArg),!M.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:u,phase:"inertiastart"}),p.offsetBy({x:-this.targetOffset.x,y:-this.targetOffset.y}),p.modification.result.rect=null,this.active=!0,p.simulation=this,!0}},{key:"startInertia",value:function(){var u=this,p=this.interaction.coords.velocity.client,v=br(this.interaction),_=v.resistance,x=-Math.log(v.endSpeed/this.v0)/_;this.targetOffset={x:(p.x-x)/_,y:(p.y-x)/_},this.te=x,this.lambda_v0=_/this.v0,this.one_ve_v0=1-v.endSpeed/this.v0;var M=this.modification,F=this.modifierArg;F.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},M.result=M.setAll(F),M.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+M.result.delta.x,y:this.targetOffset.y+M.result.delta.y}),this.onNextFrame((function(){return u.inertiaTick()}))}},{key:"startSmoothEnd",value:function(){var u=this;this.smoothEnd=!0,this.isModified=!0,this.targetOffset={x:this.modification.result.delta.x,y:this.modification.result.delta.y},this.onNextFrame((function(){return u.smoothEndTick()}))}},{key:"onNextFrame",value:function(u){var p=this;this.timeout=co.request((function(){p.active&&u()}))}},{key:"inertiaTick",value:function(){var u,p,v,_,x,M,F,G=this,me=this.interaction,K=br(me).resistance,Se=(me._now()-this.t0)/1e3;if(Se<this.te){var Be,je=1-(Math.exp(-K*Se)-this.lambda_v0)/this.one_ve_v0;this.isModified?(u=0,p=0,v=this.targetOffset.x,_=this.targetOffset.y,x=this.modifiedOffset.x,M=this.modifiedOffset.y,Be={x:Wl(F=je,u,v,x),y:Wl(F,p,_,M)}):Be={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var We={x:Be.x-this.currentOffset.x,y:Be.y-this.currentOffset.y};this.currentOffset.x+=We.x,this.currentOffset.y+=We.y,me.offsetBy(We),me.move(),this.onNextFrame((function(){return G.inertiaTick()}))}else me.offsetBy({x:this.modifiedOffset.x-this.currentOffset.x,y:this.modifiedOffset.y-this.currentOffset.y}),this.end()}},{key:"smoothEndTick",value:function(){var u=this,p=this.interaction,v=p._now()-this.t0,_=br(p).smoothEndDuration;if(v<_){var x={x:bi(v,0,this.targetOffset.x,_),y:bi(v,0,this.targetOffset.y,_)},M={x:x.x-this.currentOffset.x,y:x.y-this.currentOffset.y};this.currentOffset.x+=M.x,this.currentOffset.y+=M.y,p.offsetBy(M),p.move({skipModifiers:this.modifierCount}),this.onNextFrame((function(){return u.smoothEndTick()}))}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(u){var p=u.pointer,v=u.event,_=u.eventTarget,x=this.interaction;x.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),x.updatePointer(p,v,_,!0),x._doPhase({interaction:x,event:v,phase:"resume"}),Q(x.coords.prev,x.coords.cur),this.stop()}},{key:"end",value:function(){this.interaction.move(),this.interaction.end(),this.stop()}},{key:"stop",value:function(){this.active=this.smoothEnd=!1,this.interaction.simulation=null,co.cancel(this.timeout)}}]),c})();function br(c){var u=c.interactable,p=c.prepared;return u&&u.options&&p.name&&u.options[p.name].inertia}var Vl={id:"inertia",before:["modifiers","actions"],install:function(c){var u=c.defaults;c.usePlugin(Ul),c.usePlugin(_e),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,u.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var u=c.interaction;u.inertia=new zl(u)},"interactions:before-action-end":function(c){var u=c.interaction,p=c.event;return(!u._interacting||u.simulation||!u.inertia.start(p))&&null},"interactions:down":function(c){var u=c.interaction,p=c.eventTarget,v=u.inertia;if(v.active)for(var _=p;O.element(_);){if(_===u.element){v.resume(c);break}_=$e(_)}},"interactions:stop":function(c){var u=c.interaction.inertia;u.active&&u.stop()},"interactions:before-action-resume":function(c){var u=c.interaction.modification;u.stop(c),u.start(c,c.interaction.coords.cur.page),u.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":ia,"interactions:action-inertiastart":ia,"interactions:after-action-inertiastart":function(c){return c.interaction.modification.restoreInteractionCoords(c)},"interactions:after-action-resume":function(c){return c.interaction.modification.restoreInteractionCoords(c)}}};function Wl(c,u,p,v){var _=1-c;return _*_*u+2*_*c*p+c*c*v}function bi(c,u,p,v){return-p*(c/=v)*(c-2)+u}var Hl=Vl;function wi(c,u){for(var p=0;p<u.length;p++){var v=u[p];if(c.immediatePropagationStopped)break;v(c)}}var Ls=(function(){function c(u){s(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=B({},u||{})}return l(c,[{key:"fire",value:function(u){var p,v=this.global;(p=this.types[u.type])&&wi(u,p),!u.propagationStopped&&v&&(p=v[u.type])&&wi(u,p)}},{key:"on",value:function(u,p){var v=Ce(u,p);for(u in v)this.types[u]=ln(this.types[u]||[],v[u])}},{key:"off",value:function(u,p){var v=Ce(u,p);for(u in v){var _=this.types[u];if(_&&_.length)for(var x=0,M=v[u];x<M.length;x++){var F=M[x],G=_.indexOf(F);G!==-1&&_.splice(G,1)}}}},{key:"getRect",value:function(u){return null}}]),c})(),Is=(function(){function c(u){s(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=u,H(this,u)}return l(c,[{key:"preventOriginalDefault",value:function(){this.originalEvent.preventDefault()}},{key:"stopPropagation",value:function(){this.originalEvent.stopPropagation()}},{key:"stopImmediatePropagation",value:function(){this.originalEvent.stopImmediatePropagation()}}]),c})();function Mn(c){return O.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function Fo(c,u){return c===u||(typeof c=="boolean"?!!u.capture===c&&!u.passive:!!c.capture==!!u.capture&&!!c.passive==!!u.passive)}var la={id:"events",install:function(c){var u,p=[],v={},_=[],x={add:M,remove:F,addDelegate:function(K,Se,Be,je,We){var Ge=Mn(We);if(!v[Be]){v[Be]=[];for(var tt=0;tt<_.length;tt++){var Xe=_[tt];M(Xe,Be,G),M(Xe,Be,me,!0)}}var it=v[Be],xt=gt(it,(function(Ot){return Ot.selector===K&&Ot.context===Se}));xt||(xt={selector:K,context:Se,listeners:[]},it.push(xt)),xt.listeners.push({func:je,options:Ge})},removeDelegate:function(K,Se,Be,je,We){var Ge,tt=Mn(We),Xe=v[Be],it=!1;if(Xe)for(Ge=Xe.length-1;Ge>=0;Ge--){var xt=Xe[Ge];if(xt.selector===K&&xt.context===Se){for(var Ot=xt.listeners,mt=Ot.length-1;mt>=0;mt--){var kt=Ot[mt];if(kt.func===je&&Fo(kt.options,tt)){Ot.splice(mt,1),Ot.length||(Xe.splice(Ge,1),F(Se,Be,G),F(Se,Be,me,!0)),it=!0;break}}if(it)break}}},delegateListener:G,delegateUseCapture:me,delegatedEvents:v,documents:_,targets:p,supportsOptions:!1,supportsPassive:!1};function M(K,Se,Be,je){if(K.addEventListener){var We=Mn(je),Ge=gt(p,(function(tt){return tt.eventTarget===K}));Ge||(Ge={eventTarget:K,events:{}},p.push(Ge)),Ge.events[Se]||(Ge.events[Se]=[]),gt(Ge.events[Se],(function(tt){return tt.func===Be&&Fo(tt.options,We)}))||(K.addEventListener(Se,Be,x.supportsOptions?We:We.capture),Ge.events[Se].push({func:Be,options:We}))}}function F(K,Se,Be,je){if(K.addEventListener&&K.removeEventListener){var We=Jn(p,(function(to){return to.eventTarget===K})),Ge=p[We];if(Ge&&Ge.events)if(Se!=="all"){var tt=!1,Xe=Ge.events[Se];if(Xe){if(Be==="all"){for(var it=Xe.length-1;it>=0;it--){var xt=Xe[it];F(K,Se,xt.func,xt.options)}return}for(var Ot=Mn(je),mt=0;mt<Xe.length;mt++){var kt=Xe[mt];if(kt.func===Be&&Fo(kt.options,Ot)){K.removeEventListener(Se,Be,x.supportsOptions?Ot:Ot.capture),Xe.splice(mt,1),Xe.length===0&&(delete Ge.events[Se],tt=!0);break}}}tt&&!Object.keys(Ge.events).length&&p.splice(We,1)}else for(Se in Ge.events)Ge.events.hasOwnProperty(Se)&&F(K,Se,"all")}}function G(K,Se){for(var Be=Mn(Se),je=new Is(K),We=v[K.type],Ge=Tn(K)[0],tt=Ge;O.element(tt);){for(var Xe=0;Xe<We.length;Xe++){var it=We[Xe],xt=it.selector,Ot=it.context;if(ve(tt,xt)&&X(Ot,Ge)&&X(Ot,tt)){var mt=it.listeners;je.currentTarget=tt;for(var kt=0;kt<mt.length;kt++){var to=mt[kt];Fo(to.options,Be)&&to.func(je)}}}tt=$e(tt)}}function me(K){return G(K,!0)}return(u=c.document)==null||u.createElement("div").addEventListener("test",null,{get capture(){return x.supportsOptions=!0},get passive(){return x.supportsPassive=!0}}),c.events=x,x}},xi={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var u=0,p=xi.methodOrder;u<p.length;u++){var v=p[u],_=xi[v](c);if(_)return _}return null},simulationResume:function(c){var u=c.pointerType,p=c.eventType,v=c.eventTarget,_=c.scope;if(!/down|start/i.test(p))return null;for(var x=0,M=_.interactions.list;x<M.length;x++){var F=M[x],G=v;if(F.simulation&&F.simulation.allowResume&&F.pointerType===u)for(;G;){if(G===F.element)return F;G=$e(G)}}return null},mouseOrPen:function(c){var u,p=c.pointerId,v=c.pointerType,_=c.eventType,x=c.scope;if(v!=="mouse"&&v!=="pen")return null;for(var M=0,F=x.interactions.list;M<F.length;M++){var G=F[M];if(G.pointerType===v){if(G.simulation&&!jl(G,p))continue;if(G.interacting())return G;u||(u=G)}}if(u)return u;for(var me=0,K=x.interactions.list;me<K.length;me++){var Se=K[me];if(!(Se.pointerType!==v||/down/i.test(_)&&Se.simulation))return Se}return null},hasPointer:function(c){for(var u=c.pointerId,p=0,v=c.scope.interactions.list;p<v.length;p++){var _=v[p];if(jl(_,u))return _}return null},idle:function(c){for(var u=c.pointerType,p=0,v=c.scope.interactions.list;p<v.length;p++){var _=v[p];if(_.pointers.length===1){var x=_.interactable;if(x&&(!x.options.gesture||!x.options.gesture.enabled))continue}else if(_.pointers.length>=2)continue;if(!_.interacting()&&u===_.pointerType)return _}return null}};function jl(c,u){return c.pointers.some((function(p){return p.id===u}))}var Yc=xi,wr=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Gl(c,u){return function(p){var v=u.interactions.list,_=An(p),x=Tn(p),M=x[0],F=x[1],G=[];if(/^touch/.test(p.type)){u.prevTouchTime=u.now();for(var me=0,K=p.changedTouches;me<K.length;me++){var Se=K[me],Be={pointer:Se,pointerId:Ke(Se),pointerType:_,eventType:p.type,eventTarget:M,curEventTarget:F,scope:u},je=ql(Be);G.push([Be.pointer,Be.eventTarget,Be.curEventTarget,je])}}else{var We=!1;if(!ie.supportsPointerEvent&&/mouse/.test(p.type)){for(var Ge=0;Ge<v.length&&!We;Ge++)We=v[Ge].pointerType!=="mouse"&&v[Ge].pointerIsDown;We=We||u.now()-u.prevTouchTime<500||p.timeStamp===0}if(!We){var tt={pointer:p,pointerId:Ke(p),pointerType:_,eventType:p.type,curEventTarget:F,eventTarget:M,scope:u},Xe=ql(tt);G.push([tt.pointer,tt.eventTarget,tt.curEventTarget,Xe])}}for(var it=0;it<G.length;it++){var xt=G[it],Ot=xt[0],mt=xt[1],kt=xt[2];xt[3][c](Ot,p,mt,kt)}}}function ql(c){var u=c.pointerType,p=c.scope,v={interaction:Yc.search(c),searchDetails:c};return p.fire("interactions:find",v),v.interaction||p.interactions.new({pointerType:u})}function Vn(c,u){var p=c.doc,v=c.scope,_=c.options,x=v.interactions.docEvents,M=v.events,F=M[u];for(var G in v.browser.isIOS&&!_.events&&(_.events={passive:!1}),M.delegatedEvents)F(p,G,M.delegateListener),F(p,G,M.delegateUseCapture,!0);for(var me=_&&_.events,K=0;K<x.length;K++){var Se=x[K];F(p,Se.type,Se.listener,me)}}var Kc={id:"core/interactions",install:function(c){for(var u={},p=0;p<wr.length;p++){var v=wr[p];u[v]=Gl(v,c)}var _,x=ie.pEventTypes;function M(){for(var F=0,G=c.interactions.list;F<G.length;F++){var me=G[F];if(me.pointerIsDown&&me.pointerType==="touch"&&!me._interacting)for(var K=function(){var je=Be[Se];c.documents.some((function(We){return X(We.doc,je.downTarget)}))||me.removePointer(je.pointer,je.event)},Se=0,Be=me.pointers;Se<Be.length;Se++)K()}}(_=ne.PointerEvent?[{type:x.down,listener:M},{type:x.down,listener:u.pointerDown},{type:x.move,listener:u.pointerMove},{type:x.up,listener:u.pointerUp},{type:x.cancel,listener:u.pointerUp}]:[{type:"mousedown",listener:u.pointerDown},{type:"mousemove",listener:u.pointerMove},{type:"mouseup",listener:u.pointerUp},{type:"touchstart",listener:M},{type:"touchstart",listener:u.pointerDown},{type:"touchmove",listener:u.pointerMove},{type:"touchend",listener:u.pointerUp},{type:"touchcancel",listener:u.pointerUp}]).push({type:"blur",listener:function(F){for(var G=0,me=c.interactions.list;G<me.length;G++)me[G].documentBlur(F)}}),c.prevTouchTime=0,c.Interaction=(function(F){g(me,F);var G=b(me);function me(){return s(this,me),G.apply(this,arguments)}return l(me,[{key:"pointerMoveTolerance",get:function(){return c.interactions.pointerMoveTolerance},set:function(K){c.interactions.pointerMoveTolerance=K}},{key:"_now",value:function(){return c.now()}}]),me})(un),c.interactions={list:[],new:function(F){F.scopeFire=function(me,K){return c.fire(me,K)};var G=new c.Interaction(F);return c.interactions.list.push(G),G},listeners:u,docEvents:_,pointerMoveTolerance:1},c.usePlugin(Ma)},listeners:{"scope:add-document":function(c){return Vn(c,"add")},"scope:remove-document":function(c){return Vn(c,"remove")},"interactable:unset":function(c,u){for(var p=c.interactable,v=u.interactions.list.length-1;v>=0;v--){var _=u.interactions.list[v];_.interactable===p&&(_.stop(),u.fire("interactions:destroy",{interaction:_}),_.destroy(),u.interactions.list.length>2&&u.interactions.list.splice(v,1))}}},onDocSignal:Vn,doOnInteractions:Gl,methodNames:wr},Jc=Kc,ua=(function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c})(ua||{}),Xc=(function(){function c(u,p,v,_){s(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ls,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=p.actions,this.target=u,this._context=p.context||v,this._win=D(oe(u)?this._context:u),this._doc=this._win.document,this._scopeEvents=_,this.set(p)}return l(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(u,p){return O.func(p.onstart)&&this.on("".concat(u,"start"),p.onstart),O.func(p.onmove)&&this.on("".concat(u,"move"),p.onmove),O.func(p.onend)&&this.on("".concat(u,"end"),p.onend),O.func(p.oninertiastart)&&this.on("".concat(u,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(u,p,v){var _,x=this,M=(_=this._actions.map[u])==null?void 0:_.filterEventType,F=function(G){return(M==null||M(G))&&Zn(G,x._actions)};(O.array(p)||O.object(p))&&this._onOff(ua.Off,u,p,void 0,F),(O.array(v)||O.object(v))&&this._onOff(ua.On,u,v,void 0,F)}},{key:"setPerAction",value:function(u,p){var v=this._defaults;for(var _ in p){var x=_,M=this.options[u],F=p[x];x==="listeners"&&this.updatePerActionListeners(u,M.listeners,F),O.array(F)?M[x]=Kn(F):O.plainObject(F)?(M[x]=B(M[x]||{},No(F)),O.object(v.perAction[x])&&"enabled"in v.perAction[x]&&(M[x].enabled=F.enabled!==!1)):O.bool(F)&&O.object(v.perAction[x])?M[x].enabled=F:M[x]=F}}},{key:"getRect",value:function(u){return u=u||(O.element(this.target)?this.target:null),O.string(this.target)&&(u=u||this._context.querySelector(this.target)),re(u)}},{key:"rectChecker",value:function(u){var p=this;return O.func(u)?(this.getRect=function(v){var _=B({},u.apply(p,v));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):u===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(u,p){if(oe(p)||O.object(p)){for(var v in this.options[u]=p,this._actions.map)this.options[v][u]=p;return this}return this.options[u]}},{key:"origin",value:function(u){return this._backCompatOption("origin",u)}},{key:"deltaSource",value:function(u){return u==="page"||u==="client"?(this.options.deltaSource=u,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var u=this.target;return O.string(u)?Array.from(this._context.querySelectorAll(u)):O.func(u)&&u.getAllElements?u.getAllElements():O.element(u)?[u]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(u){return this._context===u.ownerDocument||X(this._context,u)}},{key:"testIgnoreAllow",value:function(u,p,v){return!this.testIgnore(u.ignoreFrom,p,v)&&this.testAllow(u.allowFrom,p,v)}},{key:"testAllow",value:function(u,p,v){return!u||!!O.element(v)&&(O.string(u)?be(v,u,p):!!O.element(u)&&X(u,v))}},{key:"testIgnore",value:function(u,p,v){return!(!u||!O.element(v))&&(O.string(u)?be(v,u,p):!!O.element(u)&&X(u,v))}},{key:"fire",value:function(u){return this.events.fire(u),this}},{key:"_onOff",value:function(u,p,v,_,x){O.object(p)&&!O.array(p)&&(_=v,v=null);var M=Ce(p,v,x);for(var F in M){F==="wheel"&&(F=ie.wheelEvent);for(var G=0,me=M[F];G<me.length;G++){var K=me[G];Zn(F,this._actions)?this.events[u===ua.On?"on":"off"](F,K):O.string(this.target)?this._scopeEvents[u===ua.On?"addDelegate":"removeDelegate"](this.target,this._context,F,K,_):this._scopeEvents[u===ua.On?"add":"remove"](this.target,F,K,_)}}return this}},{key:"on",value:function(u,p,v){return this._onOff(ua.On,u,p,v)}},{key:"off",value:function(u,p,v){return this._onOff(ua.Off,u,p,v)}},{key:"set",value:function(u){var p=this._defaults;for(var v in O.object(u)||(u={}),this.options=No(p.base),this._actions.methodDict){var _=v,x=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,B(B({},p.perAction),p.actions[_])),this[x](u[_])}for(var M in u)M!=="getRect"?O.func(this[M])&&this[M](u[M]):this.rectChecker(u.getRect);return this}},{key:"unset",value:function(){if(O.string(this.target))for(var u in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[u],v=p.length-1;v>=0;v--){var _=p[v],x=_.selector,M=_.context,F=_.listeners;x===this.target&&M===this._context&&p.splice(v,1);for(var G=F.length-1;G>=0;G--)this._scopeEvents.removeDelegate(this.target,this._context,u,F[G][0],F[G][1])}else this._scopeEvents.remove(this.target,"all")}}]),c})(),Qc=(function(){function c(u){var p=this;s(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=u,u.addListeners({"interactable:unset":function(v){var _=v.interactable,x=_.target,M=O.string(x)?p.selectorMap[x]:x[p.scope.id],F=Jn(M,(function(G){return G===_}));M.splice(F,1)}})}return l(c,[{key:"new",value:function(u,p){p=B(p||{},{actions:this.scope.actions});var v=new this.scope.Interactable(u,p,this.scope.document,this.scope.events);return this.scope.addDocument(v._doc),this.list.push(v),O.string(u)?(this.selectorMap[u]||(this.selectorMap[u]=[]),this.selectorMap[u].push(v)):(v.target[this.scope.id]||Object.defineProperty(u,this.scope.id,{value:[],configurable:!0}),u[this.scope.id].push(v)),this.scope.fire("interactable:new",{target:u,options:p,interactable:v,win:this.scope._win}),v}},{key:"getExisting",value:function(u,p){var v=p&&p.context||this.scope.document,_=O.string(u),x=_?this.selectorMap[u]:u[this.scope.id];if(x)return gt(x,(function(M){return M._context===v&&(_||M.inContext(u))}))}},{key:"forEachMatch",value:function(u,p){for(var v=0,_=this.list;v<_.length;v++){var x=_[v],M=void 0;if((O.string(x.target)?O.element(u)&&ve(u,x.target):u===x.target)&&x.inContext(u)&&(M=p(x)),M!==void 0)return M}}}]),c})(),ls=(function(){function c(){var u=this;s(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=ie,this.defaults=No(ae),this.Eventable=Ls,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=(function(v){var _=function x(M,F){var G=v.interactables.getExisting(M,F);return G||((G=v.interactables.new(M,F)).events.global=x.globalEvents),G};return _.getPointerAverage=ft,_.getTouchBBox=at,_.getTouchDistance=rn,_.getTouchAngle=Rt,_.getElementRect=re,_.getElementClientRect=he,_.matchesSelector=ve,_.closest=ee,_.globalEvents={},_.version="1.10.27",_.scope=v,_.use=function(x,M){return this.scope.usePlugin(x,M),this},_.isSet=function(x,M){return!!this.scope.interactables.get(x,M&&M.context)},_.on=aa((function(x,M,F){if(O.string(x)&&x.search(" ")!==-1&&(x=x.trim().split(/ +/)),O.array(x)){for(var G=0,me=x;G<me.length;G++){var K=me[G];this.on(K,M,F)}return this}if(O.object(x)){for(var Se in x)this.on(Se,x[Se],M);return this}return Zn(x,this.scope.actions)?this.globalEvents[x]?this.globalEvents[x].push(M):this.globalEvents[x]=[M]:this.scope.events.add(this.scope.document,x,M,{options:F}),this}),"The interact.on() method is being deprecated"),_.off=aa((function(x,M,F){if(O.string(x)&&x.search(" ")!==-1&&(x=x.trim().split(/ +/)),O.array(x)){for(var G=0,me=x;G<me.length;G++){var K=me[G];this.off(K,M,F)}return this}if(O.object(x)){for(var Se in x)this.off(Se,x[Se],M);return this}var Be;return Zn(x,this.scope.actions)?x in this.globalEvents&&(Be=this.globalEvents[x].indexOf(M))!==-1&&this.globalEvents[x].splice(Be,1):this.scope.events.remove(this.scope.document,x,M,F),this}),"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return ie.supportsTouch},_.supportsPointerEvent=function(){return ie.supportsPointerEvent},_.stop=function(){for(var x=0,M=this.scope.interactions.list;x<M.length;x++)M[x].stop();return this},_.pointerMoveTolerance=function(x){return O.number(x)?(this.scope.interactions.pointerMoveTolerance=x,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(x,M){this.scope.addDocument(x,M)},_.removeDocument=function(x){this.scope.removeDocument(x)},_})(this),this.InteractEvent=ye,this.Interactable=void 0,this.interactables=new Qc(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(v){return u.removeDocument(v.target)};var p=this;this.Interactable=(function(v){g(x,v);var _=b(x);function x(){return s(this,x),_.apply(this,arguments)}return l(x,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(M){return T(f(x.prototype),"set",this).call(this,M),p.fire("interactable:set",{options:M,interactable:this}),this}},{key:"unset",value:function(){T(f(x.prototype),"unset",this).call(this);var M=p.interactables.list.indexOf(this);M<0||(p.interactables.list.splice(M,1),p.fire("interactable:unset",{interactable:this}))}}]),x})(Xc)}return l(c,[{key:"addListeners",value:function(u,p){this.listenerMaps.push({id:p,map:u})}},{key:"fire",value:function(u,p){for(var v=0,_=this.listenerMaps;v<_.length;v++){var x=_[v].map[u];if(x&&x(p,this,u)===!1)return!1}}},{key:"init",value:function(u){return this.isInitialized?this:(function(p,v){return p.isInitialized=!0,O.window(v)&&pe(v),ne.init(v),ie.init(v),co.init(v),p.window=v,p.document=v.document,p.usePlugin(Jc),p.usePlugin(la),p})(this,u)}},{key:"pluginIsInstalled",value:function(u){var p=u.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(u)!==-1}},{key:"usePlugin",value:function(u,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(u))return this;if(u.id&&(this._plugins.map[u.id]=u),this._plugins.list.push(u),u.install&&u.install(this,p),u.listeners&&u.before){for(var v=0,_=this.listenerMaps.length,x=u.before.reduce((function(F,G){return F[G]=!0,F[Yl(G)]=!0,F}),{});v<_;v++){var M=this.listenerMaps[v].id;if(M&&(x[M]||x[Yl(M)]))break}this.listenerMaps.splice(v,0,{id:u.id,map:u.listeners})}else u.listeners&&this.listenerMaps.push({id:u.id,map:u.listeners});return this}},{key:"addDocument",value:function(u,p){if(this.getDocIndex(u)!==-1)return!1;var v=D(u);p=p?B({},p):{},this.documents.push({doc:u,options:p}),this.events.documents.push(u),u!==this.document&&this.events.add(v,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:u,window:v,scope:this,options:p})}},{key:"removeDocument",value:function(u){var p=this.getDocIndex(u),v=D(u),_=this.documents[p].options;this.events.remove(v,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:u,window:v,scope:this,options:_})}},{key:"getDocIndex",value:function(u){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===u)return p;return-1}},{key:"getDocOptions",value:function(u){var p=this.getDocIndex(u);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c})();function Yl(c){return c&&c.replace(/\/.*$/,"")}var Kl=new ls,On=Kl.interactStatic,Zc=typeof globalThis<"u"?globalThis:window;Kl.init(Zc);var Si=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var u=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter((function(v){var _=v[0],x=v[1];return _ in c||x in c})),p=function(v,_){for(var x=c.range,M=c.limits,F=M===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:M,G=c.offset,me=G===void 0?{x:0,y:0}:G,K={range:x,grid:c,x:null,y:null},Se=0;Se<u.length;Se++){var Be=u[Se],je=Be[0],We=Be[1],Ge=Math.round((v-me.x)/c[je]),tt=Math.round((_-me.y)/c[We]);K[je]=Math.max(F.left,Math.min(F.right,Ge*c[je]+me.x)),K[We]=Math.max(F.top,Math.min(F.bottom,tt*c[We]+me.y))}return K};return p.grid=c,p.coordFields=u,p}}),ed={id:"snappers",install:function(c){var u=c.interactStatic;u.snappers=B(u.snappers||{},Si),u.createSnapGrid=u.snappers.grid}},td=ed,nd={start:function(c){var u=c.state,p=c.rect,v=c.edges,_=c.pageCoords,x=u.options,M=x.ratio,F=x.enabled,G=u.options,me=G.equalDelta,K=G.modifiers;M==="preserve"&&(M=p.width/p.height),u.startCoords=B({},_),u.startRect=B({},p),u.ratio=M,u.equalDelta=me;var Se=u.linkedEdges={top:v.top||v.left&&!v.bottom,left:v.left||v.top&&!v.right,bottom:v.bottom||v.right&&!v.top,right:v.right||v.bottom&&!v.left};if(u.xIsPrimaryAxis=!(!v.left&&!v.right),u.equalDelta){var Be=(Se.left?1:-1)*(Se.top?1:-1);u.edgeSign={x:Be,y:Be}}else u.edgeSign={x:Se.left?-1:1,y:Se.top?-1:1};if(F!==!1&&B(v,Se),K!=null&&K.length){var je=new ra(c.interaction);je.copyFrom(c.interaction.modification),je.prepareStates(K),u.subModification=je,je.startAll(o({},c))}},set:function(c){var u=c.state,p=c.rect,v=c.coords,_=u.linkedEdges,x=B({},v),M=u.equalDelta?od:U;if(B(c.edges,_),M(u,u.xIsPrimaryAxis,v,p),!u.subModification)return null;var F=B({},p);W(_,F,{x:v.x-x.x,y:v.y-x.y});var G=u.subModification.setAll(o(o({},c),{},{rect:F,edges:_,pageCoords:v,prevCoords:v,prevRect:F})),me=G.delta;return G.changed&&(M(u,Math.abs(me.x)>Math.abs(me.y),G.coords,G.rect),B(v,G.coords)),G.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function od(c,u,p){var v=c.startCoords,_=c.edgeSign;u?p.y=v.y+(p.x-v.x)*_.y:p.x=v.x+(p.y-v.y)*_.x}function U(c,u,p,v){var _=c.startRect,x=c.startCoords,M=c.ratio,F=c.edgeSign;if(u){var G=v.width/M;p.y=x.y+(G-_.height)*F.y}else{var me=v.height*M;p.x=x.x+(me-_.width)*F.x}}var R=bo(nd,"aspectRatio"),ke=function(){};ke._defaults={};var Oe=ke;function Qe(c,u,p){return O.func(c)?Y(c,u.interactable,u.element,[p.x,p.y,u]):Y(c,u.interactable,u.element)}var Me={start:function(c){var u=c.rect,p=c.startOffset,v=c.state,_=c.interaction,x=c.pageCoords,M=v.options,F=M.elementRect,G=B({left:0,top:0,right:0,bottom:0},M.offset||{});if(u&&F){var me=Qe(M.restriction,_,x);if(me){var K=me.right-me.left-u.width,Se=me.bottom-me.top-u.height;K<0&&(G.left+=K,G.right+=K),Se<0&&(G.top+=Se,G.bottom+=Se)}G.left+=p.left-u.width*F.left,G.top+=p.top-u.height*F.top,G.right+=p.right-u.width*(1-F.right),G.bottom+=p.bottom-u.height*(1-F.bottom)}v.offset=G},set:function(c){var u=c.coords,p=c.interaction,v=c.state,_=v.options,x=v.offset,M=Qe(_.restriction,p,u);if(M){var F=(function(G){return!G||"left"in G&&"top"in G||((G=B({},G)).left=G.x||0,G.top=G.y||0,G.right=G.right||G.left+G.width,G.bottom=G.bottom||G.top+G.height),G})(M);u.x=Math.max(Math.min(F.right-x.right,u.x),F.left+x.left),u.y=Math.max(Math.min(F.bottom-x.bottom,u.y),F.top+x.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},He=bo(Me,"restrict"),Je={top:1/0,left:1/0,bottom:-1/0,right:-1/0},ht={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function Ct(c,u){for(var p=0,v=["top","left","bottom","right"];p<v.length;p++){var _=v[p];_ in c||(c[_]=u[_])}return c}var Tt={noInner:Je,noOuter:ht,start:function(c){var u,p=c.interaction,v=c.startOffset,_=c.state,x=_.options;x&&(u=$(Qe(x.offset,p,p.coords.start.page))),u=u||{x:0,y:0},_.offset={top:u.y+v.top,left:u.x+v.left,bottom:u.y-v.bottom,right:u.x-v.right}},set:function(c){var u=c.coords,p=c.edges,v=c.interaction,_=c.state,x=_.offset,M=_.options;if(p){var F=B({},u),G=Qe(M.inner,v,F)||{},me=Qe(M.outer,v,F)||{};Ct(G,Je),Ct(me,ht),p.top?u.y=Math.min(Math.max(me.top+x.top,F.y),G.top+x.top):p.bottom&&(u.y=Math.max(Math.min(me.bottom+x.bottom,F.y),G.bottom+x.bottom)),p.left?u.x=Math.min(Math.max(me.left+x.left,F.x),G.left+x.left):p.right&&(u.x=Math.max(Math.min(me.right+x.right,F.x),G.right+x.right))}},defaults:{inner:null,outer:null,offset:null,endOnly:!1,enabled:!1}},gn=bo(Tt,"restrictEdges"),pn=B({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},Me.defaults),bt=bo({start:Me.start,set:Me.set,defaults:pn},"restrictRect"),Bt={width:-1/0,height:-1/0},At={width:1/0,height:1/0},Et=bo({start:function(c){return Tt.start(c)},set:function(c){var u=c.interaction,p=c.state,v=c.rect,_=c.edges,x=p.options;if(_){var M=A(Qe(x.min,u,c.coords))||Bt,F=A(Qe(x.max,u,c.coords))||At;p.options={endOnly:x.endOnly,inner:B({},Tt.noInner),outer:B({},Tt.noOuter)},_.top?(p.options.inner.top=v.bottom-M.height,p.options.outer.top=v.bottom-F.height):_.bottom&&(p.options.inner.bottom=v.top+M.height,p.options.outer.bottom=v.top+F.height),_.left?(p.options.inner.left=v.right-M.width,p.options.outer.left=v.right-F.width):_.right&&(p.options.inner.right=v.left+M.width,p.options.outer.right=v.left+F.width),Tt.set(c),p.options=x}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),jt={start:function(c){var u,p=c.interaction,v=c.interactable,_=c.element,x=c.rect,M=c.state,F=c.startOffset,G=M.options,me=G.offsetWithOrigin?(function(Be){var je=Be.interaction.element,We=$(Y(Be.state.options.origin,null,null,[je])),Ge=We||ce(Be.interactable,je,Be.interaction.prepared.name);return Ge})(c):{x:0,y:0};if(G.offset==="startCoords")u={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var K=Y(G.offset,v,_,[p]);(u=$(K)||{x:0,y:0}).x+=me.x,u.y+=me.y}var Se=G.relativePoints;M.offsets=x&&Se&&Se.length?Se.map((function(Be,je){return{index:je,relativePoint:Be,x:F.left-x.width*Be.x+u.x,y:F.top-x.height*Be.y+u.y}})):[{index:0,relativePoint:null,x:u.x,y:u.y}]},set:function(c){var u=c.interaction,p=c.coords,v=c.state,_=v.options,x=v.offsets,M=ce(u.interactable,u.element,u.prepared.name),F=B({},p),G=[];_.offsetWithOrigin||(F.x-=M.x,F.y-=M.y);for(var me=0,K=x;me<K.length;me++)for(var Se=K[me],Be=F.x-Se.x,je=F.y-Se.y,We=0,Ge=_.targets.length;We<Ge;We++){var tt=_.targets[We],Xe=void 0;(Xe=O.func(tt)?tt(Be,je,u._proxy,Se,We):tt)&&G.push({x:(O.number(Xe.x)?Xe.x:Be)+Se.x,y:(O.number(Xe.y)?Xe.y:je)+Se.y,range:O.number(Xe.range)?Xe.range:_.range,source:tt,index:We,offset:Se})}for(var it={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},xt=0;xt<G.length;xt++){var Ot=G[xt],mt=Ot.range,kt=Ot.x-F.x,to=Ot.y-F.y,mn=z(kt,to),wo=mn<=mt;mt===1/0&&it.inRange&&it.range!==1/0&&(wo=!1),it.target&&!(wo?it.inRange&&mt!==1/0?mn/mt<it.distance/it.range:mt===1/0&&it.range!==1/0||mn<it.distance:!it.inRange&&mn<it.distance)||(it.target=Ot,it.distance=mn,it.range=mt,it.inRange=wo,it.delta.x=kt,it.delta.y=to)}return it.inRange&&(p.x=it.target.x,p.y=it.target.y),v.closest=it,it},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},Jt=bo(jt,"snap"),yn={start:function(c){var u=c.state,p=c.edges,v=u.options;if(!p)return null;c.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:v.offset||"self",origin:{x:0,y:0},range:v.range}},u.targetFields=u.targetFields||[["width","height"],["x","y"]],jt.start(c),u.offsets=c.state.offsets,c.state=u},set:function(c){var u=c.interaction,p=c.state,v=c.coords,_=p.options,x=p.offsets,M={x:v.x-x[0].x,y:v.y-x[0].y};p.options=B({},_),p.options.targets=[];for(var F=0,G=_.targets||[];F<G.length;F++){var me=G[F],K=void 0;if(K=O.func(me)?me(M.x,M.y,u):me){for(var Se=0,Be=p.targetFields;Se<Be.length;Se++){var je=Be[Se],We=je[0],Ge=je[1];if(We in K||Ge in K){K.x=K[We],K.y=K[Ge];break}}p.options.targets.push(K)}}var tt=jt.set(c);return p.options=_,tt},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},Ms=bo(yn,"snapSize"),Oa={aspectRatio:R,restrictEdges:gn,restrict:He,restrictRect:bt,restrictSize:Et,snapEdges:bo({start:function(c){var u=c.edges;return u?(c.state.targetFields=c.state.targetFields||[[u.left?"left":"right",u.top?"top":"bottom"]],yn.start(c)):null},set:yn.set,defaults:B(No(yn.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:Jt,snapSize:Ms,spring:Oe,avoid:Oe,transform:Oe,rubberband:Oe},Jl={id:"modifiers",install:function(c){var u=c.interactStatic;for(var p in c.usePlugin(_e),c.usePlugin(td),u.modifiers=Oa,Oa){var v=Oa[p],_=v._defaults,x=v._methods;_._methods=x,c.defaults.perAction[p]=_}}},Bo=Jl,Xl=(function(c){g(p,c);var u=b(p);function p(v,_,x,M,F,G){var me;if(s(this,p),H(w(me=u.call(this,F)),x),x!==_&&H(w(me),_),me.timeStamp=G,me.originalEvent=x,me.type=v,me.pointerId=Ke(_),me.pointerType=An(_),me.target=M,me.currentTarget=null,v==="tap"){var K=F.getPointerIndex(_);me.dt=me.timeStamp-F.pointers[K].downTime;var Se=me.timeStamp-F.tapTime;me.double=!!F.prevTap&&F.prevTap.type!=="doubletap"&&F.prevTap.target===me.target&&Se<500}else v==="doubletap"&&(me.dt=_.timeStamp-F.tapTime,me.double=!0);return me}return l(p,[{key:"_subtractOrigin",value:function(v){var _=v.x,x=v.y;return this.pageX-=_,this.pageY-=x,this.clientX-=_,this.clientY-=x,this}},{key:"_addOrigin",value:function(v){var _=v.x,x=v.y;return this.pageX+=_,this.pageY+=x,this.clientX+=_,this.clientY+=x,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p})(Xt),us={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=us,c.defaults.actions.pointerEvents=us.defaults,B(c.actions.phaselessTypes,us.types)},listeners:{"interactions:new":function(c){var u=c.interaction;u.prevTap=null,u.tapTime=0},"interactions:update-pointer":function(c){var u=c.down,p=c.pointerInfo;!u&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(c,u){var p=c.interaction,v=c.pointer,_=c.event,x=c.eventTarget;c.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&ad(c),ca({interaction:p,pointer:v,event:_,eventTarget:x,type:"move"},u))},"interactions:down":function(c,u){(function(p,v){for(var _=p.interaction,x=p.pointer,M=p.event,F=p.eventTarget,G=p.pointerIndex,me=_.pointers[G].hold,K=j(F),Se={interaction:_,pointer:x,event:M,eventTarget:F,type:"hold",targets:[],path:K,node:null},Be=0;Be<K.length;Be++){var je=K[Be];Se.node=je,v.fire("pointerEvents:collect-targets",Se)}if(Se.targets.length){for(var We=1/0,Ge=0,tt=Se.targets;Ge<tt.length;Ge++){var Xe=tt[Ge].eventable.options.holdDuration;Xe<We&&(We=Xe)}me.duration=We,me.timeout=setTimeout((function(){ca({interaction:_,eventTarget:F,pointer:x,event:M,type:"hold"},v)}),We)}})(c,u),ca(c,u)},"interactions:up":function(c,u){ad(c),ca(c,u),(function(p,v){var _=p.interaction,x=p.pointer,M=p.event,F=p.eventTarget;_.pointerWasMoved||ca({interaction:_,eventTarget:F,pointer:x,event:M,type:"tap"},v)})(c,u)},"interactions:cancel":function(c,u){ad(c),ca(c,u)}},PointerEvent:Xl,fire:ca,collectEventTargets:Yv,defaults:{holdDuration:600,ignoreFrom:null,allowFrom:null,origin:{x:0,y:0}},types:{down:!0,move:!0,up:!0,cancel:!0,tap:!0,doubletap:!0,hold:!0}};function ca(c,u){var p=c.interaction,v=c.pointer,_=c.event,x=c.eventTarget,M=c.type,F=c.targets,G=F===void 0?Yv(c,u):F,me=new Xl(M,v,_,x,p,u.now());u.fire("pointerEvents:new",{pointerEvent:me});for(var K={interaction:p,pointer:v,event:_,eventTarget:x,targets:G,type:M,pointerEvent:me},Se=0;Se<G.length;Se++){var Be=G[Se];for(var je in Be.props||{})me[je]=Be.props[je];var We=ce(Be.eventable,Be.node);if(me._subtractOrigin(We),me.eventable=Be.eventable,me.currentTarget=Be.node,Be.eventable.fire(me),me._addOrigin(We),me.immediatePropagationStopped||me.propagationStopped&&Se+1<G.length&&G[Se+1].node!==me.currentTarget)break}if(u.fire("pointerEvents:fired",K),M==="tap"){var Ge=me.double?ca({interaction:p,pointer:v,event:_,eventTarget:x,type:"doubletap"},u):me;p.prevTap=Ge,p.tapTime=Ge.timeStamp}return me}function Yv(c,u){var p=c.interaction,v=c.pointer,_=c.event,x=c.eventTarget,M=c.type,F=p.getPointerIndex(v),G=p.pointers[F];if(M==="tap"&&(p.pointerWasMoved||!G||G.downTarget!==x))return[];for(var me=j(x),K={interaction:p,pointer:v,event:_,eventTarget:x,type:M,path:me,targets:[],node:null},Se=0;Se<me.length;Se++){var Be=me[Se];K.node=Be,u.fire("pointerEvents:collect-targets",K)}return M==="hold"&&(K.targets=K.targets.filter((function(je){var We,Ge;return je.eventable.options.holdDuration===((We=p.pointers[F])==null||(Ge=We.hold)==null?void 0:Ge.duration)}))),K.targets}function ad(c){var u=c.interaction,p=c.pointerIndex,v=u.pointers[p].hold;v&&v.timeout&&(clearTimeout(v.timeout),v.timeout=null)}var gD=Object.freeze({__proto__:null,default:us});function mD(c){var u=c.interaction;u.holdIntervalHandle&&(clearInterval(u.holdIntervalHandle),u.holdIntervalHandle=null)}var vD={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(us);var u=c.pointerEvents;u.defaults.holdRepeatInterval=0,u.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce((function(c,u){return c["pointerEvents:".concat(u)]=mD,c}),{"pointerEvents:new":function(c){var u=c.pointerEvent;u.type==="hold"&&(u.count=(u.count||0)+1)},"pointerEvents:fired":function(c,u){var p=c.interaction,v=c.pointerEvent,_=c.eventTarget,x=c.targets;if(v.type==="hold"&&x.length){var M=x[0].eventable.options.holdRepeatInterval;M<=0||(p.holdIntervalHandle=setTimeout((function(){u.pointerEvents.fire({interaction:p,eventTarget:_,type:"hold",pointer:v,event:v},u)}),M))}}})},hD=vD,_D={id:"pointer-events/interactableTargets",install:function(c){var u=c.Interactable;u.prototype.pointerEvents=function(v){return B(this.events.options,v),this};var p=u.prototype._backCompatOption;u.prototype._backCompatOption=function(v,_){var x=p.call(this,v,_);return x===this&&(this.events.options[v]=_),x}},listeners:{"pointerEvents:collect-targets":function(c,u){var p=c.targets,v=c.node,_=c.type,x=c.eventTarget;u.interactables.forEachMatch(v,(function(M){var F=M.events,G=F.options;F.types[_]&&F.types[_].length&&M.testIgnoreAllow(G,v,x)&&p.push({node:v,eventable:F,props:{interactable:M}})}))},"interactable:new":function(c){var u=c.interactable;u.events.getRect=function(p){return u.getRect(p)}},"interactable:set":function(c,u){var p=c.interactable,v=c.options;B(p.events.options,u.pointerEvents.defaults),B(p.events.options,v.pointerEvents||{})}}},yD=_D,bD={id:"pointer-events",install:function(c){c.usePlugin(gD),c.usePlugin(hD),c.usePlugin(yD)}},wD=bD,xD={id:"reflow",install:function(c){var u=c.Interactable;c.actions.phases.reflow=!0,u.prototype.reflow=function(p){return(function(v,_,x){for(var M=v.getAllElements(),F=x.window.Promise,G=F?[]:null,me=function(){var Se=M[K],Be=v.getRect(Se);if(!Be)return 1;var je,We=gt(x.interactions.list,(function(Xe){return Xe.interacting()&&Xe.interactable===v&&Xe.element===Se&&Xe.prepared.name===_.name}));if(We)We.move(),G&&(je=We._reflowPromise||new F((function(Xe){We._reflowResolve=Xe})));else{var Ge=A(Be),tt=(function(Xe){return{coords:Xe,get page(){return this.coords.page},get client(){return this.coords.client},get timeStamp(){return this.coords.timeStamp},get pageX(){return this.coords.page.x},get pageY(){return this.coords.page.y},get clientX(){return this.coords.client.x},get clientY(){return this.coords.client.y},get pointerId(){return this.coords.pointerId},get target(){return this.coords.target},get type(){return this.coords.type},get pointerType(){return this.coords.pointerType},get buttons(){return this.coords.buttons},preventDefault:function(){}}})({page:{x:Ge.x,y:Ge.y},client:{x:Ge.x,y:Ge.y},timeStamp:x.now()});je=(function(Xe,it,xt,Ot,mt){var kt=Xe.interactions.new({pointerType:"reflow"}),to={interaction:kt,event:mt,pointer:mt,eventTarget:xt,phase:"reflow"};kt.interactable=it,kt.element=xt,kt.prevEvent=mt,kt.updatePointer(mt,mt,xt,!0),Ne(kt.coords.delta),Qn(kt.prepared,Ot),kt._doPhase(to);var mn=Xe.window,wo=mn.Promise,Uo=wo?new wo((function(Da){kt._reflowResolve=Da})):void 0;return kt._reflowPromise=Uo,kt.start(Ot,it,xt),kt._interacting?(kt.move(to),kt.end(mt)):(kt.stop(),kt._reflowResolve()),kt.removePointer(mt,mt),Uo})(x,v,Se,_,tt)}G&&G.push(je)},K=0;K<M.length&&!me();K++);return G&&F.all(G).then((function(){return v}))})(this,p,c)}},listeners:{"interactions:stop":function(c,u){var p=c.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),(function(v,_){v.splice(v.indexOf(_),1)})(u.interactions.list,p))}}},SD=xD;if(On.use(Ma),On.use(Ul),On.use(wD),On.use(Hl),On.use(Bo),On.use(_r),On.use(Xn),On.use(ts),On.use(SD),On.default=On,a(e)==="object"&&e)try{e.exports=On}catch{}return On.default=On,On}))})(Qr,Qr.exports)),Qr.exports}var I2=L2();const Ig=Ag(I2),Vt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},M2={class:"weilin_prompt_ui_window-title"},O2=["title"],D2=["title"],P2=["title"],R2=["title"],ho=Vt({__name:"DraggableWindow",props:{title:{type:String,required:!0},position:{type:Object,required:!0},size:{type:Object,required:!0},zIndex:{type:Number,default:1},name:{type:String,default:"default_window_name"}},emits:["update:position","update:size","active","close"],setup(e,{emit:t}){const n=e,{t:o}=Kt(),a=t,s=S(null);let i=null,l=null;const d=S({x:0,y:0}),g=S({width:600,height:400});St(()=>n.position,V=>{V&&(d.value={...V})},{immediate:!0,deep:!0}),St(()=>n.size,V=>{V&&(g.value={...V})},{immediate:!0,deep:!0});let f=null;const m=()=>{f||(f=setTimeout(()=>{window.parent.postMessage({type:`weilin_prompt_ui_window_change_${n.name}_scroll`},"*"),f=null},100))},w=(V,fe,O=g.value.width)=>{const se=window.innerWidth,le=window.innerHeight;return{x:Math.min(Math.max(100-O,V),se-100),y:Math.min(Math.max(100,fe),le-100)}},b=()=>{l&&(l.stop(),l=null)},T=V=>{var O;return((V==null?void 0:V.buttons)??((O=V==null?void 0:V.originalEvent)==null?void 0:O.buttons))===0},E=V=>T(V)?(b(),!0):!1,I=()=>{b()},P=()=>{s.value&&(i=Ig(s.value).draggable({allowFrom:".weilin_prompt_ui_window-header",ignoreFrom:".weilin_prompt_ui_close-btn,.weilin_prompt_ui_resize-handle",listeners:{start(V){l=V.interaction},move(V){if(E(V))return;const fe=w(d.value.x+V.dx,d.value.y+V.dy);d.value=fe,a("update:position",fe)},end(){l=null}}}).resizable({edges:{top:".weilin_prompt_ui_resize-handle-nw, .weilin_prompt_ui_resize-handle-ne",right:".weilin_prompt_ui_resize-handle-ne, .weilin_prompt_ui_resize-handle-se",bottom:".weilin_prompt_ui_resize-handle-sw, .weilin_prompt_ui_resize-handle-se",left:".weilin_prompt_ui_resize-handle-nw, .weilin_prompt_ui_resize-handle-sw"},modifiers:[Ig.modifiers.restrictSize({min:{width:200,height:200}})],listeners:{start(V){l=V.interaction},move(V){if(E(V))return;const fe={width:V.rect.width,height:V.rect.height},O=w(d.value.x+V.deltaRect.left,d.value.y+V.deltaRect.top,fe.width);d.value=O,g.value=fe,a("update:position",O),a("update:size",fe)},end(){l=null}}}))};Dt(()=>{var V;n.position&&(d.value=w(n.position.x,n.position.y,((V=n.size)==null?void 0:V.width)||g.value.width)),n.size&&(g.value={...n.size}),P(),window.addEventListener("blur",I),window.addEventListener("mouseup",b),window.addEventListener("pointerup",b)}),go(()=>{f&&(clearTimeout(f),f=null),window.removeEventListener("blur",I),window.removeEventListener("mouseup",b),window.removeEventListener("pointerup",b),b(),i&&(i.unset(),i=null)});const N=()=>{a("active")},pe=()=>{a("close")},D=()=>{N()};return(V,fe)=>(C(),Zt(Jd,{to:"#weilin_comfyui_tools_prompt_ui_div"},[r("div",{ref_key:"windowRef",ref:s,class:"weilin_prompt_ui_draggable-window",style:Ft({left:`${d.value.x}px`,top:`${d.value.y}px`,width:`${g.value.width}px`,height:`${g.value.height}px`,zIndex:e.zIndex}),onMousedown:N},[r("div",{class:"weilin_prompt_ui_window-header",onMousedown:vt(D,["stop"])},[r("div",M2,y(e.title),1),r("button",{class:"weilin_prompt_ui_close-btn",onClick:pe},"×")],32),r("div",{class:"weilin_prompt_ui_window-content",onScroll:m},[Pr(V.$slots,"default",{},void 0,!0)],32),r("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-nw",title:h(o)("common.windowSize")},null,8,O2),r("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-ne",title:h(o)("common.windowSize")},null,8,D2),r("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-sw",title:h(o)("common.windowSize")},null,8,P2),r("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-se",title:h(o)("common.windowSize")},null,8,R2)],36)]))}},[["__scopeId","data-v-d64522ec"]]),Ca="v0.0.75",N2={promptBox:{placeholder:"请输入文本...",delete:"删除",newline:"换行",tab:"制表符",windowTitle:`WeiLin提示词UI窗口 ${Ca}`,windowTitleGlobal:`WeiLin全局提示词UI窗口 ${Ca}`,translate:"翻译",translatePlaceholder:"请输入要翻译的文本,回车即可",weight:"权重",weightPlaceholder:"请输入权重",addBracket:"添加括号",removeLayer:"减去括号",hiddenHint:"双击显示提示词",tagTips:`鼠标左键双击屏蔽Tag
鼠标左键单击Tag可以编辑
鼠标左键拖动可以拖动Tag`,oneClickRandomTag:"一键随机Tag",oneClickCleanAll:"一键清空所有",oneClickClearDisabled:"一键清空禁用",clearDisabledSuccess:"已清空所有禁用标签",randomTagSettings:"设置随机Tag规则",oneClickTranslate:"一键翻译Tag",showDeleteButton:"显示删除按钮",hideDeleteButton:"隐藏删除按钮",modelWeight:"模型权重",textWeight:"文本权重",favour:"收藏",lineToken:"换行",addLineToken:"添加换行符",settings:{title:"设置",cancel:"取消",save:"保存",translator:"翻译设置",sourceLanguage:"源语言",targetLanguage:"目标语言",chinese_simplified:"简体中文",english:"英语",close:"关闭",auto_detect:"自动检测",setting_function_toggles:"功能开关设置",setting_function_toggles_full:"功能开关设置(保存后重新打开窗口生效)",enableClearAll:"启用一键清空所有",enableDeleteButton:"启用删除按钮显示开关",enableRandomTag:"启用一键随机标签",enableRandomTagSettings:"启用随机标签设置",enableTranslateTag:"启用一键翻译标签",enableClearDisabled:"启用一键清空禁用",setting_floating_ball:"悬浮球设置",setting_prompt_box:"提示词设置",enablePromptCommaShow:"显示提示词逗号",floatingBallCount:"悬浮球数量",floatingBallCountPlaceholder:"请输入悬浮球数量",floatingBallSize:"悬浮球宽度",floatingBallSizePlaceholder:"请输入悬浮球宽度",floatingBallHeight:"悬浮球高度",floatingBallHeightPlaceholder:"请输入悬浮球高度",enableFloatingBall:"启用悬浮球",enableCommaConversion:"启用逗号转换,全角逗号转为半角逗号",enablePeriodConversion:"启用句号转换,全角句号转为半角句号",enableBracketConversion:"启用括号转换,全角括号转为半角括号",enableAngleBracketConversion:"启用尖括号转换,全角尖括号转为半角尖括号",enableUnderscoreToBracket:"启用下划线转换,下划线转换为空格",enableBracketEscape:"启用括号转义,自动添加\\转义括号",enableCommaCloseAutocomplete:"启动逗号关闭补全,输入逗号立即关闭补全列表",setting_openai_box:"OpenAI设置",openai_api_key:"API Key",openai_api_key_placeholder:"请输入API Key",openai_api_key_save:"保存",openaiSettings:"OpenAI设置",openai_base_url:"Base URL",openai_base_url_placeholder:"请输入Base URL",openai_model:"模型",openai_model_placeholder:"请输入模型",not_set:"未设置",edit:"编辑",delete:"删除",selectedOpenaiConfig:"当前选择的OpenAI配置",addNewConfig:"添加OpenAI配置",setting_sponsor_me:"赞助我",sponsorMe:"赞助我",sponsorMeTip:"赞助我,支持我继续开发",sponsorMeLink:"唯一赞助链接 https://afdian.com/a/weilin9999",setting_start_panel:"启动面板",startPanel:"启动面板",startPanelTip:"点击启动面板,启动成功后会自动打开面板页面",selectTranslater:"选择翻译器",selectOptionNetworkTranslater:"三方网络翻译",selectOptionPythonTranslater:"翻译库翻译",apply:"应用",selectOptionNetworkTranslaterTitle:"三方网络翻译设置",selectOptionPythonTranslaterTitle:"翻译库设置",selectOptionNetworkTranslaterInfo:"使用的三方工具是(仅网络翻译)",selectOptionPythonTranslaterInfo:"使用的翻译包为translators",install:"安装",nowTranlaterPackageState:"当前翻译包状态:",tranlaterPackageStateTrue:"已安装",tranlaterPackageStateFlase:"未安装",installed:"正在安装中...",installTranslaterPackageInfo:"当前正在安装翻译库中,请不要关闭窗口!等待安装完成",translaterSetting:"翻译设置",chooseTranslaterSetting:"选择翻译服务:",translaterLangSourceSetting:"翻译语言:",translaterLangTargeSetting:"翻译目标语言:",saveTranslaterSetting:"保存设置",testTranslaterTitle:"测试翻译",inputTestTranslater:"输入翻译内容:",outPutTestTranslater:"翻译结果:",testingTranslater:"测试翻译",inputTestTranslaterPlaceholder:"请输入要翻译的内容",outPutTestTranslaterPlaceholder:"翻译结果将显示在这里",errorPrompt:"读取节点提示词失败!",setting_auto_complete_limit:"补全提示设置",show_auto_limit:"显示补全提示数量",showAutoLimitPlaceholder:"请输入要显示的数量",settingAutoCompleteWidth:"设置补全提示框宽度",settingAutoCompleteWidthPlaceholder:"请输入宽度",settingAutoCompleteHeight:"设置补全提示框最大高度",settingAutoCompleteHeightPlaceholder:"请输入最大高度",skinSetting:"皮肤设置",defaultSkin:"默认皮肤",customSkin:"自定义皮肤",uploadSkin:"上传皮肤",bgSetting:"背景设置",gradientBg:"渐变颜色",transparentBg:"透明",gradientColor:"渐变颜色选择",borderRadius:"圆角设置",resetToDefault:"恢复默认"}},controls:{language:"语言",settings:"设置",switchTheme:"切换主题",darkMode:"夜间模式",lightMode:"日间模式",tagManager:"标签管理",loraStack:"Lora堆",loraManager:"Lora管理",history:"历史记录",addLora:"添加Lora",removeLora:"移除Lora",lookOnLora:"查看Lora",aiChat:"AI对话",github:"Github主页",shareCloudData:"共享云数据",tutorialVideo:"教程视频",sponsor:"赞助我",danbooruManager:"Danbooru管理器"},theme:{toggle:"切换主题"},common:{confirmDelete:"确认删除",delete:"删除",cancel:"取消",confirm:"确定",edit:"编辑",save:"保存",refresh:"刷新",copy:"复制",copySuccess:"复制成功",copyFailed:"复制失败",windowSize:"调节窗口大小",showMore:"显示更多",showLess:"收起"},cloudWindow:{windowTitle:"共享云仓库",back:"返回上一级",currentPath:"当前路径",tagDatabase:"Tag 数据库",danbooruDatabase:"Danbooru 数据库",open:"打开文件夹",installed:"已安装",install:"安装",installing:"正在安装..."},nodeListWindow:{windowTitle:"节点列表",openPromptUI:"打开提示词编辑器"},lora:{title:"Lora 信息",rawTitle:"LoraRaw",file:"文件",hash:"Hash值",civitai:"Civitai",viewOnCivitai:"在 Civitai 上查看",fetchFromCivitai:"从 Civitai 获取信息",modelNotFound:"模型未找到",modelNotFoundTip:"该模型在 Civitai 上未找到,可能是私有模型或已被删除",name:"名称",nameTip:"模型的显示名称",type:"类型",baseModel:"基础模型",trainedWords:"训练词",trainedWordsTip:"模型训练时使用的关键词,点击可选择复制",selectedWords:"已选择 {count} 个词",strengthMin:"最小强度",strengthMinTip:"推荐的最小强度值",strengthMax:"最大强度",strengthMaxTip:"推荐的最大强度值",promptWords:"提示词",promptWordsTip:"使用该模型时的推荐提示词",loraWorks:"Lora提示词",strWeight:"文本强度权重",hideLora:"禁用Lora",showLora:"启用Lora",skipClip:"跳过层",seeLoraRaw:"查看LoraRaw",addDiyFiled:"添加自定义字段",getCivitData:"获取Civitai信息",copy:"复制"},tagManager:{deletePrimaryCategoryConfirm:"确定要删除分类 {name} 吗?",deleteGroupConfirm:"确定要删除分组 {name} 吗?",deleteTagConfirm:"确定要删除标签 {name} 吗?",windowTitle:"标签管理器",categories:"分类管理",groups:"分组管理",selectCategory:"请选择分类",selectGroup:"请选择分组",addPrimaryCategory:"添加分类",addGroup:"添加分组",editPrimaryCategory:"编辑分类",editGroup:"编辑分组",editTag:"编辑标签",categoryName:"分类名称",categoryNamePlaceholder:"请输入分类名称",categoryNameRequired:"分类名称不能为空",groupName:"分组名称",groupNamePlaceholder:"请输入分组名称",groupNameRequired:"分组名称不能为空",addTag:"添加Tag",text:"Tag描述",textPlaceholder:"请输入Tag描述",description:"Tag",descriptionPlaceholder:"请输入Tag",textRequired:"Tag和Tag描述不能为空",favourRequired:"Tag和Tag描述不能为空,且必须选择分组",backgroundColor:"背景颜色",colorPickerTitle:"选择颜色",opacity:"透明度",searchPlaceholder:"搜索Tag...",noResults:"未找到相关结果",searchInCategory:"在分类中",searchInTag:"在Tag中",save:"保存",cancel:"取消",confirm:"确定",delete:"删除",addSubCategory:"添加子分类",editSubCategory:"编辑子分类",subCategoryName:"子分类名称",subCategoryNamePlaceholder:"请输入子分类名称",subCategoryNameRequired:"子分类名称不能为空",deleteConfirmTitle:"确认删除",deleteConfirmMessage:"此操作将永久删除该{type},是否继续?",deleteSuccess:"删除成功",deleteFailed:"删除失败",saveSuccess:"保存成功",saveFailed:"保存失败",colorPickerAlpha:"透明度",colorPickerHex:"十六进制颜色值",colorPreview:"颜色预览",dragToSort:"拖动排序",searchTags:"搜索标签",noTagsFound:"未找到标签",noGroupsFound:"未找到分组",noCategoriesFound:"未找到分类",refresh:"刷新",refreshing:"刷新中...",refreshSuccess:"刷新成功",refreshFailed:"刷新失败",search:"搜索",searching:"搜索中...",searchResult:"搜索结果",searchInPath:"位于: {path}",category:"分类",group:"分组",tag:"标签",resultType:{category:"分类",group:"分组",tag:"标签"},hasDeleteAction:"批量删除",deleteSelected:"删除选中",confirmDeleteSelected:"确定要删除选中标签吗?",cancelDelete:"取消删除",moveTag:"移动标签",targetTag:"目标标签",movePosition:"移动位置",moveBefore:"移动到目标标签之前",moveAfter:"移动到目标标签之后",deleteTag:"删除标签",editGroupMode:"编辑模式",exitEditMode:"退出编辑模式",autoAddSearchTag:"搜索的Tag自动添加到提示词中",importTags:"批量导入Tag",share:"分享",edit:"编辑",outputSuccess:"分享成功",noTagsSelected:"没有选择要分享的Tag",shareSelected:"分享选择的Tag",batchShare:"批量分享Tag",cancelShare:"取消分享",moveGroup:"移动分组",targetGroup:"目标分组",moveGroupBefore:"移动到目标分组之前",moveGroupAfter:"移动到目标分组之后",importDanbooru:"批量导入",modifyTabSize:"修改标签尺寸",tabSizeConfig:"标签尺寸配置",primaryTabConfig:"一级分类标签配置",groupTabConfig:"二级分类标签配置",tabWidth:"标签宽度",tabHeight:"标签高度",fontSize:"字体大小",fitContent:"自适应内容",customWidth:"自定义宽度",resetDefault:"重置为默认值",tabSizeConfigSaved:"标签尺寸配置已保存",tabSizeConfigSaveFailed:"标签尺寸配置保存失败"},loraManager:{windowTitle:"Lora管理",modelWeight:"模型权重",textEncoderWeight:"CLIP权重",triggerWeight:"触发词权重",all:"全部",root:"根目录",refresh:"刷新",cacheAll:"缓存全部Lora信息",searchPlaceholder:"搜索Lora...",prevPage:"上一页",nextPage:"下一页",noResults:"未找到相关结果",loadingMore:"正在加载更多...",noMoreData:"没有更多结果了"},message:{copySuccess:"复制成功",copyFailed:"复制失败",saveSuccess:"保存成功",saveFailed:"保存失败",deleteSuccess:"删除成功",deleteFailed:"删除失败",operationSuccess:"操作成功",operationFailed:"操作失败",networkError:"网络错误",unknownError:"未知错误",refreshSuccess:"刷新成功",refreshFailed:"刷新失败",loadingData:"加载数据中...",dataLoaded:"数据加载完成",editSuccess:"编辑成功",editFailed:"编辑失败",addSuccess:"添加成功",addFailed:"添加失败",addFavoriteSuccess:"已添加到收藏夹",addFavoriteIsExist:"已添加到收藏夹",error:"错误",editNameExist:"名称已存在",moveSuccess:"移动成功",moveFailed:"移动失败",setLanguageSuccess:"设置语言成功",setLanguageFailed:"设置语言失败",startPanelSuccess:"启动面板成功",startPanelFailed:"启动面板失败",isLoading:"已在执行中请等待",loaddingPrc:"执行进度 {name}%",loaddingSuccess:"已全部加载成功",noFinishKuo:"括号不完整,请检查输入",getTranslaterFail:"获取翻译设置失败",applyTranslaterFail:"应用翻译设置失败",applyToTranslaterFail:"切换翻译库翻译需要安装翻译库,请先安装翻译库再应用设置",applyTranslaterSuccess:"应用翻译设置成功",tranlaterPackageInstallFail:"等待安装超时,请查看后台安装情况,若安装成功再次点击安装即可验证",tranlaterPackageInstallSuccess:"安装翻译包成功",translaterTestFail:"翻译失败,请使用其它的翻译服务进行尝试",installPackageSuccess:"安装共享数据成功!",installPackageFail:"安装共享数据失败,请查看后台错误",loadFailed:"加载失败",jsonErrorMesg:"JSON文件格式错误",pleaseAddSub:"请先添加二级分类",pleaseAddMainCeb:"请先添加一级分类",pleaseSelectGroup:"请选择完整的分组路径",isLoadingPleaseWait:"正在执行中,请查看后台进度",shareGroupError:"分享失败,获取分组信息失败",shareTagError:"分享失败,获取组Tag信息失败"},history:{title:"历史记录",search_placeholder:"搜索历史记录...",search:"搜索",windowTitle:"历史记录",favorites:"收藏夹",history:"历史记录",refresh:"刷新",refresh_history:"刷新历史记录",refresh_favorites:"刷新收藏夹",add_to_favorites:"添加到收藏夹",delete_history:"删除历史记录",use_item:"使用",add_new:"添加收藏",bulk_delete:"批量删除",deleteHistoryConfirm:"确定要删除历史记录 {name} 吗?",deleteFavoriteConfirm:"确定要删除收藏夹 {name} 吗?",confirmDeleteSelected:"确定要删除选中的信息吗?",cancel_delete:"取消删除",sure_delete:"确定删除",deleteSelected:"删除选中",dialog:{add_tag:"添加收藏",edit_tag:"编辑收藏",name:"名称",name_placeholder:"请输入名称",tag:"标签",tag_placeholder:"请输入标签",background_color:"背景颜色",background_color_placeholder:"请选择背景颜色",edit_favorite:"编辑收藏",delete_favorite:"删除收藏"},edit_favorite:"编辑收藏",delete_favorite:"删除收藏",use_favorite:"使用收藏"},floatingBall:{promptBox:"打开全局提示词",tagManager:"打开标签管理",loraManager:"打开Lora管理",aiWindow:"打开AI对话",restoreWindow:"重置所有窗口",openNodeListWindow:"打开节点列表",tranToWeb:"图片转换工具",openSetting:"打开设置"},aiWindow:{windowTitle:"AI对话窗口",newChat:"新建对话",chatName:"对话",thinking:"思考中...",send:"发送",inputMessage:"输入你的消息..."},translaterService:{niutrans:"小牛翻译",mymemory:"MyMemory",alibaba:"阿里巴巴翻译",baidu:"百度翻译",modernmt:"ModernMT",volcengine:"火山翻译",iciba:"金山词霸",iflytek:"科大讯飞翻译",google:"谷歌翻译",bing:"必应翻译",lingvanex:"Lingvanex",yandex:"Yandex翻译",itranslate:"iTranslate",systran:"SYSTRAN",argos:"Argos翻译",apertium:"Apertium",reverso:"Reverso翻译",deepl:"DeepL翻译",cloudtranslation:"云翻译",qqtransmart:"腾讯翻译君",translatecom:"Translate.com",sogou:"搜狗翻译",tilde:"Tilde翻译",caiyun:"彩云小译",qqfanyi:"腾讯翻译",translateme:"TranslateMe",papago:"Papago翻译",mirai:"未来翻译",youdao:"有道翻译",iflyrec:"讯飞听见翻译",hujiang:"沪江翻译",yeekit:"译库翻译",languagewire:"LanguageWire",elia:"Elia翻译",judic:"Judic翻译",mglip:"蒙古语翻译",utibet:"藏语翻译"},translaterLanguage:{english:"英语",chinese:"中文",arabic:"阿拉伯语",russian:"俄语",french:"法语",german:"德语",spanish:"西班牙语",portuguese:"葡萄牙语",italian:"意大利语",japanese:"日语",korean:"韩语",greek:"希腊语",dutch:"荷兰语",hindi:"印地语",turkish:"土耳其语",malay:"马来语",thai:"泰语",vietnamese:"越南语",indonesian:"印度尼西亚语",hebrew:"希伯来语",polish:"波兰语",mongolian:"蒙古语",czech:"捷克语",hungarian:"匈牙利语",estonian:"爱沙尼亚语",bulgarian:"保加利亚语",danish:"丹麦语",finnish:"芬兰语",romanian:"罗马尼亚语",swedish:"瑞典语",slovenian:"斯洛文尼亚语","persian/farsi":"波斯语/波斯语",bosnian:"波斯尼亚语",serbian:"塞尔维亚语",fijian:"斐济语",filipino:"菲律宾语",haitiancreole:"海地克里奥尔语",catalan:"加泰罗尼亚语",croatian:"克罗地亚语",latvian:"拉脱维亚语",lithuanian:"立陶宛语",urdu:"乌尔都语",ukrainian:"乌克兰语",welsh:"威尔士语",tahiti:"塔希提语",tongan:"汤加语",swahili:"斯瓦希里语",samoan:"萨摩亚语",slovak:"斯洛伐克语",afrikaans:"南非荷兰语",norwegian:"挪威语",bengali:"孟加拉语",malagasy:"马达加斯加语",maltese:"马耳他语","queretaro otomi":"克雷塔罗奥托米语","klingon/tlhingan hol":"克林贡语",gujarati:"古吉拉特语",tamil:"泰米尔语",telugu:"泰卢固语",punjabi:"旁遮普语",amharic:"阿姆哈拉语",azerbaijani:"阿塞拜疆语",bashkir:"巴什基尔语",belarusian:"白俄罗斯语",cebuano:"宿务语",chuvash:"楚瓦什语",esperanto:"世界语",basque:"巴斯克语",irish:"爱尔兰语"},utils:{tranToWeb:"转换图片为HTML",dropOrPasteImage:"点击本区域可以上传文件也可以拖动图片或粘贴图片到此处",downloadHtml:"下载HTML",copyHtml:"复制HTML",copySuccess:"HTML已复制",copyFailed:"复制HTML失败",clear:"清空内容"},importDialog:{title:"批量导入Tag",sure:"确认并导入",cleanAll:"清空所有",dumpSQL:"导出所有SQL",uploadSQL:"上传原始SQL文件",setMainCeb:"设置一级分类",setSubCeb:"设置二级分类",addTag:"添加Tag",fromJSONImput:"从JSON文件批量导入Tag",fromTxtInput:"从TXT文件批量导入Tag",fromYmalInput:"从YAML文件批量导入Tag",selectMainCeb:"选择一级分类",selectSubCeb:"选择二级分类",selectGroup:"选择已有分类",pleaseAddGroupName:"请填写一级分类名称",pleaseAddSubGroupName:"请填写二级分类名称",pleaseFullRequest:"请填写完整一级分类和二级分类信息",successImport:"导入成功",importFail:"导入失败",dumpOnlySQL:"仅导出Tag的SQL",settingOutputName:"设置导出文件名称",sureYes:"确认",cancel:"取消",edit:"编辑",delete:"删除",add:"添加Tag",pleaseMainCebUuid:"一级分原UUID,增量更新才需要",pleaseSubGroupUuid:"二级分原UUID,增量更新才需要",pleaseSubGroup:"二级分类名称",pleaseMainCeb:"一级分类名称",translater:"描述",tips1:"使用教程:",tips1text:"B站视频教程",tips2:"Tag云仓库:",tips2text:"GitHub仓库",tips3:"在线批量编辑:",tips3text:"在线编辑器",selectTitle:"选择分类",selectedCategories:"已选择的分类",clearAll:"清除全部",primaryCategories:"一级分类",subCategories:"二级分类",noSelectedCategories:"暂无选择的分类",selectCategory:"选择此分类",selectSubcategory:"选择此子分类",sureSelect:"确认选择"},randomUtils:{title:"随机Tag规则设置",generalSettings:"通用设置",totalTags:"随机Tag总数量(规则范围超过总数量按总数量算最大范围)",rules:"规则",addRule:"添加规则",rule:"规则",range:"范围",tagType:"标签类型",category:"Tag数据",specificTags:"特定标签",selectCategory:"选择分类",addTagPlaceholder:"输入标签并按回车",addTag:"添加标签",testRandom:"测试随机",generatedTags:"生成的标签",selectTagGroup:"选择Tag分组",ruleTemplates:"规则模板",saveAsTemplate:"保存为模板",selectTemplate:"选择模板",applyTemplate:"应用模板",templateNamePlaceholder:"输入模板名称",templateNameRequired:"请输入模板名称",templateSaved:"模板已保存",templateApplied:"模板已应用",errorSavingTemplates:"保存模板时出错",save:"保存",cancel:"取消",editTemplate:"修改名称",deleteTemplate:"删除模板",confirmDeleteTemplate:"确定要删除此模板吗?",templateDeleted:"模板已删除",templateUpdated:"模板名称已更新",errorUpdatingTemplate:"更新模板失败",errorLoadingTemplate:"加载模板失败",errorDeletingTemplate:"删除模板失败",errorApplyingTemplate:"应用模板失败",pleaseChooseTemplate:"请选择模板",errorSavingTemplate:"保存模板失败",newTemplate:"新建模板",rulesReminder:"提醒:第一个规则的范围必须从1开始!如果范围区间超过了随机的总数则直接显示全部不会随机!"},danbooruManager:{title:"Danbooru管理器",controle:"操作",translatePlaceholder:"请输入对应的翻译文本",searchPlaceholder:"输入需要搜索的Danbooru标签...",pageShow:"每页显示:",pageLimit:"条",hot:"热度",aliases:"分区",sureBatchDelete:"批量删除确认",sureBatchDeleteTips1:"您确定要删除选中的",sureBatchDeleteTips2:"个标签吗?此操作不可撤销。",sureDelete:"确认删除",import:"Danbooru格式导入",importBatchTitle:"批量导入Danbooru数据",importTitle:"Danbooru 导入数据展示",add:"添加Danbooru标签",edit:"编辑Danbooru标签"}},F2={promptBox:{placeholder:"Please enter text...",delete:"Delete",newline:"New Line",tab:"Tab",windowTitle:`WeiLin Prompt UI Window ${Ca}`,windowTitleGlobal:`WeiLin Global Prompt UI Window ${Ca}`,translate:"Translate",translatePlaceholder:"Please enter the text to be translated",weight:"Weight",weightPlaceholder:"Please enter the weight",addBracket:"Add Bracket",removeLayer:"Remove Bracket",hiddenHint:"Double-click to show",tagTips:`Double-click the left mouse button to mask the Tag
click the Tag to edit
and drag the Tag to drag`,oneClickRandomTag:"one Click Random Tag",oneClickCleanAll:"one Click Clean All",oneClickClearDisabled:"Clear All Disabled",clearDisabledSuccess:"All disabled tags cleared",randomTagSettings:"setting Random Tag",oneClickTranslate:"one Click Translate Tag",showDeleteButton:"Show Delete Button",hideDeleteButton:"Hide Delete Button",modelWeight:"Model Weight",textWeight:"Text Weight",favour:"Favour",lineToken:"Line Break",addLineToken:"Add Line Break Token",settings:{title:"Settings",cancel:"Cancel",save:"Save",translator:"Translator",sourceLanguage:"Source Language",targetLanguage:"Target Language",chinese_simplified:"Chinese Simplified",english:"English",close:"Close",auto_detect:"Auto Detect",setting_floating_ball:"Setting Floating Ball",setting_prompt_box:"Setting Prompt Box",setting_function_toggles:"Function Toggle Settings",setting_function_toggles_full:"Function Toggle Settings (Reopen window to take effect)",enableClearDisabled:"Enable Clear Disabled",enablePromptCommaShow:"Show Prompt Comma",floatingBallCount:"Floating Ball Count",floatingBallCountPlaceholder:"Please enter the number of floating balls",floatingBallSize:"Width of suspended ball",floatingBallSizePlaceholder:"Please enter the width of the suspension ball",floatingBallHeight:"Height of suspended ball",floatingBallHeightPlaceholder:"Please input the height of the suspension ball",enableFloatingBall:"Enable Floating Ball",enableCommaConversion:"Enable Comma Conversion",enablePeriodConversion:"Enable Period Conversion",enableBracketConversion:"Enable Bracket Conversion",enableAngleBracketConversion:"Enable Angle Bracket Conversion",enableUnderscoreToBracket:"Enable Underscore to Bracket",setting_openai_box:"OpenAI Settings",openai_api_key:"API Key",openai_api_key_placeholder:"Please enter API Key",openai_api_key_save:"Save",openaiSettings:"OpenAI Settings",openaiSettings_api_key:"API Key",openaiSettings_api_key_placeholder:"Please enter API Key",openaiSettings_api_key_save:"Save",openai_base_url:"Base URL",openai_base_url_placeholder:"Please enter Base URL",openai_model:"Model",openai_model_placeholder:"Please enter Model",not_set:"Not Set",edit:"Edit",delete:"Delete",selectedOpenaiConfig:"Selected OpenAI Config",addNewConfig:"Add New Config",setting_sponsor_me:"Sponsor Me",sponsorMe:"Sponsor Me",sponsorMeTip:"Sponsor Me, Support Me to Continue Development",sponsorMeLink:"Unique Sponsor Link https://afdian.com/a/weilin9999",setting_start_panel:"Start Panel",startPanel:"Start Panel",startPanelTip:"Click Start Panel, after successful startup, the panel page will be automatically opened",selectTranslater:"select translater",selectOptionNetworkTranslater:"Three party online translation",selectOptionPythonTranslater:"Translation Library Translation",apply:"Apply",selectOptionNetworkTranslaterTitle:"Three party network translation settings",selectOptionPythonTranslaterTitle:"Translation library settings",selectOptionNetworkTranslaterInfo:"The third-party tool used is (only for online translation)",selectOptionPythonTranslaterInfo:"The translation package used is translators",install:"Install",nowTranlaterPackageState:"now transtler package state:",tranlaterPackageStateTrue:"installed",tranlaterPackageStateFlase:"not installed",installed:"is installed ....",installTranslaterPackageInfo:"Currently installing translation library, please do not close the window! Wait for installation to complete",translaterSetting:"Translation Settings",chooseTranslaterSetting:"Choose a translation service:",translaterLangSourceSetting:"Translation language:",translaterLangTargeSetting:"Translation target language:",saveTranslaterSetting:"Save Settings",testTranslaterTitle:"Test translation",inputTestTranslater:"Enter translation content:",outPutTestTranslater:"Translation result:",testingTranslater:"Test translation",inputTestTranslaterPlaceholder:"Please enter the content to be translated",outPutTestTranslaterPlaceholder:"The translation result will be displayed here",errorPrompt:"Read the prompt node failed",skinSetting:"skin setting",defaultSkin:"default skin",customSkin:"custom skin",uploadSkin:"upload skin",bgSetting:"background setting",gradientBg:"gradient color",transparentBg:"transparent",gradientColor:"gradient color select",borderRadius:"border radius",resetToDefault:"reset to default"}},controls:{language:"Language",settings:"Settings",switchTheme:"Switch Theme",darkMode:"Dark Mode",lightMode:"Light Mode",tagManager:"Tag Manager",loraStack:"Lora Stack",loraManager:"Lora Manager",history:"History",addLora:"Add Lora",removeLora:"Remove Lora",lookOnLora:"Look On Lora",aiChat:"AI Chat",github:"Github Home",shareCloudData:"Share Cloud Data",tutorialVideo:"Tutorial Video",sponsor:"Sponsor Me",danbooruManager:"danbooru Manager"},theme:{toggle:"Switch Theme"},lora:{title:"Lora Information",rawTitle:"LoraRaw",file:"File",hash:"Hash",civitai:"Civitai",viewOnCivitai:"View on Civitai",fetchFromCivitai:"Fetch from Civitai",modelNotFound:"Model not found",modelNotFoundTip:"The model was not found on Civitai. It might be private or deleted",name:"Name",nameTip:"Display name of the model",type:"Type",baseModel:"Base Model",trainedWords:"Trained Words",trainedWordsTip:"Keywords used in model training, click to select for copying",selectedWords:"{count} words selected",strengthMin:"Min Strength",strengthMinTip:"Recommended minimum strength value",strengthMax:"Max Strength",strengthMaxTip:"Recommended maximum strength value",promptWords:"Prompt Words",promptWordsTip:"Recommended prompt words when using this model",loraWorks:"Lora Prompt Words",strWeight:"Text Strength Weight",hideLora:"Disable Lora",showLora:"Enable Lora",skipClip:"Clip Skip",seeLoraRaw:"LoraRaw",addDiyFiled:"Add DIY Filed",getCivitData:"Get Civitai Data",copy:"Copy"},common:{confirmDelete:"Confirm Delete",delete:"Delete",cancel:"Cancel",confirm:"Confirm",edit:"Edit",save:"Save",refresh:"Refresh",copy:"Copy",copySuccess:"Copied successfully",copyFailed:"Copy failed",windowSize:"Adjust window size",showMore:"show more",showLess:"show less"},nodeListWindow:{windowTitle:"Node List",openPromptUI:"Open Prompt UI"},tagManager:{deletePrimaryCategoryConfirm:"Are you sure you want to delete category {name}?",deleteGroupConfirm:"Are you sure you want to delete group {name}?",deleteTagConfirm:"Are you sure you want to delete tag {name}?",windowTitle:"Tag Manager",categories:"Categories",groups:"Groups",selectCategory:"Please select a category",selectGroup:"Please select a group",addPrimaryCategory:"Add Category",addGroup:"Add Group",editPrimaryCategory:"Edit Category",editGroup:"Edit Group",editTag:"Edit Tag",categoryName:"Category Name",categoryNamePlaceholder:"Enter category name",categoryNameRequired:"Category name is required",groupName:"Group Name",groupNamePlaceholder:"Enter group name",groupNameRequired:"Group name is required",addTag:"Add Tag",text:"Tag Description",textPlaceholder:"Enter tag Description",description:"Tag",descriptionPlaceholder:"Enter tag",textRequired:"Tag and Tag description cannot be empty",favourRequired:"Tag and Tag description cannot be empty, and a group must be selected",backgroundColor:"Background Color",colorPickerTitle:"Select Color",opacity:"Opacity",searchPlaceholder:"Search tags...",noResults:"No results found",searchInCategory:"in category",searchInTag:"in tag",save:"Save",cancel:"Cancel",confirm:"Confirm",delete:"Delete",addSubCategory:"Add Sub-category",editSubCategory:"Edit Sub-category",subCategoryName:"Sub-category Name",subCategoryNamePlaceholder:"Enter sub-category name",subCategoryNameRequired:"Sub-category name is required",deleteConfirmTitle:"Confirm Delete",deleteConfirmMessage:"This action will permanently delete this {type}. Continue?",deleteSuccess:"Deleted successfully",deleteFailed:"Delete failed",saveSuccess:"Saved successfully",saveFailed:"Save failed",colorPickerAlpha:"Opacity",colorPickerHex:"Hex Color Value",colorPreview:"Color Preview",dragToSort:"Drag to Sort",searchTags:"Search Tags",noTagsFound:"No tags found",noGroupsFound:"No groups found",noCategoriesFound:"No categories found",refresh:"Refresh",refreshing:"Refreshing...",refreshSuccess:"Refresh successful",refreshFailed:"Refresh failed",search:"Search",searching:"Searching...",searchResult:"Search Result",searchInPath:"Located in: {path}",category:"Category",group:"Group",tag:"Tag",resultType:{category:"Category",group:"Group",tag:"Tag"},hasDeleteAction:"Batch Delete",deleteSelected:"Delete Selected",confirmDeleteSelected:"Are you sure you want to delete the selected tags?",cancelDelete:"Cancel Delete",moveTag:"Move Tag",targetTag:"Target Tag",movePosition:"Move Position",moveBefore:"Move Before",moveAfter:"Move After",deleteTag:"Delete Tag",editGroupMode:"Edit Group Mode",exitEditMode:"Exit Edit Mode",autoAddSearchTag:"Auto Add Search Tag With Prompt",importTags:"Import Tags",share:"Share",edit:"Edit",outputSuccess:"Share successfully",noTagsSelected:"No share tags selected",shareSelected:"Share selected Tag",batchShare:"Batch Share Tag",cancelShare:"Cancel Share",moveGroup:"Move Group",targetGroup:"Target Group",moveGroupBefore:"Move Before",moveGroupAfter:"Move After",importDanbooru:"Batch import",modifyTabSize:"Modify Tag Size",tabSizeConfig:"Tag Size Configuration",primaryTabConfig:"Primary Category Tab Configuration",groupTabConfig:"Group Category Tab Configuration",tabWidth:"Tab Width",tabHeight:"Tab Height",fontSize:"Font Size",fitContent:"Fit Content",customWidth:"Custom Width",resetDefault:"Reset to Default",tabSizeConfigSaved:"Tag size configuration saved",tabSizeConfigSaveFailed:"Failed to save tag size configuration"},loraManager:{windowTitle:"Lora Manager",modelWeight:"Model Weight",textEncoderWeight:"CLIP Weight",triggerWeight:"Trigger Weight",all:"All",root:"Root",refresh:"Refresh",cacheAll:"Cache all Lora information",searchPlaceholder:"Search Lora...",noResults:"No results found",prevPage:"prev page",nextPage:"next page",loadingMore:"Loadding more ...",noMoreData:"No more data"},message:{copySuccess:"Copy successful",copyFailed:"Copy failed",saveSuccess:"Save successful",saveFailed:"Save failed",deleteSuccess:"Delete successful",deleteFailed:"Delete failed",operationSuccess:"Operation successful",operationFailed:"Operation failed",networkError:"Network error",unknownError:"Unknown error",refreshSuccess:"Refresh successful",refreshFailed:"Refresh failed",loadingData:"Loading data...",dataLoaded:"Data loaded",editSuccess:"Edit successful",editFailed:"Edit failed",addSuccess:"Add successful",addFailed:"Add failed",addFavoriteSuccess:"Added to favorites",addFavoriteIsExist:"Added to favorites",error:"Error",moveSuccess:"Move successful",moveFailed:"Move failed",setLanguageSuccess:"Set language successful",setLanguageFailed:"Set language failed",startPanelSuccess:"Start panel successful",startPanelFailed:"Start panel failed",isLoading:"Loading...",loaddingPrc:"Execution progress {name}%",loaddingSuccess:"All loaded successfully",noFinishKuo:"The parentheses are incomplete. Please check the input",getTranslaterFail:"Get translator failed",applyTranslaterFail:"Apply translator failed",applyToTranslaterFail:"Switching to a translation library requires installing a translation library. Please install the translation library first and then apply the settings",applyTranslaterSuccess:"Apply translator successful",tranlaterPackageInstallFail:"Waiting for installation timeout, please check the background installation status. If the installation is successful, click install again to verify",tranlaterPackageInstallSuccess:"Successfully installed translation package",translaterTestFail:"Translation failed, please try using another translation service",installPackageSuccess:"Successfully installed translation package",installPackageFail:"Failed to install translation package, please check the background installation status",loadFailed:"load failed",jsonErrorMesg:"The format of the JSON file is incorrect",pleaseAddSub:"Please add the secondary classification first",pleaseAddMainCeb:"Please add the first-level category first",pleaseSelectGroup:"Please select the complete grouping path",isLoadingPleaseWait:"It is being executed. Please check the progress in the background",shareGroupError:"Failed to share and failed to obtain group information",shareTagError:"Failed to share and failed to obtain group tag information"},cloudWindow:{windowTitle:"Share Cloud Window",back:"Back",currentPath:"Current Path",tagDatabase:"Tag Database",danbooruDatabase:"Danbooru Database",open:"Open Folder",installed:"Installed",install:"Install",installing:"Installing..."},history:{title:"History",search_placeholder:"Search history...",windowTitle:"History",search:"Search",favorites:"Favorites",history:"History",refresh:"Refresh",refresh_history:"Refresh history",refresh_favorites:"Refresh favorites",add_to_favorites:"Add to favorites",delete_history:"Delete history",use_item:"Use",add_new:"Add new",bulk_delete:"Bulk delete",deleteHistoryConfirm:"Are you sure you want to delete history {name}?",deleteFavoriteConfirm:"Are you sure you want to delete favorite {name}?",confirmDeleteSelected:"Are you sure you want to delete selected information?",cancel_delete:"Cancel delete",sure_delete:"Sure delete",deleteSelected:"Delete selected",dialog:{add_tag:"Add favorite",edit_tag:"Edit favorite",name:"Name",name_placeholder:"Please enter name",tag:"Tag",tag_placeholder:"Please enter tag",background_color:"Background color",background_color_placeholder:"Please select background color",edit_favorite:"Edit favorite",delete_favorite:"Delete favorite"},edit_favorite:"Edit favorite",delete_favorite:"Delete favorite",use_favorite:"Use favorite"},floatingBall:{promptBox:"open Global Prompt Box",tagManager:"open Tag Manager",loraManager:"open Lora Manager",aiWindow:"open AI Chat",restoreWindow:"reset all windows",openNodeListWindow:"open Node List",tranToWeb:"Image to Web Utils",openSetting:"open Setting"},aiWindow:{windowTitle:"AI Chat Window",newChat:"New Chat",chatName:"Chat",thinking:"Thinking...",send:"Send",inputMessage:"Enter your message..."},translaterService:{niutrans:"niutrans",mymemory:"mymemory",alibaba:"alibaba",baidu:"baidu",modernmt:"modernmt",volcengine:"volcengine",iciba:"iciba",iflytek:"iflytek",google:"google",bing:"bing",lingvanex:"lingvanex",yandex:"yandex",itranslate:"itranslate",systran:"systran",argos:"argos",apertium:"apertium",reverso:"reverso",deepl:"deepl",cloudtranslation:"cloudtranslation",qqtransmart:"qqtransmart",translatecom:"translatecom",sogou:"sogou",tilde:"tilde",caiyun:"caiyun",qqfanyi:"qqfanyi",translateme:"translateme",papago:"papago",mirai:"mirai",youdao:"youdao",iflyrec:"iflyrec",hujiang:"hujiang",yeekit:"yeekit",languagewire:"languagewire",elia:"elia",judic:"judic",mglip:"mglip",utibet:"utibet"},translaterLanguage:{english:"english",chinese:"chinese",arabic:"arabic",russian:"russian",french:"french",german:"german",spanish:"spanish",portuguese:"portuguese",italian:"italian",japanese:"japanese",korean:"korean",greek:"greek",dutch:"dutch",hindi:"hindi",turkish:"turkish",malay:"malay",thai:"thai",vietnamese:"vietnamese",indonesian:"indonesian",hebrew:"hebrew",polish:"polish",mongolian:"mongolian",czech:"czech",hungarian:"hungarian",estonian:"estonian",bulgarian:"bulgarian",danish:"danish",finnish:"finnish",romanian:"romanian",swedish:"swedish",slovenian:"slovenian","persian/farsi":"persian/farsi",bosnian:"bosnian",serbian:"serbian",fijian:"fijian",filipino:"filipino",haitiancreole:"haitiancreole",catalan:"catalan",croatian:"croatian",latvian:"latvian",lithuanian:"lithuanian",urdu:"urdu",ukrainian:"ukrainian",welsh:"welsh",tahiti:"tahiti",tongan:"tongan",swahili:"swahili",samoan:"samoan",slovak:"slovak",afrikaans:"afrikaans",norwegian:"norwegian",bengali:"bengali",malagasy:"malagasy",maltese:"maltese","queretaro otomi":"queretaro otomi","klingon/tlhingan hol":"klingon/tlhingan hol",gujarati:"gujarati",tamil:"tamil",telugu:"telugu",punjabi:"punjabi",amharic:"amharic",azerbaijani:"azerbaijani",bashkir:"bashkir",belarusian:"belarusian",cebuano:"cebuano",chuvash:"chuvash",esperanto:"esperanto",basque:"basque",irish:"irish"},utils:{tranToWeb:"Image to HTML",dropOrPasteImage:"Drop or paste image here",downloadHtml:"Download HTML",copyHtml:"Copy HTML",copySuccess:"HTML copied to clipboard",copyFailed:"Failed to copy HTML",clear:"Clear"},importDialog:{title:"Batch import of Tags",sure:"Confirm and import",cleanAll:"Empty all",dumpSQL:"Export All SQL",uploadSQL:"Upload the original SQL file",setMainCeb:"Set up a first-level classification",setSubCeb:"Set up secondary classification",addTag:"Add Tag",fromJSONImput:"Import tags from the JSON file",fromTxtInput:"Batch import tags from TXT files",fromYmalInput:"Batch import tags from YMAL files",selectMainCeb:"Select the first-level classification",selectSubCeb:"Select the secondary classification",selectGroup:"Select the existing classification",pleaseAddGroupName:"Please fill in the name of the first-level classification",pleaseAddSubGroupName:"Please fill in the name of the secondary classification",pleaseFullRequest:"Please fill in the information of the first-level and second-level classifications completely",successImport:"Import successful",importFail:"Import failed",dumpOnlySQL:"Only export the SQL of the Tag",settingOutputName:"Set the name of the export file",sureYes:"Sure",cancel:"Cancel",edit:"Edit",delete:"Delete",add:"Add Tag",pleaseMainCebUuid:"The original UUID of the first-level division is only required for incremental updates and cannot be modified",pleaseSubGroupUuid:"The secondary division of the original UUID is only required for incremental updates and cannot be modified",pleaseSubGroup:"Secondary classification name",pleaseMainCeb:"First-level classification name",translater:"Description",tips1:"Usage Tutorial:",tips1text:"Bilibili video tutorial",tips2:"Tag Cloud Warehouse:",tips2text:"GitHub repository",tips3:"Online batch editing:",tips3text:"Online editor",selectTitle:"Select Category",selectedCategories:"Selected Categories",clearAll:"Clear All",primaryCategories:"Primary Categories",subCategories:"Sub Categories",noSelectedCategories:"No categories selected",selectCategory:"Select this category",selectSubcategory:"Select this subcategory",sureSelect:"Confirm Selection"},randomUtils:{title:"Random Tag Rules Settings",generalSettings:"General Settings",totalTags:"Random Tag Total Number (If the rule range exceeds the total quantity, the maximum range is calculated by the total quantity)",rules:"Rules",addRule:"Add Rule",rule:"Rule",range:"Range",tagType:"Tag Type",category:"Tag Category",specificTags:"Specific Tags",selectCategory:"Select Category",addTagPlaceholder:"Enter tag and press Enter",addTag:"Add Tag",testRandom:"Test Random",generatedTags:"Generated Tags",selectTagGroup:"Select Tag Group",ruleTemplates:"Rule Templates",saveAsTemplate:"Save as Template",selectTemplate:"Select Template",applyTemplate:"Apply Template",templateNamePlaceholder:"Enter template name",templateNameRequired:"Template name is required",templateSaved:"Template saved",templateApplied:"Template applied",errorSavingTemplates:"Error saving templates",save:"Save",cancel:"Cancel",editTemplate:"Edit Name",deleteTemplate:"Delete",confirmDeleteTemplate:"Are you sure you want to delete this template?",templateDeleted:"Template deleted",templateUpdated:"Template name updated",errorUpdatingTemplate:"Update template failed",errorLoadingTemplate:"Load template failed",errorDeletingTemplate:"Delete template failed",pleaseChooseTemplate:"Please choose a template",errorApplyingTemplate:"Apply template failed",errorSavingTemplate:"Save template failed",newTemplate:"New Template",rulesReminder:"Reminder: The range of the first rule must start at 1! If the range exceeds the total number of random, it will simply display all not random!"},danbooruManager:{title:"Danbooru Manager",controle:"Controle",translatePlaceholder:"Please enter the tag to be translated",searchPlaceholder:"Input need search danbooru tag",pageShow:"Display per page:",pageLimit:"article",hot:"hot",aliases:"aliases",sureBatchDelete:"Batch deletion confirmation",sureBatchDeleteTips1:"You are sure you want to delete the selected one",sureBatchDeleteTips2:"A label? This operation is irrevocable.",sureDelete:"Confirm deletion",import:"Import in Danbooru format",importBatchTitle:"Batch import Danbooru data",importTitle:"Danbooru Import data display",add:"Add Danbooru Tag",edit:"Edit Danbooru Tag"}};/*!
* pinia v3.0.3
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let Mg;const gl=e=>Mg=e,Og=Symbol();function ic(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Zr;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Zr||(Zr={}));function B2(){const e=ou(!0),t=e.run(()=>S({}));let n=[],o=[];const a=mu({install(s){gl(a),a._a=s,s.provide(Og,a),s.config.globalProperties.$pinia=a,o.forEach(i=>n.push(i)),o=[]},use(s){return this._a?n.push(s):o.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return a}const Dg=()=>{};function Pg(e,t,n,o=Dg){e.push(t);const a=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),o())};return!n&&vd()&&ih(a),a}function Ks(e,...t){e.slice().forEach(n=>{n(...t)})}const U2=e=>e(),Rg=Symbol(),lc=Symbol();function uc(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],a=e[n];ic(a)&&ic(o)&&e.hasOwnProperty(n)&&!fn(o)&&!fa(o)?e[n]=uc(a,o):e[n]=o}return e}const z2=Symbol();function V2(e){return!ic(e)||!Object.prototype.hasOwnProperty.call(e,z2)}const{assign:qa}=Object;function W2(e){return!!(fn(e)&&e.effect)}function H2(e,t,n,o){const{state:a,actions:s,getters:i}=t,l=n.state.value[e];let d;function g(){l||(n.state.value[e]=a?a():{});const f=Lh(n.state.value[e]);return qa(f,s,Object.keys(i||{}).reduce((m,w)=>(m[w]=mu($t(()=>{gl(n);const b=n._s.get(e);return i[w].call(b,b)})),m),{}))}return d=Ng(e,g,t,n,o,!0),d}function Ng(e,t,n={},o,a,s){let i;const l=qa({actions:{}},n),d={deep:!0};let g,f,m=[],w=[],b;const T=o.state.value[e];!s&&!T&&(o.state.value[e]={});let E;function I(se){let le;g=f=!1,typeof se=="function"?(se(o.state.value[e]),le={type:Zr.patchFunction,storeId:e,events:b}):(uc(o.state.value[e],se),le={type:Zr.patchObject,payload:se,storeId:e,events:b});const Pe=E=Symbol();yt().then(()=>{E===Pe&&(g=!0)}),f=!0,Ks(m,le,o.state.value[e])}const P=s?function(){const{state:le}=n,Pe=le?le():{};this.$patch(Ie=>{qa(Ie,Pe)})}:Dg;function N(){i.stop(),m=[],w=[],o._s.delete(e)}const pe=(se,le="")=>{if(Rg in se)return se[lc]=le,se;const Pe=function(){gl(o);const Ie=Array.from(arguments),ue=[],we=[];function ne(X){ue.push(X)}function J(X){we.push(X)}Ks(w,{args:Ie,name:Pe[lc],store:V,after:ne,onError:J});let ie;try{ie=se.apply(this&&this.$id===e?this:V,Ie)}catch(X){throw Ks(we,X),X}return ie instanceof Promise?ie.then(X=>(Ks(ue,X),X)).catch(X=>(Ks(we,X),Promise.reject(X))):(Ks(ue,ie),ie)};return Pe[Rg]=!0,Pe[lc]=le,Pe},D={_p:o,$id:e,$onAction:Pg.bind(null,w),$patch:I,$reset:P,$subscribe(se,le={}){const Pe=Pg(m,se,le.detached,()=>Ie()),Ie=i.run(()=>St(()=>o.state.value[e],ue=>{(le.flush==="sync"?f:g)&&se({storeId:e,type:Zr.direct,events:b},ue)},qa({},d,le)));return Pe},$dispose:N},V=ds(D);o._s.set(e,V);const O=(o._a&&o._a.runWithContext||U2)(()=>o._e.run(()=>(i=ou()).run(()=>t({action:pe}))));for(const se in O){const le=O[se];if(fn(le)&&!W2(le)||fa(le))s||(T&&V2(le)&&(fn(le)?le.value=T[se]:uc(le,T[se])),o.state.value[e][se]=le);else if(typeof le=="function"){const Pe=pe(le,se);O[se]=Pe,l.actions[se]=le}}return qa(V,O),qa(Mt(V),O),Object.defineProperty(V,"$state",{get:()=>o.state.value[e],set:se=>{I(le=>{qa(le,se)})}}),o._p.forEach(se=>{qa(V,i.run(()=>se({store:V,app:o._a,pinia:o,options:l})))}),T&&s&&n.hydrate&&n.hydrate(V.$state,T),g=!0,f=!0,V}/*! #__NO_SIDE_EFFECTS__ */function j2(e,t,n){let o;const a=typeof t=="function";o=a?n:t;function s(i,l){const d=Hh();return i=i||(d?va(Og,null):null),i&&gl(i),i=Mg,i._s.has(e)||(a?Ng(e,t,o,i):H2(e,o,i)),i._s.get(e)}return s.$id=e,s}const cc=j2("tag",()=>{const e=S([]),t=S({user_lang:"zh_CN"}),n=S(0);return{categories:e,setCategories:i=>{e.value=i},userSetting:t,setUserSetting:i=>{t.value=i},isFirstLoading:n,setisFirstLoading:i=>{n.value=i}}});function Fg(e,t){return function(){return e.apply(t,arguments)}}const{toString:G2}=Object.prototype,{getPrototypeOf:dc}=Object,{iterator:ml,toStringTag:Bg}=Symbol,vl=(e=>t=>{const n=G2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Mo=e=>(e=e.toLowerCase(),t=>vl(t)===e),hl=e=>t=>typeof t===e,{isArray:Js}=Array,ei=hl("undefined");function ti(e){return e!==null&&!ei(e)&&e.constructor!==null&&!ei(e.constructor)&&ao(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ug=Mo("ArrayBuffer");function q2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ug(e.buffer),t}const Y2=hl("string"),ao=hl("function"),zg=hl("number"),ni=e=>e!==null&&typeof e=="object",K2=e=>e===!0||e===!1,_l=e=>{if(vl(e)!=="object")return!1;const t=dc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Bg in e)&&!(ml in e)},J2=e=>{if(!ni(e)||ti(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},X2=Mo("Date"),Q2=Mo("File"),Z2=Mo("Blob"),ey=Mo("FileList"),ty=e=>ni(e)&&ao(e.pipe),ny=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ao(e.append)&&((t=vl(e))==="formdata"||t==="object"&&ao(e.toString)&&e.toString()==="[object FormData]"))},oy=Mo("URLSearchParams"),[ay,sy,ry,iy]=["ReadableStream","Request","Response","Headers"].map(Mo),ly=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function oi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,a;if(typeof e!="object"&&(e=[e]),Js(e))for(o=0,a=e.length;o<a;o++)t.call(null,e[o],o,e);else{if(ti(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let l;for(o=0;o<i;o++)l=s[o],t.call(null,e[l],l,e)}}function Vg(e,t){if(ti(e))return null;t=t.toLowerCase();const n=Object.keys(e);let o=n.length,a;for(;o-- >0;)if(a=n[o],t===a.toLowerCase())return a;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wg=e=>!ei(e)&&e!==ws;function pc(){const{caseless:e}=Wg(this)&&this||{},t={},n=(o,a)=>{const s=e&&Vg(t,a)||a;_l(t[s])&&_l(o)?t[s]=pc(t[s],o):_l(o)?t[s]=pc({},o):Js(o)?t[s]=o.slice():t[s]=o};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&oi(arguments[o],n);return t}const uy=(e,t,n,{allOwnKeys:o}={})=>(oi(t,(a,s)=>{n&&ao(a)?e[s]=Fg(a,n):e[s]=a},{allOwnKeys:o}),e),cy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dy=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},py=(e,t,n,o)=>{let a,s,i;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)i=a[s],(!o||o(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&dc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fy=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},gy=e=>{if(!e)return null;if(Js(e))return e;let t=e.length;if(!zg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},my=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&dc(Uint8Array)),vy=(e,t)=>{const o=(e&&e[ml]).call(e);let a;for(;(a=o.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},hy=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},_y=Mo("HTMLFormElement"),yy=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,a){return o.toUpperCase()+a}),Hg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),by=Mo("RegExp"),jg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};oi(n,(a,s)=>{let i;(i=t(a,s,e))!==!1&&(o[s]=i||a)}),Object.defineProperties(e,o)},wy=e=>{jg(e,(t,n)=>{if(ao(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(ao(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},xy=(e,t)=>{const n={},o=a=>{a.forEach(s=>{n[s]=!0})};return Js(e)?o(e):o(String(e).split(t)),n},Sy=()=>{},Ty=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ky(e){return!!(e&&ao(e.append)&&e[Bg]==="FormData"&&e[ml])}const Cy=e=>{const t=new Array(10),n=(o,a)=>{if(ni(o)){if(t.indexOf(o)>=0)return;if(ti(o))return o;if(!("toJSON"in o)){t[a]=o;const s=Js(o)?[]:{};return oi(o,(i,l)=>{const d=n(i,a+1);!ei(d)&&(s[l]=d)}),t[a]=void 0,s}}return o};return n(e,0)},Ey=Mo("AsyncFunction"),$y=e=>e&&(ni(e)||ao(e))&&ao(e.then)&&ao(e.catch),Gg=((e,t)=>e?setImmediate:t?((n,o)=>(ws.addEventListener("message",({source:a,data:s})=>{a===ws&&s===n&&o.length&&o.shift()()},!1),a=>{o.push(a),ws.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ao(ws.postMessage)),Ay=typeof queueMicrotask<"u"?queueMicrotask.bind(ws):typeof process<"u"&&process.nextTick||Gg,Re={isArray:Js,isArrayBuffer:Ug,isBuffer:ti,isFormData:ny,isArrayBufferView:q2,isString:Y2,isNumber:zg,isBoolean:K2,isObject:ni,isPlainObject:_l,isEmptyObject:J2,isReadableStream:ay,isRequest:sy,isResponse:ry,isHeaders:iy,isUndefined:ei,isDate:X2,isFile:Q2,isBlob:Z2,isRegExp:by,isFunction:ao,isStream:ty,isURLSearchParams:oy,isTypedArray:my,isFileList:ey,forEach:oi,merge:pc,extend:uy,trim:ly,stripBOM:cy,inherits:dy,toFlatObject:py,kindOf:vl,kindOfTest:Mo,endsWith:fy,toArray:gy,forEachEntry:vy,matchAll:hy,isHTMLForm:_y,hasOwnProperty:Hg,hasOwnProp:Hg,reduceDescriptors:jg,freezeMethods:wy,toObjectSet:xy,toCamelCase:yy,noop:Sy,toFiniteNumber:Ty,findKey:Vg,global:ws,isContextDefined:Wg,isSpecCompliantForm:ky,toJSONObject:Cy,isAsyncFn:Ey,isThenable:$y,setImmediate:Gg,asap:Ay,isIterable:e=>e!=null&&ao(e[ml])};function wt(e,t,n,o,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),a&&(this.response=a,this.status=a.status?a.status:null)}Re.inherits(wt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Re.toJSONObject(this.config),code:this.code,status:this.status}}});const qg=wt.prototype,Yg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Yg[e]={value:e}}),Object.defineProperties(wt,Yg),Object.defineProperty(qg,"isAxiosError",{value:!0}),wt.from=(e,t,n,o,a,s)=>{const i=Object.create(qg);return Re.toFlatObject(e,i,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),wt.call(i,e.message,t,n,o,a),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const Ly=null;function fc(e){return Re.isPlainObject(e)||Re.isArray(e)}function Kg(e){return Re.endsWith(e,"[]")?e.slice(0,-2):e}function Jg(e,t,n){return e?e.concat(t).map(function(a,s){return a=Kg(a),!n&&s?"["+a+"]":a}).join(n?".":""):t}function Iy(e){return Re.isArray(e)&&!e.some(fc)}const My=Re.toFlatObject(Re,{},null,function(t){return/^is[A-Z]/.test(t)});function yl(e,t,n){if(!Re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,I){return!Re.isUndefined(I[E])});const o=n.metaTokens,a=n.visitor||f,s=n.dots,i=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&Re.isSpecCompliantForm(t);if(!Re.isFunction(a))throw new TypeError("visitor must be a function");function g(T){if(T===null)return"";if(Re.isDate(T))return T.toISOString();if(Re.isBoolean(T))return T.toString();if(!d&&Re.isBlob(T))throw new wt("Blob is not supported. Use a Buffer instead.");return Re.isArrayBuffer(T)||Re.isTypedArray(T)?d&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function f(T,E,I){let P=T;if(T&&!I&&typeof T=="object"){if(Re.endsWith(E,"{}"))E=o?E:E.slice(0,-2),T=JSON.stringify(T);else if(Re.isArray(T)&&Iy(T)||(Re.isFileList(T)||Re.endsWith(E,"[]"))&&(P=Re.toArray(T)))return E=Kg(E),P.forEach(function(pe,D){!(Re.isUndefined(pe)||pe===null)&&t.append(i===!0?Jg([E],D,s):i===null?E:E+"[]",g(pe))}),!1}return fc(T)?!0:(t.append(Jg(I,E,s),g(T)),!1)}const m=[],w=Object.assign(My,{defaultVisitor:f,convertValue:g,isVisitable:fc});function b(T,E){if(!Re.isUndefined(T)){if(m.indexOf(T)!==-1)throw Error("Circular reference detected in "+E.join("."));m.push(T),Re.forEach(T,function(P,N){(!(Re.isUndefined(P)||P===null)&&a.call(t,P,Re.isString(N)?N.trim():N,E,w))===!0&&b(P,E?E.concat(N):[N])}),m.pop()}}if(!Re.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Xg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function gc(e,t){this._pairs=[],e&&yl(e,this,t)}const Qg=gc.prototype;Qg.append=function(t,n){this._pairs.push([t,n])},Qg.toString=function(t){const n=t?function(o){return t.call(this,o,Xg)}:Xg;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function Oy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zg(e,t,n){if(!t)return e;const o=n&&n.encode||Oy;Re.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let s;if(a?s=a(t,n):s=Re.isURLSearchParams(t)?t.toString():new gc(t,n).toString(o),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class em{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Re.forEach(this.handlers,function(o){o!==null&&t(o)})}}const tm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Dy={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:gc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},mc=typeof window<"u"&&typeof document<"u",vc=typeof navigator=="object"&&navigator||void 0,Py=mc&&(!vc||["ReactNative","NativeScript","NS"].indexOf(vc.product)<0),Ry=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ny=mc&&window.location.href||"http://localhost",Bn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:mc,hasStandardBrowserEnv:Py,hasStandardBrowserWebWorkerEnv:Ry,navigator:vc,origin:Ny},Symbol.toStringTag,{value:"Module"})),...Dy};function Fy(e,t){return yl(e,new Bn.classes.URLSearchParams,{visitor:function(n,o,a,s){return Bn.isNode&&Re.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function By(e){return Re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Uy(e){const t={},n=Object.keys(e);let o;const a=n.length;let s;for(o=0;o<a;o++)s=n[o],t[s]=e[s];return t}function nm(e){function t(n,o,a,s){let i=n[s++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),d=s>=n.length;return i=!i&&Re.isArray(a)?a.length:i,d?(Re.hasOwnProp(a,i)?a[i]=[a[i],o]:a[i]=o,!l):((!a[i]||!Re.isObject(a[i]))&&(a[i]=[]),t(n,o,a[i],s)&&Re.isArray(a[i])&&(a[i]=Uy(a[i])),!l)}if(Re.isFormData(e)&&Re.isFunction(e.entries)){const n={};return Re.forEachEntry(e,(o,a)=>{t(By(o),a,n,0)}),n}return null}function zy(e,t,n){if(Re.isString(e))try{return(t||JSON.parse)(e),Re.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const ai={transitional:tm,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",a=o.indexOf("application/json")>-1,s=Re.isObject(t);if(s&&Re.isHTMLForm(t)&&(t=new FormData(t)),Re.isFormData(t))return a?JSON.stringify(nm(t)):t;if(Re.isArrayBuffer(t)||Re.isBuffer(t)||Re.isStream(t)||Re.isFile(t)||Re.isBlob(t)||Re.isReadableStream(t))return t;if(Re.isArrayBufferView(t))return t.buffer;if(Re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Fy(t,this.formSerializer).toString();if((l=Re.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return yl(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||a?(n.setContentType("application/json",!1),zy(t)):t}],transformResponse:[function(t){const n=this.transitional||ai.transitional,o=n&&n.forcedJSONParsing,a=this.responseType==="json";if(Re.isResponse(t)||Re.isReadableStream(t))return t;if(t&&Re.isString(t)&&(o&&!this.responseType||a)){const i=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?wt.from(l,wt.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bn.classes.FormData,Blob:Bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Re.forEach(["delete","get","head","post","put","patch"],e=>{ai.headers[e]={}});const Vy=Re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wy=e=>{const t={};let n,o,a;return e&&e.split(`
`).forEach(function(i){a=i.indexOf(":"),n=i.substring(0,a).trim().toLowerCase(),o=i.substring(a+1).trim(),!(!n||t[n]&&Vy[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},om=Symbol("internals");function si(e){return e&&String(e).trim().toLowerCase()}function bl(e){return e===!1||e==null?e:Re.isArray(e)?e.map(bl):String(e)}function Hy(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const jy=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function hc(e,t,n,o,a){if(Re.isFunction(o))return o.call(this,t,n);if(a&&(t=n),!!Re.isString(t)){if(Re.isString(o))return t.indexOf(o)!==-1;if(Re.isRegExp(o))return o.test(t)}}function Gy(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function qy(e,t){const n=Re.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(a,s,i){return this[o].call(this,t,a,s,i)},configurable:!0})})}let so=class{constructor(t){t&&this.set(t)}set(t,n,o){const a=this;function s(l,d,g){const f=si(d);if(!f)throw new Error("header name must be a non-empty string");const m=Re.findKey(a,f);(!m||a[m]===void 0||g===!0||g===void 0&&a[m]!==!1)&&(a[m||d]=bl(l))}const i=(l,d)=>Re.forEach(l,(g,f)=>s(g,f,d));if(Re.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(Re.isString(t)&&(t=t.trim())&&!jy(t))i(Wy(t),n);else if(Re.isObject(t)&&Re.isIterable(t)){let l={},d,g;for(const f of t){if(!Re.isArray(f))throw TypeError("Object iterator must return a key-value pair");l[g=f[0]]=(d=l[g])?Re.isArray(d)?[...d,f[1]]:[d,f[1]]:f[1]}i(l,n)}else t!=null&&s(n,t,o);return this}get(t,n){if(t=si(t),t){const o=Re.findKey(this,t);if(o){const a=this[o];if(!n)return a;if(n===!0)return Hy(a);if(Re.isFunction(n))return n.call(this,a,o);if(Re.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=si(t),t){const o=Re.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||hc(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let a=!1;function s(i){if(i=si(i),i){const l=Re.findKey(o,i);l&&(!n||hc(o,o[l],l,n))&&(delete o[l],a=!0)}}return Re.isArray(t)?t.forEach(s):s(t),a}clear(t){const n=Object.keys(this);let o=n.length,a=!1;for(;o--;){const s=n[o];(!t||hc(this,this[s],s,t,!0))&&(delete this[s],a=!0)}return a}normalize(t){const n=this,o={};return Re.forEach(this,(a,s)=>{const i=Re.findKey(o,s);if(i){n[i]=bl(a),delete n[s];return}const l=t?Gy(s):String(s).trim();l!==s&&delete n[s],n[l]=bl(a),o[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Re.forEach(this,(o,a)=>{o!=null&&o!==!1&&(n[a]=t&&Re.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[om]=this[om]={accessors:{}}).accessors,a=this.prototype;function s(i){const l=si(i);o[l]||(qy(a,i),o[l]=!0)}return Re.isArray(t)?t.forEach(s):s(t),this}};so.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Re.reduceDescriptors(so.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),Re.freezeMethods(so);function _c(e,t){const n=this||ai,o=t||n,a=so.from(o.headers);let s=o.data;return Re.forEach(e,function(l){s=l.call(n,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function am(e){return!!(e&&e.__CANCEL__)}function Xs(e,t,n){wt.call(this,e??"canceled",wt.ERR_CANCELED,t,n),this.name="CanceledError"}Re.inherits(Xs,wt,{__CANCEL__:!0});function sm(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new wt("Request failed with status code "+n.status,[wt.ERR_BAD_REQUEST,wt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Yy(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ky(e,t){e=e||10;const n=new Array(e),o=new Array(e);let a=0,s=0,i;return t=t!==void 0?t:1e3,function(d){const g=Date.now(),f=o[s];i||(i=g),n[a]=d,o[a]=g;let m=s,w=0;for(;m!==a;)w+=n[m++],m=m%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),g-i<t)return;const b=f&&g-f;return b?Math.round(w*1e3/b):void 0}}function Jy(e,t){let n=0,o=1e3/t,a,s;const i=(g,f=Date.now())=>{n=f,a=null,s&&(clearTimeout(s),s=null),e(...g)};return[(...g)=>{const f=Date.now(),m=f-n;m>=o?i(g,f):(a=g,s||(s=setTimeout(()=>{s=null,i(a)},o-m)))},()=>a&&i(a)]}const wl=(e,t,n=3)=>{let o=0;const a=Ky(50,250);return Jy(s=>{const i=s.loaded,l=s.lengthComputable?s.total:void 0,d=i-o,g=a(d),f=i<=l;o=i;const m={loaded:i,total:l,progress:l?i/l:void 0,bytes:d,rate:g||void 0,estimated:g&&l&&f?(l-i)/g:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},rm=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},im=e=>(...t)=>Re.asap(()=>e(...t)),Xy=Bn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Bn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Bn.origin),Bn.navigator&&/(msie|trident)/i.test(Bn.navigator.userAgent)):()=>!0,Qy=Bn.hasStandardBrowserEnv?{write(e,t,n,o,a,s){const i=[e+"="+encodeURIComponent(t)];Re.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Re.isString(o)&&i.push("path="+o),Re.isString(a)&&i.push("domain="+a),s===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zy(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function eb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lm(e,t,n){let o=!Zy(t);return e&&(o||n==!1)?eb(e,t):t}const um=e=>e instanceof so?{...e}:e;function xs(e,t){t=t||{};const n={};function o(g,f,m,w){return Re.isPlainObject(g)&&Re.isPlainObject(f)?Re.merge.call({caseless:w},g,f):Re.isPlainObject(f)?Re.merge({},f):Re.isArray(f)?f.slice():f}function a(g,f,m,w){if(Re.isUndefined(f)){if(!Re.isUndefined(g))return o(void 0,g,m,w)}else return o(g,f,m,w)}function s(g,f){if(!Re.isUndefined(f))return o(void 0,f)}function i(g,f){if(Re.isUndefined(f)){if(!Re.isUndefined(g))return o(void 0,g)}else return o(void 0,f)}function l(g,f,m){if(m in t)return o(g,f);if(m in e)return o(void 0,g)}const d={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(g,f,m)=>a(um(g),um(f),m,!0)};return Re.forEach(Object.keys({...e,...t}),function(f){const m=d[f]||a,w=m(e[f],t[f],f);Re.isUndefined(w)&&m!==l||(n[f]=w)}),n}const cm=e=>{const t=xs({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:s,headers:i,auth:l}=t;t.headers=i=so.from(i),t.url=Zg(lm(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(Re.isFormData(n)){if(Bn.hasStandardBrowserEnv||Bn.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[g,...f]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([g||"multipart/form-data",...f].join("; "))}}if(Bn.hasStandardBrowserEnv&&(o&&Re.isFunction(o)&&(o=o(t)),o||o!==!1&&Xy(t.url))){const g=a&&s&&Qy.read(s);g&&i.set(a,g)}return t},tb=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const a=cm(e);let s=a.data;const i=so.from(a.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:g}=a,f,m,w,b,T;function E(){b&&b(),T&&T(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let I=new XMLHttpRequest;I.open(a.method.toUpperCase(),a.url,!0),I.timeout=a.timeout;function P(){if(!I)return;const pe=so.from("getAllResponseHeaders"in I&&I.getAllResponseHeaders()),V={data:!l||l==="text"||l==="json"?I.responseText:I.response,status:I.status,statusText:I.statusText,headers:pe,config:e,request:I};sm(function(O){n(O),E()},function(O){o(O),E()},V),I=null}"onloadend"in I?I.onloadend=P:I.onreadystatechange=function(){!I||I.readyState!==4||I.status===0&&!(I.responseURL&&I.responseURL.indexOf("file:")===0)||setTimeout(P)},I.onabort=function(){I&&(o(new wt("Request aborted",wt.ECONNABORTED,e,I)),I=null)},I.onerror=function(){o(new wt("Network Error",wt.ERR_NETWORK,e,I)),I=null},I.ontimeout=function(){let D=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const V=a.transitional||tm;a.timeoutErrorMessage&&(D=a.timeoutErrorMessage),o(new wt(D,V.clarifyTimeoutError?wt.ETIMEDOUT:wt.ECONNABORTED,e,I)),I=null},s===void 0&&i.setContentType(null),"setRequestHeader"in I&&Re.forEach(i.toJSON(),function(D,V){I.setRequestHeader(V,D)}),Re.isUndefined(a.withCredentials)||(I.withCredentials=!!a.withCredentials),l&&l!=="json"&&(I.responseType=a.responseType),g&&([w,T]=wl(g,!0),I.addEventListener("progress",w)),d&&I.upload&&([m,b]=wl(d),I.upload.addEventListener("progress",m),I.upload.addEventListener("loadend",b)),(a.cancelToken||a.signal)&&(f=pe=>{I&&(o(!pe||pe.type?new Xs(null,e,I):pe),I.abort(),I=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const N=Yy(a.url);if(N&&Bn.protocols.indexOf(N)===-1){o(new wt("Unsupported protocol "+N+":",wt.ERR_BAD_REQUEST,e));return}I.send(s||null)})},nb=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,a;const s=function(g){if(!a){a=!0,l();const f=g instanceof Error?g:this.reason;o.abort(f instanceof wt?f:new Xs(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,s(new wt(`timeout ${t} of ms exceeded`,wt.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(g=>{g.unsubscribe?g.unsubscribe(s):g.removeEventListener("abort",s)}),e=null)};e.forEach(g=>g.addEventListener("abort",s));const{signal:d}=o;return d.unsubscribe=()=>Re.asap(l),d}},ob=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,a;for(;o<n;)a=o+t,yield e.slice(o,a),o=a},ab=async function*(e,t){for await(const n of sb(e))yield*ob(n,t)},sb=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},dm=(e,t,n,o)=>{const a=ab(e,t);let s=0,i,l=d=>{i||(i=!0,o&&o(d))};return new ReadableStream({async pull(d){try{const{done:g,value:f}=await a.next();if(g){l(),d.close();return}let m=f.byteLength;if(n){let w=s+=m;n(w)}d.enqueue(new Uint8Array(f))}catch(g){throw l(g),g}},cancel(d){return l(d),a.return()}},{highWaterMark:2})},xl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",pm=xl&&typeof ReadableStream=="function",rb=xl&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),fm=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ib=pm&&fm(()=>{let e=!1;const t=new Request(Bn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),gm=64*1024,yc=pm&&fm(()=>Re.isReadableStream(new Response("").body)),Sl={stream:yc&&(e=>e.body)};xl&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Sl[t]&&(Sl[t]=Re.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new wt(`Response type '${t}' is not supported`,wt.ERR_NOT_SUPPORT,o)})})})(new Response);const lb=async e=>{if(e==null)return 0;if(Re.isBlob(e))return e.size;if(Re.isSpecCompliantForm(e))return(await new Request(Bn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Re.isArrayBufferView(e)||Re.isArrayBuffer(e))return e.byteLength;if(Re.isURLSearchParams(e)&&(e=e+""),Re.isString(e))return(await rb(e)).byteLength},ub=async(e,t)=>{const n=Re.toFiniteNumber(e.getContentLength());return n??lb(t)},bc={http:Ly,xhr:tb,fetch:xl&&(async e=>{let{url:t,method:n,data:o,signal:a,cancelToken:s,timeout:i,onDownloadProgress:l,onUploadProgress:d,responseType:g,headers:f,withCredentials:m="same-origin",fetchOptions:w}=cm(e);g=g?(g+"").toLowerCase():"text";let b=nb([a,s&&s.toAbortSignal()],i),T;const E=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let I;try{if(d&&ib&&n!=="get"&&n!=="head"&&(I=await ub(f,o))!==0){let V=new Request(t,{method:"POST",body:o,duplex:"half"}),fe;if(Re.isFormData(o)&&(fe=V.headers.get("content-type"))&&f.setContentType(fe),V.body){const[O,se]=rm(I,wl(im(d)));o=dm(V.body,gm,O,se)}}Re.isString(m)||(m=m?"include":"omit");const P="credentials"in Request.prototype;T=new Request(t,{...w,signal:b,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:o,duplex:"half",credentials:P?m:void 0});let N=await fetch(T,w);const pe=yc&&(g==="stream"||g==="response");if(yc&&(l||pe&&E)){const V={};["status","statusText","headers"].forEach(le=>{V[le]=N[le]});const fe=Re.toFiniteNumber(N.headers.get("content-length")),[O,se]=l&&rm(fe,wl(im(l),!0))||[];N=new Response(dm(N.body,gm,O,()=>{se&&se(),E&&E()}),V)}g=g||"text";let D=await Sl[Re.findKey(Sl,g)||"text"](N,e);return!pe&&E&&E(),await new Promise((V,fe)=>{sm(V,fe,{data:D,headers:so.from(N.headers),status:N.status,statusText:N.statusText,config:e,request:T})})}catch(P){throw E&&E(),P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new wt("Network Error",wt.ERR_NETWORK,e,T),{cause:P.cause||P}):wt.from(P,P&&P.code,e,T)}})};Re.forEach(bc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mm=e=>`- ${e}`,cb=e=>Re.isFunction(e)||e===null||e===!1,vm={getAdapter:e=>{e=Re.isArray(e)?e:[e];const{length:t}=e;let n,o;const a={};for(let s=0;s<t;s++){n=e[s];let i;if(o=n,!cb(n)&&(o=bc[(i=String(n)).toLowerCase()],o===void 0))throw new wt(`Unknown adapter '${i}'`);if(o)break;a[i||"#"+s]=o}if(!o){const s=Object.entries(a).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?s.length>1?`since :
`+s.map(mm).join(`
`):" "+mm(s[0]):"as no adapter specified";throw new wt("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o},adapters:bc};function wc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xs(null,e)}function hm(e){return wc(e),e.headers=so.from(e.headers),e.data=_c.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),vm.getAdapter(e.adapter||ai.adapter)(e).then(function(o){return wc(e),o.data=_c.call(e,e.transformResponse,o),o.headers=so.from(o.headers),o},function(o){return am(o)||(wc(e),o&&o.response&&(o.response.data=_c.call(e,e.transformResponse,o.response),o.response.headers=so.from(o.response.headers))),Promise.reject(o)})}const _m="1.11.0",Tl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tl[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const ym={};Tl.transitional=function(t,n,o){function a(s,i){return"[Axios v"+_m+"] Transitional option '"+s+"'"+i+(o?". "+o:"")}return(s,i,l)=>{if(t===!1)throw new wt(a(i," has been removed"+(n?" in "+n:"")),wt.ERR_DEPRECATED);return n&&!ym[i]&&(ym[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,l):!0}},Tl.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function db(e,t,n){if(typeof e!="object")throw new wt("options must be an object",wt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let a=o.length;for(;a-- >0;){const s=o[a],i=t[s];if(i){const l=e[s],d=l===void 0||i(l,s,e);if(d!==!0)throw new wt("option "+s+" must be "+d,wt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new wt("Unknown option "+s,wt.ERR_BAD_OPTION)}}const kl={assertOptions:db,validators:Tl},Zo=kl.validators;let Ss=class{constructor(t){this.defaults=t||{},this.interceptors={request:new em,response:new em}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const s=a.stack?a.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
`+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xs(this.defaults,n);const{transitional:o,paramsSerializer:a,headers:s}=n;o!==void 0&&kl.assertOptions(o,{silentJSONParsing:Zo.transitional(Zo.boolean),forcedJSONParsing:Zo.transitional(Zo.boolean),clarifyTimeoutError:Zo.transitional(Zo.boolean)},!1),a!=null&&(Re.isFunction(a)?n.paramsSerializer={serialize:a}:kl.assertOptions(a,{encode:Zo.function,serialize:Zo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),kl.assertOptions(n,{baseUrl:Zo.spelling("baseURL"),withXsrfToken:Zo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&Re.merge(s.common,s[n.method]);s&&Re.forEach(["delete","get","head","post","put","patch","common"],T=>{delete s[T]}),n.headers=so.concat(i,s);const l=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(d=d&&E.synchronous,l.unshift(E.fulfilled,E.rejected))});const g=[];this.interceptors.response.forEach(function(E){g.push(E.fulfilled,E.rejected)});let f,m=0,w;if(!d){const T=[hm.bind(this),void 0];for(T.unshift(...l),T.push(...g),w=T.length,f=Promise.resolve(n);m<w;)f=f.then(T[m++],T[m++]);return f}w=l.length;let b=n;for(m=0;m<w;){const T=l[m++],E=l[m++];try{b=T(b)}catch(I){E.call(this,I);break}}try{f=hm.call(this,b)}catch(T){return Promise.reject(T)}for(m=0,w=g.length;m<w;)f=f.then(g[m++],g[m++]);return f}getUri(t){t=xs(this.defaults,t);const n=lm(t.baseURL,t.url,t.allowAbsoluteUrls);return Zg(n,t.params,t.paramsSerializer)}};Re.forEach(["delete","get","head","options"],function(t){Ss.prototype[t]=function(n,o){return this.request(xs(o||{},{method:t,url:n,data:(o||{}).data}))}}),Re.forEach(["post","put","patch"],function(t){function n(o){return function(s,i,l){return this.request(xs(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Ss.prototype[t]=n(),Ss.prototype[t+"Form"]=n(!0)});let pb=class Kv{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(a=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](a);o._listeners=null}),this.promise.then=a=>{let s;const i=new Promise(l=>{o.subscribe(l),s=l}).then(a);return i.cancel=function(){o.unsubscribe(s)},i},t(function(s,i,l){o.reason||(o.reason=new Xs(s,i,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Kv(function(a){t=a}),cancel:t}}};function fb(e){return function(n){return e.apply(null,n)}}function gb(e){return Re.isObject(e)&&e.isAxiosError===!0}const xc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xc).forEach(([e,t])=>{xc[t]=e});function bm(e){const t=new Ss(e),n=Fg(Ss.prototype.request,t);return Re.extend(n,Ss.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return bm(xs(e,a))},n}const vn=bm(ai);vn.Axios=Ss,vn.CanceledError=Xs,vn.CancelToken=pb,vn.isCancel=am,vn.VERSION=_m,vn.toFormData=yl,vn.AxiosError=wt,vn.Cancel=vn.CanceledError,vn.all=function(t){return Promise.all(t)},vn.spread=fb,vn.isAxiosError=gb,vn.mergeConfig=xs,vn.AxiosHeaders=so,vn.formToJSON=e=>nm(Re.isHTMLForm(e)?new FormData(e):e),vn.getAdapter=vm.getAdapter,vn.HttpStatusCode=xc,vn.default=vn;const{Axios:VD,AxiosError:WD,CanceledError:HD,isCancel:jD,CancelToken:GD,VERSION:qD,all:YD,Cancel:KD,isAxiosError:JD,spread:XD,toFormData:QD,AxiosHeaders:ZD,HttpStatusCode:eP,formToJSON:tP,getAdapter:nP,mergeConfig:oP}=vn,Ye=vn.create({baseURL:"/weilin/prompt_ui/api",timeout:3e4,headers:{"Content-Type":"application/json"}});Ye.interceptors.request.use(e=>e,e=>Promise.reject(e)),Ye.interceptors.response.use(e=>e.data,e=>Promise.reject(e));const Cl={getUserSetting:()=>Ye({url:"/user_init/get_settings",method:"get"}),setUserLanguage:e=>Ye({url:"/user_init/set_user_lang",method:"post",data:{user_lang:e}}),startPanel:()=>Ye({url:"/panel/start",method:"post"})},wm=()=>cc(),ri=y2({legacy:!1,locale:"zh_CN",fallbackLocale:"zh_CN",messages:{zh_CN:N2,en_US:F2}}),mb=()=>{const e=wm();Cl.getUserSetting().then(t=>{var o;e.setUserSetting(t.data);const n=((o=e.userSetting)==null?void 0:o.user_lang)||"zh_CN";ri.global.locale.value=n})},vb=e=>{ri.global.locale.value=e,wm().setUserSetting({user_lang:e})},hb=()=>{mb()},_b={name:"popmessage",props:{type:{type:String,default:"success"},str:{type:String,default:"登陆成功"}},setup(){const e={warn:{color:"#E6A23C",backgroundColor:"rgb(253, 246, 236)",borderColor:"rgb(250, 236, 216)"},error:{color:"#F56C6C",backgroundColor:"rgb(254, 240, 240)",borderColor:"rgb(253, 226, 226)"},success:{color:"#67C23A",backgroundColor:"rgb(240, 249, 235)",borderColor:"rgb(225, 243, 216)"}},t=S(!1);return Dt(()=>{t.value=!0}),{style:e,visible:t}}},yb={class:"text"};function bb(e,t,n,o,a,s){return xe((C(),L("div",{class:"pop-message",style:Ft(o.style[n.type])},[r("i",{class:Ve(["icon",[o.style[n.type].icon]])},null,2),r("span",yb,y(n.str),1)],4)),[[Hs,o.visible]])}const wb=Vt(_b,[["render",bb],["__scopeId","data-v-466143c4"]]),Sc=document.createElement("div");document.body.appendChild(Sc);let Tc=null;const de=({str:e,type:t,name:n=""})=>{let o=ri.global.t(e);n.length>0&&(o=ri.global.t(e,{name:n}));const a=st(wb,{str:o,type:t});Sf(a,Sc),Tc&&clearTimeout(Tc),Tc=setTimeout(()=>{Sf(null,Sc)},2e3)},xb={class:"language-selector-content"},Sb=["onClick"],Tb={class:"lang-name"},kb=Vt({__name:"LanguageSwitcher",emits:["close"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(null),s=cc(),i=$t(()=>s.userSetting.user_lang),l=[{code:"zh_CN",name:"简体中文"},{code:"en_US",name:"English"}],d=n,g=w=>{f(w),d("close",{})},f=w=>{Cl.setUserLanguage(w).then(()=>{vb(w),window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*"),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.setLanguageSuccess"})}).catch(()=>{de({type:"warn",str:"message.setLanguageFailed"})})};return t({setPosition:w=>{if(!a.value)return;const b=a.value;b.style.position="fixed",b.style.top=`${w.bottom}px`}}),(w,b)=>(C(),L("div",{class:"language-selector",ref_key:"selectorRef",ref:a},[r("div",xb,[(C(),L(qe,null,ot(l,(T,E)=>r("div",{style:Ft({"margin-top":E===0?"0":"2px"}),key:T.code,class:Ve(["language-option",{active:i.value===T.code}]),onClick:I=>g(T.code)},[r("span",Tb,y(T.name),1)],14,Sb)),64))])],512))}},[["__scopeId","data-v-ed3849db"]]),Ea="weilin_prompt_ui_",Qs=Vt({__name:"Dialog",props:{modelValue:Boolean,title:{type:String,default:"标题"},closeOnClickOverlay:{type:Boolean,default:!1},width:{type:String,default:"60%"}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=t,a=()=>{o("update:modelValue",!1)},s=()=>{n.closeOnClickOverlay&&a()};return(i,l)=>(C(),Zt(Jd,{to:"#weilin_comfyui_tools_prompt_ui_div"},[st(nl,{name:`${Ea}dialog-fade`},{default:Ut(()=>[e.modelValue?(C(),L("div",{key:0,class:Ve(`${Ea}dialog-overlay`),onClick:s},[st(nl,{name:`${Ea}dialog-slide`},{default:Ut(()=>[e.modelValue?(C(),L("div",{key:0,style:Ft({width:e.width}),class:Ve(`${Ea}dialog`),onClick:l[0]||(l[0]=vt(()=>{},["stop"]))},[r("div",{class:Ve(`${Ea}dialog-header`)},[r("h3",{class:Ve(`${Ea}dialog-title`)},y(e.title),3),r("button",{class:Ve(`${Ea}dialog-close`),onClick:a},[...l[1]||(l[1]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],2)],2),r("div",{class:Ve(`${Ea}dialog-content`)},[Pr(i.$slots,"default")],2),i.$slots.footer?(C(),L("div",{key:0,class:Ve(`${Ea}dialog-footer`)},[Pr(i.$slots,"footer")],2)):Ae("",!0)],6)):Ae("",!0)]),_:3},8,["name"])],2)):Ae("",!0)]),_:3},8,["name"])]))}},[["__scopeId","data-v-48cece99"]]),ro={getTranslateLocal:e=>Ye({url:"/prompt/local/translate",method:"post",data:{phrase:e}}),getTranslateSetting:()=>Ye({url:"/translate/get/setting",method:"post",data:{}}),applyTranslateSetting:e=>Ye({url:"/translate/apply_setting",method:"post",data:{setting:e}}),getTranslateBuktSetting:()=>Ye({url:"/translate/get/tran_setting",method:"post",data:{}}),saveTranslateSetting:(e,t,n)=>Ye({url:"/translate/save_tran/setting",method:"post",data:{service:e,source_lang:t,target_lang:n}}),translaterText:(e,t)=>Ye({url:"/translate/tran/text",method:"post",timeout:0,data:{str_object:e,text:t}}),translaterInputText:(e,t)=>Ye({url:"/translate/tran/input",method:"post",timeout:0,data:{str_object:e,text:t}})},kc={getAutocomplete:e=>Ye({url:"/prompt/fast/autocomplete",method:"post",data:{query:e}}),getAutocompleteLimit:()=>Ye({url:"/get/setting/get_auto_limit_setting",method:"post"}),updateAutocompleteLimit:e=>Ye({url:"/update/setting/update_auto_limit_setting",method:"post",data:{limit:e}})},ii={updateOpenAiSetting:e=>Ye({url:"/prompt/openai/update_settings",method:"post",data:e}),addOpenAiSetting:e=>Ye({url:"/prompt/openai/add_setting",method:"post",data:e}),deleteOpenAiSetting:e=>Ye({url:"/prompt/openai/delete_setting",method:"post",data:e}),setOpenAiSelect:e=>Ye({url:"/prompt/openai/set_select",method:"post",data:e}),getOpenAiSetting:()=>Ye({url:"/prompt/openai/get_settings",method:"get"})},Cb=["alibaba","bing","youdao"],li=[{language:"chinese",translator:"zh"},{language:"english",translator:"en"},{language:"arabic",translator:"ar"},{language:"russian",translator:"ru"},{language:"french",translator:"fr"},{language:"german",translator:"de"},{language:"spanish",translator:"es"},{language:"portuguese",translator:"pt"},{language:"italian",translator:"it"},{language:"japanese",translator:"ja"},{language:"korean",translator:"ko"},{language:"greek",translator:"el"},{language:"dutch",translator:"nl"},{language:"hindi",translator:"hi"},{language:"turkish",translator:"tr"},{language:"malay",translator:"ms"},{language:"thai",translator:"th"},{language:"vietnamese",translator:"vi"},{language:"indonesian",translator:"id"},{language:"hebrew",translator:"he"},{language:"polish",translator:"pl"},{language:"mongolian",translator:"mn"},{language:"czech",translator:"cs"},{language:"hungarian",translator:"hu"},{language:"estonian",translator:"et"},{language:"bulgarian",translator:"bg"},{language:"danish",translator:"da"},{language:"finnish",translator:"fi"},{language:"romanian",translator:"ro"},{language:"swedish",translator:"sv"},{language:"slovenian",translator:"sl"},{language:"persian/farsi",translator:"fa"},{language:"bosnian",translator:"bs"},{language:"serbian",translator:"sr"},{language:"fijian",translator:"fj"},{language:"filipino",translator:"tl"},{language:"haitiancreole",translator:"ht"},{language:"catalan",translator:"ca"},{language:"croatian",translator:"hr"},{language:"latvian",translator:"lv"},{language:"lithuanian",translator:"lt"},{language:"urdu",translator:"ur"},{language:"ukrainian",translator:"uk"},{language:"welsh",translator:"cy"},{language:"tahiti",translator:"ty"},{language:"tongan",translator:"to"},{language:"swahili",translator:"sw"},{language:"samoan",translator:"sm"},{language:"slovak",translator:"sk"},{language:"afrikaans",translator:"af"},{language:"norwegian",translator:"no"},{language:"bengali",translator:"bn"},{language:"malagasy",translator:"mg"},{language:"maltese",translator:"mt"},{language:"queretaro otomi",translator:"otq"},{language:"klingon/tlhingan hol",translator:"tlh"},{language:"gujarati",translator:"gu"},{language:"tamil",translator:"ta"},{language:"telugu",translator:"te"},{language:"punjabi",translator:"pa"},{language:"amharic",translator:"am"},{language:"azerbaijani",translator:"az"},{language:"bashkir",translator:"ba"},{language:"belarusian",translator:"be"},{language:"cebuano",translator:"ceb"},{language:"chuvash",translator:"cv"},{language:"esperanto",translator:"eo"},{language:"basque",translator:"eu"},{language:"irish",translator:"ga"}],Cc={getAiServerSetting:()=>Ye({url:"/ai_server/get_settings",method:"post",data:{}}),updateAiServerSetting:e=>Ye({url:"/ai_server/update_settings",method:"post",data:e}),getAiModels:()=>Ye({url:"/ai_server/get_ai_models",method:"post",data:{}})},Eb={class:"ai-server-setting-panel"},$b={class:"weilin-comfyui-translater-setting-box"},Ab={class:"weilin-comfyui-setting-item"},Lb={class:"weilin-comfyui-setting-item"},Ib={class:"weilin-comfyui-setting-item"},Mb={style:{display:"flex",gap:"10px"}},Ob=["value"],Db={class:"weilin-comfyui-translater-setting-box"},Pb={class:"weilin-comfyui-setting-small-titile"},Rb={class:"weilin-comfyui-language-selectors"},Nb={class:"weilin-comfyui-setting-item"},Fb=["index","value"],Bb={class:"weilin-comfyui-setting-item"},Ub=["index","value"],zb={class:"weilin-comfyui-translater-setting-box"},Vb={class:"weilin-comfyui-setting-small-titile"},Wb={class:"weilin-comfyui-setting-item"},Hb=["placeholder"],jb={class:"weilin-comfyui-setting-item"},Gb=["placeholder"],qb=Vt({__name:"ai_server_setting",setup(e){const{t}=Kt(),n=S(""),o=S(""),a=S(""),s=S(""),i=S(""),l=S({api_key:"",base_url:"https://api.siliconflow.cn/v1",model:"",temperature:0,top_p:.7,max_tokens:4096}),d=S({object:"list",data:[]}),g=()=>{Cc.updateAiServerSetting(l.value).then(E=>{E.info==="ok"?de({type:"success",str:"message.saveSuccess"}):de({type:"warn",str:"message.saveFailed"})}).catch(()=>{de({type:"warn",str:"message.saveFailed"})})},f=()=>{Cc.getAiServerSetting().then(E=>{l.value=E.data}).catch(()=>{de({type:"warn",str:"message.getTranslaterFail"})})},m=()=>{Cc.getAiModels().then(E=>{d.value=E.data}).catch(()=>{de({type:"warn",str:"message.getTranslaterFail"})})},w=()=>{ro.getTranslateBuktSetting().then(E=>{n.value=E.data.translate_service,o.value=E.data.translate_source_lang,a.value=E.data.translate_target_lang}).catch(()=>{de({type:"warn",str:"message.getTranslaterFail"})})},b=()=>{ro.saveTranslateSetting(n.value,o.value,a.value).then(E=>{E.info==="ok"?de({type:"success",str:"message.saveSuccess"}):de({type:"warn",str:"message.saveFailed"})}).catch(()=>{de({type:"warn",str:"message.saveFailed"})})},T=()=>{ro.translaterInputText("",i.value).then(E=>{E&&E.data&&(s.value=E.data)}).catch(()=>{de({type:"warn",str:"message.translaterTestFail"})})};return Dt(()=>{f(),m(),w()}),(E,I)=>(C(),L("div",Eb,[r("div",$b,[r("div",Ab,[I[7]||(I[7]=r("label",null,"API Key",-1)),xe(r("input",{type:"text","onUpdate:modelValue":I[0]||(I[0]=P=>l.value.api_key=P),placeholder:"请输入API Key",class:"weilin-comfyui-common-select"},null,512),[[ze,l.value.api_key]])]),r("div",Lb,[I[9]||(I[9]=r("label",null,"AI平台",-1)),xe(r("select",{"onUpdate:modelValue":I[1]||(I[1]=P=>l.value.base_url=P),disabled:"",class:"weilin-comfyui-common-select"},[...I[8]||(I[8]=[r("option",{value:"https://api.siliconflow.cn/v1"},"硅基AI",-1)])],512),[[an,l.value.base_url]])]),r("div",Ib,[I[10]||(I[10]=r("label",null,"Model(获取前请先填写完API Key点击保存后再获取!)",-1)),r("div",Mb,[xe(r("select",{"onUpdate:modelValue":I[2]||(I[2]=P=>l.value.model=P),class:"weilin-comfyui-common-select",style:{flex:"1"}},[(C(!0),L(qe,null,ot(d.value.data,P=>(C(),L("option",{key:P.id,value:P.id},y(P.id),9,Ob))),128))],512),[[an,l.value.model]]),r("button",{type:"button",class:"weilin-comfyui-install-button",style:{width:"auto","min-width":"120px"},onClick:m}," 获取模型列表 ")])]),r("button",{class:"weilin-comfyui-save-button",onClick:g}," 保存AI平台设置 ")]),r("div",Db,[r("div",Pb,y(h(t)("promptBox.settings.translaterSetting")),1),r("div",Rb,[r("div",Nb,[r("label",null,y(h(t)("promptBox.settings.translaterLangSourceSetting")),1),xe(r("select",{"onUpdate:modelValue":I[3]||(I[3]=P=>o.value=P)},[(C(!0),L(qe,null,ot(h(li),(P,N)=>(C(),L("option",{index:N,key:"lan-item_"+N,value:P.translator},y(h(t)("translaterLanguage."+P.language)),9,Fb))),128))],512),[[an,o.value]])]),r("div",Bb,[r("label",null,y(h(t)("promptBox.settings.translaterLangTargeSetting")),1),xe(r("select",{"onUpdate:modelValue":I[4]||(I[4]=P=>a.value=P)},[(C(!0),L(qe,null,ot(h(li),(P,N)=>(C(),L("option",{index:N,key:"lan-mu-item_"+N,value:P.translator},y(h(t)("translaterLanguage."+P.language)),9,Ub))),128))],512),[[an,a.value]])])]),r("button",{class:"weilin-comfyui-install-button",onClick:b},y(h(t)("promptBox.settings.saveTranslaterSetting")),1)]),r("div",zb,[r("div",Vb,y(h(t)("promptBox.settings.testTranslaterTitle")),1),r("div",Wb,[r("label",null,y(h(t)("promptBox.settings.inputTestTranslater")),1),xe(r("input",{type:"text","onUpdate:modelValue":I[5]||(I[5]=P=>i.value=P),placeholder:h(t)("promptBox.settings.inputTestTranslaterPlaceholder")},null,8,Hb),[[ze,i.value]])]),r("div",jb,[r("label",null,y(h(t)("promptBox.settings.outPutTestTranslater")),1),xe(r("input",{type:"text","onUpdate:modelValue":I[6]||(I[6]=P=>s.value=P),readonly:"",placeholder:h(t)("promptBox.settings.outPutTestTranslaterPlaceholder")},null,8,Gb),[[ze,s.value]])]),r("button",{class:"weilin-comfyui-install-button",onClick:T},y(h(t)("promptBox.settings.testingTranslater")),1)])]))}},[["__scopeId","data-v-8663ecc8"]]),Yb={class:"weilin-comfyui-settings-content"},Kb={class:"weilin-comfyui-settings-sidebar"},Jb={class:"weilin-comfyui-settings-main"},Xb={key:0},Qb={class:"weilin-comfyui-setting-select"},Zb={value:"translater"},e4={class:"weilin-comfyui-translator-settings"},t4={key:0,class:"weilin-comfyui-group-box"},n4={key:1,class:"weilin-comfyui-group-box"},o4={class:"weilin-comfyui-group-title"},a4={class:"weilin-comfyui-note-top"},s4={class:"weilin-comfyui-setting-item"},r4={value:"auto"},i4={value:"chinese_simplified"},l4={value:"english"},u4={class:"weilin-comfyui-setting-item"},c4={value:"chinese_simplified"},d4={value:"english"},p4={key:2,class:"weilin-comfyui-group-box"},f4={class:"weilin-comfyui-group-title"},g4={class:"weilin-comfyui-translater-setting-box"},m4={class:"weilin-comfyui-setting-small-titile"},v4={class:"weilin-comfyui-setting-item"},h4=["index","value"],_4={class:"weilin-comfyui-language-selectors"},y4={class:"weilin-comfyui-setting-item"},b4=["index","value"],w4={class:"weilin-comfyui-setting-item"},x4=["index","value"],S4={class:"weilin-comfyui-tranlater-text-box"},T4={class:"weilin-comfyui-setting-small-titile"},k4={class:"weilin-comfyui-setting-item"},C4=["placeholder"],E4={class:"weilin-comfyui-setting-item"},$4=["placeholder"],A4={key:1},L4={class:"weilin-comfyui-floating-ball-settings"},I4={class:"weilin-comfyui-setting-item"},M4=["placeholder"],O4={class:"weilin-comfyui-setting-item"},D4=["placeholder"],P4={class:"weilin-comfyui-setting-item"},R4=["placeholder"],N4={key:2},F4={class:"weilin-comfyui-floating-ball-settings"},B4={class:"weilin-comfyui-setting-item"},U4={class:"weilin-comfyui-setting-item"},z4={class:"weilin-comfyui-setting-item"},V4={class:"weilin-comfyui-setting-item"},W4={class:"weilin-comfyui-setting-item"},H4={class:"weilin-comfyui-setting-item"},j4={key:3},G4={class:"weilin-comfyui-floating-ball-settings",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"15px"}},q4={class:"weilin-comfyui-settings-column"},Y4={class:"weilin-comfyui-setting-item"},K4={class:"weilin-comfyui-setting-item"},J4=["placeholder"],X4={class:"weilin-comfyui-setting-item"},Q4=["placeholder"],Z4={class:"weilin-comfyui-setting-item"},ew=["placeholder"],tw={class:"weilin-comfyui-settings-column"},nw={class:"weilin-comfyui-setting-item"},ow={value:"default"},aw={value:"custom"},sw={key:0,class:"weilin-comfyui-setting-item"},rw={key:0,class:"weilin-comfyui-skin-preview"},iw=["src"],lw={class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},uw={value:"gradient"},cw={value:"transparent"},dw={key:0,class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},pw={style:{display:"flex",gap:"10px","align-items":"center"}},fw={class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},gw={key:4},mw={class:"weilin-comfyui-floating-ball-settings"},vw={class:"weilin-comfyui-setting-item"},hw={class:"weilin-comfyui-setting-item"},_w={class:"weilin-comfyui-setting-item"},yw={class:"weilin-comfyui-setting-item"},bw={class:"weilin-comfyui-setting-item"},ww={class:"weilin-comfyui-setting-item"},xw={class:"weilin-comfyui-setting-item"},Sw={key:5},Tw={class:"weilin-comfyui-openai-settings"},kw={class:"weilin-comfyui-setting-item"},Cw=["value"],Ew={class:"weilin-comfyui-config-list"},$w={class:"weilin-comfyui-config-header"},Aw={class:"weilin-comfyui-config-actions"},Lw=["onClick"],Iw=["onClick"],Mw={key:0,class:"weilin-comfyui-config-form"},Ow={class:"weilin-comfyui-form-group"},Dw=["placeholder"],Pw={class:"weilin-comfyui-form-group"},Rw=["placeholder"],Nw={class:"weilin-comfyui-form-group"},Fw=["placeholder"],Bw={class:"weilin-comfyui-form-actions"},Uw=["onClick"],zw={key:1,class:"weilin-comfyui-config-details"},Vw={key:0,class:"weilin-comfyui-config-form"},Ww={class:"weilin-comfyui-form-group"},Hw=["placeholder"],jw={class:"weilin-comfyui-form-group"},Gw=["placeholder"],qw={class:"weilin-comfyui-form-group"},Yw=["placeholder"],Kw={class:"weilin-comfyui-form-actions"},Jw={key:6},Xw={class:"weilin-comfyui-sponsor-me-settings"},Qw={key:7},Zw={class:"weilin-comfyui-start-panel-settings"},xm=Vt({__name:"setting_dialog",emits:["functionTogglesUpdated"],setup(e,{expose:t,emit:n}){const o=n,{t:a}=Kt(),s=S(!1),i=S("translator"),l=S("baidu"),d=S(""),g=S(localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english"),f=S(localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified"),m=S(localStorage.getItem("weilin_prompt_ui_floatingBallCount")||1),w=S(localStorage.getItem("weilin_prompt_ui_floatingBallSize")||66),b=S(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||w.value),T=S(localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true"),E=S(localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default"),I=S(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),P=S(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),N=S(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),pe=S(localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc"),D=S(localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50),V=S(localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true"),fe=S(localStorage.getItem("weilin_prompt_ui_period_conversion")==="true"),O=S(localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true"),se=S(localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true"),le=S(localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"),Pe=S(localStorage.getItem("weilin_prompt_ui_comma_close_autocomplete")==="true"),Ie=S(localStorage.getItem("weilin_prompt_ui_bracket_escape")==="true"),ue=S(localStorage.getItem("weilin_function_toggles_clearAll")!=="false"),we=S(localStorage.getItem("weilin_function_toggles_deleteButton")!=="false"),ne=S(localStorage.getItem("weilin_function_toggles_randomTag")!=="false"),J=S(localStorage.getItem("weilin_function_toggles_randomTagSettings")!=="false"),ie=S(localStorage.getItem("weilin_function_toggles_translateTag")!=="false"),X=S(localStorage.getItem("weilin_function_toggles_clearDisabled")!=="false"),ee=S(""),$e=S(""),ve=S(""),Z=S(0),te=S([]),be=S(!1),Te=S({api_key:"",base_url:"https://api.openai.com/v1",model:""}),he=S(!1),re=S(-1),j=S(""),oe=S(""),B=S(""),q=S(25),Y=S(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),$=S(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),A=gt=>{i.value=gt,gt==="setting_auto_complete_limit"&&ln()},W=()=>{localStorage.setItem("weilin_prompt_ui_sourceLanguage",g.value),localStorage.setItem("weilin_prompt_ui_targetLanguage",f.value),window.parent.postMessage({type:"weilin_prompt_ui_translate_setting"},"*"),de({type:"success",str:"message.saveSuccess"})},ce=()=>{localStorage.setItem("weilin_function_toggles_clearAll",ue.value),localStorage.setItem("weilin_function_toggles_deleteButton",we.value),localStorage.setItem("weilin_function_toggles_randomTag",ne.value),localStorage.setItem("weilin_function_toggles_randomTagSettings",J.value),localStorage.setItem("weilin_function_toggles_translateTag",ie.value),localStorage.setItem("weilin_function_toggles_clearDisabled",X.value),o("functionTogglesUpdated",{clearAll:ue.value,deleteButton:we.value,randomTag:ne.value,randomTagSettings:J.value,translateTag:ie.value,clearDisabled:X.value}),de({type:"success",str:"message.saveSuccess"})},Ce=gt=>{const Fe=gt.target.files[0];if(Fe){const Ue=new FileReader;Ue.onload=Lt=>{I.value=Lt.target.result,localStorage.setItem("weilin_prompt_ui_customSkinUrl",Lt.target.result)},Ue.readAsDataURL(Fe)}},Le=()=>{N.value="#6a11cb",pe.value="#2575fc"},z=()=>{if(m.value<1||w.value<5||b.value<5){de({type:"warn",str:"message.error"});return}localStorage.setItem("weilin_prompt_ui_floatingBallEnabled",T.value),localStorage.setItem("weilin_prompt_ui_floatingBallCount",m.value),localStorage.setItem("weilin_prompt_ui_floatingBallSize",w.value),localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",b.value),localStorage.setItem("weilin_prompt_ui_ballSkinType",E.value),localStorage.setItem("weilin_prompt_ui_bgType",P.value),localStorage.setItem("weilin_prompt_ui_gradientColor1",N.value),localStorage.setItem("weilin_prompt_ui_gradientColor2",pe.value),localStorage.setItem("weilin_prompt_ui_ballBorderRadius",D.value),localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",b.value),window.parent.postMessage({type:"weilin_prompt_ui_floating_ball_setting"},"*"),de({type:"success",str:"message.saveSuccess"})},k=()=>{localStorage.setItem("weilin_prompt_ui_comma_conversion",V.value),localStorage.setItem("weilin_prompt_ui_period_conversion",fe.value),localStorage.setItem("weilin_prompt_ui_bracket_conversion",O.value),localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion",se.value),localStorage.setItem("weilin_prompt_ui_underscore_to_bracket",le.value),localStorage.setItem("weilin_prompt_ui_comma_close_autocomplete",Pe.value),localStorage.setItem("weilin_prompt_ui_bracket_escape",Ie.value),de({type:"success",str:"message.saveSuccess"})},H=()=>{Cl.getUserSetting().then(gt=>{te.value=gt.data.openai_settings,Z.value=gt.data.select_openai})},Q=()=>{Te.value={api_key:"",base_url:"https://api.openai.com/v1",model:""},he.value=!1,be.value=!0},Ne=gt=>{ii.deleteOpenAiSetting({index:gt}).then(()=>{H(),de({type:"success",str:"message.deleteSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})})},De=gt=>{re.value===gt?re.value=-1:(Te.value={...te.value[gt]},re.value=gt)},ge=gt=>{ii.updateOpenAiSetting({index:gt,...Te.value}).then(()=>{H(),re.value=-1,de({type:"success",str:"message.saveSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})})},Ee=()=>{ii.addOpenAiSetting({...Te.value}).then(()=>{H(),be.value=!1,re.value=-1,de({type:"success",str:"message.saveSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})})},Ke=()=>{be.value=!1,re.value=-1},et=()=>{ii.setOpenAiSelect({index:Z.value}).then(()=>{de({type:"success",str:"message.saveSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})})},ut=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},ft=()=>{Cl.startPanel().then(()=>{de({type:"success",str:"message.startPanelSuccess"})}).catch(()=>{de({type:"warn",str:"message.startPanelFailed"})})},at=()=>{ro.getTranslateSetting().then(gt=>{localStorage.setItem("weilin_prompt_ui_translater_setting",gt.data),j.value=gt.data}).catch(()=>{de({type:"warn",str:"message.getTranslaterFail"})})},rn=()=>{ro.applyTranslateSetting(j.value).then(gt=>{gt.info==="ok"?(localStorage.setItem("weilin_prompt_ui_translater_setting",j.value),de({type:"success",str:"message.applyTranslaterSuccess"})):de({type:"warn",str:"message.applyToTranslaterFail"})}).catch(()=>{de({type:"warn",str:"message.applyTranslaterFail"})})},Rt=()=>{ro.getTranslateBuktSetting().then(gt=>{ee.value=gt.data.translate_service,$e.value=gt.data.translate_source_lang,ve.value=gt.data.translate_target_lang}).catch(()=>{de({type:"warn",str:"message.getTranslaterFail"})})},An=()=>{ro.saveTranslateSetting(ee.value,$e.value,ve.value).then(gt=>{gt.info==="ok"?de({type:"success",str:"message.saveSuccess"}):de({type:"warn",str:"message.saveFailed"})}).catch(()=>{de({type:"warn",str:"message.saveFailed"})})},Tn=()=>{ro.translaterInputText("",oe.value).then(gt=>{B.value=gt.data}).catch(()=>{de({type:"warn",str:"message.translaterTestFail"})})},Xt=S(null),ln=async()=>{await kc.getAutocompleteLimit().then(gt=>{q.value=gt.data}).catch(gt=>{console.error(gt),de({type:"warn",str:"message.networkError"})})},Kn=async()=>{await kc.updateAutocompleteLimit(q.value).then(()=>{de({type:"success",str:"message.saveSuccess"}),localStorage.setItem("weilin_prompt_ui_auto_box_width",Y.value),localStorage.setItem("weilin_prompt_ui_auto_box_height",$.value)}).catch(gt=>{console.error(gt),de({type:"warn",str:"message.networkError"})})},Jn=gt=>{const Fe=li.find(Ue=>Ue.translator===gt);return Fe?Fe.language:gt};return Dt(()=>{Rt(),at(),H()}),go(()=>{Xt.value&&clearInterval(Xt.value)}),t({open:()=>{i.value="translator",l.value="baidu",d.value="",g.value=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",f.value=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified",m.value=localStorage.getItem("weilin_prompt_ui_floatingBallCount")||1,w.value=localStorage.getItem("weilin_prompt_ui_floatingBallSize")||5,T.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true",V.value=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",fe.value=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",O.value=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",se.value=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true",le.value=localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true",Pe.value=localStorage.getItem("weilin_prompt_ui_comma_close_autocomplete")==="true",s.value=!0}}),(gt,Fe)=>(C(),Zt(Qs,{modelValue:s.value,"onUpdate:modelValue":Fe[48]||(Fe[48]=Ue=>s.value=Ue),title:h(a)("promptBox.settings.title")},{footer:Ut(()=>[r("button",{onClick:Fe[47]||(Fe[47]=Ue=>s.value=!1)},y(h(a)("promptBox.settings.close")),1)]),default:Ut(()=>[r("div",Yb,[r("div",Kb,[r("ul",null,[r("li",{class:Ve({"weilin-comfyui-active":i.value==="translator"}),onClick:Fe[0]||(Fe[0]=Ue=>A("translator"))},y(h(a)("promptBox.settings.translator")),3),r("li",{class:Ve({"weilin-comfyui-active":i.value==="setting_function_toggles"}),onClick:Fe[1]||(Fe[1]=Ue=>A("setting_function_toggles"))},y(h(a)("promptBox.settings.setting_function_toggles")),3),r("li",{class:Ve({"weilin-comfyui-active":i.value==="setting_auto_complete_limit"}),onClick:Fe[2]||(Fe[2]=Ue=>A("setting_auto_complete_limit"))},y(h(a)("promptBox.settings.setting_auto_complete_limit")),3),r("li",{class:Ve({"weilin-comfyui-active":i.value==="setting_floating_ball"}),onClick:Fe[3]||(Fe[3]=Ue=>A("setting_floating_ball"))},y(h(a)("promptBox.settings.setting_floating_ball")),3),r("li",{class:Ve({"weilin-comfyui-active":i.value==="setting_prompt_box"}),onClick:Fe[4]||(Fe[4]=Ue=>A("setting_prompt_box"))},y(h(a)("promptBox.settings.setting_prompt_box")),3),r("li",{class:Ve({"weilin-comfyui-active":i.value==="setting_openai_box"}),onClick:Fe[5]||(Fe[5]=Ue=>A("setting_openai_box"))},y(h(a)("promptBox.settings.setting_openai_box")),3),r("li",{class:Ve({"weilin-comfyui-active":i.value==="setting_sponsor_me"}),onClick:Fe[6]||(Fe[6]=Ue=>A("setting_sponsor_me"))},y(h(a)("promptBox.settings.setting_sponsor_me")),3)])]),r("div",Jb,[i.value==="translator"?(C(),L("div",Xb,[r("h3",null,y(h(a)("promptBox.settings.translator")),1),r("div",Qb,[r("label",null,y(h(a)("promptBox.settings.selectTranslater")),1),xe(r("select",{style:{"margin-left":"10px"},"onUpdate:modelValue":Fe[7]||(Fe[7]=Ue=>j.value=Ue),class:"weilin-comfyui-common-select"},[r("option",Zb,y(h(a)("promptBox.settings.selectOptionPythonTranslater")),1),Fe[49]||(Fe[49]=r("option",{value:"other_ai_plate"},"使用三方AI平台翻译",-1)),Fe[50]||(Fe[50]=r("option",{value:"openai"},"OpenAI API 翻译",-1))],512),[[an,j.value]]),r("button",{class:"weilin-comfyui-install-button",onClick:rn},y(h(a)("promptBox.settings.apply")),1)]),r("div",e4,[j.value=="other_ai_plate"?(C(),L("div",t4,[st(qb)])):Ae("",!0),j.value=="network"?(C(),L("div",n4,[r("div",o4,y(h(a)("promptBox.settings.selectOptionNetworkTranslaterTitle")),1),r("div",a4,y(h(a)("promptBox.settings.selectOptionNetworkTranslaterInfo"))+":https://github.com/xnx3/translate ",1),r("div",s4,[r("label",null,y(h(a)("promptBox.settings.sourceLanguage")),1),xe(r("select",{"onUpdate:modelValue":Fe[8]||(Fe[8]=Ue=>g.value=Ue),class:"weilin-comfyui-common-select"},[r("option",r4,y(h(a)("promptBox.settings.auto_detect")),1),r("option",i4,y(h(a)("promptBox.settings.chinese_simplified")),1),r("option",l4,y(h(a)("promptBox.settings.english")),1)],512),[[an,g.value]])]),r("div",u4,[r("label",null,y(h(a)("promptBox.settings.targetLanguage")),1),xe(r("select",{"onUpdate:modelValue":Fe[9]||(Fe[9]=Ue=>f.value=Ue),class:"weilin-comfyui-common-select"},[r("option",c4,y(h(a)("promptBox.settings.chinese_simplified")),1),r("option",d4,y(h(a)("promptBox.settings.english")),1)],512),[[an,f.value]])]),r("button",{class:"weilin-comfyui-save-button",onClick:W},y(h(a)("promptBox.settings.save")),1)])):Ae("",!0),j.value=="translater"?(C(),L("div",p4,[r("div",f4,y(h(a)("promptBox.settings.selectOptionPythonTranslaterTitle")),1),r("div",g4,[r("div",m4,y(h(a)("promptBox.settings.translaterSetting")),1),r("div",v4,[r("label",null,y(h(a)("promptBox.settings.chooseTranslaterSetting")),1),xe(r("select",{"onUpdate:modelValue":Fe[10]||(Fe[10]=Ue=>ee.value=Ue)},[(C(!0),L(qe,null,ot(h(Cb),(Ue,Lt)=>(C(),L("option",{index:Lt,key:"tran-item_"+Lt,value:Ue},y(h(a)("translaterService."+Ue)),9,h4))),128))],512),[[an,ee.value]])]),r("div",_4,[r("div",y4,[r("label",null,y(h(a)("promptBox.settings.translaterLangSourceSetting")),1),xe(r("select",{"onUpdate:modelValue":Fe[11]||(Fe[11]=Ue=>$e.value=Ue)},[(C(!0),L(qe,null,ot(h(li),(Ue,Lt)=>(C(),L("option",{index:Lt,key:"lan-item_"+Lt,value:Ue.translator},y(h(a)("translaterLanguage."+Ue.language)),9,b4))),128))],512),[[an,$e.value]])]),r("div",w4,[r("label",null,y(h(a)("promptBox.settings.translaterLangTargeSetting")),1),xe(r("select",{"onUpdate:modelValue":Fe[12]||(Fe[12]=Ue=>ve.value=Ue)},[(C(!0),L(qe,null,ot(h(li),(Ue,Lt)=>(C(),L("option",{index:Lt,key:"lan-mu-item_"+Lt,value:Ue.translator},y(h(a)("translaterLanguage."+Ue.language)),9,x4))),128))],512),[[an,ve.value]])])]),r("button",{class:"weilin-comfyui-install-button",onClick:An},y(h(a)("promptBox.settings.saveTranslaterSetting")),1)]),r("div",S4,[r("div",T4,y(h(a)("promptBox.settings.testTranslaterTitle")),1),r("div",k4,[r("label",null,y(h(a)("promptBox.settings.inputTestTranslater"))+" - "+y(h(a)("translaterLanguage."+Jn(ve.value))),1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[13]||(Fe[13]=Ue=>oe.value=Ue),placeholder:h(a)("promptBox.settings.inputTestTranslaterPlaceholder")},null,8,C4),[[ze,oe.value]])]),r("div",E4,[r("label",null,y(h(a)("promptBox.settings.outPutTestTranslater"))+" - "+y(h(a)("translaterLanguage."+Jn($e.value))),1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[14]||(Fe[14]=Ue=>B.value=Ue),readonly:"",placeholder:h(a)("promptBox.settings.outPutTestTranslaterPlaceholder")},null,8,$4),[[ze,B.value]])]),r("button",{class:"weilin-comfyui-install-button",onClick:Tn},y(h(a)("promptBox.settings.testingTranslater")),1)])])):Ae("",!0)])])):Ae("",!0),i.value==="setting_auto_complete_limit"?(C(),L("div",A4,[r("h3",null,y(h(a)("promptBox.settings.setting_auto_complete_limit")),1),r("div",L4,[r("div",I4,[r("label",null,y(h(a)("promptBox.settings.show_auto_limit")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[15]||(Fe[15]=Ue=>q.value=Ue),min:"1",max:"99999999",style:{width:"100px"},placeholder:h(a)("promptBox.settings.showAutoLimitPlaceholder")},null,8,M4),[[ze,q.value,void 0,{number:!0}]])]),r("div",O4,[r("label",null,y(h(a)("promptBox.settings.settingAutoCompleteWidth")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[16]||(Fe[16]=Ue=>Y.value=Ue),min:"5",style:{width:"100px"},placeholder:h(a)("promptBox.settings.settingAutoCompleteWidthPlaceholder")},null,8,D4),[[ze,Y.value,void 0,{number:!0}]])]),r("div",P4,[r("label",null,y(h(a)("promptBox.settings.settingAutoCompleteHeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[17]||(Fe[17]=Ue=>$.value=Ue),min:"5",style:{width:"100px"},placeholder:h(a)("promptBox.settings.settingAutoCompleteHeightPlaceholder")},null,8,R4),[[ze,$.value,void 0,{number:!0}]])]),r("button",{class:"weilin-comfyui-save-button",onClick:Kn},y(h(a)("promptBox.settings.save")),1)])])):Ae("",!0),i.value==="setting_function_toggles"?(C(),L("div",N4,[r("h3",null,y(h(a)("promptBox.settings.setting_function_toggles_full")),1),r("div",F4,[r("div",B4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[18]||(Fe[18]=Ue=>ue.value=Ue)},null,512),[[on,ue.value]]),ct(" "+y(h(a)("promptBox.settings.enableClearAll")),1)])]),r("div",U4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[19]||(Fe[19]=Ue=>we.value=Ue)},null,512),[[on,we.value]]),ct(" "+y(h(a)("promptBox.settings.enableDeleteButton")),1)])]),r("div",z4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[20]||(Fe[20]=Ue=>ne.value=Ue)},null,512),[[on,ne.value]]),ct(" "+y(h(a)("promptBox.settings.enableRandomTag")),1)])]),r("div",V4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[21]||(Fe[21]=Ue=>J.value=Ue)},null,512),[[on,J.value]]),ct(" "+y(h(a)("promptBox.settings.enableRandomTagSettings")),1)])]),r("div",W4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[22]||(Fe[22]=Ue=>ie.value=Ue)},null,512),[[on,ie.value]]),ct(" "+y(h(a)("promptBox.settings.enableTranslateTag")),1)])]),r("div",H4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[23]||(Fe[23]=Ue=>X.value=Ue)},null,512),[[on,X.value]]),ct(" "+y(h(a)("promptBox.settings.enableClearDisabled")),1)])]),r("button",{class:"weilin-comfyui-save-button",onClick:ce},y(h(a)("promptBox.settings.save")),1)])])):Ae("",!0),i.value==="setting_floating_ball"?(C(),L("div",j4,[r("h3",null,y(h(a)("promptBox.settings.setting_floating_ball")),1),r("div",G4,[r("div",q4,[r("div",Y4,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[24]||(Fe[24]=Ue=>T.value=Ue)},null,512),[[on,T.value]]),ct(" "+y(h(a)("promptBox.settings.enableFloatingBall")),1)])]),r("div",K4,[r("label",null,y(h(a)("promptBox.settings.floatingBallCount")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[25]||(Fe[25]=Ue=>m.value=Ue),min:"1",max:"100",placeholder:h(a)("promptBox.settings.floatingBallCountPlaceholder")},null,8,J4),[[ze,m.value,void 0,{number:!0}]])]),r("div",X4,[r("label",null,y(h(a)("promptBox.settings.floatingBallSize")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[26]||(Fe[26]=Ue=>w.value=Ue),min:"5",max:"999999",placeholder:h(a)("promptBox.settings.floatingBallSizePlaceholder")},null,8,Q4),[[ze,w.value,void 0,{number:!0}]])]),r("div",Z4,[r("label",null,y(h(a)("promptBox.settings.floatingBallHeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[27]||(Fe[27]=Ue=>b.value=Ue),min:"5",max:"999999",placeholder:h(a)("promptBox.settings.floatingBallHeightPlaceholder")},null,8,ew),[[ze,b.value,void 0,{number:!0}]])])]),r("div",tw,[r("div",nw,[r("label",null,y(h(a)("promptBox.settings.skinSetting")),1),xe(r("select",{"onUpdate:modelValue":Fe[28]||(Fe[28]=Ue=>E.value=Ue)},[r("option",ow,y(h(a)("promptBox.settings.defaultSkin")),1),r("option",aw,y(h(a)("promptBox.settings.customSkin")),1)],512),[[an,E.value]])]),E.value==="custom"?(C(),L("div",sw,[r("label",null,y(h(a)("promptBox.settings.uploadSkin")),1),r("input",{type:"file",accept:"image/*",onChange:Ce,ref:"skinUploader"},null,544),I.value?(C(),L("div",rw,[r("img",{src:I.value,alt:"Custom Skin Preview"},null,8,iw)])):Ae("",!0)])):Ae("",!0)]),r("div",lw,[r("label",null,y(h(a)("promptBox.settings.bgSetting")),1),xe(r("select",{"onUpdate:modelValue":Fe[29]||(Fe[29]=Ue=>P.value=Ue)},[r("option",uw,y(h(a)("promptBox.settings.gradientBg")),1),r("option",cw,y(h(a)("promptBox.settings.transparentBg")),1)],512),[[an,P.value]])]),P.value==="gradient"?(C(),L("div",dw,[r("label",null,y(h(a)("promptBox.settings.gradientColor")),1),r("div",pw,[xe(r("input",{type:"color","onUpdate:modelValue":Fe[30]||(Fe[30]=Ue=>N.value=Ue)},null,512),[[ze,N.value]]),xe(r("input",{type:"color","onUpdate:modelValue":Fe[31]||(Fe[31]=Ue=>pe.value=Ue)},null,512),[[ze,pe.value]]),r("button",{onClick:Le,style:{"margin-left":"10px",width:"200px"}},y(h(a)("promptBox.settings.resetToDefault")),1)])])):Ae("",!0),r("div",fw,[r("label",null,y(h(a)("promptBox.settings.borderRadius")),1),xe(r("input",{type:"number","onUpdate:modelValue":Fe[32]||(Fe[32]=Ue=>D.value=Ue),min:"0",max:"50"},null,512),[[ze,D.value,void 0,{number:!0}]])]),r("button",{class:"weilin-comfyui-save-button",style:{"grid-column":"span 2"},onClick:z},y(h(a)("promptBox.settings.save")),1)])])):Ae("",!0),i.value==="setting_prompt_box"?(C(),L("div",gw,[r("h3",null,y(h(a)("promptBox.settings.setting_prompt_box")),1),r("div",mw,[r("div",vw,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[33]||(Fe[33]=Ue=>V.value=Ue)},null,512),[[on,V.value]]),ct(" "+y(h(a)("promptBox.settings.enableCommaConversion")),1)])]),r("div",hw,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[34]||(Fe[34]=Ue=>fe.value=Ue)},null,512),[[on,fe.value]]),ct(" "+y(h(a)("promptBox.settings.enablePeriodConversion")),1)])]),r("div",_w,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[35]||(Fe[35]=Ue=>O.value=Ue)},null,512),[[on,O.value]]),ct(" "+y(h(a)("promptBox.settings.enableBracketConversion")),1)])]),r("div",yw,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[36]||(Fe[36]=Ue=>se.value=Ue)},null,512),[[on,se.value]]),ct(" "+y(h(a)("promptBox.settings.enableAngleBracketConversion")),1)])]),r("div",bw,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[37]||(Fe[37]=Ue=>le.value=Ue)},null,512),[[on,le.value]]),ct(" "+y(h(a)("promptBox.settings.enableUnderscoreToBracket")),1)])]),r("div",ww,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[38]||(Fe[38]=Ue=>Pe.value=Ue)},null,512),[[on,Pe.value]]),ct(" "+y(h(a)("promptBox.settings.enableCommaCloseAutocomplete")),1)])]),r("div",xw,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":Fe[39]||(Fe[39]=Ue=>Ie.value=Ue)},null,512),[[on,Ie.value]]),ct(" "+y(h(a)("promptBox.settings.enableBracketEscape")),1)])]),r("button",{class:"weilin-comfyui-save-button",onClick:k},y(h(a)("promptBox.settings.save")),1)])])):Ae("",!0),i.value==="setting_openai_box"?(C(),L("div",Sw,[r("h3",null,y(h(a)("promptBox.settings.openaiSettings")),1),r("div",Tw,[r("div",kw,[r("label",null,y(h(a)("promptBox.settings.selectedOpenaiConfig")),1),xe(r("select",{"onUpdate:modelValue":Fe[40]||(Fe[40]=Ue=>Z.value=Ue),onChange:et},[(C(!0),L(qe,null,ot(te.value,(Ue,Lt)=>(C(),L("option",{key:Lt,value:Lt},y(Ue.model)+" ("+y(Ue.base_url)+") ",9,Cw))),128))],544),[[an,Z.value]])]),r("div",Ew,[(C(!0),L(qe,null,ot(te.value,(Ue,Lt)=>(C(),L("div",{key:Lt,class:"weilin-comfyui-config-item"},[r("div",$w,[r("span",null,y(Ue.model),1),r("div",Aw,[r("button",{onClick:Qt=>De(Lt)},y(re.value===Lt?h(a)("promptBox.settings.cancel"):h(a)("promptBox.settings.edit")),9,Lw),r("button",{onClick:Qt=>Ne(Lt)},y(h(a)("promptBox.settings.delete")),9,Iw)])]),re.value===Lt?(C(),L("div",Mw,[r("div",Ow,[r("label",null,y(h(a)("promptBox.settings.openai_api_key"))+":",1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[41]||(Fe[41]=Qt=>Te.value.api_key=Qt),placeholder:h(a)("promptBox.settings.openai_api_key_placeholder")},null,8,Dw),[[ze,Te.value.api_key]])]),r("div",Pw,[r("label",null,y(h(a)("promptBox.settings.openai_base_url"))+":",1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[42]||(Fe[42]=Qt=>Te.value.base_url=Qt),placeholder:h(a)("promptBox.settings.openai_base_url_placeholder")},null,8,Rw),[[ze,Te.value.base_url]])]),r("div",Nw,[r("label",null,y(h(a)("promptBox.settings.openai_model"))+":",1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[43]||(Fe[43]=Qt=>Te.value.model=Qt),placeholder:h(a)("promptBox.settings.openai_model_placeholder")},null,8,Fw),[[ze,Te.value.model]])]),r("div",Bw,[r("button",{onClick:Qt=>ge(Lt)},y(h(a)("promptBox.settings.save")),9,Uw)])])):(C(),L("div",zw,[r("div",null,y(h(a)("promptBox.settings.openai_api_key"))+": "+y(Ue.api_key?"******":h(a)("promptBox.settings.not_set")),1),r("div",null,y(h(a)("promptBox.settings.openai_base_url"))+": "+y(Ue.base_url),1)]))]))),128))]),be.value?(C(),L("div",Vw,[r("div",Ww,[r("label",null,y(h(a)("promptBox.settings.openai_api_key"))+":",1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[44]||(Fe[44]=Ue=>Te.value.api_key=Ue),placeholder:h(a)("promptBox.settings.openai_api_key_placeholder")},null,8,Hw),[[ze,Te.value.api_key]])]),r("div",jw,[r("label",null,y(h(a)("promptBox.settings.openai_base_url"))+":",1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[45]||(Fe[45]=Ue=>Te.value.base_url=Ue),placeholder:h(a)("promptBox.settings.openai_base_url_placeholder")},null,8,Gw),[[ze,Te.value.base_url]])]),r("div",qw,[r("label",null,y(h(a)("promptBox.settings.openai_model"))+":",1),xe(r("input",{type:"text","onUpdate:modelValue":Fe[46]||(Fe[46]=Ue=>Te.value.model=Ue),placeholder:h(a)("promptBox.settings.openai_model_placeholder")},null,8,Yw),[[ze,Te.value.model]])]),r("div",Kw,[r("button",{onClick:Ke},y(h(a)("promptBox.settings.cancel")),1),r("button",{onClick:Ee},y(h(a)("promptBox.settings.save")),1)])])):Ae("",!0),be.value?Ae("",!0):(C(),L("button",{key:1,class:"weilin-comfyui-add-button",onClick:Q},y(h(a)("promptBox.settings.addNewConfig")),1))])])):Ae("",!0),i.value==="setting_sponsor_me"?(C(),L("div",Jw,[r("h3",null,y(h(a)("promptBox.settings.setting_sponsor_me")),1),r("div",Xw,[r("h1",null,y(h(a)("promptBox.settings.sponsorMeTip")),1),r("h2",null,y(h(a)("promptBox.settings.sponsorMeLink")),1),r("button",{class:"weilin-comfyui-sponsor-me-button",onClick:ut},y(h(a)("promptBox.settings.sponsorMe")),1)])])):Ae("",!0),i.value==="setting_start_panel"?(C(),L("div",Qw,[r("h3",null,y(h(a)("promptBox.settings.setting_start_panel")),1),r("div",Zw,[r("h4",null,y(h(a)("promptBox.settings.startPanelTip")),1),r("button",{class:"weilin-comfyui-start-panel-button",onClick:ft},y(h(a)("promptBox.settings.startPanel")),1)])])):Ae("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-067a4b09"]]),e3=["title"],t3={class:"switch-icon"},n3={key:0,class:"moon",viewBox:"0 0 24 24"},o3={key:1,class:"sun",viewBox:"0 0 24 24"},a3="weilin_tools_",s3=Vt({__name:"ThemeSwitch",setup(e){const{t}=Kt(),n=`${a3}theme`,o=S(localStorage.getItem(n)==="dark"),a=()=>{o.value=!o.value;const s=document.getElementById("weilin_comfyui_tools_prompt_ui_div");s&&s.setAttribute("data-theme",o.value?"dark":"light"),localStorage.setItem(n,o.value?"dark":"light")};return(s,i)=>(C(),L("button",{class:"theme-switch",onClick:a,title:h(t)("theme.toggle")},[r("div",t3,[o.value?(C(),L("svg",n3,[...i[0]||(i[0]=[r("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])):(C(),L("svg",o3,[...i[1]||(i[1]=[r("circle",{cx:"12",cy:"12",r:"5"},null,-1),r("path",{d:"M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42"},null,-1)])]))]),Pr(s.$slots,"default",{isDark:o.value},void 0,!0)],8,e3))}},[["__scopeId","data-v-687d9c9d"]]),io="weilin_tools_",$a={categories:null,subCategories:{},tags:{},lastUpdated:0},r3=300*1e3,lo=()=>{$a.categories=null,$a.subCategories={},$a.tags={},$a.lastUpdated=0},Pt={getTagsList:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=Date.now();if($a.categories&&n-$a.lastUpdated<r3)return $a.categories;const o=await Ye({url:"/prompt/get_group_tags",method:"get",params:{...e,lang:t}});return $a.categories=o,$a.lastUpdated=n,o},addPrimaryCategory:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/add_new_f_group",method:"post",data:{...e,lang:t}});return lo(),n},editPrimaryCategory:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/edit_f_group",method:"post",data:{...e,lang:t}});return lo(),n},deletePrimaryCategory:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/delete_f_group",method:"post",data:{...e,lang:t}});return lo(),n},addSubCategory:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/add_new_s_group",method:"post",data:{...e,lang:t}});return lo(),n},editSubCategory:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/edit_s_group",method:"post",data:{...e,lang:t}});return lo(),n},deleteSubCategory:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/delete_s_group",method:"post",data:{...e,lang:t}});return lo(),n},addNewTags:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/new_tags",method:"post",data:{...e,lang:t}});return lo(),n},editTags:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/edit_tags",method:"post",data:{...e,lang:t}});return lo(),n},deleteTags:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/delete_tags",method:"post",data:{...e,lang:t}});return lo(),n},batchDeleteTags:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/batch_delete_tags",method:"post",data:{...e,lang:t}});return lo(),n},moveTag:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/move_tag",method:"post",data:{...e,lang:t}});return lo(),n},getTagsGroupList:()=>Ye({url:"/prompt/get_groups_list",method:"post"}),runSQLToServer:async e=>{const t=await Ye({url:"/prompt/run_sql_text",method:"post",timeout:0,data:{sql:e}});return lo(),t},moveMainGroup:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/move_group",method:"post",data:{...e,lang:t}});return lo(),n},moveSubGroup:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=await Ye({url:"/prompt/move_subgroup",method:"post",data:{...e,lang:t}});return lo(),n},getTagMainGroup:()=>Ye({url:"/prompt/get_tag_groups",method:"post"}),getTagSubGroup:e=>Ye({url:"/prompt/get_tag_subgroups",method:"post",data:{p_uuid:e}}),getTagList:e=>Ye({url:"/prompt/get_tag_tags",method:"post",data:{g_uuid:e}}),searchTag:e=>Ye({url:"/prompt/search_tags",method:"post",data:{keyword:e}}),getGenerationOptions:()=>Ye({url:"/tag_image/options",method:"post"}),generateTagImage:(e,t)=>Ye({url:"/tag_image/generate",method:"post",data:{t_uuid:e,params:t}}),getTagImageStatus:e=>Ye({url:"/tag_image/status",method:"post",data:{task_id:e}}),getTagImageStatusByUuid:e=>Ye({url:`/tag_image/status/${e}`,method:"get"}),regenerateTagImage:(e,t)=>Ye({url:"/tag_image/generate",method:"post",data:{t_uuid:e,params:t,regenerate:!0}}),batchGenerateTagImages:(e,t)=>Ye({url:"/tag_image/batch_generate",method:"post",data:{tags:e,params:t}}),cancelAllTasks:()=>Ye({url:"/tag_image/cancel_all",method:"post"})};/**
* uuidv7: A JavaScript implementation of UUID version 7
*
* Copyright 2021-2024 LiosK
*
* @license Apache-2.0
* @packageDocumentation
*/const El="0123456789abcdef";class Ts{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new Ts(t)}static fromFieldsV7(t,n,o,a){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(o)||!Number.isInteger(a)||t<0||n<0||o<0||a<0||t>0xffffffffffff||n>4095||o>1073741823||a>4294967295)throw new RangeError("invalid field value");const s=new Uint8Array(16);return s[0]=t/2**40,s[1]=t/2**32,s[2]=t/2**24,s[3]=t/2**16,s[4]=t/2**8,s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|o>>>24,s[9]=o>>>16,s[10]=o>>>8,s[11]=o,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new Ts(s)}static parse(t){var n,o,a,s;let i;switch(t.length){case 32:i=(n=/^[0-9a-f]{32}$/i.exec(t))===null||n===void 0?void 0:n[0];break;case 36:i=(o=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||o===void 0?void 0:o.slice(1,6).join("");break;case 38:i=(a=/^\{([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})\}$/i.exec(t))===null||a===void 0?void 0:a.slice(1,6).join("");break;case 45:i=(s=/^urn:uuid:([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||s===void 0?void 0:s.slice(1,6).join("");break}if(i){const l=new Uint8Array(16);for(let d=0;d<16;d+=4){const g=parseInt(i.substring(2*d,2*d+8),16);l[d+0]=g>>>24,l[d+1]=g>>>16,l[d+2]=g>>>8,l[d+3]=g}return new Ts(l)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let n=0;n<this.bytes.length;n++)t+=El.charAt(this.bytes[n]>>>4),t+=El.charAt(this.bytes[n]&15),(n===3||n===5||n===7||n===9)&&(t+="-");return t}toHex(){let t="";for(let n=0;n<this.bytes.length;n++)t+=El.charAt(this.bytes[n]>>>4),t+=El.charAt(this.bytes[n]&15);return t}toJSON(){return this.toString()}getVariant(){const t=this.bytes[8]>>>4;if(t<0)throw new Error("unreachable");if(t<=7)return this.bytes.every(n=>n===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(n=>n===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new Ts(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let n=0;n<16;n++){const o=this.bytes[n]-t.bytes[n];if(o!==0)return Math.sign(o)}return 0}}class i3{constructor(t){this.timestamp=0,this.counter=0,this.random=t??l3()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,n){let o=this.generateOrAbortCore(t,n);return o===void 0&&(this.timestamp=0,o=this.generateOrAbortCore(t,n)),o}generateOrAbortCore(t,n){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(n<0||n>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else if(t+n>=this.timestamp)this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter());else return;return Ts.fromFieldsV7(this.timestamp,Math.trunc(this.counter/2**30),this.counter&2**30-1,this.random.nextUint32())}resetCounter(){this.counter=this.random.nextUint32()*1024+(this.random.nextUint32()&1023)}generateV4(){const t=new Uint8Array(Uint32Array.of(this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32(),this.random.nextUint32()).buffer);return t[6]=64|t[6]>>>4,t[8]=128|t[8]>>>2,Ts.ofInner(t)}}const l3=()=>{if(typeof crypto<"u"&&typeof crypto.getRandomValues<"u")return new u3;if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");return{nextUint32:()=>Math.trunc(Math.random()*65536)*65536+Math.trunc(Math.random()*65536)}};class u3{constructor(){this.buffer=new Uint32Array(8),this.cursor=65535}nextUint32(){return this.cursor>=this.buffer.length&&(crypto.getRandomValues(this.buffer),this.cursor=0),this.buffer[this.cursor++]}}let Sm;const Ya=()=>c3().toString(),c3=()=>(Sm||(Sm=new i3)).generate(),d3={class:"tag-manager"},p3={class:"category-tabs"},f3={class:"tabs-wrapper primary-tabs"},g3={class:"tabs-scroll"},m3=["onClick"],v3={class:"tab-text"},h3={key:0,class:"tabs-wrapper group-tabs"},_3={class:"tabs-scroll"},y3=["onClick"],b3={class:"tab-text"},Tm=Vt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=n,s=S([]),i=S(null),l=S(null),d=S([]),g=S(!1),f=S(!1),m=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},w=async()=>{try{const N=await Pt.getTagsGroupList();if(s.value=N.info,l.value){const pe=s.value.flatMap(D=>D.groups).find(D=>D.p_uuid===l.value.p_uuid);pe?l.value=pe:l.value=null}if(i.value){const pe=s.value.find(D=>D.p_uuid===i.value.p_uuid);pe?i.value=pe:i.value=null}}catch(N){console.error("获取标签列表失败:",N)}},b=N=>{if(!N||N==="transparent")return"var(--primary-text)";let pe,D,V,fe=1;if(N.startsWith("rgba")){const se=N.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);se&&([,pe,D,V,fe]=se.map(Number))}else if(N.startsWith("rgb")){const se=N.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);se&&([,pe,D,V]=se.map(Number))}return fe<.5?"var(--primary-text)":(pe*299+D*587+V*114)/1e3>128?"#000000":"#ffffff"};Dt(()=>{window.addEventListener("message",I)}),Ba(()=>{window.removeEventListener("message",I)});const T=N=>{i.value=N,l.value=null,g.value=!1,d.value=[]},E=N=>{l.value=N,g.value=!1,d.value=[]},I=N=>{!N.data||!N.data.type||N.data.type.startsWith("weilin_prompt_ui_")&&N.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&w()},P=()=>{if(l.value===null||i.value===null){de({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{group:i.value,sub:l.value}),f.value=!1};return t({open:()=>{m(),f.value=!0}}),(N,pe)=>(C(),Zt(Qs,{modelValue:f.value,"onUpdate:modelValue":pe[1]||(pe[1]=D=>f.value=D),title:h(o)("importDialog.selectTitle")},{footer:Ut(()=>[r("button",{onClick:pe[0]||(pe[0]=D=>f.value=!1)},y(h(o)("promptBox.settings.close")),1),r("button",{onClick:P},y(h(o)("importDialog.sureSelect")),1)]),default:Ut(()=>[r("div",d3,[r("div",p3,[r("div",f3,[r("div",g3,[(C(!0),L(qe,null,ot(s.value,(D,V)=>{var fe,O,se;return C(),L("div",{key:"Tabss-"+V,class:Ve(["tab-item",{active:((fe=i.value)==null?void 0:fe.name)===D.name}]),style:Ft({backgroundColor:((O=i.value)==null?void 0:O.name)===D.name?"var(--primary-color)":D.color,color:((se=i.value)==null?void 0:se.name)===D.name?"#ffffff":b(D.color)}),onClick:le=>T(D)},[r("span",v3,y(D.name),1)],14,m3)}),128))])]),i.value?(C(),L("div",h3,[r("div",_3,[(C(!0),L(qe,null,ot(i.value.groups,(D,V)=>{var fe,O,se;return C(),L("div",{key:"TabsSw-"+V,class:Ve(["tab-item",{active:((fe=l.value)==null?void 0:fe.name)===D.name}]),style:Ft({backgroundColor:((O=l.value)==null?void 0:O.name)===D.name?"var(--primary-color)":D.color,color:((se=l.value)==null?void 0:se.name)===D.name?"#ffffff":b(D.color)}),onClick:le=>E(D)},[r("span",b3,y(D.name),1)],14,y3)}),128))])])):Ae("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-d1f6a811"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function km(e){return typeof e>"u"||e===null}function w3(e){return typeof e=="object"&&e!==null}function x3(e){return Array.isArray(e)?e:km(e)?[]:[e]}function S3(e,t){var n,o,a,s;if(t)for(s=Object.keys(t),n=0,o=s.length;n<o;n+=1)a=s[n],e[a]=t[a];return e}function T3(e,t){var n="",o;for(o=0;o<t;o+=1)n+=e;return n}function k3(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var C3=km,E3=w3,$3=x3,A3=T3,L3=k3,I3=S3,$n={isNothing:C3,isObject:E3,toArray:$3,repeat:A3,isNegativeZero:L3,extend:I3};function Cm(e,t){var n="",o=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
`+e.mark.snippet),o+" "+n):o}function ui(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Cm(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ui.prototype=Object.create(Error.prototype),ui.prototype.constructor=ui,ui.prototype.toString=function(t){return this.name+": "+Cm(this,t)};var qn=ui;function Ec(e,t,n,o,a){var s="",i="",l=Math.floor(a/2)-1;return o-t>l&&(s=" ... ",t=o-l+s.length),n-o>l&&(i=" ...",n=o+l-i.length),{str:s+e.slice(t,n).replace(/\t/g,"→")+i,pos:o-t+s.length}}function $c(e,t){return $n.repeat(" ",t-e.length)+e}function M3(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,o=[0],a=[],s,i=-1;s=n.exec(e.buffer);)a.push(s.index),o.push(s.index+s[0].length),e.position<=s.index&&i<0&&(i=o.length-2);i<0&&(i=o.length-1);var l="",d,g,f=Math.min(e.line+t.linesAfter,a.length).toString().length,m=t.maxLength-(t.indent+f+3);for(d=1;d<=t.linesBefore&&!(i-d<0);d++)g=Ec(e.buffer,o[i-d],a[i-d],e.position-(o[i]-o[i-d]),m),l=$n.repeat(" ",t.indent)+$c((e.line-d+1).toString(),f)+" | "+g.str+`
`+l;for(g=Ec(e.buffer,o[i],a[i],e.position,m),l+=$n.repeat(" ",t.indent)+$c((e.line+1).toString(),f)+" | "+g.str+`
`,l+=$n.repeat("-",t.indent+f+3+g.pos)+`^
`,d=1;d<=t.linesAfter&&!(i+d>=a.length);d++)g=Ec(e.buffer,o[i+d],a[i+d],e.position-(o[i]-o[i+d]),m),l+=$n.repeat(" ",t.indent)+$c((e.line+d+1).toString(),f)+" | "+g.str+`
`;return l.replace(/\n$/,"")}var O3=M3,D3=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],P3=["scalar","sequence","mapping"];function R3(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(o){t[String(o)]=n})}),t}function N3(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(D3.indexOf(n)===-1)throw new qn('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=R3(t.styleAliases||null),P3.indexOf(this.kind)===-1)throw new qn('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var In=N3;function Em(e,t){var n=[];return e[t].forEach(function(o){var a=n.length;n.forEach(function(s,i){s.tag===o.tag&&s.kind===o.kind&&s.multi===o.multi&&(a=i)}),n[a]=o}),n}function F3(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function o(a){a.multi?(e.multi[a.kind].push(a),e.multi.fallback.push(a)):e[a.kind][a.tag]=e.fallback[a.tag]=a}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(o);return e}function Ac(e){return this.extend(e)}Ac.prototype.extend=function(t){var n=[],o=[];if(t instanceof In)o.push(t);else if(Array.isArray(t))o=o.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit));else throw new qn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(s){if(!(s instanceof In))throw new qn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new qn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new qn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(s){if(!(s instanceof In))throw new qn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Ac.prototype);return a.implicit=(this.implicit||[]).concat(n),a.explicit=(this.explicit||[]).concat(o),a.compiledImplicit=Em(a,"implicit"),a.compiledExplicit=Em(a,"explicit"),a.compiledTypeMap=F3(a.compiledImplicit,a.compiledExplicit),a};var $m=Ac,Am=new In("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Lm=new In("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Im=new In("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Mm=new $m({explicit:[Am,Lm,Im]});function B3(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function U3(){return null}function z3(e){return e===null}var Om=new In("tag:yaml.org,2002:null",{kind:"scalar",resolve:B3,construct:U3,predicate:z3,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function V3(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function W3(e){return e==="true"||e==="True"||e==="TRUE"}function H3(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Dm=new In("tag:yaml.org,2002:bool",{kind:"scalar",resolve:V3,construct:W3,predicate:H3,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function j3(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function G3(e){return 48<=e&&e<=55}function q3(e){return 48<=e&&e<=57}function Y3(e){if(e===null)return!1;var t=e.length,n=0,o=!1,a;if(!t)return!1;if(a=e[n],(a==="-"||a==="+")&&(a=e[++n]),a==="0"){if(n+1===t)return!0;if(a=e[++n],a==="b"){for(n++;n<t;n++)if(a=e[n],a!=="_"){if(a!=="0"&&a!=="1")return!1;o=!0}return o&&a!=="_"}if(a==="x"){for(n++;n<t;n++)if(a=e[n],a!=="_"){if(!j3(e.charCodeAt(n)))return!1;o=!0}return o&&a!=="_"}if(a==="o"){for(n++;n<t;n++)if(a=e[n],a!=="_"){if(!G3(e.charCodeAt(n)))return!1;o=!0}return o&&a!=="_"}}if(a==="_")return!1;for(;n<t;n++)if(a=e[n],a!=="_"){if(!q3(e.charCodeAt(n)))return!1;o=!0}return!(!o||a==="_")}function K3(e){var t=e,n=1,o;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),o=t[0],(o==="-"||o==="+")&&(o==="-"&&(n=-1),t=t.slice(1),o=t[0]),t==="0")return 0;if(o==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function J3(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!$n.isNegativeZero(e)}var Pm=new In("tag:yaml.org,2002:int",{kind:"scalar",resolve:Y3,construct:K3,predicate:J3,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),X3=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Q3(e){return!(e===null||!X3.test(e)||e[e.length-1]==="_")}function Z3(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var e5=/^[-+]?[0-9]+e/;function t5(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if($n.isNegativeZero(e))return"-0.0";return n=e.toString(10),e5.test(n)?n.replace("e",".e"):n}function n5(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||$n.isNegativeZero(e))}var Rm=new In("tag:yaml.org,2002:float",{kind:"scalar",resolve:Q3,construct:Z3,predicate:n5,represent:t5,defaultStyle:"lowercase"}),Nm=Mm.extend({implicit:[Om,Dm,Pm,Rm]}),Fm=Nm,Bm=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Um=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function o5(e){return e===null?!1:Bm.exec(e)!==null||Um.exec(e)!==null}function a5(e){var t,n,o,a,s,i,l,d=0,g=null,f,m,w;if(t=Bm.exec(e),t===null&&(t=Um.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],o=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,o,a));if(s=+t[4],i=+t[5],l=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(f=+t[10],m=+(t[11]||0),g=(f*60+m)*6e4,t[9]==="-"&&(g=-g)),w=new Date(Date.UTC(n,o,a,s,i,l,d)),g&&w.setTime(w.getTime()-g),w}function s5(e){return e.toISOString()}var zm=new In("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:o5,construct:a5,instanceOf:Date,represent:s5});function r5(e){return e==="<<"||e===null}var Vm=new In("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r5}),Lc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function i5(e){if(e===null)return!1;var t,n,o=0,a=e.length,s=Lc;for(n=0;n<a;n++)if(t=s.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;o+=6}return o%8===0}function l5(e){var t,n,o=e.replace(/[\r\n=]/g,""),a=o.length,s=Lc,i=0,l=[];for(t=0;t<a;t++)t%4===0&&t&&(l.push(i>>16&255),l.push(i>>8&255),l.push(i&255)),i=i<<6|s.indexOf(o.charAt(t));return n=a%4*6,n===0?(l.push(i>>16&255),l.push(i>>8&255),l.push(i&255)):n===18?(l.push(i>>10&255),l.push(i>>2&255)):n===12&&l.push(i>>4&255),new Uint8Array(l)}function u5(e){var t="",n=0,o,a,s=e.length,i=Lc;for(o=0;o<s;o++)o%3===0&&o&&(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[o];return a=s%3,a===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):a===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):a===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}function c5(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Wm=new In("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i5,construct:l5,predicate:c5,represent:u5}),d5=Object.prototype.hasOwnProperty,p5=Object.prototype.toString;function f5(e){if(e===null)return!0;var t=[],n,o,a,s,i,l=e;for(n=0,o=l.length;n<o;n+=1){if(a=l[n],i=!1,p5.call(a)!=="[object Object]")return!1;for(s in a)if(d5.call(a,s))if(!i)i=!0;else return!1;if(!i)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function g5(e){return e!==null?e:[]}var Hm=new In("tag:yaml.org,2002:omap",{kind:"sequence",resolve:f5,construct:g5}),m5=Object.prototype.toString;function v5(e){if(e===null)return!0;var t,n,o,a,s,i=e;for(s=new Array(i.length),t=0,n=i.length;t<n;t+=1){if(o=i[t],m5.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;s[t]=[a[0],o[a[0]]]}return!0}function h5(e){if(e===null)return[];var t,n,o,a,s,i=e;for(s=new Array(i.length),t=0,n=i.length;t<n;t+=1)o=i[t],a=Object.keys(o),s[t]=[a[0],o[a[0]]];return s}var jm=new In("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:v5,construct:h5}),_5=Object.prototype.hasOwnProperty;function y5(e){if(e===null)return!0;var t,n=e;for(t in n)if(_5.call(n,t)&&n[t]!==null)return!1;return!0}function b5(e){return e!==null?e:{}}var Gm=new In("tag:yaml.org,2002:set",{kind:"mapping",resolve:y5,construct:b5}),Ic=Fm.extend({implicit:[zm,Vm],explicit:[Wm,Hm,jm,Gm]}),Ka=Object.prototype.hasOwnProperty,$l=1,qm=2,Ym=3,Al=4,Mc=1,w5=2,Km=3,x5=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,S5=/[\x85\u2028\u2029]/,T5=/[,\[\]\{\}]/,Jm=/^(?:!|!!|![a-z\-]+!)$/i,Xm=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Qm(e){return Object.prototype.toString.call(e)}function ea(e){return e===10||e===13}function ks(e){return e===9||e===32}function uo(e){return e===9||e===32||e===10||e===13}function Zs(e){return e===44||e===91||e===93||e===123||e===125}function k5(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function C5(e){return e===120?2:e===117?4:e===85?8:0}function E5(e){return 48<=e&&e<=57?e-48:-1}function Zm(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function $5(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var ev=new Array(256),tv=new Array(256),er=0;er<256;er++)ev[er]=Zm(er)?1:0,tv[er]=Zm(er);function A5(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ic,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function nv(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=O3(n),new qn(t,n)}function lt(e,t){throw nv(e,t)}function Ll(e,t){e.onWarning&&e.onWarning.call(null,nv(e,t))}var ov={YAML:function(t,n,o){var a,s,i;t.version!==null&&lt(t,"duplication of %YAML directive"),o.length!==1&&lt(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&lt(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),i=parseInt(a[2],10),s!==1&&lt(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=i<2,i!==1&&i!==2&&Ll(t,"unsupported YAML version of the document")},TAG:function(t,n,o){var a,s;o.length!==2&&lt(t,"TAG directive accepts exactly two arguments"),a=o[0],s=o[1],Jm.test(a)||lt(t,"ill-formed tag handle (first argument) of the TAG directive"),Ka.call(t.tagMap,a)&&lt(t,'there is a previously declared suffix for "'+a+'" tag handle'),Xm.test(s)||lt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{lt(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s}};function Ja(e,t,n,o){var a,s,i,l;if(t<n){if(l=e.input.slice(t,n),o)for(a=0,s=l.length;a<s;a+=1)i=l.charCodeAt(a),i===9||32<=i&&i<=1114111||lt(e,"expected valid JSON character");else x5.test(l)&&lt(e,"the stream contains non-printable characters");e.result+=l}}function av(e,t,n,o){var a,s,i,l;for($n.isObject(n)||lt(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(n),i=0,l=a.length;i<l;i+=1)s=a[i],Ka.call(t,s)||(t[s]=n[s],o[s]=!0)}function tr(e,t,n,o,a,s,i,l,d){var g,f;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),g=0,f=a.length;g<f;g+=1)Array.isArray(a[g])&&lt(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Qm(a[g])==="[object Object]"&&(a[g]="[object Object]");if(typeof a=="object"&&Qm(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(g=0,f=s.length;g<f;g+=1)av(e,t,s[g],n);else av(e,t,s,n);else!e.json&&!Ka.call(n,a)&&Ka.call(t,a)&&(e.line=i||e.line,e.lineStart=l||e.lineStart,e.position=d||e.position,lt(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[a]=s,delete n[a];return t}function Oc(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):lt(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function xn(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);a!==0;){for(;ks(a);)a===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),a=e.input.charCodeAt(++e.position);if(t&&a===35)do a=e.input.charCodeAt(++e.position);while(a!==10&&a!==13&&a!==0);if(ea(a))for(Oc(e),a=e.input.charCodeAt(e.position),o++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return n!==-1&&o!==0&&e.lineIndent<n&&Ll(e,"deficient indentation"),o}function Il(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||uo(n)))}function Dc(e,t){t===1?e.result+=" ":t>1&&(e.result+=$n.repeat(`
`,t-1))}function L5(e,t,n){var o,a,s,i,l,d,g,f,m=e.kind,w=e.result,b;if(b=e.input.charCodeAt(e.position),uo(b)||Zs(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=e.input.charCodeAt(e.position+1),uo(a)||n&&Zs(a)))return!1;for(e.kind="scalar",e.result="",s=i=e.position,l=!1;b!==0;){if(b===58){if(a=e.input.charCodeAt(e.position+1),uo(a)||n&&Zs(a))break}else if(b===35){if(o=e.input.charCodeAt(e.position-1),uo(o))break}else{if(e.position===e.lineStart&&Il(e)||n&&Zs(b))break;if(ea(b))if(d=e.line,g=e.lineStart,f=e.lineIndent,xn(e,!1,-1),e.lineIndent>=t){l=!0,b=e.input.charCodeAt(e.position);continue}else{e.position=i,e.line=d,e.lineStart=g,e.lineIndent=f;break}}l&&(Ja(e,s,i,!1),Dc(e,e.line-d),s=i=e.position,l=!1),ks(b)||(i=e.position+1),b=e.input.charCodeAt(++e.position)}return Ja(e,s,i,!1),e.result?!0:(e.kind=m,e.result=w,!1)}function I5(e,t){var n,o,a;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=a=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Ja(e,o,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)o=e.position,e.position++,a=e.position;else return!0;else ea(n)?(Ja(e,o,a,!0),Dc(e,xn(e,!1,t)),o=a=e.position):e.position===e.lineStart&&Il(e)?lt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);lt(e,"unexpected end of the stream within a single quoted scalar")}function M5(e,t){var n,o,a,s,i,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ja(e,n,e.position,!0),e.position++,!0;if(l===92){if(Ja(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),ea(l))xn(e,!1,t);else if(l<256&&ev[l])e.result+=tv[l],e.position++;else if((i=C5(l))>0){for(a=i,s=0;a>0;a--)l=e.input.charCodeAt(++e.position),(i=k5(l))>=0?s=(s<<4)+i:lt(e,"expected hexadecimal character");e.result+=$5(s),e.position++}else lt(e,"unknown escape sequence");n=o=e.position}else ea(l)?(Ja(e,n,o,!0),Dc(e,xn(e,!1,t)),n=o=e.position):e.position===e.lineStart&&Il(e)?lt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}lt(e,"unexpected end of the stream within a double quoted scalar")}function O5(e,t){var n=!0,o,a,s,i=e.tag,l,d=e.anchor,g,f,m,w,b,T=Object.create(null),E,I,P,N;if(N=e.input.charCodeAt(e.position),N===91)f=93,b=!1,l=[];else if(N===123)f=125,b=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),N=e.input.charCodeAt(++e.position);N!==0;){if(xn(e,!0,t),N=e.input.charCodeAt(e.position),N===f)return e.position++,e.tag=i,e.anchor=d,e.kind=b?"mapping":"sequence",e.result=l,!0;n?N===44&&lt(e,"expected the node content, but found ','"):lt(e,"missed comma between flow collection entries"),I=E=P=null,m=w=!1,N===63&&(g=e.input.charCodeAt(e.position+1),uo(g)&&(m=w=!0,e.position++,xn(e,!0,t))),o=e.line,a=e.lineStart,s=e.position,nr(e,t,$l,!1,!0),I=e.tag,E=e.result,xn(e,!0,t),N=e.input.charCodeAt(e.position),(w||e.line===o)&&N===58&&(m=!0,N=e.input.charCodeAt(++e.position),xn(e,!0,t),nr(e,t,$l,!1,!0),P=e.result),b?tr(e,l,T,I,E,P,o,a,s):m?l.push(tr(e,null,T,I,E,P,o,a,s)):l.push(E),xn(e,!0,t),N=e.input.charCodeAt(e.position),N===44?(n=!0,N=e.input.charCodeAt(++e.position)):n=!1}lt(e,"unexpected end of the stream within a flow collection")}function D5(e,t){var n,o,a=Mc,s=!1,i=!1,l=t,d=0,g=!1,f,m;if(m=e.input.charCodeAt(e.position),m===124)o=!1;else if(m===62)o=!0;else return!1;for(e.kind="scalar",e.result="";m!==0;)if(m=e.input.charCodeAt(++e.position),m===43||m===45)Mc===a?a=m===43?Km:w5:lt(e,"repeat of a chomping mode identifier");else if((f=E5(m))>=0)f===0?lt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):i?lt(e,"repeat of an indentation width identifier"):(l=t+f-1,i=!0);else break;if(ks(m)){do m=e.input.charCodeAt(++e.position);while(ks(m));if(m===35)do m=e.input.charCodeAt(++e.position);while(!ea(m)&&m!==0)}for(;m!==0;){for(Oc(e),e.lineIndent=0,m=e.input.charCodeAt(e.position);(!i||e.lineIndent<l)&&m===32;)e.lineIndent++,m=e.input.charCodeAt(++e.position);if(!i&&e.lineIndent>l&&(l=e.lineIndent),ea(m)){d++;continue}if(e.lineIndent<l){a===Km?e.result+=$n.repeat(`
`,s?1+d:d):a===Mc&&s&&(e.result+=`
`);break}for(o?ks(m)?(g=!0,e.result+=$n.repeat(`
`,s?1+d:d)):g?(g=!1,e.result+=$n.repeat(`
`,d+1)):d===0?s&&(e.result+=" "):e.result+=$n.repeat(`
`,d):e.result+=$n.repeat(`
`,s?1+d:d),s=!0,i=!0,d=0,n=e.position;!ea(m)&&m!==0;)m=e.input.charCodeAt(++e.position);Ja(e,n,e.position,!1)}return!0}function sv(e,t){var n,o=e.tag,a=e.anchor,s=[],i,l=!1,d;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),d=e.input.charCodeAt(e.position);d!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,lt(e,"tab characters must not be used in indentation")),!(d!==45||(i=e.input.charCodeAt(e.position+1),!uo(i))));){if(l=!0,e.position++,xn(e,!0,-1)&&e.lineIndent<=t){s.push(null),d=e.input.charCodeAt(e.position);continue}if(n=e.line,nr(e,t,Ym,!1,!0),s.push(e.result),xn(e,!0,-1),d=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&d!==0)lt(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=o,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}function P5(e,t,n){var o,a,s,i,l,d,g=e.tag,f=e.anchor,m={},w=Object.create(null),b=null,T=null,E=null,I=!1,P=!1,N;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),N=e.input.charCodeAt(e.position);N!==0;){if(!I&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,lt(e,"tab characters must not be used in indentation")),o=e.input.charCodeAt(e.position+1),s=e.line,(N===63||N===58)&&uo(o))N===63?(I&&(tr(e,m,w,b,T,null,i,l,d),b=T=E=null),P=!0,I=!0,a=!0):I?(I=!1,a=!0):lt(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,N=o;else{if(i=e.line,l=e.lineStart,d=e.position,!nr(e,n,qm,!1,!0))break;if(e.line===s){for(N=e.input.charCodeAt(e.position);ks(N);)N=e.input.charCodeAt(++e.position);if(N===58)N=e.input.charCodeAt(++e.position),uo(N)||lt(e,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(tr(e,m,w,b,T,null,i,l,d),b=T=E=null),P=!0,I=!1,a=!1,b=e.tag,T=e.result;else if(P)lt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=g,e.anchor=f,!0}else if(P)lt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=g,e.anchor=f,!0}if((e.line===s||e.lineIndent>t)&&(I&&(i=e.line,l=e.lineStart,d=e.position),nr(e,t,Al,!0,a)&&(I?T=e.result:E=e.result),I||(tr(e,m,w,b,T,E,i,l,d),b=T=E=null),xn(e,!0,-1),N=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&N!==0)lt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return I&&tr(e,m,w,b,T,null,i,l,d),P&&(e.tag=g,e.anchor=f,e.kind="mapping",e.result=m),P}function R5(e){var t,n=!1,o=!1,a,s,i;if(i=e.input.charCodeAt(e.position),i!==33)return!1;if(e.tag!==null&&lt(e,"duplication of a tag property"),i=e.input.charCodeAt(++e.position),i===60?(n=!0,i=e.input.charCodeAt(++e.position)):i===33?(o=!0,a="!!",i=e.input.charCodeAt(++e.position)):a="!",t=e.position,n){do i=e.input.charCodeAt(++e.position);while(i!==0&&i!==62);e.position<e.length?(s=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):lt(e,"unexpected end of the stream within a verbatim tag")}else{for(;i!==0&&!uo(i);)i===33&&(o?lt(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Jm.test(a)||lt(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),T5.test(s)&&lt(e,"tag suffix cannot contain flow indicator characters")}s&&!Xm.test(s)&&lt(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{lt(e,"tag name is malformed: "+s)}return n?e.tag=s:Ka.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:lt(e,'undeclared tag handle "'+a+'"'),!0}function N5(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&lt(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!uo(n)&&!Zs(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&lt(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function F5(e){var t,n,o;if(o=e.input.charCodeAt(e.position),o!==42)return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!uo(o)&&!Zs(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&lt(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Ka.call(e.anchorMap,n)||lt(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],xn(e,!0,-1),!0}function nr(e,t,n,o,a){var s,i,l,d=1,g=!1,f=!1,m,w,b,T,E,I;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=i=l=Al===n||Ym===n,o&&xn(e,!0,-1)&&(g=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),d===1)for(;R5(e)||N5(e);)xn(e,!0,-1)?(g=!0,l=s,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):l=!1;if(l&&(l=g||a),(d===1||Al===n)&&($l===n||qm===n?E=t:E=t+1,I=e.position-e.lineStart,d===1?l&&(sv(e,I)||P5(e,I,E))||O5(e,E)?f=!0:(i&&D5(e,E)||I5(e,E)||M5(e,E)?f=!0:F5(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&lt(e,"alias node should not have any properties")):L5(e,E,$l===n)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(f=l&&sv(e,I))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&lt(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),m=0,w=e.implicitTypes.length;m<w;m+=1)if(T=e.implicitTypes[m],T.resolve(e.result)){e.result=T.construct(e.result),e.tag=T.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ka.call(e.typeMap[e.kind||"fallback"],e.tag))T=e.typeMap[e.kind||"fallback"][e.tag];else for(T=null,b=e.typeMap.multi[e.kind||"fallback"],m=0,w=b.length;m<w;m+=1)if(e.tag.slice(0,b[m].tag.length)===b[m].tag){T=b[m];break}T||lt(e,"unknown tag !<"+e.tag+">"),e.result!==null&&T.kind!==e.kind&&lt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+T.kind+'", not "'+e.kind+'"'),T.resolve(e.result,e.tag)?(e.result=T.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):lt(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||f}function B5(e){var t=e.position,n,o,a,s=!1,i;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(i=e.input.charCodeAt(e.position))!==0&&(xn(e,!0,-1),i=e.input.charCodeAt(e.position),!(e.lineIndent>0||i!==37));){for(s=!0,i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!uo(i);)i=e.input.charCodeAt(++e.position);for(o=e.input.slice(n,e.position),a=[],o.length<1&&lt(e,"directive name must not be less than one character in length");i!==0;){for(;ks(i);)i=e.input.charCodeAt(++e.position);if(i===35){do i=e.input.charCodeAt(++e.position);while(i!==0&&!ea(i));break}if(ea(i))break;for(n=e.position;i!==0&&!uo(i);)i=e.input.charCodeAt(++e.position);a.push(e.input.slice(n,e.position))}i!==0&&Oc(e),Ka.call(ov,o)?ov[o](e,o,a):Ll(e,'unknown document directive "'+o+'"')}if(xn(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,xn(e,!0,-1)):s&&lt(e,"directives end mark is expected"),nr(e,e.lineIndent-1,Al,!1,!0),xn(e,!0,-1),e.checkLineBreaks&&S5.test(e.input.slice(t,e.position))&&Ll(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Il(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,xn(e,!0,-1));return}if(e.position<e.length-1)lt(e,"end of the stream or a document separator is expected");else return}function rv(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new A5(e,t),o=e.indexOf("\0");for(o!==-1&&(n.position=o,lt(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)B5(n);return n.documents}function U5(e,t,n){t!==null&&typeof t=="object"&&typeof n>"u"&&(n=t,t=null);var o=rv(e,n);if(typeof t!="function")return o;for(var a=0,s=o.length;a<s;a+=1)t(o[a])}function z5(e,t){var n=rv(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new qn("expected a single document in the stream, but found more")}}var V5=U5,W5=z5,iv={loadAll:V5,load:W5},lv=Object.prototype.toString,uv=Object.prototype.hasOwnProperty,Pc=65279,H5=9,ci=10,j5=13,G5=32,q5=33,Y5=34,Rc=35,K5=37,J5=38,X5=39,Q5=42,cv=44,Z5=45,Ml=58,e6=61,t6=62,n6=63,o6=64,dv=91,pv=93,a6=96,fv=123,s6=124,gv=125,Un={};Un[0]="\\0",Un[7]="\\a",Un[8]="\\b",Un[9]="\\t",Un[10]="\\n",Un[11]="\\v",Un[12]="\\f",Un[13]="\\r",Un[27]="\\e",Un[34]='\\"',Un[92]="\\\\",Un[133]="\\N",Un[160]="\\_",Un[8232]="\\L",Un[8233]="\\P";var r6=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],i6=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function l6(e,t){var n,o,a,s,i,l,d;if(t===null)return{};for(n={},o=Object.keys(t),a=0,s=o.length;a<s;a+=1)i=o[a],l=String(t[i]),i.slice(0,2)==="!!"&&(i="tag:yaml.org,2002:"+i.slice(2)),d=e.compiledTypeMap.fallback[i],d&&uv.call(d.styleAliases,l)&&(l=d.styleAliases[l]),n[i]=l;return n}function u6(e){var t,n,o;if(t=e.toString(16).toUpperCase(),e<=255)n="x",o=2;else if(e<=65535)n="u",o=4;else if(e<=4294967295)n="U",o=8;else throw new qn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+$n.repeat("0",o-t.length)+t}var c6=1,di=2;function d6(e){this.schema=e.schema||Ic,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=$n.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=l6(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?di:c6,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function mv(e,t){for(var n=$n.repeat(" ",t),o=0,a=-1,s="",i,l=e.length;o<l;)a=e.indexOf(`
`,o),a===-1?(i=e.slice(o),o=l):(i=e.slice(o,a+1),o=a+1),i.length&&i!==`
`&&(s+=n),s+=i;return s}function Nc(e,t){return`
`+$n.repeat(" ",e.indent*t)}function p6(e,t){var n,o,a;for(n=0,o=e.implicitTypes.length;n<o;n+=1)if(a=e.implicitTypes[n],a.resolve(t))return!0;return!1}function Ol(e){return e===G5||e===H5}function pi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Pc||65536<=e&&e<=1114111}function vv(e){return pi(e)&&e!==Pc&&e!==j5&&e!==ci}function hv(e,t,n){var o=vv(e),a=o&&!Ol(e);return(n?o:o&&e!==cv&&e!==dv&&e!==pv&&e!==fv&&e!==gv)&&e!==Rc&&!(t===Ml&&!a)||vv(t)&&!Ol(t)&&e===Rc||t===Ml&&a}function f6(e){return pi(e)&&e!==Pc&&!Ol(e)&&e!==Z5&&e!==n6&&e!==Ml&&e!==cv&&e!==dv&&e!==pv&&e!==fv&&e!==gv&&e!==Rc&&e!==J5&&e!==Q5&&e!==q5&&e!==s6&&e!==e6&&e!==t6&&e!==X5&&e!==Y5&&e!==K5&&e!==o6&&e!==a6}function g6(e){return!Ol(e)&&e!==Ml}function fi(e,t){var n=e.charCodeAt(t),o;return n>=55296&&n<=56319&&t+1<e.length&&(o=e.charCodeAt(t+1),o>=56320&&o<=57343)?(n-55296)*1024+o-56320+65536:n}function _v(e){var t=/^\n* /;return t.test(e)}var yv=1,Fc=2,bv=3,wv=4,or=5;function m6(e,t,n,o,a,s,i,l){var d,g=0,f=null,m=!1,w=!1,b=o!==-1,T=-1,E=f6(fi(e,0))&&g6(fi(e,e.length-1));if(t||i)for(d=0;d<e.length;g>=65536?d+=2:d++){if(g=fi(e,d),!pi(g))return or;E=E&&hv(g,f,l),f=g}else{for(d=0;d<e.length;g>=65536?d+=2:d++){if(g=fi(e,d),g===ci)m=!0,b&&(w=w||d-T-1>o&&e[T+1]!==" ",T=d);else if(!pi(g))return or;E=E&&hv(g,f,l),f=g}w=w||b&&d-T-1>o&&e[T+1]!==" "}return!m&&!w?E&&!i&&!a(e)?yv:s===di?or:Fc:n>9&&_v(e)?or:i?s===di?or:Fc:w?wv:bv}function v6(e,t,n,o,a){e.dump=(function(){if(t.length===0)return e.quotingType===di?'""':"''";if(!e.noCompatMode&&(r6.indexOf(t)!==-1||i6.test(t)))return e.quotingType===di?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),i=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=o||e.flowLevel>-1&&n>=e.flowLevel;function d(g){return p6(e,g)}switch(m6(t,l,e.indent,i,d,e.quotingType,e.forceQuotes&&!o,a)){case yv:return t;case Fc:return"'"+t.replace(/'/g,"''")+"'";case bv:return"|"+xv(t,e.indent)+Sv(mv(t,s));case wv:return">"+xv(t,e.indent)+Sv(mv(h6(t,i),s));case or:return'"'+_6(t)+'"';default:throw new qn("impossible error: invalid scalar style")}})()}function xv(e,t){var n=_v(e)?String(t):"",o=e[e.length-1]===`
`,a=o&&(e[e.length-2]===`
`||e===`
`),s=a?"+":o?"":"-";return n+s+`
`}function Sv(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function h6(e,t){for(var n=/(\n+)([^\n]*)/g,o=(function(){var g=e.indexOf(`
`);return g=g!==-1?g:e.length,n.lastIndex=g,Tv(e.slice(0,g),t)})(),a=e[0]===`
`||e[0]===" ",s,i;i=n.exec(e);){var l=i[1],d=i[2];s=d[0]===" ",o+=l+(!a&&!s&&d!==""?`
`:"")+Tv(d,t),a=s}return o}function Tv(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,o,a=0,s,i=0,l=0,d="";o=n.exec(e);)l=o.index,l-a>t&&(s=i>a?i:l,d+=`
`+e.slice(a,s),a=s+1),i=l;return d+=`
`,e.length-a>t&&i>a?d+=e.slice(a,i)+`
`+e.slice(i+1):d+=e.slice(a),d.slice(1)}function _6(e){for(var t="",n=0,o,a=0;a<e.length;n>=65536?a+=2:a++)n=fi(e,a),o=Un[n],!o&&pi(n)?(t+=e[a],n>=65536&&(t+=e[a+1])):t+=o||u6(n);return t}function y6(e,t,n){var o="",a=e.tag,s,i,l;for(s=0,i=n.length;s<i;s+=1)l=n[s],e.replacer&&(l=e.replacer.call(n,String(s),l)),(Aa(e,t,l,!1,!1)||typeof l>"u"&&Aa(e,t,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function kv(e,t,n,o){var a="",s=e.tag,i,l,d;for(i=0,l=n.length;i<l;i+=1)d=n[i],e.replacer&&(d=e.replacer.call(n,String(i),d)),(Aa(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&Aa(e,t+1,null,!0,!0,!1,!0))&&((!o||a!=="")&&(a+=Nc(e,t)),e.dump&&ci===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function b6(e,t,n){var o="",a=e.tag,s=Object.keys(n),i,l,d,g,f;for(i=0,l=s.length;i<l;i+=1)f="",o!==""&&(f+=", "),e.condenseFlow&&(f+='"'),d=s[i],g=n[d],e.replacer&&(g=e.replacer.call(n,d,g)),Aa(e,t,d,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Aa(e,t,g,!1,!1)&&(f+=e.dump,o+=f));e.tag=a,e.dump="{"+o+"}"}function w6(e,t,n,o){var a="",s=e.tag,i=Object.keys(n),l,d,g,f,m,w;if(e.sortKeys===!0)i.sort();else if(typeof e.sortKeys=="function")i.sort(e.sortKeys);else if(e.sortKeys)throw new qn("sortKeys must be a boolean or a function");for(l=0,d=i.length;l<d;l+=1)w="",(!o||a!=="")&&(w+=Nc(e,t)),g=i[l],f=n[g],e.replacer&&(f=e.replacer.call(n,g,f)),Aa(e,t+1,g,!0,!0,!0)&&(m=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,m&&(e.dump&&ci===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,m&&(w+=Nc(e,t)),Aa(e,t+1,f,!0,m)&&(e.dump&&ci===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,a+=w));e.tag=s,e.dump=a||"{}"}function Cv(e,t,n){var o,a,s,i,l,d;for(a=n?e.explicitTypes:e.implicitTypes,s=0,i=a.length;s<i;s+=1)if(l=a[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(d=e.styleMap[l.tag]||l.defaultStyle,lv.call(l.represent)==="[object Function]")o=l.represent(t,d);else if(uv.call(l.represent,d))o=l.represent[d](t,d);else throw new qn("!<"+l.tag+'> tag resolver accepts not "'+d+'" style');e.dump=o}return!0}return!1}function Aa(e,t,n,o,a,s,i){e.tag=null,e.dump=n,Cv(e,n,!1)||Cv(e,n,!0);var l=lv.call(e.dump),d=o,g;o&&(o=e.flowLevel<0||e.flowLevel>t);var f=l==="[object Object]"||l==="[object Array]",m,w;if(f&&(m=e.duplicates.indexOf(n),w=m!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(a=!1),w&&e.usedDuplicates[m])e.dump="*ref_"+m;else{if(f&&w&&!e.usedDuplicates[m]&&(e.usedDuplicates[m]=!0),l==="[object Object]")o&&Object.keys(e.dump).length!==0?(w6(e,t,e.dump,a),w&&(e.dump="&ref_"+m+e.dump)):(b6(e,t,e.dump),w&&(e.dump="&ref_"+m+" "+e.dump));else if(l==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!i&&t>0?kv(e,t-1,e.dump,a):kv(e,t,e.dump,a),w&&(e.dump="&ref_"+m+e.dump)):(y6(e,t,e.dump),w&&(e.dump="&ref_"+m+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&v6(e,e.dump,t,s,d);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qn("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(g=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?g="!"+g:g.slice(0,18)==="tag:yaml.org,2002:"?g="!!"+g.slice(18):g="!<"+g+">",e.dump=g+" "+e.dump)}return!0}function x6(e,t){var n=[],o=[],a,s;for(Bc(e,n,o),a=0,s=o.length;a<s;a+=1)t.duplicates.push(n[o[a]]);t.usedDuplicates=new Array(s)}function Bc(e,t,n){var o,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)n.indexOf(a)===-1&&n.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Bc(e[a],t,n);else for(o=Object.keys(e),a=0,s=o.length;a<s;a+=1)Bc(e[o[a]],t,n)}function S6(e,t){t=t||{};var n=new d6(t);n.noRefs||x6(e,n);var o=e;return n.replacer&&(o=n.replacer.call({"":o},"",o)),Aa(n,0,o,!0,!0)?n.dump+`
`:""}var T6=S6,k6={dump:T6};function Uc(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var C6=In,E6=$m,$6=Mm,A6=Nm,L6=Fm,I6=Ic,M6=iv.load,O6=iv.loadAll,D6=k6.dump,P6=qn,R6={binary:Wm,float:Rm,map:Im,null:Om,pairs:jm,set:Gm,timestamp:zm,bool:Dm,int:Pm,merge:Vm,omap:Hm,seq:Lm,str:Am},N6=Uc("safeLoad","load"),F6=Uc("safeLoadAll","loadAll"),B6=Uc("safeDump","dump"),Ev={Type:C6,Schema:E6,FAILSAFE_SCHEMA:$6,JSON_SCHEMA:A6,CORE_SCHEMA:L6,DEFAULT_SCHEMA:I6,load:M6,loadAll:O6,dump:D6,YAMLException:P6,types:R6,safeLoad:N6,safeLoadAll:F6,safeDump:B6};const U6={key:0,class:"loading-overlay"},z6={class:"settings-content"},V6={class:"info-links"},W6={class:"info-link-item"},H6={class:"info-link-label"},j6={href:"https://www.bilibili.com/list/288025756/?sid=4690314&spm_id_from=333.1387.0.0&oid=114342431298474&bvid=BV1txdfYxE7X",target:"_blank",class:"info-link"},G6={class:"info-link-item"},q6={class:"info-link-label"},Y6={href:"https://github.com/weilin9999/WeiLin-Comfyui-Tools-Prompt",target:"_blank",class:"info-link"},K6={class:"info-link-item"},J6={class:"info-link-label"},X6={href:"https://weilin9999.github.io/WeiLin-Share-Prompt-Web/#/",target:"_blank",class:"info-link"},Q6={style:{"margin-bottom":"16px"}},Z6=["placeholder"],e8={style:{"margin-bottom":"16px"}},t8=["placeholder"],n8=["placeholder"],o8={style:{"margin-bottom":"16px"}},a8=["placeholder"],s8=["placeholder"],r8={style:{"margin-bottom":"16px"}},i8=["placeholder"],l8={class:"data-container"},u8={key:0},c8={key:0},d8={class:"tag-group-container"},p8={style:{display:"flex","align-items":"center"}},f8={key:0},g8=["placeholder"],m8=["onClick"],v8=["onClick"],h8=["onClick"],_8=Vt({__name:"import_tag",setup(e,{expose:t}){const{t:n}=Kt(),o=S(!1),a=S(""),s=S(""),i=S(""),l=S(""),d=S(""),g=S(""),f=S(""),m=S(""),w=S(""),b=S([]),T=S(-1),E=S(""),I=S(""),P=S(null),N=S(null),pe=S(null),D=S(!1),V=S(""),fe=S(null);function O(){if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}fe.value.click()}function se(){a.value="",s.value="",i.value="",l.value="",d.value="",g.value="",f.value="",m.value="",w.value="",b.value=[],T.value=-1,E.value="",I.value="",D.value=!1}function le(A){const W=A.target.files[0];if(W){const ce=new FileReader;ce.onload=Ce=>{const z=Ce.target.result.split(`
`).filter(H=>H.trim());let k=0;z.forEach(H=>{const[Q,Ne]=H.split(",");if(Q&&Ne){const De=Q.trim().replace(/'/g,"''"),ge=Ne.trim().replace(/'/g,"''"),Ee=Ya();k=k+1;const Ke=parseInt(new Date().getTime()/1e3,10)+k,et=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${De}', '${ge}', 'rgba(255, 123, 2, .4)', ${Ke}, '${w.value}', '${Ee}');`;b.value.push(et)}})},ce.readAsText(W)}A.target.value=""}function Pe(A){const W=A.target.files[0];if(W){const ce=new FileReader;ce.onload=Ce=>{try{const Le=JSON.parse(Ce.target.result);let z=0;Object.entries(Le).forEach(([k,H])=>{const Q=k.replace(/'/g,"''"),Ne=H.replace(/'/g,"''"),De=Ya();z=z+1;const ge=parseInt(new Date().getTime()/1e3,10)+z,Ee=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Q}', '${Ne}', 'rgba(255, 123, 2, .4)', ${ge}, '${w.value}', '${De}');`;b.value.push(Ee)})}catch{de({type:"warn",str:"message.jsonErrorMesg"})}},ce.readAsText(W)}A.target.value=""}function Ie(A){const W=A.target.files[0];if(W){const ce=new FileReader;ce.onload=Ce=>{try{const Le=Ev.load(Ce.target.result);let z=0;Object.entries(Le).forEach(([k,H])=>{const Q=k.replace(/'/g,"''"),Ne=String(H).replace(/'/g,"''"),De=Ya();z=z+1;const ge=parseInt(new Date().getTime()/1e3,10)+z,Ee=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Q}', '${Ne}', 'rgba(255, 123, 2, .4)', ${ge}, '${w.value}', '${De}');`;b.value.push(Ee)})}catch{de({type:"warn",str:"message.yamlErrorMesg"})}},ce.readAsText(W)}A.target.value=""}function ue(A){se();const W=A.target.files[0];if(W){const ce=new FileReader;ce.onload=Ce=>{Ce.target.result.split(";").filter(k=>k.trim()).forEach(k=>{if((k.includes("tag_groups")||k.includes("tag_subgroups"))&&k.includes("p_uuid"))if(k.includes("g_uuid")){d.value=`${k};`;const Q=k.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);Q&&(w.value=Q[1]);const Ne=k.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);Ne&&(f.value=Ne[1].replace(/''/g,"'"))}else{l.value=`${k};`;const Q=k.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);Q&&(m.value=Q[1]);const Ne=k.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);Ne&&(g.value=Ne[1].replace(/''/g,"'"))}else k.includes("tag_tags")&&b.value.push(`${k};`)})},ce.readAsText(W)}A.target.value=""}function we(){if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}pe.value.click()}function ne(){if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}N.value.click()}function J(){P.value.click()}function ie(){const A=[l.value,d.value,...b.value].join(`
`),W=new Blob([A],{type:"text/sql"}),ce=document.createElement("a");if(ce.href=URL.createObjectURL(W),V.value.length<=0){const Ce=parseInt(new Date().getTime()/1e3,10);ce.download=`export_${Ce}.sql`}else ce.download=`${V.value}.sql`;ce.click()}const X=()=>{const A=[...b.value].join(`
`),W=new Blob([A],{type:"text/sql"}),ce=document.createElement("a");if(ce.href=URL.createObjectURL(W),V.value.length<=0){const Ce=parseInt(new Date().getTime()/1e3,10);ce.download=`export_tags_${Ce}.sql`}else ce.download=`${V.value}.sql`;ce.click()};function ee(A){const W=A.match(/VALUES\s*\([^']*'([^']+)'/),ce=A.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:W?W[1].replace(/''/g,"'"):"",desc:ce?ce[1].replace(/''/g,"'"):""}}function $e(A){b.value.splice(A,1)}function ve(A){const W=b.value[A],ce=ee(W);E.value=ce.text,I.value=ce.desc,T.value=A}function Z(A){const W=E.value.replace(/'/g,"''"),ce=I.value.replace(/'/g,"''");b.value[A]=b.value[A].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${W}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${ce}'`),T.value=-1}function te(){T.value=-1}function be(){if(!w.value){de({type:"warn",str:"message.pleaseAddSub"});return}const A=a.value.replace(/'/g,"''"),W=s.value.replace(/'/g,"''"),ce=Ya(),Ce=parseInt(new Date().getTime()/1e3,10);i.value=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${A}', '${W}', 'rgba(255, 123, 2, .4)', ${Ce}, '${w.value}', '${ce}');`,b.value.push(i.value)}function Te(){if(g.value.length<=0){de({type:"warn",str:"importDialog.pleaseAddGroupName"});return}const A=g.value.replace(/'/g,"''");m.value.length<=0&&(m.value=Ya());const W=parseInt(new Date().getTime()/1e3,10);l.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${A}', 'rgba(255, 123, 2, .4)', ${W}, '${m.value}');`}function he(){if(f.value.length<=0){de({type:"warn",str:"importDialog.pleaseAddSubGroupName"});return}if(!m.value){de({type:"warn",str:"message.pleaseAddMainCeb"});return}const A=f.value.replace(/'/g,"''");w.value.length<=0&&(w.value=Ya());const W=parseInt(new Date().getTime()/1e3,10);d.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${A}', 'rgba(255, 123, 2, .4)', ${W}, '${m.value}', '${w.value}');`}const re=S(null),j=()=>{re.value.open()},oe=A=>{D.value=!0,g.value=A.group.name,f.value=A.sub.name,m.value=A.group.p_uuid,w.value=A.sub.g_uuid;const W=A.group.name.replace(/'/g,"''"),ce=A.sub.name.replace(/'/g,"''");l.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${W}', '${A.group.color}', ${A.group.create_time}, '${A.group.p_uuid}');`,d.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${ce}', '${A.sub.color}', ${A.sub.create_time}, '${A.group.p_uuid}', '${A.sub.g_uuid}');`},B=S(!1),q=async A=>{B.value=!0;try{await Pt.runSQLToServer(A).then(W=>{W.code!==200?de({type:"warn",str:W.message}):(Y(),de({type:"success",str:"importDialog.successImport"}))}).catch(W=>{console.error(W),de({type:"warn",str:"importDialog.importFail"})})}catch(W){console.error(W),de({type:"warn",str:"importDialog.importFail"})}finally{B.value=!1}},Y=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},$=async()=>{if(D.value){if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}const A=[...b.value];await q(A)}else{if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}const A=[l.value,d.value,...b.value];await q(A)}};return St(l,(A,W)=>{var Le,z;if(!A||A===W)return;const ce=(Le=A.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Le[1],Ce=(z=W==null?void 0:W.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:z[1];ce&&Ce&&d.value&&(d.value=d.value.replace(new RegExp(`'${Ce}'`,"g"),`'${ce}'`))}),St(d,(A,W)=>{var Le,z;if(!A||A===W)return;const ce=(Le=A.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Le[1],Ce=(z=W==null?void 0:W.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:z[1];ce&&Ce&&b.value.length>0&&(b.value=b.value.map(k=>k.replace(new RegExp(`'${Ce}'`,"g"),`'${ce}'`)))}),t({open:()=>{o.value=!0}}),(A,W)=>(C(),L(qe,null,[B.value?(C(),L("div",U6,[...W[11]||(W[11]=[r("div",{class:"loading-spinner"},null,-1)])])):Ae("",!0),st(Qs,{modelValue:o.value,"onUpdate:modelValue":W[10]||(W[10]=ce=>o.value=ce),title:h(n)("importDialog.title")},{footer:Ut(()=>[r("button",{onClick:W[9]||(W[9]=ce=>o.value=!1)},y(h(n)("promptBox.settings.close")),1),r("button",{onClick:$},y(h(n)("importDialog.sure")),1)]),default:Ut(()=>[r("div",z6,[r("div",V6,[r("div",W6,[r("span",H6,y(h(n)("importDialog.tips1")),1),r("a",j6,y(h(n)("importDialog.tips1text")),1)]),r("div",G6,[r("span",q6,y(h(n)("importDialog.tips2")),1),r("a",Y6,y(h(n)("importDialog.tips2text")),1)]),r("div",K6,[r("span",J6,y(h(n)("importDialog.tips3")),1),r("a",X6,y(h(n)("importDialog.tips3text")),1)])]),r("div",Q6,[r("button",{onClick:se,class:"upload-btn"},y(h(n)("importDialog.cleanAll")),1),r("button",{style:{"margin-left":"10px"},onClick:J,class:"upload-btn"},y(h(n)("importDialog.uploadSQL")),1),r("button",{style:{"margin-left":"10px"},onClick:j},y(h(n)("importDialog.selectGroup")),1),r("button",{style:{"margin-left":"10px"},onClick:ie},y(h(n)("importDialog.dumpSQL")),1),r("button",{style:{"margin-left":"10px"},onClick:X},y(h(n)("importDialog.dumpOnlySQL")),1),xe(r("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":W[0]||(W[0]=ce=>V.value=ce),placeholder:h(n)("importDialog.settingOutputName")},null,8,Z6),[[ze,V.value]]),r("input",{type:"file",ref_key:"fileInput",ref:P,onChange:ue,accept:".sql",style:{display:"none"}},null,544),r("input",{type:"file",ref_key:"jsonFileInput",ref:N,onChange:Pe,accept:".json",style:{display:"none"}},null,544),r("input",{type:"file",ref_key:"txtFileInput",ref:pe,onChange:le,accept:".txt",style:{display:"none"}},null,544),r("input",{type:"file",ref_key:"yamlFileInput",ref:fe,onChange:Ie,accept:".yaml,.yml",style:{display:"none"}},null,544)]),r("div",e8,[xe(r("input",{"onUpdate:modelValue":W[1]||(W[1]=ce=>g.value=ce),placeholder:h(n)("importDialog.pleaseMainCeb")},null,8,t8),[[ze,g.value]]),r("button",{onClick:Te},y(h(n)("importDialog.setMainCeb")),1),xe(r("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":W[2]||(W[2]=ce=>m.value=ce),placeholder:h(n)("importDialog.pleaseMainCebUuid")},null,8,n8),[[ze,m.value]])]),r("div",o8,[xe(r("input",{"onUpdate:modelValue":W[3]||(W[3]=ce=>f.value=ce),placeholder:h(n)("importDialog.pleaseSubGroup")},null,8,a8),[[ze,f.value]]),r("button",{onClick:he},y(h(n)("importDialog.setSubCeb")),1),xe(r("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":W[4]||(W[4]=ce=>w.value=ce),placeholder:h(n)("importDialog.pleaseSubGroupUuid")},null,8,s8),[[ze,w.value]])]),r("div",r8,[xe(r("input",{"onUpdate:modelValue":W[5]||(W[5]=ce=>a.value=ce),placeholder:"Tag"},null,512),[[ze,a.value]]),xe(r("input",{"onUpdate:modelValue":W[6]||(W[6]=ce=>s.value=ce),placeholder:h(n)("importDialog.translater")},null,8,i8),[[ze,s.value]]),r("button",{onClick:be},y(h(n)("importDialog.add")),1),r("button",{style:{"margin-left":"10px"},onClick:ne,class:"upload-btn"},y(h(n)("importDialog.fromJSONImput")),1),r("button",{style:{"margin-left":"10px"},onClick:we,class:"upload-btn"},y(h(n)("importDialog.fromTxtInput")),1),r("button",{style:{"margin-left":"10px"},onClick:O,class:"upload-btn"},y(h(n)("importDialog.fromYmalInput")),1)]),r("div",l8,[l.value?(C(),L("div",u8,[r("h3",null,y(ee(l.value).text),1),d.value?(C(),L("div",c8,[r("h4",null,y(ee(d.value).text),1),r("div",d8,[(C(!0),L(qe,null,ot(b.value,(ce,Ce)=>(C(),L("div",{key:Ce,style:{display:"flex","flex-direction":"column","align-items":"center"}},[r("p",null,y(ee(ce).text)+" - "+y(ee(ce).desc),1),r("div",p8,[T.value===Ce?(C(),L("div",f8,[xe(r("input",{"onUpdate:modelValue":W[7]||(W[7]=Le=>E.value=Le),placeholder:"Tag"},null,512),[[ze,E.value]]),xe(r("input",{"onUpdate:modelValue":W[8]||(W[8]=Le=>I.value=Le),placeholder:h(n)("importDialog.translater")},null,8,g8),[[ze,I.value]]),r("button",{onClick:Le=>Z(Ce)},y(h(n)("importDialog.sureYes")),9,m8),r("button",{style:{"margin-left":"10px"},onClick:te},y(h(n)("importDialog.cancel")),1)])):(C(),L("button",{key:1,onClick:Le=>ve(Ce)},y(h(n)("importDialog.edit")),9,v8)),r("button",{style:{"margin-left":"10px"},onClick:Le=>$e(Ce)},y(h(n)("importDialog.delete")),9,h8)])]))),128))])])):Ae("",!0)])):Ae("",!0)])])]),_:1},8,["modelValue","title"]),st(Tm,{ref_key:"tagGroupSelectDialogItem",ref:re,onSureSelect:oe},null,512)],64))}},[["__scopeId","data-v-9427256d"]]),y8={class:"weilin-tools-dialog-header"},b8={class:"weilin-tools-dialog-body"},w8={class:"form-group"},x8=["value"],S8={class:"form-group"},T8=["value"],k8={class:"form-group"},C8=["value"],E8={class:"form-group"},$8=["value"],A8={class:"form-row"},L8={class:"form-group form-group-half"},I8={class:"form-group form-group-half"},M8={class:"form-group"},O8={class:"form-group"},D8={class:"form-group"},P8={class:"weilin-tools-dialog-footer"},R8=["disabled"],N8=Vt({__name:"GenerateImageDialog",props:{visible:{type:Boolean,default:!1},tag:{type:Object,default:null},options:{type:Object,default:()=>({checkpoints:[],samplers:[],sizes:[]})},mode:{type:String,default:"generate"}},emits:["close","generated"],setup(e,{emit:t}){const n=e,o=t,a=S(!1),s=ds({checkpoint:"",sizeIndex:0,sampler_name:"euler",scheduler:"normal",steps:20,cfg:7,seed:-1,positive:"",negative:"worst quality, low quality, nsfw"});St(()=>n.visible,d=>{var g,f;if(d&&n.tag){s.positive=`${n.tag.text||""}, masterpiece, best quality`,s.negative="worst quality, low quality, nsfw",s.checkpoint=((f=(g=n.options.checkpoints)==null?void 0:g[0])==null?void 0:f.name)||"",s.sampler_name="euler",s.scheduler="normal",s.steps=20,s.cfg=7,s.seed=-1,s.sizeIndex=0,a.value=!1;try{const m=JSON.parse(localStorage.getItem("weilin_tools_gen_params")||"{}");m.checkpoint&&n.options.checkpoints.some(w=>w.name===m.checkpoint)&&(s.checkpoint=m.checkpoint),m.sizeIndex!==void 0&&(s.sizeIndex=m.sizeIndex),m.sampler_name&&(s.sampler_name=m.sampler_name),m.scheduler&&(s.scheduler=m.scheduler),m.steps!==void 0&&(s.steps=m.steps),m.cfg!==void 0&&(s.cfg=m.cfg),m.seed!==void 0&&(s.seed=m.seed),m.negative&&(s.negative=m.negative)}catch{}}});function i(){a.value||o("close")}async function l(){var g;const d=n.options.sizes[s.sizeIndex]||n.options.sizes[0];a.value=!0;try{localStorage.setItem("weilin_tools_gen_params",JSON.stringify({checkpoint:s.checkpoint,sizeIndex:s.sizeIndex,sampler_name:s.sampler_name,scheduler:s.scheduler,steps:s.steps,cfg:s.cfg,seed:s.seed,negative:s.negative}))}catch{}try{const f={checkpoint:s.checkpoint,width:d.width,height:d.height,sampler_name:s.sampler_name,scheduler:s.scheduler,steps:s.steps,cfg:s.cfg,seed:s.seed,positive:s.positive,negative:s.negative};let m;n.mode==="regenerate"?m=await Pt.regenerateTagImage(n.tag.t_uuid,f):m=await Pt.generateTagImage(n.tag.t_uuid,f),o("generated",{task_id:m.data.task_id,t_uuid:n.tag.t_uuid}),o("close")}catch(f){((g=f.response)==null?void 0:g.status)===409?alert("已有生成任务进行中"):alert("生成失败: "+(f.message||"未知错误"))}finally{a.value=!1}}return(d,g)=>e.visible?(C(),L("div",{key:0,class:"weilin-tools-dialog-overlay",onMousedown:vt(i,["self"])},[r("div",{class:"weilin-tools-dialog-content generate-image-dialog",onMousedown:g[9]||(g[9]=vt(()=>{},["stop"]))},[r("div",y8,[r("h2",null,y(e.mode==="regenerate"?"重新生成预览图":"生成标签预览图"),1),r("button",{class:"close-btn",onClick:i},"×")]),r("div",b8,[r("div",w8,[g[10]||(g[10]=r("label",null,"模型",-1)),xe(r("select",{"onUpdate:modelValue":g[0]||(g[0]=f=>s.checkpoint=f),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.checkpoints,f=>(C(),L("option",{key:f.name,value:f.name},y(f.name),9,x8))),128))],512),[[an,s.checkpoint]])]),r("div",S8,[g[11]||(g[11]=r("label",null,"尺寸",-1)),xe(r("select",{"onUpdate:modelValue":g[1]||(g[1]=f=>s.sizeIndex=f),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.sizes,(f,m)=>(C(),L("option",{key:m,value:m},y(f.label),9,T8))),128))],512),[[an,s.sizeIndex]])]),r("div",k8,[g[12]||(g[12]=r("label",null,"采样器",-1)),xe(r("select",{"onUpdate:modelValue":g[2]||(g[2]=f=>s.sampler_name=f),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.samplers,f=>(C(),L("option",{key:f,value:f},y(f),9,C8))),128))],512),[[an,s.sampler_name]])]),r("div",E8,[g[13]||(g[13]=r("label",null,"调度器",-1)),xe(r("select",{"onUpdate:modelValue":g[3]||(g[3]=f=>s.scheduler=f),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.schedulers,f=>(C(),L("option",{key:f,value:f},y(f),9,$8))),128))],512),[[an,s.scheduler]])]),r("div",A8,[r("div",L8,[r("label",null,"步数: "+y(s.steps),1),xe(r("input",{type:"range","onUpdate:modelValue":g[4]||(g[4]=f=>s.steps=f),min:"1",max:"50",class:"form-range"},null,512),[[ze,s.steps,void 0,{number:!0}]])]),r("div",I8,[r("label",null,"CFG: "+y(s.cfg),1),xe(r("input",{type:"range","onUpdate:modelValue":g[5]||(g[5]=f=>s.cfg=f),min:"1",max:"20",step:"0.5",class:"form-range"},null,512),[[ze,s.cfg,void 0,{number:!0}]])])]),r("div",M8,[g[14]||(g[14]=r("label",null,"种子 (-1 为随机)",-1)),xe(r("input",{type:"number","onUpdate:modelValue":g[6]||(g[6]=f=>s.seed=f),class:"form-input"},null,512),[[ze,s.seed,void 0,{number:!0}]])]),r("div",O8,[g[15]||(g[15]=r("label",null,"正向提示词",-1)),xe(r("textarea",{"onUpdate:modelValue":g[7]||(g[7]=f=>s.positive=f),class:"form-textarea",rows:"3"},null,512),[[ze,s.positive]])]),r("div",D8,[g[16]||(g[16]=r("label",null,"负向提示词",-1)),xe(r("textarea",{"onUpdate:modelValue":g[8]||(g[8]=f=>s.negative=f),class:"form-textarea",rows:"2"},null,512),[[ze,s.negative]])])]),r("div",P8,[r("button",{class:"cancel-btn",onClick:i},"取消"),r("button",{class:"confirm-btn",onClick:l,disabled:a.value},y(e.mode==="regenerate"?"重新生成":"生成"),9,R8)])],32)],32)):Ae("",!0)}},[["__scopeId","data-v-71f1fdde"]]),F8={class:"weilin-tools-dialog-header"},B8={class:"weilin-tools-dialog-body"},U8={class:"form-group"},z8=["value"],V8={class:"form-group"},W8=["value"],H8={class:"form-group"},j8=["value"],G8={class:"form-group"},q8=["value"],Y8={class:"form-row"},K8={class:"form-group form-group-half"},J8={class:"form-group form-group-half"},X8={class:"form-group"},Q8={key:0,class:"batch-progress-section"},Z8={class:"batch-progress-bar-wrap"},ex={class:"batch-progress-text"},tx={class:"weilin-tools-dialog-footer"},nx=["disabled"],ox=["disabled"],ax=Vt({__name:"BatchGenerateDialog",props:{visible:{type:Boolean,default:!1},tags:{type:Array,default:()=>[]},options:{type:Object,default:()=>({checkpoints:[],samplers:[],sizes:[]})}},emits:["close","generated"],setup(e,{emit:t}){const n=e,o=t,a=S(!1),s=S(0),i=S(0),l=$t(()=>i.value?Math.round(s.value/i.value*100):0),d=ds({checkpoint:"",sizeIndex:0,sampler_name:"euler",scheduler:"normal",steps:20,cfg:7,seed:-1});St(()=>n.visible,w=>{var b,T;if(w){d.checkpoint=((T=(b=n.options.checkpoints)==null?void 0:b[0])==null?void 0:T.name)||"",d.sampler_name="euler",d.scheduler="normal",d.steps=20,d.cfg=7,d.seed=-1,d.sizeIndex=0,a.value=!1,s.value=0,i.value=0;try{const E=JSON.parse(localStorage.getItem("weilin_tools_gen_params")||"{}");E.checkpoint&&n.options.checkpoints.some(I=>I.name===E.checkpoint)&&(d.checkpoint=E.checkpoint),E.sizeIndex!==void 0&&(d.sizeIndex=E.sizeIndex),E.sampler_name&&(d.sampler_name=E.sampler_name),E.scheduler&&(d.scheduler=E.scheduler),E.steps!==void 0&&(d.steps=E.steps),E.cfg!==void 0&&(d.cfg=E.cfg),E.seed!==void 0&&(d.seed=E.seed)}catch{}}});const g=$t(()=>n.tags?n.tags.filter(w=>!w.image_status||w.image_status==="failed").length:0);function f(){a.value||o("close")}async function m(){var E;const w=n.options.sizes[d.sizeIndex]||n.options.sizes[0],b=n.tags.filter(I=>!I.image_status||I.image_status==="failed");if(!b.length){alert("所有标签已有预览图");return}a.value=!0,i.value=b.length,s.value=0;try{localStorage.setItem("weilin_tools_gen_params",JSON.stringify({checkpoint:d.checkpoint,sizeIndex:d.sizeIndex,sampler_name:d.sampler_name,scheduler:d.scheduler,steps:d.steps,cfg:d.cfg,seed:d.seed}))}catch{}const T={checkpoint:d.checkpoint,width:w.width,height:w.height,sampler_name:d.sampler_name,scheduler:d.scheduler,steps:d.steps,cfg:d.cfg,seed:d.seed,positive_template:"{text}, masterpiece, best quality",negative:"worst quality, low quality"};try{const P=((E=(await Pt.batchGenerateTagImages(b,T)).data)==null?void 0:E.task_ids)||[];o("generated",{task_ids:P});const N=new Map;for(const pe of P)N.set(pe.task_id,pe.t_uuid);for(s.value=P.length-N.size,i.value=P.length;N.size>0;){await new Promise(pe=>setTimeout(pe,2e3));for(const[pe,D]of[...N])try{const V=await Pt.getTagImageStatus(pe),fe=V.data||V;(fe.status==="ready"||fe.status==="failed")&&(N.delete(pe),s.value=i.value-N.size)}catch{}}}catch(I){alert("批量生成失败: "+(I.message||"未知错误"))}finally{a.value=!1}}return(w,b)=>e.visible?(C(),L("div",{key:0,class:"weilin-tools-dialog-overlay",onMousedown:vt(f,["self"])},[r("div",{class:"weilin-tools-dialog-content batch-generate-dialog",onMousedown:b[7]||(b[7]=vt(()=>{},["stop"]))},[r("div",F8,[r("h2",null,"一键生成预览图 —— "+y(g.value)+" 个标签",1),r("button",{class:"close-btn",onClick:f},"×")]),r("div",B8,[r("div",U8,[b[8]||(b[8]=r("label",null,"模型",-1)),xe(r("select",{"onUpdate:modelValue":b[0]||(b[0]=T=>d.checkpoint=T),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.checkpoints,T=>(C(),L("option",{key:T.name,value:T.name},y(T.name),9,z8))),128))],512),[[an,d.checkpoint]])]),r("div",V8,[b[9]||(b[9]=r("label",null,"尺寸",-1)),xe(r("select",{"onUpdate:modelValue":b[1]||(b[1]=T=>d.sizeIndex=T),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.sizes,(T,E)=>(C(),L("option",{key:E,value:E},y(T.label),9,W8))),128))],512),[[an,d.sizeIndex]])]),r("div",H8,[b[10]||(b[10]=r("label",null,"采样器",-1)),xe(r("select",{"onUpdate:modelValue":b[2]||(b[2]=T=>d.sampler_name=T),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.samplers,T=>(C(),L("option",{key:T,value:T},y(T),9,j8))),128))],512),[[an,d.sampler_name]])]),r("div",G8,[b[11]||(b[11]=r("label",null,"调度器",-1)),xe(r("select",{"onUpdate:modelValue":b[3]||(b[3]=T=>d.scheduler=T),class:"form-select"},[(C(!0),L(qe,null,ot(e.options.schedulers,T=>(C(),L("option",{key:T,value:T},y(T),9,q8))),128))],512),[[an,d.scheduler]])]),r("div",Y8,[r("div",K8,[r("label",null,"步数: "+y(d.steps),1),xe(r("input",{type:"range","onUpdate:modelValue":b[4]||(b[4]=T=>d.steps=T),min:"1",max:"50",class:"form-range"},null,512),[[ze,d.steps,void 0,{number:!0}]])]),r("div",J8,[r("label",null,"CFG: "+y(d.cfg),1),xe(r("input",{type:"range","onUpdate:modelValue":b[5]||(b[5]=T=>d.cfg=T),min:"1",max:"20",step:"0.5",class:"form-range"},null,512),[[ze,d.cfg,void 0,{number:!0}]])])]),r("div",X8,[b[12]||(b[12]=r("label",null,"种子 (-1 为随机)",-1)),xe(r("input",{type:"number","onUpdate:modelValue":b[6]||(b[6]=T=>d.seed=T),class:"form-input"},null,512),[[ze,d.seed,void 0,{number:!0}]])]),a.value?(C(),L("div",Q8,[r("div",Z8,[r("div",{class:"batch-progress-bar",style:Ft({width:l.value+"%"})},null,4)]),r("div",ex,y(s.value)+" / "+y(i.value),1)])):Ae("",!0)]),r("div",tx,[r("button",{class:"cancel-btn",onClick:f,disabled:a.value},"取消",8,nx),r("button",{class:"confirm-btn",onClick:m,disabled:a.value},"开始生成",8,ox)])],32)],32)):Ae("",!0)}},[["__scopeId","data-v-aa7a0823"]]),sx={class:"tag-manager"},rx={class:"toolbar"},ix={class:"toolbar-top"},lx={class:"search-container"},ux=["placeholder"],cx={key:0,class:"no-results"},dx=["onClick"],px={class:"result-content"},fx={class:"result-text"},gx={class:"result-path"},mx={class:"toolbar-bottom"},vx={class:"auto-add-checkbox"},hx={class:"category-tabs"},_x={class:"tabs-wrapper primary-tabs"},yx={class:"tabs-scroll"},bx=["onClick","onMouseenter","onMouseleave"],wx={class:"tab-text"},xx={key:0,class:"tab-actions"},Sx=["onClick","title"],Tx=["onClick","title"],kx=["onClick","title"],Cx=["onClick","title"],Ex={class:"group-edit-mode"},$x={class:"group-edit-mode"},Ax={key:0,class:"tabs-wrapper group-tabs"},Lx={class:"tabs-scroll"},Ix=["onClick","onMouseenter","onMouseleave"],Mx={class:"tab-text"},Ox={key:0,class:"tab-actions"},Dx=["onClick","title"],Px=["onClick","title"],Rx=["onClick","title"],Nx=["onClick","title"],Fx={class:"group-edit-mode"},Bx={class:"tags-content"},Ux={class:"tags-header"},zx={class:"tags-title"},Vx={class:"tags-actions"},Wx=["disabled"],Hx=["disabled"],jx={viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",style:{"margin-right":"4px"}},Gx=["disabled"],qx={viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",style:{"margin-right":"4px"}},Yx=["disabled"],Kx=["disabled"],Jx=["disabled"],Xx=["disabled"],Qx={key:0,class:"tags-grid"},Zx=["onMouseenter"],e7={key:0,class:"tag-thumb-ready-wrap"},t7=["src"],n7=["onClick"],o7={key:1,class:"tag-thumb-placeholder tag-thumb-loading"},a7=["onClick"],s7=["onClick"],r7=["src"],i7=["onClick"],l7={class:"tag-actions"},u7=["onClick","title"],c7=["onClick","title"],d7=["onClick","title"],p7={class:"tag-desc"},f7=["value"],g7={key:0,class:"weilin-tools-dialog-overlay"},m7={class:"weilin-tools-dialog-header"},v7={class:"weilin-tools-dialog-body"},h7={key:0,class:"form-group"},_7=["placeholder"],y7={key:1,class:"form-group"},b7=["placeholder"],w7={class:"form-group"},x7={class:"color-picker"},S7={class:"color-controls"},T7={class:"alpha-control"},k7={class:"alpha-value"},C7={class:"weilin-tools-dialog-footer"},E7={key:1,class:"weilin-tools-dialog-overlay"},$7={class:"weilin-tools-dialog-header"},A7={class:"weilin-tools-dialog-body"},L7={class:"form-group"},I7=["placeholder"],M7={class:"form-group"},O7=["placeholder"],D7={class:"form-group"},P7={class:"color-picker"},R7={class:"color-controls"},N7={class:"alpha-control"},F7={class:"alpha-value"},B7={class:"weilin-tools-dialog-footer"},U7={key:2,class:"weilin-tools-dialog-overlay"},z7={class:"weilin-tools-dialog-header"},V7={class:"weilin-tools-dialog-body"},W7={class:"confirm-message"},H7={class:"weilin-tools-dialog-footer"},j7={key:3,class:"weilin-tools-dialog-overlay"},G7={class:"weilin-tools-dialog-content"},q7={class:"weilin-tools-dialog-header"},Y7={class:"weilin-tools-dialog-body"},K7={class:"form-group"},J7=["value"],X7={class:"form-group"},Q7={class:"radio-group"},Z7={class:"weilin-tools-dialog-footer"},e9={key:4,class:"weilin-tools-dialog-overlay"},t9={class:"weilin-tools-dialog-content"},n9={class:"weilin-tools-dialog-header"},o9={class:"weilin-tools-dialog-body"},a9={class:"form-group"},s9=["value"],r9={class:"form-group"},i9={class:"radio-group"},l9={class:"weilin-tools-dialog-footer"},u9={key:5,class:"weilin-tools-dialog-overlay"},c9={class:"weilin-tools-dialog-header"},d9={class:"weilin-tools-dialog-body"},p9={class:"config-section"},f9={class:"form-group"},g9={class:"width-control"},m9={class:"radio-label"},v9={class:"radio-label"},h9={class:"form-group"},_9={class:"form-group"},y9={class:"config-section"},b9={class:"form-group"},w9={class:"width-control"},x9={class:"radio-label"},S9={class:"radio-label"},T9={class:"form-group"},k9={class:"form-group"},C9={class:"weilin-tools-dialog-footer"},$v=Vt({__name:"tag_index",props:{tagManager:{type:String,default:"prompt"}},setup(e){cc();const{t}=Kt(),n=S([]),o=S(null),a=S([]),s=S([]),i=S(null),l=S(!1),d=S(!1),g=S(!1),f=S(!1),m=S("primary"),w=S([]),b=S(!1),T=S(!1),E=S("None"),I=S("None"),P=S(0),N=S(0),pe=S(!1),D=S(null),V=S(0),fe=S(!1),O=S(null),se=S("before"),le=S(null),Pe=S("before"),Ie=S(null),ue=S(null),we=S(!1),ne=S(!1),J=S(!1),ie=S(null),X=S({checkpoints:[],samplers:[],sizes:[]}),ee=S({}),$e=S(null),ve=S(null),Z=S({}),te=S(!1),be=S(null),Te=ds({}),he=$t(()=>Object.keys(ee.value).length>0),re=S(!1),j=S({primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}}),oe={primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}},B=e,q=S({name:"",color:"rgba(255, 123, 2, .4)",id_index:"",groups:[]}),Y=S({name:"",id_index:"",color:"rgba(255, 123, 2, .4)",tags:[]}),$=S({text:"",desc:"",id_index:"",color:"rgba(255, 123, 2, .4)"}),A=_e=>{const ae=_e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(ae){const[,ye,nt,Wt,hn]=ae,Nt=`#${((1<<24)+(parseInt(ye)<<16)+(parseInt(nt)<<8)+parseInt(Wt)).toString(16).slice(1)}`,un=hn?Math.round(parseFloat(hn)*100):100;return{hex:Nt,alpha:un}}return{hex:"#FFFFFF",alpha:100}},W=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},ce=async()=>{try{await Pt.getTagMainGroup().then(_e=>{n.value=_e}).catch(_e=>{console.error(_e),de({type:"warn",str:"message.networkError"})}),o.value&&await Ce(o.value.p_uuid),i.value&&await Le(i.value.g_uuid)}catch(_e){console.error("Tag管理器列表失败:",_e)}},Ce=async _e=>{try{await Pt.getTagSubGroup(_e).then(ae=>{a.value=ae}).catch(ae=>{console.error(ae),de({type:"warn",str:"message.networkError"})})}catch(ae){console.error("二级分类列表失败:",ae)}},Le=async _e=>{try{await Pt.getTagList(_e).then(ae=>{s.value=ae;for(const ye of ae)(ye.image_status==="pending"||ye.image_status==="generating")&&$o(ye.t_uuid)}).catch(ae=>{console.error(ae),de({type:"warn",str:"message.networkError"})})}catch(ae){console.error("Tag列表失败:",ae)}};Dt(async()=>{Qn(),window.addEventListener("click",pr),window.addEventListener("resize",Qn),window.addEventListener("message",Cs),window.addEventListener("keydown",fr),ns(),W()}),Ba(()=>{window.removeEventListener("click",pr),window.removeEventListener("resize",Qn),window.removeEventListener("message",Cs),window.removeEventListener("keydown",fr)});const z=async _e=>{o.value=_e,i.value=null,b.value=!1,w.value=[],await Ce(_e.p_uuid)},k=async _e=>{i.value=_e,b.value=!1,w.value=[],await Le(_e.g_uuid)},H=_e=>{m.value=_e,g.value=!1,at.value=A("rgba(255, 123, 2, .4)"),_e==="primary"?q.value={name:"",color:"rgba(255, 123, 2, .4)",groups:[]}:Y.value={name:"",color:"rgba(255, 123, 2, .4)",tags:[]},l.value=!0},Q=_e=>{g.value=!0,m.value="primary",q.value={..._e},at.value=A(_e.color),l.value=!0},Ne=_e=>{g.value=!0,m.value="group",Y.value={..._e},at.value=A(_e.color),l.value=!0},De=()=>{if(m.value==="primary"){if(!q.value.name){de({type:"warn",str:"tagManager.categoryNameRequired"});return}g.value?n.value.findIndex(ae=>ae.id_index===q.value.id_index)!==-1&&Pt.editPrimaryCategory({id_index:q.value.id_index,name:q.value.name,color:q.value.color}).then(ae=>{ae.code===200?(W(),de({type:"success",str:"message.editSuccess"})):ae.code===201?de({type:"error",str:"message.editNameExist"}):de({type:"error",str:"message.editFailed"})}).catch(ae=>{de({type:"warn",str:"message.networkError"})}):Pt.addPrimaryCategory({name:q.value.name,color:q.value.color}).then(_e=>{_e.code===200?(W(),de({type:"success",str:"message.addSuccess"})):_e.code===201?de({type:"error",str:"message.editNameExist"}):de({type:"error",str:"message.addFailed"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})})}else{if(!Y.value.name){de({type:"warn",str:"tagManager.groupNameRequired"});return}g.value?Pt.editSubCategory({id_index:Y.value.id_index,name:Y.value.name,color:Y.value.color}).then(_e=>{_e.code===200?(W(),de({type:"success",str:"message.editSuccess"})):_e.code===201?de({type:"error",str:"message.editNameExist"}):de({type:"error",str:"message.editFailed"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})}):Pt.addSubCategory({name:Y.value.name,color:Y.value.color,key:o.value.id_index,p_uuid:o.value.p_uuid}).then(_e=>{_e.code===200?(W(),de({type:"success",str:"message.addSuccess"})):_e.code===201?de({type:"error",str:"message.editNameExist"}):de({type:"error",str:"message.editFailed"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})})}Ee()},ge=()=>g.value?m.value==="primary"?t("tagManager.editPrimaryCategory"):t("tagManager.editSubCategory"):m.value==="primary"?t("tagManager.addPrimaryCategory"):t("tagManager.addSubCategory"),Ee=()=>{l.value=!1,q.value={id:"",name:"",parentId:null,subCategories:[],backgroundColor:"transparent"},at.value={hex:"#FFFFFF",alpha:0}},Ke=()=>{i.value&&(f.value=!1,$.value={id:"",text:"",desc:"",categoryId:i.value.id,g_uuid:i.value.g_uuid,backgroundColor:Y.value.color},at.value=A(Y.value.color),d.value=!0)},et=_e=>{f.value=!0,$.value={..._e},at.value=A(_e.color),d.value=!0},ut=()=>{if(!$.value.text||!$.value.desc){de({type:"warn",str:"tagManager.textRequired"});return}f.value&&i.value?Pt.editTags({id_index:$.value.id_index,text:$.value.text,desc:$.value.desc,color:$.value.color}).then(_e=>{W(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.editSuccess"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})}):i.value&&Pt.addNewTags({id_index:i.value.id_index,g_uuid:i.value.g_uuid,text:$.value.text,desc:$.value.desc,color:$.value.color?$.value.color:"rgba(255, 123, 2, .4)"}).then(_e=>{W(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.addSuccess"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})}),ft()},ft=()=>{d.value=!1,$.value={text:"",desc:"",color:"rgba(255, 123, 2, .4)"},f.value=!1},at=S({hex:"#FFFFFF",alpha:100}),rn=$t(()=>An(at.value.hex,at.value.alpha)),Rt=()=>{const _e=An(at.value.hex,at.value.alpha);l.value?m.value==="primary"?q.value.color=_e:Y.value.color=_e:d.value&&($.value.color=_e)},An=(_e,ae)=>{const ye=parseInt(_e.slice(1,3),16),nt=parseInt(_e.slice(3,5),16),Wt=parseInt(_e.slice(5,7),16);return`rgba(${ye}, ${nt}, ${Wt}, ${ae/100})`},Tn=S(""),Xt=S([]),ln=S(!1),Kn=async()=>{ln.value=Tn.value.trim().length>0;const _e=Tn.value.trim().toLowerCase();if(!_e){Xt.value=[];return}Xt.value=[],await Pt.searchTag(_e).then(ae=>{Xt.value=ae}).catch(ae=>{de({type:"warn",str:"message.networkError"})})};St(Tn,()=>{Kn()});const Jn=async _e=>{const ae=n.value.find(ye=>ye.p_uuid===_e.p_uuid);ae&&await z(ae).then(async()=>{await yt(async()=>{const ye=a.value.find(nt=>nt.g_uuid===_e.g_uuid);ye&&await k(ye).then(async()=>{await yt(()=>{V.value==1&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:_e.text},"*"),D.value=_e.id_index,setTimeout(()=>{const nt=document.querySelector(".tag-wrapper.highlight");nt&&nt.scrollIntoView({behavior:"smooth",block:"center"})},100),setTimeout(()=>{D.value=null},5e3)})})})}),Tn.value=""},gt=_e=>{if(!_e||_e==="transparent")return"var(--primary-text)";let ae,ye,nt,Wt=1;if(_e.startsWith("rgba")){const Nt=_e.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);Nt&&([,ae,ye,nt,Wt]=Nt.map(Number))}else if(_e.startsWith("rgb")){const Nt=_e.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);Nt&&([,ae,ye,nt]=Nt.map(Number))}return Wt<.5?"var(--primary-text)":(ae*299+ye*587+nt*114)/1e3>128?"#000000":"#ffffff"},Fe=_e=>{B.tagManager==="prompt"&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:_e.text},"*")},Ue=S(!1),Lt=S(""),Qt=S(null),Qa=$t(()=>{if(!Qt.value)return"";switch(Lt.value){case"category":return t("tagManager.deletePrimaryCategoryConfirm",{name:Qt.value.name});case"group":return t("tagManager.deleteGroupConfirm",{name:Qt.value.name});case"tag":return t("tagManager.deleteTagConfirm",{name:Qt.value.text});case"deleteSelected":return t("tagManager.confirmDeleteSelected");default:return""}}),Ia=_e=>{Lt.value="category",Qt.value=_e,Ue.value=!0},Za=_e=>{Lt.value="group",Qt.value=_e,Ue.value=!0},lr=_e=>{Lt.value="tag",Qt.value=_e,Ue.value=!0},mi=async()=>{try{switch(Lt.value){case"category":Pt.deletePrimaryCategory({p_uuid:Qt.value.p_uuid}).then(_e=>{W(),de({type:"success",str:"message.deleteSuccess"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})});break;case"group":Pt.deleteSubCategory({g_uuid:Qt.value.g_uuid}).then(_e=>{W(),de({type:"success",str:"message.deleteSuccess"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})});break;case"tag":Pt.deleteTags({id_index:Qt.value.id_index}).then(_e=>{W(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.deleteSuccess"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Pt.batchDeleteTags({id_indexs:w.value}).then(_e=>{W(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.deleteSuccess"})}).catch(_e=>{de({type:"warn",str:"message.networkError"})});break}Po()}catch(_e){console.error("删除失败:",_e)}},es=async _e=>{const ae=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${_e.name.replace(/'/g,"''")}', '${_e.color}', ${_e.create_time}, '${_e.p_uuid}');`;try{const ye=await Pt.getTagSubGroup(_e.p_uuid);let nt=[];nt.push(ae);for(const Nt of ye){const un=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${Nt.name.replace(/'/g,"''")}', '${Nt.color}', ${Nt.create_time}, '${Nt.p_uuid}', '${Nt.g_uuid}');`;nt.push(un);try{(await Pt.getTagList(Nt.g_uuid)).forEach(eo=>{const yr=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${eo.text!=null&&eo.text.length>0?eo.text.replace(/'/g,"''"):""}', '${eo.desc!=null&&eo.desc.length>0?eo.desc.replace(/'/g,"''"):""}', '${eo.color}', ${eo.create_time}, '${eo.g_uuid}', '${Ya()}');`;nt.push(yr)})}catch(is){console.error("Tag列表失败:",is),de({type:"warn",str:"message.shareTagError"})}}const Wt=new Blob([nt.join(`
`)],{type:"text/sql"}),hn=document.createElement("a");hn.href=URL.createObjectURL(Wt),hn.download=`${_e.name}_export_${Date.now()}.sql`,hn.click(),de({type:"success",str:"tagManager.outputSuccess"})}catch(ye){console.error("二级分类列表失败:",ye),de({type:"warn",str:"message.shareGroupError"})}},ta=async _e=>{try{let ae=[];const ye=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${_e.name.replace(/'/g,"''")}', '${_e.color}', ${_e.create_time}, '${_e.p_uuid}', '${_e.g_uuid}');`;ae.push(ye);try{(await Pt.getTagList(_e.g_uuid)).forEach(Nt=>{const un=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Nt.text!=null&&Nt.text.length>0?Nt.text.replace(/'/g,"''"):""}', '${Nt.desc!=null&&Nt.desc.length>0?Nt.desc.replace(/'/g,"''"):""}', '${Nt.color}', ${Nt.create_time}, '${Nt.g_uuid}', '${Ya()}');`;ae.push(un)})}catch(hn){console.error("Tag列表失败:",hn),de({type:"warn",str:"message.shareTagError"})}const nt=new Blob([ae.join(`
`)],{type:"text/sql"}),Wt=document.createElement("a");Wt.href=URL.createObjectURL(nt),Wt.download=`${_e.name}_export_${Date.now()}.sql`,Wt.click(),de({type:"success",str:"tagManager.outputSuccess"})}catch(ae){console.error("二级分类列表失败:",ae),de({type:"warn",str:"message.shareGroupError"})}},ur=_e=>{le.value=_e.id_index,fe.value=!0},cr=async()=>{try{Pt.moveTag({id_index:le.value,reference_id_index:O.value,position:se.value}).then(_e=>{W(),fe.value=!1,de({type:"success",str:t("message.moveSuccess")})}).catch(_e=>{de({type:"error",str:t("message.moveFailed")})})}catch(_e){console.error("移动标签失败:",_e),de({type:"error",str:t("message.moveFailed")})}},Do=S([]),zn=S(1),kn=(_e,ae)=>{zn.value=ae,ae===1?(Do.value=n.value,Ie.value=_e.id_index,T.value=!0):(Do.value=a.value,Ie.value=_e.id_index,T.value=!0)},yo=async()=>{if(zn.value===1)try{Pt.moveMainGroup({id_index:Ie.value,reference_id_index:ue.value,position:Pe.value}).then(_e=>{W(),T.value=!1,de({type:"success",str:t("message.moveSuccess")})}).catch(_e=>{de({type:"error",str:t("message.moveFailed")})})}catch(_e){console.error("移动标签失败:",_e),de({type:"error",str:t("message.moveFailed")})}else try{Pt.moveSubGroup({id_index:Ie.value,reference_id_index:ue.value,position:Pe.value}).then(_e=>{W(),T.value=!1,de({type:"success",str:t("message.moveSuccess")})}).catch(_e=>{de({type:"error",str:t("message.moveFailed")})})}catch(_e){console.error("移动标签失败:",_e),de({type:"error",str:t("message.moveFailed")})}},na=()=>{b.value=!0,we.value=!0},Xn=()=>{b.value=!1,we.value=!1,w.value=[]},oa=()=>{w.value.length!==0&&(Lt.value="deleteSelected",Qt.value={},Ue.value=!0)},co=()=>{b.value=!0,ne.value=!0},pt=()=>{b.value=!1,ne.value=!1,w.value=[]},Eo=()=>{if(w.value.length===0){de({type:"warn",str:"tagManager.noTagsSelected"});return}const _e={};w.value.forEach(nt=>{_e[nt.text]=nt.desc});const ae=new Blob([Ev.dump(_e)],{type:"text/yaml"}),ye=document.createElement("a");ye.href=URL.createObjectURL(ae),ye.download=`selected_tags_export_${Date.now()}.yaml`,ye.click(),de({type:"success",str:"tagManager.outputSuccess"}),pt()},Po=()=>{Ue.value=!1,Lt.value="",Qt.value=null},dr=async()=>{try{await W()}catch(_e){console.error("刷新标签列表失败:",_e)}},ts=S(),aa=S({}),Qn=()=>{if(ts.value){const _e=ts.value.getBoundingClientRect();aa.value={position:"fixed",top:`${_e.bottom}px`,left:`${_e.left}px`,width:`${_e.width}px`,zIndex:1e3}}},Cs=_e=>{_e.data.type==="weilin_prompt_ui_window_change_tagManager_position"||_e.data.type==="weilin_prompt_ui_window_change_tagManager_size"||_e.data.type==="weilin_prompt_ui_window_change_tagManager_scroll"||_e.data.type==="weilin_prompt_ui_window_change_promptBox_position"||_e.data.type==="weilin_prompt_ui_window_change_promptBox_size"||_e.data.type==="weilin_prompt_ui_window_change_promptBox_scroll"?Qn():_e.data.type==="weilin_prompt_ui_window_change_click_outside"||_e.data.type==="weilin_prompt_ui_tag_manager_refresh"&&ce()},pr=_e=>{ln.value&&!ts.value.contains(_e.target)&&(ln.value=!1)},fr=_e=>{_e.key==="Escape"&&(ln.value=!1)},Es=_e=>{N.value==1&&(E.value="TabID-"+_e)},gr=_e=>{E.value="None"},mr=_e=>{P.value==1&&(I.value="TabID-"+_e)},$s=_e=>{I.value="None"},sa=S(),vr=()=>{sa.value.open()},ns=()=>{const _e=JSON.parse(JSON.stringify(oe));try{const ae=localStorage.getItem("weilin_tag_manager_tab_size_config");if(ae){const ye=JSON.parse(ae);j.value={..._e,...ye}}else j.value={..._e}}catch(ae){console.error("读取标签尺寸配置失败:",ae),j.value={..._e}}},hr=()=>{try{localStorage.setItem("weilin_tag_manager_tab_size_config",JSON.stringify(j.value)),de({type:"success",str:"tagManager.tabSizeConfigSaved"}),re.value=!1}catch(_e){console.error("保存标签尺寸配置失败:",_e),de({type:"error",str:"tagManager.tabSizeConfigSaveFailed"})}},os=()=>{re.value=!0},as=()=>{re.value=!1,ns()},ss=()=>{const _e=JSON.parse(JSON.stringify(oe));j.value={..._e}};function As(_e){const ae=Te[_e]||0;return`/weilin/prompt_ui/api/tag_thumb/${_e}?v=${ae}`}function vi(_e){const ae=Te[_e]||0;return`/weilin/prompt_ui/api/tag_image/${_e}?v=${ae}`}async function Ro(_e){if(!X.value.checkpoints.length)try{const ae=await Pt.getGenerationOptions();X.value=ae.data||ae||X.value}catch(ae){console.error("Failed to load generation options:",ae)}ie.value=_e,J.value=!0}async function _r(_e){if(!X.value.checkpoints.length)try{const ae=await Pt.getGenerationOptions();X.value=ae.data||ae||X.value}catch(ae){console.error("Failed to load generation options:",ae);return}be.value=_e,J.value=!0}async function hi(){if(!s.value.filter(ae=>!ae.image_status||ae.image_status==="failed").length){alert("当前分组所有标签已有预览图");return}if(!X.value.checkpoints.length)try{const ae=await Pt.getGenerationOptions();X.value=ae.data||ae||X.value}catch(ae){console.error("Failed to load generation options:",ae);return}te.value=!0}async function rs(){try{const _e=await Pt.cancelAllTasks(),ae=(_e.data||_e).cancelled||0;de.success(`已中止 ${ae} 个任务`);for(const[ye,nt]of Object.entries(ee.value))clearInterval(nt),delete ee.value[ye];for(const ye of s.value)(ye.image_status==="pending"||ye.image_status==="generating")&&(ye.image_status=null)}catch(_e){de.error("中止失败: "+(_e.message||"未知错误"))}}function Ma(){J.value=!1,ie.value=null,be.value=null}async function Zn({task_id:_e,t_uuid:ae}){const ye=s.value.find(nt=>nt.t_uuid===ae);ye&&(ye.image_status="pending"),ra(_e,ae)}function No({task_ids:_e}){te.value=!1;for(const ae of _e){const ye=s.value.find(nt=>nt.t_uuid===ae.t_uuid);ye&&(ye.image_status="pending"),ra(ae.task_id,ae.t_uuid)}}function ra(_e,ae){ee.value[ae]&&clearInterval(ee.value[ae]);const ye=setInterval(async()=>{try{const nt=await Pt.getTagImageStatus(_e),Wt=nt.data||nt;(Wt.status==="ready"||Wt.status==="failed")&&(clearInterval(ye),delete ee.value[ae],await $o(ae))}catch(nt){console.error("Polling error:",nt)}},2e3);ee.value[ae]=ye}async function $o(_e){try{const ae=await Pt.getTagImageStatusByUuid(_e),ye=ae.data||ae,nt=s.value.find(Wt=>Wt.t_uuid===_e);nt&&(nt.image_status=ye.status,ye.status==="ready"&&ye.thumb_url&&(nt.image_path=ye.image_url)),(ye.status==="pending"||ye.status==="generating")&&ye.task_id&&ra(ye.task_id,_e),ye.status==="ready"&&(Te[_e]=Date.now(),delete Z.value[_e])}catch(ae){console.error("Failed to refresh tag image status:",ae)}}const bo=S({});function ia(_e,ae){_e.image_status!=="ready"||!_e.t_uuid||(clearTimeout($e.value),$e.value=setTimeout(async()=>{ve.value=_e.id_index,Z.value[_e.t_uuid]||(Z.value[_e.t_uuid]=vi(_e.t_uuid));const ye=ae.target.getBoundingClientRect();bo.value={left:ye.right+12+"px",top:ye.top+"px"}},200))}function _i(){clearTimeout($e.value),ve.value=null}return(_e,ae)=>(C(),L("div",sx,[r("div",rx,[r("div",ix,[r("button",{class:"refresh-btn",onClick:dr},[...ae[42]||(ae[42]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),r("div",lx,[xe(r("input",{type:"text","onUpdate:modelValue":ae[0]||(ae[0]=ye=>Tn.value=ye),placeholder:h(t)("tagManager.searchPlaceholder"),class:"search-input",ref_key:"searchInput",ref:ts,onInput:ae[1]||(ae[1]=ye=>ln.value=Tn.value.trim().length>0)},null,40,ux),[[ze,Tn.value]]),ln.value?(C(),L("div",{key:0,class:"search-results",style:Ft(aa.value)},[Xt.value.length===0?(C(),L("div",cx,y(h(t)("tagManager.noResults")),1)):(C(!0),L(qe,{key:1},ot(Xt.value,(ye,nt)=>(C(),L("div",{key:`${nt}-search_item`,class:"search-result-item",onClick:Wt=>Jn(ye)},[r("div",px,[r("span",fx,y(ye.name||ye.text),1),r("span",gx,y(ye.where),1)])],8,dx))),128))],4)):Ae("",!0)]),r("button",{class:"import-btn",onClick:vr},y(h(t)("tagManager.importTags")),1)]),r("div",mx,[r("div",vx,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":ae[2]||(ae[2]=ye=>V.value=ye),"true-value":1,"false-value":0},null,512),[[on,V.value]]),ct(" "+y(h(t)("tagManager.autoAddSearchTag")),1)])]),r("button",{class:"tab-size-btn",onClick:os},y(h(t)("tagManager.modifyTabSize")),1)])]),r("div",hx,[r("div",_x,[r("div",yx,[(C(!0),L(qe,null,ot(n.value,(ye,nt)=>{var Wt,hn,Nt;return C(),L("div",{key:"Tabss-"+nt,class:Ve(["tab-item",{active:((Wt=o.value)==null?void 0:Wt.name)===ye.name}]),style:Ft({backgroundColor:((hn=o.value)==null?void 0:hn.name)===ye.name?"var(--primary-color)":ye.color,color:((Nt=o.value)==null?void 0:Nt.name)===ye.name?"#ffffff":gt(ye.color),width:j.value.primaryTab.width==="fit-content"?"fit-content":j.value.primaryTab.width+"px",height:j.value.primaryTab.height+"px",fontSize:j.value.primaryTab.fontSize+"px"}),onClick:un=>z(ye),onMouseenter:un=>Es(nt),onMouseleave:un=>gr()},[r("span",wx,y(ye.name),1),E.value=="TabID-"+nt?(C(),L("div",xx,[r("button",{class:"action-btn move",onClick:vt(un=>kn(ye,1),["stop"]),title:h(t)("tagManager.moveGroup")},[...ae[43]||(ae[43]=[r("svg",{viewBox:"0 0 24 24",class:"move-icon"},[r("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)])],8,Sx),r("button",{class:"action-btn edit",onClick:vt(un=>Q(ye),["stop"]),title:h(t)("tagManager.edit")},[...ae[44]||(ae[44]=[r("svg",{viewBox:"0 0 24 24",class:"action-icon"},[r("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,Tx),r("button",{class:"action-btn share",onClick:vt(un=>es(ye),["stop"]),title:h(t)("tagManager.share")},[...ae[45]||(ae[45]=[r("svg",{viewBox:"0 0 24 24",class:"action-icon"},[r("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"})],-1)])],8,kx),r("button",{class:"action-btn delete",onClick:vt(un=>Ia(ye),["stop"]),title:h(t)("tagManager.delete")},[...ae[46]||(ae[46]=[r("svg",{viewBox:"0 0 24 24",class:"action-icon"},[r("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,Cx)])):Ae("",!0)],46,bx)}),128)),r("button",{class:"add-tab",onClick:ae[3]||(ae[3]=ye=>H("primary"))},[ae[47]||(ae[47]=r("span",{class:"plus-icon"},"+",-1)),ct(" "+y(h(t)("tagManager.addPrimaryCategory")),1)]),r("div",Ex,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":ae[4]||(ae[4]=ye=>pe.value=ye)},null,512),[[on,pe.value]]),ae[48]||(ae[48]=ct(" 隐藏示意图 ",-1))])]),r("div",$x,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":ae[5]||(ae[5]=ye=>N.value=ye),"true-value":1,"false-value":0},null,512),[[on,N.value]]),ct(" "+y(N.value==1?h(t)("tagManager.exitEditMode"):h(t)("tagManager.editGroupMode")),1)])])])]),o.value?(C(),L("div",Ax,[r("div",Lx,[(C(!0),L(qe,null,ot(a.value,(ye,nt)=>{var Wt,hn,Nt;return C(),L("div",{key:"TabsSw-"+nt,class:Ve(["tab-item",{active:((Wt=i.value)==null?void 0:Wt.name)===ye.name}]),style:Ft({backgroundColor:((hn=i.value)==null?void 0:hn.name)===ye.name?"var(--primary-color)":ye.color,color:((Nt=i.value)==null?void 0:Nt.name)===ye.name?"#ffffff":gt(ye.color),width:j.value.groupTab.width==="fit-content"?"fit-content":j.value.groupTab.width+"px",height:j.value.groupTab.height+"px",fontSize:j.value.groupTab.fontSize+"px"}),onClick:un=>k(ye),onMouseenter:un=>mr(nt),onMouseleave:un=>$s()},[r("span",Mx,y(ye.name),1),I.value=="TabID-"+nt?(C(),L("div",Ox,[r("button",{class:"action-btn move",onClick:vt(un=>kn(ye,2),["stop"]),title:h(t)("tagManager.moveGroup")},[...ae[49]||(ae[49]=[r("svg",{viewBox:"0 0 24 24",class:"move-icon"},[r("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)])],8,Dx),r("button",{class:"action-btn edit",onClick:vt(un=>Ne(ye),["stop"]),title:h(t)("tagManager.edit")},[...ae[50]||(ae[50]=[r("svg",{viewBox:"0 0 24 24",class:"action-icon"},[r("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,Px),r("button",{class:"action-btn delete",onClick:vt(un=>Za(ye),["stop"]),title:h(t)("tagManager.delete")},[...ae[51]||(ae[51]=[r("svg",{viewBox:"0 0 24 24",class:"action-icon"},[r("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,Rx),r("button",{class:"action-btn share",onClick:vt(un=>ta(ye),["stop"]),title:h(t)("tagManager.share")},[...ae[52]||(ae[52]=[r("svg",{viewBox:"0 0 24 24",class:"action-icon"},[r("path",{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"})],-1)])],8,Nx)])):Ae("",!0)],46,Ix)}),128)),o.value?(C(),L("button",{key:0,class:"add-tab",onClick:ae[6]||(ae[6]=ye=>H("group"))},[ae[53]||(ae[53]=r("span",{class:"plus-icon"},"+",-1)),ct(" "+y(h(t)("tagManager.addGroup")),1)])):Ae("",!0),r("div",Fx,[r("label",null,[xe(r("input",{type:"checkbox","onUpdate:modelValue":ae[7]||(ae[7]=ye=>P.value=ye),"true-value":1,"false-value":0},null,512),[[on,P.value]]),ct(" "+y(P.value==1?h(t)("tagManager.exitEditMode"):h(t)("tagManager.editGroupMode")),1)])])])])):Ae("",!0)]),r("div",Bx,[r("div",Ux,[r("div",zx,y(i.value?i.value.name:h(t)("tagManager.selectCategory")),1),r("div",Vx,[r("button",{class:"add-btn",onClick:Ke,disabled:!i.value},[ae[54]||(ae[54]=r("span",{class:"plus-icon"},"+",-1)),ct(" "+y(h(t)("tagManager.addTag")),1)],8,Wx),r("button",{class:"add-btn batch-generate-btn",onClick:hi,disabled:!i.value},[(C(),L("svg",jx,[...ae[55]||(ae[55]=[r("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"},null,-1)])])),ae[56]||(ae[56]=ct(" 一键生成 ",-1))],8,Hx),r("button",{class:"add-btn cancel-generate-btn",onClick:rs,disabled:!he.value},[(C(),L("svg",qx,[...ae[57]||(ae[57]=[r("path",{d:"M6 6h12v12H6V6z"},null,-1)])])),ae[58]||(ae[58]=ct(" 中止生成 ",-1))],8,Gx),ne.value?(C(),L("button",{key:0,class:"share-selected-btn",onClick:Eo,disabled:!w.value.length},y(h(t)("tagManager.shareSelected")),9,Yx)):(C(),L("button",{key:1,class:"share-btn",onClick:co,disabled:!i.value},y(h(t)("tagManager.batchShare")),9,Kx)),ne.value?(C(),L("button",{key:2,class:"cancel-delete-btn",onClick:pt},y(h(t)("tagManager.cancelShare")),1)):Ae("",!0),we.value?(C(),L("button",{key:3,class:"delete-btn",onClick:oa,disabled:!w.value.length},y(h(t)("tagManager.deleteSelected")),9,Jx)):(C(),L("button",{key:4,class:"delete-action-btn",onClick:na,disabled:!i.value},y(h(t)("tagManager.hasDeleteAction")),9,Xx)),we.value?(C(),L("button",{key:5,class:"cancel-delete-btn",onClick:Xn},y(h(t)("tagManager.cancelDelete")),1)):Ae("",!0)])]),i.value?(C(),L("div",Qx,[(C(!0),L(qe,null,ot(s.value,ye=>(C(),L("div",{key:"tag-grid-"+ye.id_index,class:Ve(D.value===ye.id_index?"tag-wrapper highlight":"tag-wrapper")},[xe(r("div",{class:"tag-thumb-area",onMouseenter:nt=>ia(ye,nt),onMouseleave:_i},[ye.image_status==="ready"&&ye.t_uuid?(C(),L("div",e7,[r("img",{class:"tag-thumb-img",src:As(ye.t_uuid),alt:"preview",loading:"lazy"},null,8,t7),r("button",{class:"tag-thumb-regen-btn",onClick:vt(nt=>_r(ye),["stop"]),title:"重新生成"},[...ae[59]||(ae[59]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])],8,n7)])):ye.image_status==="pending"||ye.image_status==="generating"?(C(),L("div",o7,[ae[60]||(ae[60]=r("div",{class:"tag-thumb-spinner"},null,-1)),r("span",null,y(ye.image_status==="pending"?"排队中…":"生成中…"),1)])):ye.image_status==="failed"?(C(),L("div",{key:2,class:"tag-thumb-placeholder tag-thumb-failed",onClick:vt(nt=>Ro(ye),["stop"]),title:"生成失败,点击重试"},[...ae[61]||(ae[61]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"#ff6b6b"},[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})],-1),r("span",null,"重试",-1)])],8,a7)):(C(),L("div",{key:3,class:"tag-thumb-placeholder tag-thumb-empty",onClick:vt(nt=>Ro(ye),["stop"]),title:"生成预览图"},[...ae[62]||(ae[62]=[r("svg",{viewBox:"0 0 24 24",width:"28",height:"28",fill:"currentColor",opacity:"0.5"},[r("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"})],-1),r("span",null,"生成",-1)])],8,s7))],40,Zx),[[Hs,!pe.value]]),ve.value===ye.id_index&&Z.value[ye.t_uuid]?(C(),L("div",{key:0,class:"tag-thumb-overlay",style:Ft(bo.value)},[r("img",{src:Z.value[ye.t_uuid],class:"tag-thumb-full"},null,8,r7)],4)):Ae("",!0),r("div",{class:"tag-content",onClick:nt=>Fe(ye)},[r("div",{class:"tag-main",style:Ft({backgroundColor:ye.color||"transparent"})},[ct(y(ye.desc)+" ",1),r("div",l7,[r("button",{class:"action-btn move",onClick:vt(nt=>ur(ye),["stop"]),title:h(t)("tagManager.moveTag")},[...ae[63]||(ae[63]=[r("svg",{viewBox:"0 0 24 24",class:"move-icon"},[r("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)])],8,u7),r("button",{class:"action-btn edit",onClick:vt(nt=>et(ye),["stop"]),title:h(t)("tagManager.editTag")},[...ae[64]||(ae[64]=[r("svg",{viewBox:"0 0 24 24",class:"edit-icon"},[r("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"})],-1)])],8,c7),r("button",{class:"action-btn delete",onClick:vt(nt=>lr(ye),["stop"]),title:h(t)("tagManager.deleteTag")},[...ae[65]||(ae[65]=[r("svg",{viewBox:"0 0 24 24",class:"delete-icon"},[r("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"})],-1)])],8,d7)])],4),r("div",p7,y(ye.text),1)],8,i7),b.value?xe((C(),L("input",{key:1,type:"checkbox","onUpdate:modelValue":ae[8]||(ae[8]=nt=>w.value=nt),value:ye,class:"tag-checkbox"},null,8,f7)),[[on,w.value]]):Ae("",!0)],2))),128))])):Ae("",!0)]),l.value?(C(),L("div",g7,[r("div",{class:"weilin-tools-dialog-content",onMousedown:ae[13]||(ae[13]=vt(()=>{},["stop"]))},[r("div",m7,[r("h2",null,y(ge()),1),r("button",{class:"close-btn",onClick:Ee},"×")]),r("div",v7,[m.value=="primary"?(C(),L("div",h7,[r("label",null,y(h(t)("tagManager.categoryName")),1),xe(r("input",{type:"text","onUpdate:modelValue":ae[9]||(ae[9]=ye=>q.value.name=ye),placeholder:h(t)("tagManager.categoryNamePlaceholder"),onKeyup:Nn(De,["enter"])},null,40,_7),[[ze,q.value.name]])])):Ae("",!0),m.value=="group"?(C(),L("div",y7,[r("label",null,y(h(t)("tagManager.groupName")),1),xe(r("input",{type:"text","onUpdate:modelValue":ae[10]||(ae[10]=ye=>Y.value.name=ye),placeholder:h(t)("tagManager.groupNamePlaceholder"),onKeyup:Nn(De,["enter"])},null,40,b7),[[ze,Y.value.name]])])):Ae("",!0),r("div",w7,[r("label",null,y(h(t)("tagManager.backgroundColor")),1),r("div",x7,[r("div",{class:"color-preview",style:Ft({backgroundColor:rn.value})},null,4),r("div",S7,[xe(r("input",{type:"color","onUpdate:modelValue":ae[11]||(ae[11]=ye=>at.value.hex=ye),onInput:Rt,class:"color-input"},null,544),[[ze,at.value.hex]]),r("div",T7,[xe(r("input",{type:"range","onUpdate:modelValue":ae[12]||(ae[12]=ye=>at.value.alpha=ye),min:"0",max:"100",onInput:Rt,class:"alpha-slider"},null,544),[[ze,at.value.alpha,void 0,{number:!0}]]),r("span",k7,y(at.value.alpha)+"%",1)])])])])]),r("div",C7,[r("button",{class:"cancel-btn",onClick:Ee},y(h(t)("common.cancel")),1),r("button",{class:"confirm-btn",onClick:De},y(h(t)("common.confirm")),1)])],32)])):Ae("",!0),d.value?(C(),L("div",E7,[r("div",{class:"weilin-tools-dialog-content",onMousedown:ae[18]||(ae[18]=vt(()=>{},["stop"]))},[r("div",$7,[r("h2",null,y(f.value?h(t)("tagManager.editTag"):h(t)("tagManager.addTag")),1),r("button",{class:"close-btn",onClick:ft},"×")]),r("div",A7,[r("div",L7,[r("label",null,y(h(t)("tagManager.text")),1),xe(r("input",{type:"text","onUpdate:modelValue":ae[14]||(ae[14]=ye=>$.value.desc=ye),placeholder:h(t)("tagManager.textPlaceholder")},null,8,I7),[[ze,$.value.desc]])]),r("div",M7,[r("label",null,y(h(t)("tagManager.description")),1),xe(r("textarea",{"onUpdate:modelValue":ae[15]||(ae[15]=ye=>$.value.text=ye),placeholder:h(t)("tagManager.descriptionPlaceholder"),rows:"4"}," ",8,O7),[[ze,$.value.text]])]),r("div",D7,[r("label",null,y(h(t)("tagManager.backgroundColor")),1),r("div",P7,[r("div",{class:"color-preview",style:Ft({backgroundColor:rn.value})},null,4),r("div",R7,[xe(r("input",{type:"color","onUpdate:modelValue":ae[16]||(ae[16]=ye=>at.value.hex=ye),onInput:Rt,class:"color-input"},null,544),[[ze,at.value.hex]]),r("div",N7,[xe(r("input",{type:"range","onUpdate:modelValue":ae[17]||(ae[17]=ye=>at.value.alpha=ye),min:"0",max:"100",onInput:Rt,class:"alpha-slider"},null,544),[[ze,at.value.alpha,void 0,{number:!0}]]),r("span",F7,y(at.value.alpha)+"%",1)])])])])]),r("div",B7,[r("button",{class:"cancel-btn",onClick:ft},y(h(t)("common.cancel")),1),r("button",{class:"confirm-btn",onClick:ut},y(h(t)("common.confirm")),1)])],32)])):Ae("",!0),Ue.value?(C(),L("div",U7,[r("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:ae[19]||(ae[19]=vt(()=>{},["stop"]))},[r("div",z7,[r("h2",null,y(h(t)("common.confirmDelete")),1),r("button",{class:"close-btn",onClick:Po},"×")]),r("div",V7,[r("p",W7,y(Qa.value),1)]),r("div",H7,[r("button",{class:"cancel-btn",onClick:Po},y(h(t)("common.cancel")),1),r("button",{class:"delete-btn",onClick:mi},y(h(t)("common.delete")),1)])],32)])):Ae("",!0),fe.value?(C(),L("div",j7,[r("div",G7,[r("div",q7,[r("h2",null,y(h(t)("tagManager.moveTag")),1),r("button",{class:"close-btn",onClick:ae[20]||(ae[20]=ye=>fe.value=!1)},"×")]),r("div",Y7,[r("div",K7,[r("label",null,y(h(t)("tagManager.targetTag")),1),xe(r("select",{"onUpdate:modelValue":ae[21]||(ae[21]=ye=>O.value=ye),class:"form-select"},[(C(!0),L(qe,null,ot(s.value,ye=>(C(),L("option",{key:ye.id_index,value:ye.id_index},y(ye.desc+" --> "+ye.text),9,J7))),128))],512),[[an,O.value]])]),r("div",X7,[r("label",null,y(h(t)("tagManager.movePosition")),1),r("div",Q7,[r("label",null,[xe(r("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ae[22]||(ae[22]=ye=>se.value=ye),value:"before"},null,512),[[xa,se.value]]),ct(" "+y(h(t)("tagManager.moveBefore")),1)]),r("label",null,[xe(r("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ae[23]||(ae[23]=ye=>se.value=ye),value:"after"},null,512),[[xa,se.value]]),ct(" "+y(h(t)("tagManager.moveAfter")),1)])])])]),r("div",Z7,[r("button",{class:"cancel-btn",onClick:ae[24]||(ae[24]=ye=>fe.value=!1)},y(h(t)("common.cancel")),1),r("button",{class:"confirm-btn",onClick:cr},y(h(t)("common.confirm")),1)])])])):Ae("",!0),T.value?(C(),L("div",e9,[r("div",t9,[r("div",n9,[r("h2",null,y(h(t)("tagManager.moveGroup")),1),r("button",{class:"close-btn",onClick:ae[25]||(ae[25]=ye=>T.value=!1)},"×")]),r("div",o9,[r("div",a9,[r("label",null,y(h(t)("tagManager.targetGroup")),1),xe(r("select",{"onUpdate:modelValue":ae[26]||(ae[26]=ye=>ue.value=ye),class:"form-select"},[(C(!0),L(qe,null,ot(Do.value,(ye,nt)=>(C(),L("option",{key:"group_move_id"+nt,value:ye.id_index},y(ye.name),9,s9))),128))],512),[[an,ue.value]])]),r("div",r9,[r("label",null,y(h(t)("tagManager.movePosition")),1),r("div",i9,[r("label",null,[xe(r("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ae[27]||(ae[27]=ye=>Pe.value=ye),value:"before"},null,512),[[xa,Pe.value]]),ct(" "+y(h(t)("tagManager.moveGroupBefore")),1)]),r("label",null,[xe(r("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ae[28]||(ae[28]=ye=>Pe.value=ye),value:"after"},null,512),[[xa,Pe.value]]),ct(" "+y(h(t)("tagManager.moveGroupAfter")),1)])])])]),r("div",l9,[r("button",{class:"cancel-btn",onClick:ae[29]||(ae[29]=ye=>T.value=!1)},y(h(t)("common.cancel")),1),r("button",{class:"confirm-btn",onClick:yo},y(h(t)("common.confirm")),1)])])])):Ae("",!0),re.value?(C(),L("div",u9,[r("div",{class:"weilin-tools-dialog-content tab-size-weilin-tools-dialog",onMousedown:ae[40]||(ae[40]=vt(()=>{},["stop"]))},[r("div",c9,[r("h2",null,y(h(t)("tagManager.tabSizeConfig")),1),r("button",{class:"close-btn",onClick:as},"×")]),r("div",d9,[r("div",p9,[r("h3",null,y(h(t)("tagManager.primaryTabConfig")),1),r("div",f9,[r("label",null,y(h(t)("tagManager.tabWidth")),1),r("div",g9,[r("label",m9,[xe(r("input",{type:"radio","onUpdate:modelValue":ae[30]||(ae[30]=ye=>j.value.primaryTab.width=ye),value:"fit-content"},null,512),[[xa,j.value.primaryTab.width]]),ct(" "+y(h(t)("tagManager.fitContent")),1)]),r("label",v9,[xe(r("input",{type:"radio","onUpdate:modelValue":ae[31]||(ae[31]=ye=>j.value.primaryTab.width=ye),value:"custom"},null,512),[[xa,j.value.primaryTab.width]]),ct(" "+y(h(t)("tagManager.customWidth")),1)]),j.value.primaryTab.width!=="fit-content"?xe((C(),L("input",{key:0,type:"number","onUpdate:modelValue":ae[32]||(ae[32]=ye=>j.value.primaryTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[ze,j.value.primaryTab.width,void 0,{number:!0}]]):Ae("",!0)])]),r("div",h9,[r("label",null,y(h(t)("tagManager.tabHeight"))+" ("+y(j.value.primaryTab.height)+"px)",1),xe(r("input",{type:"range","onUpdate:modelValue":ae[33]||(ae[33]=ye=>j.value.primaryTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[ze,j.value.primaryTab.height,void 0,{number:!0}]])]),r("div",_9,[r("label",null,y(h(t)("tagManager.fontSize"))+" ("+y(j.value.primaryTab.fontSize)+"px)",1),xe(r("input",{type:"range","onUpdate:modelValue":ae[34]||(ae[34]=ye=>j.value.primaryTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[ze,j.value.primaryTab.fontSize,void 0,{number:!0}]])])]),r("div",y9,[r("h3",null,y(h(t)("tagManager.groupTabConfig")),1),r("div",b9,[r("label",null,y(h(t)("tagManager.tabWidth")),1),r("div",w9,[r("label",x9,[xe(r("input",{type:"radio","onUpdate:modelValue":ae[35]||(ae[35]=ye=>j.value.groupTab.width=ye),value:"fit-content"},null,512),[[xa,j.value.groupTab.width]]),ct(" "+y(h(t)("tagManager.fitContent")),1)]),r("label",S9,[xe(r("input",{type:"radio","onUpdate:modelValue":ae[36]||(ae[36]=ye=>j.value.groupTab.width=ye),value:"custom"},null,512),[[xa,j.value.groupTab.width]]),ct(" "+y(h(t)("tagManager.customWidth")),1)]),j.value.groupTab.width!=="fit-content"?xe((C(),L("input",{key:0,type:"number","onUpdate:modelValue":ae[37]||(ae[37]=ye=>j.value.groupTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[ze,j.value.groupTab.width,void 0,{number:!0}]]):Ae("",!0)])]),r("div",T9,[r("label",null,y(h(t)("tagManager.tabHeight"))+" ("+y(j.value.groupTab.height)+"px)",1),xe(r("input",{type:"range","onUpdate:modelValue":ae[38]||(ae[38]=ye=>j.value.groupTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[ze,j.value.groupTab.height,void 0,{number:!0}]])]),r("div",k9,[r("label",null,y(h(t)("tagManager.fontSize"))+" ("+y(j.value.groupTab.fontSize)+"px)",1),xe(r("input",{type:"range","onUpdate:modelValue":ae[39]||(ae[39]=ye=>j.value.groupTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[ze,j.value.groupTab.fontSize,void 0,{number:!0}]])])])]),r("div",C9,[r("button",{class:"reset-btn",onClick:ss},y(h(t)("tagManager.resetDefault")),1),r("button",{class:"cancel-btn",onClick:as},y(h(t)("common.cancel")),1),r("button",{class:"confirm-btn",onClick:hr},y(h(t)("common.confirm")),1)])],32)])):Ae("",!0),st(_8,{ref_key:"importTagDialogItem",ref:sa},null,512),st(N8,{visible:J.value,tag:ie.value||be.value,options:X.value,mode:be.value?"regenerate":"generate",onClose:Ma,onGenerated:Zn},null,8,["visible","tag","options","mode"]),st(ax,{visible:te.value,tags:s.value,options:X.value,onClose:ae[41]||(ae[41]=ye=>te.value=!1),onGenerated:No},null,8,["visible","tags","options"])]))}},[["__scopeId","data-v-9378c73b"]]),Dl=100,Av=S(""),La=S({}),rt={setActiveWindow(e){Av.value!==e&&(Av.value=e,Object.keys(La.value).forEach(t=>{La.value[t]=Dl}),La.value[e]=Dl+10)},getZIndex(e){return La.value[e]||(La.value[e]=Dl),La.value[e]},registerWindow(e){La.value[e]||(La.value[e]=Dl)},unregisterWindow(e){delete La.value[e]}},_o={getLoraList:e=>Ye({url:"/get_lora_list",method:"get",params:e}),getAllLoraList:e=>Ye({url:"/get_lora_load_all",method:"get",params:e}),getAllLoraStatus:e=>Ye({url:"/get_lora_load_status",method:"get",params:e}),getLoraDetail:e=>Ye({url:"/lorainfo/api/loras/info",method:"get",params:e}),getLoraRefresh:e=>Ye({url:"/lorainfo/api/loras/info/refresh",method:"get",params:e}),postUplaodImg:(e,t,n)=>{const o=new FormData;return o.append("image",e),o.append("path",t),o.append("fileName",n),Ye({url:"/lorainfo/api/loras/set/img",method:"post",data:o,headers:{"Content-Type":"multipart/form-data"}})},postLoraSave:(e,t)=>{const n=new FormData;return n.append("json",JSON.stringify(t)),Ye({url:`/lorainfo/api/loras/info?file=${e}`,method:"post",data:n,headers:{"Content-Type":"multipart/form-data"}})},postLoraDelet:(e,t)=>Ye({url:`/lorainfo/api/delete/loras/info/filed?file=${e}`,method:"post",data:{json:t}}),getLoraFolderList:()=>Ye({url:"/get_lora_folder_list",method:"post"}),getLoraRangeList:e=>Ye({url:"/get_lora_list_by_range",method:"post",data:{range:e}}),searchLoraGetFolderList:e=>Ye({url:"/get_lora_list_by_search",method:"post",data:{search:e}})},E9=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/,Lv=no({name:"JsonString",props:{jsonValue:{type:String,required:!0}},setup(e){const t=S(!0),n=S(!1),o=S(null),a=S(null);Dt(()=>{o.value&&a.value&&o.value.offsetHeight>a.value.offsetHeight&&(n.value=!0)});const s=()=>{t.value=!t.value};return()=>{const i=e.jsonValue,l=E9.test(i);let d;!t.value&&n.value?d=nn("span",{class:{"jv-ellipsis":!0},onClick:s},"..."):l?d=nn("span",{class:{"jv-item":!0,"jv-string":!0},ref:o},[nn("span",null,'"'),nn("a",{href:i,target:"_blank",class:"jv-link"},i),nn("span",null,'"')]):d=nn("span",{class:{"jv-item":!0,"jv-string":!0},ref:o},`"${i}"`);const g=[];return n.value&&g.push(nn("span",{class:{"jv-toggle":!0,open:t.value},onClick:s})),g.push(nn("span",{class:{"jv-holder-node":!0},ref:a})),g.push(d),nn("span",{},g)}}}),$9={class:Ve(["jv-item","jv-undefined"])},A9=no({__name:"json-undefined",props:{jsonValue:{type:null,default:void 0}},setup(e){const t=e,n=$t(()=>t.jsonValue===null?"null":"undefined");return(o,a)=>(C(),L("span",$9,y(n.value),1))}}),L9=no({__name:"json-number",props:{jsonValue:{type:Number,required:!0}},setup(e){const t=e,n=$t(()=>Number.isInteger(t.jsonValue));return(o,a)=>(C(),L("span",{class:Ve(["jv-item","jv-number",n.value?"jv-number-integer":"jv-number-float"])},y(e.jsonValue.toString()),3))}}),I9={class:Ve(["jv-item","jv-boolean"])},M9=no({__name:"json-boolean",props:{jsonValue:{type:Boolean,required:!0}},setup(e){return(t,n)=>(C(),L("span",I9,y(e.jsonValue.toString()),1))}}),O9=no({name:"JsonObject",props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean,previewMode:Boolean},emits:["update:expand"],setup(e,{emit:t}){const n=S({});let o=null;const a=d=>{setTimeout(()=>{n.value=d},0)};St(()=>e.jsonValue,d=>{a(d)},{immediate:!0,deep:!0});const s=$t(()=>{if(!e.sort)return n.value;const d=Object.keys(n.value).sort(),g={};return d.forEach(f=>{g[f]=n.value[f]}),g}),i=()=>{if(o)try{o.dispatchEvent(new Event("resized"))}catch{const d=document.createEvent("Event");d.initEvent("resized",!0,!1),o.dispatchEvent(d)}},l=()=>{t("update:expand",!e.expand),i()};return()=>{const d=[];if(d.push(nn("span",{class:["jv-item","jv-object"]},"{")),e.expand){for(const g in s.value)if(s.value.hasOwnProperty(g)){const f=s.value[g];d.push(nn(zc,{key:g,sort:e.sort,keyName:g,depth:e.depth+1,value:f,previewMode:e.previewMode}))}}return!e.expand&&Object.keys(n.value).length>0&&d.push(nn("span",{class:"jv-ellipsis",onClick:l,title:`click to reveal object content (keys: ${Object.keys(s.value).join(", ")})`},"...")),d.push(nn("span",{class:["jv-item","jv-object"]},"}")),nn("span",{ref:g=>{o=g}},d)}}}),D9=no({name:"JsonArray",props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,previewMode:Boolean},emits:["update:expand"],setup(e,{emit:t}){const n=S([]);let o=null;const a=(i,l=0)=>{l===0&&(n.value=[]),setTimeout(()=>{i&&i.length>l&&(n.value.push(i[l]),a(i,l+1))},0)};St(()=>e.jsonValue,i=>{a(i)},{immediate:!0,deep:!0});const s=()=>{if(t("update:expand",!e.expand),o)try{o.dispatchEvent(new Event("resized"))}catch{const i=document.createEvent("Event");i.initEvent("resized",!0,!1),o.dispatchEvent(i)}};return()=>{const i=[];return!e.previewMode&&!e.keyName&&i.push(nn("span",{class:{"jv-toggle":!0,open:!!e.expand},onClick:s})),i.push(nn("span",{class:["jv-item","jv-array"]},"[")),e.expand&&n.value.forEach((l,d)=>{i.push(nn(zc,{key:d,sort:e.sort,depth:e.depth+1,value:l,previewMode:e.previewMode}))}),!e.expand&&n.value.length>0&&i.push(nn("span",{class:"jv-ellipsis",onClick:s,title:`click to reveal ${n.value.length} hidden items`},"...")),i.push(nn("span",{class:["jv-item","jv-array"]},"]")),nn("span",{ref:l=>{o=l}},i)}}}),P9=["title"],R9=no({__name:"json-function",props:{jsonValue:{type:Function,required:!0}},setup(e){return(t,n)=>(C(),L("span",{class:Ve(["jv-item","jv-function"]),title:e.jsonValue.toString()}," <function> ",8,P9))}}),N9={class:Ve(["jv-item","jv-string"])},F9=no({__name:"json-date",props:{jsonValue:{type:Date,required:!0}},setup(e){const t=e,n=va("timeformat",a=>a.toLocaleString()),o=$t(()=>n(t.jsonValue));return(a,s)=>(C(),L("span",N9,' "'+y(o.value)+'" ',1))}}),B9={class:Ve(["jv-item","jv-regexp"])},U9=no({__name:"json-regexp",props:{jsonValue:{type:RegExp,required:!0}},setup(e){return(t,n)=>(C(),L("span",B9,y(e.jsonValue.toString()),1))}}),zc=no({name:"JsonBox",props:{value:{type:[Object,Array,String,Number,Boolean,Function,Date],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0},previewMode:Boolean},setup(e){const t=va("expandDepth",1/0),n=va("keyClick",()=>{}),o=S(!0);let a=null;Dt(()=>{o.value=e.previewMode||e.depth<t});const s=()=>{if(o.value=!o.value,a)try{a.dispatchEvent(new Event("resized"))}catch{const i=document.createEvent("Event");i.initEvent("resized",!0,!1),a.dispatchEvent(i)}};return()=>{const i=[];let l;e.value===null||e.value===void 0?l=A9:Array.isArray(e.value)?l=D9:e.value instanceof Date?l=F9:e.value instanceof RegExp?l=U9:typeof e.value=="object"?l=O9:typeof e.value=="number"?l=L9:typeof e.value=="string"?l=Lv:typeof e.value=="boolean"?l=M9:typeof e.value=="function"?l=R9:l=Lv;const d=e.value&&(Array.isArray(e.value)||typeof e.value=="object"&&!(e.value instanceof Date)&&!(e.value instanceof RegExp));return!e.previewMode&&d&&!(e.value instanceof RegExp)&&i.push(nn("span",{class:{"jv-toggle":!0,open:!!o.value},onClick:s})),e.keyName&&i.push(nn("span",{class:"jv-key",onClick:()=>{n&&n(e.keyName)}},`${e.keyName}:`)),i.push(nn(l,{class:"jv-push",jsonValue:e.value,keyName:e.keyName,sort:e.sort,depth:e.depth,expand:o.value,previewMode:e.previewMode,"onUpdate:expand":g=>{o.value=g}})),nn("div",{class:{"jv-node":!0,"jv-key-node":!!e.keyName&&!d,toggle:!e.previewMode&&d},ref:g=>{a=g}},i)}}});function z9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vc={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var V9=Vc.exports,Iv;function W9(){return Iv||(Iv=1,(function(e,t){(function(n,o){e.exports=o()})(V9,function(){return(function(){var n={686:(function(s,i,l){l.d(i,{default:function(){return Z}});var d=l(279),g=l.n(d),f=l(370),m=l.n(f),w=l(817),b=l.n(w);function T(te){try{return document.execCommand(te)}catch{return!1}}var E=function(te){var be=b()(te);return T("cut"),be},I=E;function P(te){var be=document.documentElement.getAttribute("dir")==="rtl",Te=document.createElement("textarea");Te.style.fontSize="12pt",Te.style.border="0",Te.style.padding="0",Te.style.margin="0",Te.style.position="absolute",Te.style[be?"right":"left"]="-9999px";var he=window.pageYOffset||document.documentElement.scrollTop;return Te.style.top="".concat(he,"px"),Te.setAttribute("readonly",""),Te.value=te,Te}var N=function(te,be){var Te=P(te);be.container.appendChild(Te);var he=b()(Te);return T("copy"),Te.remove(),he},pe=function(te){var be=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Te="";return typeof te=="string"?Te=N(te,be):te instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(te==null?void 0:te.type)?Te=N(te.value,be):(Te=b()(te),T("copy")),Te},D=pe;function V(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(be){return typeof be}:V=function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},V(te)}var fe=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},be=te.action,Te=be===void 0?"copy":be,he=te.container,re=te.target,j=te.text;if(Te!=="copy"&&Te!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(re!==void 0)if(re&&V(re)==="object"&&re.nodeType===1){if(Te==="copy"&&re.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Te==="cut"&&(re.hasAttribute("readonly")||re.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(j)return D(j,{container:he});if(re)return Te==="cut"?I(re):D(re,{container:he})},O=fe;function se(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?se=function(be){return typeof be}:se=function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},se(te)}function le(te,be){if(!(te instanceof be))throw new TypeError("Cannot call a class as a function")}function Pe(te,be){for(var Te=0;Te<be.length;Te++){var he=be[Te];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(te,he.key,he)}}function Ie(te,be,Te){return be&&Pe(te.prototype,be),Te&&Pe(te,Te),te}function ue(te,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");te.prototype=Object.create(be&&be.prototype,{constructor:{value:te,writable:!0,configurable:!0}}),be&&we(te,be)}function we(te,be){return we=Object.setPrototypeOf||function(Te,he){return Te.__proto__=he,Te},we(te,be)}function ne(te){var be=X();return function(){var Te=ee(te),he;if(be){var re=ee(this).constructor;he=Reflect.construct(Te,arguments,re)}else he=Te.apply(this,arguments);return J(this,he)}}function J(te,be){return be&&(se(be)==="object"||typeof be=="function")?be:ie(te)}function ie(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te}function X(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ee(te){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(be){return be.__proto__||Object.getPrototypeOf(be)},ee(te)}function $e(te,be){var Te="data-clipboard-".concat(te);if(be.hasAttribute(Te))return be.getAttribute(Te)}var ve=(function(te){ue(Te,te);var be=ne(Te);function Te(he,re){var j;return le(this,Te),j=be.call(this),j.resolveOptions(re),j.listenClick(he),j}return Ie(Te,[{key:"resolveOptions",value:function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof he.action=="function"?he.action:this.defaultAction,this.target=typeof he.target=="function"?he.target:this.defaultTarget,this.text=typeof he.text=="function"?he.text:this.defaultText,this.container=se(he.container)==="object"?he.container:document.body}},{key:"listenClick",value:function(he){var re=this;this.listener=m()(he,"click",function(j){return re.onClick(j)})}},{key:"onClick",value:function(he){var re=he.delegateTarget||he.currentTarget,j=this.action(re)||"copy",oe=O({action:j,container:this.container,target:this.target(re),text:this.text(re)});this.emit(oe?"success":"error",{action:j,text:oe,trigger:re,clearSelection:function(){re&&re.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(he){return $e("action",he)}},{key:"defaultTarget",value:function(he){var re=$e("target",he);if(re)return document.querySelector(re)}},{key:"defaultText",value:function(he){return $e("text",he)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(he){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return D(he,re)}},{key:"cut",value:function(he){return I(he)}},{key:"isSupported",value:function(){var he=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],re=typeof he=="string"?[he]:he,j=!!document.queryCommandSupported;return re.forEach(function(oe){j=j&&!!document.queryCommandSupported(oe)}),j}}]),Te})(g()),Z=ve}),828:(function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function d(g,f){for(;g&&g.nodeType!==i;){if(typeof g.matches=="function"&&g.matches(f))return g;g=g.parentNode}}s.exports=d}),438:(function(s,i,l){var d=l(828);function g(w,b,T,E,I){var P=m.apply(this,arguments);return w.addEventListener(T,P,I),{destroy:function(){w.removeEventListener(T,P,I)}}}function f(w,b,T,E,I){return typeof w.addEventListener=="function"?g.apply(null,arguments):typeof T=="function"?g.bind(null,document).apply(null,arguments):(typeof w=="string"&&(w=document.querySelectorAll(w)),Array.prototype.map.call(w,function(P){return g(P,b,T,E,I)}))}function m(w,b,T,E){return function(I){I.delegateTarget=d(I.target,b),I.delegateTarget&&E.call(w,I)}}s.exports=f}),879:(function(s,i){i.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},i.nodeList=function(l){var d=Object.prototype.toString.call(l);return l!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in l&&(l.length===0||i.node(l[0]))},i.string=function(l){return typeof l=="string"||l instanceof String},i.fn=function(l){var d=Object.prototype.toString.call(l);return d==="[object Function]"}}),370:(function(s,i,l){var d=l(879),g=l(438);function f(T,E,I){if(!T&&!E&&!I)throw new Error("Missing required arguments");if(!d.string(E))throw new TypeError("Second argument must be a String");if(!d.fn(I))throw new TypeError("Third argument must be a Function");if(d.node(T))return m(T,E,I);if(d.nodeList(T))return w(T,E,I);if(d.string(T))return b(T,E,I);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function m(T,E,I){return T.addEventListener(E,I),{destroy:function(){T.removeEventListener(E,I)}}}function w(T,E,I){return Array.prototype.forEach.call(T,function(P){P.addEventListener(E,I)}),{destroy:function(){Array.prototype.forEach.call(T,function(P){P.removeEventListener(E,I)})}}}function b(T,E,I){return g(document.body,T,E,I)}s.exports=f}),817:(function(s){function i(l){var d;if(l.nodeName==="SELECT")l.focus(),d=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var g=l.hasAttribute("readonly");g||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),g||l.removeAttribute("readonly"),d=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var f=window.getSelection(),m=document.createRange();m.selectNodeContents(l),f.removeAllRanges(),f.addRange(m),d=f.toString()}return d}s.exports=i}),279:(function(s){function i(){}i.prototype={on:function(l,d,g){var f=this.e||(this.e={});return(f[l]||(f[l]=[])).push({fn:d,ctx:g}),this},once:function(l,d,g){var f=this;function m(){f.off(l,m),d.apply(g,arguments)}return m._=d,this.on(l,m,g)},emit:function(l){var d=[].slice.call(arguments,1),g=((this.e||(this.e={}))[l]||[]).slice(),f=0,m=g.length;for(f;f<m;f++)g[f].fn.apply(g[f].ctx,d);return this},off:function(l,d){var g=this.e||(this.e={}),f=g[l],m=[];if(f&&d)for(var w=0,b=f.length;w<b;w++)f[w].fn!==d&&f[w].fn._!==d&&m.push(f[w]);return m.length?g[l]=m:delete g[l],this}},s.exports=i,s.exports.TinyEmitter=i})},o={};function a(s){if(o[s])return o[s].exports;var i=o[s]={exports:{}};return n[s](i,i.exports,a),i.exports}return(function(){a.n=function(s){var i=s&&s.__esModule?(function(){return s.default}):(function(){return s});return a.d(i,{a:i}),i}})(),(function(){a.d=function(s,i){for(var l in i)a.o(i,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:i[l]})}})(),(function(){a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)}})(),a(686)})().default})})(Vc)),Vc.exports}var H9=W9();const j9=z9(H9),G9=function(e,t){let n=Date.now(),o;return(...a)=>{Date.now()-n<t&&o&&clearTimeout(o),o=setTimeout(()=>{e(...a)},t),n=Date.now()}},q9=no({name:"JsonViewer",components:{JsonBox:zc},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"light"},timeformat:{type:Function,default:e=>e.toLocaleString()},previewMode:{type:Boolean,default:!1},parse:{type:Boolean,default:!1}},emits:["onKeyClick","copied"],setup(e,{emit:t}){const n=S(!1),o=S(!1),a=S(e.expanded),s=S(null),i=S(null);ji("expandDepth",e.expandDepth),ji("timeformat",e.timeformat),ji("keyClick",T=>{t("onKeyClick",T)});const l=$t(()=>"jv-container jv-"+e.theme+(e.boxed?" boxed":"")),d=$t(()=>{if(typeof e.copyable=="boolean"&&!e.copyable)return{copyText:"copy",copiedText:"copied!",timeout:2e3,align:"right"};const T=e.copyable;return{copyText:T.copyText||"copy",copiedText:T.copiedText||"copied!",timeout:T.timeout||2e3,align:T.align||"right"}}),g=$t(()=>{if(!e.parse||typeof e.value!="string")return e.value;try{return JSON.parse(e.value)}catch{return e.value}}),f=()=>{m()},m=G9(()=>{yt(()=>{i.value&&(i.value.$el.clientHeight>=250?o.value=!0:o.value=!1)})},200),w=T=>{n.value||(n.value=!0,setTimeout(()=>{n.value=!1},d.value.timeout),t("copied",T))},b=()=>{a.value=!a.value};return St(()=>e.value,()=>{f()}),Dt(()=>{e.boxed&&i.value&&(f(),i.value.$el.addEventListener("resized",f,!0)),e.copyable&&s.value&&new j9(s.value,{text:()=>JSON.stringify(g.value,null,2)}).on("success",w)}),{clip:s,jsonBox:i,copied:n,expandableCode:o,expandCode:a,jvClass:l,copyText:d,parseValue:g,toggleExpandCode:b}}}),Y9=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n};function K9(e,t,n,o,a,s){const i=l1("json-box");return C(),L("div",{class:Ve(e.jvClass)},[e.copyable?(C(),L("div",{key:0,class:Ve(`jv-tooltip ${e.copyText.align||"right"}`)},[r("span",{ref:"clip",class:Ve(["jv-button",{copied:e.copied}])},[Pr(e.$slots,"copy",{copied:e.copied},()=>[ct(y(e.copied?e.copyText.copiedText:e.copyText.copyText),1)])],2)],2)):Ae("",!0),r("div",{class:Ve(["jv-code",{open:e.expandCode,boxed:e.boxed}])},[st(i,{ref:"jsonBox",value:e.parseValue,sort:e.sort,"preview-mode":e.previewMode},null,8,["value","sort","preview-mode"])],2),e.expandableCode&&e.boxed?(C(),L("div",{key:1,class:"jv-more",onClick:t[0]||(t[0]=(...l)=>e.toggleExpandCode&&e.toggleExpandCode(...l))},[r("span",{class:Ve(["jv-toggle",{open:!!e.expandCode}])},null,2)])):Ae("",!0)],2)}const J9=Y9(q9,[["render",K9]]),X9={class:"lora-raw__content"},Mv="weilin_tools_",Q9=Vt({__name:"lora_raw",emits:["close","update"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S({}),s=S(!1),i={loraRaw:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},d=S((()=>{try{const b=localStorage.getItem(`${Mv}loraRawState`);if(b){const T=JSON.parse(b),E={...i};return T.loraRaw&&(E.loraRaw={...i.loraRaw,...T.loraRaw}),E}}catch(b){console.error("Error loading window states:",b)}return{...i}})());St(d,b=>{try{localStorage.setItem(`${Mv}loraRawState`,JSON.stringify(b))}catch(T){console.error("Error saving window states:",T)}},{deep:!0}),Dt(()=>{rt.registerWindow("loraRaw")}),go(()=>{rt.unregisterWindow("loraRaw")});const g=()=>{s.value=!1},f=(b,T)=>{d.value[b]&&(d.value[b].position={...T})},m=(b,T)=>{d.value[b]&&(d.value[b].size={...T})};return t({open:b=>{s.value=!0,rt.setActiveWindow("loraRaw"),a.value=b}}),(b,T)=>s.value?(C(),Zt(ho,{key:0,title:h(o)("lora.rawTitle"),position:d.value.loraRaw.position,size:d.value.loraRaw.size,"z-index":h(rt).getZIndex("loraRaw"),"onUpdate:position":T[0]||(T[0]=E=>f("loraRaw",E)),"onUpdate:size":T[1]||(T[1]=E=>m("loraRaw",E)),onActive:T[2]||(T[2]=E=>h(rt).setActiveWindow("loraRaw")),onClose:T[3]||(T[3]=E=>g())},{default:Ut(()=>[r("div",X9,[st(h(J9),{value:a.value,copyable:"",sort:"",theme:"dark"},null,8,["value"])])]),_:1},8,["title","position","size","z-index"])):Ae("",!0)}},[["__scopeId","data-v-f2df06a0"]]),Z9={key:0,class:"lora-detail__loading"},eS={class:"lora-detail__body"},tS={class:"lora-detail__tags"},nS=["title"],oS=["title"],aS={class:"lora-detail__table"},sS={class:"label"},rS={colspan:"2"},iS={colspan:"3"},lS={class:"label"},uS={colspan:"2",class:"hash"},cS={class:"label"},dS={colspan:"2"},pS=["href"],fS={key:1,class:"not-found"},gS=["title"],mS={class:"label"},vS=["title"],hS={key:1,class:"text"},_S={class:"actions"},yS={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},bS={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},wS={key:1,d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},xS={class:"label"},SS={colspan:"2"},TS={class:"label"},kS={colspan:"2"},CS={class:"label"},ES=["title"],$S=["onUpdate:modelValue","type","onKeyup"],AS={key:1,class:"text"},LS={class:"actions"},IS=["onClick","title"],MS={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},OS={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},DS={key:1,d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},PS={class:"label"},RS=["onUpdate:modelValue"],NS={key:1},FS=["onUpdate:modelValue","type","onKeyup"],BS={key:1,class:"text"},US={class:"actions"},zS=["onClick","title"],VS={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},WS={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},HS={key:1,d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"},jS=["onClick","title"],GS={class:"field-management"},qS=["title"],YS={key:0},KS={class:"label"},JS=["title"],XS={key:0,class:"word-selection"},QS={colspan:"2"},ZS={class:"word-list"},eT=["onClick"],tT={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},nT={key:1},oT={key:0,class:"lora-detail__images"},aT={class:"image-wrapper"},sT=["onClick"],rT=["src"],iT={class:"image-info"},lT={key:0,class:"info-item"},uT=["href"],cT={key:1,class:"info-item"},dT={key:2,class:"info-item"},pT={key:3,class:"info-item"},fT={key:4,class:"info-item"},gT={key:5,class:"info-item"},mT={key:6,class:"info-item"},vT={key:7,class:"info-item"},Ov="weilin_tools_",Pl=Vt({__name:"lora_detail",emits:["close","update"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(!1),s=S({}),i=S(!1),l=S(),d=S(null),g=S({}),f={loraDetail:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},w=S((()=>{try{const oe=localStorage.getItem(`${Ov}loraDetailState`);if(oe){const B=JSON.parse(oe),q={...f};return B.loraDetail&&(q.loraDetail={...f.loraDetail,...B.loraDetail}),q}}catch(oe){console.error("Error loading window states:",oe)}return{...f}})());St(w,oe=>{try{localStorage.setItem(`${Ov}loraDetailState`,JSON.stringify(oe))}catch(B){console.error("Error saving window states:",B)}},{deep:!0}),Dt(()=>{rt.registerWindow("loraDetail")}),go(()=>{rt.unregisterWindow("loraDetail")});const b=()=>{i.value=!1},T=(oe,B)=>{w.value[oe]&&(w.value[oe].position={...B})},E=(oe,B)=>{w.value[oe]&&(w.value[oe].size={...B})};t({open:oe=>{i.value=!0,rt.setActiveWindow("loraDetail"),a.value=!0,s.value=oe,yt(()=>{Pe()})}});const P=S(""),N=S(),pe=oe=>{N.value.open(oe)},D=S({}),V=S({}),fe=S([]),O=[{key:"strengthMin",label:o("lora.strengthMin"),tip:o("lora.strengthMinTip"),type:"number"},{key:"strengthMax",label:o("lora.strengthMax"),tip:o("lora.strengthMaxTip"),type:"number"},{key:"strWeight",label:o("lora.strWeight"),tip:o("lora.strWeightTip"),type:"number"},{key:"loraWorks",label:o("lora.promptWords"),tip:o("lora.promptWordsTip")}],se=()=>{const oe=`custom_${Date.now()}`;s.value.user_diy_fileds||(s.value.user_diy_fileds={}),g.value[oe]={label:"新字段",type:"text"},s.value.user_diy_fileds[oe]={label:"新字段",value:""},V.value[oe]="",$e(oe)},le=async oe=>{var B,q;delete g.value[oe],delete V.value[oe],(q=(B=s.value)==null?void 0:B.user_diy_fileds)!=null&&q[oe]&&delete s.value.user_diy_fileds[oe],await yt(async()=>{await te(oe)})},Pe=()=>{P.value=s.value.name,s.value={},fe.value=[],V.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},_o.getLoraDetail({file:P.value,refresh:!1,light:!1}).then(oe=>{s.value=oe.data,yt(()=>{let B,q,Y,$,A,W;s.value.name=s.value.name||((q=(B=s.value.raw)===null||B===void 0?void 0:B.metadata)===null||q===void 0?void 0:q.ss_output_name===void 0?q["modelspec.title"]:q.ss_output_name)||"",V.value.nameValue=s.value.name,s.value.strengthMin=(Y=s.value.strengthMin)!==null&&Y!==void 0?Y:"",V.value.minValue=s.value.strengthMin,s.value.strengthMax=($=s.value.strengthMax)!==null&&$!==void 0?$:"",V.value.maxValue=s.value.strengthMax,s.value.userNote=(A=s.value.userNote)!==null&&A!==void 0?A:"",V.value.notesValue=s.value.userNote,s.value.loraWorks=(W=s.value.loraWorks)!==null&&W!==void 0?W:"",V.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(g.value=s.value.user_diy_fileds),a.value=!1})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},Ie=oe=>{let q=new URL(oe).pathname.split("/").pop();return q=q.split("?")[0],decodeURIComponent(q)},ue=async oe=>{try{const B=await fetch(oe),q=Ie(oe),Y=await B.blob();_o.postUplaodImg(Y,s.value.file,q).then(()=>{de({type:"success",str:"message.saveSuccess"})}).catch(()=>{de({type:"warn",str:"message.unknownError"})})}catch{de({type:"warn",str:"message.unknownError"})}},we=$t(()=>{var oe;return(oe=s.value.links)==null?void 0:oe.find(B=>B.includes("civitai.com/models"))}),ne=$t(()=>{var oe,B;return((B=(oe=s.value.raw)==null?void 0:oe.civitai)==null?void 0:B.error)==="Model not found"}),J=$t(()=>s.value.trainedWords||[]),ie=()=>{var B;const oe=((B=l.value)==null?void 0:B.scrollTop)||0;a.value=!0,_o.getLoraRefresh({file:P.value}).then(q=>{s.value=q.data,yt(()=>{let Y,$,A,W,ce,Ce;s.value.name=s.value.name||(($=(Y=s.value.raw)===null||Y===void 0?void 0:Y.metadata)===null||$===void 0?void 0:$.ss_output_name===void 0?$["modelspec.title"]:$.ss_output_name)||"",V.value.nameValue=s.value.name,s.value.strengthMin=(A=s.value.strengthMin)!==null&&A!==void 0?A:"",V.value.minValue=s.value.strengthMin,s.value.strengthMax=(W=s.value.strengthMax)!==null&&W!==void 0?W:"",V.value.maxValue=s.value.strengthMax,s.value.userNote=(ce=s.value.userNote)!==null&&ce!==void 0?ce:"",V.value.notesValue=s.value.userNote,s.value.loraWorks=(Ce=s.value.loraWorks)!==null&&Ce!==void 0?Ce:"",V.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(g.value=s.value.user_diy_fileds),a.value=!1}),yt(()=>{a.value=!1}),l.value&&(l.value.scrollTop=oe),de({type:"success",str:"message.dataLoaded"})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},X=oe=>{D.value[oe]?$e(oe):ee(oe)},ee=oe=>{var B,q;D.value[oe]=!0,oe in g.value?V.value[oe]=((q=(B=s.value.user_diy_fileds)==null?void 0:B[oe])==null?void 0:q.value)||"":V.value[oe]=s.value[oe],yt(()=>{oe==="name"&&d.value&&d.value.focus()})},$e=oe=>{oe in g.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[oe]={label:g.value[oe].label,value:V.value[oe]}):s.value[oe]=V.value[oe],Z(s.value),D.value[oe]=!1},ve=oe=>{D.value[oe]=!1,V.value[oe]=s.value[oe]},Z=oe=>{var q;const B=((q=l.value)==null?void 0:q.scrollTop)||0;a.value=!0,_o.postLoraSave(P.value,oe).then(Y=>{s.value=Y.data,yt(()=>{let $,A,W,ce,Ce,Le;s.value.name=s.value.name||((A=($=s.value.raw)===null||$===void 0?void 0:$.metadata)===null||A===void 0?void 0:A.ss_output_name===void 0?A["modelspec.title"]:A.ss_output_name)||"",V.value.nameValue=s.value.name,s.value.strengthMin=(W=s.value.strengthMin)!==null&&W!==void 0?W:"",V.value.minValue=s.value.strengthMin,s.value.strengthMax=(ce=s.value.strengthMax)!==null&&ce!==void 0?ce:"",V.value.maxValue=s.value.strengthMax,s.value.userNote=(Ce=s.value.userNote)!==null&&Ce!==void 0?Ce:"",V.value.notesValue=s.value.userNote,s.value.loraWorks=(Le=s.value.loraWorks)!==null&&Le!==void 0?Le:"",V.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(g.value=s.value.user_diy_fileds),a.value=!1,yt(()=>{l.value&&(l.value.scrollTop=B)})}),de({type:"success",str:"message.saveSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},te=async oe=>{var q;const B=((q=l.value)==null?void 0:q.scrollTop)||0;a.value=!0,await _o.postLoraDelet(P.value,oe).then(Y=>{s.value=Y.data,yt(()=>{let $,A,W,ce,Ce,Le;s.value.name=s.value.name||((A=($=s.value.raw)===null||$===void 0?void 0:$.metadata)===null||A===void 0?void 0:A.ss_output_name===void 0?A["modelspec.title"]:A.ss_output_name)||"",V.value.nameValue=s.value.name,s.value.strengthMin=(W=s.value.strengthMin)!==null&&W!==void 0?W:"",V.value.minValue=s.value.strengthMin,s.value.strengthMax=(ce=s.value.strengthMax)!==null&&ce!==void 0?ce:"",V.value.maxValue=s.value.strengthMax,s.value.userNote=(Ce=s.value.userNote)!==null&&Ce!==void 0?Ce:"",V.value.notesValue=s.value.userNote,s.value.loraWorks=(Le=s.value.loraWorks)!==null&&Le!==void 0?Le:"",V.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(g.value=s.value.user_diy_fileds),a.value=!1,yt(()=>{l.value&&(l.value.scrollTop=B)})}),de({type:"success",str:"message.deleteSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},be=oe=>{const B=fe.value.indexOf(oe);B===-1?fe.value.push(oe):fe.value.splice(B,1)},Te=oe=>fe.value.includes(oe),he=()=>{fe.value.length&&navigator.clipboard.writeText(fe.value).then(()=>{de({type:"success",str:"message.copySuccess"})},()=>{de({type:"warn",str:"message.copyFailed"})})},re=S(!0),j=()=>{re.value=!re.value};return(oe,B)=>(C(),L(qe,null,[i.value?(C(),Zt(ho,{key:0,title:h(o)("lora.title"),position:w.value.loraDetail.position,size:w.value.loraDetail.size,"z-index":h(rt).getZIndex("loraDetail"),"onUpdate:position":B[5]||(B[5]=q=>T("loraDetail",q)),"onUpdate:size":B[6]||(B[6]=q=>E("loraDetail",q)),onActive:B[7]||(B[7]=q=>h(rt).setActiveWindow("loraDetail")),onClose:B[8]||(B[8]=q=>b())},{default:Ut(()=>{var q;return[r("div",{class:"lora-detail__content",ref_key:"loraContent",ref:l},[a.value?(C(),L("div",Z9,[...B[9]||(B[9]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"is-rotating"},[r("path",{d:"M12 4V2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4Z"})],-1)])])):Ae("",!0),r("div",eS,[B[24]||(B[24]=r("div",{class:"lora-detail__title"},"Lora 信息",-1)),r("ul",tS,[s.value.type?(C(),L("li",{key:0,class:Ve(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:h(o)("lora.type")},y(s.value.type),11,nS)):Ae("",!0),s.value.baseModel?(C(),L("li",{key:1,class:Ve(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:h(o)("lora.baseModel")},y(s.value.baseModel),11,oS)):Ae("",!0)]),r("table",aS,[r("tbody",null,[r("tr",null,[r("td",sS,y(h(o)("lora.file")),1),r("td",rS,y(s.value.file),1),r("td",iS,[r("button",{class:"fetch-btn",onClick:B[0]||(B[0]=Y=>pe(s.value.raw.metadata))},y(h(o)("lora.seeLoraRaw")),1)])]),r("tr",null,[r("td",lS,y(h(o)("lora.hash")),1),r("td",uS,y(s.value.sha256),1)]),r("tr",null,[r("td",cS,y(h(o)("lora.civitai")),1),r("td",dS,[we.value?(C(),L(qe,{key:0},[r("a",{href:we.value,target:"_blank",class:"civitai-link"},[B[10]||(B[10]=r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"})],-1)),r("span",null,y(h(o)("lora.viewOnCivitai")),1)],8,pS),r("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:ie},y(h(o)("lora.getCivitData")),1)],64)):ne.value?(C(),L("div",fS,[r("i",null,y(h(o)("lora.modelNotFound")),1),(C(),L("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:h(o)("lora.modelNotFoundTip")},[...B[11]||(B[11]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,gS))])):(C(),L("button",{key:2,class:"fetch-btn",onClick:ie},y(h(o)("lora.fetchFromCivitai")),1))])]),r("tr",{class:Ve({"is-editing":D.value.name})},[r("td",mS,[ct(y(h(o)("lora.name"))+" ",1),(C(),L("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:h(o)("lora.nameTip")},[...B[12]||(B[12]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,vS))]),r("td",null,[D.value.name?xe((C(),L("input",{key:0,"onUpdate:modelValue":B[1]||(B[1]=Y=>V.value.name=Y),type:"text",onKeyup:[B[2]||(B[2]=Nn(Y=>$e("name"),["enter"])),B[3]||(B[3]=Nn(Y=>ve("name"),["esc"]))],ref_key:"nameInput",ref:d},null,544)),[[ze,V.value.name]]):(C(),L("span",hS,y(s.value.name),1))]),r("td",_S,[r("button",{class:"edit-btn",onClick:B[4]||(B[4]=Y=>X("name"))},[(C(),L("svg",yS,[D.value.name?(C(),L("path",bS)):(C(),L("path",wS))]))])])],2),r("tr",null,[r("td",xS,y(h(o)("lora.baseModel")),1),r("td",SS,y(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),r("tr",null,[r("td",TS,y(h(o)("lora.skipClip")),1),r("td",kS,y((oe._t=(oe._s=s.value.raw)===null||oe._s===void 0?void 0:oe._s.metadata)===null||oe._t===void 0?void 0:oe._t.ss_clip_skip),1)]),(C(),L(qe,null,ot(O,Y=>r("tr",{key:Y.key,class:Ve({"is-editing":D.value[Y.key]})},[r("td",CS,[ct(y(Y.label)+" ",1),Y.tip?(C(),L("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:Y.tip},[...B[13]||(B[13]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,ES)):Ae("",!0)]),r("td",null,[D.value[Y.key]?xe((C(),L("input",{key:0,"onUpdate:modelValue":$=>V.value[Y.key]=$,type:Y.type||"text",onKeyup:[Nn($=>$e(Y.key),["enter"]),Nn($=>ve(Y.key),["esc"])]},null,40,$S)),[[bf,V.value[Y.key]]]):(C(),L("span",AS,y(s.value[Y.key]),1))]),r("td",LS,[r("button",{class:"edit-btn",onClick:$=>X(Y.key),title:h(o)("promptBox.settings.edit")},[(C(),L("svg",MS,[D.value[Y.key]?(C(),L("path",OS)):(C(),L("path",DS))]))],8,IS)])],2)),64)),(C(!0),L(qe,null,ot(g.value,(Y,$)=>{var A;return C(),L("tr",{key:$,class:Ve({"is-editing":D.value[$]})},[r("td",PS,[D.value[$]?xe((C(),L("input",{key:0,"onUpdate:modelValue":W=>Y.label=W,type:"text"},null,8,RS)),[[ze,Y.label]]):(C(),L("span",NS,y(Y.label),1))]),r("td",null,[D.value[$]?xe((C(),L("input",{key:0,"onUpdate:modelValue":W=>V.value[$]=W,type:Y.type||"text",onKeyup:[Nn(W=>$e($),["enter"]),Nn(W=>ve($),["esc"])]},null,40,FS)),[[bf,V.value[$]]]):(C(),L("span",BS,y(s.value.user_diy_fileds?(A=s.value.user_diy_fileds[$])==null?void 0:A.value:""),1))]),r("td",US,[r("button",{class:"edit-btn",onClick:W=>X($),title:h(o)("promptBox.settings.edit")},[(C(),L("svg",VS,[D.value[$]?(C(),L("path",WS)):(C(),L("path",HS))]))],8,zS),r("button",{style:{"margin-left":"5px",color:"#f87171"},onClick:W=>le($),class:"edit-btn",title:h(o)("promptBox.settings.delete")},y(h(o)("promptBox.settings.delete")),9,jS)])],2)}),128)),r("div",GS,[r("button",{onClick:se,class:"add-btn",title:h(o)("lora.addDiyFiled")},y(h(o)("lora.addDiyFiled")),9,qS)]),J.value.length?(C(),L("tr",YS,[r("td",KS,[ct(y(h(o)("lora.trainedWords"))+" ",1),(C(),L("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:h(o)("lora.trainedWordsTip")},[...B[14]||(B[14]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,JS)),fe.value.length?(C(),L("div",XS,[ct(y(h(o)("lora.selectedWords",{count:fe.value.length}))+" ",1),r("button",{class:"copy-btn",onClick:he},y(h(o)("common.copy")),1)])):Ae("",!0)]),r("td",QS,[r("ul",ZS,[(C(!0),L(qe,null,ot(re.value?J.value.slice(0,10):J.value,(Y,$)=>(C(),L("li",{key:"words-"+$,class:Ve(["word-item",{"is-selected":Te(Y.word),"is-hidden":re.value&&$>=10}]),onClick:A=>be(Y.word)},[r("span",null,y(Y.word),1),Y.civitai?(C(),L("svg",tT,[...B[15]||(B[15]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"},null,-1)])])):Ae("",!0),Y.count!=null?(C(),L("small",nT,y(Y.count),1)):Ae("",!0)],10,eT))),128)),J.value.length>10?(C(),L("li",{key:0,class:"toggle-btn",onClick:j},y(re.value?h(o)("common.showMore"):h(o)("common.showLess")),1)):Ae("",!0)])])])):Ae("",!0)])]),(q=s.value.images)!=null&&q.length?(C(),L("ul",oT,[(C(!0),L(qe,null,ot(s.value.images,(Y,$)=>(C(),L("li",{key:$,class:"lora-detail__image-item"},[r("figure",null,[r("div",aT,[r("div",{class:"image-action",onClick:A=>ue(Y.url)},"设置为Lora封面",8,sT),r("img",{src:Y.url},null,8,rT)]),r("figcaption",iT,[Y.civitaiUrl?(C(),L("span",lT,[r("a",{href:Y.civitaiUrl,target:"_blank",class:"civitai-link"},[...B[16]||(B[16]=[ct(" C站 civitai ",-1),r("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})],-1)])],8,uT)])):Ae("",!0),Y.seed?(C(),L("span",cT,[B[17]||(B[17]=r("label",null,"种子 seed",-1)),ct(" "+y(Y.seed),1)])):Ae("",!0),Y.steps?(C(),L("span",dT,[B[18]||(B[18]=r("label",null,"步数 steps",-1)),ct(" "+y(Y.steps),1)])):Ae("",!0),Y.cfg?(C(),L("span",pT,[B[19]||(B[19]=r("label",null,"引导系数 cfg",-1)),ct(" "+y(Y.cfg),1)])):Ae("",!0),Y.sampler?(C(),L("span",fT,[B[20]||(B[20]=r("label",null,"采样器 sampler",-1)),ct(" "+y(Y.sampler),1)])):Ae("",!0),Y.model?(C(),L("span",gT,[B[21]||(B[21]=r("label",null,"基础模型 model",-1)),ct(" "+y(Y.model),1)])):Ae("",!0),Y.positive?(C(),L("span",mT,[B[22]||(B[22]=r("label",null,"正向提示词 positive",-1)),ct(" "+y(Y.positive),1)])):Ae("",!0),Y.negative?(C(),L("span",vT,[B[23]||(B[23]=r("label",null,"反向提示词 negative",-1)),ct(" "+y(Y.negative),1)])):Ae("",!0)])])]))),128))])):Ae("",!0)])],512)]}),_:1},8,["title","position","size","z-index"])):Ae("",!0),st(Q9,{ref_key:"loraRawRef",ref:N},null,512)],64))}},[["__scopeId","data-v-0b29ccf2"]]),hT={key:0,class:"lora-detail__loading"},_T={class:"lora-detail__body"},yT={class:"lora-detail__tags"},bT=["title"],wT=["title"],xT={class:"lora-detail__table"},ST={class:"label"},TT={colspan:"2"},kT={class:"label"},CT={colspan:"2",class:"hash"},ET={class:"label"},$T={colspan:"2"},AT=["href"],LT={key:1,class:"not-found"},IT=["title"],MT={class:"label"},OT=["title"],DT={key:1,class:"text"},PT={class:"label"},RT={colspan:"2"},NT={class:"label"},FT={colspan:"2"},BT={class:"label"},UT=["title"],zT={class:"text"},VT={class:"actions"},WT=["onClick","title"],HT={class:"label"},jT=["onUpdate:modelValue"],GT={key:1},qT={class:"text"},YT={class:"actions"},KT=["onClick","title"],JT={key:0},XT={class:"label"},QT=["title"],ZT={key:0,class:"word-selection"},ek={colspan:"2"},tk={class:"word-list"},nk=["onClick"],ok={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},ak={key:1},sk={key:0,class:"lora-detail__images",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"12px"}},rk={class:"image-wrapper",style:{height:"200px"}},ik=["src"],Wc=Vt({__name:"lora_card",props:{fileNmae:{type:String,required:!0},paddingLeft:{type:Number,required:!1,default:100},paddingTop:{type:Number,required:!1,default:100}},emits:["cardLeave","cardenter"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(!1),s=S({}),i=S(),l=S(null),d=S({}),g=e,f=S(""),m=n,w=()=>{m("cardLeave")},b=()=>{m("cardenter")},T=S({}),E=S({}),I=S([]),P=[{key:"strengthMin",label:o("lora.strengthMin"),tip:o("lora.strengthMinTip"),type:"number"},{key:"strengthMax",label:o("lora.strengthMax"),tip:o("lora.strengthMaxTip"),type:"number"},{key:"strWeight",label:o("lora.strWeight"),tip:o("lora.strWeightTip"),type:"number"},{key:"loraWorks",label:o("lora.promptWords"),tip:o("lora.promptWordsTip")}];Dt(()=>{N()});const N=()=>{f.value=g.fileNmae,s.value={},I.value=[],E.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},_o.getLoraDetail({file:f.value,refresh:!1,light:!1}).then(X=>{s.value=X.data,yt(()=>{let ee,$e,ve,Z,te,be;s.value.name=s.value.name||(($e=(ee=s.value.raw)===null||ee===void 0?void 0:ee.metadata)===null||$e===void 0?void 0:$e.ss_output_name===void 0?$e["modelspec.title"]:$e.ss_output_name)||"",E.value.nameValue=s.value.name,s.value.strengthMin=(ve=s.value.strengthMin)!==null&&ve!==void 0?ve:"",E.value.minValue=s.value.strengthMin,s.value.strengthMax=(Z=s.value.strengthMax)!==null&&Z!==void 0?Z:"",E.value.maxValue=s.value.strengthMax,s.value.userNote=(te=s.value.userNote)!==null&&te!==void 0?te:"",E.value.notesValue=s.value.userNote,s.value.loraWorks=(be=s.value.loraWorks)!==null&&be!==void 0?be:"",E.value.loraWorksValue=s.value.loraWorks,d.value=s.value.user_diy_fileds,a.value=!1})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},pe=X=>{navigator.clipboard.writeText(X).then(()=>{de({type:"success",str:"已复制到剪贴板"})}).catch(()=>{de({type:"error",str:"复制失败"})})},D=$t(()=>{var X;return(X=s.value.links)==null?void 0:X.find(ee=>ee.includes("civitai.com/models"))}),V=$t(()=>{var X,ee;return((ee=(X=s.value.raw)==null?void 0:X.civitai)==null?void 0:ee.error)==="Model not found"}),fe=$t(()=>s.value.trainedWords||[]),O=()=>{var ee;const X=((ee=i.value)==null?void 0:ee.scrollTop)||0;a.value=!0,_o.getLoraRefresh({file:f.value}).then($e=>{s.value=$e.data,yt(()=>{let ve,Z,te,be,Te;s.value.name=s.value.name||((Z=(ve=s.value.raw)===null||ve===void 0?void 0:ve.metadata)===null||Z===void 0?void 0:Z.ss_output_name===void 0?Z["modelspec.title"]:Z.ss_output_name)||"",E.value.nameValue=s.value.name,s.value.strengthMin=(te=s.value.strengthMin)!==null&&te!==void 0?te:"",E.value.minValue=s.value.strengthMin,s.value.strengthMax=(be=s.value.strengthMax)!==null&&be!==void 0?be:"",E.value.maxValue=s.value.strengthMax,s.value.userNote=(Te=s.value.userNote)!==null&&Te!==void 0?Te:"",E.value.notesValue=s.value.userNote,a.value=!1}),yt(()=>{a.value=!1}),i.value&&(i.value.scrollTop=X),de({type:"success",str:"message.dataLoaded"})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},se=X=>{X in d.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[X]={label:d.value[X].label,value:E.value[X]}):s.value[X]=E.value[X],Pe(s.value),T.value[X]=!1},le=X=>{T.value[X]=!1,E.value[X]=s.value[X]},Pe=X=>{var $e;const ee=(($e=i.value)==null?void 0:$e.scrollTop)||0;a.value=!0,_o.postLoraSave(f.value,X).then(ve=>{s.value=ve.data,yt(()=>{let Z,te,be,Te,he;s.value.name=s.value.name||((te=(Z=s.value.raw)===null||Z===void 0?void 0:Z.metadata)===null||te===void 0?void 0:te.ss_output_name===void 0?te["modelspec.title"]:te.ss_output_name)||"",E.value.nameValue=s.value.name,s.value.strengthMin=(be=s.value.strengthMin)!==null&&be!==void 0?be:"",E.value.minValue=s.value.strengthMin,s.value.strengthMax=(Te=s.value.strengthMax)!==null&&Te!==void 0?Te:"",E.value.maxValue=s.value.strengthMax,s.value.userNote=(he=s.value.userNote)!==null&&he!==void 0?he:"",E.value.notesValue=s.value.userNote,a.value=!1,yt(()=>{i.value&&(i.value.scrollTop=ee)})}),de({type:"success",str:"message.saveSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"}),a.value=!1})},Ie=X=>{const ee=I.value.indexOf(X);ee===-1?I.value.push(X):I.value.splice(ee,1)},ue=X=>I.value.includes(X),we=()=>{I.value.length&&navigator.clipboard.writeText(I.value).then(()=>{de({type:"success",str:"message.copySuccess"})},()=>{de({type:"warn",str:"message.copyFailed"})})},ne=S(!0),J=()=>{ne.value=!ne.value};return t({refresh:()=>{N()}}),(X,ee)=>{var $e;return C(),L("div",{class:"lora_catd_content",style:Ft(["left: "+e.paddingLeft+"px;top: "+e.paddingTop+"px;",{"font-size":"0.55em"}]),onMouseenter:b,onMouseleave:w},[r("div",{class:"close-button",onClick:w,title:"关闭"},[...ee[3]||(ee[3]=[r("span",null,"×",-1)])]),r("div",{class:"lora-detail__content",ref_key:"loraContent",ref:i},[a.value?(C(),L("div",hT,[...ee[4]||(ee[4]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"is-rotating"},[r("path",{d:"M12 4V2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4Z"})],-1)])])):Ae("",!0),r("div",_T,[ee[13]||(ee[13]=r("div",{class:"lora-detail__title"},"Lora 信息",-1)),r("ul",yT,[s.value.type?(C(),L("li",{key:0,class:Ve(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:h(o)("lora.type")},y(s.value.type),11,bT)):Ae("",!0),s.value.baseModel?(C(),L("li",{key:1,class:Ve(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:h(o)("lora.baseModel")},y(s.value.baseModel),11,wT)):Ae("",!0)]),r("table",xT,[r("tbody",null,[r("tr",null,[r("td",ST,y(h(o)("lora.file")),1),r("td",TT,y(s.value.file),1)]),r("tr",null,[r("td",kT,y(h(o)("lora.hash")),1),r("td",CT,y(s.value.sha256),1)]),r("tr",null,[r("td",ET,y(h(o)("lora.civitai")),1),r("td",$T,[D.value?(C(),L(qe,{key:0},[r("a",{href:D.value,target:"_blank",class:"civitai-link"},[ee[5]||(ee[5]=r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"})],-1)),r("span",null,y(h(o)("lora.viewOnCivitai")),1)],8,AT),r("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:O},y(h(o)("lora.getCivitData")),1)],64)):V.value?(C(),L("div",LT,[r("i",null,y(h(o)("lora.modelNotFound")),1),(C(),L("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:h(o)("lora.modelNotFoundTip")},[...ee[6]||(ee[6]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,IT))])):(C(),L("button",{key:2,class:"fetch-btn",onClick:O},y(h(o)("lora.fetchFromCivitai")),1))])]),r("tr",{class:Ve({"is-editing":T.value.name})},[r("td",MT,[ct(y(h(o)("lora.name"))+" ",1),(C(),L("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:h(o)("lora.nameTip")},[...ee[7]||(ee[7]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,OT))]),r("td",null,[T.value.name?xe((C(),L("input",{key:0,"onUpdate:modelValue":ee[0]||(ee[0]=ve=>E.value.name=ve),type:"text",onKeyup:[ee[1]||(ee[1]=Nn(ve=>se("name"),["enter"])),ee[2]||(ee[2]=Nn(ve=>le("name"),["esc"]))],ref_key:"nameInput",ref:l},null,544)),[[ze,E.value.name]]):(C(),L("span",DT,y(s.value.name),1))])],2),r("tr",null,[r("td",PT,y(h(o)("lora.baseModel")),1),r("td",RT,y(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),r("tr",null,[r("td",NT,y(h(o)("lora.skipClip")),1),r("td",FT,y((X._t=(X._s=s.value.raw)===null||X._s===void 0?void 0:X._s.metadata)===null||X._t===void 0?void 0:X._t.ss_clip_skip),1)]),(C(),L(qe,null,ot(P,ve=>r("tr",{key:ve.key,class:Ve({"is-editing":T.value[ve.key]})},[r("td",BT,[ct(y(ve.label)+" ",1),ve.tip?(C(),L("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:ve.tip},[...ee[8]||(ee[8]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,UT)):Ae("",!0)]),r("td",null,[r("span",zT,y(s.value[ve.key]),1)]),r("td",VT,[r("button",{class:"copy-btn",onClick:Z=>pe(s.value[ve.key]),title:h(o)("lora.copy")},[ee[9]||(ee[9]=r("svg",{class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),ct(" "+y(h(o)("lora.copy")),1)],8,WT)])],2)),64)),(C(!0),L(qe,null,ot(d.value,(ve,Z)=>{var te;return C(),L("tr",{key:Z,class:Ve({"is-editing":T.value[Z]})},[r("td",HT,[T.value[Z]?xe((C(),L("input",{key:0,"onUpdate:modelValue":be=>ve.label=be,type:"text"},null,8,jT)),[[ze,ve.label]]):(C(),L("span",GT,y(ve.label),1))]),r("td",null,[r("span",qT,y(s.value.user_diy_fileds?(te=s.value.user_diy_fileds[Z])==null?void 0:te.value:""),1)]),r("td",YT,[r("button",{class:"copy-btn",onClick:be=>{var Te;return pe((Te=s.value.user_diy_fileds[Z])==null?void 0:Te.value)},title:h(o)("lora.copy")},[ee[10]||(ee[10]=r("svg",{class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)),ct(" "+y(h(o)("lora.copy")),1)],8,KT)])],2)}),128)),fe.value.length?(C(),L("tr",JT,[r("td",XT,[ct(y(h(o)("lora.trainedWords"))+" ",1),(C(),L("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:h(o)("lora.trainedWordsTip")},[...ee[11]||(ee[11]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"},null,-1)])],8,QT)),I.value.length?(C(),L("div",ZT,[ct(y(h(o)("lora.selectedWords",{count:I.value.length}))+" ",1),r("button",{class:"copy-btn",onClick:we},y(h(o)("common.copy")),1)])):Ae("",!0)]),r("td",ek,[r("ul",tk,[(C(!0),L(qe,null,ot(ne.value?fe.value.slice(0,10):fe.value,(ve,Z)=>(C(),L("li",{key:"words-"+Z,class:Ve(["word-item",{"is-selected":ue(ve.word),"is-hidden":ne.value&&Z>=10}]),onClick:te=>Ie(ve.word)},[r("span",null,y(ve.word),1),ve.civitai?(C(),L("svg",ok,[...ee[12]||(ee[12]=[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15v-4H8l4-7v4h3l-4 7z"},null,-1)])])):Ae("",!0),ve.count!=null?(C(),L("small",ak,y(ve.count),1)):Ae("",!0)],10,nk))),128)),fe.value.length>10?(C(),L("li",{key:0,class:"toggle-btn",onClick:J},y(ne.value?h(o)("common.showMore"):h(o)("common.showLess")),1)):Ae("",!0)])])])):Ae("",!0)])]),($e=s.value.images)!=null&&$e.length?(C(),L("ul",sk,[(C(!0),L(qe,null,ot(s.value.images,(ve,Z)=>(C(),L("li",{key:Z,class:"lora-detail__image-item"},[r("div",rk,[r("img",{src:ve.url,style:{width:"100%",height:"100%","object-fit":"contain"}},null,8,ik)])]))),128))])):Ae("",!0)])],512)],36)}}},[["__scopeId","data-v-b0ee2f35"]]),lk={class:"header-actions"},uk=["title"],ck=["onMouseover","onDragstart","onDrop"],dk={class:"lora-info"},pk={class:"lora-header"},fk=["title"],gk={class:"lora-actions"},mk=["onClick","title"],vk=["onClick","title"],hk={class:"lora-weights-row"},_k={class:"weight-item-col"},yk=["onUpdate:modelValue"],bk={class:"weight-item-col"},wk=["onUpdate:modelValue"],xk={class:"weight-item-col"},Sk=["onUpdate:modelValue"],Tk={class:"switch-item-col"},kk={class:"switch"},Ck=["checked","onChange"],Xa="weilin_prompt_ui_",Ek=Vt({__name:"lora_stack",props:{isOpen:{type:Boolean,default:!1},selectedLoras:{type:Array,default:()=>[]}},emits:["close","update:selectedLoras"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(!1),s=S(""),i=S(100),l=S(0),d=S(),g=S(!1),f=S(!1),m=S(),w=e,b=n,T=(ne,J)=>{if(f.value=!0,s.value===ne&&a.value)return;const X=J.currentTarget.getBoundingClientRect(),$e={left:X.left-450-10,top:X.top};$e.left<10&&($e.left=X.right+10),$e.top=Math.max(10,Math.min($e.top,window.innerHeight-310)),i.value=$e.left,l.value=$e.top,a.value=!0,s.value=ne,yt(()=>{m.value.refresh()})},E=()=>{f.value=!1,setTimeout(()=>{!g.value&&!f.value&&(a.value=!1,s.value="",g.value=!1)},200)},I=()=>{g.value=!0,f.value=!0},P=()=>{a.value=!1,s.value="",g.value=!1},N=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora"},"*")},pe=ne=>{ne.hidden=!ne.hidden},D=ne=>{if(w.selectedLoras&&!w.selectedLoras.find(J=>J.name===ne.name)){const J={name:ne.name,weight:ne.weight||1,text_encoder_weight:ne.text_encoder_weight||1,trigger_weight:ne.trigger_weight||1,lora:ne.lora,loraWorks:ne.loraWorks||"",display_name:ne.display_name||ne.name},ie=[...w.selectedLoras,J];b("update:selectedLoras",ie)}},V=ne=>{const J=w.selectedLoras.findIndex(ie=>ie.name===ne.name);if(J>-1){const ie=w.selectedLoras.filter((X,ee)=>ee!==J);b("update:selectedLoras",ie)}},fe=S(),O=ne=>{fe.value.open({name:ne.lora})};window.addEventListener("message",ne=>{ne.data.type==="weilin_prompt_ui_selectLora"&&D(ne.data.lora)});let se="",le=!1;St(()=>w.selectedLoras,ne=>{if(le){if(ne&&ne.length>0){const ie=ne.filter(X=>!X.hidden).map(X=>`<wlr:${X.lora?X.lora.replace(".safetensors",""):X.name}:${X.weight||1}:${X.text_encoder_weight||1}:${X.trigger_weight||1}>`);se=JSON.stringify(ie)}else se="";return}if(ne&&ne.length>0){const ie=ne.filter(ee=>!ee.hidden).map(ee=>`<wlr:${ee.lora?ee.lora.replace(".safetensors",""):ee.name}:${ee.weight||1}:${ee.text_encoder_weight||1}:${ee.trigger_weight||1}>`),X=JSON.stringify(ie);X!==se&&(se=X,window.postMessage({type:"weilin_prompt_ui_update_lora_tags",tags:ie},"*"))}else se!==""&&(se="",window.postMessage({type:"weilin_prompt_ui_update_lora_tags",tags:[]},"*"))},{deep:!0});const Pe=ne=>{le=ne},Ie=S(null),ue=ne=>{Ie.value=ne},we=ne=>{if(Ie.value===null||Ie.value===ne)return;const J=[...w.selectedLoras],ie=J.splice(Ie.value,1)[0];J.splice(ne,0,ie),Ie.value=null,b("update:selectedLoras",J)};return t({addLora:D,removeLora:V,setInitializing:Pe}),(ne,J)=>(C(),L("div",{class:Ve(`${Xa}lora-stack`),style:Ft([{width:e.isOpen?"300px":"0"},{paddingRight:e.isOpen?"16px":"0"}])},[r("div",{class:Ve(`${Xa}lora-content`)},[r("div",{class:Ve(`${Xa}lora-header`)},[r("h3",{class:Ve(`${Xa}lora-title`)},y(h(o)("controls.loraStack")),3),r("div",lk,[r("button",{class:Ve(`${Xa}add-btn`),onClick:N,title:h(o)("controls.addLora")},[...J[2]||(J[2]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)])],10,uk),r("button",{class:Ve(`${Xa}close-btn`),onClick:J[0]||(J[0]=ie=>ne.$emit("close"))},[...J[3]||(J[3]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],2)])],2),r("div",{class:Ve(`${Xa}lora-body`)},[r("div",{class:Ve(`${Xa}lora-list`)},[(C(!0),L(qe,null,ot(e.selectedLoras,(ie,X)=>(C(),L("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:d,key:ie.name,class:Ve(["lora-item",{"hidden-lora":ie.hidden}]),onMouseover:ee=>T(ie.lora,ee),onMouseleave:E,draggable:"true",onDragstart:ee=>ue(X),onDragover:J[1]||(J[1]=vt(()=>{},["prevent"])),onDrop:ee=>we(X)},[r("div",dk,[r("div",pk,[r("span",{class:"lora-name",title:ie.name},y(ie.name),9,fk),r("div",gk,[r("button",{class:"look-on-btn",onClick:ee=>O(ie),title:h(o)("controls.lookOnLora")},[...J[4]||(J[4]=[r("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[r("path",{d:"M576.5 930.2H163.1c-52.9 0-96-43.1-96-96v-672c0-52.9 43.1-96 96-96h672c52.9 0 96 43.1 96 96V577c0 17.7-14.3 32-32 32s-32-14.3-32-32V162.2c0-17.6-14.4-32-32-32h-672c-17.6 0-32 14.4-32 32v672c0 17.6 14.4 32 32 32h413.4c17.7 0 32 14.3 32 32s-14.3 32-32 32z","p-id":"3466"}),r("path",{d:"M692.4 322.3H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h446.7c17.7 0 32 14.3 32 32s-14.3 32-32 32zM388.5 530.2H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.6-14.3 32-31.9 32zM388.5 738H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.7-14.3 32-31.9 32z","p-id":"3467"}),r("path",{d:"M624.1 792.5c-94.8 0-172-77.2-172-172s77.2-172 172-172 172 77.2 172 172-77.1 172-172 172z m0-280c-59.6 0-108 48.4-108 108s48.4 108 108 108 108-48.4 108-108-48.4-108-108-108z","p-id":"3468"}),r("path",{d:"M820.8 864.2L710.5 753.9c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L866 818.9c12.5 12.5 12.5 32.8 0 45.3s-32.7 12.5-45.2 0z","p-id":"3469"})],-1)])],8,mk),r("button",{class:"remove-btn",onClick:ee=>V(ie),title:h(o)("controls.removeLora")},[...J[5]||(J[5]=[r("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,vk)])]),r("div",hk,[r("div",_k,[r("label",null,y(h(o)("loraManager.modelWeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":ee=>ie.weight=ee,class:"lora-weight",step:"0.1"},null,8,yk),[[ze,ie.weight]])]),r("div",bk,[r("label",null,y(h(o)("loraManager.textEncoderWeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":ee=>ie.text_encoder_weight=ee,class:"lora-weight",step:"0.1"},null,8,wk),[[ze,ie.text_encoder_weight]])]),r("div",xk,[r("label",null,y(h(o)("loraManager.triggerWeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":ee=>ie.trigger_weight=ee,class:"lora-weight",step:"0.1"},null,8,Sk),[[ze,ie.trigger_weight]])]),r("div",Tk,[r("label",null,y(ie.hidden?h(o)("lora.hideLora"):h(o)("lora.showLora")),1),r("label",kk,[r("input",{type:"checkbox",checked:!ie.hidden,onChange:ee=>pe(ie)},null,40,Ck),J[6]||(J[6]=r("span",{class:"slider"},null,-1))])])])])],42,ck))),128))],2)],2)],2),st(Pl,{ref_key:"loraDetailLoraStackRef",ref:fe},null,512),a.value?(C(),Zt(Wc,{key:0,ref_key:"loraCardItem",ref:m,fileNmae:s.value,paddingLeft:i.value,paddingTop:l.value,onCardLeave:P,onCardenter:I},null,8,["fileNmae","paddingLeft","paddingTop"])):Ae("",!0)],6))}},[["__scopeId","data-v-ac4d42a1"]]),$k={class:"main-label-manager"},Ak={class:"mlm-header"},Lk={class:"mlm-grid"},Ik=["disabled"],Mk=["disabled"],Ok=["onClick","title","onDragstart","onDragenter","onDrop"],Dk={class:"mlm-item-main"},Pk={key:0,class:"pin-badge"},Rk={class:"mlm-name"},Nk={class:"mlm-item-actions"},Fk=["title","onClick"],Bk=["title","onClick"],Dv="/weilin/prompt_ui/api/",Uk="weilin_prompt_ui_main_labels_v1",zk=Vt({__name:"main_label_manager",props:{selectedId:{type:String,default:null}},emits:["select"],setup(e,{expose:t,emit:n}){const o=e,a=n,s=S(null),i=S(""),l=S([]),d=S(o.selectedId),g=S(!0),f=S(!0),m=S("time"),w=S(null),b=S(null);async function T(){const he={items:l.value,settings:{sortMode:m.value,sortTimeDesc:g.value,sortNameAsc:f.value,selectedId:d.value}};try{await vn.post(`${Dv}labels/save`,he)}catch(re){console.error("保存标签数据失败:",re),alert(`保存失败: ${re.message}`)}}async function E(){var he;try{const j=(he=(await vn.get(`${Dv}labels/get`)).data)==null?void 0:he.data;if(!j)throw new Error("no data");const oe=Array.isArray(j)?j:(j==null?void 0:j.items)??[],B=Array.isArray(j)?{}:(j==null?void 0:j.settings)??{};l.value=oe.map((q,Y)=>({id:q.id??pe(),name:q.name??"未命名",content:q.content??"",createdAt:q.createdAt??q.updatedAt??Date.now(),updatedAt:q.updatedAt??q.createdAt??Date.now(),pinned:!!q.pinned,highlighted:!!q.highlighted,order:typeof q.order=="number"?q.order:Y})),B.sortMode&&(m.value=B.sortMode),typeof B.sortTimeDesc=="boolean"&&(g.value=B.sortTimeDesc),typeof B.sortNameAsc=="boolean"&&(f.value=B.sortNameAsc),(typeof B.selectedId=="string"||B.selectedId===null)&&(d.value=B.selectedId)}catch(re){console.error("加载标签数据失败:",re),l.value=[]}}Dt(async()=>{await E()}),St(()=>o.selectedId,he=>{d.value=he}),St([m,g,f],()=>{T()}),St(l,()=>{T()},{deep:!0}),St(d,he=>{T();const re=he?D(he):null;a("select",re?{...re}:null)});const I=$t(()=>{const he=i.value.trim().toLowerCase();return he?l.value.filter(re=>(re.name||"").toLowerCase().includes(he)):l.value}),P=$t(()=>{const he=[...I.value];if(m.value==="manual")return he.sort((B,q)=>{const Y=B.order??0,$=q.order??0;return Y!==$?Y-$:(B.createdAt??0)-(q.createdAt??0)});const re=(B,q)=>{const Y=B.name||"",$=q.name||"";let A=Y.localeCompare($,void 0,{numeric:!0,sensitivity:"base"});return f.value||(A=-A),A},j=(B,q)=>{let Y=B.createdAt-q.createdAt;return g.value&&(Y=-Y),Y},oe=B=>B.pinned?0:1;return he.sort((B,q)=>{const Y=oe(B)-oe(q);if(Y!==0)return Y;if(m.value==="name"){const A=re(B,q);return A!==0?A:j(B,q)}const $=j(B,q);return $!==0?$:re(B,q)}),he}),N=$t(()=>D(d.value));function pe(){return`mlm_${Math.random().toString(36).slice(2)}_${Date.now()}`}function D(he){return l.value.find(re=>re.id===he)||null}function V(he){d.value=he.id,a("select",{...he})}function fe(){const he=window.prompt("新建标签名称:","");if(!he)return;ie(),m.value="manual";const re=pe(),j=Date.now(),oe=l.value.reduce((q,Y)=>typeof Y.order=="number"?Math.min(q,Y.order):q,0),B={id:re,name:he.trim(),content:"",createdAt:j,updatedAt:j,pinned:!1,highlighted:!1,order:oe-1};l.value.push(B),T(),d.value=re,a("select",{...B})}function O(){const he=N.value;if(!he)return;const re=window.prompt("重命名标签:",he.name||"");re&&(he.name=re.trim(),he.updatedAt=Date.now(),T())}function se(){const he=N.value;if(!he||!window.confirm(`确定删除标签"${he.name}"吗?`))return;const re=l.value.findIndex(j=>j.id===he.id);re>=0&&l.value.splice(re,1),T(),l.value.length?(d.value=l.value[0].id,a("select",{...l.value[0]})):(d.value=null,a("select",null))}function le(){m.value="time",g.value=!g.value}function Pe(){m.value="name",f.value=!f.value}function Ie(he){he.pinned=!he.pinned,he.updatedAt=Date.now(),T()}function ue(he){he.highlighted=!he.highlighted,he.updatedAt=Date.now(),T()}function we(he){const re=N.value;re&&(re.content=he??"",re.updatedAt=Date.now(),clearTimeout(ne),ne=setTimeout(()=>T(),400))}let ne=null;function J(he){try{const re=new Date(he);return`${re.getFullYear()}-${(re.getMonth()+1).toString().padStart(2,"0")}-${re.getDate().toString().padStart(2,"0")} ${re.getHours().toString().padStart(2,"0")}:${re.getMinutes().toString().padStart(2,"0")}`}catch{return""}}function ie(){P.value.forEach((re,j)=>{re.order=j})}function X(he,re,j){try{j.dataTransfer.effectAllowed="move"}catch{}w.value=he.id,b.value=null,ie(),m.value="manual"}function ee(he){w.value&&(b.value=he.id)}function $e(he){if(!w.value)return;const re=w.value,j=he==null?void 0:he.id;if(!j||re===j)return ve();const oe=[...P.value],B=oe.findIndex($=>$.id===re),q=oe.findIndex($=>$.id===j);if(B<0||q<0)return ve();const[Y]=oe.splice(B,1);oe.splice(q,0,Y),oe.forEach(($,A)=>{$.order=A}),T(),ve()}function ve(){w.value=null,b.value=null}async function Z(){try{const he=localStorage.getItem(Uk);if(!he){alert("未找到浏览器中的旧数据");return}const re=JSON.parse(he),j=Array.isArray(re)?re:(re==null?void 0:re.items)??[],oe=Array.isArray(re)?{}:(re==null?void 0:re.settings)??{};if(!Array.isArray(j)||j.length===0){alert("浏览器中没有可迁移的数据");return}if(!window.confirm(`发现浏览器中有 ${j.length} 个标签
点击"确定"将这些数据迁移到服务器
(会与服务器现有数据合并,不会覆盖)`))return;const q=new Set(l.value.map(A=>A.id)),Y=l.value.reduce((A,W)=>Math.max(A,typeof W.order=="number"?W.order:A),-1);let $=0;j.forEach((A,W)=>{let ce=A.id;q.has(ce)&&(ce=pe()),q.add(ce),l.value.push({id:ce,name:A.name??"未命名",content:A.content??"",createdAt:A.createdAt??A.updatedAt??Date.now(),updatedAt:A.updatedAt??A.createdAt??Date.now(),pinned:!!A.pinned,highlighted:!!A.highlighted,order:(typeof A.order=="number",Y+1+W)}),$++}),!m.value&&oe.sortMode&&(m.value=oe.sortMode),typeof g.value>"u"&&typeof oe.sortTimeDesc=="boolean"&&(g.value=oe.sortTimeDesc),typeof f.value>"u"&&typeof oe.sortNameAsc=="boolean"&&(f.value=oe.sortNameAsc),await T(),alert(`迁移成功!
已从浏览器迁移 ${$} 个标签到服务器
当前共 ${l.value.length} 个标签`)}catch(he){console.error("迁移失败:",he),alert(`迁移失败: ${he.message}`)}}function te(){try{const he={items:l.value,settings:{sortMode:m.value,sortTimeDesc:g.value,sortNameAsc:f.value,selectedId:d.value},exportTime:new Date().toISOString(),version:"v1"},re=JSON.stringify(he,null,2),j=new Blob([re],{type:"application/json"}),oe=URL.createObjectURL(j),B=document.createElement("a");B.href=oe;const q=new Date,Y=q.getFullYear()+(q.getMonth()+1).toString().padStart(2,"0")+q.getDate().toString().padStart(2,"0"),$=q.getHours().toString().padStart(2,"0")+q.getMinutes().toString().padStart(2,"0")+q.getSeconds().toString().padStart(2,"0");B.download=`weilin_prompt_labels_${Y}_${$}.json`,document.body.appendChild(B),B.click(),document.body.removeChild(B),URL.revokeObjectURL(oe),alert(`导出成功!共导出 ${l.value.length} 个标签`)}catch(he){console.error("导出失败:",he),alert(`导出失败: ${he.message}`)}}function be(){var he;(he=s.value)==null||he.click()}function Te(he){var oe;const re=(oe=he.target.files)==null?void 0:oe[0];if(!re)return;const j=new FileReader;j.onload=async B=>{var q,Y;try{const $=(q=B.target)==null?void 0:q.result;if(typeof $!="string")throw new Error("文件读取失败");const A=JSON.parse($);if(!A||typeof A!="object")throw new Error("JSON格式不正确");const W=Array.isArray(A)?A:(A==null?void 0:A.items)??[],ce=Array.isArray(A)?{}:(A==null?void 0:A.settings)??{};if(!Array.isArray(W))throw new Error("数据格式错误:未找到items数组");const Ce=window.confirm(`检测到 ${W.length} 个标签
点击"确定"将替换当前所有数据
点击"取消"将合并导入(保留现有数据)`)?"replace":"merge";if(Ce==="replace"){l.value=W.map((z,k)=>({id:z.id??pe(),name:z.name??"未命名",content:z.content??"",createdAt:z.createdAt??z.updatedAt??Date.now(),updatedAt:z.updatedAt??z.createdAt??Date.now(),pinned:!!z.pinned,highlighted:!!z.highlighted,order:typeof z.order=="number"?z.order:k})),ce.sortMode&&(m.value=ce.sortMode),typeof ce.sortTimeDesc=="boolean"&&(g.value=ce.sortTimeDesc),typeof ce.sortNameAsc=="boolean"&&(f.value=ce.sortNameAsc);const Le=ce.selectedId&&l.value.find(z=>z.id===ce.selectedId)?ce.selectedId:((Y=l.value[0])==null?void 0:Y.id)??null;d.value=Le}else{const Le=new Set(l.value.map(H=>H.id)),z=l.value.reduce((H,Q)=>Math.max(H,typeof Q.order=="number"?Q.order:H),-1);let k=0;W.forEach((H,Q)=>{let Ne=H.id;Le.has(Ne)&&(Ne=pe()),Le.add(Ne),l.value.push({id:Ne,name:H.name??"未命名",content:H.content??"",createdAt:H.createdAt??H.updatedAt??Date.now(),updatedAt:H.updatedAt??H.createdAt??Date.now(),pinned:!!H.pinned,highlighted:!!H.highlighted,order:(typeof H.order=="number",z+1+Q)}),k++}),alert(`合并成功!新增 ${k} 个标签,当前共 ${l.value.length} 个标签`)}await T(),Ce==="replace"&&alert(`导入成功!已替换为 ${l.value.length} 个标签`)}catch($){console.error("导入失败:",$),alert(`导入失败: ${$.message}`)}finally{s.value&&(s.value.value="")}},j.onerror=()=>{alert("文件读取失败"),s.value&&(s.value.value="")},j.readAsText(re)}return t({updateSelectedContent:we}),(he,re)=>(C(),L("div",$k,[r("div",Ak,[xe(r("input",{"onUpdate:modelValue":re[0]||(re[0]=j=>i.value=j),class:"mlm-search",type:"text",placeholder:"搜索标签…"},null,512),[[ze,i.value]]),r("button",{class:"mlm-add",onClick:fe},"+ 新建标签"),r("button",{class:"mlm-migrate",onClick:Z,title:"将浏览器中的旧数据迁移到服务器"}," 📦 从浏览器迁移数据 "),r("div",{class:"mlm-io-grid"},[r("button",{class:"mlm-export",onClick:te,title:"导出提示词数据到JSON文件"}," 导出数据 "),r("button",{class:"mlm-import",onClick:be,title:"从JSON文件导入提示词数据"}," 导入数据 ")]),r("input",{ref_key:"fileInput",ref:s,type:"file",accept:".json",style:{display:"none"},onChange:Te},null,544),r("div",Lk,[r("button",{class:"mlm-sort",onClick:le}," 按时间 "+y(g.value?"后→先":"先→后"),1),r("button",{class:"mlm-sort",onClick:Pe}," 按名称 "+y(f.value?"A→Z":"Z→A"),1),r("button",{class:"mlm-edit",disabled:!N.value,onClick:O},"编辑",8,Ik),r("button",{class:"mlm-delete",disabled:!N.value,onClick:se},"删除",8,Mk)])]),st(__,{name:"mlm",tag:"div",class:"mlm-list"},{default:Ut(()=>[(C(!0),L(qe,null,ot(P.value,(j,oe)=>(C(),L("div",{key:j.id,class:Ve(["mlm-item",{active:j.id===d.value,pinned:!!j.pinned,highlighted:!!j.highlighted},{dragging:w.value===j.id,"drag-over":b.value===j.id}]),onClick:B=>V(j),title:j.updatedAt?J(j.updatedAt):"",draggable:"true",onDragstart:B=>X(j,oe,B),onDragenter:vt(B=>ee(j),["prevent"]),onDragover:re[1]||(re[1]=vt(()=>{},["prevent"])),onDrop:vt(B=>$e(j),["prevent"]),onDragend:ve},[r("div",Dk,[j.pinned?(C(),L("span",Pk,"置顶")):Ae("",!0),r("span",Rk,y(j.name),1)]),r("div",Nk,[r("button",{class:Ve(["mini-btn","pin",{active:j.pinned}]),title:j.pinned?"取消置顶":"置顶",onClick:vt(B=>Ie(j),["stop"])},[...re[2]||(re[2]=[r("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[r("path",{d:"M4 14h4v6h8v-6h4L12 4 4 14z"})],-1)])],10,Fk),r("button",{class:Ve(["mini-btn","highlight",{active:j.highlighted}]),title:j.highlighted?"取消高亮":"高亮",onClick:vt(B=>ue(j),["stop"])},[...re[3]||(re[3]=[r("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[r("path",{d:"M12 17.27L18.18 21 16.54 13.97 22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})],-1)])],10,Bk)])],42,Ok))),128))]),_:1})]))}},[["__scopeId","data-v-3a6be373"]]),Oo={getHistory:()=>Ye({url:"/prompt/history/get_history",method:"get"}),saveHistory:e=>Ye({url:"/prompt/history/add_history",method:"post",data:e}),deleteHistory:e=>Ye({url:"/prompt/history/delete_history",method:"post",data:{id_index:e}}),batchDeleteHistory:e=>Ye({url:"/prompt/history/batch_delete_history",method:"post",data:{id_index:e}}),getFavorite:()=>Ye({url:"/prompt/collect_history/get_collect_history",method:"get"}),addFavorite:e=>Ye({url:"/prompt/collect_history/add_collect_history",method:"post",data:e}),editFavorite:e=>Ye({url:"/prompt/collect_history/edit_collect_history",method:"post",data:e}),deleteFavorite:e=>Ye({url:"/prompt/collect_history/delete_collect_history",method:"post",data:{id_index:e}}),batchDeleteFavorite:e=>Ye({url:"/prompt/collect_history/batch_delete_collect_history",method:"post",data:{id_indices:e}})},Vk={class:"lora-manager-top-bar"},Wk=["placeholder"],Hk=["title"],jk=["title"],Gk={class:"checkbox-container"},qk=["onClick"],Yk=["onClick"],Kk={key:0,class:"loading-indicator"},Jk={key:1,class:"empty-list"},Xk=["onClick","onMouseover"],Qk=["src","alt","title"],Zk={key:0,class:"loading-more"},eC={key:1,class:"no-more-data"},Sn="weilin_prompt_ui_",Pv=Vt({__name:"lora_index",props:{loraManager:{type:String,default:"look"}},setup(e,{expose:t}){const{t:n}=Kt(),o=S(!1),a=S(!1),s=S(!1),i=S(!1),l=S("all"),d=S(""),g=S(null),f=S(""),m=S(null),w=S(!1),b=S(""),T=S(100),E=S(0),I=S(),P=S(!1),N=S(!1),pe=S(),D=S(localStorage.getItem("weilin_prompt_ui_showHoverInfo")),V=S(localStorage.getItem("weilin_prompt_ui_clickAddTag"));(D.value===null||D.value===void 0||D.value==="")&&(localStorage.setItem("weilin_prompt_ui_showHoverInfo",!0),D.value=!0),(V.value===null||V.value===void 0||V.value==="")&&(localStorage.setItem("weilin_prompt_ui_clickAddTag",!1),V.value=!1);const fe=e;St(D,k=>{localStorage.setItem("weilin_prompt_ui_showHoverInfo",k)}),St(V,k=>{localStorage.setItem("weilin_prompt_ui_clickAddTag",k)});const O=S(1),se=S(50),le=$t(()=>{if(l.value==="all"){const H=J.value;if(H){const Q=Object.values(H);return Math.ceil(Q.length/se.value)}return 1}const k=J.value[d.value];if(k){const H=k.all||Object.keys(k).filter(Q=>Q!=="all").map(Q=>k[Q]);return Math.ceil(H.length/se.value)}return 1}),Pe=()=>{P.value=!0,N.value=!0},Ie=(k,H)=>{if(!D.value||D.value==="false"||(N.value=!0,b.value===k&&w.value))return;const Ne=H.currentTarget.getBoundingClientRect(),De=window.innerHeight,ge=450,Ee={left:Ne.left+(Ne.width-ge)/2,top:Ne.top+Ne.height+10};Ee.top+310>De&&(Ee.top=Ne.top-310),Ee.left=Math.max(10,Math.min(Ee.left,window.innerWidth-ge-10)),Ee.top=Math.max(10,Math.min(Ee.top,De-310)),T.value=Ee.left,E.value=Ee.top,w.value=!0,b.value=k,yt(()=>{pe.value.refresh()})},ue=()=>{N.value=!1,setTimeout(()=>{!P.value&&!N.value&&(w.value=!1,b.value="",P.value=!1)},200)},we=()=>{w.value=!1,b.value="",P.value=!1},ne=S([]),J=S([]),ie=S(""),X=S(0),ee=(k,H)=>{X.value=k,ie.value=H},$e=async()=>{try{const k=await _o.getLoraFolderList();ne.value=k.data}catch(k){console.error("Failed to get folder list:",k),de({type:"error",str:"message.loadFailed"})}},ve=()=>{if(!m.value||s.value||i.value)return;const k=m.value;k.scrollHeight-k.scrollTop-k.clientHeight<100&&ce()},Z=S(!1);let te=null;const be=()=>{te&&clearTimeout(te),te=setTimeout(()=>{f.value.length>0?(Z.value=!0,j()):(Z.value=!1,W())},300)},Te=k=>{var H;return(H=k.local_info)!=null&&H.name&&k.local_info.name!==""&&k.local_info.name.length>0?k.local_info.name:k.name},he=S(),re=k=>{fe.loraManager==="addLora"?Le(k):fe.loraManager==="prompt_inner"&&V.value?z(k):he.value.open(k)},j=async()=>{try{const k=await _o.searchLoraGetFolderList(f.value);if(J.value=k.data,J.value.length>0){O.value=1;const H=Object.values(J.value),Q=(O.value-1)*50,Ne=Q+50,De=H.slice(Q,Ne);Y(De)}}catch(k){console.error("Failed to get folder list:",k),de({type:"error",str:"message.loadFailed"})}},oe=S([]),B=k=>{if(k==="all"){oe.value=[],l.value=k,d.value="/",J.value=ne.value[k];const H=J.value;if(H){i.value=!1,O.value=1;const Q=Object.values(H),Ne=(O.value-1)*50,De=Ne+50,ge=Q.slice(Ne,De);Y(ge)}}else{oe.value=[],l.value=k,d.value="/",J.value=ne.value[k];const H=J.value["/"];if(H){i.value=!1,O.value=1;const Q=Object.values(H),Ne=(O.value-1)*50,De=Ne+50,ge=Q.slice(Ne,De);Y(ge)}}},q=k=>{if(k!==d.value){d.value=k,oe.value=[];const H=J.value[d.value];if(H){i.value=!1,O.value=1;const Q=H.all||Object.keys(H).filter(Ee=>Ee!=="all").map(Ee=>H[Ee]),Ne=(O.value-1)*50,De=Ne+50,ge=Q.slice(Ne,De);Y(ge)}}},Y=async k=>{const H=await _o.getLoraRangeList(k);O.value===1?oe.value=H.data.loras:oe.value=oe.value.concat(H.data.loras)},$=async()=>{if(g.value!==null){de({type:"warn",str:"message.isLoading"});return}try{de({type:"success",str:"message.isLoadingPleaseWait"}),await _o.getAllLoraList(),g.value=setInterval(async()=>{await A()},1e3)}catch(k){console.error("Failed to get all lora list:",k),de({type:"error",str:"message.loadFailed"})}},A=async()=>{try{const k=await _o.getAllLoraStatus();k.data.isLoading===!1?(clearInterval(g.value),g.value=null,de({type:"success",str:"message.loaddingSuccess"}),await W()):de({type:"warn",str:"message.loaddingPrc",name:k.data.progress})}catch(k){console.error("Failed to get lora status:",k),clearInterval(g.value),g.value=null,de({type:"error",str:"message.loadFailed"})}},W=async()=>{if(!o.value){o.value=!0,O.value=1,i.value=!1,s.value=!1;try{await $e(),yt(()=>{B("all")})}catch(k){console.error("Failed to refresh lora list:",k)}finally{o.value=!1}}},ce=()=>{if(O.value>=le.value){i.value=!0;return}s.value=!0;try{if(O.value++,Z.value){if(J.value.length>0){const k=Object.values(J.value),H=(O.value-1)*50,Q=H+50,Ne=k.slice(H,Q);Y(Ne)}}else if(l.value==="all"){J.value=ne.value[l.value];const k=J.value;if(k){const H=Object.values(k),Q=(O.value-1)*50,Ne=Q+50,De=H.slice(Q,Ne);Y(De)}}else{const k=J.value[d.value];if(k){const H=k.all||Object.keys(k).filter(ge=>ge!=="all").map(ge=>k[ge]),Q=(O.value-1)*50,Ne=Q+50,De=H.slice(Q,Ne);Y(De)}}}finally{s.value=!1}},Ce=()=>{O.value=1,i.value=!1,s.value=!1};St([l,d,f],()=>{Ce()}),Dt(()=>{W()});const Le=k=>{var H,Q,Ne,De,ge,Ee,Ke,et,ut,ft,at,rn,Rt,An,Tn;X.value===0?window.postMessage({type:"weilin_prompt_ui_selectLora",lora:{name:k.model_name,display_name:Te(k),lora:k.name,weight:(H=k.local_info)!=null&&H.strengthMin?k.local_info.strengthMin:1,text_encoder_weight:(Q=k.local_info)!=null&&Q.strWeight?k.local_info.strWeight:1,trigger_weight:(Ne=k.local_info)!=null&&Ne.triggerWeight?k.local_info.triggerWeight:(De=k.local_info)!=null&&De.strWeight?k.local_info.strWeight:1,loraWorks:(ge=k.local_info)!=null&&ge.loraWorks?k.local_info.loraWorks:""}},"*"):X.value===1?window.postMessage({type:`weilin_prompt_ui_selectLora_stack_${ie.value}`,lora:{name:k.model_name,display_name:Te(k),lora:k.name,weight:(Ee=k.local_info)!=null&&Ee.strengthMin?k.local_info.strengthMin:1,text_encoder_weight:(Ke=k.local_info)!=null&&Ke.strWeight?k.local_info.strWeight:1,trigger_weight:(et=k.local_info)!=null&&et.triggerWeight?k.local_info.triggerWeight:(ut=k.local_info)!=null&&ut.strWeight?k.local_info.strWeight:1,loraWorks:(ft=k.local_info)!=null&&ft.loraWorks?k.local_info.loraWorks:""}},"*"):X.value===2&&window.postMessage({type:`weilin_prompt_ui_selectLora_stack_node_${ie.value}`,lora:{name:k.model_name,display_name:Te(k),lora:k.name,weight:(at=k.local_info)!=null&&at.strengthMin?k.local_info.strengthMin:1,text_encoder_weight:(rn=k.local_info)!=null&&rn.strWeight?k.local_info.strWeight:1,trigger_weight:(Rt=k.local_info)!=null&&Rt.triggerWeight?k.local_info.triggerWeight:(An=k.local_info)!=null&&An.strWeight?k.local_info.strWeight:1,loraWorks:(Tn=k.local_info)!=null&&Tn.loraWorks?k.local_info.loraWorks:""}},"*")},z=k=>{var Ee,Ke,et;const H=k.model_name,Q=(Ee=k.local_info)!=null&&Ee.strengthMin?k.local_info.strengthMin:1,Ne=(Ke=k.local_info)!=null&&Ke.strWeight?k.local_info.strWeight:1,De=(et=k.local_info)!=null&&et.triggerWeight?k.local_info.triggerWeight:Ne,ge=`<wlr:${H}:${Q}:${Ne}:${De}>`;window.postMessage({type:"weilin_prompt_ui_add_lora_tag",tag:ge},"*")};return t({openSetSeed:ee}),(k,H)=>(C(),L("div",{class:Ve(`${Sn}lora-manager`)},[r("div",Vk,[xe(r("input",{"onUpdate:modelValue":H[0]||(H[0]=Q=>f.value=Q),class:Ve(`${Sn}search-input`),placeholder:h(n)("loraManager.searchPlaceholder"),onInput:be},null,42,Wk),[[ze,f.value]]),r("button",{class:Ve(`${Sn}refresh-btn`),onClick:W,title:h(n)("loraManager.refresh")},[(C(),L("svg",{class:Ve([`${Sn}refresh-icon`,{"is-rotating":o.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},[...H[3]||(H[3]=[r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},null,-1)])],2))],10,Hk),r("button",{style:{"margin-left":"10px"},class:Ve(`${Sn}refresh-btn`),onClick:$,title:h(n)("loraManager.cacheAll")},[(C(),L("svg",{class:Ve([`${Sn}refresh-icon`,{"is-rotating":o.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},[...H[4]||(H[4]=[r("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"},null,-1)])],2))],10,jk),r("div",Gk,[r("label",{class:Ve(`${Sn}checkbox-label`)},[xe(r("input",{type:"checkbox","onUpdate:modelValue":H[1]||(H[1]=Q=>D.value=Q),class:Ve(`${Sn}checkbox`)},null,2),[[on,D.value]]),H[5]||(H[5]=r("span",null,"悬浮信息",-1))],2),e.loraManager=="prompt_inner"?(C(),L("label",{key:0,class:Ve(`${Sn}checkbox-label`)},[xe(r("input",{type:"checkbox","onUpdate:modelValue":H[2]||(H[2]=Q=>V.value=Q),class:Ve(`${Sn}checkbox`)},null,2),[[on,V.value]]),H[6]||(H[6]=r("span",null,"点击添加Tag",-1))],2)):Ae("",!0)])]),Z.value?Ae("",!0):(C(),L("div",{key:0,class:Ve(`${Sn}category-nav`)},[(C(!0),L(qe,null,ot(Object.keys(ne.value),Q=>(C(),L("button",{key:Q,class:Ve([`${Sn}category-btn`,{active:l.value===Q}]),onClick:Ne=>B(Q)},y(Q==="/"?h(n)("loraManager.root"):Q=="all"?h(n)("loraManager.all"):Q),11,qk))),128))],2)),l.value!="all"&&!Z.value?(C(),L("div",{key:1,class:Ve(`${Sn}subcategory-nav`)},[(C(!0),L(qe,null,ot(Object.keys(J.value),Q=>(C(),L("button",{key:Q,class:Ve([`${Sn}category-btn`,{active:d.value===Q}]),onClick:Ne=>q(Q)},y(Q==="/"?h(n)("loraManager.root"):Q=="all"?h(n)("loraManager.all"):Q),11,Yk))),128))],2)):Ae("",!0),r("div",{class:Ve(`${Sn}lora-list-container`),ref_key:"scrollContainer",ref:m,onScroll:ve},[a.value&&!s.value?(C(),L("div",Kk,y(h(n)("loraManager.loading")),1)):oe.value.length===0?(C(),L("div",Jk,y(h(n)("loraManager.noResults")),1)):Ae("",!0),r("div",{class:Ve(`${Sn}lora-list`),style:{display:"grid","grid-template-columns":"repeat(auto-fill, minmax(150px, 1fr))",gap:"12px"}},[(C(!0),L(qe,null,ot(oe.value,Q=>(C(),L("div",{key:Q.file_path,class:Ve(`${Sn}lora-card`),ref_for:!0,ref_key:"loraCardRef",ref:I,onClick:Ne=>re(Q),onMouseover:Ne=>Ie(Q.name,Ne),onMouseleave:ue,style:{display:"flex","flex-direction":"column","min-height":"200px",cursor:"pointer"}},[r("div",{class:Ve(`${Sn}lora-preview`),style:{flex:"1",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden",width:"100%"}},[Q.preview?(C(),L("img",{key:0,src:Q.preview,alt:Q.model_name,title:Q.model_name,loading:"lazy",style:{width:"100%",height:"100%","object-fit":"contain","min-height":"150px"}},null,8,Qk)):(C(),L("div",{key:1,class:Ve(`${Sn}no-preview`),style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","min-height":"150px"}},[...H[7]||(H[7]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[r("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"})],-1)])],2))],2),r("div",{class:Ve(`${Sn}lora-name`),style:{padding:"8px","text-align":"center","word-break":"break-word","white-space":"normal",display:"-webkit-box","-webkit-line-clamp":"2","line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden","min-height":"40px","max-height":"40px","line-height":"20px","text-overflow":"ellipsis"}},y(Te(Q)),3)],42,Xk))),128))],2),r("div",null,[s.value?(C(),L("div",Zk,y(h(n)("loraManager.loadingMore")),1)):Ae("",!0),!s.value&&i.value?(C(),L("div",eC,y(h(n)("loraManager.noMoreData")),1)):Ae("",!0)])],34),st(Pl,{ref_key:"loraDetailRef",ref:he},null,512),w.value?(C(),Zt(Wc,{key:2,ref_key:"loraCardItem",ref:pe,fileNmae:b.value,paddingLeft:T.value,paddingTop:E.value,onCardLeave:we,onCardenter:Pe},null,8,["fileNmae","paddingLeft","paddingTop"])):Ae("",!0)],2))}},[["__scopeId","data-v-61a57bab"]]),tC={class:"tag-manager"},nC={class:"selected-categories-container"},oC={class:"selected-categories-header"},aC={class:"selected-categories-content"},sC={key:0,class:"selected-category-section"},rC={class:"section-title"},iC={class:"selected-items"},lC={class:"category-name"},uC=["onClick"],cC={key:1,class:"selected-category-section"},dC={class:"section-title"},pC={class:"selected-items"},fC={class:"category-name"},gC={class:"subcategory-name"},mC=["onClick"],vC={key:2,class:"no-selected"},hC={class:"category-tabs"},_C={class:"tabs-wrapper primary-tabs"},yC={class:"tabs-scroll"},bC=["onClick"],wC={class:"tab-text"},xC=["onClick","title"],SC={key:0,class:"tabs-wrapper group-tabs"},TC={class:"tabs-scroll"},kC=["onClick"],CC={class:"tab-text"},EC=["onClick","disabled","title"],$C=Vt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=n,s=S([]),i=S(null),l=S(null),d=S([]),g=S(!1),f=S([]),m=S(!1),w=S(0),b=$t(()=>f.value.filter(we=>!we.sub)),T=$t(()=>f.value.filter(we=>we.sub)),E=we=>f.value.findIndex(ne=>ne.group.p_uuid===we.group.p_uuid&&!ne.sub),I=we=>f.value.findIndex(ne=>ne.group.p_uuid===we.group.p_uuid&&ne.sub&&ne.sub.g_uuid===we.sub.g_uuid),P=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},N=async()=>{try{const we=await Pt.getTagsGroupList();if(s.value=we.info,l.value){const ne=s.value.flatMap(J=>J.groups).find(J=>J.p_uuid===l.value.p_uuid);ne?l.value=ne:l.value=null}if(i.value){const ne=s.value.find(J=>J.p_uuid===i.value.p_uuid);ne?i.value=ne:i.value=null}}catch(we){console.error("获取标签列表失败:",we)}},pe=we=>{if(!we||we==="transparent")return"var(--primary-text)";let ne,J,ie,X=1;if(we.startsWith("rgba")){const $e=we.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);$e&&([,ne,J,ie,X]=$e.map(Number))}else if(we.startsWith("rgb")){const $e=we.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);$e&&([,ne,J,ie]=$e.map(Number))}return X<.5?"var(--primary-text)":(ne*299+J*587+ie*114)/1e3>128?"#000000":"#ffffff"};Dt(()=>{window.addEventListener("message",Ie)}),Ba(()=>{window.removeEventListener("message",Ie)});const D=we=>{i.value=we,l.value=null,g.value=!1,d.value=[]},V=we=>{fe(i.value)||(l.value=we,g.value=!1,d.value=[])},fe=we=>we?f.value.some(ne=>ne.group.p_uuid===we.p_uuid&&!ne.sub):!1,O=we=>{const ne=f.value.findIndex(J=>J.group.p_uuid===we.p_uuid&&!J.sub);ne!==-1?f.value.splice(ne,1):(f.value=f.value.filter(J=>J.group.p_uuid!==we.p_uuid),f.value.push({group:{p_uuid:we.p_uuid,name:we.name},sub:null}))},se=(we,ne)=>{if(fe(we))return;const J=f.value.findIndex(ie=>ie.group.p_uuid===we.p_uuid&&ie.sub&&ie.sub.g_uuid===ne.g_uuid);if(J!==-1)f.value.splice(J,1);else{const ie=f.value.findIndex(X=>X.group.p_uuid===we.p_uuid&&!X.sub);ie!==-1&&f.value.splice(ie,1),f.value.push({group:{p_uuid:we.p_uuid,name:we.name},sub:ne?{g_uuid:ne.g_uuid,name:ne.name}:null})}},le=we=>{f.value.splice(we,1)},Pe=()=>{f.value=[]},Ie=we=>{!we.data||!we.data.type||we.data.type.startsWith("weilin_prompt_ui_")&&we.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&N()},ue=()=>{if(f.value.length===0){de({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{data:f.value,index:w.value}),m.value=!1};return t({open:(we,ne)=>{P(),w.value=we,f.value=ne,m.value=!0}}),(we,ne)=>(C(),Zt(Qs,{modelValue:m.value,"onUpdate:modelValue":ne[1]||(ne[1]=J=>m.value=J),title:h(o)("importDialog.selectTitle")},{footer:Ut(()=>[r("button",{onClick:ne[0]||(ne[0]=J=>m.value=!1)},y(h(o)("promptBox.settings.close")),1),r("button",{onClick:ue},y(h(o)("importDialog.sureSelect")),1)]),default:Ut(()=>[r("div",tC,[r("div",nC,[r("div",oC,[r("span",null,y(h(o)("importDialog.selectedCategories")),1),f.value.length>0?(C(),L("button",{key:0,class:"clear-all-btn",onClick:Pe},y(h(o)("importDialog.clearAll")),1)):Ae("",!0)]),r("div",aC,[b.value.length>0?(C(),L("div",sC,[r("div",rC,y(h(o)("importDialog.primaryCategories")),1),r("div",iC,[(C(!0),L(qe,null,ot(b.value,(J,ie)=>(C(),L("div",{key:"primary-"+ie,class:"selected-item"},[r("span",lC,y(J.group.name),1),r("button",{class:"remove-selected-btn",onClick:X=>le(E(J))}," × ",8,uC)]))),128))])])):Ae("",!0),T.value.length>0?(C(),L("div",cC,[r("div",dC,y(h(o)("importDialog.subCategories")),1),r("div",pC,[(C(!0),L(qe,null,ot(T.value,(J,ie)=>(C(),L("div",{key:"sub-"+ie,class:"selected-item"},[r("span",fC,y(J.group.name),1),ne[2]||(ne[2]=r("span",{class:"separator"},">",-1)),r("span",gC,y(J.sub.name),1),r("button",{class:"remove-selected-btn",onClick:X=>le(I(J))}," × ",8,mC)]))),128))])])):Ae("",!0),f.value.length===0?(C(),L("div",vC,y(h(o)("importDialog.noSelectedCategories")),1)):Ae("",!0)])]),r("div",hC,[r("div",_C,[r("div",yC,[(C(!0),L(qe,null,ot(s.value,(J,ie)=>{var X,ee,$e;return C(),L("div",{key:"Tabss-"+ie,class:Ve(["tab-item",{active:((X=i.value)==null?void 0:X.p_uuid)===J.p_uuid}]),style:Ft({backgroundColor:((ee=i.value)==null?void 0:ee.p_uuid)===J.p_uuid?"var(--weilin-prompt-ui-primary-bg)":J.color,color:(($e=i.value)==null?void 0:$e.p_uuid)===J.p_uuid?"var(--weilin-prompt-ui-primary-text)":pe(J.color)}),onClick:ve=>D(J)},[r("span",wC,y(J.name),1),r("button",{class:"select-tab-btn",onClick:vt(ve=>O(J),["stop"]),title:h(o)("importDialog.selectCategory")},[...ne[3]||(ne[3]=[r("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[r("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)])],8,xC)],14,bC)}),128))])]),i.value?(C(),L("div",SC,[r("div",TC,[(C(!0),L(qe,null,ot(i.value.groups,(J,ie)=>{var X,ee,$e;return C(),L("div",{key:"TabsSw-"+ie,class:Ve(["tab-item",{active:((X=l.value)==null?void 0:X.g_uuid)===J.g_uuid,disabled:fe(i.value)}]),style:Ft({backgroundColor:((ee=l.value)==null?void 0:ee.g_uuid)===J.g_uuid?"var(--weilin-prompt-ui-primary-bg)":J.color,color:(($e=l.value)==null?void 0:$e.g_uuid)===J.g_uuid?"var(--weilin-prompt-ui-primary-text)":pe(J.color),opacity:fe(i.value)?"0.5":"1",cursor:fe(i.value)?"not-allowed":"pointer"}),onClick:ve=>fe(i.value)?null:V(J)},[r("span",CC,y(J.name),1),fe(i.value)?Ae("",!0):(C(),L("button",{key:0,class:"select-tab-btn",onClick:vt(ve=>se(i.value,J),["stop"]),disabled:fe(i.value),title:h(o)("importDialog.selectSubcategory")},[...ne[4]||(ne[4]=[r("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[r("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)])],8,EC))],14,kC)}),128))])])):Ae("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-e6f4f475"]]),Yn={getTemplateList:()=>Ye({url:"/random_template/get_template_list",method:"post"}),getTemplateData:e=>Ye({url:"/random_template/get_template_data",method:"post",data:{name:e}}),saveTemplateData:e=>Ye({url:"/random_template/save_template",method:"post",data:{data:e}}),updateTemplateData:(e,t)=>Ye({url:"/random_template/update_template",method:"post",data:{name:e,data:t}}),deleteTemplateData:e=>Ye({url:"/random_template/delete_template",method:"post",data:{name:e}}),getRandomTemplateApple:()=>Ye({url:"/get/setting/get_random_template_setting",method:"post"}),updateRandomTemplateApple:e=>Ye({url:"/update/setting/update_random_template_setting",method:"post",data:{path:e}}),goRandomTemplate:()=>Ye({url:"/random_template/go_random_template",method:"post"}),goRandomTemplatePath:e=>Ye({url:"/random_template/go_random_template_path",method:"post",data:{name:e}})},AC={class:"random-rule-container"},LC={class:"settings-section template-section"},IC={class:"section-header"},MC={class:"template-controls"},OC={class:"template-select-group"},DC={class:"template-select-with-apply"},PC={value:""},RC=["value"],NC=["disabled"],FC={class:"template-bottom-buttons"},BC=["disabled"],UC=["disabled"],zC={key:0,class:"template-name-input"},VC=["placeholder"],WC={class:"template-actions"},HC={key:0},jC={class:"settings-section"},GC={class:"section-header"},qC={class:"rules-reminder"},YC={class:"rules-list"},KC={class:"rule-header"},JC=["onClick"],XC={class:"rule-content"},QC={class:"form-group"},ZC={class:"range-inputs"},eE=["onUpdate:modelValue"],tE=["onUpdate:modelValue"],nE={class:"form-group"},oE=["onUpdate:modelValue"],aE={value:"category"},sE={value:"specific"},rE={key:0,class:"form-group"},iE={class:"selected-categories-container"},lE={class:"selected-categories-header"},uE={class:"selected-categories-content"},cE={key:0,class:"selected-category-section"},dE={class:"section-title"},pE={class:"selected-items"},fE={class:"category-name"},gE={key:1,class:"selected-category-section"},mE={class:"section-title"},vE={class:"selected-items"},hE={class:"category-name"},_E={class:"subcategory-name"},yE={key:2,class:"no-selected"},bE=["onClick"],wE={key:1,class:"form-group"},xE={class:"tags-input-container"},SE=["onClick"],TE=["onUpdate:modelValue","onKeydown","placeholder"],kE=["onClick"],CE={class:"actions-section"},EE=["disabled"],Rv="weilin_tools_",$E=Vt({__name:"random_setting",emits:["close","update","generateRandomTags"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(!1),s=S(null),i=S(!1),l=S(""),d=S(""),g={randomRuleSetting:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},f={file_name:"new_random_template",rules:[{range:{min:1,max:3},type:"category",categoryId:1,specificTags:[],tagGroupList:[],tagInput:""},{range:{min:4,max:6},type:"category",categoryId:2,specificTags:[],tagGroupList:[],tagInput:""}]},m=S({});async function w(){try{l.value==="prompt_global"?await Yn.getRandomTemplateApple().then(B=>{B.data===""?m.value=f:Yn.getTemplateData(B.data).then(q=>{J.value=B.data,m.value=q.data,i.value=!0}).catch(q=>{console.error("加载模板失败:",q),de({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(B=>{console.error(B),de({type:"warn",str:"message.networkError"})}):d.value===""?m.value=f:Yn.getTemplateData(d.value).then(B=>{J.value=d.value,m.value=B.data,i.value=!0}).catch(B=>{console.error("加载模板失败:",B),de({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(B){de({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",B)}}function b(){try{const B=JSON.parse(JSON.stringify(m.value));B.rules&&B.rules.forEach(q=>{delete q.tagInput}),Yn.updateTemplateData(J.value,B).then(q=>{Yn.getTemplateData(q.path_name).then(Y=>{m.value=Y.data,de({type:"success",str:"randomUtils.templateSaved"})}).catch(Y=>{console.error("加载模板失败:",Y),de({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(q=>{console.error("更新模板失败:",q),de({type:"warn",str:"randomUtils.errorSavingTemplate"})})}catch(B){console.error("Error saving random tag settings:",B),de({type:"warn",str:"randomUtils.errorSavingSettings"})}}function T(){m.value.rules.push({range:{min:m.value.rules.length>0?m.value.rules[m.value.rules.length-1].range.max+1:1,max:m.value.rules.length>0?m.value.rules[m.value.rules.length-1].range.max+3:3},type:"category",categoryId:1,specificTags:[],tagGroupList:[],tagInput:""})}function E(B){m.value.rules.splice(B,1)}function I(B){B.tagInput&&B.tagInput.trim()&&(B.specificTags.push(B.tagInput.trim()),B.tagInput="")}function P(B,q){B.specificTags.splice(q,1)}function N(){}const D=S((()=>{try{const B=localStorage.getItem(`${Rv}randomRuleSettingState`);if(B){const q=JSON.parse(B),Y={...g};return q.randomRuleSetting&&(Y.randomRuleSetting={...g.randomRuleSetting,...q.randomRuleSetting}),Y}}catch(B){console.error("Error loading window states:",B)}return{...g}})());St(D,B=>{try{localStorage.setItem(`${Rv}randomRuleSettingState`,JSON.stringify(B))}catch(q){console.error("Error saving window states:",q)}},{deep:!0});const V=()=>{a.value=!1},fe=(B,q)=>{D.value[B]&&(D.value[B].position={...q})},O=(B,q)=>{D.value[B]&&(D.value[B].size={...q})},se=B=>{a.value=!0,l.value=B,rt.registerWindow("randomRuleSetting"),yt(()=>{rt.setActiveWindow("randomRuleSetting"),B==="prompt_global"?$e(1):j()})},le=(B,q)=>{s.value.open(B,q)},Pe=()=>void 0,Ie=B=>!B||!Array.isArray(B)||B.length<=0?[]:B.filter(q=>!q.sub),ue=B=>!B||!Array.isArray(B)||B.length<=0?[]:B.filter(q=>q.sub),we=B=>{B&&B.data&&Array.isArray(B.data)?m.value.rules[B.index].tagGroupList=B.data:m.value.rules[B.index].tagGroupList=[]},ne=S([]),J=S(""),ie=S(""),X=S(!1),ee=S(!1);async function $e(B=0){try{await Yn.getTemplateList().then(q=>{ne.value=q.data,B===1&&w()}).catch(q=>{console.error(q),de({type:"warn",str:"message.networkError"})})}catch(q){de({type:"warn",str:"message.networkError"}),console.error("RandomTemplate获取列表失败:",q)}}function ve(){X.value=!0,ie.value=""}function Z(){X.value=!1,ie.value=""}function te(){if(!J.value){de.warm(o("randomUtils.pleaseChooseTemplate"));return}l.value==="prompt_global"?Yn.updateRandomTemplateApple(J.value).then(()=>{de({type:"success",str:"randomUtils.templateApplied"})}).catch(B=>{console.error("获取模板失败:",B),de({type:"warn",str:"randomUtils.errorApplyingTemplate"})}):(window.postMessage({type:"weilin_prompt_ui_prompt_inner_update_node_tag_template_id",data:J.value},"*"),de({type:"success",str:"randomUtils.templateApplied"}))}function be(){J.value&&Yn.deleteTemplateData(J.value).then(()=>{de({type:"success",str:"randomUtils.templateDeleted"}),$e(),J.value=""}).catch(B=>{console.error("删除模板失败:",B),de({type:"warn",str:"randomUtils.errorDeletingTemplate"})})}function Te(){if(!J.value)return;const B=ne.value.find(q=>q.path_name===J.value);B&&(X.value=!0,ie.value=B.file_name,ee.value=!0)}function he(){if(!ie.value.trim()){de({type:"warn",str:"randomUtils.templateNameRequired"});return}if(m.value.file_name=ie.value.trim(),ee.value){const B=ne.value.find(q=>q.path_name===J.value);if(B){B.file_name=ie.value.trim();const q=JSON.parse(JSON.stringify(m.value));q.rules&&q.rules.forEach(Y=>{delete Y.tagInput}),Yn.updateTemplateData(B.path_name,q).then(Y=>{de({type:"success",str:"randomUtils.templateSaved"}),$e().then(()=>{Yn.getTemplateData(Y.path_name).then($=>{J.value=Y.path_name,m.value=$.data,de({type:"success",str:"randomUtils.templateSaved"})}).catch($=>{console.error("加载模板失败:",$),de({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(Y=>{console.error("保存模板失败:",Y),de({type:"warn",str:"randomUtils.errorSavingTemplate"})})}}else{m.value=f,m.value.file_name=ie.value.trim();const B=JSON.parse(JSON.stringify(m.value));B.rules&&B.rules.forEach(q=>{delete q.tagInput}),Yn.saveTemplateData(B).then(q=>{$e().then(()=>{Yn.getTemplateData(q.path_name).then(Y=>{J.value=q.path_name,m.value=Y.data,de({type:"success",str:"randomUtils.templateSaved"})}).catch(Y=>{console.error("加载模板失败:",Y),de({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(q=>{console.error("保存模板失败:",q),de({type:"warn",str:"randomUtils.errorSavingTemplate"})})}X.value=!1,ie.value="",ee.value=!1}const re=B=>{if(B.target.value!=="")try{Yn.getTemplateData(B.target.value).then(q=>{J.value=q.path_name,m.value=q.data,i.value=!0}).catch(q=>{console.error("加载模板失败:",q),de({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(q){de({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",q)}},j=()=>{window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id"},"*")},oe=B=>{!B.data||!B.data.type||B.data.type.startsWith("weilin_prompt_ui_")&&B.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response"&&(d.value=B.data.data,$e(1))};return Dt(()=>{window.addEventListener("message",oe)}),go(()=>{rt.unregisterWindow("randomRuleSetting"),window.removeEventListener("message",oe)}),t({open:se,getRandomTags:Pe}),(B,q)=>(C(),L(qe,null,[a.value?(C(),Zt(ho,{key:0,title:h(o)("randomUtils.title"),position:D.value.randomRuleSetting.position,size:D.value.randomRuleSetting.size,"z-index":h(rt).getZIndex("randomRuleSetting"),"onUpdate:position":q[2]||(q[2]=Y=>fe("randomRuleSetting",Y)),"onUpdate:size":q[3]||(q[3]=Y=>O("randomRuleSetting",Y)),onActive:q[4]||(q[4]=Y=>h(rt).setActiveWindow("randomRuleSetting")),onClose:q[5]||(q[5]=Y=>V())},{default:Ut(()=>[r("div",AC,[r("div",LC,[r("div",IC,[r("h3",null,y(h(o)("randomUtils.ruleTemplates")),1)]),r("div",MC,[r("div",OC,[r("div",DC,[xe(r("select",{"onUpdate:modelValue":q[0]||(q[0]=Y=>J.value=Y),onChange:re,class:"form-select template-select"},[r("option",PC,y(h(o)("randomUtils.selectTemplate")),1),(C(!0),L(qe,null,ot(ne.value,(Y,$)=>(C(),L("option",{key:$,value:Y.path_name},y(Y.file_name),9,RC))),128))],544),[[an,J.value]]),r("button",{class:"apply-template-btn",onClick:te,disabled:!J.value},y(h(o)("randomUtils.applyTemplate")),9,NC)]),r("div",FC,[r("button",{class:"new-template-btn",onClick:ve},y(h(o)("randomUtils.newTemplate")),1),r("button",{class:"edit-template-btn",onClick:Te,disabled:!J.value},y(h(o)("randomUtils.editTemplate")),9,BC),r("button",{class:"delete-template-btn",onClick:be,disabled:!J.value},y(h(o)("randomUtils.deleteTemplate")),9,UC)])]),X.value?(C(),L("div",zC,[xe(r("input",{type:"text","onUpdate:modelValue":q[1]||(q[1]=Y=>ie.value=Y),class:"form-input",placeholder:h(o)("randomUtils.templateNamePlaceholder")},null,8,VC),[[ze,ie.value]]),r("div",WC,[r("button",{class:"save-template-btn",onClick:he},y(h(o)("randomUtils.save")),1),r("button",{class:"cancel-template-btn",onClick:Z},y(h(o)("randomUtils.cancel")),1)])])):Ae("",!0)])]),J.value&&i.value?(C(),L("div",HC,[r("div",jC,[r("div",GC,[r("h3",null,y(h(o)("randomUtils.rules")),1),r("button",{class:"add-rule-btn",onClick:T},[q[6]||(q[6]=r("span",null,"+",-1)),ct(" "+y(h(o)("randomUtils.addRule")),1)])]),r("div",qC,[r("p",null,y(h(o)("randomUtils.rulesReminder")),1)]),r("div",YC,[(C(!0),L(qe,null,ot(m.value.rules,(Y,$)=>(C(),L("div",{key:$,class:"rule-item"},[r("div",KC,[r("h4",null,y(h(o)("randomUtils.rule"))+" #"+y($+1),1),r("button",{class:"delete-rule-btn",onClick:A=>E($)},"×",8,JC)]),r("div",XC,[r("div",QC,[r("label",null,y(h(o)("randomUtils.range")),1),r("div",ZC,[xe(r("input",{type:"number","onUpdate:modelValue":A=>Y.range.min=A,min:"1",class:"form-input range-input"},null,8,eE),[[ze,Y.range.min,void 0,{number:!0}]]),q[7]||(q[7]=r("span",null,"-",-1)),xe(r("input",{type:"number","onUpdate:modelValue":A=>Y.range.max=A,min:"1",class:"form-input range-input"},null,8,tE),[[ze,Y.range.max,void 0,{number:!0}]])])]),r("div",nE,[r("label",null,y(h(o)("randomUtils.tagType")),1),xe(r("select",{"onUpdate:modelValue":A=>Y.type=A,class:"form-select"},[r("option",aE,y(h(o)("randomUtils.category")),1),r("option",sE,y(h(o)("randomUtils.specificTags")),1)],8,oE),[[an,Y.type]])]),Y.type==="category"?(C(),L("div",rE,[r("div",iE,[r("div",lE,[r("span",null,y(h(o)("importDialog.selectedCategories")),1)]),r("div",uE,[Ie(Y.tagGroupList).length>0?(C(),L("div",cE,[r("div",dE,y(h(o)("importDialog.primaryCategories")),1),r("div",pE,[(C(!0),L(qe,null,ot(Ie(Y.tagGroupList),(A,W)=>(C(),L("div",{key:"primary-"+W,class:"selected-item"},[r("span",fE,y(A.group.name),1)]))),128))])])):Ae("",!0),ue(Y.tagGroupList).length>0?(C(),L("div",gE,[r("div",mE,y(h(o)("importDialog.subCategories")),1),r("div",vE,[(C(!0),L(qe,null,ot(ue(Y.tagGroupList),(A,W)=>(C(),L("div",{key:"sub-"+W,class:"selected-item"},[r("span",hE,y(A.group.name),1),q[8]||(q[8]=r("span",{class:"separator"},">",-1)),r("span",_E,y(A.sub.name),1)]))),128))])])):Ae("",!0),!Y.tagGroupList||Y.tagGroupList.length===0?(C(),L("div",yE,y(h(o)("importDialog.noSelectedCategories")),1)):Ae("",!0)])]),r("button",{class:"add-tag-btn",onClick:A=>le($,Y.tagGroupList)},y(h(o)("randomUtils.selectTagGroup")),9,bE)])):Ae("",!0),Y.type==="specific"?(C(),L("div",wE,[r("label",null,y(h(o)("randomUtils.specificTags")),1),r("div",xE,[(C(!0),L(qe,null,ot(Y.specificTags,(A,W)=>(C(),L("div",{key:W,class:"tag-chip"},[ct(y(A)+" ",1),r("button",{class:"remove-tag-btn",onClick:ce=>P(Y,W)},"×",8,SE)]))),128)),xe(r("input",{type:"text","onUpdate:modelValue":A=>Y.tagInput=A,onKeydown:Nn(vt(A=>I(Y),["prevent"]),["enter"]),class:"tag-input",placeholder:h(o)("randomUtils.addTagPlaceholder")},null,40,TE),[[ze,Y.tagInput]])]),r("button",{class:"add-tag-btn",onClick:A=>I(Y)},y(h(o)("randomUtils.addTag")),9,kE)])):Ae("",!0)])]))),128))])])])):Ae("",!0)]),r("div",CE,[r("button",{class:"save-btn",onClick:b,disabled:!J.value},y(h(o)("common.save")),9,EE)])]),_:1},8,["title","position","size","z-index"])):Ae("",!0),st($C,{ref_key:"tagGroupSelectItem",ref:s,onSureSelect:we},null,512)],64))}},[["__scopeId","data-v-576f597a"]]);function ar(e){let t=e.length;for(;--t>=0;)e[t]=0}const AE=3,LE=258,Nv=29,IE=256+1+Nv,Fv=30,ME=512,OE=new Array((IE+2)*2);ar(OE);const DE=new Array(Fv*2);ar(DE);const PE=new Array(ME);ar(PE);const RE=new Array(LE-AE+1);ar(RE);const NE=new Array(Nv);ar(NE);const FE=new Array(Fv);ar(FE);try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const Hc=new Uint8Array(256);for(let e=0;e<256;e++)Hc[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Hc[254]=Hc[254]=1;const BE={class:"tag-manager"},UE={class:"form-group"},zE={class:"select-group-item"},VE=["value","placeholder"],WE={class:"form-group"},HE=["placeholder"],jE={class:"form-group"},GE=["placeholder"],qE={class:"form-group"},YE={class:"color-picker"},KE={class:"color-controls"},JE={class:"alpha-control"},XE={class:"alpha-value"},QE=Vt({__name:"favour",emits:["sureSelect"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(null),s=S(!1),i=S({text:"",desc:"",id_index:"",color:"rgba(255, 123, 2, .4)"}),l=S({group:{id_index:0,name:"",color:"",create_time:0,p_uuid:""},sub:{id_index:0,name:"",color:"",create_time:0,g_uuid:"",p_uuid:""}}),d=S({hex:"#ff7b02",alpha:40}),g=$t(()=>m(d.value.hex,d.value.alpha)),f=()=>{const I=m(d.value.hex,d.value.alpha);i.value.color=I},m=(I,P)=>{const N=parseInt(I.slice(1,3),16),pe=parseInt(I.slice(3,5),16),D=parseInt(I.slice(5,7),16);return`rgba(${N}, ${pe}, ${D}, ${P/100})`},w=()=>{a.value.open()},b=()=>{if(!i.value.text||!i.value.desc||!l.value.sub.id_index||!l.value.sub.g_uuid){de({type:"warn",str:"tagManager.textRequired"});return}Pt.addNewTags({id_index:l.value.sub.id_index,g_uuid:l.value.sub.g_uuid,text:i.value.text,desc:i.value.desc,color:i.value.color?i.value.color:"rgba(255, 123, 2, .4)"}).then(()=>{window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.addSuccess"}),T()}).catch(()=>{de({type:"warn",str:"message.networkError"})})},T=()=>{i.value={id_index:"",text:"",desc:"",color:"rgba(255, 123, 2, .4)"},s.value=!1},E=I=>{l.value=I,i.value.id_index=I.sub.id_index};return t({open:(I,P)=>{i.value={id_index:"",text:"",desc:"",color:"rgba(255, 123, 2, .4)"},i.value.text=I,i.value.desc=P,s.value=!0}}),(I,P)=>(C(),L(qe,null,[st(Qs,{modelValue:s.value,"onUpdate:modelValue":P[5]||(P[5]=N=>s.value=N),title:h(o)("tagManager.addTag")},{footer:Ut(()=>[r("button",{onClick:P[4]||(P[4]=N=>s.value=!1)},y(h(o)("common.cancel")),1),r("button",{onClick:b},y(h(o)("common.confirm")),1)]),default:Ut(()=>[r("div",BE,[r("div",UE,[r("label",null,y(h(o)("importDialog.selectGroup")),1),r("div",zE,[r("input",{type:"text",value:i.value.id_index!=""?l.value.group.name+" -> "+l.value.sub.name:"请选择分组",readonly:"",placeholder:h(o)("importDialog.selectGroup")},null,8,VE),r("button",{class:"add-tag-btn",style:{"margin-left":"10px","min-width":"fit-content"},onClick:w},y(h(o)("importDialog.selectGroup")),1)])]),r("div",WE,[r("label",null,y(h(o)("tagManager.text")),1),xe(r("input",{type:"text","onUpdate:modelValue":P[0]||(P[0]=N=>i.value.desc=N),placeholder:h(o)("tagManager.textPlaceholder")},null,8,HE),[[ze,i.value.desc]])]),r("div",jE,[r("label",null,y(h(o)("tagManager.description")),1),xe(r("textarea",{"onUpdate:modelValue":P[1]||(P[1]=N=>i.value.text=N),placeholder:h(o)("tagManager.descriptionPlaceholder"),rows:"4"}," ",8,GE),[[ze,i.value.text]])]),r("div",qE,[r("label",null,y(h(o)("tagManager.backgroundColor")),1),r("div",YE,[r("div",{class:"color-preview",style:Ft({backgroundColor:g.value})},null,4),r("div",KE,[xe(r("input",{type:"color","onUpdate:modelValue":P[2]||(P[2]=N=>d.value.hex=N),onInput:f,class:"color-input"},null,544),[[ze,d.value.hex]]),r("div",JE,[xe(r("input",{type:"range","onUpdate:modelValue":P[3]||(P[3]=N=>d.value.alpha=N),min:"0",max:"100",onInput:f,class:"alpha-slider"},null,544),[[ze,d.value.alpha,void 0,{number:!0}]]),r("span",XE,y(d.value.alpha)+"%",1)])])])])])]),_:1},8,["modelValue","title"]),st(Tm,{ref_key:"tagGroupSelectItem",ref:a,onSureSelect:E},null,512)],64))}},[["__scopeId","data-v-7f6ca984"]]),ZE={class:"weilin_prompt_ui_prompt-box"},e$={key:0,class:"weilin-toast",role:"status","aria-live":"polite"},t$={class:"center-container"},n$={class:"action-item"},o$=["title"],a$={class:"action-text"},s$={class:"action-item"},r$=["title"],i$={class:"action-text"},l$={class:"action-item"},u$={class:"action-text"},c$={class:"action-item"},d$=["title"],p$={class:"action-text"},f$={class:"action-item"},g$=["title"],m$={class:"action-text"},v$={class:"action-item"},h$=["title"],_$={class:"action-text"},y$={key:0,class:"action-item"},b$=["title"],w$={class:"action-text"},x$={class:"action-item"},S$=["title"],T$={class:"action-text"},k$={class:"action-item"},C$=["title"],E$={class:"action-text"},$$={class:"action-item"},A$=["title"],L$={class:"action-text"},I$={class:"action-item"},M$=["title"],O$={class:"action-text"},D$={class:"action-item"},P$=["title"],R$={class:"action-text"},N$={class:"action-item"},F$=["title"],B$={class:"action-text"},U$={class:"action-item"},z$=["title"],V$={class:"action-text"},W$={class:"action-item weilin-comfyui-toolbar-right"},H$=["disabled"],j$=["placeholder"],G$={class:"token-counter"},q$=["onClick"],Y$={class:"tag"},K$={class:"desc"},J$={class:"prompt-input-translate-area"},X$={style:{display:"flex","align-items":"center"}},Q$=["placeholder"],Z$=["title"],eA={style:{"margin-left":"5px"},class:"action-text"},tA=["title"],nA={class:"action-text"},oA=["title"],aA={class:"action-text"},sA=["title"],rA={class:"action-text"},iA=["title"],lA={class:"action-text"},uA=["title"],cA={class:"action-text"},dA={key:0,class:"tokens-container"},pA=["draggable","onDragstart","onDragover","onDrop","onDblclick"],fA={key:0,class:"newline-token"},gA=["title"],mA=["onMouseenter","onMouseleave"],vA=["title"],hA=["title","onMouseenter","onMouseleave"],_A={style:{"margin-left":"5px"}},yA=["onMouseenter","onMouseleave"],bA=["onClick"],wA=["value","onInput","onBlur","onKeyup"],xA=["onClick","title"],SA={key:4,class:"translation-result"},TA=["onClick","title"],kA={class:"translated-text"},CA={key:0,class:"line-break"},EA={class:"tag-tips-content"},$A=["innerHTML"],AA={key:0,class:"weight-control"},LA={class:"weight-label"},IA={key:1,class:"lora-weight-controls"},MA={class:"weight-control"},OA={class:"weight-label"},DA={class:"weight-control"},PA={class:"weight-label"},RA=["title"],NA=["title"],FA={key:2,class:"bracket-btn-group"},BA={class:"bracket-btn-container"},UA={class:"vertical-btn-group"},zA=["title"],VA=["title"],WA={class:"bracket-btn-container"},HA={class:"vertical-btn-group"},jA=["title"],GA=["title"],qA={class:"bracket-btn-container"},YA={class:"vertical-btn-group"},KA=["title"],JA=["title"],XA=["title"],QA={class:"tag-manager-section"},ZA={class:"weilin-comfyui-selection-actions-content"},eL={class:"weilin-comfyui-selection-actions-count"},tL={class:"header-left"},nL={class:"section-title"},oL={class:"header-right"},aL={class:"lora-manager-container"},sL={class:"tag-manager-section"},rL={class:"header-left"},iL={class:"section-title"},lL={class:"header-right"},uL={class:"tag-manager-container"},cL="weilin_prompt_ui_",gi="weilin-selection-box",dL=16,Bv="weilin_prompt_ui_sidebar_visible",pL="weilin_prompt_ui_main_labels_v1",fL=50,gL=Vt({__name:"prompt_index",props:{promptManager:{type:String,default:"prompt_global"},hasPromptLoraStack:{type:Boolean,default:!1}},setup(e,{expose:t}){const n=S(null),{t:o}=Kt(),a=S(),s=S(),i=S({top:0,left:0}),l=S(0),d=e,g=S(null),f=S(""),m=S([]),w={},b=S(null),T=S(!1),E=S({top:"0px",left:"0px"}),I=S(!1),P=S(null),N=S(null),pe=S(null),D=S([]),V=S(!1),fe=S(!1),O=S([]),se=S(0),le=S(null),Pe=S(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),Ie=S(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),ue=S(""),we=S(!1),ne=S({x:0,y:0}),J=S({x:0,y:0}),ie=S([]),X=S(null),ee=S(!1),$e=S(!1),ve=S(!1),Z=S({top:"0px",left:"0px"}),te=S(!1),be=S(!1),Te=S(0),he=S(!1),re=S({top:"0px",left:"0px"}),j=S(localStorage.getItem("weilin_prompt_ui_show_delete_button")!=="false"),oe=()=>{localStorage.setItem("weilin_prompt_ui_show_delete_button",String(j.value))},B=()=>{j.value=!j.value,oe()},q=U=>{U.key==="weilin_prompt_ui_show_delete_button"&&(j.value=U.newValue!=="false")};Dt(()=>{window.addEventListener("storage",q),window.addEventListener("storage",Ne)}),go(()=>{window.removeEventListener("storage",q),window.removeEventListener("storage",Ne)});const Y=S(null),$=S(null),A=S(""),W=S(0),ce=S(!0),Ce=S(localStorage.getItem("weilin_function_toggles_clearAll")!=="false"),Le=S(localStorage.getItem("weilin_function_toggles_deleteButton")!=="false"),z=S(localStorage.getItem("weilin_function_toggles_randomTag")!=="false"),k=S(localStorage.getItem("weilin_function_toggles_randomTagSettings")!=="false"),H=S(localStorage.getItem("weilin_function_toggles_translateTag")!=="false"),Q=S(localStorage.getItem("weilin_function_toggles_clearDisabled")!=="false");St([Ce,Le,z,k,H,Q],([U,R,ke,Oe,Qe,Me])=>{localStorage.setItem("weilin_function_toggles_clearAll",String(U)),localStorage.setItem("weilin_function_toggles_deleteButton",String(R)),localStorage.setItem("weilin_function_toggles_randomTag",String(ke)),localStorage.setItem("weilin_function_toggles_randomTagSettings",String(Oe)),localStorage.setItem("weilin_function_toggles_translateTag",String(Qe)),localStorage.setItem("weilin_function_toggles_clearDisabled",String(Me))});const Ne=U=>{U.key==="weilin_function_toggles_clearAll"?Ce.value=U.newValue!=="false":U.key==="weilin_function_toggles_deleteButton"?Le.value=U.newValue!=="false":U.key==="weilin_function_toggles_randomTag"?z.value=U.newValue!=="false":U.key==="weilin_function_toggles_randomTagSettings"?k.value=U.newValue!=="false":U.key==="weilin_function_toggles_translateTag"?H.value=U.newValue!=="false":U.key==="weilin_function_toggles_clearDisabled"&&(Q.value=U.newValue!=="false")},De=()=>{ce.value=!ce.value};St(ce,U=>{localStorage.setItem(Bv,String(U))}),Dt(()=>{const U=localStorage.getItem(Bv);ce.value=U!=="false"});const ge=()=>(W.value++,`token_${W.value}_${Date.now()}`),Ee=()=>{V.value=!V.value},Ke=()=>{V.value=!1},et=S(null),ut=S(null),ft=S(!1),at=`weilin_prompt_ui_last_main_label_id_${d.promptManager||"default"}`,rn=$t(()=>{const U=ce.value?280:0;return`calc(100% - ${(V.value?300:0)+U}px)`});let Rt=!1;const An=U=>{if(!U){ut.value=null,f.value="",yt(()=>{s.value&&(s.value.value="",Do({target:s.value}))}),ft.value=!1;return}ut.value=U.id,Rt=!0,f.value=U.content||"",yt(()=>{s.value&&(s.value.value=f.value,Do({target:s.value}))}),ft.value=!1};St(f,U=>{if(Rt){Rt=!1;return}ft.value=!0}),St(m,()=>{Rt||(ft.value=!0)},{deep:!0}),St(ut,U=>{try{localStorage.setItem(at,U||"")}catch{}});function Tn(){try{const U=localStorage.getItem(at);if(!U)return;const R=localStorage.getItem(pL),ke=R?JSON.parse(R):[],Oe=Array.isArray(ke)?ke.find(Qe=>Qe&&Qe.id===U):null;if(!Oe)return;ut.value=U,Rt=!0,f.value=Oe.content||"",yt(()=>{s.value&&(s.value.value=f.value,Do({target:s.value})),Rt=!1}),ft.value=!1}catch{}}Dt(()=>{Tn();const U=()=>{try{localStorage.setItem(at,ut.value||"")}catch{}};window.addEventListener("beforeunload",U),Ba(()=>window.removeEventListener("beforeunload",U))});function Xt(){var U;ut.value&&(U=et.value)!=null&&U.updateSelectedContent&&(et.value.updateSelectedContent(f.value),ft.value=!1,Jn())}const ln=S(!1);let Kn=null;function Jn(){ln.value=!0,Kn&&clearTimeout(Kn),Kn=setTimeout(()=>{ln.value=!1},1600)}Ba(()=>{Kn&&clearTimeout(Kn)});const gt=()=>{P.value.open()},Fe=S(1),Ue=()=>{if(b.value===null)return;let R=m.value[b.value].text;if(!lr(R)){de({type:"warn",str:"message.noFinishKuo"});return}const ke=He=>He.startsWith("(")&&He.endsWith(")")&&!He.slice(1,-1).includes("(")&&!He.slice(1,-1).includes(")")&&!He.slice(1,-1).includes("[")&&!He.slice(1,-1).includes("]")&&!He.slice(1,-1).includes("{")&&!He.slice(1,-1).includes("}")&&!He.slice(1,-1).includes("<")&&!He.slice(1,-1).includes(">");let Oe=R;const Qe=/:(-?\d+(\.\d+)?)$/.test(R),Me=R.match(/^\((.*?):(-?\d+(\.\d+)?)\)$/);if(Qe||Me)Fe.value===1?R.startsWith("(")&&R.endsWith(")")?Oe=R.slice(1,-1).replace(/:(\d+(\.\d+)?)$/,""):Oe=R.replace(/:(\d+(\.\d+)?)$/,""):Me?Oe=`(${Me[1]}:${Fe.value})`:Oe=R.replace(/:(-?\d+(\.\d+)?)$/,`:${Fe.value}`);else{const He=R.match(/^([^_]+)_(\([^)]+\))$/);if(He&&!R.includes("\\(")&&!R.includes("\\)")){const[,Je,ht]=He;Fe.value===1?Oe=R:Oe=`(${Je} ${ht}:${Fe.value})`}else R.includes("\\(")&&R.includes("\\)")&&!/[\(\)\[\]\{\}<>]/.test(R.replace(/\\[\(\)\[\]\{\}<>]/g,""))?Fe.value===1?Oe=R:R.startsWith("(")&&R.endsWith(")")?Oe=R.replace(/\)$/,`:${Fe.value})`):Oe=`(${R}:${Fe.value})`:/[\(\[\{\<\)\]\}\>]/.test(R)?Fe.value===1&&ke(R)?Oe=R.slice(1,-1):Fe.value===1?Oe=R:R.startsWith("(")&&R.endsWith(")")?Oe=R.replace(/\)$/,`:${Fe.value})`):Oe=`(${R}:${Fe.value})`:Fe.value===1?Oe=R:Oe=`(${R}:${Fe.value})`}m.value[b.value].text=Oe,Vn()},Lt=S(.5),Qt=S(.5);St(b,U=>{var R;if(U!==null&&((R=m.value[U])!=null&&R.isLoraTag)){const Oe=m.value[U].text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);Oe&&(Lt.value=parseFloat(Oe[2]),Qt.value=parseFloat(Oe[3]))}});const Qa=()=>{var U;if(b.value!==null&&((U=m.value[b.value])!=null&&U.isLoraTag)){const R=m.value[b.value],ke=R.text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);if(ke){const Qe=`<wlr:${ke[1]}:${Lt.value}:${Qt.value}>`;R.text=Qe,Vn()}}},Ia=U=>{if(b.value===null)return;let ke=m.value[b.value].text;const Oe={"(":")","[":"]","{":"}","<":">"}[U];ke=`${U}${ke}${Oe}`,m.value[b.value].text=ke,Xn()},Za=U=>{if(b.value===null)return;let ke=m.value[b.value].text;const Oe={"(":")","[":"]","{":"}","<":">"};ke.startsWith(U)&&ke.endsWith(Oe[U])&&(ke=ke.slice(1,-1),m.value[b.value].text=ke,Xn())},lr=U=>{const R=[],ke={"(":")","[":"]","{":"}","<":">"};for(let Oe of U)if(ke[Oe])R.push(Oe);else if(Object.values(ke).includes(Oe)&&(R.length===0||ke[R.pop()]!==Oe))return!1;return R.length===0};ip(()=>{for(const U in w)delete w[U]});const mi=U=>/[\p{L}]/u.test(U),es=U=>{const R=U.match(/([^:]+):[\d.]+/);return R?R[1]:U};let ta=null;const ur=async()=>{ta&&clearTimeout(ta),ta=setTimeout(async()=>{if(!s.value)return;const U=s.value,R=U.selectionStart;await yt();const ke=U.value.substring(0,R),Oe=document.createElement("div");Oe.style.position="absolute",Oe.style.top="0",Oe.style.left="0",Oe.style.visibility="hidden",Oe.style.whiteSpace="pre-wrap",Oe.style.wordWrap="break-word",Oe.style.width=window.getComputedStyle(U).width,Oe.style.font=window.getComputedStyle(U).font,Oe.style.padding=window.getComputedStyle(U).padding;const Qe=document.createTextNode(ke),Me=document.createElement("span");Me.textContent="|",Oe.appendChild(Qe),Oe.appendChild(Me),U.parentNode.appendChild(Oe);const He=Me.getBoundingClientRect(),Je=U.parentNode.getBoundingClientRect();let ht=He.top-Je.top+He.height,Ct=He.left-Je.left;if(await yt(),a.value){const Tt=a.value.offsetWidth,gn=U.offsetWidth,pn=U.getBoundingClientRect().left-Je.left;Ct+Tt>pn+gn&&(Ct=pn+gn-Tt),Ct<pn&&(Ct=pn),Ct=Math.max(0,Math.min(Ct,Je.width-Tt))}U.parentNode.removeChild(Oe),i.value={top:ht,left:Ct},ta=null},50)},cr=S(null),Do=U=>{if(!(U!=null&&U.target)||!s.value)return;const R=U.target.value,ke=U.target.selectionStart,Oe=U.target.selectionEnd,Qe={comma:{enabled:localStorage.getItem("weilin_prompt_ui_comma_conversion")!=="false",pattern:/,/g,replace:","},period:{enabled:localStorage.getItem("weilin_prompt_ui_period_conversion")!=="false",pattern:/。/g,replace:"."},bracket:{enabled:localStorage.getItem("weilin_prompt_ui_bracket_conversion")!=="false",patterns:[{pattern:/【/g,replace:"["},{pattern:/】/g,replace:"]"},{pattern:/(/g,replace:"("},{pattern:/)/g,replace:")"}]},angleBracket:{enabled:localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")!=="false",patterns:[{pattern:/《/g,replace:"<"},{pattern:/》/g,replace:">"}]}};let Me=R.substring(0,ke),He=R;Object.values(Qe).forEach(Et=>{Et.enabled&&(Et.pattern?(Me=Me.replace(Et.pattern,Et.replace),He=He.replace(Et.pattern,Et.replace)):Et.patterns&&Et.patterns.forEach(({pattern:jt,replace:Jt})=>{Me=Me.replace(jt,Jt),He=He.replace(jt,Jt)}))}),f.value=He;const Je=Me.length,ht=Oe-ke,Ct=Je+ht;yt(()=>{s.value&&(s.value.setSelectionRange(Je,Ct),s.value.focus())});const Tt=He.substring(0,Je),gn=localStorage.getItem("weilin_prompt_ui_comma_close_autocomplete")==="true",pn=Je>0?Tt[Je-1]:"";if((pn===","||pn===" ")&&gn){fe.value=!1,Y.value&&clearTimeout(Y.value),Y.value=setTimeout(()=>{var Oa;const Et=((Oa=s.value)==null?void 0:Oa.selectionStart)||0,Jt=(f.value||"").substring(0,Et);let yn=Et;for(;yn>0&&!/[,\s]/.test(Jt[yn-1]);)yn--;const Ms=Jt.substring(yn,Et).trim();Ms&&zl(Ms),oa()},300),l.value=zn(f.value);return}let Bt=Je;for(;Bt>0&&!/[,\s]/.test(Tt[Bt-1]);)Bt--;const At=Tt.substring(Bt,Je).trim();Y.value&&clearTimeout(Y.value),Y.value=setTimeout(()=>{At&&zl(At),oa()},300),l.value=zn(f.value)},zn=U=>U?U.trim().split(/\s+/).length:0,kn=async()=>{let U=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",R=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",ke=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",Oe=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true";localStorage.getItem("weilin_prompt_ui_underscore_to_bracket"),localStorage.getItem("weilin_prompt_ui_comma_conversion")||(localStorage.setItem("weilin_prompt_ui_comma_conversion","true"),U=!0),localStorage.getItem("weilin_prompt_ui_period_conversion")||(localStorage.setItem("weilin_prompt_ui_period_conversion","true"),R=!0),localStorage.getItem("weilin_prompt_ui_bracket_conversion")||(localStorage.setItem("weilin_prompt_ui_bracket_conversion","true"),ke=!0),localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")||(localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion","true"),Oe=!0),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")||localStorage.setItem("weilin_prompt_ui_underscore_to_bracket","false"),U&&(f.value=f.value.replace(/,/g,",")),R&&(f.value=f.value.replace(/。/g,".")),ke&&(f.value=f.value.replace(/【/g,"[").replace(/】/g,"]").replace(/(/g,"(").replace(/)/g,")")),Oe&&(f.value=f.value.replace(/《/g,"<").replace(/》/g,">"));const Qe=f.value;let Me=[];const He=m.value.map((bt,Bt)=>({token:bt,originalIndex:Bt,currentIndex:Bt})).filter(({token:bt})=>bt.isHidden);Me=((bt,Bt=0)=>{let At=[],Et=Bt,jt="",Jt=[];for(;Et<bt.length;){const yn=bt[Et];if(yn===`
`){jt.trim()&&(At.push(jt.trim()),jt=""),At.push(`
`),Et++;continue}Jt.length===0&&yn===","?(jt.trim()&&At.push(jt.trim()),jt=""):jt+=yn,Et++}return jt.trim()&&(Jt.length===0?At.push(...jt.split(",").filter(Boolean).map(yn=>yn.trim())):At.push(jt.trim())),At})(Qe);const ht=new Map;m.value.forEach((bt,Bt)=>{bt.id||(bt.id=ge()),ht.set(Bt,bt)});const Ct=[];Me.forEach(bt=>{if(bt===`
`)Ct.push({id:ge(),text:`
`,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:""});else if(bt.trim()){const Bt=bt.trim(),At=/^<wlr:[^:]+:\d+(\.\d+)?:\d+(\.\d+)?>$/.test(Bt);let Et=!1;for(const[jt,Jt]of ht)if(Jt.text===Bt&&!Jt.isHidden&&!Ct.includes(Jt)){At&&!Jt.isLoraTag&&(Jt.isLoraTag=!0),Ct.push(Jt),ht.delete(jt),Et=!0;break}if(!Et){for(const[jt,Jt]of ht)if(Jt.text===Bt&&!Ct.includes(Jt)){At&&!Jt.isLoraTag&&(Jt.isLoraTag=!0),Ct.push(Jt),ht.delete(jt),Et=!0;break}}Et||Ct.push({id:ge(),text:Bt,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:"",isLoraTag:At})}});const Tt=new Set;He.forEach(({token:bt,originalIndex:Bt})=>{if(Tt.has(bt.id)||(Tt.add(bt.id),Ct.some(jt=>jt.id===bt.id)))return;let Et=Bt;for(;Et>Ct.length;)Et--;Et<0?Ct.push(bt):Ct.splice(Et,0,bt)}),m.value=Ct,f.value=m.value.length>0?m.value.reduce((bt,Bt,At)=>{var Oa,Jl;if(Bt.isHidden)return bt;if(Bt.text===`
`){const Bo=ls(At);return Bo!==-1&&m.value[Bo],bt+Bt.text}if(bt===""){let Bo=At+1;for(;Bo<m.value.length&&((Oa=m.value[Bo])!=null&&Oa.isHidden);)Bo++;const Xl=Bo>=m.value.length,us=Bo<m.value.length?m.value[Bo]:null,ca=Xl||us&&us.text===`
`;return Bt.text+(ca?",":"")}let Et=At+1;for(;Et<m.value.length&&((Jl=m.value[Et])!=null&&Jl.isHidden);)Et++;const jt=Et>=m.value.length,Jt=Et<m.value.length?m.value[Et]:null,yn=Jt&&Jt.text===`
`||jt,Ms=ls(At);return Ms!==-1&&m.value[Ms].text===`
`?bt+Bt.text+(yn?",":""):bt+", "+Bt.text+(yn?",":"")},""):"",$.value&&clearTimeout($.value),$.value=setTimeout(()=>{Xn()},100),oa();const gn=50;let pn=0;for(;pn<m.value.length;){const bt=Math.min(pn+gn,m.value.length),Bt=[];for(let At=pn;At<bt;At++)if(m.value[At].text.length>0&&!m.value[At].translate){let Et=m.value[At].text;const jt=es(Et.trim());Bt.push(ro.getTranslateLocal(jt).then(Jt=>{const yn=Jt;m.value[At].translate=yn.translated.translate,m.value[At].color=yn.translated.color}))}await Promise.all(Bt),pn=bt}l.value=zn(f.value)},yo=async()=>{let R=0,ke=0,Oe=0;for(let Qe=0;Qe<m.value.length;Qe++){const Me=m.value[Qe];Me.translate&&(Me.translate===Me.text||/[a-zA-Z]/.test(Me.translate))&&!(typeof Me.text=="string"&&Me.text.startsWith("<wlr"))&&Oe++}for(console.log(`开始批量翻译,总共需要翻译 ${Oe} 个项目,批量大小: 50`);R<m.value.length;){const Qe=Math.min(R+50,m.value.length),Me=[],He=[];for(let Je=R;Je<Qe;Je++){const ht=m.value[Je];ht.translate&&(ht.translate===ht.text||/[a-zA-Z]/.test(ht.translate))&&!(typeof ht.text=="string"&&ht.text.startsWith("<wlr"))&&(Me.push(ht.text),He.push(Je))}if(Me.length>0){console.log(`处理第 ${Math.floor(R/50)+1} 批,翻译 ${Me.length} 个项目`);const Je=Me.join(`
`);try{const ht=new Promise((Tt,gn)=>setTimeout(()=>gn(new Error("翻译请求超时")),3e4)),Ct=await Promise.race([ro.translaterText("",Je),ht]);if(Ct.data&&Ct.data.length>0){const Tt=Ct.data.split(`
`);if(Tt.length===Me.length){for(let gn=0;gn<He.length;gn++){const pn=He[gn];gn<Tt.length&&Tt[gn].trim()&&(m.value[pn].translate=Tt[gn].trim(),ke++)}console.log(`第 ${Math.floor(R/50)+1} 批翻译完成,已处理 ${ke}/${Oe} 个`)}else throw new Error(`翻译结果数量不匹配: 期望${Me.length}个,实际${Tt.length}个`)}else throw new Error("翻译返回结果为空")}catch(ht){console.error(`第 ${Math.floor(R/50)+1} 批批量翻译失败:`,ht),console.log("回退到逐个翻译模式...");let Ct=0;for(let Tt=0;Tt<He.length;Tt++){const gn=He[Tt],pn=Me[Tt];try{const bt=await ro.translaterText("",pn);bt.data&&bt.data.length>0&&(m.value[gn].translate=bt.data,ke++,Ct++)}catch(bt){console.error(`单个翻译失败 (${pn}):`,bt)}}console.log(`回退翻译完成,成功 ${Ct} 个`)}}R=Qe}console.log(`批量翻译完成!总共处理 ${ke}/${Oe} 个项目`)},na=S(""),Xn=()=>{const U=f.value.replace(/[\s\t\n]+/g,"");if(D.value.length>0){if(U.length>0){const R=D.value.filter(Qe=>!Qe.hidden);let ke={prompt:f.value,lora:"",temp_prompt:m.value,temp_lora:D.value};R.length>0&&(ke.lora=R);const Oe=JSON.stringify(ke);na.value!=Oe&&(na.value=Oe,Oo.saveHistory({tag:Oe}))}}else if(na.value!=f.value){const R={prompt:f.value,lora:"",temp_prompt:m.value,temp_lora:""},ke=JSON.stringify(R);U.length>0&&Oo.saveHistory({tag:ke})}oa(),Rt||(ft.value=!0)},oa=()=>{if(D.value.length>0){na.value=f.value;const U=D.value.filter(Oe=>!Oe.hidden);let R={prompt:f.value,lora:"",temp_prompt:m.value,temp_lora:D.value};U.length>0&&(R.lora=U);const ke=JSON.stringify(R);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:ke},"*")}else{na.value=f.value;const U={prompt:f.value,lora:"",temp_prompt:m.value,temp_lora:""},R=JSON.stringify(U);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:R},"*")}},co=(U,R)=>{if(ee.value)return;Eo.value&&(clearTimeout(Eo.value),Eo.value=null);const ke=R.target.getBoundingClientRect();E.value={top:`${ke.top-50}px`,left:`${ke.left+ke.width/2}px`},b.value=U;const Oe=m.value[U].text;Fe.value=pt(Oe),re.value={top:`${ke.bottom+window.scrollY+ke.height+10}px`,left:`${ke.left+ke.width/2}px`},m.value[U].isLoraTag||(he.value=!0)},pt=U=>{const R=[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"<",close:">"}];for(const Oe of R)if(U.startsWith(Oe.open)&&U.endsWith(Oe.close))return pt(U.slice(1,-1));const ke=U.match(/:(\d+(\.\d+)?)$/);return ke?parseFloat(ke[1]):1},Eo=S(null),Po=U=>{Eo.value&&clearTimeout(Eo.value),Eo.value=setTimeout(()=>{T.value||ts(),Eo.value=null},100),he.value=!1},dr=()=>{T.value=!1,Po(b.value),setTimeout(()=>{T.value||(ee.value=!1)},100)},ts=()=>{T.value||(b.value=null)},aa=()=>{if(b.value!==null){const U=b.value;Cs(U),b.value=null,T.value=!1}},Qn=()=>{if(b.value!==null){const U=b.value;m.value.splice(U+1,0,{id:ge(),text:`
`,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),Vn()}},Cs=U=>{const R=f.value;let ke=m.value[U],Oe=0,Qe=-1;for(let Me=0;Me<U;Me++){let He=R.indexOf(m.value[Me].text,Oe);He!==-1&&(Oe=He+m.value[Me].text.length)}if(ke.text===`
`||ke.text===" "){for(let Me=Oe;Me<R.length;Me++)if(R[Me]===ke.text){Qe=Me;break}}else Qe=R.indexOf(ke.text,Oe);if(Qe!==-1){const Me=ke.text===`
`?" ":"",He=R.substring(0,Qe)+Me+R.substring(Qe+ke.text.length);f.value=He}m.value.splice(U,1),f.value=m.value.length>0?m.value.reduce((Me,He,Je)=>{var bt,Bt;if(He.isHidden)return Me;if(He.text===`
`){const At=ls(Je);return At!==-1&&m.value[At],Me+He.text}if(Me===""){let At=Je+1;for(;At<m.value.length&&((bt=m.value[At])!=null&&bt.isHidden);)At++;const Et=At>=m.value.length,jt=At<m.value.length?m.value[At]:null,Jt=Et||jt&&jt.text===`
`;return He.text+(Jt?",":"")}let ht=Je+1;for(;ht<m.value.length&&((Bt=m.value[ht])!=null&&Bt.isHidden);)ht++;const Ct=ht>=m.value.length,Tt=ht<m.value.length?m.value[ht]:null,gn=Tt&&Tt.text===`
`||Ct,pn=ls(Je);return pn!==-1&&m.value[pn].text===`
`?Me+He.text+(gn?",":""):Me+", "+He.text+(gn?",":"")},""):"",Xn(),ft.value=!0},pr=(U,R)=>{const ke=f.value;let Oe=0,Qe=-1;for(let He=0;He<U;He++){let Je=ke.indexOf(m.value[He].text,Oe);Je!==-1&&(Oe=Je+m.value[He].text.length)}const Me=m.value[U].text;if(Qe=ke.indexOf(Me,Oe),Qe!==-1){const He=R.target.value,Je=ke.substring(0,Qe)+He+ke.substring(Qe+Me.length);f.value=Je,m.value[U]={...m.value[U],text:He},Xn()}},fr=U=>{m.value[U].isPunctuation||(m.value[U].isEditing=!0,setTimeout(()=>{const R=w[U];if(R){R.focus();const ke=R.value.length;R.setSelectionRange(ke,ke),Es(R),R.addEventListener("input",()=>Es(R)),Xn(),ft.value=!0}}))},Es=U=>{const R=document.createElement("span");R.style.visibility="hidden",R.style.position="absolute",R.style.whiteSpace="pre";const ke=window.getComputedStyle(U);R.style.font=ke.font,R.style.fontSize=ke.fontSize,R.style.fontFamily=ke.fontFamily,R.style.padding=ke.padding,R.style.border=ke.border,R.textContent=U.value||U.placeholder||"",document.body.appendChild(R);const Oe=R.offsetWidth;U.style.width=`${Math.max(Oe+4,20)}px`,document.body.removeChild(R)},gr=U=>{m.value[U].isEditing=!1};St(m,U=>{Vn()},{deep:!0}),St(D,U=>{Xn(),ft.value=!0},{deep:!0});const mr=()=>{I.value=!I.value,I.value&&yt(()=>{var R;const U=N.value.getBoundingClientRect();(R=pe.value)==null||R.setPosition(U)})},$s=()=>{I.value=!1},sa=U=>{var R,ke;N.value&&!N.value.contains(U.target)&&pe.value&&!pe.value.$el.contains(U.target)&&$s(),(R=a.value)!=null&&R.contains&&((ke=s.value)!=null&&ke.contains)&&!a.value.contains(U.target)&&!s.value.contains(U.target)&&(fe.value=!1)},vr=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openTagManager_prompt"},"*")},ns=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openLoraManager"},"*")},hr=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openHistoryManager"},"*")},os=S(!0),as=()=>{os.value=!os.value},ss=S(!1),As=()=>{ss.value=!ss.value},vi=()=>{const U=s.value;U&&(U.addEventListener("keyup",Ro),U.addEventListener("click",Ro),U.addEventListener("input",Ro))},Ro=()=>{fe.value&&ur()},_r=()=>{if(s.value){const U=s.value.style.height||`${s.value.offsetHeight}px`;localStorage.setItem("weilinPromptTextAreaHeight",U)}},hi=()=>{const U=localStorage.getItem("weilinPromptTextAreaHeight");U&&s.value&&(s.value.style.height=U)};Dt(()=>{document.addEventListener("click",sa),window.addEventListener("message",eo),yr(),vi(),yt(()=>{hi()}),setTimeout(()=>{X.value||(X.value=document.querySelector(".tokens-container")),X.value?(X.value.removeEventListener("mousedown",rs),X.value.removeEventListener("mousemove",Ma),X.value.removeEventListener("mouseup",Zn),X.value.removeEventListener("mouseleave",Zn),X.value.addEventListener("mousedown",rs),X.value.addEventListener("mousemove",Ma),X.value.addEventListener("mouseup",Zn),X.value.addEventListener("mouseleave",Zn),X.value.style.userSelect="none",X.value.style.cursor="default",console.log("框选功能事件监听器绑定成功")):console.warn("未能找到tokens-container元素,框选功能可能无法正常工作")},100)}),Ba(()=>{X.value&&(X.value.removeEventListener("mousedown",rs),X.value.removeEventListener("mousemove",Ma),X.value.removeEventListener("mouseup",Zn),X.value.removeEventListener("mouseleave",Zn)),$o()});const rs=U=>{if(U.button===0&&!U.ctrlKey&&!U.metaKey){const R=U.target.closest(".token-item-box, .token-item, .lora-tag-icon, .newline-token, .tab-token, .delete-btn, .weight-control, .bracket-btn, .translate-button, .tag-tips-box, .token-controls"),ke=X.value;if(ke&&!R){$e.value=!1,we.value=!1,te.value=!1,be.value=!1,Wt(),$o();const Oe=ke.getBoundingClientRect();ne.value={x:Math.max(U.clientX,Oe.left),y:Math.max(U.clientY,Oe.top)},J.value={x:Math.max(U.clientX,Oe.left),y:Math.max(U.clientY,Oe.top)},$e.value=!0,console.log("记录框选起始位置")}}},Ma=U=>{if($e.value&&X.value&&!we.value&&Math.sqrt(Math.pow(U.clientX-ne.value.x,2)+Math.pow(U.clientY-ne.value.y,2))>3&&(U.preventDefault(),U.stopPropagation(),we.value=!0,ee.value=!0,ie.value=[],No(),console.log("开始实际框选")),we.value&&X.value){U.preventDefault(),U.stopPropagation();const R=X.value.getBoundingClientRect();J.value={x:Math.min(Math.max(U.clientX,R.left),R.right),y:Math.min(Math.max(U.clientY,R.top),R.bottom)};const ke=5;Math.abs(J.value.x-ne.value.x)<ke&&(J.value.x=ne.value.x+ke),Math.abs(J.value.y-ne.value.y)<ke&&(J.value.y=ne.value.y+ke),(!te.value||Date.now()-Te.value>100)&&(te.value=!0,requestAnimationFrame(()=>{ra(),te.value=!1}));const Oe=Date.now();!be.value&&Oe-Te.value>dL&&(Te.value=Oe,be.value=!0,requestAnimationFrame(()=>{bo(),be.value=!1}))}},Zn=()=>{if($e.value=!1,we.value){const U=ie.value.length;we.value=!1,ee.value=!1,te.value=!1,be.value=!1,$o(),U>0&&_i()}},No=()=>{try{let U=document.getElementById(gi);U&&document.body.removeChild(U),U=document.createElement("div"),U.id=gi,U.style.cssText=`
position: fixed;
background-color: rgba(66, 133, 244, 0.4);
border: 2px dashed #4285f4;
box-shadow: 0 0 12px rgba(66, 133, 244, 0.6);
pointer-events: none;
z-index: 99999;
transition: none;
opacity: 1;
display: block;
`,document.body.appendChild(U),console.log("选择框已创建"),ra()}catch(U){console.error("创建选择框失败:",U),te.value=!1}},ra=()=>{try{let U=document.getElementById(gi);if(!U&&we.value&&(No(),U=document.getElementById(gi),!U))return;const R=Math.min(ne.value.x,J.value.x),ke=Math.min(ne.value.y,J.value.y),Oe=Math.abs(J.value.x-ne.value.x),Qe=Math.abs(J.value.y-ne.value.y),Me=5,He=Math.max(Oe,Me),Je=Math.max(Qe,Me);U&&(U.style.left=`${R}px`,U.style.top=`${ke}px`,U.style.width=`${He}px`,U.style.height=`${Je}px`)}catch(U){console.error("更新选择框失败:",U),te.value=!1}},$o=()=>{try{const U=document.getElementById(gi);U&&document.body.removeChild(U)}catch(U){console.error("移除选择框失败:",U)}},bo=()=>{ie.value=[];const U=Math.min(ne.value.x,J.value.x),R=Math.min(ne.value.y,J.value.y),ke=Math.max(ne.value.x,J.value.x),Oe=Math.max(ne.value.y,J.value.y);document.querySelectorAll(".token-item-box").forEach((Me,He)=>{if(!Me.querySelector(".token-item, .lora-tag-icon, .newline-token, .tab-token"))return;const ht=Me.getBoundingClientRect();ht.right>=U&&ht.left<=ke&&ht.bottom>=R&&ht.top<=Oe&&ie.value.push(He)}),ia()},ia=()=>{const U=document.querySelectorAll(".token-item-box"),R=[],ke=[];U.forEach((Oe,Qe)=>{ie.value.includes(Qe)?R.push(Oe):ke.push(Oe)}),R.forEach(Oe=>{Oe.classList.add("token-item-box-selected")}),ke.forEach(Oe=>{Oe.classList.remove("token-item-box-selected"),Oe.style.border="",Oe.style.boxShadow="",Oe.style.backgroundColor=Oe.dataset.originalBgColor||""})},_i=()=>{if(ie.value.length>0){const U=Math.min(ne.value.x,J.value.x),R=Math.min(ne.value.y,J.value.y),ke=Math.max(ne.value.x,J.value.x);Math.max(ne.value.y,J.value.y),Z.value={top:`${R-50}px`,left:`${(U+ke)/2}px`},ve.value=!0,setTimeout(()=>{document.addEventListener("click",hn)},0)}},_e=()=>{if(ie.value.length===0)return;const ke=[...ie.value].sort((Oe,Qe)=>Oe-Qe).map(Oe=>m.value[Oe].text).join(", ");navigator.clipboard.writeText(ke).then(()=>{const Oe=document.createElement("div");Oe.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background-color: #4caf50;
color: white;
padding: 10px 15px;
border-radius: 4px;
z-index: 999999;
`,Oe.textContent="已复制到剪贴板",document.body.appendChild(Oe),setTimeout(()=>{document.body.removeChild(Oe)},2e3)}),Wt()},ae=()=>{ie.value.length!==0&&(ie.value.forEach(U=>{m.value[U]&&!m.value[U].isHidden&&(m.value[U].isHidden=!0,m.value[U].hiddenHint=o("promptBox.hiddenHint"))}),Vn(),Xn(),Wt())},ye=()=>{ie.value.length!==0&&(ie.value.forEach(U=>{m.value[U]&&m.value[U].isHidden&&(m.value[U].isHidden=!1,m.value[U].hiddenHint="")}),Vn(),Xn(),Wt())},nt=()=>{ie.value.length>0&&(confirm(`确定要删除选中的 ${ie.value.length} 个标签吗?`)?Nt():un())},Wt=()=>{ve.value=!1,document.removeEventListener("click",hn),un()},hn=U=>{const R=document.querySelector(".token-controls");R&&!R.contains(U.target)&&Wt()},Nt=()=>{if(ie.value.length===0)return;[...ie.value].sort((R,ke)=>ke-R).forEach(R=>{m.value.splice(R,1)}),Vn(),Xn(),un()},un=()=>{document.querySelectorAll(".token-item-box-selected").forEach(R=>{R.classList.remove("token-item-box-selected"),R.style.border="",R.style.boxShadow="",R.style.backgroundColor=R.dataset.originalBgColor||""}),ie.value=[],ve.value&&(ve.value=!1,document.removeEventListener("click",hn))},is=U=>{if(ie.value.length===0)return;const R=U.target.closest(".token-item-box, .token-item, .token-controls, .delete-btn, .weight-control, .bracket-btn, .translate-button, .tag-tips-box"),ke=X.value;(U.target===s.value||!R&&(!ke||!ke.contains(U.target)))&&un()};Dt(()=>{document.addEventListener("click",is)}),go(()=>{document.removeEventListener("click",sa),document.removeEventListener("click",is),cr.value&&clearTimeout(cr.value),window.removeEventListener("message",eo);const U=s.value;U&&(U.removeEventListener("keyup",Ro),U.removeEventListener("click",Ro),U.removeEventListener("input",Ro)),X.value&&(X.value.removeEventListener("mousedown",rs),X.value.removeEventListener("mousemove",Ma),X.value.removeEventListener("mouseup",Zn),X.value.removeEventListener("mouseleave",Zn)),$o()});const eo=U=>{if(U.data.type==="weilin_prompt_ui_insertTag"){const R=f.value,ke=U.data.tagText;R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),A.value=f.value,kn(),yt(()=>{Xn()})}else if(U.data.type==="weilin_prompt_ui_user_history_tag"){const R=U.data.tagText;na.value=R,wi(R)}else if(U.data.type!=="weilin_prompt_ui_refresh_all_data"){if(U.data.type==="weilin_prompt_ui_translate_setting")yr();else if(U.data.type==="weilin_prompt_ui_selectLora"){if(U.data.lora.loraWorks!=null&&U.data.lora.loraWorks.length>0){const R=f.value,ke=U.data.lora.loraWorks;R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),A.value=f.value,kn()}}else if(U.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response")Zc(U.data.data);else if(U.data.type==="weilin_prompt_ui_addLoraTag_inner")if(U.data.lora.loraWorks!=null&&U.data.lora.loraWorks.length>0){const R=f.value,ke=U.data.lora.tag+(U.data.lora.loraWorks===""?"":", "+U.data.lora.loraWorks);R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),A.value=f.value,kn()}else{const R=f.value,ke=U.data.lora.tag;R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),A.value=f.value,kn()}}},yr=async()=>{const U=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",R=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified";localStorage.getItem("weilin_prompt_ui_sourceLanguage")||localStorage.setItem("weilin_prompt_ui_sourceLanguage",U),localStorage.getItem("weilin_prompt_ui_targetLanguage")||localStorage.setItem("weilin_prompt_ui_targetLanguage",R),await yt()},yi=(U,R)=>{ro.translaterText("",U).then(ke=>{ke.data.length>0&&(R.translate=ke.data)})},Bl=()=>{ro.translaterInputText("",ue.value).then(U=>{U.data.length>0&&(m.value.push({text:U.data,translate:ue.value,isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),ue.value="",Vn())})},Ul=()=>{setTimeout(()=>{fe.value||(A.value=f.value,kn())},100)},zl=U=>{let R=U.replace(/[\[\]{}]/g,"").trim();const Oe=es(R).trim();if(!Oe){fe.value=!1;return}if(Oe.length>20){fe.value=!1;return}try{const Qe=Oe.toLowerCase();kc.getAutocomplete(String(Qe)).then(async Me=>{O.value=Me.data,await ur(),setTimeout(()=>{Pe.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450,Ie.value=localStorage.getItem("weilin_prompt_ui_auto_box_height")||350,fe.value=O.value.length>0,se.value=0},50)})}catch(Qe){console.error("Autocomplete error:",Qe),fe.value=!1}},br=U=>{fe.value&&(U.key==="ArrowDown"?(U.preventDefault(),se.value=Math.min(se.value+1,O.value.length-1),Vl()):U.key==="ArrowUp"?(U.preventDefault(),se.value=Math.max(se.value-1,0),Vl()):U.key==="Tab"||U.key==="Enter"?(U.preventDefault(),bi(se.value,null)):U.key==="Escape"&&(U.preventDefault(),Hl()))},Vl=()=>{yt(()=>{if(le.value&&a.value){const U=a.value,R=le.value,ke=U.getBoundingClientRect(),Oe=R.getBoundingClientRect(),Qe=Oe.top<ke.top,Me=Oe.bottom>ke.bottom;Qe?U.scrollTop=U.scrollTop+(Oe.top-ke.top):Me&&(U.scrollTop=U.scrollTop+(Oe.bottom-ke.bottom))}})},Wl=$t(()=>{if(!g.value)return{left:i.value.left};const U=g.value.offsetWidth;Pe.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450;const R=Pe.value;let ke=i.value.left;return ke+R>U&&(ke=U-R),ke<0&&(ke=0),{left:ke}}),bi=(U,R)=>{if(R&&(R.preventDefault(),R.stopPropagation()),!O.value[U])return;fe.value=!1;const ke=s.value.selectionStart,Oe=s.value.selectionEnd,Qe=f.value;let Me=O.value[U].text;localStorage.getItem("weilin_prompt_ui_comma_conversion")!=="false"&&(Me=Me.replace(/,/g,",")),localStorage.getItem("weilin_prompt_ui_period_conversion")!=="false"&&(Me=Me.replace(/。/g,".")),localStorage.getItem("weilin_prompt_ui_bracket_conversion")!=="false"&&(Me=Me.replace(/【/g,"[").replace(/】/g,"]").replace(/(/g,"(").replace(/)/g,")")),localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")!=="false"&&(Me=Me.replace(/《/g,"<").replace(/》/g,">")),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"&&(Me=Me.replace(/_/g," ")),localStorage.getItem("weilin_prompt_ui_bracket_escape")==="true"&&(Me=Me.replace(/\(([^)]+)\)/g,"\\($1\\)"));let He=ke,Je=Oe;for(;He>0&&!/[,\s]/.test(Qe[He-1]);)He--;for(;!1;)Je++;let ht=Qe.substring(0,He)+Me+", "+Qe.substring(Je);const Ct=He+Me.length+2;f.value=ht,A.value=ht,kn(),yt(()=>{s.value&&(s.value.selectionStart=Ct,s.value.selectionEnd=Ct)})},Hl=()=>{fe.value=!1},wi=U=>{if(U.length>0)try{const R=JSON.parse(U);if(f.value=R.prompt,A.value=f.value,R.lora&&R.lora!=""&&(D.value=R.lora),R.temp_prompt&&R.temp_prompt!=""){const ke=R.temp_prompt;let Oe=!1;ke.tokens&&ke.tokens.length>0&&ke.tokens!=""&&(m.value=ke.tokens,Oe=!0),ke.lora&&ke.lora.length>0&&ke.lora!=""&&(D.value=ke.lora,Oe=!0),!Oe&&ke.length>0&&ke!=""&&(m.value=ke)}if(R.temp_lora&&R.temp_lora.length>0&&R.temp_lora!=""){const ke=R.temp_lora;D.value=ke}kn()}catch{de({type:"warn",str:"promptBox.settings.errorPrompt"})}},Ls=S(!1),Is=S(null),Mn=S([]);let Fo=null,la=null;const xi=(U,R=!1)=>{Ls.value=!0,Is.value=null,Mn.value=[],R&&ie.value.length>1&&ie.value.includes(U)?Mn.value=[...ie.value].sort((ke,Oe)=>ke-Oe):(ie.value=[],Is.value=U),la={originalTokens:[...m.value],draggedItems:Mn.value.length>0?Mn.value.map(ke=>m.value[ke]):[m.value[U]]}},jl=(U,R)=>{if(ee.value){R.preventDefault();return}xi(U,!0),R.dataTransfer.effectAllowed="move"},Yc=(U,R,ke)=>{const Oe=R.filter(He=>He<ke).length;let Qe=Math.max(0,ke-Oe);const Me=U.length-R.length;return Qe=Math.min(Qe,Me),Qe},wr=U=>{if(!la)return;const R=[...la.originalTokens],ke=Mn.value.length>0?Mn.value:[Is.value],Oe=ke.map(Me=>la.originalTokens[Me]);for(let Me=ke.length-1;Me>=0;Me--){const He=ke[Me];He<R.length&&R.splice(He,1)}const Qe=Yc(la.originalTokens,ke,U);if(la.draggedItems.forEach((Me,He)=>{R.splice(Qe+He,0,Me)}),m.value=R,Vn(),Mn.value.length>0&&ie.value.length>0){const Me=[];for(let He=0;He<R.length;He++){const Je=R[He];Oe.some(ht=>ht.text===Je.text)&&Me.push(He)}ie.value=Me,setTimeout(()=>{ia()},0)}},Gl=(U,R)=>{if(ee.value){R.preventDefault();return}R.preventDefault(),Ls.value&&(U<0||U>=m.value.length||Mn.value.length>0&&Mn.value.includes(U)||Mn.value.length===0&&Is.value===U||(Fo&&clearTimeout(Fo),Fo=setTimeout(()=>{wr(U)},fL)))},ql=(U,R)=>{R.preventDefault(),Fo&&(clearTimeout(Fo),Fo=null),Ls.value&&la&&wr(U),Ls.value=!1,Is.value=null,Mn.value=[],la=null},Vn=()=>{f.value=m.value.length>0?m.value.reduce((U,R,ke)=>{var ht,Ct;if(R.isHidden)return U;if(R.text===`
`){const Tt=ls(ke);return Tt!==-1&&m.value[Tt],U+R.text}if(U===""){let Tt=ke+1;for(;Tt<m.value.length&&((ht=m.value[Tt])!=null&&ht.isHidden);)Tt++;const gn=Tt>=m.value.length,pn=Tt<m.value.length?m.value[Tt]:null,bt=gn||pn&&pn.text===`
`;return R.text+(bt?",":"")}let Oe=ke+1;for(;Oe<m.value.length&&((Ct=m.value[Oe])!=null&&Ct.isHidden);)Oe++;const Qe=Oe>=m.value.length,Me=Oe<m.value.length?m.value[Oe]:null,He=Me&&Me.text===`
`||Qe,Je=ls(ke);return Je!==-1&&m.value[Je].text===`
`?U+R.text+(He?",":""):U+", "+R.text+(He?",":"")},""):"",oa(),Rt||(ft.value=!0)},Kc=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openAiWindow"},"*")},Jc=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank")},ua=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_cloud_window"},"*")},Xc=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_danbooru_manager_window"},"*")},Qc=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},ls=U=>{for(let R=U-1;R>=0;R--)if(!m.value[R].isHidden)return R;return-1},Yl=U=>{if(U>=0&&U<m.value.length){if(m.value[U].text===`
`||m.value[U].text===" ")return;m.value[U].isHidden=!m.value[U].isHidden,m.value[U].isHidden?m.value[U].hiddenHint=o("promptBox.hiddenHint"):m.value[U].hiddenHint="",Vn()}},Kl=()=>{window.open("https://www.bilibili.com/list/288025756/?sid=4690314&spm_id_from=333.1387.0.0&oid=114342431298474&bvid=BV1txdfYxE7X","_blank")},On=async()=>{if(d.promptManager=="prompt_global")try{await Yn.goRandomTemplate().then(U=>{U.code===200?(f.value=U.random_tags,yt(()=>{kn()})):de({type:"warn",str:U.info})}).catch(U=>{console.error(U),de({type:"warn",str:"message.networkError"})})}catch(U){de({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",U)}else window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"},"*")},Zc=async U=>{try{await Yn.goRandomTemplatePath(U).then(R=>{R.code===200?(f.value=R.random_tags,yt(()=>{kn()})):de({type:"warn",str:R.info})}).catch(R=>{console.error(R),de({type:"warn",str:"message.networkError"})})}catch(R){de({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",R)}},Si=S(null),ed=U=>{Si.value&&Si.value.open(U.text,U.translate)},td=()=>{n.value.open(d.promptManager)},nd=()=>{f.value="",m.value=[],ue.value="",D.value=[],A.value="",Vn()},od=()=>{const U=m.value.filter(R=>!R.isHidden);m.value=U,Vn(),de({type:"success",str:o("promptBox.clearDisabledSuccess")||"已清空所有禁用标签"})};return t({setPromptText:wi}),(U,R)=>{var ke,Oe,Qe;return C(),L(qe,null,[r("div",ZE,[st(nl,{name:"weilin-fade"},{default:Ut(()=>[ln.value?(C(),L("div",e$,"已更新标签")):Ae("",!0)]),_:1}),d.promptManager==="prompt"?(C(),Zt(Ek,{key:0,"is-open":V.value,"selected-loras":D.value,onClose:Ke},null,8,["is-open","selected-loras"])):Ae("",!0),ce.value?(C(),Zt(zk,{key:1,ref_key:"mainLabelManagerRef",ref:et,"selected-id":ut.value,onSelect:An},null,8,["selected-id"])):Ae("",!0),r("div",{class:Ve(`${cL}main-content`),style:Ft({width:rn.value})},[r("div",t$,[r("div",n$,[r("button",{class:"tag-manager-btn",onClick:De,title:ce.value?"收起标签栏":"展开标签栏"},[(C(),L("svg",{class:Ve(["weilin-comfyui-sidebar-toggle-icon",{"is-closed":!ce.value}]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},[...R[16]||(R[16]=[r("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"},null,-1)])],2)),r("span",a$,y(ce.value?"收起标签栏":"展开标签栏"),1)],8,o$)]),r("div",s$,[r("button",{class:"language-switch-btn",onClick:vt(mr,["stop"]),ref_key:"langBtnRef",ref:N,title:h(o)("controls.language")},[R[17]||(R[17]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"translate-icon"},[r("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})],-1)),r("span",i$,y(h(o)("controls.language")),1)],8,r$),st(nl,{name:"fade"},{default:Ut(()=>[I.value?(C(),Zt(kb,{key:0,ref_key:"languageSwitcherRef",ref:pe,onClose:$s},null,512)):Ae("",!0)]),_:1})]),r("div",l$,[st(s3,{title:h(o)("controls.switchTheme")},{default:Ut(({isDark:Me})=>[r("span",u$,y(h(o)(Me?"controls.darkMode":"controls.lightMode")),1)]),_:1},8,["title"])]),r("div",c$,[r("button",{class:"settings-btn",onClick:gt,title:h(o)("controls.settings")},[R[18]||(R[18]=r("svg",{class:"settings-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.07.62-.07.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"})],-1)),r("span",p$,y(h(o)("controls.settings")),1)],8,d$)]),r("div",f$,[r("button",{class:"tag-manager-btn",onClick:vr,title:h(o)("controls.tagManager")},[R[19]||(R[19]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon"},[r("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),r("span",m$,y(h(o)("controls.tagManager")),1)],8,g$)]),r("div",v$,[r("button",{class:"tag-manager-btn",onClick:Xc,title:h(o)("controls.danbooruManager")},[R[20]||(R[20]=r("svg",{class:"tag-icon",viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),r("span",_$,y(h(o)("controls.danbooruManager")),1)],8,h$)]),d.hasPromptLoraStack?(C(),L("div",y$,[r("button",{class:"tag-manager-btn",onClick:Ee,title:h(o)("controls.loraStack")},[R[21]||(R[21]=r("svg",{sxmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M902.5 485.1c-59-17.5-113.8-3.4-155 27.7V365.1c0-45.2-36.9-82.1-82.1-82.1H511.2c31.1-41.2 45.2-96 27.7-155C522.2 71.6 475 26.1 418 12 303.4-16.5 200.9 69.4 200.9 179.3c0 39.1 13.5 74.7 35.3 103.7H82.1C36.9 283 0 319.9 0 365.1v113.1c0 25.5 27.9 38.8 49.5 25.3 38.8-24.3 87.8-33.6 139.4-19.5 57 15.6 103.4 62.5 118.4 119.7 30.1 115.5-56.2 219.4-166.8 219.4-33.5 0-64.7-9.6-91.1-26.2C27.8 783.4 0 796.8 0 822.2v113.2c0 45.2 36.9 82.1 82.1 82.1h583.3c45.2 0 82.1-36.9 82.1-82.1V787.7c29 21.9 64.6 35.3 103.7 35.3 109.9 0 195.8-102.5 167.3-217.1-14.1-56.9-59.7-104.1-116-120.8z"})],-1)),r("span",w$,y(h(o)("controls.loraStack")),1)],8,b$)])):Ae("",!0),r("div",x$,[r("button",{class:"tag-manager-btn",onClick:ns,title:h(o)("controls.loraManager")},[R[22]||(R[22]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M129 128h350v80H209v224h270v80H129V128zM129 895V576h768v319H129z m80-239v159h608V656H209zM730 356c19.882 0 36-16.118 36-36s-16.118-36-36-36-36 16.118-36 36 16.118 36 36 36z"}),r("path",{d:"M578.517 214.386a32.002 32.002 0 0 0-16.01 27.731l0.058 155.918a31.998 31.998 0 0 0 16 27.701l135.156 78.033a32.002 32.002 0 0 0 31.99 0.006l135.058-77.909a32.002 32.002 0 0 0 16.01-27.731l-0.058-155.918a32 32 0 0 0-16-27.701l-135.157-78.033a31.998 31.998 0 0 0-31.989-0.005l-135.058 77.908z m67.002 58.058l84.033-48.591 84.181 48.715 0.034 95.24-84.034 48.591-84.18-48.714-0.034-95.241z"})],-1)),r("span",T$,y(h(o)("controls.loraManager")),1)],8,S$)]),r("div",k$,[r("button",{class:"tag-manager-btn",onClick:hr,title:h(o)("controls.history")},[R[23]||(R[23]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M653.7 85.83c-235.05 0-426.29 191.25-426.29 426.3s191.24 426.3 426.29 426.3c235.06 0 426.3-191.25 426.3-426.3S888.76 85.83 653.7 85.83z m0 779.98c-195.01 0-353.67-158.65-353.67-353.68S458.69 158.45 653.7 158.45c195.02 0 353.68 158.65 353.68 353.68S848.72 865.81 653.7 865.81z"}),r("path",{d:"M866.78 634.19L695.93 533.61V302.59c0-20.06-16.26-36.31-36.31-36.31s-36.31 16.26-36.31 36.31v253.66c0 17.06 11.8 31.26 27.66 35.16l178.98 105.36c17.28 10.17 39.54 4.41 49.71-12.87 10.17-17.28 4.4-39.54-12.88-49.71zM44.76 324.51h186.42c20.05 0 36.31-16.26 36.31-36.31s-16.26-36.31-36.31-36.31H44.76c-20.05 0-36.31 16.26-36.31 36.31s16.26 36.31 36.31 36.31zM231.18 703.25H44.76c-20.05 0-36.31 16.26-36.31 36.31s16.26 36.31 36.31 36.31h186.42c20.05 0 36.31-16.26 36.31-36.31s-16.25-36.31-36.31-36.31zM36.31 550.19h118.8c20.05 0 36.31-16.26 36.31-36.31s-16.26-36.31-36.31-36.31H36.31c-20.05 0-36.31 16.26-36.31 36.31 0 20.06 16.26 36.31 36.31 36.31z"})],-1)),r("span",E$,y(h(o)("controls.history")),1)],8,C$)]),r("div",$$,[r("button",{class:"tag-manager-btn",onClick:Kc,title:h(o)("controls.aiChat")},[R[24]||(R[24]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"}),r("path",{d:"M6 14h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"})],-1)),r("span",L$,y(h(o)("controls.aiChat")),1)],8,A$)]),r("div",I$,[r("button",{class:"tag-manager-btn",onClick:Jc,title:h(o)("controls.github")},[R[25]||(R[25]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})],-1)),r("span",O$,y(h(o)("controls.github")),1)],8,M$)]),r("div",D$,[r("button",{class:"tag-manager-btn",onClick:ua,title:h(o)("controls.shareCloudData")},[R[26]||(R[26]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"})],-1)),r("span",R$,y(h(o)("controls.shareCloudData")),1)],8,P$)]),r("div",N$,[r("button",{class:"tag-manager-btn",onClick:Kl,title:h(o)("controls.tutorialVideo")},[R[27]||(R[27]=r("svg",{t:"1745234292993",class:"tag-icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1496",width:"128",height:"128"},[r("path",{d:"M204.288 63.488c-8.704 8.192-16.896 20.48-18.944 26.624-3.584 11.776 12.8 62.464 20.48 62.464S235.52 176.128 235.52 184.32c0 16.384-17.92 26.112-47.104 26.112-34.816 0-104.448 27.648-128.512 51.2-9.216 8.704-26.112 33.792-37.888 56.32L0 358.4v469.504l21.504 40.448c24.576 47.616 35.84 59.392 82.944 84.992l40.96 22.528h722.944l40.96-19.968c51.712-24.576 72.704-45.056 95.744-94.72l17.92-38.4v-231.424l0.512-231.424-17.92-36.352c-9.216-20.48-28.16-47.104-42.496-59.904-31.232-30.208-86.528-54.272-122.368-54.272-54.272 0-65.024-22.528-26.624-57.856 20.48-18.432 23.04-25.088 23.04-45.568 0-19.968-3.584-28.16-16.896-41.984-9.216-9.216-22.528-16.896-29.696-16.896-11.776 0-34.304 9.216-40.448 16.896-1.536 1.536-35.84 35.328-75.776 74.24l-73.216 71.168-83.456-0.512c-45.568 0-88.064-2.56-93.696-4.608-5.632-2.56-38.4-31.232-72.704-65.024C249.856 40.448 235.008 32.256 204.288 63.488z m652.8 262.656c5.12 0.512 19.968 9.216 31.744 20.48l21.504 19.968 1.536 217.088c1.024 197.12 0.512 218.112-8.704 236.032-14.336 27.136-34.816 40.448-65.536 41.984-14.336 0.512-173.568 0.512-353.28 0l-326.144-1.536-45.056-45.056V373.248l20.992-22.528c15.872-17.92 25.6-23.552 41.984-25.088 16.384-1.024 634.88-0.512 680.96 0.512z","p-id":"1497"}),r("path",{d:"M279.04 502.272c-20.48 22.016-20.992 25.088-20.992 66.56 0 39.936 1.024 44.544 17.92 64 29.184 33.28 55.808 32.256 84.48-2.56 11.264-12.8 12.8-22.016 13.312-64 0-47.104-0.512-48.64-19.968-68.096-27.136-27.648-47.616-26.112-74.752 4.096z m393.216-3.584c-18.944 18.944-19.968 20.992-19.968 69.12 0 47.616 0.512 49.664 18.432 67.072 24.576 23.552 35.84 26.624 58.368 13.824 29.184-16.896 39.936-43.52 36.864-90.624-2.56-35.328-4.608-41.984-22.016-59.904-25.088-25.6-45.568-25.6-71.68 0.512z","p-id":"1498"})],-1)),r("span",B$,y(h(o)("controls.tutorialVideo")),1)],8,F$)]),r("div",U$,[r("button",{class:"tag-manager-btn",onClick:Qc,title:h(o)("controls.sponsor")},[R[28]||(R[28]=r("svg",{t:"1745823985128",class:"tag-icon",viewBox:"0 0 1322 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24"},[r("path",{d:"M495.899049 634.906371c-17.304811 0-31.251971 13.947161-31.251971 31.251971S478.594238 697.410314 495.899049 697.410314c17.304811 0 31.251971-13.947161 31.251971-31.251972 0-17.304811-13.947161-31.251971-31.251971-31.251971zM790.855671 728.662285c-17.304811 0-31.251971 13.947161-31.251972 31.251971s13.947161 31.251971 31.251972 31.251972 31.251971-13.947161 31.251971-31.251972c0-17.04653-13.947161-30.993691-31.251971-31.251971z"}),r("path",{d:"M1262.99289 719.622459c-13.430599-8.264984-28.927445-13.430599-44.68257-14.980284 34.867902-84.974368 57.080047-196.293374-18.596215-306.837537-115.193217-168.657333-280.75118-256.73107-491.766556-260.863562-60.179416-1.291404-130.948343 1.549685-205.849762 4.649054-87.040614 3.35765-203.008673 8.006703-281.526023 1.549684 15.755126-8.523265 32.543375-16.788249 47.007098-23.761829 55.530362-27.119479 98.921529-48.04022 84.457807-85.232649-7.748423-21.695583-30.218848-33.059937-67.411277-34.09306C206.624604-1.755689 37.967271 43.443443 7.748423 119.636265c-17.04653 42.874605-19.887618 125.524447 152.902206 198.876182 71.027208 30.218848 271.969635 66.894715 349.453861 74.643138 17.563091 1.549685 34.867902 5.165615 51.397871 11.364353-17.821372 11.622634-35.901025 24.02011-54.238959 36.417586-31.768533-18.079653-83.941245-39.516955-122.683358-13.172318-14.463722 9.298107-23.503549 25.053233-24.02011 42.358044-0.516562 21.179022 12.397476 42.099763 26.861198 58.629731-57.080047 45.715694-103.312302 89.881703-119.84227 123.974762-18.337934 41.841482-25.828075 110.544163 8.523265 177.438879 43.391167 84.974368 138.955046 144.120661 284.625391 176.147474 190.352916 41.583202 354.619476 4.132492 463.355674-53.205835 60.437697-32.026814 103.570583-69.994085 124.233043-103.828864 6.457019 2.066246 12.914038 4.132492 19.629338 6.198738 9.298107 2.841088 18.596214 5.682177 27.37776 8.781546 28.669164 10.072949 60.695977 8.523265 85.232649-3.61593l1.291403-0.774843c17.821372-9.039826 31.510252-25.053233 37.708991-44.166009 15.238565-51.139589-29.444006-79.033911-56.563486-96.08044z m-811.776412-239.684541l-17.30481 12.655757c-5.165615-5.165615-9.814669-11.106072-13.430599-17.563091 6.7153-2.066246 18.337934 0.258281 30.735409 4.907334zM1262.99289 798.139808c-1.291404 3.874211-4.132492 6.97358-9.298107 9.814669-10.33123 5.165615-25.569795 5.423896-39.258675 0.774842-9.298107-3.35765-19.371057-6.457019-29.444006-9.556388-18.596214-5.682177-49.848186-15.238565-55.788643-22.470426-9.814669-12.914038-28.152602-15.755126-41.32492-5.940457s-15.755126 28.152602-5.940458 41.324921c3.615931 4.390773 7.490142 8.264984 12.139196 11.622634-44.940851 62.245662-242.267348 186.220424-521.468844 125.007885-125.782728-27.636041-210.498815-77.742507-244.850155-145.412065-24.794952-48.815063-19.112776-98.921529-7.231861-126.299289 34.09306-71.027208 280.75118-234.518925 438.30244-327.241716 13.947161-8.264984 18.596214-26.344637 10.33123-40.291798s-27.119479-19.629337-40.291797-10.33123c-12.655757 7.490142-55.788643 33.059937-111.060725 68.186119-18.596214-12.655757-50.881309-27.894322-102.537459-33.059936-81.874999-8.264984-270.936512-44.42429-332.149051-70.252366C139.471608 245.418993 40.033517 196.34565 61.987381 141.073568c5.165615-12.914038 29.185725-33.576498 81.100157-53.464116 35.384463-13.430599 72.318611-22.470426 109.769321-27.119479l-11.622634 5.682176c-35.384463 17.304811-73.868296 36.417586-99.954652 59.146293-1.807965-1.033123-3.615931-2.324527-5.165615-3.874211-10.847792-11.622634-29.185725-12.397476-41.06664-1.291404l-0.516562 0.516561c-11.880915 11.106072-12.139195 29.702287-1.033123 41.583202 10.589511 11.106072 26.086356 19.371057 45.715694 25.569795 0.774842 0.258281 1.291404 0.516562 2.066246 0.774842 68.702681 21.179022 190.611197 18.596214 362.367899 11.622634 74.126577-2.841088 144.120661-5.682177 202.492111-4.649054 193.710566 3.874211 339.122631 80.841876 444.75946 235.552049 64.828469 95.047318 41.583202 188.544951 4.390773 269.903388-4.649054-3.615931-9.039826-7.748423-12.655757-12.139195-10.33123-12.397476-28.669164-14.463722-41.324921-4.649054-12.655757 10.072949-14.722003 28.669164-4.649054 41.324921 5.940457 7.490142 36.675867 42.874605 74.643138 39.775236h2.066246c1.291404-0.258281 2.324527 0 3.615931-0.258281 25.828075-4.649054 42.358044-3.615931 57.596608 6.198738 20.40418 12.914038 30.218848 20.40418 28.410883 26.861199z"})],-1)),r("span",V$,y(h(o)("controls.sponsor")),1)],8,z$)]),st(xm,{ref_key:"settingDialog",ref:P},null,512),r("div",W$,[r("button",{class:Ve(["update-label-btn",{"is-dirty":ft.value}]),disabled:!ut.value||!ft.value,onClick:Xt}," 更新标签 ",10,H$)])]),r("div",{style:{position:"relative"},ref_key:"parentCneterBox",ref:g},[xe(r("textarea",{"onUpdate:modelValue":R[0]||(R[0]=Me=>f.value=Me),class:"input-area",onInput:Do,placeholder:h(o)("promptBox.placeholder"),onKeydown:br,onBlur:Ul,rows:"6",ref_key:"inputAreaRef",ref:s,onMouseup:_r,onResize:_r},null,40,j$),[[ze,f.value]]),r("div",G$,y(l.value)+" tokens ",1),r("div",{class:"autocomplete-container",ref_key:"autocompleteContainerRef",ref:a,style:Ft({top:`${i.value.top}px`,left:`${Wl.value.left}px`,display:fe.value?"block":"none",width:`${Pe.value}px`,maxHeight:`${Ie.value}px`})},[r("button",{class:"close-autocomplete-btn",onClick:vt(Hl,["stop"])},"×"),(C(!0),L(qe,null,ot(O.value,(Me,He)=>(C(),L("div",{key:He,class:Ve(["autocomplete-item",{selected:He===se.value}]),onClick:vt(Je=>bi(He,Je),["stop"]),ref_for:!0,ref:Je=>{Je&&He===se.value&&(le.value=Je)}},[r("span",Y$,y(Me.text),1),r("span",K$,y(Me.desc),1)],10,q$))),128))],4)],512),r("div",J$,[r("div",X$,[xe(r("input",{type:"text","onUpdate:modelValue":R[1]||(R[1]=Me=>ue.value=Me),class:"prompt-input-translate-area-textarea",onKeyup:R[2]||(R[2]=Nn(Me=>Bl(),["enter"])),placeholder:h(o)("promptBox.translatePlaceholder")},null,40,Q$),[[ze,ue.value]]),r("button",{class:"translate-btn",style:{"margin-left":"8px"},onClick:R[3]||(R[3]=Me=>Bl())}," 翻译 ")]),H.value?(C(),L("button",{key:0,class:"translate-btn random-tag-settings-btn",onClick:yo,title:h(o)("promptBox.oneClickTranslate")},[R[29]||(R[29]=r("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"token-item-icon",width:"24",height:"24"},[r("path",{d:"M677.676657 294.6142c19.165116 57.5433 44.715939 102.2992 89.431879 147.0551 38.322239-38.3622 63.873063-89.5118 83.038178-147.0551h-172.470057z m-421.56861 319.685h166.076358l-83.038179-223.7795-83.038179 223.7795z","p-id":"2419"}),r("path",{d:"M894.854661 0.504H128.353929C58.095158 0.504 0.607803 58.0473 0.607803 128.378v767.244c0 70.3307 57.487355 127.874 127.746126 127.874h766.500733c70.258771 0 127.746126-57.5433 127.746126-127.874V128.378c0-70.3307-51.101647-127.874-127.746126-127.874zM581.867062 825.2913c-12.771416 12.7874-25.550824 12.7874-38.322239 12.7874-6.3937 0-19.165116 0-25.550824-6.3937-6.3937-6.3937-12.779408 0-12.779408-6.3937s-6.385708-12.7874-12.771415-25.5748c-6.3937-12.7874-6.3937-19.1811-12.779408-31.9685l-25.542832-70.3307H230.557224L205.0064 767.748c-12.771416 25.5748-19.165116 44.7559-25.550824 57.5433-6.3937 12.7874-19.165116 12.7874-38.322239 12.7874-12.779408 0-25.550824-6.3937-38.330231-12.7874-12.771416-12.7874-19.157124-19.1811-19.157124-31.9685 0-6.3937 0-12.7874 6.385708-25.5748 6.3937-12.7874 6.3937-19.1811 12.771416-31.9685l140.525533-358.0472c6.3937-12.7874 6.3937-25.5748 12.779408-38.3622 6.385708-12.7874 12.771416-25.5748 19.157124-31.9685 6.3937-6.3937 12.779408-19.1811 25.550823-25.5748 12.779408-6.3937 25.550824-6.3937 38.330232-6.3937 12.771416 0 25.542832 0 38.322239 6.3937 12.771416 6.3937 19.165116 12.7874 25.550824 25.5748 6.385708 6.3937 12.771416 19.1811 19.157124 31.9685 6.3937 12.7874 12.779408 25.5748 19.165115 44.7559l140.525534 351.6535c12.771416 25.5748 19.165116 44.7559 19.165116 57.5433-6.3937 6.3937-12.779408 19.1811-19.165116 31.9685zM933.176901 575.937c-70.258771-25.5748-121.360418-57.5433-166.076358-95.9055-44.707947 44.7559-102.195302 76.7244-172.462065 95.9055l-19.157124-31.9685c70.258771-19.1811 127.746126-44.7559 172.462066-89.5118C703.22748 409.7008 664.905241 352.1575 652.125833 288.2205h-63.873063v-25.5748h172.470058c-12.7874-19.1811-25.558816-44.7559-38.330232-63.937l19.157124-6.3937c12.779408 19.1811 31.944524 44.7559 44.715939 70.3307h159.682658v31.9685h-63.873063c-19.157124 63.937-51.093655 121.4803-89.423887 159.8425 44.715939 38.3622 95.809594 70.3307 166.076358 89.5118l-25.550824 31.9685z","p-id":"2420"})],-1)),r("span",eA,y(h(o)("promptBox.oneClickTranslate")),1)],8,Z$)):Ae("",!0),k.value?(C(),L("button",{key:1,class:"translate-btn random-tag-settings-btn",onClick:td,title:h(o)("promptBox.randomTagSettings")},[R[30]||(R[30]=r("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[r("path",{d:"M512 409.6c-56.32 0-102.4 46.08-102.4 102.4s46.08 102.4 102.4 102.4 102.4-46.08 102.4-102.4-46.08-102.4-102.4-102.4z m0 153.6c-28.16 0-51.2-23.04-51.2-51.2s23.04-51.2 51.2-51.2 51.2 23.04 51.2 51.2-23.04 51.2-51.2 51.2z"}),r("path",{d:"M512 204.8c-25.6 0-51.2 2.56-76.8 7.68l-15.36-61.44c-2.56-10.24-10.24-17.92-20.48-20.48-10.24-2.56-20.48 0-28.16 7.68l-76.8 76.8c-5.12 5.12-7.68 12.8-7.68 20.48s2.56 15.36 7.68 20.48l76.8 76.8c5.12 5.12 12.8 7.68 20.48 7.68 2.56 0 5.12 0 7.68-2.56 10.24-2.56 17.92-10.24 20.48-20.48l15.36-61.44c25.6-5.12 51.2-7.68 76.8-7.68 140.8 0 256 115.2 256 256s-115.2 256-256 256-256-115.2-256-256c0-25.6 2.56-51.2 7.68-76.8l61.44-15.36c10.24-2.56 17.92-10.24 20.48-20.48 2.56-10.24 0-20.48-7.68-28.16l-76.8-76.8c-5.12-5.12-12.8-7.68-20.48-7.68s-15.36 2.56-20.48 7.68l-76.8 76.8c-7.68 7.68-10.24 17.92-7.68 28.16 2.56 10.24 10.24 17.92 20.48 20.48l61.44 15.36c-5.12 25.6-7.68 51.2-7.68 76.8 0 168.96 138.24 307.2 307.2 307.2s307.2-138.24 307.2-307.2-138.24-307.2-307.2-307.2z"})],-1)),r("span",nA,y(h(o)("promptBox.randomTagSettings")),1)],8,tA)):Ae("",!0),z.value?(C(),L("button",{key:2,class:"translate-btn random-tag-btn",onClick:On,title:h(o)("promptBox.oneClickRandomTag")},[R[31]||(R[31]=r("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[r("path",{d:"M832 512c0-176-144-320-320-320S192 336 192 512s144 320 320 320 320-144 320-320z m-384 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m128-128c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m-256 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m128-128c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m256 256c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m-256 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m-128 128c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z m256 0c0-35.2 28.8-64 64-64s64 28.8 64 64-28.8 64-64 64-64-28.8-64-64z"})],-1)),r("span",aA,y(h(o)("promptBox.oneClickRandomTag")),1)],8,oA)):Ae("",!0),Le.value?(C(),L("button",{key:3,class:Ve(["translate-btn toggle-delete-btn",{active:j.value}]),onClick:B,title:j.value?h(o)("promptBox.hideDeleteButton"):h(o)("promptBox.showDeleteButton")},[R[32]||(R[32]=r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"currentColor"})],-1)),r("span",rA,y(j.value?h(o)("promptBox.hideDeleteButton"):h(o)("promptBox.showDeleteButton")),1)],10,sA)):Ae("",!0),Ce.value?(C(),L("button",{key:4,class:"translate-btn clear-all-btn",onClick:nd,title:h(o)("promptBox.oneClickCleanAll")},[R[33]||(R[33]=r("svg",{class:"utils-item-icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1605",width:"24",height:"24"},[r("path",{d:"M716.8 338.944H307.2v-102.4a76.8 76.8 0 0 1 76.8-76.8h256a77.312 77.312 0 0 1 76.8 76.8z m-358.4-51.2h307.2v-51.2a26.112 26.112 0 0 0-25.6-25.6h-256a25.6 25.6 0 0 0-25.6 25.6zM702.464 856.576H321.536A65.024 65.024 0 0 1 256 791.04V406.528a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v384.512a14.336 14.336 0 0 0 13.824 14.336h380.928a14.848 14.848 0 0 0 14.336-14.336V406.528a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v384.512a65.536 65.536 0 0 1-65.024 65.536z"}),r("path",{d:"M432.128 678.912a25.6 25.6 0 0 1-25.6-25.6v-220.16a25.6 25.6 0 0 1 25.6-25.6 26.112 26.112 0 0 1 25.6 25.6v220.16a25.6 25.6 0 0 1-25.6 25.6z"}),r("path",{d:"M593.408 678.912a25.6 25.6 0 0 1-25.6-25.6v-220.16a26.112 26.112 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v220.16a25.6 25.6 0 0 1-25.6 25.6z"}),r("path",{d:"M828.416 338.944H196.096a25.6 25.6 0 0 1-25.6-25.6 25.6 25.6 0 0 1 25.6-25.6h632.32a25.6 25.6 0 0 1 25.6 25.6 25.6 25.6 0 0 1-25.6 25.6z"})],-1)),r("span",lA,y(h(o)("promptBox.oneClickCleanAll")),1)],8,iA)):Ae("",!0),Q.value?(C(),L("button",{key:5,class:"translate-btn clear-disabled-btn",onClick:od,title:h(o)("promptBox.oneClickClearDisabled")},[R[34]||(R[34]=r("svg",{class:"utils-item-icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1605",width:"24",height:"24"},[r("path",{d:"M716.8 338.944H307.2v-102.4a76.8 76.8 0 0 1 76.8-76.8h256a77.312 77.312 0 0 1 76.8 76.8z m-358.4-51.2h307.2v-51.2a26.112 26.112 0 0 0-25.6-25.6h-256a25.6 25.6 0 0 0-25.6 25.6zM702.464 856.576H321.536A65.024 65.024 0 0 1 256 791.04V406.528a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v384.512a14.336 14.336 0 0 0 13.824 14.336h380.928a14.848 14.848 0 0 0 14.336-14.336V406.528a25.6 25.6 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v384.512a65.536 65.536 0 0 1-65.024 65.536z"}),r("path",{d:"M432.128 678.912a25.6 25.6 0 0 1-25.6-25.6v-220.16a25.6 25.6 0 0 1 25.6-25.6 26.112 26.112 0 0 1 25.6 25.6v220.16a25.6 25.6 0 0 1-25.6 25.6z"}),r("path",{d:"M593.408 678.912a25.6 25.6 0 0 1-25.6-25.6v-220.16a26.112 26.112 0 0 1 25.6-25.6 25.6 25.6 0 0 1 25.6 25.6v220.16a25.6 25.6 0 0 1-25.6 25.6z"}),r("path",{d:"M828.416 338.944H196.096a25.6 25.6 0 0 1-25.6-25.6 25.6 25.6 0 0 1 25.6-25.6h632.32a25.6 25.6 0 0 1 25.6 25.6 25.6 25.6 0 0 1-25.6 25.6z"})],-1)),r("span",cA,y(h(o)("promptBox.oneClickClearDisabled")),1)],8,uA)):Ae("",!0)]),m.value.length>0?(C(),L("div",dA,[(C(!0),L(qe,null,ot(m.value,(Me,He)=>(C(),L(qe,{key:"tag-item-"+He},[r("div",{class:Ve(["token-item-box",{"token-item-box-disabled":Me.isHidden}]),draggable:!Me.isEditing,onDragstart:Je=>jl(He,Je),onDragover:vt(Je=>Gl(He,Je),["prevent"]),onDrop:Je=>ql(He,Je),onDblclick:Je=>Yl(He),style:Ft({backgroundColor:Me.color})},[Me.text===`
`?(C(),L("div",fA,[r("span",{class:"token-symbol",title:h(o)("promptBox.newline")},"↵",8,gA)])):Me.text===" "?(C(),L("div",{key:1,class:"token-item tab-token",onMouseenter:Je=>co(He,Je),onMouseleave:Je=>Po()},[r("span",{class:"token-symbol",title:h(o)("promptBox.tab")},"→",8,vA)],40,mA)):Me.isLoraTag?(C(),L("div",{key:2,class:"lora-tag-icon",title:h(o)("promptBox.loraTag"),onMouseenter:Je=>co(He,Je),onMouseleave:Je=>Po()},[R[35]||(R[35]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"15",height:"15"},[r("path",{d:"M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"})],-1)),r("span",_A,y(Me.text),1)],40,hA)):Me.text&&!Me.isLoraTag?(C(),L("div",{key:3,class:Ve(["token-item",{punctuation:Me.isPunctuation}]),onMouseenter:Je=>co(He,Je),onMouseleave:Je=>Po()},[!Me.isEditing||Me.isPunctuation?(C(),L("span",{key:0,onClick:Je=>!Me.isPunctuation&&fr(He)},y(Me.text),9,bA)):Me.isPunctuation?Ae("",!0):(C(),L("input",{key:1,value:Me.text,onInput:Je=>pr(He,Je),onBlur:Je=>gr(He),onKeyup:Nn(Je=>gr(He),["enter"]),ref_for:!0,ref:Je=>{Je&&(w[He]=Je)}},null,40,wA)),j.value?(C(),L("button",{key:2,class:"quick-delete-btn",onClick:vt(Je=>Cs(He),["stop"]),title:h(o)("promptBox.delete"),style:{"margin-left":"4px"}},[...R[36]||(R[36]=[r("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"#ff4d4f70"})],-1)])],8,xA)):Ae("",!0)],42,yA)):Ae("",!0),Me.text!==`
`&&Me.text!==" "&&!Me.isLoraTag?(C(),L("div",SA,[mi(Me.text)?(C(),L("div",{key:0,onClick:Je=>yi(Me.text,Me),class:"translate-button",title:h(o)("promptBox.translate")},[...R[37]||(R[37]=[r("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"token-item-icon",width:"24",height:"24"},[r("path",{d:"M677.676657 294.6142c19.165116 57.5433 44.715939 102.2992 89.431879 147.0551 38.322239-38.3622 63.873063-89.5118 83.038178-147.0551h-172.470057z m-421.56861 319.685h166.076358l-83.038179-223.7795-83.038179 223.7795z","p-id":"2419"}),r("path",{d:"M894.854661 0.504H128.353929C58.095158 0.504 0.607803 58.0473 0.607803 128.378v767.244c0 70.3307 57.487355 127.874 127.746126 127.874h766.500733c70.258771 0 127.746126-57.5433 127.746126-127.874V128.378c0-70.3307-51.101647-127.874-127.746126-127.874zM581.867062 825.2913c-12.771416 12.7874-25.550824 12.7874-38.322239 12.7874-6.3937 0-19.165116 0-25.550824-6.3937-6.3937-6.3937-12.779408 0-12.779408-6.3937s-6.385708-12.7874-12.771415-25.5748c-6.3937-12.7874-6.3937-19.1811-12.779408-31.9685l-25.542832-70.3307H230.557224L205.0064 767.748c-12.771416 25.5748-19.165116 44.7559-25.550824 57.5433-6.3937 12.7874-19.165116 12.7874-38.322239 12.7874-12.779408 0-25.550824-6.3937-38.330231-12.7874-12.771416-12.7874-19.157124-19.1811-19.157124-31.9685 0-6.3937 0-12.7874 6.385708-25.5748 6.3937-12.7874 6.3937-19.1811 12.771416-31.9685l140.525533-358.0472c6.3937-12.7874 6.3937-25.5748 12.779408-38.3622 6.385708-12.7874 12.771416-25.5748 19.157124-31.9685 6.3937-6.3937 12.779408-19.1811 25.550823-25.5748 12.779408-6.3937 25.550824-6.3937 38.330232-6.3937 12.771416 0 25.542832 0 38.322239 6.3937 12.771416 6.3937 19.165116 12.7874 25.550824 25.5748 6.385708 6.3937 12.771416 19.1811 19.157124 31.9685 6.3937 12.7874 12.779408 25.5748 19.165115 44.7559l140.525534 351.6535c12.771416 25.5748 19.165116 44.7559 19.165116 57.5433-6.3937 6.3937-12.779408 19.1811-19.165116 31.9685zM933.176901 575.937c-70.258771-25.5748-121.360418-57.5433-166.076358-95.9055-44.707947 44.7559-102.195302 76.7244-172.462065 95.9055l-19.157124-31.9685c70.258771-19.1811 127.746126-44.7559 172.462066-89.5118C703.22748 409.7008 664.905241 352.1575 652.125833 288.2205h-63.873063v-25.5748h172.470058c-12.7874-19.1811-25.558816-44.7559-38.330232-63.937l19.157124-6.3937c12.779408 19.1811 31.944524 44.7559 44.715939 70.3307h159.682658v31.9685h-63.873063c-19.157124 63.937-51.093655 121.4803-89.423887 159.8425 44.715939 38.3622 95.809594 70.3307 166.076358 89.5118l-25.550824 31.9685z","p-id":"2420"})],-1)])],8,TA)):Ae("",!0),r("span",kA,y(Me.translate?Me.translate:""),1)])):Ae("",!0)],46,pA),Me.text===`
`?(C(),L("div",CA)):Ae("",!0)],64))),128))])):Ae("",!0),he.value?(C(),L("div",{key:1,class:"tag-tips-box",style:Ft(re.value)},[r("div",EA,[r("p",{innerHTML:h(o)("promptBox.tagTips")},null,8,$A)])],4)):Ae("",!0),xe(r("div",{class:"token-controls",style:Ft(E.value),onMouseenter:R[14]||(R[14]=Me=>T.value=!0),onMouseleave:dr},[(ke=m.value[b.value])!=null&&ke.isLoraTag?Ae("",!0):(C(),L("div",AA,[xe(r("input",{type:"number","onUpdate:modelValue":R[4]||(R[4]=Me=>Fe.value=Me),step:"0.1",class:"weight-input",onChange:Ue},null,544),[[ze,Fe.value]]),r("span",LA,y(h(o)("promptBox.weight")),1)])),(Oe=m.value[b.value])!=null&&Oe.isLoraTag?(C(),L("div",IA,[r("div",MA,[xe(r("input",{type:"number","onUpdate:modelValue":R[5]||(R[5]=Me=>Lt.value=Me),step:"0.1",class:"weight-input",onChange:Qa},null,544),[[ze,Lt.value]]),r("span",OA,y(h(o)("promptBox.modelWeight")),1)]),r("div",DA,[xe(r("input",{type:"number","onUpdate:modelValue":R[6]||(R[6]=Me=>Qt.value=Me),step:"0.1",class:"weight-input",onChange:Qa},null,544),[[ze,Qt.value]]),r("span",PA,y(h(o)("promptBox.textWeight")),1)])])):Ae("",!0),r("button",{class:"favour-btn",onClick:R[7]||(R[7]=Me=>ed(m.value[b.value])),title:h(o)("promptBox.favour")},[...R[38]||(R[38]=[r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},[r("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z",fill:"#FFD700"})],-1)])],8,RA),r("button",{onClick:aa,class:"delete-btn",title:h(o)("promptBox.delete")},[...R[39]||(R[39]=[r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,NA),(Qe=m.value[b.value])!=null&&Qe.isLoraTag?Ae("",!0):(C(),L("div",FA,[r("div",BA,[R[40]||(R[40]=r("div",{class:"bracket-btn"}," () ",-1)),r("div",UA,[r("button",{class:"vertical-btn",onClick:R[8]||(R[8]=Me=>Ia("(")),title:h(o)("promptBox.addBracket")}," + ",8,zA),r("button",{class:"vertical-btn",onClick:R[9]||(R[9]=Me=>Za("(")),title:h(o)("promptBox.removeLayer")}," - ",8,VA)])]),r("div",WA,[R[41]||(R[41]=r("div",{class:"bracket-btn"}," [] ",-1)),r("div",HA,[r("button",{class:"vertical-btn",onClick:R[10]||(R[10]=Me=>Ia("[")),title:h(o)("promptBox.addBracket")}," + ",8,jA),r("button",{class:"vertical-btn",onClick:R[11]||(R[11]=Me=>Za("[")),title:h(o)("promptBox.removeLayer")}," - ",8,GA)])]),r("div",qA,[R[42]||(R[42]=r("div",{class:"bracket-btn"}," {} ",-1)),r("div",YA,[r("button",{class:"vertical-btn",onClick:R[12]||(R[12]=Me=>Ia("{")),title:h(o)("promptBox.addBracket")}," + ",8,KA),r("button",{class:"vertical-btn",onClick:R[13]||(R[13]=Me=>Za("{")),title:h(o)("promptBox.removeLayer")}," - ",8,JA)])])])),r("button",{class:"line-token-btn",onClick:Qn,title:h(o)("promptBox.addLineToken"),style:{"margin-left":"8px"}},[...R[43]||(R[43]=[r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},[r("path",{d:"M5 19h14v-2H5v2zm0-7h14v-2H5v2zm0-7v2h14V5H5z",fill:"#888"}),r("path",{d:"M7 17v-2h2v2H7zm0-7V8h2v2H7zm0-7V3h2v2H7z",fill:"#4285f4"})],-1)])],8,XA)],36),[[Hs,b.value!==null&&m.value[b.value]]]),r("div",QA,[xe(r("div",{class:"token-controls",style:Ft(Z.value),onMouseenter:R[15]||(R[15]=Me=>T.value=!0),onMouseleave:dr},[r("div",ZA,[r("div",eL,"选中 "+y(ie.value.length)+" 个标签",1),r("div",{class:"weilin-comfyui-selection-actions-buttons"},[r("button",{class:"delete-btn copy-btn",onClick:_e,title:"复制"},[...R[44]||(R[44]=[r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})],-1)])]),r("button",{class:"delete-btn",onClick:ae,title:"禁用"},[...R[45]||(R[45]=[r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"#ff4d4f","stroke-width":"2"}),r("path",{d:"M8.5 8.5l7 7",stroke:"#ff4d4f","stroke-width":"2","stroke-linecap":"round"})],-1)])]),r("button",{class:"delete-btn enable-btn",onClick:ye,title:"启用"},[...R[46]||(R[46]=[r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})],-1)])]),r("button",{class:"delete-btn",onClick:nt,title:"删除"},[...R[47]||(R[47]=[r("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])])])])],36),[[Hs,ve.value]]),r("div",{class:"tag-manager-header",onClick:As},[r("div",tL,[R[48]||(R[48]=r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[r("path",{d:"M129 128h350v80H209v224h270v80H129V128zM129 895V576h768v319H129z m80-239v159h608V656H209zM730 356c19.882 0 36-16.118 36-36s-16.118-36-36-36-36 16.118-36 36 16.118 36 36 36z"}),r("path",{d:"M578.517 214.386a32.002 32.002 0 0 0-16.01 27.731l0.058 155.918a31.998 31.998 0 0 0 16 27.701l135.156 78.033a32.002 32.002 0 0 0 31.99 0.006l135.058-77.909a32.002 32.002 0 0 0 16.01-27.731l-0.058-155.918a32 32 0 0 0-16-27.701l-135.157-78.033a31.998 31.998 0 0 0-31.989-0.005l-135.058 77.908z m67.002 58.058l84.033-48.591 84.181 48.715 0.034 95.24-84.034 48.591-84.18-48.714-0.034-95.241z"})],-1)),r("span",nL,y(h(o)("controls.loraManager")),1)]),r("div",oL,[(C(),L("svg",{class:Ve(["collapse-icon",{"is-collapsed":!ss.value}]),viewBox:"0 0 24 24"},[...R[49]||(R[49]=[r("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)])],2))])]),xe(r("div",aL,[st(Pv,{loraManager:"prompt_inner"})],512),[[Hs,ss.value]])]),r("div",sL,[r("div",{class:"tag-manager-header",onClick:as},[r("div",rL,[R[50]||(R[50]=r("svg",{class:"tag-icon",viewBox:"0 0 24 24"},[r("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),r("span",iL,y(h(o)("controls.tagManager")),1)]),r("div",lL,[(C(),L("svg",{class:Ve(["collapse-icon",{"is-collapsed":!os.value}]),viewBox:"0 0 24 24"},[...R[51]||(R[51]=[r("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)])],2))])]),xe(r("div",uL,[st($v)],512),[[Hs,os.value]])])],6)]),st($E,{ref_key:"randomSettingItem",ref:n},null,512),st(QE,{ref_key:"favourItemRef",ref:Si},null,512)],64)}}},[["__scopeId","data-v-ce9610cb"]]),mL={class:"container"},vL={class:"tab-container"},hL={key:0},_L={class:"search-container"},yL=["placeholder"],bL=["title"],wL=["title","disabled"],xL=["title"],SL={class:"history-list"},TL={class:"action-buttons"},kL=["onClick","title"],CL=["onClick","title"],EL=["onClick","title"],$L=["value"],AL={key:1},LL={class:"search-container"},IL=["placeholder"],ML=["title"],OL=["title"],DL=["title","disabled"],PL=["title"],RL={class:"history-list"},NL={key:0,class:"favor-name"},FL={class:"action-buttons"},BL=["onClick","title"],UL=["onClick","title"],zL=["onClick","title"],VL=["value"],WL={key:2,class:"weilin-tools-dialog-overlay"},HL={class:"weilin-tools-dialog-header"},jL={class:"weilin-tools-dialog-body"},GL={class:"form-group"},qL=["placeholder"],YL={class:"form-group"},KL=["placeholder"],JL={class:"form-group"},XL={class:"color-picker"},QL={class:"color-controls"},ZL={class:"alpha-control"},eI={class:"alpha-value"},tI={class:"weilin-tools-dialog-footer"},nI={key:3,class:"weilin-tools-dialog-overlay"},oI={class:"weilin-tools-dialog-header"},aI={class:"weilin-tools-dialog-body"},sI={class:"confirm-message"},rI={class:"weilin-tools-dialog-footer"},iI=Vt({__name:"history_index",setup(e){const{t}=Kt(),n=S(""),o=S([]),a=S([]),s=S([]),i=S([]),l=S("history"),d=S([]),g=S(!1),f=S(!1),m=S(!1),w=S({hex:"rgba(255, 123, 2, .4)",alpha:100}),b=S({name:"",tag:"",color:"rgba(255, 123, 2, .4)"}),T=S(!1),E=S(0),I=q=>JSON.parse(q).prompt,P=q=>({hex:"#FFFFFF",alpha:0}),N=q=>{const{hex:Y,alpha:$}=P();w.value={hex:Y,alpha:$}},pe=()=>{m.value=!1,b.value={id:"",name:"",tag:"",backgroundColor:"transparent"},N(),g.value=!0},D=q=>{const Y=q.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(Y){const[,$,A,W,ce]=Y,Ce=`#${((1<<24)+(parseInt($,10)<<16)+(parseInt(A,10)<<8)+parseInt(W,10)).toString(16).slice(1)}`,Le=ce?Math.round(parseFloat(ce)*100):100;return{hex:Ce,alpha:Le}}return{hex:"#FF7B02",alpha:50}},V=q=>{m.value=!0,b.value={...q},w.value=D(q.color),g.value=!0},fe=()=>{const q=X(w.value.hex,w.value.alpha);b.value.color=q},O=()=>{g.value=!1,b.value={name:"",tag:"",color:"rgba(255, 123, 2, .4)"},m.value=!1},se=S(""),le=S(null),Pe=$t(()=>{if(!le.value)return"";switch(se.value){case"history":return t("history.deleteHistoryConfirm",{name:le.value.tag});case"favorite":return t("history.deleteFavoriteConfirm",{name:le.value.tag});case"deleteSelected":return t("history.confirmDeleteSelected");case"deleteSelectedFavorite":return t("history.confirmDeleteSelected");default:return""}}),Ie=q=>{se.value="history",le.value=q,f.value=!0},ue=q=>{se.value="favorite",le.value=q,f.value=!0},we=()=>{T.value=!1,E.value=0,se.value="deleteSelected",le.value=d.value,f.value=!0},ne=()=>{T.value=!1,E.value=0,se.value="deleteSelectedFavorite",le.value=d.value,f.value=!0},J=()=>{try{switch(se.value){case"history":Oo.deleteHistory(le.value.id_index).then(()=>{ve(),de({type:"success",str:"message.deleteSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})});break;case"favorite":Oo.deleteFavorite(le.value.id_index).then(()=>{Z(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.deleteSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Oo.batchDeleteHistory(d.value).then(()=>{ve(),de({type:"success",str:"message.deleteSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})});break;case"deleteSelectedFavorite":Oo.batchDeleteFavorite(le.value).then(()=>{Z(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.deleteSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})});break}ee()}catch{de({type:"warn",str:"message.networkError"})}},ie=q=>{q.target.checked?l.value==="history"?d.value=o.value.map(Y=>Y.id_index):d.value=s.value.map(Y=>Y.id_index):d.value=[]},X=(q,Y)=>{const $=parseInt(q.slice(1,3),16),A=parseInt(q.slice(3,5),16),W=parseInt(q.slice(5,7),16);return`rgba(${$}, ${A}, ${W}, ${Y/100})`},ee=()=>{f.value=!1,se.value="",le.value=null},$e=()=>{if(!b.value.tag){de({type:"warn",str:"history.dialog.tag_placeholder"});return}m.value?Oo.editFavorite({id_index:b.value.id_index,name:b.value.name,tag:b.value.tag,color:b.value.color}).then(()=>{Z(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.editSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})}):Oo.addFavorite({name:b.value.name,tag:b.value.tag,color:b.value.color}).then(()=>{Z(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),de({type:"success",str:"message.addSuccess"})}).catch(()=>{de({type:"warn",str:"message.networkError"})}),O()},ve=()=>{Oo.getHistory({}).then(q=>{o.value=q.data,a.value=o.value}).catch(()=>{de({type:"warn",str:"message.networkError"})})},Z=()=>{Oo.getFavorite().then(q=>{s.value=q.data,i.value=s.value}).catch(()=>{de({type:"warn",str:"message.networkError"})})},te=()=>{a.value=o.value.filter(q=>q.tag.includes(n.value))},be=()=>{i.value=s.value.filter(q=>q.tag.includes(n.value))},Te=()=>{ve()},he=()=>{Z()},re=q=>{Oo.addFavorite({tag:q.tag}).then(Y=>{Y.code===200?(window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Z(),de({type:"success",str:"message.addFavoriteSuccess"})):de({type:"success",str:"message.addFavoriteIsExist"})}).catch(()=>{de({type:"warn",str:"message.networkError"})})},j=q=>{window.postMessage({type:"weilin_prompt_ui_user_history_tag",tagText:q.tag},"*")},oe=()=>{d.value=[],T.value=!0},B=()=>{d.value=[],T.value=!1,E.value=0};return Dt(()=>{ve(),Z()}),(q,Y)=>(C(),L("div",mL,[r("h1",null,y(l.value==="history"?h(t)("history.title"):h(t)("history.favorites")),1),r("div",vL,[r("button",{class:Ve([{active:l.value==="history"},"tab-button"]),onClick:Y[0]||(Y[0]=$=>l.value="history")},y(h(t)("history.history")),3),r("button",{class:Ve([{active:l.value==="favorites"},"tab-button"]),onClick:Y[1]||(Y[1]=$=>l.value="favorites")},y(h(t)("history.favorites")),3)]),l.value==="history"?(C(),L("div",hL,[r("div",_L,[r("button",{class:"refresh-btn",onClick:Te},[...Y[14]||(Y[14]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),xe(r("input",{type:"text","onUpdate:modelValue":Y[2]||(Y[2]=$=>n.value=$),placeholder:h(t)("history.search_placeholder"),onInput:te,class:"search-input"},null,40,yL),[[ze,n.value]]),T.value?xe((C(),L("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[3]||(Y[3]=$=>E.value=$),value:1,class:"tag-checkbox",onChange:ie},null,544)),[[on,E.value]]):Ae("",!0),T.value?Ae("",!0):(C(),L("button",{key:1,class:"bulk-delete-btn",onClick:oe,title:h(t)("history.bulk_delete")},[...Y[15]||(Y[15]=[r("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[r("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,bL)),T.value?(C(),L("button",{key:2,class:"bulk-delete-btn",onClick:we,title:h(t)("history.sure_delete"),disabled:d.value.length===0},[...Y[16]||(Y[16]=[r("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[r("path",{d:"M392.533333 806.4L85.333333 503.466667l59.733334-59.733334 247.466666 247.466667L866.133333 213.333333l59.733334 59.733334L392.533333 806.4z"})],-1)])],8,wL)):Ae("",!0),T.value?(C(),L("button",{key:3,class:"bulk-delete-btn",onClick:B,title:h(t)("history.cancel_delete")},[...Y[17]||(Y[17]=[r("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[r("path",{d:"M794.8 794.8c-14 14-36.9 14-50.9 0L229.2 280.1c-14-14-14-36.9 0-50.9s36.9-14 50.9 0L794.9 744c13.9 13.9 13.9 36.8-0.1 50.8z"}),r("path",{d:"M794.8 229.2c14 14 14 36.9 0 50.9L280.1 794.8c-14 14-36.9 14-50.9 0s-14-36.9 0-50.9L744 229.1c13.9-13.9 36.8-13.9 50.8 0.1z"})],-1)])],8,xL)):Ae("",!0)]),r("ul",SL,[(C(!0),L(qe,null,ot(a.value,$=>(C(),L("li",{key:$.id_index,class:"history-item"},[r("span",null,y(I($.tag)),1),r("div",TL,[r("button",{onClick:A=>re($),class:"favorite-btn",title:h(t)("history.add_to_favorites")},[...Y[18]||(Y[18]=[r("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"favorite-icon"},[r("path",{d:"M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"})],-1)])],8,kL),r("button",{onClick:A=>Ie($),class:"delete-favorite-btn",title:h(t)("history.delete_history")},[...Y[19]||(Y[19]=[r("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[r("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,CL),r("button",{onClick:A=>j($),class:"use-btn",title:h(t)("history.use_item")},[...Y[20]||(Y[20]=[r("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"use-icon"},[r("path",{d:"M915.515273 142.819385 98.213046 458.199122c-46.058539 17.772838-44.90475 43.601756 2.348455 57.622994l197.477685 58.594874 80.292024 238.91085c10.51184 31.277988 37.972822 37.873693 61.462483 14.603752l103.584447-102.611545 204.475018 149.840224c26.565749 19.467242 53.878547 9.222132 61.049613-23.090076l149.210699-672.34491C965.264096 147.505054 946.218922 130.971848 915.515273 142.819385zM791.141174 294.834331l-348.61988 310.610267c-6.268679 5.58499-11.941557 16.652774-12.812263 24.846818l-15.390659 144.697741c-1.728128 16.24808-7.330491 16.918483-12.497501 1.344894l-67.457277-203.338603c-2.638691-7.954906 0.975968-17.705389 8.022355-21.931178l442.114555-265.181253C812.67481 268.984974 815.674251 272.975713 791.141174 294.834331z","p-id":"18085"})],-1)])],8,EL),T.value?xe((C(),L("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[4]||(Y[4]=A=>d.value=A),value:$.id_index,class:"tag-checkbox"},null,8,$L)),[[on,d.value]]):Ae("",!0)])]))),128))])])):(C(),L("div",AL,[r("div",LL,[r("button",{class:"refresh-btn",onClick:he},[...Y[21]||(Y[21]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),xe(r("input",{type:"text","onUpdate:modelValue":Y[5]||(Y[5]=$=>n.value=$),placeholder:h(t)("history.search_placeholder"),onInput:be,class:"search-input"},null,40,IL),[[ze,n.value]]),T.value?xe((C(),L("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[6]||(Y[6]=$=>E.value=$),value:1,class:"tag-checkbox",onChange:ie},null,544)),[[on,E.value]]):Ae("",!0),r("button",{class:"add-his-btn",onClick:pe,title:h(t)("history.add_new")},[...Y[22]||(Y[22]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"add-icon"},[r("path",{d:"M19 11h-6V5c0-.55-.45-1-1-1s-1 .45-1 1v6H5c-.55 0-1 .45-1 1s.45 1 1 1h6v6c0 .55.45 1 1 1s1-.45 1-1v-6h6c.55 0 1-.45 1-1s-.45-1-1-1z"})],-1)])],8,ML),T.value?Ae("",!0):(C(),L("button",{key:1,class:"bulk-delete-btn",onClick:oe,title:h(t)("history.bulk_delete")},[...Y[23]||(Y[23]=[r("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[r("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,OL)),T.value?(C(),L("button",{key:2,class:"bulk-delete-btn",onClick:ne,title:h(t)("history.sure_delete"),disabled:d.value.length===0},[...Y[24]||(Y[24]=[r("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[r("path",{d:"M392.533333 806.4L85.333333 503.466667l59.733334-59.733334 247.466666 247.466667L866.133333 213.333333l59.733334 59.733334L392.533333 806.4z"})],-1)])],8,DL)):Ae("",!0),T.value?(C(),L("button",{key:3,class:"bulk-delete-btn",onClick:B,title:h(t)("history.cancel_delete")},[...Y[25]||(Y[25]=[r("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[r("path",{d:"M794.8 794.8c-14 14-36.9 14-50.9 0L229.2 280.1c-14-14-14-36.9 0-50.9s36.9-14 50.9 0L794.9 744c13.9 13.9 13.9 36.8-0.1 50.8z"}),r("path",{d:"M794.8 229.2c14 14 14 36.9 0 50.9L280.1 794.8c-14 14-36.9 14-50.9 0s-14-36.9 0-50.9L744 229.1c13.9-13.9 36.8-13.9 50.8 0.1z"})],-1)])],8,PL)):Ae("",!0)]),r("ul",RL,[(C(!0),L(qe,null,ot(i.value,$=>(C(),L("li",{key:$.id_index,class:"history-item"},[r("div",{class:"favor-name-box",style:Ft({backgroundColor:$.color||"transparent"})},[$.name.length>0?(C(),L("span",NL,y($.name),1)):Ae("",!0)],4),r("span",null,y(I($.tag)),1),r("div",FL,[r("button",{onClick:A=>V($),class:"delete-favorite-btn",title:h(t)("history.edit_favorite")},[...Y[26]||(Y[26]=[r("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[r("path",{d:"M200.59 626.48v129.5h129.5l381.93-381.93-129.5-129.5-381.93 381.93z m611.56-352.57c13.45-13.41 13.48-35.18 0.07-48.62l-0.07-0.07-80.81-80.81c-13.41-13.45-35.18-13.48-48.62-0.07l-0.07 0.07-63.19 63.19 129.5 129.5 63.19-63.19zM131.52 824.96h759.71c23.02 0 34.53 11.51 34.53 34.53 0 23.02-11.51 34.53-34.53 34.53H131.52c-23.02 0-34.53-11.51-34.53-34.53 0-23.02 11.51-34.53 34.53-34.53z","p-id":"2346"})],-1)])],8,BL),r("button",{onClick:A=>ue($),class:"delete-favorite-btn",title:h(t)("history.delete_favorite")},[...Y[27]||(Y[27]=[r("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[r("path",{d:"M907.618072 232.742353 744.713682 232.742353 744.713682 116.382952c0-12.852708-10.419786-23.272495-23.272495-23.272495L302.556765 93.110457c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 116.360425L116.380904 232.743377c-12.852708 0-23.272495 10.419786-23.272495 23.272495s10.418762 23.272495 23.272495 23.272495l791.237168 0c12.852708 0 23.272495-10.419786 23.272495-23.272495S920.469756 232.742353 907.618072 232.742353zM325.829259 139.654423l372.340458 0 0 93.08793L325.829259 232.742353 325.829259 139.654423zM791.257647 372.362985c-12.852708 0-23.272495 10.418762-23.272495 23.272495l0 488.712146L256.012799 884.347625 256.012799 395.635479c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 511.983617c0 12.852708 10.418762 23.272495 23.272495 23.272495l558.516318 0c12.852708 0 23.272495-10.419786 23.272495-23.272495L814.529118 395.635479C814.529118 382.782771 804.110355 372.362985 791.257647 372.362985zM442.189684 767.987201l0-372.351721c0-12.852708-10.418762-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.418762 23.272495 23.272495 23.272495S442.189684 780.839909 442.189684 767.987201zM628.353257 767.987201l0-372.351721c0-12.852708-10.419786-23.272495-23.272495-23.272495s-23.272495 10.418762-23.272495 23.272495l0 372.351721c0 12.852708 10.419786 23.272495 23.272495 23.272495S628.353257 780.839909 628.353257 767.987201z"})],-1)])],8,UL),r("button",{onClick:A=>j($),class:"use-btn",title:h(t)("history.use_favorite")},[...Y[28]||(Y[28]=[r("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"use-icon"},[r("path",{d:"M915.515273 142.819385 98.213046 458.199122c-46.058539 17.772838-44.90475 43.601756 2.348455 57.622994l197.477685 58.594874 80.292024 238.91085c10.51184 31.277988 37.972822 37.873693 61.462483 14.603752l103.584447-102.611545 204.475018 149.840224c26.565749 19.467242 53.878547 9.222132 61.049613-23.090076l149.210699-672.34491C965.264096 147.505054 946.218922 130.971848 915.515273 142.819385zM791.141174 294.834331l-348.61988 310.610267c-6.268679 5.58499-11.941557 16.652774-12.812263 24.846818l-15.390659 144.697741c-1.728128 16.24808-7.330491 16.918483-12.497501 1.344894l-67.457277-203.338603c-2.638691-7.954906 0.975968-17.705389 8.022355-21.931178l442.114555-265.181253C812.67481 268.984974 815.674251 272.975713 791.141174 294.834331z","p-id":"18085"})],-1)])],8,zL),T.value?xe((C(),L("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[7]||(Y[7]=A=>d.value=A),value:$.id_index,class:"tag-checkbox"},null,8,VL)),[[on,d.value]]):Ae("",!0)])]))),128))])])),g.value?(C(),L("div",WL,[r("div",{class:"weilin-tools-dialog-content",onMousedown:Y[12]||(Y[12]=vt(()=>{},["stop"]))},[r("div",HL,[r("h2",null,y(m.value?h(t)("history.dialog.edit_tag"):h(t)("history.dialog.add_tag")),1),r("button",{class:"close-btn",onClick:O},"×")]),r("div",jL,[r("div",GL,[r("label",null,y(h(t)("history.dialog.name")),1),xe(r("input",{type:"text","onUpdate:modelValue":Y[8]||(Y[8]=$=>b.value.name=$),placeholder:h(t)("history.dialog.name_placeholder")},null,8,qL),[[ze,b.value.name]])]),r("div",YL,[r("label",null,y(h(t)("history.dialog.tag")),1),xe(r("textarea",{"onUpdate:modelValue":Y[9]||(Y[9]=$=>b.value.tag=$),placeholder:h(t)("history.dialog.tag_placeholder"),rows:"4"}," ",8,KL),[[ze,b.value.tag]])]),r("div",JL,[r("label",null,y(h(t)("history.dialog.background_color")),1),r("div",XL,[r("div",{class:"color-preview",style:Ft({backgroundColor:q.previewColor})},null,4),r("div",QL,[xe(r("input",{type:"color","onUpdate:modelValue":Y[10]||(Y[10]=$=>w.value.hex=$),onInput:fe,class:"color-input"},null,544),[[ze,w.value.hex]]),r("div",ZL,[xe(r("input",{type:"range","onUpdate:modelValue":Y[11]||(Y[11]=$=>w.value.alpha=$),min:"0",max:"100",onInput:fe,class:"alpha-slider"},null,544),[[ze,w.value.alpha,void 0,{number:!0}]]),r("span",eI,y(w.value.alpha)+"%",1)])])])])]),r("div",tI,[r("button",{class:"cancel-btn",onClick:O},y(h(t)("common.cancel")),1),r("button",{class:"confirm-btn",onClick:$e},y(h(t)("common.confirm")),1)])],32)])):Ae("",!0),f.value?(C(),L("div",nI,[r("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:Y[13]||(Y[13]=vt(()=>{},["stop"]))},[r("div",oI,[r("h2",null,y(h(t)("common.confirmDelete")),1),r("button",{class:"close-btn",onClick:ee},"×")]),r("div",aI,[r("p",sI,y(Pe.value),1)]),r("div",rI,[r("button",{class:"cancel-btn",onClick:ee},y(h(t)("common.cancel")),1),r("button",{class:"delete-btn",onClick:J},y(h(t)("common.delete")),1)])],32)])):Ae("",!0)]))}},[["__scopeId","data-v-6d1ae298"]]),lI={key:0,class:"drop-zone"},uI={key:1,class:"preview-container"},cI=["srcdoc"],dI={class:"action-buttons"},Uv="weilin_tools_",pI=Vt({__name:"tranToWeb",emits:["close","update"],setup(e,{expose:t,emit:n}){const{t:o}=Kt(),a=S(!1),s=S(""),i=S(null),l={tranToWeb:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},g=S((()=>{try{const se=localStorage.getItem(`${Uv}tranToWebState`);if(se){const le=JSON.parse(se),Pe={...l};return le.tranToWeb&&(Pe.tranToWeb={...l.tranToWeb,...le.tranToWeb}),Pe}}catch(se){console.error("Error loading window states:",se)}return{...l}})());St(g,se=>{try{localStorage.setItem(`${Uv}tranToWebState`,JSON.stringify(se))}catch(le){console.error("Error saving window states:",le)}},{deep:!0}),Dt(()=>{rt.registerWindow("tranToWeb")}),go(()=>{rt.unregisterWindow("tranToWeb")});const f=()=>{a.value=!1},m=(se,le)=>{g.value[se]&&(g.value[se].position={...le})},w=(se,le)=>{g.value[se]&&(g.value[se].size={...le})},b=()=>{a.value=!0,rt.setActiveWindow("tranToWeb")},T=se=>{se.dataTransfer.dropEffect="copy"},E=se=>{const le=se.dataTransfer.files[0];le&&le.type.startsWith("image/")&&P(le)},I=se=>{const le=se.clipboardData.items;for(let Pe=0;Pe<le.length;Pe++)if(le[Pe].type.startsWith("image/")){const Ie=le[Pe].getAsFile();P(Ie);break}},P=se=>{const le=new FileReader;le.onload=Pe=>{const Ie=Pe.target.result,ue=btoa(Ie);i.value=ue,N()},le.readAsDataURL(se)},N=()=>{s.value=`
<!DOCTYPE html>
<html>
<head>
<title>WeiLin Comfyui Tools - Image to HTML</title>
<style>
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
</style>
<script>
window.onload = function() {
// 解密图片数据
try {
const encryptedData = "${i.value}";
const originalData = atob(encryptedData);
document.getElementById('decrypted-img').src = originalData;
document.getElementById('decrypted-img').style.display = 'block';
} catch(e) {
console.error('解密失败:', e);
document.body.innerHTML = '<p>图片解密失败</p>';
}
};
<\/script>
</head>
<body>
<img id="decrypted-img" style="display:none;" />
</body>
</html>
`},pe=()=>{const se=new Blob([s.value],{type:"text/html"}),le=URL.createObjectURL(se),Pe=document.createElement("a");Pe.href=le,Pe.download="image-to-html.html",document.body.appendChild(Pe),Pe.click(),document.body.removeChild(Pe),URL.revokeObjectURL(le)},D=()=>{s.value="",i.value=null},V=S(null),fe=()=>{s.value||V.value.click()},O=se=>{const le=se.target.files[0];le&&le.type.startsWith("image/")&&P(le)};return t({open:b}),(se,le)=>a.value?(C(),Zt(ho,{key:0,title:h(o)("utils.tranToWeb"),position:g.value.tranToWeb.position,size:g.value.tranToWeb.size,"z-index":h(rt).getZIndex("tranToWeb"),"onUpdate:position":le[0]||(le[0]=Pe=>m("tranToWeb",Pe)),"onUpdate:size":le[1]||(le[1]=Pe=>w("tranToWeb",Pe)),onActive:le[2]||(le[2]=Pe=>h(rt).setActiveWindow("tranToWeb")),onClose:le[3]||(le[3]=Pe=>f())},{default:Ut(()=>[r("div",{class:"utils_tran_web__content",onDragover:vt(T,["prevent"]),onDrop:vt(E,["prevent"]),onPaste:I,onClick:fe},[s.value?(C(),L("div",uI,[r("iframe",{srcdoc:s.value,class:"html-preview"},null,8,cI),r("div",dI,[r("button",{onClick:pe},y(h(o)("utils.downloadHtml")),1),r("button",{onClick:D},y(h(o)("utils.clear")),1)])])):(C(),L("div",lI,y(h(o)("utils.dropOrPasteImage")),1)),r("input",{type:"file",ref_key:"fileInput",ref:V,style:{display:"none"},accept:"image/*",onChange:O},null,544)],32)]),_:1},8,["title","position","size","z-index"])):Ae("",!0)}},[["__scopeId","data-v-a865c34f"]]),fI=["onMouseenter","onMouseleave","onMousedown","onMouseup"],gI=Vt({__name:"FloatingBall",setup(e){const{t}=Kt(),n=S(parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallCount"),10)||1),o=S(parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallSize"),10)||66),a=S(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||o.value),s=S(localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default"),i=S(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),l=S(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),d=S(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),g=S(localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc"),f=S(localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50);n.value<1&&(n.value=1,localStorage.setItem("weilin_prompt_ui_floatingBallCount",n.value)),o.value<5&&(o.value=66,localStorage.setItem("weilin_prompt_ui_floatingBallSize",o.value)),a.value<5&&(a.value=66,localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",a.value)),localStorage.getItem("weilin_prompt_ui_floatingBallCount")||localStorage.setItem("weilin_prompt_ui_floatingBallCount",n.value),localStorage.getItem("weilin_prompt_ui_floatingBallSize")||localStorage.setItem("weilin_prompt_ui_floatingBallSize",o.value),localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",o.value);const m=S([]),w=S([]),b=S([]),T=S([]),E=S(null),I=$t(()=>T.value.map(Ie=>{const ue={...Ie};return s.value==="custom"&&i.value?(ue.backgroundImage=`url(${i.value})`,ue.backgroundSize="contain",ue.backgroundRepeat="no-repeat",ue.backgroundPosition="center",ue.imageRendering="optimizeQuality"):l.value==="gradient"?ue.background=`linear-gradient(135deg, ${d.value}, ${g.value})`:ue.background="transparent",ue.borderRadius=`${f.value}%`,ue}));for(let Ie=0;Ie<n.value;Ie++){b.value[Ie]=!1,w.value[Ie]=!1;const ue=window.innerWidth,we=window.innerHeight,ne=o.value,J=a.value,ie=10,X=Math.floor(ue/(ne+ie)),ee=Math.floor(Ie/X);let ve=20+Ie%X*(ne+ie),Z=we-100-ee*(J+ie);ve=Math.max(0,ve),ve=Math.min(ve,ue-ne),Z=Math.max(0,Z),Z=Math.min(Z,we-J),m.value[Ie]={x:ve,y:Z,width:`${ne}px`,height:`${J}px`},T.value[Ie]={left:`${m.value[Ie].x}px`,top:`${m.value[Ie].y}px`,width:`${ne}px`,height:`${J}px`}}const P=(Ie,ue)=>{Ie.target.closest(".weilin_prompt_ui_floating-ball")&&(w.value[ue]=!0,document.addEventListener("mousemove",ne=>N(ne,ue)),document.addEventListener("mouseup",ne=>pe(ne,ue)))},N=(Ie,ue)=>{if(w.value[ue]){const we=window.innerWidth,ne=window.innerHeight,J=o.value,ie=a.value;let X=Ie.clientX-J/2,ee=Ie.clientY-ie/2;X=Math.max(0,X),X=Math.min(X,we-J),ee=Math.max(0,ee),ee=Math.min(ee,ne-ie),m.value[ue]={x:X,y:ee,width:`${J}px`,height:`${ie}px`},T.value[ue]={left:`${m.value[ue].x}px`,top:`${m.value[ue].y}px`,width:`${J}px`,height:`${ie}px`}}},pe=(Ie,ue)=>{w.value[ue]=!1,document.removeEventListener("mousemove",we=>N(we,ue)),document.removeEventListener("mouseup",we=>pe(we,ue))},D=()=>{},V=Ie=>{switch(Ie){case"item1":window.parent.postMessage({type:"weilin_prompt_ui_open_global_prompt_box"},"*");break;case"item2":window.parent.postMessage({type:"weilin_prompt_ui_open_global_tag_manager"},"*");break;case"item3":window.parent.postMessage({type:"weilin_prompt_ui_open_global_lora_manager"},"*");break;case"item4":window.parent.postMessage({type:"weilin_prompt_ui_openAiWindow"},"*");break;case"item5":window.parent.postMessage({type:"weilin_prompt_ui_restore_window"},"*");break;case"item6":window.parent.postMessage({type:"weilin_prompt_ui_open_node_list_window"},"*");break;case"item7":O();break;case"item8":E.value.open();break}},fe=S(),O=()=>{fe.value.open()},se=Ie=>{if(!(!Ie.data||!Ie.data.type)&&Ie.data.type.startsWith("weilin_prompt_ui_")&&Ie.data.type==="weilin_prompt_ui_floating_ball_setting"){n.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallCount"),10)||1,o.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallSize"),10)||66,a.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize"),10)||o.value,s.value=localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default",i.value=localStorage.getItem("weilin_prompt_ui_customSkinUrl")||"",l.value=localStorage.getItem("weilin_prompt_ui_bgType")||"gradient",d.value=localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb",g.value=localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc",f.value=localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50,b.value=[],w.value=[],m.value=[],T.value=[];for(let ue=0;ue<n.value;ue++){b.value[ue]=!1,w.value[ue]=!1;const we=window.innerWidth,ne=window.innerHeight,J=o.value,ie=a.value,X=10,ee=Math.floor(we/(J+X)),$e=Math.floor(ue/ee);let Z=20+ue%ee*(J+X),te=ne-100-$e*(ie+X);Z=Math.max(0,Z),Z=Math.min(Z,we-J),te=Math.max(0,te),te=Math.min(te,ne-ie),m.value[ue]={x:Z,y:te,width:`${J}px`,height:`${ie}px`},T.value[ue]={left:`${m.value[ue].x}px`,top:`${m.value[ue].y}px`,width:`${J}px`,height:`${ie}px`,...s.value==="custom"&&i.value?{backgroundImage:`url(${i.value})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}:l.value==="gradient"?{background:`linear-gradient(135deg, ${d.value}, ${g.value})`}:{background:"transparent"},borderRadius:`${f.value}%`}}}},le=Ie=>{b.value[Ie]=!0},Pe=Ie=>{b.value[Ie]=!1};return Dt(()=>{window.addEventListener("message",se)}),go(()=>{window.removeEventListener("message",se),document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",pe)}),(Ie,ue)=>(C(),L(qe,null,[(C(!0),L(qe,null,ot(n.value,we=>(C(),L("div",{class:"weilin_prompt_ui_floating-ball",style:Ft(I.value[we-1]),onMouseenter:ne=>le(we-1),onMouseleave:ne=>Pe(we-1),onMousedown:ne=>P(ne,we-1),onMouseup:ne=>pe(ne,we-1),key:"floating-ball-"+we},[r("div",{class:"weilin_prompt_ui_ball-content",onClick:D},y(s.value==="default"?"WeiLin":""),1),b.value[we-1]?(C(),L("div",{key:0,class:"weilin_prompt_ui_menu-container",onMousedown:ue[8]||(ue[8]=vt(()=>{},["stop"]))},[r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[0]||(ue[0]=ne=>V("item1"))},y(h(t)("floatingBall.promptBox")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[1]||(ue[1]=ne=>V("item2"))},y(h(t)("floatingBall.tagManager")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[2]||(ue[2]=ne=>V("item3"))},y(h(t)("floatingBall.loraManager")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[3]||(ue[3]=ne=>V("item4"))},y(h(t)("floatingBall.aiWindow")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[4]||(ue[4]=ne=>V("item6"))},y(h(t)("floatingBall.openNodeListWindow")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[5]||(ue[5]=ne=>V("item7"))},y(h(t)("floatingBall.tranToWeb")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[6]||(ue[6]=ne=>V("item8"))},y(h(t)("floatingBall.openSetting")),1),r("div",{class:"weilin_prompt_ui_menu-item",onClick:ue[7]||(ue[7]=ne=>V("item5"))},y(h(t)("floatingBall.restoreWindow")),1)],32)):Ae("",!0)],44,fI))),128)),st(pI,{ref_key:"tranToWebRef",ref:fe},null,512),st(xm,{ref_key:"settingDialog",ref:E},null,512)],64))}},[["__scopeId","data-v-dc48fe8a"]]),mI={class:"ai-chat-window"},vI={class:"history-sidebar"},hI={class:"history-list"},_I=["onClick"],yI={key:0},bI=["onKeyup","onBlur"],wI={class:"item-actions"},xI=["onClick"],SI=["onClick"],TI={class:"chat-main"},kI={class:"message-list"},CI={class:"message-content"},EI={key:0,class:"message assistant"},$I={class:"message-content"},AI={class:"input-area"},LI=["placeholder","onKeydown"],II=["disabled"],MI=Vt({__name:"ai_window",setup(e){const{t}=Kt(),n=S([]),o=S(-1),a=S(""),s=S(!1),i=S({}),l=S(!1),d=S(""),g=V=>{var fe;n.value[V]&&(l.value=!0,d.value=((fe=n.value[V])==null?void 0:fe.title)||`对话 ${V+1}`,o.value=V)},f=V=>{n.value[V]&&(d.value.trim()&&(n.value[V].title=d.value.trim(),P()),l.value=!1)},m=()=>{l.value=!1},w=()=>{ii.getOpenAiSetting().then(V=>{i.value=V.data}).catch(()=>{de({type:"warn",str:"message.networkError"})})};Dt(()=>{w()});const b=$t(()=>n.value[o.value]||{messages:[]}),T=V=>{o.value=V},E=()=>{s.value=!0;const V={title:`对话 ${n.value.length+1}`,messages:[],createdAt:new Date().toISOString()};return n.value.push(V),o.value=n.value.length-1,P(),s.value=!1,V},I=()=>{const V=localStorage.getItem("aiChatHistory");V&&(n.value=JSON.parse(V))},P=()=>{localStorage.setItem("aiChatHistory",JSON.stringify(n.value))};Dt(()=>{w(),I()});const N=async()=>{if(!a.value.trim()||s.value)return;(n.value.length===0||o.value===-1)&&E();const V={role:"user",content:a.value,timestamp:new Date().toISOString()};b.value.messages.push(V),P(),a.value="";const fe={role:"assistant",content:"",timestamp:new Date().toISOString()};b.value.messages.push(fe),P(),s.value=!0;try{await D({messages:b.value.messages},O=>{const se=b.value.messages[b.value.messages.length-1];se.content+=O.content,P()},O=>{console.error("Error:",O);const se=b.value.messages[b.value.messages.length-1];se.content="抱歉,出错了,请稍后再试。",P()},()=>{s.value=!1,P()})}catch(O){console.error("Error:",O),s.value=!1;const se=b.value.messages[b.value.messages.length-1];se.content="请求失败,请检查网络连接。",P()}},pe=V=>{n.value.splice(V,1),o.value===V&&(o.value=Math.max(0,V-1)),P()},D=async(V,fe,O,se)=>{var le,Pe;try{const Ie=await fetch(`${i.value.base_url}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${i.value.api_key}`},body:JSON.stringify({model:i.value.model,messages:V.messages,stream:!0})});if(!Ie.ok)throw new Error(`HTTP error! status: ${Ie.status}`);const ue=Ie.body.getReader(),we=new TextDecoder;let ne="";for(;;){const{done:J,value:ie}=await ue.read();if(J){se();break}ne+=we.decode(ie,{stream:!0});const X=ne.split(`
`);ne=X.pop();for(const ee of X)if(ee.trim()!==""){if(ee==="data: [DONE]"){se();return}try{const $e=ee.replace(/^data: /,""),Z=((Pe=(le=JSON.parse($e).choices[0])==null?void 0:le.delta)==null?void 0:Pe.content)||"";Z&&fe({content:Z})}catch{console.error("Failed to parse message:",ee)}}}}catch(Ie){O(Ie)}};return(V,fe)=>(C(),L("div",mI,[r("div",vI,[r("button",{class:"new-chat-btn",onClick:E},y(h(t)("aiWindow.newChat")),1),r("div",hI,[(C(!0),L(qe,null,ot(n.value,(O,se)=>(C(),L("div",{key:se,class:Ve(["history-item",{active:o.value===se}]),onClick:le=>T(se)},[!l.value||o.value!==se?(C(),L("span",yI,y((O==null?void 0:O.title)||h(t)("aiWindow.chatName")+` ${se+1}`),1)):xe((C(),L("input",{key:1,"onUpdate:modelValue":fe[0]||(fe[0]=le=>d.value=le),onKeyup:[Nn(le=>f(se),["enter"]),Nn(m,["esc"])],onBlur:le=>f(se),class:"rename-input"},null,40,bI)),[[ze,d.value]]),r("div",wI,[r("button",{class:"rename-btn",onClick:vt(le=>g(se),["stop"])},"✎",8,xI),l.value?Ae("",!0):(C(),L("button",{key:0,class:"delete-btn",onClick:vt(le=>pe(se),["stop"])},"×",8,SI))])],10,_I))),128))])]),r("div",TI,[r("div",kI,[(C(!0),L(qe,null,ot(b.value.messages,(O,se)=>(C(),L("div",{key:se,class:Ve(["message",O.role])},[r("div",CI,[r("pre",null,y(O.content),1)])],2))),128)),s.value?(C(),L("div",EI,[r("div",$I,[r("pre",null,y(h(t)("aiWindow.thinking")),1)])])):Ae("",!0)]),r("div",AI,[xe(r("textarea",{class:"ai-chat-textarea","onUpdate:modelValue":fe[1]||(fe[1]=O=>a.value=O),placeholder:h(t)("aiWindow.inputMessage"),onKeydown:Nn(vt(N,["exact","prevent"]),["enter"])},null,40,LI),[[ze,a.value]]),r("button",{class:"ai-chat-btn",onClick:N,disabled:s.value},y(h(t)("aiWindow.send")),9,II)])])]))}},[["__scopeId","data-v-a48359ca"]]),OI={class:"lora-info"},DI={class:"lora-header"},PI=["title"],RI={class:"lora-weights"},NI={class:"weight-item"},FI=["title"],BI={class:"weight-item"},UI={class:"center-box"},zI=["onClick"],Rl="weilin_prompt_ui_",VI=Vt({__name:"index",setup(e){const{t}=Kt(),n=S([]);window.addEventListener("message",a=>{a.data.type==="weilin_prompt_ui_update_node_list_info"&&(n.value=a.data.nodeList)});const o=a=>{window.postMessage({type:"weilin_prompt_ui_prompt_open_node_wit_seed",seed:a},"*")};return Dt(()=>{window.postMessage({type:"weilin_prompt_ui_prompt_get_node_list_info"},"*")}),(a,s)=>(C(),L("div",{class:Ve(`${Rl}lora-stack`)},[r("div",{class:Ve(`${Rl}lora-content`)},[r("div",{class:Ve(`${Rl}lora-body`)},[r("div",{class:Ve(`${Rl}lora-list`)},[(C(!0),L(qe,null,ot(n.value,i=>(C(),L("div",{key:i.id,class:"lora-item"},[r("div",OI,[r("div",DI,[r("span",{class:"lora-name",title:i.title},"#"+y(i.id)+" - "+y(i.title),9,PI)]),r("div",RI,[r("div",NI,[r("div",{class:"text-label",title:i.text},y(i.text),9,FI)]),r("div",BI,[r("div",UI,[r("button",{onClick:l=>o(i.seed),class:"open-button"},y(h(t)("nodeListWindow.openPromptUI")),9,zI)])])])])]))),128))],2)],2)],2)],2))}},[["__scopeId","data-v-bd98d345"]]),jc={getTreeFromCloud:e=>Ye({url:"/cloud/get/tree",method:"post",data:{path:e}}),getLocalInstallPackage:()=>Ye({url:"/cloud/get/local/package",method:"post",data:{}}),installSelectPackage:(e,t)=>Ye({url:"/cloud/download/file",method:"post",timeout:0,data:{paths:t,path:e}})},WI={class:"cloud-manager"},HI={class:"weilin-toolbar"},jI={class:"current-path"},GI={class:"file-list"},qI={class:"file-info"},YI={class:"file-name"},KI={class:"file-type"},JI={class:"file-actions"},XI=["onClick"],QI={key:1,class:"install-container"},ZI={key:0,class:"installed-badge"},eM=["onClick","disabled"],tM=Vt({__name:"index",setup(e){const{t}=Kt(),n=S([]),o=S("tags"),a=S("tags"),s=S([]),i=async E=>{try{const I=await jc.getTreeFromCloud(E);n.value=I.data}catch(I){console.error("获取文件树失败:",I),de({type:"warn",str:"message.networkError"})}},l=async()=>{try{const E=await jc.getLocalInstallPackage();s.value=E.data||[]}catch(E){console.error("获取已安装包列表失败:",E),de({type:"warn",str:"message.networkError"})}},d=E=>s.value.some(I=>I===E),g=async E=>{try{const I=n.value.find(P=>P.path===E);I&&(I.isInstalling=!0,await jc.installSelectPackage(a.value,[E]).then(()=>{l(),de({type:"success",str:"message.installPackageSuccess"})}))}catch(I){console.error("安装包失败:",I),de({type:"warn",str:"message.installPackageFail"})}finally{const I=n.value.find(P=>P.path===E);I&&(I.isInstalling=!1)}},f=()=>{const E=o.value.split("/");E.length>1&&(o.value=E.slice(0,-1).join("/"),i(o.value))},m=()=>{i(o.value),l()},w=E=>{o.value=E,i(E)},b=()=>{a.value="tags",o.value="tags",i(o.value)},T=()=>{a.value="danbooru",o.value="danbooru",i(o.value)};return Dt(()=>{i(o.value),l()}),(E,I)=>(C(),L("div",WI,[r("div",HI,[r("button",{class:"refresh-btn",onClick:m},[...I[0]||(I[0]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[r("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"})],-1)])]),r("button",{class:"database-btn",onClick:b},[I[1]||(I[1]=r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[r("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"})],-1)),r("span",null,y(h(t)("cloudWindow.tagDatabase")),1)]),r("button",{class:"database-btn",onClick:T},[I[2]||(I[2]=r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[r("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4v4z"})],-1)),r("span",null,y(h(t)("cloudWindow.danbooruDatabase")),1)]),r("div",jI,[r("span",null,y(h(t)("cloudWindow.currentPath"))+": "+y(a.value=="tags"?h(t)("cloudWindow.tagDatabase"):h(t)("cloudWindow.danbooruDatabase")),1)])]),r("div",GI,[o.value!=="tags"&&o.value!=="danbooru"?(C(),L("button",{key:0,class:"back-btn",onClick:f},[I[3]||(I[3]=r("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[r("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),ct(" "+y(h(t)("cloudWindow.back")),1)])):Ae("",!0),(C(!0),L(qe,null,ot(n.value,P=>(C(),L("div",{key:P.path,class:"file-item"},[r("div",qI,[r("span",YI,y(P.name),1),r("span",KI,y(P.type=="dir"?"文件夹":P.type=="file"?"文件":"其它未知文件"),1)]),r("div",JI,[P.type==="dir"?(C(),L("button",{key:0,onClick:N=>w(P.path),class:"open-btn"},y(h(t)("cloudWindow.open")),9,XI)):P.type==="file"?(C(),L("div",QI,[d(P.path)?(C(),L("span",ZI,y(h(t)("cloudWindow.installed")),1)):(C(),L("button",{key:1,onClick:N=>g(P.path),class:"install-btn",disabled:P.isInstalling},y(P.isInstalling?h(t)("cloudWindow.installing"):h(t)("cloudWindow.install")),9,eM))])):Ae("",!0)])]))),128))])]))}},[["__scopeId","data-v-d34491cd"]]),nM={class:"header-actions"},oM=["title"],aM=["onMouseover","onDragstart","onDrop"],sM={class:"lora-info"},rM={class:"lora-header"},iM=["title"],lM={class:"lora-actions"},uM=["onClick","title"],cM=["onClick","title"],dM={class:"lora-weights-row"},pM={class:"weight-item-col"},fM=["onUpdate:modelValue"],gM={class:"weight-item-col"},mM=["onUpdate:modelValue"],vM={class:"weight-item-col"},hM=["onUpdate:modelValue"],_M={class:"switch-item-col"},yM={class:"switch"},bM=["checked","onChange"],sr="weilin_prompt_ui_",wM=Vt({__name:"lora_stack",setup(e,{expose:t}){const{t:n}=Kt(),o=S([]),a=S(""),s=()=>`lora_stack_${Math.random().toString(36).substring(2,15)}`;Dt(()=>{a.value||(a.value=s())});let i=!1;const l=J=>{if(J.data.type===`weilin_prompt_ui_selectLora_stack_${a.value}`)O(J.data.lora);else if(J.data.type===`weilin_prompt_ui_prompt_node_finish_lora_stack_${a.value}`)try{const ie=JSON.parse(J.data.data);i=!0,ie.temp_lora&&ie.temp_lora.length>0&&ie.temp_lora!==""?o.value=ie.temp_lora:ie.lora&&ie.lora!==""?o.value=ie.lora:o.value=[],yt(()=>{i=!1})}catch(ie){console.error("解析节点lora数据失败:",ie),i=!1}else if(J.data.type===`weilin_prompt_ui_query_lora_stack_response_${a.value}`)try{const ie=JSON.parse(J.data.data);i=!0,ie.temp_lora&&ie.temp_lora.length>0?o.value=ie.temp_lora:o.value=[],yt(()=>{i=!1})}catch(ie){console.error("解析节点查询响应失败:",ie),i=!1}};window.addEventListener("message",l);const d=(J,ie)=>{if(a.value=ie,window.postMessage({type:`weilin_prompt_ui_query_lora_stack_${a.value}`},"*"),J.length>0)try{const X=JSON.parse(J);if(X.lora&&X.lora!==""&&(o.value=X.lora),X.temp_lora&&X.temp_lora.length>0&&X.temp_lora!==""){const ee=X.temp_lora;o.value=ee}}catch{de({type:"warn",str:"promptBox.settings.errorPrompt"})}},g=S(!1),f=S(""),m=S(100),w=S(0),b=S(),T=S(!1),E=S(!1),I=S(),P=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora_stack",seed:a.value},"*")},N=J=>{J.hidden=!J.hidden},pe=(J,ie)=>{if(E.value=!0,f.value===J&&g.value)return;const ee=ie.currentTarget.getBoundingClientRect(),ve={left:ee.left-450-10,top:ee.top};ve.left<10&&(ve.left=ee.right+10),ve.top=Math.max(10,Math.min(ve.top,window.innerHeight-310)),m.value=ve.left,w.value=ve.top,g.value=!0,f.value=J,yt(()=>{I.value.refresh()})},D=()=>{E.value=!1,setTimeout(()=>{!T.value&&!E.value&&(g.value=!1,f.value="",T.value=!1)},200)},V=()=>{T.value=!0,E.value=!0},fe=()=>{g.value=!1,f.value="",T.value=!1},O=J=>{const ie=o.value.findIndex(X=>X.name===J.name);ie===-1?o.value.push({name:J.name,weight:1,text_encoder_weight:1,...J}):o.value[ie]={...o.value[ie],...J,weight:o.value[ie].weight,text_encoder_weight:o.value[ie].text_encoder_weight}},se=J=>{const ie=o.value.findIndex(X=>X.name===J.name);ie>-1&&o.value.splice(ie,1)},le=S(),Pe=J=>{le.value.open({name:J.lora})};St(o,()=>{i||Ie()},{deep:!0});const Ie=()=>{const J=o.value.filter($e=>!$e.hidden),ie={lora:J.length>0?J:"",temp_lora:o.value.length>0?o.value:[]},X=JSON.stringify(ie);window.postMessage({type:`weilin_prompt_ui_prompt_node_finish_lora_stack_${a.value}`,data:X},"*");const ee=J.map($e=>`<wlr:${$e.lora?$e.lora.replace(".safetensors",""):$e.name}:${$e.weight||1}:${$e.text_encoder_weight||1}:${$e.trigger_weight||1}>`);window.postMessage({type:`weilin_prompt_ui_update_lora_tags_${a.value}`,tags:ee},"*")},ue=S(null),we=J=>{ue.value=J},ne=J=>{if(ue.value===null||ue.value===J)return;const ie=o.value.splice(ue.value,1)[0];o.value.splice(J,0,ie),ue.value=null,Ie()};return t({initLoraStack:d}),(J,ie)=>(C(),L("div",{class:Ve(`${sr}lora-stack`)},[r("div",{class:Ve(`${sr}lora-content`)},[r("div",{class:Ve(`${sr}lora-header`)},[r("div",nM,[r("button",{class:Ve(`${sr}add-btn`),onClick:P,title:h(n)("controls.addLora")},[...ie[1]||(ie[1]=[r("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[r("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)])],10,oM)])],2),r("div",{class:Ve(`${sr}lora-body`)},[r("div",{class:Ve(`${sr}lora-list`)},[(C(!0),L(qe,null,ot(o.value,(X,ee)=>(C(),L("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:b,key:X.name,class:Ve(["lora-item",{"hidden-lora":X.hidden}]),onMouseover:$e=>pe(X.lora,$e),onMouseleave:D,draggable:"true",onDragstart:$e=>we(ee),onDragover:ie[0]||(ie[0]=vt(()=>{},["prevent"])),onDrop:$e=>ne(ee)},[r("div",sM,[r("div",rM,[r("span",{class:"lora-name",title:X.name},y(X.name),9,iM),r("div",lM,[r("button",{class:"look-on-btn",onClick:$e=>Pe(X),title:h(n)("controls.lookOnLora")},[...ie[2]||(ie[2]=[r("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[r("path",{d:"M576.5 930.2H163.1c-52.9 0-96-43.1-96-96v-672c0-52.9 43.1-96 96-96h672c52.9 0 96 43.1 96 96V577c0 17.7-14.3 32-32 32s-32-14.3-32-32V162.2c0-17.6-14.4-32-32-32h-672c-17.6 0-32 14.4-32 32v672c0 17.6 14.4 32 32 32h413.4c17.7 0 32 14.3 32 32s-14.3 32-32 32z","p-id":"3466"}),r("path",{d:"M692.4 322.3H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h446.7c17.7 0 32 14.3 32 32s-14.3 32-32 32zM388.5 530.2H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.6-14.3 32-31.9 32zM388.5 738H245.7c-17.7 0-32-14.3-32-32s14.3-32 32-32h142.7c17.7 0 32 14.3 32 32 0.1 17.7-14.3 32-31.9 32z","p-id":"3467"}),r("path",{d:"M624.1 792.5c-94.8 0-172-77.2-172-172s77.2-172 172-172 172 77.2 172 172-77.1 172-172 172z m0-280c-59.6 0-108 48.4-108 108s48.4 108 108 108 108-48.4 108-108-48.4-108-108-108z","p-id":"3468"}),r("path",{d:"M820.8 864.2L710.5 753.9c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L866 818.9c12.5 12.5 12.5 32.8 0 45.3s-32.7 12.5-45.2 0z","p-id":"3469"})],-1)])],8,uM),r("button",{class:"remove-btn",onClick:$e=>se(X),title:h(n)("controls.removeLora")},[...ie[3]||(ie[3]=[r("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[r("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)])],8,cM)])]),r("div",dM,[r("div",pM,[r("label",null,y(h(n)("loraManager.modelWeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":$e=>X.weight=$e,class:"lora-weight",step:"0.1"},null,8,fM),[[ze,X.weight]])]),r("div",gM,[r("label",null,y(h(n)("loraManager.textEncoderWeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":$e=>X.text_encoder_weight=$e,class:"lora-weight",step:"0.1"},null,8,mM),[[ze,X.text_encoder_weight]])]),r("div",vM,[r("label",null,y(h(n)("loraManager.triggerWeight")),1),xe(r("input",{type:"number","onUpdate:modelValue":$e=>X.trigger_weight=$e,class:"lora-weight",step:"0.1"},null,8,hM),[[ze,X.trigger_weight]])]),r("div",_M,[r("label",null,y(X.hidden?h(n)("lora.hideLora"):h(n)("lora.showLora")),1),r("label",yM,[r("input",{type:"checkbox",checked:!X.hidden,onChange:$e=>N(X)},null,40,bM),ie[4]||(ie[4]=r("span",{class:"slider"},null,-1))])])])])],42,aM))),128))],2)],2)],2),st(Pl,{ref_key:"loraDetailLoraStackRef",ref:le},null,512),g.value?(C(),Zt(Wc,{key:0,ref_key:"loraCardItem",ref:I,fileNmae:f.value,paddingLeft:m.value,paddingTop:w.value,onCardLeave:fe,onCardenter:V},null,8,["fileNmae","paddingLeft","paddingTop"])):Ae("",!0)],2))}},[["__scopeId","data-v-0a691b76"]]),rr={searchDanbooru:(e="",t=1,n=100)=>Ye({url:"/danbooru/get_tags",method:"post",data:{search:e,page:t,limit:n}}),addDanbooruTag:e=>Ye({url:"/danbooru/add_tag",method:"post",data:e}),updateDanbooruTag:e=>Ye({url:"/danbooru/update_tag",method:"post",timeout:0,data:e}),deleteDanbooruTag:e=>Ye({url:"/danbooru/delete_tag",method:"post",timeout:0,data:{id:e}}),batchDeleteDanbooruTags:e=>Ye({url:"/danbooru/batch_delete_tag",method:"post",timeout:0,data:{values:e}}),runSQLToServer:e=>Ye({url:"/danbooru/run_sql_text",method:"post",timeout:0,data:{sql:e}})},xM={key:0,class:"loading-overlay"},SM={class:"settings-content"},TM={style:{"margin-bottom":"16px"}},kM=["placeholder"],CM={style:{"margin-bottom":"16px"}},EM=["placeholder"],$M=["placeholder"],AM=["placeholder"],LM={class:"data-container"},IM={key:0},MM={key:0},OM={class:"tag-group-container"},DM={key:0},PM={key:1},RM={style:{display:"flex","align-items":"center"}},NM={key:0},FM=["placeholder"],BM=["placeholder"],UM=["placeholder"],zM=["placeholder"],VM=["onClick"],WM=["onClick"],HM=["onClick"],jM={key:1},GM={class:"tag-group-container"},qM={key:0},YM={key:1},KM={style:{display:"flex","align-items":"center"}},JM={key:0},XM=["placeholder"],QM=["placeholder"],ZM=["placeholder"],eO=["placeholder"],tO=Vt({__name:"import_danbooru",setup(e,{expose:t}){const{t:n}=Kt(),o=S(!1),a=S(""),s=S(""),i=S(""),l=S(""),d=S(""),g=S(""),f=S(""),m=S(""),w=S(""),b=S([]),T=S(-1),E=S(""),I=S(""),P=S(null),N=S(null),pe=S(!1),D=S(""),V=S(0),fe=S(0);function O(){a.value="",s.value="",V.value=0,fe.value=0,i.value="",l.value="",d.value="",g.value="",f.value="",m.value="",w.value="",b.value=[],T.value=-1,E.value="",I.value="",pe.value=!1}function se(re){O();const j=re.target.files[0];if(j){const oe=new FileReader;oe.onload=B=>{B.target.result.split(";").filter($=>$.trim()).forEach($=>{if(($.includes("tag_groups")||$.includes("tag_subgroups"))&&$.includes("p_uuid"))if($.includes("g_uuid")){d.value=`${$};`;const W=$.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);W&&(w.value=W[1]);const ce=$.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);ce&&(f.value=ce[1].replace(/''/g,"'"))}else{l.value=`${$};`;const W=$.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);W&&(m.value=W[1]);const ce=$.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);ce&&(g.value=ce[1].replace(/''/g,"'"))}else $.includes("tag_tags")&&b.value.push(`${$};`)})},oe.readAsText(j)}re.target.value=""}function le(re){const j=re.target.files[0];if(j){const oe=new FileReader;oe.onload=B=>{B.target.result.split(`
`).filter($=>$.trim()).forEach($=>{const A=$.split(",");if(A.length>=2){let W,ce,Ce,Le;A.length===2?(W=A[0].trim(),Le=A[1].trim(),ce=0,Ce=0):A.length>=3&&(W=A[0].trim(),ce=parseInt(A[1].trim(),10)||0,Ce=parseInt(A[2].trim(),10)||0,Le=A.slice(3).join(",").trim(),Le=Le.replace(/^"(.*)"$/,"$1"));const z=W.replace(/'/g,"''"),k=Le.replace(/'/g,"''"),H=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${z}', '', '${k}', ${Ce}, ${ce});`;b.value.push(H)}})},oe.readAsText(j)}re.target.value=""}function Pe(){N.value.click()}function Ie(){let re;b.value.length>0&&we(b.value[0])?re=[...b.value].join(`
`):re=[l.value,d.value,...b.value].join(`
`);const j=new Blob([re],{type:"text/sql"}),oe=document.createElement("a");if(oe.href=URL.createObjectURL(j),D.value.length<=0){const B=parseInt(new Date().getTime()/1e3,10);oe.download=`export_${B}.sql`}else oe.download=`${D.value}.sql`;oe.click()}function ue(re){const j=re.match(/VALUES\s*\([^']*'([^']+)'/),oe=re.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:j?j[1].replace(/''/g,"'"):"",desc:oe?oe[1].replace(/''/g,"'"):""}}function we(re){return re.includes("danbooru_tag")}function ne(re){const j=re.match(/VALUES\s*\(\s*'([^']+)'\s*,\s*'([^']*)'\s*,\s*'([^']*)'\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return j?{tag:j[1].replace(/''/g,"'"),color_id:j[2],translate:j[3].replace(/''/g,"'"),hot:parseInt(j[4],10),aliases:parseInt(j[5],10)}:{tag:"",color_id:"",translate:"",hot:0,aliases:0}}const J=S(0),ie=S(0);function X(re){const j=b.value[re];if(we(j)){const oe=ne(j);E.value=oe.tag,I.value=oe.translate,J.value=oe.hot,ie.value=oe.aliases}else{const oe=ue(j);E.value=oe.text,I.value=oe.desc}T.value=re}function ee(re){const j=E.value.replace(/'/g,"''"),oe=I.value.replace(/'/g,"''");if(we(b.value[re])){const B=ne(b.value[re]),q=parseInt(J.value,10)||0,Y=parseInt(ie.value,10)||0;b.value[re]=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${j}', '${B.color_id}', '${oe}', ${q}, ${Y});`}else b.value[re]=b.value[re].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${j}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${oe}'`);T.value=-1}function $e(){T.value=-1,E.value="",I.value="",J.value=0,ie.value=0}function ve(re){b.value.splice(re,1)}function Z(){const re=a.value.replace(/'/g,"''"),j=s.value.replace(/'/g,"''"),oe=parseInt(V.value,10)||0,B=parseInt(fe.value,10)||0,q=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${re}', '', '${j}', ${oe}, ${B});`;b.value.push(q),a.value="",s.value="",V.value=0,fe.value=0}const te=S(!1),be=async re=>{te.value=!0;try{await rr.runSQLToServer(re).then(j=>{j.code!==200?de({type:"warn",str:j.message}):(Te(),de({type:"success",str:"importDialog.successImport"}))}).catch(j=>{console.error(j),de({type:"warn",str:"importDialog.importFail"})})}catch(j){console.error(j),de({type:"warn",str:"importDialog.importFail"})}finally{te.value=!1}},Te=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},he=async()=>{if(b.value.length>0&&we(b.value[0])){const re=[...b.value];await be(re)}else if(pe.value){if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}const re=[...b.value];await be(re)}else{if(l.value.length<=0||d.value.length<=0){de({type:"warn",str:"importDialog.pleaseFullRequest"});return}const re=[l.value,d.value,...b.value];await be(re)}};return St(l,(re,j)=>{var q,Y;if(!re||re===j)return;const oe=(q=re.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:q[1],B=(Y=j==null?void 0:j.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Y[1];oe&&B&&d.value&&(d.value=d.value.replace(new RegExp(`'${B}'`,"g"),`'${oe}'`))}),St(d,(re,j)=>{var q,Y;if(!re||re===j)return;const oe=(q=re.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:q[1],B=(Y=j==null?void 0:j.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Y[1];oe&&B&&b.value.length>0&&(b.value=b.value.map($=>$.replace(new RegExp(`'${B}'`,"g"),`'${oe}'`)))}),t({open:()=>{o.value=!0}}),(re,j)=>(C(),L(qe,null,[te.value?(C(),L("div",xM,[...j[22]||(j[22]=[r("div",{class:"loading-spinner"},null,-1)])])):Ae("",!0),st(Qs,{modelValue:o.value,"onUpdate:modelValue":j[21]||(j[21]=oe=>o.value=oe),title:h(n)("danbooruManager.importBatchTitle")},{footer:Ut(()=>[r("button",{onClick:j[20]||(j[20]=oe=>o.value=!1)},y(h(n)("promptBox.settings.close")),1),r("button",{onClick:he},y(h(n)("importDialog.sure")),1)]),default:Ut(()=>[r("div",SM,[r("div",TM,[r("button",{onClick:O,class:"upload-btn"},y(h(n)("importDialog.cleanAll")),1),r("button",{style:{"margin-left":"10px"},onClick:Ie},y(h(n)("importDialog.dumpSQL")),1),xe(r("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":j[0]||(j[0]=oe=>D.value=oe),placeholder:h(n)("importDialog.settingOutputName")},null,8,kM),[[ze,D.value]]),r("input",{type:"file",ref_key:"fileInput",ref:P,onChange:se,accept:".sql",style:{display:"none"}},null,544),r("input",{type:"file",ref_key:"danbooruTxtFileInput",ref:N,onChange:le,accept:".txt,.csv",style:{display:"none"}},null,544)]),r("div",CM,[xe(r("input",{"onUpdate:modelValue":j[1]||(j[1]=oe=>a.value=oe),placeholder:"Tag"},null,512),[[ze,a.value]]),xe(r("input",{"onUpdate:modelValue":j[2]||(j[2]=oe=>s.value=oe),placeholder:h(n)("importDialog.translater")},null,8,EM),[[ze,s.value]]),xe(r("input",{"onUpdate:modelValue":j[3]||(j[3]=oe=>V.value=oe),placeholder:h(n)("danbooruManager.hot"),type:"number"},null,8,$M),[[ze,V.value]]),xe(r("input",{"onUpdate:modelValue":j[4]||(j[4]=oe=>fe.value=oe),placeholder:h(n)("danbooruManager.aliases"),type:"number"},null,8,AM),[[ze,fe.value]]),r("button",{onClick:Z},y(h(n)("importDialog.add")),1),r("button",{style:{"margin-left":"10px"},onClick:Pe,class:"upload-btn"},y(h(n)("danbooruManager.import")),1)]),r("div",LM,[l.value?(C(),L("div",IM,[r("h3",null,y(ue(l.value).text),1),d.value?(C(),L("div",MM,[r("h4",null,y(ue(d.value).text),1),r("div",OM,[(C(!0),L(qe,null,ot(b.value,(oe,B)=>(C(),L("div",{key:B,style:{display:"flex","flex-direction":"column","align-items":"center"}},[we(oe)?(C(),L("p",DM,y(ne(oe).tag)+" - "+y(ne(oe).translate)+" ("+y(h(n)("danbooruManager.hot"))+": "+y(ne(oe).hot)+", "+y(h(n)("danbooruManager.aliases"))+": "+y(ne(oe).aliases)+") ",1)):(C(),L("p",PM,y(ue(oe).text)+" - "+y(ue(oe).desc),1)),r("div",RM,[T.value===B?(C(),L("div",NM,[we(oe)?xe((C(),L("input",{key:0,"onUpdate:modelValue":j[5]||(j[5]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]):xe((C(),L("input",{key:1,"onUpdate:modelValue":j[6]||(j[6]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]),we(oe)?xe((C(),L("input",{key:2,"onUpdate:modelValue":j[7]||(j[7]=q=>I.value=q),placeholder:h(n)("importDialog.translate")},null,8,FM)),[[ze,I.value]]):xe((C(),L("input",{key:3,"onUpdate:modelValue":j[8]||(j[8]=q=>I.value=q),placeholder:h(n)("importDialog.translater")},null,8,BM)),[[ze,I.value]]),we(oe)?xe((C(),L("input",{key:4,"onUpdate:modelValue":j[9]||(j[9]=q=>J.value=q),placeholder:h(n)("danbooruManager.hot"),type:"number"},null,8,UM)),[[ze,J.value]]):Ae("",!0),we(a.value)?xe((C(),L("input",{key:5,"onUpdate:modelValue":j[10]||(j[10]=q=>ie.value=q),placeholder:h(n)("danbooruManager.aliases"),type:"number"},null,8,zM)),[[ze,ie.value]]):Ae("",!0),r("button",{onClick:q=>ee(B)},y(h(n)("importDialog.sureYes")),9,VM),r("button",{style:{"margin-left":"10px"},onClick:$e},y(h(n)("importDialog.cancel")),1)])):(C(),L("button",{key:1,onClick:q=>X(B)},y(h(n)("importDialog.edit")),9,WM)),r("button",{style:{"margin-left":"10px"},onClick:q=>ve(B)},y(h(n)("importDialog.delete")),9,HM)])]))),128))])])):Ae("",!0)])):b.value.length>0?(C(),L("div",jM,[r("h3",null,y(h(n)("danbooruManager.importTitle")),1),r("div",GM,[(C(!0),L(qe,null,ot(b.value,(oe,B)=>(C(),L("div",{key:B,style:{display:"flex","flex-direction":"column","align-items":"center"}},[we(oe)?(C(),L("p",qM,y(ne(oe).tag)+" - "+y(ne(oe).translate)+" (热度: "+y(ne(oe).hot)+", 别名: "+y(ne(oe).aliases)+") ",1)):(C(),L("p",YM,y(ue(oe).text)+" - "+y(ue(oe).desc),1)),r("div",KM,[T.value===B?(C(),L("div",JM,[we(oe)?xe((C(),L("input",{key:0,"onUpdate:modelValue":j[11]||(j[11]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]):xe((C(),L("input",{key:1,"onUpdate:modelValue":j[12]||(j[12]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]),we(oe)?xe((C(),L("input",{key:2,"onUpdate:modelValue":j[13]||(j[13]=q=>I.value=q),placeholder:h(n)("importDialog.translater")},null,8,XM)),[[ze,I.value]]):xe((C(),L("input",{key:3,"onUpdate:modelValue":j[14]||(j[14]=q=>I.value=q),placeholder:h(n)("importDialog.translater")},null,8,QM)),[[ze,I.value]]),we(oe)?xe((C(),L("input",{key:4,"onUpdate:modelValue":j[15]||(j[15]=q=>J.value=q),placeholder:h(n)("danbooruManager.hot"),type:"number"},null,8,ZM)),[[ze,J.value]]):Ae("",!0),we(a.value)?xe((C(),L("input",{key:5,"onUpdate:modelValue":j[16]||(j[16]=q=>ie.value=q),placeholder:h(n)("danbooruManager.aliases"),type:"number"},null,8,eO)),[[ze,ie.value]]):Ae("",!0),r("button",{onClick:j[17]||(j[17]=q=>ee(re.index))},y(h(n)("importDialog.sureYes")),1),r("button",{style:{"margin-left":"10px"},onClick:$e},y(h(n)("importDialog.cancel")),1)])):(C(),L("button",{key:1,onClick:j[18]||(j[18]=q=>X(re.index))},y(h(n)("importDialog.edit")),1)),r("button",{style:{"margin-left":"10px"},onClick:j[19]||(j[19]=q=>ve(re.index))},y(h(n)("importDialog.delete")),1)])]))),128))])])):Ae("",!0)])])]),_:1},8,["modelValue","title"])],64))}},[["__scopeId","data-v-422476cf"]]),nO={class:"danbooru-manager"},oO={class:"title"},aO={class:"action-bar"},sO={class:"search-box"},rO=["placeholder"],iO=["disabled"],lO={class:"pagination"},uO=["disabled"],cO={class:"page-info"},dO=["disabled"],pO={class:"page-size-control"},fO={key:0,class:"tag-list"},gO={style:{"table-layout":"fixed",overflow:"auto"}},mO={class:"checkbox-column"},vO=["checked"],hO={class:"tag-column"},_O={class:"translate-column"},yO={class:"color-column"},bO={class:"hot-column"},wO={class:"aliases-column"},xO={class:"control-column"},SO=["value"],TO=["onClick"],kO=["onClick"],CO={key:1,class:"no-results"},EO={key:2,class:"weilin-tools-dialog"},$O={class:"weilin-tools-dialog-content"},AO={class:"form-group"},LO=["placeholder"],IO={class:"form-group"},MO=["placeholder"],OO={class:"form-group"},DO=["value"],PO={class:"form-group"},RO={key:0,class:"form-group"},NO={class:"weilin-tools-dialog-actions"},FO={key:3,class:"weilin-tools-dialog"},BO={class:"weilin-tools-dialog-content"},UO={class:"weilin-tools-dialog-actions"},zO={key:4,class:"weilin-tools-dialog"},VO={class:"weilin-tools-dialog-content"},WO={class:"weilin-tools-dialog-actions"},HO={key:5,class:"overlay"},jO=Vt({__name:"danbooru_manager",setup(e){const{t}=Kt(),n=S(""),o=S([]),a=S(1),s=S(1),i=S(100),l=S(!1),d=S(!1),g=S(!1),f=S(!1),m=S(!1),w=S(null),b=S({tag:"",translate:"",color_id:0,hot:0,aliases:0}),T=[{name:"默认",color:"#888888"},{name:"红色",color:"#FF6666"},{name:"绿色",color:"#66FF66"},{name:"蓝色",color:"#6666FF"},{name:"黄色",color:"#FFFF66"},{name:"紫色",color:"#FF66FF"},{name:"青色",color:"#66FFFF"},{name:"橙色",color:"#FF9966"},{name:"粉色",color:"#FF99CC"},{name:"棕色",color:"#996633"}],E=ee=>T[ee]?T[ee].color:T[0].color;let I=null;const P=()=>{I&&clearTimeout(I),I=setTimeout(()=>{a.value=1,N()},300)},N=async()=>{l.value=!0,Ie.value=[];try{const ee=await rr.searchDanbooru(n.value,a.value,i.value);ee&&ee.data?(o.value=ee.data.data||[],s.value=ee.data.total_pages||1):(o.value=[],s.value=1)}catch(ee){console.error("搜索标签失败:",ee),de({type:"error",str:t("message.searchFailed")}),o.value=[]}finally{l.value=!1}},pe=ee=>{ee<1||ee>s.value||(a.value=ee,N())},D=()=>{i.value<10&&(i.value=10),i.value>500&&(i.value=500),a.value=1,Ie.value=[],N()},V=()=>{m.value=!1,b.value={tag:"",translate:"",color_id:0,hot:0,aliases:0},d.value=!0},fe=ee=>{m.value=!0,w.value=ee,b.value={id:ee.id_index,tag:ee.tag,translate:ee.translate||"",color_id:ee.color_id||0,hot:ee.hot||0,aliases:ee.aliases||0},d.value=!0},O=()=>{d.value=!1},se=async()=>{if(!b.value.tag){de({type:"error",str:t("tagManager.textRequired")});return}try{if(m.value){const ee=await rr.updateDanbooruTag({id:b.value.id,update_data:{tag:b.value.tag,translate:b.value.translate,color_id:b.value.color_id,hot:b.value.hot,aliases:b.value.aliases}});ee&&ee.code===200?(de({type:"success",str:t("message.editSuccess")}),N()):de({type:"error",str:t("message.editFailed")})}else{const ee=await rr.addDanbooruTag({tag:b.value.tag,translate:b.value.translate,color_id:b.value.color_id,hot:b.value.hot,aliases:b.value.aliases});ee&&ee.code===200?(de({type:"success",str:t("message.addSuccess")}),N()):de({type:"error",str:t("message.addFailed")})}O()}catch(ee){console.error("提交表单失败:",ee),de({type:"error",str:m.value?t("message.editFailed"):t("message.addFailed")})}},le=ee=>{w.value=ee,g.value=!0},Pe=async()=>{if(!(!w.value||!w.value.id_index))try{const ee=await rr.deleteDanbooruTag(w.value.id_index);ee&&ee.code===200?(de({type:"success",str:t("message.deleteSuccess")}),N()):de({type:"error",str:t("message.deleteFailed")}),g.value=!1}catch(ee){console.error("删除标签失败:",ee),de({type:"error",str:t("message.deleteFailed")})}},Ie=S([]),ue=$t(()=>o.value.length>0&&Ie.value.length===o.value.length),we=()=>{ue.value?Ie.value=[]:Ie.value=o.value.map(ee=>ee.id_index)},ne=()=>{Ie.value.length!==0&&(f.value=!0)},J=async()=>{if(Ie.value.length!==0){try{const ee=await rr.batchDeleteDanbooruTags(Ie.value);ee&&ee.code===200?(de({type:"success",str:`成功删除 ${Ie.value.length} 个标签`}),Ie.value=[],N()):de({type:"error",str:"批量删除失败"})}catch(ee){console.error("批量删除失败:",ee),de({type:"error",str:"批量删除失败"})}f.value=!1}},ie=S(),X=()=>{ie.value.open()};return Dt(()=>{N()}),(ee,$e)=>{var ve;return C(),L("div",nO,[r("h2",oO,y(h(t)("danbooruManager.title")),1),r("div",aO,[r("div",sO,[xe(r("input",{"onUpdate:modelValue":$e[0]||($e[0]=Z=>n.value=Z),type:"text",placeholder:h(t)("danbooruManager.searchPlaceholder"),onInput:P},null,40,rO),[[ze,n.value]]),r("button",{class:"search-btn",onClick:N},y(h(t)("tagManager.search")),1)]),r("button",{class:"add-btn",onClick:V},y(h(t)("danbooruManager.add")),1),r("button",{class:"add-btn",onClick:X},y(h(t)("tagManager.importDanbooru")),1),r("button",{class:Ve(["batch-delete-btn",{disabled:Ie.value.length===0}]),disabled:Ie.value.length===0,onClick:ne},y(h(t)("tagManager.hasDeleteAction"))+" ("+y(Ie.value.length)+") ",11,iO)]),r("div",lO,[r("button",{disabled:a.value<=1,onClick:$e[1]||($e[1]=Z=>pe(a.value-1)),class:"page-btn"},y(h(t)("loraManager.prevPage")),9,uO),r("span",cO,y(a.value)+" / "+y(s.value),1),r("button",{disabled:a.value>=s.value,onClick:$e[2]||($e[2]=Z=>pe(a.value+1)),class:"page-btn"},y(h(t)("loraManager.nextPage")),9,dO),r("div",pO,[r("label",null,y(h(t)("danbooruManager.pageShow")),1),xe(r("input",{"onUpdate:modelValue":$e[3]||($e[3]=Z=>i.value=Z),type:"number",min:"10",max:"500",onChange:D,class:"page-size-input"},null,544),[[ze,i.value,void 0,{number:!0}]]),r("span",null,y(h(t)("danbooruManager.pageLimit")),1)])]),o.value.length>0?(C(),L("div",fO,[r("table",gO,[r("thead",null,[r("tr",null,[r("th",mO,[r("input",{type:"checkbox",checked:ue.value,onChange:we},null,40,vO)]),$e[12]||($e[12]=r("th",{class:"id-column"},"ID",-1)),r("th",hO,y(h(t)("tagManager.description")),1),r("th",_O,y(h(t)("promptBox.translate")),1),r("th",yO,y(h(t)("tagManager.backgroundColor")),1),r("th",bO,y(h(t)("danbooruManager.hot")),1),r("th",wO,y(h(t)("danbooruManager.aliases")),1),r("th",xO,y(h(t)("danbooruManager.controle")),1)])]),r("tbody",null,[(C(!0),L(qe,null,ot(o.value,Z=>(C(),L("tr",{key:Z.id_index},[r("td",null,[xe(r("input",{type:"checkbox",value:Z.id_index,"onUpdate:modelValue":$e[4]||($e[4]=te=>Ie.value=te)},null,8,SO),[[on,Ie.value]])]),r("td",null,y(Z.id_index),1),r("td",null,y(Z.tag),1),r("td",null,y(Z.translate),1),r("td",null,[r("div",{class:"color-box",style:Ft({backgroundColor:E(Z.color_id)})},null,4)]),r("td",null,y(Z.hot),1),r("td",null,y(Z.aliases),1),r("td",null,[r("button",{class:"edit-btn",onClick:te=>fe(Z)},y(h(t)("common.edit")),9,TO),r("button",{style:{"margin-left":"10px"},class:"delete-btn",onClick:te=>le(Z)},y(h(t)("common.delete")),9,kO)])]))),128))])])])):(C(),L("div",CO,y(h(t)("tagManager.noResults")),1)),d.value?(C(),L("div",EO,[r("div",$O,[r("h3",null,y(m.value?h(t)("danbooruManager.edit"):h(t)("danbooruManager.add")),1),r("div",AO,[r("label",null,y(h(t)("tagManager.description")),1),xe(r("input",{"onUpdate:modelValue":$e[5]||($e[5]=Z=>b.value.tag=Z),type:"text",placeholder:h(t)("tagManager.descriptionPlaceholder")},null,8,LO),[[ze,b.value.tag]])]),r("div",IO,[r("label",null,y(h(t)("promptBox.translate")),1),xe(r("input",{"onUpdate:modelValue":$e[6]||($e[6]=Z=>b.value.translate=Z),type:"text",placeholder:h(t)("danbooruManager.translatePlaceholder")},null,8,MO),[[ze,b.value.translate]])]),r("div",OO,[r("label",null,y(h(t)("tagManager.backgroundColor")),1),xe(r("select",{"onUpdate:modelValue":$e[7]||($e[7]=Z=>b.value.color_id=Z)},[(C(),L(qe,null,ot(T,(Z,te)=>r("option",{key:te,value:te},y(Z.name),9,DO)),64))],512),[[an,b.value.color_id]]),r("div",{class:"color-preview",style:Ft({backgroundColor:E(b.value.color_id)})},null,4)]),r("div",PO,[$e[13]||($e[13]=r("label",null,"Hot",-1)),xe(r("input",{"onUpdate:modelValue":$e[8]||($e[8]=Z=>b.value.hot=Z),type:"number",min:"0"},null,512),[[ze,b.value.hot,void 0,{number:!0}]])]),m.value?Ae("",!0):(C(),L("div",RO,[$e[14]||($e[14]=r("label",null,"Aliases",-1)),xe(r("input",{"onUpdate:modelValue":$e[9]||($e[9]=Z=>b.value.aliases=Z),type:"number",min:"0"},null,512),[[ze,b.value.aliases,void 0,{number:!0}]])])),r("div",NO,[r("button",{onClick:O},y(h(t)("common.cancel")),1),r("button",{onClick:se},y(h(t)("common.save")),1)])])])):Ae("",!0),g.value?(C(),L("div",FO,[r("div",BO,[r("h3",null,y(h(t)("common.confirmDelete")),1),r("p",null,y(h(t)("tagManager.deleteTagConfirm",{name:((ve=w.value)==null?void 0:ve.tag)||""})),1),r("div",UO,[r("button",{onClick:$e[10]||($e[10]=Z=>g.value=!1)},y(h(t)("common.cancel")),1),r("button",{class:"delete-btn",onClick:Pe},y(h(t)("common.delete")),1)])])])):Ae("",!0),f.value?(C(),L("div",zO,[r("div",VO,[r("h3",null,y(h(t)("danbooruManager.sureBatchDelete")),1),r("p",null,y(h(t)("danbooruManager.sureBatchDeleteTips1"))+" "+y(Ie.value.length)+" "+y(h(t)("danbooruManager.sureBatchDeleteTips2")),1),r("div",WO,[r("button",{onClick:$e[11]||($e[11]=Z=>f.value=!1)},y(h(t)("common.cancel")),1),r("button",{class:"delete-btn",onClick:J},y(h(t)("danbooruManager.sureDelete")),1)])])])):Ae("",!0),d.value||g.value||f.value?(C(),L("div",HO)):Ae("",!0),st(tO,{ref_key:"importDanbooruDialog",ref:ie},null,512)])}}},[["__scopeId","data-v-cbcf8313"]]),GO={id:"weilin_comfyui_tools_prompt_ui_container_main"},qO={key:10,class:"version-update-notification"},YO={class:"version-update-content"},ir="weilin_tools_",KO=Vt({__name:"App",setup(e){const{t}=Kt(),n=S(localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true");localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")||(localStorage.setItem("weilin_prompt_ui_floatingBallEnabled","true"),n.value=!0);const o=S(""),a=S("look"),s=S("manager"),i=S("prompt_global"),l=S(!1),d=`${ir}theme`,g=S(localStorage.getItem(d)==="dark"),f=S(""),m=S(!1),w=S(""),b=S(null),T=`${ir}version_update_remind`,E=()=>{m.value=!1,b.value&&(clearTimeout(b.value),b.value=null)},I=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank"),E()},P=()=>{localStorage.setItem(T,"false"),E()},N={prompt:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:600,height:500}},tag:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}},lora:{visible:!1,is_default_close:!1,position:{x:200,y:200},size:{width:800,height:600}},history:{visible:!1,is_default_close:!1,position:{x:300,y:300},size:{width:800,height:600}},ai_window:{visible:!1,is_default_close:!1,position:{x:400,y:400},size:{width:800,height:600}},node_list_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:300,height:600}},cloud_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:800,height:600}},lora_stack_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:300,height:600}},danbooru_manager_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:800,height:600}}},pe=()=>{try{const ve=localStorage.getItem(`${ir}windowStates`);if(ve){const Z=JSON.parse(ve),te={...N};return Object.keys(Z).forEach(be=>{be in te&&(te[be]={...N[be],...Z[be],visible:Z[be].is_default_close?!1:Z[be].visible})}),te}}catch(ve){console.error("Error loading window states:",ve)}return{...N}},D=S(pe());let V=null;St(D,ve=>{V&&clearTimeout(V),V=setTimeout(()=>{try{localStorage.setItem(`${ir}windowStates`,JSON.stringify(ve))}catch(Z){console.error("Error saving window states:",Z)}V=null},500)},{deep:!0}),Dt(()=>{Object.keys(D.value).forEach(ve=>{rt.registerWindow(ve)}),fe(),window.addEventListener("message",ee),$e()});const fe=()=>{let ve=localStorage.getItem(d);ve||(localStorage.setItem(d,"dark"),ve="dark",g.value=!0),g.value=ve==="dark";const Z=document.getElementById("weilin_comfyui_tools_prompt_ui_div");Z&&Z.setAttribute("data-theme",g.value?"dark":"light")};go(()=>{Object.keys(D.value).forEach(ve=>{rt.unregisterWindow(ve)}),window.removeEventListener("message",ee),b.value&&(clearTimeout(b.value),b.value=null)});const O=ve=>{ve==="prompt"&&(o.value=""),D.value[ve].visible=!1},se=(ve,Z)=>{D.value[ve]&&(D.value[ve].position={...Z})},le=(ve,Z)=>{D.value[ve]&&(D.value[ve].size={...Z})},Pe=()=>{const ve={loraDetail:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}}},Z={prompt:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:600,height:400}},tag:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}},lora:{visible:!1,is_default_close:!1,position:{x:200,y:200},size:{width:800,height:600}},history:{visible:!1,is_default_close:!1,position:{x:300,y:300},size:{width:800,height:600}},ai_window:{visible:!1,is_default_close:!1,position:{x:400,y:400},size:{width:800,height:600}},node_list_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:400,height:800}},cloud_window:{visible:!1,is_default_close:!1,position:{x:100,y:100},size:{width:800,height:600}},lora_stack_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:300,height:600}},danbooru_manager_window:{visible:!1,is_default_close:!0,position:{x:100,y:100},size:{width:800,height:600}}};localStorage.setItem(`${ir}windowStates`,JSON.stringify(Z)),localStorage.setItem(`${ir}loraDetailState`,JSON.stringify(ve)),D.value=pe()};(()=>{ro.getTranslateSetting().then(ve=>{localStorage.setItem("weilin_prompt_ui_translater_setting",ve.data)}).catch(()=>{de({type:"warn",str:"message.getTranslaterFail"})})})();const ue=S(),we=S(),ne=S(),J=S(),ie=S(),X=(ve,Z,te=50)=>{let be=0;const Te=()=>{be++,ve.value?Z(ve.value):be<te?yt(Te):console.warn("[WeiLin] Ref not ready after",te,"attempts")};yt(Te)},ee=ve=>{!ve.data||!ve.data.type||ve.data.type.startsWith("weilin_prompt_ui_")&&(ve.data.type==="weilin_prompt_ui_openTagManager"?(s.value="manager",D.value.tag.visible=!0,rt.setActiveWindow("tag")):ve.data.type==="weilin_prompt_ui_openTagManager_prompt"?(s.value="prompt",D.value.tag.visible=!0,rt.setActiveWindow("tag")):ve.data.type==="weilin_prompt_ui_openPromptBox"?(o.value=ve.data.id,i.value="prompt",D.value.prompt.visible=!0,l.value=!1,ve.data.node==="WeiLinPromptUI"&&(l.value=!0),X(ue,Z=>{Z.setPromptText(ve.data.prompt),Z.setCurrentEditNodeId(ve.data.id)}),rt.setActiveWindow("prompt")):ve.data.type==="weilin_prompt_ui_openLoraManager"?(a.value="look",D.value.lora.visible=!0,rt.setActiveWindow("lora")):ve.data.type==="weilin_prompt_ui_openLoraManager_addLora"?(a.value="addLora",D.value.lora.visible=!0,X(ne,Z=>{Z.openSetSeed(0,"")}),rt.setActiveWindow("lora")):ve.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack"?(a.value="addLora",D.value.lora.visible=!0,X(ne,Z=>{Z.openSetSeed(1,ve.data.seed)}),rt.setActiveWindow("lora")):ve.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack_node"?(a.value="addLora",D.value.lora.visible=!0,X(ne,Z=>{Z.openSetSeed(2,ve.data.seed)}),rt.setActiveWindow("lora")):ve.data.type==="weilin_prompt_ui_openHistoryManager"?(D.value.history.visible=!0,rt.setActiveWindow("history")):ve.data.type==="weilin_prompt_ui_openAiWindow"?(D.value.ai_window.visible=!0,rt.setActiveWindow("ai_window")):ve.data.type==="weilin_prompt_ui_open_node_list_window"?(D.value.node_list_window.visible=!0,rt.setActiveWindow("node_list_window")):ve.data.type==="weilin_prompt_ui_prompt_finish_prompt"?window.postMessage({type:`weilin_prompt_ui_prompt_update_prompt_${o.value}`,data:ve.data.data},"*"):ve.data.type==="weilin_prompt_ui_open_global_prompt_box"?(i.value="prompt_global",o.value="global",D.value.prompt.visible=!0,l.value=!1,X(ue,Z=>{Z.setPromptText(f.value)}),rt.setActiveWindow("prompt")):ve.data.type==="weilin_prompt_ui_open_global_tag_manager"?(s.value="manager",D.value.tag.visible=!0,rt.setActiveWindow("tag")):ve.data.type==="weilin_prompt_ui_open_global_lora_manager"?(a.value="look",D.value.lora.visible=!0,rt.setActiveWindow("lora")):ve.data.type==="weilin_prompt_ui_prompt_update_prompt_global"?f.value=ve.data.data:ve.data.type==="weilin_prompt_ui_floating_ball_setting"?n.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true":ve.data.type==="weilin_prompt_ui_restore_window"?Pe():ve.data.type==="weilin_prompt_ui_open_cloud_window"?(D.value.cloud_window.visible=!0,rt.setActiveWindow("cloud_window")):ve.data.type==="weilin_prompt_ui_open_prompt_lora_stack_window"?(D.value.lora_stack_window.visible=!0,X(we,Z=>{Z.initLoraStack(ve.data.prompt,ve.data.seed)}),rt.setActiveWindow("lora_stack_window")):ve.data.type==="weilin_prompt_ui_open_node_lora_stack_window"?(D.value.lora_stack_window.visible=!0,X(we,Z=>{Z.initLoraStack(ve.data.prompt,ve.data.seed)}),rt.setActiveWindow("lora_stack_window")):ve.data.type==="weilin_prompt_ui_openLoraDetail"?X(J,Z=>{Z.open({name:ve.data.lora})}):ve.data.type==="weilin_prompt_ui_open_danbooru_manager_window"?(D.value.danbooru_manager_window.visible=!0,rt.setActiveWindow("danbooru_manager_window")):ve.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id"?window.postMessage({type:`weilin_prompt_ui_get_template_${o.value}`,data:ve.data.data},"*"):ve.data.type==="weilin_prompt_ui_get_template_response"?o.value===ve.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response",data:ve.data.data},"*"):ve.data.type==="weilin_prompt_ui_prompt_inner_update_node_tag_template_id"?window.postMessage({type:`weilin_prompt_ui_update_template_${o.value}`,data:ve.data.data},"*"):ve.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"?window.postMessage({type:`weilin_prompt_ui_get_template_go_random_${o.value}`,data:ve.data.data},"*"):ve.data.type==="weilin_prompt_ui_get_template_go_random_response"&&o.value===ve.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response",data:ve.data.data},"*"))},$e=async()=>{try{if(localStorage.getItem(T)==="false"){console.info("WeiLin-Comfyui-Tools 版本更新提醒已禁用");return}const Z=await fetch("https://raw.githubusercontent.com/weilin9999/WeiLin-Comfyui-Tools/refs/heads/main/src/src/utils/version.js");if(!Z.ok){console.error("获取版本信息失败:",Z.status);return}const be=(await Z.text()).match(/export const version = "([^"]+)"/);if(be&&be[1]){const Te=be[1];console.info(`WeiLin-Comfyui-Tools GitHub版本: ${Te}`),Te!==Ca&&(w.value=`WeiLin-Comfyui-Tools 发现新版本 ${Te},当前版本 ${Ca}`,m.value=!0,b.value&&clearTimeout(b.value),b.value=setTimeout(()=>{m.value=!1,b.value=null},1e4),console.info(`WeiLin-Comfyui-Tools 发现新版本 ${Te},当前版本 ${Ca} GitHub链接:https://github.com/weilin9999/WeiLin-Comfyui-Tools`))}}catch(ve){console.error("WeiLin-Comfyui-Tools 检查更新失败:",ve)}};return(ve,Z)=>(C(),L("div",GO,[D.value.prompt.visible?(C(),Zt(ho,{key:0,name:"promptBox",title:i.value==="prompt"?h(t)("promptBox.windowTitle"):h(t)("promptBox.windowTitleGlobal"),position:D.value.prompt.position,size:D.value.prompt.size,"z-index":h(rt).getZIndex("prompt"),"onUpdate:position":Z[0]||(Z[0]=te=>se("prompt",te)),"onUpdate:size":Z[1]||(Z[1]=te=>le("prompt",te)),onActive:Z[2]||(Z[2]=te=>h(rt).setActiveWindow("prompt")),onClose:Z[3]||(Z[3]=te=>O("prompt"))},{default:Ut(()=>[st(gL,{promptManager:i.value,hasPromptLoraStack:l.value,ref_key:"promptBoxRef",ref:ue},null,8,["promptManager","hasPromptLoraStack"])]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.tag.visible?(C(),Zt(ho,{key:1,name:"tagManager",title:h(t)("tagManager.windowTitle"),position:D.value.tag.position,size:D.value.tag.size,"z-index":h(rt).getZIndex("tag"),"onUpdate:position":Z[4]||(Z[4]=te=>se("tag",te)),"onUpdate:size":Z[5]||(Z[5]=te=>le("tag",te)),onActive:Z[6]||(Z[6]=te=>h(rt).setActiveWindow("tag")),onClose:Z[7]||(Z[7]=te=>O("tag"))},{default:Ut(()=>[st($v,{tagManager:s.value},null,8,["tagManager"])]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.lora.visible?(C(),Zt(ho,{key:2,name:"loraManager",title:h(t)("loraManager.windowTitle"),position:D.value.lora.position,size:D.value.lora.size,"z-index":h(rt).getZIndex("lora"),"onUpdate:position":Z[8]||(Z[8]=te=>se("lora",te)),"onUpdate:size":Z[9]||(Z[9]=te=>le("lora",te)),onActive:Z[10]||(Z[10]=te=>h(rt).setActiveWindow("lora")),onClose:Z[11]||(Z[11]=te=>O("lora"))},{default:Ut(()=>[st(Pv,{loraManager:a.value,ref_key:"loraManagerRef",ref:ne},null,8,["loraManager"])]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.history.visible?(C(),Zt(ho,{key:3,name:"historyManager",title:h(t)("history.windowTitle"),position:D.value.history.position,size:D.value.history.size,"z-index":h(rt).getZIndex("history"),"onUpdate:position":Z[12]||(Z[12]=te=>se("history",te)),"onUpdate:size":Z[13]||(Z[13]=te=>le("history",te)),onActive:Z[14]||(Z[14]=te=>h(rt).setActiveWindow("history")),onClose:Z[15]||(Z[15]=te=>O("history"))},{default:Ut(()=>[st(iI)]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.ai_window.visible?(C(),Zt(ho,{key:4,name:"aiWindow",title:h(t)("aiWindow.windowTitle"),position:D.value.ai_window.position,size:D.value.ai_window.size,"z-index":h(rt).getZIndex("ai_window"),"onUpdate:position":Z[16]||(Z[16]=te=>se("ai_window",te)),"onUpdate:size":Z[17]||(Z[17]=te=>le("ai_window",te)),onActive:Z[18]||(Z[18]=te=>h(rt).setActiveWindow("ai_window")),onClose:Z[19]||(Z[19]=te=>O("ai_window"))},{default:Ut(()=>[st(MI)]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.node_list_window.visible?(C(),Zt(ho,{key:5,name:"nodeListWindow",title:h(t)("nodeListWindow.windowTitle"),position:D.value.node_list_window.position,size:D.value.node_list_window.size,"z-index":h(rt).getZIndex("node_list_window"),"onUpdate:position":Z[20]||(Z[20]=te=>se("node_list_window",te)),"onUpdate:size":Z[21]||(Z[21]=te=>le("node_list_window",te)),onActive:Z[22]||(Z[22]=te=>h(rt).setActiveWindow("node_list_window")),onClose:Z[23]||(Z[23]=te=>O("node_list_window"))},{default:Ut(()=>[st(VI)]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.cloud_window.visible?(C(),Zt(ho,{key:6,name:"cloudWindow",title:h(t)("cloudWindow.windowTitle"),position:D.value.cloud_window.position,size:D.value.cloud_window.size,"z-index":h(rt).getZIndex("cloud_window"),"onUpdate:position":Z[24]||(Z[24]=te=>se("cloud_window",te)),"onUpdate:size":Z[25]||(Z[25]=te=>le("cloud_window",te)),onActive:Z[26]||(Z[26]=te=>h(rt).setActiveWindow("cloud_window")),onClose:Z[27]||(Z[27]=te=>O("cloud_window"))},{default:Ut(()=>[st(tM)]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.lora_stack_window.visible?(C(),Zt(ho,{key:7,name:"loraStackWindow",title:h(t)("controls.loraStack"),position:D.value.lora_stack_window.position,size:D.value.lora_stack_window.size,"z-index":h(rt).getZIndex("lora_stack_window"),"onUpdate:position":Z[28]||(Z[28]=te=>se("lora_stack_window",te)),"onUpdate:size":Z[29]||(Z[29]=te=>le("lora_stack_window",te)),onActive:Z[30]||(Z[30]=te=>h(rt).setActiveWindow("lora_stack_window")),onClose:Z[31]||(Z[31]=te=>O("lora_stack_window"))},{default:Ut(()=>[st(wM,{ref_key:"loraStackRef",ref:we},null,512)]),_:1},8,["title","position","size","z-index"])):Ae("",!0),D.value.danbooru_manager_window.visible?(C(),Zt(ho,{key:8,name:"DanbooruManagerWindow",title:h(t)("controls.danbooruManager"),position:D.value.danbooru_manager_window.position,size:D.value.danbooru_manager_window.size,"z-index":h(rt).getZIndex("danbooru_manager_window"),"onUpdate:position":Z[32]||(Z[32]=te=>se("danbooru_manager_window",te)),"onUpdate:size":Z[33]||(Z[33]=te=>le("danbooru_manager_window",te)),onActive:Z[34]||(Z[34]=te=>h(rt).setActiveWindow("danbooru_manager_window")),onClose:Z[35]||(Z[35]=te=>O("danbooru_manager_window"))},{default:Ut(()=>[st(jO,{ref_key:"danbooruManagerRef",ref:ie},null,512)]),_:1},8,["title","position","size","z-index"])):Ae("",!0),n.value?(C(),Zt(gI,{key:9})):Ae("",!0),st(Pl,{ref_key:"loraDetailLoraStackRef",ref:J},null,512),m.value?(C(),L("div",qO,[r("div",YO,[r("span",null,y(w.value),1),r("div",{class:"version-update-actions"},[r("button",{class:"goto-github-btn",onClick:I},"前往GitHub"),r("button",{class:"no-remind-btn",onClick:P},"不再提醒"),r("button",{class:"close-version-update",onClick:E},"×")])])])):Ae("",!0)]))}},[["__scopeId","data-v-1af60f9a"]]);var Nl={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var JO=Nl.exports,zv;function XO(){return zv||(zv=1,(function(e,t){(function(o,a){e.exports=a()})(JO,function(){return(function(){var n={686:(function(s,i,l){l.d(i,{default:function(){return Z}});var d=l(279),g=l.n(d),f=l(370),m=l.n(f),w=l(817),b=l.n(w);function T(te){try{return document.execCommand(te)}catch{return!1}}var E=function(be){var Te=b()(be);return T("cut"),Te},I=E;function P(te){var be=document.documentElement.getAttribute("dir")==="rtl",Te=document.createElement("textarea");Te.style.fontSize="12pt",Te.style.border="0",Te.style.padding="0",Te.style.margin="0",Te.style.position="absolute",Te.style[be?"right":"left"]="-9999px";var he=window.pageYOffset||document.documentElement.scrollTop;return Te.style.top="".concat(he,"px"),Te.setAttribute("readonly",""),Te.value=te,Te}var N=function(be,Te){var he=P(be);Te.container.appendChild(he);var re=b()(he);return T("copy"),he.remove(),re},pe=function(be){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},he="";return typeof be=="string"?he=N(be,Te):be instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(be==null?void 0:be.type)?he=N(be.value,Te):(he=b()(be),T("copy")),he},D=pe;function V(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V=function(Te){return typeof Te}:V=function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},V(te)}var fe=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Te=be.action,he=Te===void 0?"copy":Te,re=be.container,j=be.target,oe=be.text;if(he!=="copy"&&he!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(j!==void 0)if(j&&V(j)==="object"&&j.nodeType===1){if(he==="copy"&&j.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(he==="cut"&&(j.hasAttribute("readonly")||j.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(oe)return D(oe,{container:re});if(j)return he==="cut"?I(j):D(j,{container:re})},O=fe;function se(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?se=function(Te){return typeof Te}:se=function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},se(te)}function le(te,be){if(!(te instanceof be))throw new TypeError("Cannot call a class as a function")}function Pe(te,be){for(var Te=0;Te<be.length;Te++){var he=be[Te];he.enumerable=he.enumerable||!1,he.configurable=!0,"value"in he&&(he.writable=!0),Object.defineProperty(te,he.key,he)}}function Ie(te,be,Te){return be&&Pe(te.prototype,be),Te&&Pe(te,Te),te}function ue(te,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");te.prototype=Object.create(be&&be.prototype,{constructor:{value:te,writable:!0,configurable:!0}}),be&&we(te,be)}function we(te,be){return we=Object.setPrototypeOf||function(he,re){return he.__proto__=re,he},we(te,be)}function ne(te){var be=X();return function(){var he=ee(te),re;if(be){var j=ee(this).constructor;re=Reflect.construct(he,arguments,j)}else re=he.apply(this,arguments);return J(this,re)}}function J(te,be){return be&&(se(be)==="object"||typeof be=="function")?be:ie(te)}function ie(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te}function X(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ee(te){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(Te){return Te.__proto__||Object.getPrototypeOf(Te)},ee(te)}function $e(te,be){var Te="data-clipboard-".concat(te);if(be.hasAttribute(Te))return be.getAttribute(Te)}var ve=(function(te){ue(Te,te);var be=ne(Te);function Te(he,re){var j;return le(this,Te),j=be.call(this),j.resolveOptions(re),j.listenClick(he),j}return Ie(Te,[{key:"resolveOptions",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof re.action=="function"?re.action:this.defaultAction,this.target=typeof re.target=="function"?re.target:this.defaultTarget,this.text=typeof re.text=="function"?re.text:this.defaultText,this.container=se(re.container)==="object"?re.container:document.body}},{key:"listenClick",value:function(re){var j=this;this.listener=m()(re,"click",function(oe){return j.onClick(oe)})}},{key:"onClick",value:function(re){var j=re.delegateTarget||re.currentTarget,oe=this.action(j)||"copy",B=O({action:oe,container:this.container,target:this.target(j),text:this.text(j)});this.emit(B?"success":"error",{action:oe,text:B,trigger:j,clearSelection:function(){j&&j.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(re){return $e("action",re)}},{key:"defaultTarget",value:function(re){var j=$e("target",re);if(j)return document.querySelector(j)}},{key:"defaultText",value:function(re){return $e("text",re)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(re){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return D(re,j)}},{key:"cut",value:function(re){return I(re)}},{key:"isSupported",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],j=typeof re=="string"?[re]:re,oe=!!document.queryCommandSupported;return j.forEach(function(B){oe=oe&&!!document.queryCommandSupported(B)}),oe}}]),Te})(g()),Z=ve}),828:(function(s){var i=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function d(g,f){for(;g&&g.nodeType!==i;){if(typeof g.matches=="function"&&g.matches(f))return g;g=g.parentNode}}s.exports=d}),438:(function(s,i,l){var d=l(828);function g(w,b,T,E,I){var P=m.apply(this,arguments);return w.addEventListener(T,P,I),{destroy:function(){w.removeEventListener(T,P,I)}}}function f(w,b,T,E,I){return typeof w.addEventListener=="function"?g.apply(null,arguments):typeof T=="function"?g.bind(null,document).apply(null,arguments):(typeof w=="string"&&(w=document.querySelectorAll(w)),Array.prototype.map.call(w,function(P){return g(P,b,T,E,I)}))}function m(w,b,T,E){return function(I){I.delegateTarget=d(I.target,b),I.delegateTarget&&E.call(w,I)}}s.exports=f}),879:(function(s,i){i.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},i.nodeList=function(l){var d=Object.prototype.toString.call(l);return l!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in l&&(l.length===0||i.node(l[0]))},i.string=function(l){return typeof l=="string"||l instanceof String},i.fn=function(l){var d=Object.prototype.toString.call(l);return d==="[object Function]"}}),370:(function(s,i,l){var d=l(879),g=l(438);function f(T,E,I){if(!T&&!E&&!I)throw new Error("Missing required arguments");if(!d.string(E))throw new TypeError("Second argument must be a String");if(!d.fn(I))throw new TypeError("Third argument must be a Function");if(d.node(T))return m(T,E,I);if(d.nodeList(T))return w(T,E,I);if(d.string(T))return b(T,E,I);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function m(T,E,I){return T.addEventListener(E,I),{destroy:function(){T.removeEventListener(E,I)}}}function w(T,E,I){return Array.prototype.forEach.call(T,function(P){P.addEventListener(E,I)}),{destroy:function(){Array.prototype.forEach.call(T,function(P){P.removeEventListener(E,I)})}}}function b(T,E,I){return g(document.body,T,E,I)}s.exports=f}),817:(function(s){function i(l){var d;if(l.nodeName==="SELECT")l.focus(),d=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var g=l.hasAttribute("readonly");g||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),g||l.removeAttribute("readonly"),d=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var f=window.getSelection(),m=document.createRange();m.selectNodeContents(l),f.removeAllRanges(),f.addRange(m),d=f.toString()}return d}s.exports=i}),279:(function(s){function i(){}i.prototype={on:function(l,d,g){var f=this.e||(this.e={});return(f[l]||(f[l]=[])).push({fn:d,ctx:g}),this},once:function(l,d,g){var f=this;function m(){f.off(l,m),d.apply(g,arguments)}return m._=d,this.on(l,m,g)},emit:function(l){var d=[].slice.call(arguments,1),g=((this.e||(this.e={}))[l]||[]).slice(),f=0,m=g.length;for(f;f<m;f++)g[f].fn.apply(g[f].ctx,d);return this},off:function(l,d){var g=this.e||(this.e={}),f=g[l],m=[];if(f&&d)for(var w=0,b=f.length;w<b;w++)f[w].fn!==d&&f[w].fn._!==d&&m.push(f[w]);return m.length?g[l]=m:delete g[l],this}},s.exports=i,s.exports.TinyEmitter=i})},o={};function a(s){if(o[s])return o[s].exports;var i=o[s]={exports:{}};return n[s](i,i.exports,a),i.exports}return(function(){a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,{a:i}),i}})(),(function(){a.d=function(s,i){for(var l in i)a.o(i,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:i[l]})}})(),(function(){a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)}})(),a(686)})().default})})(Nl)),Nl.exports}var QO=XO();const ZO=Ag(QO),eD=e=>({toClipboard(t,n){return new Promise((o,a)=>{const s=document.createElement("button"),i=new ZO(s,{text:()=>t,action:()=>"copy",container:n!==void 0?n:document.body});i.on("success",l=>{i.destroy(),o(l)}),i.on("error",l=>{i.destroy(),a(l)}),document.body.appendChild(s),s.click(),document.body.removeChild(s)})}}),tD=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,nD=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,oD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function aD(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){sD(e);return}return t}function sD(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function rD(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const n=e.trim();if(n.length<=9)switch(n.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!oD.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(tD.test(e)||nD.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,aD)}return JSON.parse(e)}catch(o){if(t.strict)throw o;return e}}function iD(e,t){if(e==null)return;let n=e;for(let o=0;o<t.length;o++){if(n==null||n[t[o]]==null)return;n=n[t[o]]}return n}function Gc(e,t,n){if(n.length===0)return t;const o=n[0];return n.length>1&&(t=Gc(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,o)?Number.isInteger(Number(n[1]))?[]:{}:e[o],t,Array.prototype.slice.call(n,1))),Number.isInteger(Number(o))&&Array.isArray(e)?e.slice()[o]:Object.assign({},e,{[o]:t})}function Vv(e,t){if(e==null||t.length===0)return e;if(t.length===1){if(e==null)return e;if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.slice.call(e,0).splice(t[0],1);const n={};for(const o in e)n[o]=e[o];return delete n[t[0]],n}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const n={};for(const o in e)n[o]=e[o];return n}return Gc(e,Vv(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function Wv(e,t){return t.map(n=>n.split(".")).map(n=>[n,iD(e,n)]).filter(n=>n[1]!==void 0).reduce((n,o)=>Gc(n,o[1],o[0]),{})}function Hv(e,t){return t.map(n=>n.split(".")).reduce((n,o)=>Vv(n,o),e)}function jv(e,{storage:t,serializer:n,key:o,debug:a,pick:s,omit:i,beforeHydrate:l,afterHydrate:d},g,f=!0){try{f&&(l==null||l(g));const m=t.getItem(o);if(m){const w=n.deserialize(m),b=s?Wv(w,s):w,T=i?Hv(b,i):b;e.$patch(T)}f&&(d==null||d(g))}catch(m){a&&console.error("[pinia-plugin-persistedstate]",m)}}function Gv(e,{storage:t,serializer:n,key:o,debug:a,pick:s,omit:i}){try{const l=s?Wv(e,s):e,d=i?Hv(l,i):l,g=n.serialize(d);t.setItem(o,g)}catch(l){a&&console.error("[pinia-plugin-persistedstate]",l)}}function lD(e,t,n){const{pinia:o,store:a,options:{persist:s=n}}=e;if(!s)return;if(!(a.$id in o.state.value)){const d=o._s.get(a.$id.replace("__hot:",""));d&&Promise.resolve().then(()=>d.$persist());return}const l=(Array.isArray(s)?s:s===!0?[{}]:[s]).map(t);a.$hydrate=({runHooks:d=!0}={})=>{l.forEach(g=>{jv(a,g,e,d)})},a.$persist=()=>{l.forEach(d=>{Gv(a.$state,d)})},l.forEach(d=>{jv(a,d,e),a.$subscribe((g,f)=>Gv(f,d),{detached:!0})})}function uD(e={}){return function(t){lD(t,n=>({key:(e.key?e.key:o=>o)(n.key??t.store.$id),debug:n.debug??e.debug??!1,serializer:n.serializer??e.serializer??{serialize:o=>JSON.stringify(o),deserialize:o=>rD(o)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate,afterHydrate:n.afterHydrate,pick:n.pick,omit:n.omit}),e.auto??!1)}}var cD=uD();const{toClipboard:dD}=eD(),qc=document.createElement("div");qc.id="weilin_comfyui_tools_prompt_ui_div",document.querySelector("body").appendChild(qc);const qv=B2();qv.use(cD);const Fl=A_(KO);Fl.use(qv),Fl.use(ri),hb(),Fl.config.globalProperties.$copyText=dD,Fl.mount(qc),console.log(`WeiLin Prompt UI is running - version ${Ca}`),console.log(`WeiLin 节点插件已运行 - 版本 ${Ca}`);const pD=new MutationObserver(e=>{e.forEach(t=>{const n=document.querySelectorAll("#weilin-hidden-weight");if(n.length>0)for(const o of n){const a=o.closest(".lg-node-widget");a.style.display="none"}})}),fD={childList:!0,subtree:!0};pD.observe(document.body,fD)}));
//# sourceMappingURL=main.entry.js.map