Files
WeiLin efd923795d 更新修复版本 V0.0.79
更新修复版本 V0.0.79
2026-06-27 13:51:38 +08:00

189 lines
749 KiB
JavaScript
Raw Permalink 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(Cs){typeof define=="function"&&define.amd?define(Cs):Cs()})(function(){"use strict";/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Cs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const tn={},Es=[],zo=()=>{},Nh=()=>!1,vr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),jl=e=>e.startsWith("onUpdate:"),Sn=Object.assign,Gl=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Fh=Object.prototype.hasOwnProperty,qt=(e,t)=>Fh.call(e,t),dt=Array.isArray,$s=e=>hi(e)==="[object Map]",Is=e=>hi(e)==="[object Set]",Xc=e=>hi(e)==="[object Date]",yt=e=>typeof e=="function",fn=e=>typeof e=="string",Io=e=>typeof e=="symbol",nn=e=>e!==null&&typeof e=="object",Qc=e=>(nn(e)||yt(e))&&yt(e.then)&&yt(e.catch),Zc=Object.prototype.toString,hi=e=>Zc.call(e),Bh=e=>hi(e).slice(8,-1),ed=e=>hi(e)==="[object Object]",ql=e=>fn(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,vi=Cs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_r=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Uh=/-(\w)/g,wo=_r(e=>e.replace(Uh,(t,n)=>n?n.toUpperCase():"")),zh=/\B([A-Z])/g,ka=_r(e=>e.replace(zh,"-$1").toLowerCase()),yr=_r(e=>e.charAt(0).toUpperCase()+e.slice(1)),Yl=_r(e=>e?`on${yr(e)}`:""),Ca=(e,t)=>!Object.is(e,t),br=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},td=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},wr=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Vh=e=>{const t=fn(e)?Number(e):NaN;return isNaN(t)?e:t};let nd;const xr=()=>nd||(nd=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=fn(o)?Gh(o):Ft(o);if(a)for(const s in a)t[s]=a[s]}return t}else if(fn(e)||nn(e))return e}const Wh=/;(?![^(]*\))/g,Hh=/:([^]+)/,jh=/\/\*[^]*?\*\//g;function Gh(e){const t={};return e.replace(jh,"").split(Wh).forEach(n=>{if(n){const o=n.split(Hh);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function We(e){let t="";if(fn(e))t=e;else if(dt(e))for(let n=0;n<e.length;n++){const o=We(e[n]);o&&(t+=o+" ")}else if(nn(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const qh=Cs("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function od(e){return!!e||e===""}function Yh(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=ns(e[o],t[o]);return n}function ns(e,t){if(e===t)return!0;let n=Xc(e),o=Xc(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=Io(e),o=Io(t),n||o)return e===t;if(n=dt(e),o=dt(t),n||o)return n&&o?Yh(e,t):!1;if(n=nn(e),o=nn(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 r in e){const u=e.hasOwnProperty(r),d=t.hasOwnProperty(r);if(u&&!d||!u&&d||!ns(e[r],t[r]))return!1}}return String(e)===String(t)}function Kl(e,t){return e.findIndex(n=>ns(n,t))}const ad=e=>!!(e&&e.__v_isRef===!0),y=e=>fn(e)?e:e==null?"":dt(e)||nn(e)&&(e.toString===Zc||!yt(e.toString))?ad(e)?y(e.value):JSON.stringify(e,sd,2):String(e),sd=(e,t)=>ad(t)?sd(e,t.value):$s(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,a],s)=>(n[Jl(o,s)+" =>"]=a,n),{})}:Is(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Jl(n))}:Io(t)?Jl(t):nn(t)&&!dt(t)&&!ed(t)?String(t):t,Jl=(e,t="")=>{var n;return Io(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let zn;class id{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=zn,!t&&zn&&(this.index=(zn.scopes||(zn.scopes=[])).push(this)-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=zn;try{return zn=this,t()}finally{zn=n}}}on(){zn=this}off(){zn=this.parent}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 Xl(e){return new id(e)}function rd(){return zn}function Kh(e,t=!1){zn&&zn.cleanups.push(e)}let sn;const Ql=new WeakSet;class ld{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,zn&&zn.active&&zn.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ql.has(this)&&(Ql.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||cd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,md(this),dd(this);const t=sn,n=Ao;sn=this,Ao=!0;try{return this.fn()}finally{pd(this),sn=t,Ao=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)nu(t);this.deps=this.depsTail=void 0,md(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ql.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){tu(this)&&this.run()}get dirty(){return tu(this)}}let ud=0,_i,yi;function cd(e,t=!1){if(e.flags|=8,t){e.next=yi,yi=e;return}e.next=_i,_i=e}function Zl(){ud++}function eu(){if(--ud>0)return;if(yi){let t=yi;for(yi=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;_i;){let t=_i;for(_i=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 dd(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function pd(e){let t,n=e.depsTail,o=n;for(;o;){const a=o.prevDep;o.version===-1?(o===n&&(n=a),nu(o),Jh(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=a}e.deps=t,e.depsTail=n}function tu(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(fd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function fd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===bi))return;e.globalVersion=bi;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!tu(e)){e.flags&=-3;return}const n=sn,o=Ao;sn=e,Ao=!0;try{dd(e);const a=e.fn(e._value);(t.version===0||Ca(a,e._value))&&(e._value=a,t.version++)}catch(a){throw t.version++,a}finally{sn=n,Ao=o,pd(e),e.flags&=-3}}function nu(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)nu(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Jh(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 gd=[];function sa(){gd.push(Ao),Ao=!1}function ia(){const e=gd.pop();Ao=e===void 0?!0:e}function md(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=sn;sn=void 0;try{t()}finally{sn=n}}}let bi=0;class Xh{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 ou{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}track(t){if(!sn||!Ao||sn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==sn)n=this.activeLink=new Xh(sn,this),sn.deps?(n.prevDep=sn.depsTail,sn.depsTail.nextDep=n,sn.depsTail=n):sn.deps=sn.depsTail=n,hd(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++,bi++,this.notify(t)}notify(t){Zl();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{eu()}}}function hd(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)hd(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Sr=new WeakMap,os=Symbol(""),au=Symbol(""),wi=Symbol("");function On(e,t,n){if(Ao&&sn){let o=Sr.get(e);o||Sr.set(e,o=new Map);let a=o.get(n);a||(o.set(n,a=new ou),a.map=o,a.key=n),a.track()}}function ra(e,t,n,o,a,s){const r=Sr.get(e);if(!r){bi++;return}const u=d=>{d&&d.trigger()};if(Zl(),t==="clear")r.forEach(u);else{const d=dt(e),m=d&&ql(n);if(d&&n==="length"){const f=Number(o);r.forEach((g,w)=>{(w==="length"||w===wi||!Io(w)&&w>=f)&&u(g)})}else switch((n!==void 0||r.has(void 0))&&u(r.get(n)),m&&u(r.get(wi)),t){case"add":d?m&&u(r.get("length")):(u(r.get(os)),$s(e)&&u(r.get(au)));break;case"delete":d||(u(r.get(os)),$s(e)&&u(r.get(au)));break;case"set":$s(e)&&u(r.get(os));break}}eu()}function Qh(e,t){const n=Sr.get(e);return n&&n.get(t)}function As(e){const t=Mt(e);return t===e?t:(On(t,"iterate",wi),xo(e)?t:t.map(Rn))}function Tr(e){return On(e=Mt(e),"iterate",wi),e}const Zh={__proto__:null,[Symbol.iterator](){return su(this,Symbol.iterator,Rn)},concat(...e){return As(this).concat(...e.map(t=>dt(t)?As(t):t))},entries(){return su(this,"entries",e=>(e[1]=Rn(e[1]),e))},every(e,t){return la(this,"every",e,t,void 0,arguments)},filter(e,t){return la(this,"filter",e,t,n=>n.map(Rn),arguments)},find(e,t){return la(this,"find",e,t,Rn,arguments)},findIndex(e,t){return la(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return la(this,"findLast",e,t,Rn,arguments)},findLastIndex(e,t){return la(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return la(this,"forEach",e,t,void 0,arguments)},includes(...e){return iu(this,"includes",e)},indexOf(...e){return iu(this,"indexOf",e)},join(e){return As(this).join(e)},lastIndexOf(...e){return iu(this,"lastIndexOf",e)},map(e,t){return la(this,"map",e,t,void 0,arguments)},pop(){return xi(this,"pop")},push(...e){return xi(this,"push",e)},reduce(e,...t){return vd(this,"reduce",e,t)},reduceRight(e,...t){return vd(this,"reduceRight",e,t)},shift(){return xi(this,"shift")},some(e,t){return la(this,"some",e,t,void 0,arguments)},splice(...e){return xi(this,"splice",e)},toReversed(){return As(this).toReversed()},toSorted(e){return As(this).toSorted(e)},toSpliced(...e){return As(this).toSpliced(...e)},unshift(...e){return xi(this,"unshift",e)},values(){return su(this,"values",Rn)}};function su(e,t,n){const o=Tr(e),a=o[t]();return o!==e&&!xo(e)&&(a._next=a.next,a.next=()=>{const s=a._next();return s.value&&(s.value=n(s.value)),s}),a}const ev=Array.prototype;function la(e,t,n,o,a,s){const r=Tr(e),u=r!==e&&!xo(e),d=r[t];if(d!==ev[t]){const g=d.apply(e,s);return u?Rn(g):g}let m=n;r!==e&&(u?m=function(g,w){return n.call(this,Rn(g),w,e)}:n.length>2&&(m=function(g,w){return n.call(this,g,w,e)}));const f=d.call(r,m,o);return u&&a?a(f):f}function vd(e,t,n,o){const a=Tr(e);let s=n;return a!==e&&(xo(e)?n.length>3&&(s=function(r,u,d){return n.call(this,r,u,d,e)}):s=function(r,u,d){return n.call(this,r,Rn(u),d,e)}),a[t](s,...o)}function iu(e,t,n){const o=Mt(e);On(o,"iterate",wi);const a=o[t](...n);return(a===-1||a===!1)&&lu(n[0])?(n[0]=Mt(n[0]),o[t](...n)):a}function xi(e,t,n=[]){sa(),Zl();const o=Mt(e)[t].apply(e,n);return eu(),ia(),o}const tv=Cs("__proto__,__v_isRef,__isVue"),_d=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Io));function nv(e){Io(e)||(e=String(e));const t=Mt(this);return On(t,"has",e),t.hasOwnProperty(e)}class yd{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?kd:Td:s?Sd:xd).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=dt(t);if(!a){let d;if(r&&(d=Zh[n]))return d;if(n==="hasOwnProperty")return nv}const u=Reflect.get(t,n,gn(t)?t:o);return(Io(n)?_d.has(n):tv(n))||(a||On(t,"get",n),s)?u:gn(u)?r&&ql(n)?u:u.value:nn(u)?a?Cd(u):as(u):u}}class bd extends yd{constructor(t=!1){super(!1,t)}set(t,n,o,a){let s=t[n];if(!this._isShallow){const d=ss(s);if(!xo(o)&&!ss(o)&&(s=Mt(s),o=Mt(o)),!dt(t)&&gn(s)&&!gn(o))return d?!1:(s.value=o,!0)}const r=dt(t)&&ql(n)?Number(n)<t.length:qt(t,n),u=Reflect.set(t,n,o,gn(t)?t:a);return t===Mt(a)&&(r?Ca(o,s)&&ra(t,"set",n,o):ra(t,"add",n,o)),u}deleteProperty(t,n){const o=qt(t,n);t[n];const a=Reflect.deleteProperty(t,n);return a&&o&&ra(t,"delete",n,void 0),a}has(t,n){const o=Reflect.has(t,n);return(!Io(n)||!_d.has(n))&&On(t,"has",n),o}ownKeys(t){return On(t,"iterate",dt(t)?"length":os),Reflect.ownKeys(t)}}class wd extends yd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const ov=new bd,av=new wd,sv=new bd(!0),iv=new wd(!0),ru=e=>e,kr=e=>Reflect.getPrototypeOf(e);function rv(e,t,n){return function(...o){const a=this.__v_raw,s=Mt(a),r=$s(s),u=e==="entries"||e===Symbol.iterator&&r,d=e==="keys"&&r,m=a[e](...o),f=n?ru:t?cu:Rn;return!t&&On(s,"iterate",d?au:os),{next(){const{value:g,done:w}=m.next();return w?{value:g,done:w}:{value:u?[f(g[0]),f(g[1])]:f(g),done:w}},[Symbol.iterator](){return this}}}}function Cr(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function lv(e,t){const n={get(a){const s=this.__v_raw,r=Mt(s),u=Mt(a);e||(Ca(a,u)&&On(r,"get",a),On(r,"get",u));const{has:d}=kr(r),m=t?ru:e?cu:Rn;if(d.call(r,a))return m(s.get(a));if(d.call(r,u))return m(s.get(u));s!==r&&s.get(a)},get size(){const a=this.__v_raw;return!e&&On(Mt(a),"iterate",os),Reflect.get(a,"size",a)},has(a){const s=this.__v_raw,r=Mt(s),u=Mt(a);return e||(Ca(a,u)&&On(r,"has",a),On(r,"has",u)),a===u?s.has(a):s.has(a)||s.has(u)},forEach(a,s){const r=this,u=r.__v_raw,d=Mt(u),m=t?ru:e?cu:Rn;return!e&&On(d,"iterate",os),u.forEach((f,g)=>a.call(s,m(f),m(g),r))}};return Sn(n,e?{add:Cr("add"),set:Cr("set"),delete:Cr("delete"),clear:Cr("clear")}:{add(a){!t&&!xo(a)&&!ss(a)&&(a=Mt(a));const s=Mt(this);return kr(s).has.call(s,a)||(s.add(a),ra(s,"add",a,a)),this},set(a,s){!t&&!xo(s)&&!ss(s)&&(s=Mt(s));const r=Mt(this),{has:u,get:d}=kr(r);let m=u.call(r,a);m||(a=Mt(a),m=u.call(r,a));const f=d.call(r,a);return r.set(a,s),m?Ca(s,f)&&ra(r,"set",a,s):ra(r,"add",a,s),this},delete(a){const s=Mt(this),{has:r,get:u}=kr(s);let d=r.call(s,a);d||(a=Mt(a),d=r.call(s,a)),u&&u.call(s,a);const m=s.delete(a);return d&&ra(s,"delete",a,void 0),m},clear(){const a=Mt(this),s=a.size!==0,r=a.clear();return s&&ra(a,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(a=>{n[a]=rv(a,e,t)}),n}function Er(e,t){const n=lv(e,t);return(o,a,s)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?o:Reflect.get(qt(n,a)&&a in o?n:o,a,s)}const uv={get:Er(!1,!1)},cv={get:Er(!1,!0)},dv={get:Er(!0,!1)},pv={get:Er(!0,!0)},xd=new WeakMap,Sd=new WeakMap,Td=new WeakMap,kd=new WeakMap;function fv(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function gv(e){return e.__v_skip||!Object.isExtensible(e)?0:fv(Bh(e))}function as(e){return ss(e)?e:$r(e,!1,ov,uv,xd)}function mv(e){return $r(e,!1,sv,cv,Sd)}function Cd(e){return $r(e,!0,av,dv,Td)}function tO(e){return $r(e,!0,iv,pv,kd)}function $r(e,t,n,o,a){if(!nn(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=a.get(e);if(s)return s;const r=gv(e);if(r===0)return e;const u=new Proxy(e,r===2?o:n);return a.set(e,u),u}function Ea(e){return ss(e)?Ea(e.__v_raw):!!(e&&e.__v_isReactive)}function ss(e){return!!(e&&e.__v_isReadonly)}function xo(e){return!!(e&&e.__v_isShallow)}function lu(e){return e?!!e.__v_raw:!1}function Mt(e){const t=e&&e.__v_raw;return t?Mt(t):e}function uu(e){return!qt(e,"__v_skip")&&Object.isExtensible(e)&&td(e,"__v_skip",!0),e}const Rn=e=>nn(e)?as(e):e,cu=e=>nn(e)?Cd(e):e;function gn(e){return e?e.__v_isRef===!0:!1}function S(e){return Ed(e,!1)}function hv(e){return Ed(e,!0)}function Ed(e,t){return gn(e)?e:new vv(e,t)}class vv{constructor(t,n){this.dep=new ou,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Mt(t),this._value=n?t:Rn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||xo(t)||ss(t);t=o?t:Mt(t),Ca(t,n)&&(this._rawValue=t,this._value=o?t:Rn(t),this.dep.trigger())}}function v(e){return gn(e)?e.value:e}const _v={get:(e,t,n)=>t==="__v_raw"?e:v(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const a=e[t];return gn(a)&&!gn(n)?(a.value=n,!0):Reflect.set(e,t,n,o)}};function $d(e){return Ea(e)?e:new Proxy(e,_v)}function yv(e){const t=dt(e)?new Array(e.length):{};for(const n in e)t[n]=wv(e,n);return t}class bv{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Qh(Mt(this._object),this._key)}}function wv(e,t,n){const o=e[t];return gn(o)?o:new bv(e,t,n)}class xv{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ou(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=bi-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 cd(this,!0),!0}get value(){const t=this.dep.track();return fd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Sv(e,t,n=!1){let o,a;return yt(e)?o=e:(o=e.get,a=e.set),new xv(o,a,n)}const Ir={},Ar=new WeakMap;let is;function Tv(e,t=!1,n=is){if(n){let o=Ar.get(n);o||Ar.set(n,o=[]),o.push(e)}}function kv(e,t,n=tn){const{immediate:o,deep:a,once:s,scheduler:r,augmentJob:u,call:d}=n,m=D=>a?D:xo(D)||a===!1||a===0?ua(D,1):ua(D);let f,g,w,b,T=!1,E=!1;if(gn(e)?(g=()=>e.value,T=xo(e)):Ea(e)?(g=()=>m(e),T=!0):dt(e)?(E=!0,T=e.some(D=>Ea(D)||xo(D)),g=()=>e.map(D=>{if(gn(D))return D.value;if(Ea(D))return m(D);if(yt(D))return d?d(D,2):D()})):yt(e)?t?g=d?()=>d(e,2):e:g=()=>{if(w){sa();try{w()}finally{ia()}}const D=is;is=f;try{return d?d(e,3,[b]):e(b)}finally{is=D}}:g=zo,t&&a){const D=g,z=a===!0?1/0:a;g=()=>ua(D(),z)}const O=rd(),M=()=>{f.stop(),O&&O.active&&Gl(O.effects,f)};if(s&&t){const D=t;t=(...z)=>{D(...z),M()}}let V=E?new Array(e.length).fill(Ir):Ir;const pe=D=>{if(!(!(f.flags&1)||!f.dirty&&!D))if(t){const z=f.run();if(a||T||(E?z.some((ie,P)=>Ca(ie,V[P])):Ca(z,V))){w&&w();const ie=is;is=f;try{const P=[z,V===Ir?void 0:E&&V[0]===Ir?[]:V,b];d?d(t,3,P):t(...P),V=z}finally{is=ie}}}else f.run()};return u&&u(pe),f=new ld(g),f.scheduler=r?()=>r(pe,!1):pe,b=D=>Tv(D,!1,f),w=f.onStop=()=>{const D=Ar.get(f);if(D){if(d)d(D,4);else for(const z of D)z();Ar.delete(f)}},t?o?pe(!0):V=f.run():r?r(pe.bind(null,!0),!0):f.run(),M.pause=f.pause.bind(f),M.resume=f.resume.bind(f),M.stop=M,M}function ua(e,t=1/0,n){if(t<=0||!nn(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,gn(e))ua(e.value,t,n);else if(dt(e))for(let o=0;o<e.length;o++)ua(e[o],t,n);else if(Is(e)||$s(e))e.forEach(o=>{ua(o,t,n)});else if(ed(e)){for(const o in e)ua(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&ua(e[o],t,n)}return e}/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Si=[];let du=!1;function nO(e,...t){if(du)return;du=!0,sa();const n=Si.length?Si[Si.length-1].component:null,o=n&&n.appContext.config.warnHandler,a=Cv();if(o)Ls(o,n,11,[e+t.map(s=>{var r,u;return(u=(r=s.toString)==null?void 0:r.call(s))!=null?u:JSON.stringify(s)}).join(""),n&&n.proxy,a.map(({vnode:s})=>`at <${Rp(n,s.type)}>`).join(`
`),a]);else{const s=[`[Vue warn]: ${e}`,...t];a.length&&s.push(`
`,...Ev(a)),console.warn(...s)}ia(),du=!1}function Cv(){let e=Si[Si.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 Ev(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
`],...$v(n))}),t}function $v({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,a=` at <${Rp(e.component,e.type,o)}`,s=">"+n;return e.props?[a,...Iv(e.props),s]:[a+s]}function Iv(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...Id(o,e[o]))}),n.length>3&&t.push(" ..."),t}function Id(e,t,n){return fn(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:gn(t)?(t=Id(e,Mt(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):yt(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Mt(t),n?t:[`${e}=`,t])}function Ls(e,t,n,o){try{return o?e(...o):e()}catch(a){Lr(a,t,n)}}function Lo(e,t,n,o){if(yt(e)){const a=Ls(e,t,n,o);return a&&Qc(a)&&a.catch(s=>{Lr(s,t,n)}),a}if(dt(e)){const a=[];for(let s=0;s<e.length;s++)a.push(Lo(e[s],t,n,o));return a}}function Lr(e,t,n,o=!0){const a=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||tn;if(t){let u=t.parent;const d=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${n}`;for(;u;){const f=u.ec;if(f){for(let g=0;g<f.length;g++)if(f[g](e,d,m)===!1)return}u=u.parent}if(s){sa(),Ls(s,null,10,[e,d,m]),ia();return}}Av(e,n,a,o,r)}function Av(e,t,n,o=!0,a=!1){if(a)throw e;console.error(e)}const Vn=[];let Vo=-1;const Ms=[];let $a=null,Ds=0;const Ad=Promise.resolve();let Mr=null;function wt(e){const t=Mr||Ad;return e?t.then(this?e.bind(this):e):t}function Lv(e){let t=Vo+1,n=Vn.length;for(;t<n;){const o=t+n>>>1,a=Vn[o],s=Ti(a);s<e||s===e&&a.flags&2?t=o+1:n=o}return t}function pu(e){if(!(e.flags&1)){const t=Ti(e),n=Vn[Vn.length-1];!n||!(e.flags&2)&&t>=Ti(n)?Vn.push(e):Vn.splice(Lv(t),0,e),e.flags|=1,Ld()}}function Ld(){Mr||(Mr=Ad.then(Od))}function Mv(e){dt(e)?Ms.push(...e):$a&&e.id===-1?$a.splice(Ds+1,0,e):e.flags&1||(Ms.push(e),e.flags|=1),Ld()}function Md(e,t,n=Vo+1){for(;n<Vn.length;n++){const o=Vn[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Vn.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function Dd(e){if(Ms.length){const t=[...new Set(Ms)].sort((n,o)=>Ti(n)-Ti(o));if(Ms.length=0,$a){$a.push(...t);return}for($a=t,Ds=0;Ds<$a.length;Ds++){const n=$a[Ds];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}$a=null,Ds=0}}const Ti=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Od(e){try{for(Vo=0;Vo<Vn.length;Vo++){const t=Vn[Vo];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ls(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Vo<Vn.length;Vo++){const t=Vn[Vo];t&&(t.flags&=-2)}Vo=-1,Vn.length=0,Dd(),Mr=null,(Vn.length||Ms.length)&&Od()}}let Tn=null,Rd=null;function Dr(e){const t=Tn;return Tn=e,Rd=e&&e.type.__scopeId||null,t}function Ut(e,t=Tn,n){if(!t||e._n)return e;const o=(...a)=>{o._d&&Ep(-1);const s=Dr(t);let r;try{r=e(...a)}finally{Dr(s),o._d&&Ep(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Se(e,t){if(Tn===null)return e;const n=Hr(Tn),o=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[s,r,u,d=tn]=t[a];s&&(yt(s)&&(s={mounted:s,updated:s}),s.deep&&ua(r),o.push({dir:s,instance:n,value:r,oldValue:void 0,arg:u,modifiers:d}))}return e}function rs(e,t,n,o){const a=e.dirs,s=t&&t.dirs;for(let r=0;r<a.length;r++){const u=a[r];s&&(u.oldValue=s[r].value);let d=u.dir[o];d&&(sa(),Lo(d,n,8,[e.el,u,e,t]),ia())}}const Pd=Symbol("_vte"),Nd=e=>e.__isTeleport,ki=e=>e&&(e.disabled||e.disabled===""),Fd=e=>e&&(e.defer||e.defer===""),Bd=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ud=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,fu=(e,t)=>{const n=e&&e.to;return fn(n)?t?t(n):null:n},zd={name:"Teleport",__isTeleport:!0,process(e,t,n,o,a,s,r,u,d,m){const{mc:f,pc:g,pbc:w,o:{insert:b,querySelector:T,createText:E,createComment:O}}=m,M=ki(t.props);let{shapeFlag:V,children:pe,dynamicChildren:D}=t;if(e==null){const z=t.el=E(""),ie=t.anchor=E("");b(z,n,o),b(ie,n,o);const P=(ce,Re)=>{V&16&&(a&&a.isCE&&(a.ce._teleportTarget=ce),f(pe,ce,Re,a,s,r,u,d))},re=()=>{const ce=t.target=fu(t.props,T),Re=Wd(ce,t,E,b);ce&&(r!=="svg"&&Bd(ce)?r="svg":r!=="mathml"&&Ud(ce)&&(r="mathml"),M||(P(ce,Re),Rr(t,!1)))};M&&(P(n,ie),Rr(t,!0)),Fd(t.props)?Hn(()=>{re(),t.el.__isMounted=!0},s):re()}else{if(Fd(t.props)&&!e.el.__isMounted){Hn(()=>{zd.process(e,t,n,o,a,s,r,u,d,m),delete e.el.__isMounted},s);return}t.el=e.el,t.targetStart=e.targetStart;const z=t.anchor=e.anchor,ie=t.target=e.target,P=t.targetAnchor=e.targetAnchor,re=ki(e.props),ce=re?n:ie,Re=re?z:P;if(r==="svg"||Bd(ie)?r="svg":(r==="mathml"||Ud(ie))&&(r="mathml"),D?(w(e.dynamicChildren,D,ce,a,s,r,u),Tu(e,t,!0)):d||g(e,t,ce,Re,a,s,r,u,!1),M)re?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Or(t,n,z,m,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Le=t.target=fu(t.props,T);Le&&Or(t,Le,null,m,0)}else re&&Or(t,ie,P,m,1);Rr(t,M)}},remove(e,t,n,{um:o,o:{remove:a}},s){const{shapeFlag:r,children:u,anchor:d,targetStart:m,targetAnchor:f,target:g,props:w}=e;if(g&&(a(m),a(f)),s&&a(d),r&16){const b=s||!ki(w);for(let T=0;T<u.length;T++){const E=u[T];o(E,t,n,b,!!E.dynamicChildren)}}},move:Or,hydrate:Dv};function Or(e,t,n,{o:{insert:o},m:a},s=2){s===0&&o(e.targetAnchor,t,n);const{el:r,anchor:u,shapeFlag:d,children:m,props:f}=e,g=s===2;if(g&&o(r,t,n),(!g||ki(f))&&d&16)for(let w=0;w<m.length;w++)a(m[w],t,n,2);g&&o(u,t,n)}function Dv(e,t,n,o,a,s,{o:{nextSibling:r,parentNode:u,querySelector:d,insert:m,createText:f}},g){const w=t.target=fu(t.props,d);if(w){const b=ki(t.props),T=w._lpa||w.firstChild;if(t.shapeFlag&16)if(b)t.anchor=g(r(e),t,u(e),n,o,a,s),t.targetStart=T,t.targetAnchor=T&&r(T);else{t.anchor=r(e);let E=T;for(;E;){if(E&&E.nodeType===8){if(E.data==="teleport start anchor")t.targetStart=E;else if(E.data==="teleport anchor"){t.targetAnchor=E,w._lpa=t.targetAnchor&&r(t.targetAnchor);break}}E=r(E)}t.targetAnchor||Wd(w,t,f,m),g(T&&r(T),t,w,n,o,a,s)}Rr(t,b)}return t.anchor&&r(t.anchor)}const Vd=zd;function Rr(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 Wd(e,t,n,o){const a=t.targetStart=n(""),s=t.targetAnchor=n("");return a[Pd]=s,e&&(o(a,e),o(s,e)),s}const Ia=Symbol("_leaveCb"),Pr=Symbol("_enterCb");function Hd(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return jt(()=>{e.isMounted=!0}),Aa(()=>{e.isUnmounting=!0}),e}const So=[Function,Array],jd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:So,onEnter:So,onAfterEnter:So,onEnterCancelled:So,onBeforeLeave:So,onLeave:So,onAfterLeave:So,onLeaveCancelled:So,onBeforeAppear:So,onAppear:So,onAfterAppear:So,onAppearCancelled:So},Gd=e=>{const t=e.subTree;return t.component?Gd(t.component):t},Ov={name:"BaseTransition",props:jd,setup(e,{slots:t}){const n=ps(),o=Hd();return()=>{const a=t.default&&mu(t.default(),!0);if(!a||!a.length)return;const s=qd(a),r=Mt(e),{mode:u}=r;if(o.isLeaving)return gu(s);const d=Kd(s);if(!d)return gu(s);let m=Ci(d,r,o,n,g=>m=g);d.type!==jn&&ls(d,m);let f=n.subTree&&Kd(n.subTree);if(f&&f.type!==jn&&!ds(d,f)&&Gd(n).type!==jn){let g=Ci(f,r,o,n);if(ls(f,g),u==="out-in"&&d.type!==jn)return o.isLeaving=!0,g.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete g.afterLeave,f=void 0},gu(s);u==="in-out"&&d.type!==jn?g.delayLeave=(w,b,T)=>{const E=Yd(o,f);E[String(f.key)]=f,w[Ia]=()=>{b(),w[Ia]=void 0,delete m.delayedLeave,f=void 0},m.delayedLeave=()=>{T(),delete m.delayedLeave,f=void 0}}:f=void 0}else f&&(f=void 0);return s}}};function qd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==jn){t=n;break}}return t}const Rv=Ov;function Yd(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 Ci(e,t,n,o,a){const{appear:s,mode:r,persisted:u=!1,onBeforeEnter:d,onEnter:m,onAfterEnter:f,onEnterCancelled:g,onBeforeLeave:w,onLeave:b,onAfterLeave:T,onLeaveCancelled:E,onBeforeAppear:O,onAppear:M,onAfterAppear:V,onAppearCancelled:pe}=t,D=String(e.key),z=Yd(n,e),ie=(ce,Re)=>{ce&&Lo(ce,o,9,Re)},P=(ce,Re)=>{const Le=Re[1];ie(ce,Re),dt(ce)?ce.every(fe=>fe.length<=1)&&Le():ce.length<=1&&Le()},re={mode:r,persisted:u,beforeEnter(ce){let Re=d;if(!n.isMounted)if(s)Re=O||d;else return;ce[Ia]&&ce[Ia](!0);const Le=z[D];Le&&ds(e,Le)&&Le.el[Ia]&&Le.el[Ia](),ie(Re,[ce])},enter(ce){let Re=m,Le=f,fe=g;if(!n.isMounted)if(s)Re=M||m,Le=V||f,fe=pe||g;else return;let xe=!1;const ae=ce[Pr]=J=>{xe||(xe=!0,J?ie(fe,[ce]):ie(Le,[ce]),re.delayedLeave&&re.delayedLeave(),ce[Pr]=void 0)};Re?P(Re,[ce,ae]):ae()},leave(ce,Re){const Le=String(e.key);if(ce[Pr]&&ce[Pr](!0),n.isUnmounting)return Re();ie(w,[ce]);let fe=!1;const xe=ce[Ia]=ae=>{fe||(fe=!0,Re(),ae?ie(E,[ce]):ie(T,[ce]),ce[Ia]=void 0,z[Le]===e&&delete z[Le])};z[Le]=e,b?P(b,[ce,xe]):xe()},clone(ce){const Re=Ci(ce,t,n,o,a);return a&&a(Re),Re}};return re}function gu(e){if(Fr(e))return e=La(e),e.children=null,e}function Kd(e){if(!Fr(e))return Nd(e.type)&&e.children?qd(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&yt(n.default))return n.default()}}function ls(e,t){e.shapeFlag&6&&e.component?(e.transition=t,ls(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 mu(e,t=!1,n){let o=[],a=0;for(let s=0;s<e.length;s++){let r=e[s];const u=n==null?r.key:String(n)+String(r.key!=null?r.key:s);r.type===qe?(r.patchFlag&128&&a++,o=o.concat(mu(r.children,t,u))):(t||r.type!==jn)&&o.push(u!=null?La(r,{key:u}):r)}if(a>1)for(let s=0;s<o.length;s++)o[s].patchFlag=-2;return o}/*! #__NO_SIDE_EFFECTS__ */function hu(e,t){return yt(e)?Sn({name:e.name},t,{setup:e}):e}function Jd(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Nr(e,t,n,o,a=!1){if(dt(e)){e.forEach((T,E)=>Nr(T,t&&(dt(t)?t[E]:t),n,o,a));return}if(Os(o)&&!a){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Nr(e,t,n,o.component.subTree);return}const s=o.shapeFlag&4?Hr(o.component):o.el,r=a?null:s,{i:u,r:d}=e,m=t&&t.r,f=u.refs===tn?u.refs={}:u.refs,g=u.setupState,w=Mt(g),b=g===tn?()=>!1:T=>qt(w,T);if(m!=null&&m!==d&&(fn(m)?(f[m]=null,b(m)&&(g[m]=null)):gn(m)&&(m.value=null)),yt(d))Ls(d,u,12,[r,f]);else{const T=fn(d),E=gn(d);if(T||E){const O=()=>{if(e.f){const M=T?b(d)?g[d]:f[d]:d.value;a?dt(M)&&Gl(M,s):dt(M)?M.includes(s)||M.push(s):T?(f[d]=[s],b(d)&&(g[d]=f[d])):(d.value=[s],e.k&&(f[e.k]=d.value))}else T?(f[d]=r,b(d)&&(g[d]=r)):E&&(d.value=r,e.k&&(f[e.k]=r))};r?(O.id=-1,Hn(O,n)):O()}}}xr().requestIdleCallback,xr().cancelIdleCallback;const Os=e=>!!e.type.__asyncLoader,Fr=e=>e.type.__isKeepAlive;function Pv(e,t){Xd(e,"a",t)}function Nv(e,t){Xd(e,"da",t)}function Xd(e,t,n=$n){const o=e.__wdc||(e.__wdc=()=>{let a=n;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Br(t,o,n),n){let a=n.parent;for(;a&&a.parent;)Fr(a.parent.vnode)&&Fv(o,t,n,a),a=a.parent}}function Fv(e,t,n,o){const a=Br(t,e,o,!0);po(()=>{Gl(o[t],a)},n)}function Br(e,t,n=$n,o=!1){if(n){const a=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{sa();const u=Oi(n),d=Lo(t,n,e,r);return u(),ia(),d});return o?a.unshift(s):a.push(s),s}}const ca=e=>(t,n=$n)=>{(!Ri||e==="sp")&&Br(e,(...o)=>t(...o),n)},Bv=ca("bm"),jt=ca("m"),Qd=ca("bu"),Zd=ca("u"),Aa=ca("bum"),po=ca("um"),Uv=ca("sp"),zv=ca("rtg"),Vv=ca("rtc");function Wv(e,t=$n){Br("ec",e,t)}const Hv="components";function jv(e,t){return qv(Hv,e,!0,t)||e}const Gv=Symbol.for("v-ndc");function qv(e,t,n=!0,o=!1){const a=Tn||$n;if(a){const s=a.type;{const u=Op(s,!1);if(u&&(u===t||u===wo(t)||u===yr(wo(t))))return s}const r=ep(a[e]||s[e],t)||ep(a.appContext[e],t);return!r&&o?s:r}}function ep(e,t){return e&&(e[t]||e[wo(t)]||e[yr(wo(t))])}function ot(e,t,n,o){let a;const s=n,r=dt(e);if(r||fn(e)){const u=r&&Ea(e);let d=!1;u&&(d=!xo(e),e=Tr(e)),a=new Array(e.length);for(let m=0,f=e.length;m<f;m++)a[m]=t(d?Rn(e[m]):e[m],m,void 0,s)}else if(typeof e=="number"){a=new Array(e);for(let u=0;u<e;u++)a[u]=t(u+1,u,void 0,s)}else if(nn(e))if(e[Symbol.iterator])a=Array.from(e,(u,d)=>t(u,d,void 0,s));else{const u=Object.keys(e);a=new Array(u.length);for(let d=0,m=u.length;d<m;d++){const f=u[d];a[d]=t(e[f],f,d,s)}}else a=[];return a}function Ei(e,t,n={},o,a){if(Tn.ce||Tn.parent&&Os(Tn.parent)&&Tn.parent.ce)return t!=="default"&&(n.name=t),C(),Qt(qe,null,[at("slot",n,o&&o())],64);let s=e[t];s&&s._c&&(s._d=!1),C();const r=s&&tp(s(n)),u=n.key||r&&r.key,d=Qt(qe,{key:(u&&!Io(u)?u:`_${t}`)+(!r&&o?"_fb":"")},r||(o?o():[]),r&&e._===1?64:-2);return!a&&d.scopeId&&(d.slotScopeIds=[d.scopeId+"-s"]),s&&s._c&&(s._d=!0),d}function tp(e){return e.some(t=>Di(t)?!(t.type===jn||t.type===qe&&!tp(t.children)):!0)?e:null}const vu=e=>e?Lp(e)?Hr(e):vu(e.parent):null,$i=Sn(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=>vu(e.parent),$root:e=>vu(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>sp(e),$forceUpdate:e=>e.f||(e.f=()=>{pu(e.update)}),$nextTick:e=>e.n||(e.n=wt.bind(e.proxy)),$watch:e=>h1.bind(e)}),_u=(e,t)=>e!==tn&&!e.__isScriptSetup&&qt(e,t),Yv={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:a,props:s,accessCache:r,type:u,appContext:d}=e;let m;if(t[0]!=="$"){const b=r[t];if(b!==void 0)switch(b){case 1:return o[t];case 2:return a[t];case 4:return n[t];case 3:return s[t]}else{if(_u(o,t))return r[t]=1,o[t];if(a!==tn&&qt(a,t))return r[t]=2,a[t];if((m=e.propsOptions[0])&&qt(m,t))return r[t]=3,s[t];if(n!==tn&&qt(n,t))return r[t]=4,n[t];yu&&(r[t]=0)}}const f=$i[t];let g,w;if(f)return t==="$attrs"&&On(e.attrs,"get",""),f(e);if((g=u.__cssModules)&&(g=g[t]))return g;if(n!==tn&&qt(n,t))return r[t]=4,n[t];if(w=d.config.globalProperties,qt(w,t))return w[t]},set({_:e},t,n){const{data:o,setupState:a,ctx:s}=e;return _u(a,t)?(a[t]=n,!0):o!==tn&&qt(o,t)?(o[t]=n,!0):qt(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,propsOptions:s}},r){let u;return!!n[r]||e!==tn&&qt(e,r)||_u(t,r)||(u=s[0])&&qt(u,r)||qt(o,r)||qt($i,r)||qt(a.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:qt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function np(e){return dt(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let yu=!0;function Kv(e){const t=sp(e),n=e.proxy,o=e.ctx;yu=!1,t.beforeCreate&&op(t.beforeCreate,e,"bc");const{data:a,computed:s,methods:r,watch:u,provide:d,inject:m,created:f,beforeMount:g,mounted:w,beforeUpdate:b,updated:T,activated:E,deactivated:O,beforeDestroy:M,beforeUnmount:V,destroyed:pe,unmounted:D,render:z,renderTracked:ie,renderTriggered:P,errorCaptured:re,serverPrefetch:ce,expose:Re,inheritAttrs:Le,components:fe,directives:xe,filters:ae}=t;if(m&&Jv(m,o,null),r)for(const X in r){const ee=r[X];yt(ee)&&(o[X]=ee.bind(n))}if(a){const X=a.call(n,n);nn(X)&&(e.data=as(X))}if(yu=!0,s)for(const X in s){const ee=s[X],Ee=yt(ee)?ee.bind(n,n):yt(ee.get)?ee.get.bind(n,n):zo,he=!yt(ee)&&yt(ee.set)?ee.set.bind(n):zo,Q=Bt({get:Ee,set:he});Object.defineProperty(o,X,{enumerable:!0,configurable:!0,get:()=>Q.value,set:le=>Q.value=le})}if(u)for(const X in u)ap(u[X],o,n,X);if(d){const X=yt(d)?d.call(n):d;Reflect.ownKeys(X).forEach(ee=>{n1(ee,X[ee])})}f&&op(f,e,"c");function se(X,ee){dt(ee)?ee.forEach(Ee=>X(Ee.bind(n))):ee&&X(ee.bind(n))}if(se(Bv,g),se(jt,w),se(Qd,b),se(Zd,T),se(Pv,E),se(Nv,O),se(Wv,re),se(Vv,ie),se(zv,P),se(Aa,V),se(po,D),se(Uv,ce),dt(Re))if(Re.length){const X=e.exposed||(e.exposed={});Re.forEach(ee=>{Object.defineProperty(X,ee,{get:()=>n[ee],set:Ee=>n[ee]=Ee})})}else e.exposed||(e.exposed={});z&&e.render===zo&&(e.render=z),Le!=null&&(e.inheritAttrs=Le),fe&&(e.components=fe),xe&&(e.directives=xe),ce&&Jd(e)}function Jv(e,t,n=zo){dt(e)&&(e=bu(e));for(const o in e){const a=e[o];let s;nn(a)?"default"in a?s=Rs(a.from||o,a.default,!0):s=Rs(a.from||o):s=Rs(a),gn(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[o]=s}}function op(e,t,n){Lo(dt(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function ap(e,t,n,o){let a=o.includes(".")?xp(n,o):()=>n[o];if(fn(e)){const s=t[e];yt(s)&&It(a,s)}else if(yt(e))It(a,e.bind(n));else if(nn(e))if(dt(e))e.forEach(s=>ap(s,t,n,o));else{const s=yt(e.handler)?e.handler.bind(n):t[e.handler];yt(s)&&It(a,s,e)}}function sp(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:a,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,u=s.get(t);let d;return u?d=u:!a.length&&!n&&!o?d=t:(d={},a.length&&a.forEach(m=>Ur(d,m,r,!0)),Ur(d,t,r)),nn(t)&&s.set(t,d),d}function Ur(e,t,n,o=!1){const{mixins:a,extends:s}=t;s&&Ur(e,s,n,!0),a&&a.forEach(r=>Ur(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const u=Xv[r]||n&&n[r];e[r]=u?u(e[r],t[r]):t[r]}return e}const Xv={data:ip,props:rp,emits:rp,methods:Ii,computed:Ii,beforeCreate:Wn,created:Wn,beforeMount:Wn,mounted:Wn,beforeUpdate:Wn,updated:Wn,beforeDestroy:Wn,beforeUnmount:Wn,destroyed:Wn,unmounted:Wn,activated:Wn,deactivated:Wn,errorCaptured:Wn,serverPrefetch:Wn,components:Ii,directives:Ii,watch:Zv,provide:ip,inject:Qv};function ip(e,t){return t?e?function(){return Sn(yt(e)?e.call(this,this):e,yt(t)?t.call(this,this):t)}:t:e}function Qv(e,t){return Ii(bu(e),bu(t))}function bu(e){if(dt(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Wn(e,t){return e?[...new Set([].concat(e,t))]:t}function Ii(e,t){return e?Sn(Object.create(null),e,t):t}function rp(e,t){return e?dt(e)&&dt(t)?[...new Set([...e,...t])]:Sn(Object.create(null),np(e),np(t??{})):t}function Zv(e,t){if(!e)return t;if(!t)return e;const n=Sn(Object.create(null),e);for(const o in t)n[o]=Wn(e[o],t[o]);return n}function lp(){return{app:null,config:{isNativeTag:Nh,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 e1=0;function t1(e,t){return function(o,a=null){yt(o)||(o=Sn({},o)),a!=null&&!nn(a)&&(a=null);const s=lp(),r=new WeakSet,u=[];let d=!1;const m=s.app={_uid:e1++,_component:o,_props:a,_container:null,_context:s,_instance:null,version:F1,get config(){return s.config},set config(f){},use(f,...g){return r.has(f)||(f&&yt(f.install)?(r.add(f),f.install(m,...g)):yt(f)&&(r.add(f),f(m,...g))),m},mixin(f){return s.mixins.includes(f)||s.mixins.push(f),m},component(f,g){return g?(s.components[f]=g,m):s.components[f]},directive(f,g){return g?(s.directives[f]=g,m):s.directives[f]},mount(f,g,w){if(!d){const b=m._ceVNode||at(o,a);return b.appContext=s,w===!0?w="svg":w===!1&&(w=void 0),e(b,f,w),d=!0,m._container=f,f.__vue_app__=m,Hr(b.component)}},onUnmount(f){u.push(f)},unmount(){d&&(Lo(u,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(f,g){return s.provides[f]=g,m},runWithContext(f){const g=us;us=m;try{return f()}finally{us=g}}};return m}}let us=null;function n1(e,t){if($n){let n=$n.provides;const o=$n.parent&&$n.parent.provides;o===n&&(n=$n.provides=Object.create(o)),n[e]=t}}function Rs(e,t,n=!1){const o=$n||Tn;if(o||us){const a=us?us._context.provides:o?o.parent==null?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&&yt(t)?t.call(o&&o.proxy):t}}function o1(){return!!($n||Tn||us)}const up={},cp=()=>Object.create(up),dp=e=>Object.getPrototypeOf(e)===up;function a1(e,t,n,o=!1){const a={},s=cp();e.propsDefaults=Object.create(null),pp(e,t,a,s);for(const r in e.propsOptions[0])r in a||(a[r]=void 0);n?e.props=o?a:mv(a):e.type.props?e.props=a:e.props=s,e.attrs=s}function s1(e,t,n,o){const{props:a,attrs:s,vnode:{patchFlag:r}}=e,u=Mt(a),[d]=e.propsOptions;let m=!1;if((o||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let g=0;g<f.length;g++){let w=f[g];if(zr(e.emitsOptions,w))continue;const b=t[w];if(d)if(qt(s,w))b!==s[w]&&(s[w]=b,m=!0);else{const T=wo(w);a[T]=wu(d,u,T,b,e,!1)}else b!==s[w]&&(s[w]=b,m=!0)}}}else{pp(e,t,a,s)&&(m=!0);let f;for(const g in u)(!t||!qt(t,g)&&((f=ka(g))===g||!qt(t,f)))&&(d?n&&(n[g]!==void 0||n[f]!==void 0)&&(a[g]=wu(d,u,g,void 0,e,!0)):delete a[g]);if(s!==u)for(const g in s)(!t||!qt(t,g))&&(delete s[g],m=!0)}m&&ra(e.attrs,"set","")}function pp(e,t,n,o){const[a,s]=e.propsOptions;let r=!1,u;if(t)for(let d in t){if(vi(d))continue;const m=t[d];let f;a&&qt(a,f=wo(d))?!s||!s.includes(f)?n[f]=m:(u||(u={}))[f]=m:zr(e.emitsOptions,d)||(!(d in o)||m!==o[d])&&(o[d]=m,r=!0)}if(s){const d=Mt(n),m=u||tn;for(let f=0;f<s.length;f++){const g=s[f];n[g]=wu(a,d,g,m[g],e,!qt(m,g))}}return r}function wu(e,t,n,o,a,s){const r=e[n];if(r!=null){const u=qt(r,"default");if(u&&o===void 0){const d=r.default;if(r.type!==Function&&!r.skipFactory&&yt(d)){const{propsDefaults:m}=a;if(n in m)o=m[n];else{const f=Oi(a);o=m[n]=d.call(null,t),f()}}else o=d;a.ce&&a.ce._setProp(n,o)}r[0]&&(s&&!u?o=!1:r[1]&&(o===""||o===ka(n))&&(o=!0))}return o}const i1=new WeakMap;function fp(e,t,n=!1){const o=n?i1:t.propsCache,a=o.get(e);if(a)return a;const s=e.props,r={},u=[];let d=!1;if(!yt(e)){const f=g=>{d=!0;const[w,b]=fp(g,t,!0);Sn(r,w),b&&u.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 nn(e)&&o.set(e,Es),Es;if(dt(s))for(let f=0;f<s.length;f++){const g=wo(s[f]);gp(g)&&(r[g]=tn)}else if(s)for(const f in s){const g=wo(f);if(gp(g)){const w=s[f],b=r[g]=dt(w)||yt(w)?{type:w}:Sn({},w),T=b.type;let E=!1,O=!0;if(dt(T))for(let M=0;M<T.length;++M){const V=T[M],pe=yt(V)&&V.name;if(pe==="Boolean"){E=!0;break}else pe==="String"&&(O=!1)}else E=yt(T)&&T.name==="Boolean";b[0]=E,b[1]=O,(E||qt(b,"default"))&&u.push(g)}}const m=[r,u];return nn(e)&&o.set(e,m),m}function gp(e){return e[0]!=="$"&&!vi(e)}const mp=e=>e[0]==="_"||e==="$stable",xu=e=>dt(e)?e.map(Wo):[Wo(e)],r1=(e,t,n)=>{if(t._n)return t;const o=Ut((...a)=>xu(t(...a)),n);return o._c=!1,o},hp=(e,t,n)=>{const o=e._ctx;for(const a in e){if(mp(a))continue;const s=e[a];if(yt(s))t[a]=r1(a,s,o);else if(s!=null){const r=xu(s);t[a]=()=>r}}},vp=(e,t)=>{const n=xu(t);e.slots.default=()=>n},_p=(e,t,n)=>{for(const o in t)(n||o!=="_")&&(e[o]=t[o])},l1=(e,t,n)=>{const o=e.slots=cp();if(e.vnode.shapeFlag&32){const a=t._;a?(_p(o,t,n),n&&td(o,"_",a,!0)):hp(t,o)}else t&&vp(e,t)},u1=(e,t,n)=>{const{vnode:o,slots:a}=e;let s=!0,r=tn;if(o.shapeFlag&32){const u=t._;u?n&&u===1?s=!1:_p(a,t,n):(s=!t.$stable,hp(t,a)),r=t}else t&&(vp(e,t),r={default:1});if(s)for(const u in a)!mp(u)&&r[u]==null&&delete a[u]},Hn=S1;function c1(e){return d1(e)}function d1(e,t){const n=xr();n.__VUE__=!0;const{insert:o,remove:a,patchProp:s,createElement:r,createText:u,createComment:d,setText:m,setElementText:f,parentNode:g,nextSibling:w,setScopeId:b=zo,insertStaticContent:T}=e,E=($,I,H,de=null,Ce=null,Ae=null,U=void 0,k=null,j=!!I.dynamicChildren)=>{if($===I)return;$&&!ds($,I)&&(de=W($),le($,Ce,Ae,!0),$=null),I.patchFlag===-2&&(j=!1,I.dynamicChildren=null);const{type:ne,ref:Fe,shapeFlag:Oe}=I;switch(ne){case Ai:O($,I,H,de);break;case jn:M($,I,H,de);break;case ku:$==null&&V(I,H,de,U);break;case qe:fe($,I,H,de,Ce,Ae,U,k,j);break;default:Oe&1?z($,I,H,de,Ce,Ae,U,k,j):Oe&6?xe($,I,H,de,Ce,Ae,U,k,j):(Oe&64||Oe&128)&&ne.process($,I,H,de,Ce,Ae,U,k,j,q)}Fe!=null&&Ce&&Nr(Fe,$&&$.ref,Ae,I||$,!I)},O=($,I,H,de)=>{if($==null)o(I.el=u(I.children),H,de);else{const Ce=I.el=$.el;I.children!==$.children&&m(Ce,I.children)}},M=($,I,H,de)=>{$==null?o(I.el=d(I.children||""),H,de):I.el=$.el},V=($,I,H,de)=>{[$.el,$.anchor]=T($.children,I,H,de,$.el,$.anchor)},pe=({el:$,anchor:I},H,de)=>{let Ce;for(;$&&$!==I;)Ce=w($),o($,H,de),$=Ce;o(I,H,de)},D=({el:$,anchor:I})=>{let H;for(;$&&$!==I;)H=w($),a($),$=H;a(I)},z=($,I,H,de,Ce,Ae,U,k,j)=>{I.type==="svg"?U="svg":I.type==="math"&&(U="mathml"),$==null?ie(I,H,de,Ce,Ae,U,k,j):ce($,I,Ce,Ae,U,k,j)},ie=($,I,H,de,Ce,Ae,U,k)=>{let j,ne;const{props:Fe,shapeFlag:Oe,transition:ge,dirs:$e}=$;if(j=$.el=r($.type,Ae,Fe&&Fe.is,Fe),Oe&8?f(j,$.children):Oe&16&&re($.children,j,null,de,Ce,Su($,Ae),U,k),$e&&rs($,null,de,"created"),P(j,$,$.scopeId,U,de),Fe){for(const tt in Fe)tt!=="value"&&!vi(tt)&&s(j,tt,null,Fe[tt],Ae,de);"value"in Fe&&s(j,"value",null,Fe.value,Ae),(ne=Fe.onVnodeBeforeMount)&&Ho(ne,de,$)}$e&&rs($,null,de,"beforeMount");const Ke=p1(Ce,ge);Ke&&ge.beforeEnter(j),o(j,I,H),((ne=Fe&&Fe.onVnodeMounted)||Ke||$e)&&Hn(()=>{ne&&Ho(ne,de,$),Ke&&ge.enter(j),$e&&rs($,null,de,"mounted")},Ce)},P=($,I,H,de,Ce)=>{if(H&&b($,H),de)for(let Ae=0;Ae<de.length;Ae++)b($,de[Ae]);if(Ce){let Ae=Ce.subTree;if(I===Ae||Cp(Ae.type)&&(Ae.ssContent===I||Ae.ssFallback===I)){const U=Ce.vnode;P($,U,U.scopeId,U.slotScopeIds,Ce.parent)}}},re=($,I,H,de,Ce,Ae,U,k,j=0)=>{for(let ne=j;ne<$.length;ne++){const Fe=$[ne]=k?Ma($[ne]):Wo($[ne]);E(null,Fe,I,H,de,Ce,Ae,U,k)}},ce=($,I,H,de,Ce,Ae,U)=>{const k=I.el=$.el;let{patchFlag:j,dynamicChildren:ne,dirs:Fe}=I;j|=$.patchFlag&16;const Oe=$.props||tn,ge=I.props||tn;let $e;if(H&&cs(H,!1),($e=ge.onVnodeBeforeUpdate)&&Ho($e,H,I,$),Fe&&rs(I,$,H,"beforeUpdate"),H&&cs(H,!0),(Oe.innerHTML&&ge.innerHTML==null||Oe.textContent&&ge.textContent==null)&&f(k,""),ne?Re($.dynamicChildren,ne,k,H,de,Su(I,Ce),Ae):U||ee($,I,k,null,H,de,Su(I,Ce),Ae,!1),j>0){if(j&16)Le(k,Oe,ge,H,Ce);else if(j&2&&Oe.class!==ge.class&&s(k,"class",null,ge.class,Ce),j&4&&s(k,"style",Oe.style,ge.style,Ce),j&8){const Ke=I.dynamicProps;for(let tt=0;tt<Ke.length;tt++){const it=Ke[tt],bt=Oe[it],ct=ge[it];(ct!==bt||it==="value")&&s(k,it,bt,ct,Ce,H)}}j&1&&$.children!==I.children&&f(k,I.children)}else!U&&ne==null&&Le(k,Oe,ge,H,Ce);(($e=ge.onVnodeUpdated)||Fe)&&Hn(()=>{$e&&Ho($e,H,I,$),Fe&&rs(I,$,H,"updated")},de)},Re=($,I,H,de,Ce,Ae,U)=>{for(let k=0;k<I.length;k++){const j=$[k],ne=I[k],Fe=j.el&&(j.type===qe||!ds(j,ne)||j.shapeFlag&70)?g(j.el):H;E(j,ne,Fe,null,de,Ce,Ae,U,!0)}},Le=($,I,H,de,Ce)=>{if(I!==H){if(I!==tn)for(const Ae in I)!vi(Ae)&&!(Ae in H)&&s($,Ae,I[Ae],null,Ce,de);for(const Ae in H){if(vi(Ae))continue;const U=H[Ae],k=I[Ae];U!==k&&Ae!=="value"&&s($,Ae,k,U,Ce,de)}"value"in H&&s($,"value",I.value,H.value,Ce)}},fe=($,I,H,de,Ce,Ae,U,k,j)=>{const ne=I.el=$?$.el:u(""),Fe=I.anchor=$?$.anchor:u("");let{patchFlag:Oe,dynamicChildren:ge,slotScopeIds:$e}=I;$e&&(k=k?k.concat($e):$e),$==null?(o(ne,H,de),o(Fe,H,de),re(I.children||[],H,Fe,Ce,Ae,U,k,j)):Oe>0&&Oe&64&&ge&&$.dynamicChildren?(Re($.dynamicChildren,ge,H,Ce,Ae,U,k),(I.key!=null||Ce&&I===Ce.subTree)&&Tu($,I,!0)):ee($,I,H,Fe,Ce,Ae,U,k,j)},xe=($,I,H,de,Ce,Ae,U,k,j)=>{I.slotScopeIds=k,$==null?I.shapeFlag&512?Ce.ctx.activate(I,H,de,U,j):ae(I,H,de,Ce,Ae,U,j):J($,I,j)},ae=($,I,H,de,Ce,Ae,U)=>{const k=$.component=A1($,de,Ce);if(Fr($)&&(k.ctx.renderer=q),L1(k,!1,U),k.asyncDep){if(Ce&&Ce.registerDep(k,se,U),!$.el){const j=k.subTree=at(jn);M(null,j,I,H)}}else se(k,$,I,H,Ce,Ae,U)},J=($,I,H)=>{const de=I.component=$.component;if(w1($,I,H))if(de.asyncDep&&!de.asyncResolved){X(de,I,H);return}else de.next=I,de.update();else I.el=$.el,de.vnode=I},se=($,I,H,de,Ce,Ae,U)=>{const k=()=>{if($.isMounted){let{next:Oe,bu:ge,u:$e,parent:Ke,vnode:tt}=$;{const Rt=yp($);if(Rt){Oe&&(Oe.el=tt.el,X($,Oe,U)),Rt.asyncDep.then(()=>{$.isUnmounted||k()});return}}let it=Oe,bt;cs($,!1),Oe?(Oe.el=tt.el,X($,Oe,U)):Oe=tt,ge&&br(ge),(bt=Oe.props&&Oe.props.onVnodeBeforeUpdate)&&Ho(bt,Ke,Oe,tt),cs($,!0);const ct=Tp($),rn=$.subTree;$.subTree=ct,E(rn,ct,g(rn.el),W(rn),$,Ce,Ae),Oe.el=ct.el,it===null&&x1($,ct.el),$e&&Hn($e,Ce),(bt=Oe.props&&Oe.props.onVnodeUpdated)&&Hn(()=>Ho(bt,Ke,Oe,tt),Ce)}else{let Oe;const{el:ge,props:$e}=I,{bm:Ke,m:tt,parent:it,root:bt,type:ct}=$,rn=Os(I);cs($,!1),Ke&&br(Ke),!rn&&(Oe=$e&&$e.onVnodeBeforeMount)&&Ho(Oe,it,I),cs($,!0);{bt.ce&&bt.ce._injectChildStyle(ct);const Rt=$.subTree=Tp($);E(null,Rt,H,de,$,Ce,Ae),I.el=Rt.el}if(tt&&Hn(tt,Ce),!rn&&(Oe=$e&&$e.onVnodeMounted)){const Rt=I;Hn(()=>Ho(Oe,it,Rt),Ce)}(I.shapeFlag&256||it&&Os(it.vnode)&&it.vnode.shapeFlag&256)&&$.a&&Hn($.a,Ce),$.isMounted=!0,I=H=de=null}};$.scope.on();const j=$.effect=new ld(k);$.scope.off();const ne=$.update=j.run.bind(j),Fe=$.job=j.runIfDirty.bind(j);Fe.i=$,Fe.id=$.uid,j.scheduler=()=>pu(Fe),cs($,!0),ne()},X=($,I,H)=>{I.component=$;const de=$.vnode.props;$.vnode=I,$.next=null,s1($,I.props,de,H),u1($,I.children,H),sa(),Md($),ia()},ee=($,I,H,de,Ce,Ae,U,k,j=!1)=>{const ne=$&&$.children,Fe=$?$.shapeFlag:0,Oe=I.children,{patchFlag:ge,shapeFlag:$e}=I;if(ge>0){if(ge&128){he(ne,Oe,H,de,Ce,Ae,U,k,j);return}else if(ge&256){Ee(ne,Oe,H,de,Ce,Ae,U,k,j);return}}$e&8?(Fe&16&&Z(ne,Ce,Ae),Oe!==ne&&f(H,Oe)):Fe&16?$e&16?he(ne,Oe,H,de,Ce,Ae,U,k,j):Z(ne,Ce,Ae,!0):(Fe&8&&f(H,""),$e&16&&re(Oe,H,de,Ce,Ae,U,k,j))},Ee=($,I,H,de,Ce,Ae,U,k,j)=>{$=$||Es,I=I||Es;const ne=$.length,Fe=I.length,Oe=Math.min(ne,Fe);let ge;for(ge=0;ge<Oe;ge++){const $e=I[ge]=j?Ma(I[ge]):Wo(I[ge]);E($[ge],$e,H,null,Ce,Ae,U,k,j)}ne>Fe?Z($,Ce,Ae,!0,!1,Oe):re(I,H,de,Ce,Ae,U,k,j,Oe)},he=($,I,H,de,Ce,Ae,U,k,j)=>{let ne=0;const Fe=I.length;let Oe=$.length-1,ge=Fe-1;for(;ne<=Oe&&ne<=ge;){const $e=$[ne],Ke=I[ne]=j?Ma(I[ne]):Wo(I[ne]);if(ds($e,Ke))E($e,Ke,H,null,Ce,Ae,U,k,j);else break;ne++}for(;ne<=Oe&&ne<=ge;){const $e=$[Oe],Ke=I[ge]=j?Ma(I[ge]):Wo(I[ge]);if(ds($e,Ke))E($e,Ke,H,null,Ce,Ae,U,k,j);else break;Oe--,ge--}if(ne>Oe){if(ne<=ge){const $e=ge+1,Ke=$e<Fe?I[$e].el:de;for(;ne<=ge;)E(null,I[ne]=j?Ma(I[ne]):Wo(I[ne]),H,Ke,Ce,Ae,U,k,j),ne++}}else if(ne>ge)for(;ne<=Oe;)le($[ne],Ce,Ae,!0),ne++;else{const $e=ne,Ke=ne,tt=new Map;for(ne=Ke;ne<=ge;ne++){const Jt=I[ne]=j?Ma(I[ne]):Wo(I[ne]);Jt.key!=null&&tt.set(Jt.key,ne)}let it,bt=0;const ct=ge-Ke+1;let rn=!1,Rt=0;const In=new Array(ct);for(ne=0;ne<ct;ne++)In[ne]=0;for(ne=$e;ne<=Oe;ne++){const Jt=$[ne];if(bt>=ct){le(Jt,Ce,Ae,!0);continue}let ln;if(Jt.key!=null)ln=tt.get(Jt.key);else for(it=Ke;it<=ge;it++)if(In[it-Ke]===0&&ds(Jt,I[it])){ln=it;break}ln===void 0?le(Jt,Ce,Ae,!0):(In[ln-Ke]=ne+1,ln>=Rt?Rt=ln:rn=!0,E(Jt,I[ln],H,null,Ce,Ae,U,k,j),bt++)}const wn=rn?f1(In):Es;for(it=wn.length-1,ne=ct-1;ne>=0;ne--){const Jt=Ke+ne,ln=I[Jt],Kn=Jt+1<Fe?I[Jt+1].el:de;In[ne]===0?E(null,ln,H,Kn,Ce,Ae,U,k,j):rn&&(it<0||ne!==wn[it]?Q(ln,H,Kn,2):it--)}}},Q=($,I,H,de,Ce=null)=>{const{el:Ae,type:U,transition:k,children:j,shapeFlag:ne}=$;if(ne&6){Q($.component.subTree,I,H,de);return}if(ne&128){$.suspense.move(I,H,de);return}if(ne&64){U.move($,I,H,q);return}if(U===qe){o(Ae,I,H);for(let Oe=0;Oe<j.length;Oe++)Q(j[Oe],I,H,de);o($.anchor,I,H);return}if(U===ku){pe($,I,H);return}if(de!==2&&ne&1&&k)if(de===0)k.beforeEnter(Ae),o(Ae,I,H),Hn(()=>k.enter(Ae),Ce);else{const{leave:Oe,delayLeave:ge,afterLeave:$e}=k,Ke=()=>o(Ae,I,H),tt=()=>{Oe(Ae,()=>{Ke(),$e&&$e()})};ge?ge(Ae,Ke,tt):tt()}else o(Ae,I,H)},le=($,I,H,de=!1,Ce=!1)=>{const{type:Ae,props:U,ref:k,children:j,dynamicChildren:ne,shapeFlag:Fe,patchFlag:Oe,dirs:ge,cacheIndex:$e}=$;if(Oe===-2&&(Ce=!1),k!=null&&Nr(k,null,H,$,!0),$e!=null&&(I.renderCache[$e]=void 0),Fe&256){I.ctx.deactivate($);return}const Ke=Fe&1&&ge,tt=!Os($);let it;if(tt&&(it=U&&U.onVnodeBeforeUnmount)&&Ho(it,I,$),Fe&6)_e($.component,H,de);else{if(Fe&128){$.suspense.unmount(H,de);return}Ke&&rs($,null,I,"beforeUnmount"),Fe&64?$.type.remove($,I,H,q,de):ne&&!ne.hasOnce&&(Ae!==qe||Oe>0&&Oe&64)?Z(ne,I,H,!1,!0):(Ae===qe&&Oe&384||!Ce&&Fe&16)&&Z(j,I,H),de&&be($)}(tt&&(it=U&&U.onVnodeUnmounted)||Ke)&&Hn(()=>{it&&Ho(it,I,$),Ke&&rs($,null,I,"unmounted")},H)},be=$=>{const{type:I,el:H,anchor:de,transition:Ce}=$;if(I===qe){we(H,de);return}if(I===ku){D($);return}const Ae=()=>{a(H),Ce&&!Ce.persisted&&Ce.afterLeave&&Ce.afterLeave()};if($.shapeFlag&1&&Ce&&!Ce.persisted){const{leave:U,delayLeave:k}=Ce,j=()=>U(H,Ae);k?k($.el,Ae,j):j()}else Ae()},we=($,I)=>{let H;for(;$!==I;)H=w($),a($),$=H;a(I)},_e=($,I,H)=>{const{bum:de,scope:Ce,job:Ae,subTree:U,um:k,m:j,a:ne}=$;bp(j),bp(ne),de&&br(de),Ce.stop(),Ae&&(Ae.flags|=8,le(U,$,I,H)),k&&Hn(k,I),Hn(()=>{$.isUnmounted=!0},I),I&&I.pendingBranch&&!I.isUnmounted&&$.asyncDep&&!$.asyncResolved&&$.suspenseId===I.pendingId&&(I.deps--,I.deps===0&&I.resolve())},Z=($,I,H,de=!1,Ce=!1,Ae=0)=>{for(let U=Ae;U<$.length;U++)le($[U],I,H,de,Ce)},W=$=>{if($.shapeFlag&6)return W($.component.subTree);if($.shapeFlag&128)return $.suspense.next();const I=w($.anchor||$.el),H=I&&I[Pd];return H?w(H):I};let te=!1;const N=($,I,H)=>{$==null?I._vnode&&le(I._vnode,null,null,!0):E(I._vnode||null,$,I,null,null,null,H),I._vnode=$,te||(te=!0,Md(),Dd(),te=!1)},q={p:E,um:le,m:Q,r:be,mt:ae,mc:re,pc:ee,pbc:Re,n:W,o:e};return{render:N,hydrate:void 0,createApp:t1(N)}}function Su({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 cs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function p1(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Tu(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 r=o[s];let u=a[s];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=a[s]=Ma(a[s]),u.el=r.el),!n&&u.patchFlag!==-2&&Tu(r,u)),u.type===Ai&&(u.el=r.el)}}function f1(e){const t=e.slice(),n=[0];let o,a,s,r,u;const d=e.length;for(o=0;o<d;o++){const m=e[o];if(m!==0){if(a=n[n.length-1],e[a]<m){t[o]=a,n.push(o);continue}for(s=0,r=n.length-1;s<r;)u=s+r>>1,e[n[u]]<m?s=u+1:r=u;m<e[n[s]]&&(s>0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function yp(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:yp(t)}function bp(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const g1=Symbol.for("v-scx"),m1=()=>Rs(g1);function It(e,t,n){return wp(e,t,n)}function wp(e,t,n=tn){const{immediate:o,deep:a,flush:s,once:r}=n,u=Sn({},n),d=t&&o||!t&&s!=="post";let m;if(Ri){if(s==="sync"){const b=m1();m=b.__watcherHandles||(b.__watcherHandles=[])}else if(!d){const b=()=>{};return b.stop=zo,b.resume=zo,b.pause=zo,b}}const f=$n;u.call=(b,T,E)=>Lo(b,f,T,E);let g=!1;s==="post"?u.scheduler=b=>{Hn(b,f&&f.suspense)}:s!=="sync"&&(g=!0,u.scheduler=(b,T)=>{T?b():pu(b)}),u.augmentJob=b=>{t&&(b.flags|=4),g&&(b.flags|=2,f&&(b.id=f.uid,b.i=f))};const w=kv(e,t,u);return Ri&&(m?m.push(w):d&&w()),w}function h1(e,t,n){const o=this.proxy,a=fn(e)?e.includes(".")?xp(o,e):()=>o[e]:e.bind(o,o);let s;yt(t)?s=t:(s=t.handler,n=t);const r=Oi(this),u=wp(a,s.bind(o),n);return r(),u}function xp(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 v1=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${wo(t)}Modifiers`]||e[`${ka(t)}Modifiers`];function _1(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||tn;let a=n;const s=t.startsWith("update:"),r=s&&v1(o,t.slice(7));r&&(r.trim&&(a=n.map(f=>fn(f)?f.trim():f)),r.number&&(a=n.map(wr)));let u,d=o[u=Yl(t)]||o[u=Yl(wo(t))];!d&&s&&(d=o[u=Yl(ka(t))]),d&&Lo(d,e,6,a);const m=o[u+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Lo(m,e,6,a)}}function Sp(e,t,n=!1){const o=t.emitsCache,a=o.get(e);if(a!==void 0)return a;const s=e.emits;let r={},u=!1;if(!yt(e)){const d=m=>{const f=Sp(m,t,!0);f&&(u=!0,Sn(r,f))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!s&&!u?(nn(e)&&o.set(e,null),null):(dt(s)?s.forEach(d=>r[d]=null):Sn(r,s),nn(e)&&o.set(e,r),r)}function zr(e,t){return!e||!vr(t)?!1:(t=t.slice(2).replace(/Once$/,""),qt(e,t[0].toLowerCase()+t.slice(1))||qt(e,ka(t))||qt(e,t))}function oO(){}function Tp(e){const{type:t,vnode:n,proxy:o,withProxy:a,propsOptions:[s],slots:r,attrs:u,emit:d,render:m,renderCache:f,props:g,data:w,setupState:b,ctx:T,inheritAttrs:E}=e,O=Dr(e);let M,V;try{if(n.shapeFlag&4){const D=a||o,z=D;M=Wo(m.call(z,D,f,g,b,w,T)),V=u}else{const D=t;M=Wo(D.length>1?D(g,{attrs:u,slots:r,emit:d}):D(g,null)),V=t.props?u:y1(u)}}catch(D){Li.length=0,Lr(D,e,1),M=at(jn)}let pe=M;if(V&&E!==!1){const D=Object.keys(V),{shapeFlag:z}=pe;D.length&&z&7&&(s&&D.some(jl)&&(V=b1(V,s)),pe=La(pe,V,!1,!0))}return n.dirs&&(pe=La(pe,null,!1,!0),pe.dirs=pe.dirs?pe.dirs.concat(n.dirs):n.dirs),n.transition&&ls(pe,n.transition),M=pe,Dr(O),M}const y1=e=>{let t;for(const n in e)(n==="class"||n==="style"||vr(n))&&((t||(t={}))[n]=e[n]);return t},b1=(e,t)=>{const n={};for(const o in e)(!jl(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function w1(e,t,n){const{props:o,children:a,component:s}=e,{props:r,children:u,patchFlag:d}=t,m=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return o?kp(o,r,m):!!r;if(d&8){const f=t.dynamicProps;for(let g=0;g<f.length;g++){const w=f[g];if(r[w]!==o[w]&&!zr(m,w))return!0}}}else return(a||u)&&(!u||!u.$stable)?!0:o===r?!1:o?r?kp(o,r,m):!0:!!r;return!1}function kp(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(t[s]!==e[s]&&!zr(n,s))return!0}return!1}function x1({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Cp=e=>e.__isSuspense;function S1(e,t){t&&t.pendingBranch?dt(e)?t.effects.push(...e):t.effects.push(e):Mv(e)}const qe=Symbol.for("v-fgt"),Ai=Symbol.for("v-txt"),jn=Symbol.for("v-cmt"),ku=Symbol.for("v-stc"),Li=[];let fo=null;function C(e=!1){Li.push(fo=e?null:[])}function T1(){Li.pop(),fo=Li[Li.length-1]||null}let Mi=1;function Ep(e,t=!1){Mi+=e,e<0&&fo&&t&&(fo.hasOnce=!0)}function $p(e){return e.dynamicChildren=Mi>0?fo||Es:null,T1(),Mi>0&&fo&&fo.push(e),e}function A(e,t,n,o,a,s){return $p(i(e,t,n,o,a,s,!0))}function Qt(e,t,n,o,a){return $p(at(e,t,n,o,a,!0))}function Di(e){return e?e.__v_isVNode===!0:!1}function ds(e,t){return e.type===t.type&&e.key===t.key}const Ip=({key:e})=>e??null,Vr=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?fn(e)||gn(e)||yt(e)?{i:Tn,r:e,k:t,f:!!n}:e:null);function i(e,t=null,n=null,o=0,a=null,s=e===qe?0:1,r=!1,u=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ip(t),ref:t&&Vr(t),scopeId:Rd,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:Tn};return u?(Cu(d,n),s&128&&e.normalize(d)):n&&(d.shapeFlag|=fn(n)?8:16),Mi>0&&!r&&fo&&(d.patchFlag>0||s&6)&&d.patchFlag!==32&&fo.push(d),d}const at=k1;function k1(e,t=null,n=null,o=0,a=null,s=!1){if((!e||e===Gv)&&(e=jn),Di(e)){const u=La(e,t,!0);return n&&Cu(u,n),Mi>0&&!s&&fo&&(u.shapeFlag&6?fo[fo.indexOf(e)]=u:fo.push(u)),u.patchFlag=-2,u}if(N1(e)&&(e=e.__vccOpts),t){t=C1(t);let{class:u,style:d}=t;u&&!fn(u)&&(t.class=We(u)),nn(d)&&(lu(d)&&!dt(d)&&(d=Sn({},d)),t.style=Ft(d))}const r=fn(e)?1:Cp(e)?128:Nd(e)?64:nn(e)?4:yt(e)?2:0;return i(e,t,n,o,a,r,s,!0)}function C1(e){return e?lu(e)||dp(e)?Sn({},e):e:null}function La(e,t,n=!1,o=!1){const{props:a,ref:s,patchFlag:r,children:u,transition:d}=e,m=t?E1(a||{},t):a,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&Ip(m),ref:t&&t.ref?n&&s?dt(s)?s.concat(Vr(t)):[s,Vr(t)]:Vr(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==qe?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&La(e.ssContent),ssFallback:e.ssFallback&&La(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&o&&ls(f,d.clone(f)),f}function ut(e=" ",t=0){return at(Ai,null,e,t)}function Ie(e="",t=!1){return t?(C(),Qt(jn,null,e)):at(jn,null,e)}function Wo(e){return e==null||typeof e=="boolean"?at(jn):dt(e)?at(qe,null,e.slice()):Di(e)?Ma(e):at(Ai,null,String(e))}function Ma(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:La(e)}function Cu(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),Cu(e,a()),a._c&&(a._d=!0));return}else{n=32;const a=t._;!a&&!dp(t)?t._ctx=Tn:a===3&&Tn&&(Tn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else yt(t)?(t={default:t,_ctx:Tn},n=32):(t=String(t),o&64?(n=16,t=[ut(t)]):n=8);e.children=t,e.shapeFlag|=n}function E1(...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=We([t.class,o.class]));else if(a==="style")t.style=Ft([t.style,o.style]);else if(vr(a)){const s=t[a],r=o[a];r&&s!==r&&!(dt(s)&&s.includes(r))&&(t[a]=s?[].concat(s,r):r)}else a!==""&&(t[a]=o[a])}return t}function Ho(e,t,n,o=null){Lo(e,t,7,[n,o])}const $1=lp();let I1=0;function A1(e,t,n){const o=e.type,a=(t?t.appContext:e.appContext)||$1,s={uid:I1++,vnode:e,type:o,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new id(!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:fp(o,a),emitsOptions:Sp(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=_1.bind(null,s),e.ce&&e.ce(s),s}let $n=null;const ps=()=>$n||Tn;let Wr,Eu;{const e=xr(),t=(n,o)=>{let a;return(a=e[n])||(a=e[n]=[]),a.push(o),s=>{a.length>1?a.forEach(r=>r(s)):a[0](s)}};Wr=t("__VUE_INSTANCE_SETTERS__",n=>$n=n),Eu=t("__VUE_SSR_SETTERS__",n=>Ri=n)}const Oi=e=>{const t=$n;return Wr(e),e.scope.on(),()=>{e.scope.off(),Wr(t)}},Ap=()=>{$n&&$n.scope.off(),Wr(null)};function Lp(e){return e.vnode.shapeFlag&4}let Ri=!1;function L1(e,t=!1,n=!1){t&&Eu(t);const{props:o,children:a}=e.vnode,s=Lp(e);a1(e,o,s,t),l1(e,a,n);const r=s?M1(e,t):void 0;return t&&Eu(!1),r}function M1(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Yv);const{setup:o}=n;if(o){sa();const a=e.setupContext=o.length>1?O1(e):null,s=Oi(e),r=Ls(o,e,0,[e.props,a]),u=Qc(r);if(ia(),s(),(u||e.sp)&&!Os(e)&&Jd(e),u){if(r.then(Ap,Ap),t)return r.then(d=>{Mp(e,d)}).catch(d=>{Lr(d,e,0)});e.asyncDep=r}else Mp(e,r)}else Dp(e)}function Mp(e,t,n){yt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:nn(t)&&(e.setupState=$d(t)),Dp(e)}function Dp(e,t,n){const o=e.type;e.render||(e.render=o.render||zo);{const a=Oi(e);sa();try{Kv(e)}finally{ia(),a()}}}const D1={get(e,t){return On(e,"get",""),e[t]}};function O1(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,D1),slots:e.slots,emit:e.emit,expose:t}}function Hr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy($d(uu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in $i)return $i[n](e)},has(t,n){return n in t||n in $i}})):e.proxy}const R1=/(?:^|[-_])(\w)/g,P1=e=>e.replace(R1,t=>t.toUpperCase()).replace(/[-_]/g,"");function Op(e,t=!0){return yt(e)?e.displayName||e.name:e.name||t&&e.__name}function Rp(e,t,n=!1){let o=Op(t);if(!o&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(o=a[1])}if(!o&&e&&e.parent){const a=s=>{for(const r in s)if(s[r]===t)return r};o=a(e.components||e.parent.type.components)||a(e.appContext.components)}return o?P1(o):n?"App":"Anonymous"}function N1(e){return yt(e)&&"__vccOpts"in e}const Bt=(e,t)=>Sv(e,t,Ri);function zt(e,t,n){const o=arguments.length;return o===2?nn(t)&&!dt(t)?Di(t)?at(e,null,[t]):at(e,t):at(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Di(n)&&(n=[n]),at(e,t,n))}const F1="3.5.13";/**
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let $u;const Pp=typeof window<"u"&&window.trustedTypes;if(Pp)try{$u=Pp.createPolicy("vue",{createHTML:e=>e})}catch{}const Np=$u?e=>$u.createHTML(e):e=>e,B1="http://www.w3.org/2000/svg",U1="http://www.w3.org/1998/Math/MathML",da=typeof document<"u"?document:null,Fp=da&&da.createElement("template"),z1={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"?da.createElementNS(B1,e):t==="mathml"?da.createElementNS(U1,e):n?da.createElement(e,{is:n}):da.createElement(e);return e==="select"&&o&&o.multiple!=null&&a.setAttribute("multiple",o.multiple),a},createText:e=>da.createTextNode(e),createComment:e=>da.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>da.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,a,s){const r=n?n.previousSibling:t.lastChild;if(a&&(a===s||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),n),!(a===s||!(a=a.nextSibling)););else{Fp.innerHTML=Np(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const u=Fp.content;if(o==="svg"||o==="mathml"){const d=u.firstChild;for(;d.firstChild;)u.appendChild(d.firstChild);u.removeChild(d)}t.insertBefore(u,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Da="transition",Pi="animation",Ps=Symbol("_vtc"),Bp={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},Up=Sn({},jd,Bp),jr=(e=>(e.displayName="Transition",e.props=Up,e))((e,{slots:t})=>zt(Rv,Vp(e),t)),fs=(e,t=[])=>{dt(e)?e.forEach(n=>n(...t)):e&&e(...t)},zp=e=>e?dt(e)?e.some(t=>t.length>1):e.length>1:!1;function Vp(e){const t={};for(const fe in e)fe in Bp||(t[fe]=e[fe]);if(e.css===!1)return t;const{name:n="v",type:o,duration:a,enterFromClass:s=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:d=s,appearActiveClass:m=r,appearToClass:f=u,leaveFromClass:g=`${n}-leave-from`,leaveActiveClass:w=`${n}-leave-active`,leaveToClass:b=`${n}-leave-to`}=e,T=V1(a),E=T&&T[0],O=T&&T[1],{onBeforeEnter:M,onEnter:V,onEnterCancelled:pe,onLeave:D,onLeaveCancelled:z,onBeforeAppear:ie=M,onAppear:P=V,onAppearCancelled:re=pe}=t,ce=(fe,xe,ae,J)=>{fe._enterCancelled=J,Oa(fe,xe?f:u),Oa(fe,xe?m:r),ae&&ae()},Re=(fe,xe)=>{fe._isLeaving=!1,Oa(fe,g),Oa(fe,b),Oa(fe,w),xe&&xe()},Le=fe=>(xe,ae)=>{const J=fe?P:V,se=()=>ce(xe,fe,ae);fs(J,[xe,se]),Wp(()=>{Oa(xe,fe?d:s),jo(xe,fe?f:u),zp(J)||Hp(xe,o,E,se)})};return Sn(t,{onBeforeEnter(fe){fs(M,[fe]),jo(fe,s),jo(fe,r)},onBeforeAppear(fe){fs(ie,[fe]),jo(fe,d),jo(fe,m)},onEnter:Le(!1),onAppear:Le(!0),onLeave(fe,xe){fe._isLeaving=!0;const ae=()=>Re(fe,xe);jo(fe,g),fe._enterCancelled?(jo(fe,w),Au()):(Au(),jo(fe,w)),Wp(()=>{fe._isLeaving&&(Oa(fe,g),jo(fe,b),zp(D)||Hp(fe,o,O,ae))}),fs(D,[fe,ae])},onEnterCancelled(fe){ce(fe,!1,void 0,!0),fs(pe,[fe])},onAppearCancelled(fe){ce(fe,!0,void 0,!0),fs(re,[fe])},onLeaveCancelled(fe){Re(fe),fs(z,[fe])}})}function V1(e){if(e==null)return null;if(nn(e))return[Iu(e.enter),Iu(e.leave)];{const t=Iu(e);return[t,t]}}function Iu(e){return Vh(e)}function jo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Ps]||(e[Ps]=new Set)).add(t)}function Oa(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Ps];n&&(n.delete(t),n.size||(e[Ps]=void 0))}function Wp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let W1=0;function Hp(e,t,n,o){const a=e._endId=++W1,s=()=>{a===e._endId&&o()};if(n!=null)return setTimeout(s,n);const{type:r,timeout:u,propCount:d}=jp(e,t);if(!r)return o();const m=r+"end";let f=0;const g=()=>{e.removeEventListener(m,w),s()},w=b=>{b.target===e&&++f>=d&&g()};setTimeout(()=>{f<d&&g()},u+1),e.addEventListener(m,w)}function jp(e,t){const n=window.getComputedStyle(e),o=T=>(n[T]||"").split(", "),a=o(`${Da}Delay`),s=o(`${Da}Duration`),r=Gp(a,s),u=o(`${Pi}Delay`),d=o(`${Pi}Duration`),m=Gp(u,d);let f=null,g=0,w=0;t===Da?r>0&&(f=Da,g=r,w=s.length):t===Pi?m>0&&(f=Pi,g=m,w=d.length):(g=Math.max(r,m),f=g>0?r>m?Da:Pi:null,w=f?f===Da?s.length:d.length:0);const b=f===Da&&/\b(transform|all)(,|$)/.test(o(`${Da}Property`).toString());return{type:f,timeout:g,propCount:w,hasTransform:b}}function Gp(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>qp(n)+qp(e[o])))}function qp(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Au(){return document.body.offsetHeight}function H1(e,t,n){const o=e[Ps];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Gr=Symbol("_vod"),Yp=Symbol("_vsh"),Ns={beforeMount(e,{value:t},{transition:n}){e[Gr]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ni(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),Ni(e,!0),o.enter(e)):o.leave(e,()=>{Ni(e,!1)}):Ni(e,t))},beforeUnmount(e,{value:t}){Ni(e,t)}};function Ni(e,t){e.style.display=t?e[Gr]:"none",e[Yp]=!t}const j1=Symbol(""),G1=/(^|;)\s*display\s*:/;function q1(e,t,n){const o=e.style,a=fn(n);let s=!1;if(n&&!a){if(t)if(fn(t))for(const r of t.split(";")){const u=r.slice(0,r.indexOf(":")).trim();n[u]==null&&qr(o,u,"")}else for(const r in t)n[r]==null&&qr(o,r,"");for(const r in n)r==="display"&&(s=!0),qr(o,r,n[r])}else if(a){if(t!==n){const r=o[j1];r&&(n+=";"+r),o.cssText=n,s=G1.test(n)}}else t&&e.removeAttribute("style");Gr in e&&(e[Gr]=s?o.display:"",e[Yp]&&(o.display="none"))}const Kp=/\s*!important$/;function qr(e,t,n){if(dt(n))n.forEach(o=>qr(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Y1(e,t);Kp.test(n)?e.setProperty(ka(o),n.replace(Kp,""),"important"):e[o]=n}}const Jp=["Webkit","Moz","ms"],Lu={};function Y1(e,t){const n=Lu[t];if(n)return n;let o=wo(t);if(o!=="filter"&&o in e)return Lu[t]=o;o=yr(o);for(let a=0;a<Jp.length;a++){const s=Jp[a]+o;if(s in e)return Lu[t]=s}return t}const Xp="http://www.w3.org/1999/xlink";function Qp(e,t,n,o,a,s=qh(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Xp,t.slice(6,t.length)):e.setAttributeNS(Xp,t,n):n==null||s&&!od(n)?e.removeAttribute(t):e.setAttribute(t,s?"":Io(n)?String(n):n)}function Zp(e,t,n,o,a){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Np(n):n);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const u=s==="OPTION"?e.getAttribute("value")||"":e.value,d=n==null?e.type==="checkbox"?"on":"":String(n);(u!==d||!("_value"in e))&&(e.value=d),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=od(n):n==null&&u==="string"?(n="",r=!0):u==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(a||t)}function pa(e,t,n,o){e.addEventListener(t,n,o)}function K1(e,t,n,o){e.removeEventListener(t,n,o)}const ef=Symbol("_vei");function J1(e,t,n,o,a=null){const s=e[ef]||(e[ef]={}),r=s[t];if(o&&r)r.value=o;else{const[u,d]=X1(t);if(o){const m=s[t]=e_(o,a);pa(e,u,m,d)}else r&&(K1(e,u,r,d),s[t]=void 0)}}const tf=/(?:Once|Passive|Capture)$/;function X1(e){let t;if(tf.test(e)){t={};let o;for(;o=e.match(tf);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):ka(e.slice(2)),t]}let Mu=0;const Q1=Promise.resolve(),Z1=()=>Mu||(Q1.then(()=>Mu=0),Mu=Date.now());function e_(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Lo(t_(o,n.value),t,5,[o])};return n.value=e,n.attached=Z1(),n}function t_(e,t){if(dt(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>a=>!a._stopped&&o&&o(a))}else return t}const nf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,n_=(e,t,n,o,a,s)=>{const r=a==="svg";t==="class"?H1(e,o,r):t==="style"?q1(e,n,o):vr(t)?jl(t)||J1(e,t,n,o,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):o_(e,t,o,r))?(Zp(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Qp(e,t,o,r,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!fn(o))?Zp(e,wo(t),o,s,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Qp(e,t,o,r))};function o_(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&nf(t)&&yt(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||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 nf(t)&&fn(n)?!1:t in e}const of=new WeakMap,af=new WeakMap,Yr=Symbol("_moveCb"),sf=Symbol("_enterCb"),a_=(e=>(delete e.props.mode,e))({name:"TransitionGroup",props:Sn({},Up,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ps(),o=Hd();let a,s;return Zd(()=>{if(!a.length)return;const r=e.moveClass||`${e.name||"v"}-move`;if(!l_(a[0].el,n.vnode.el,r))return;a.forEach(s_),a.forEach(i_);const u=a.filter(r_);Au(),u.forEach(d=>{const m=d.el,f=m.style;jo(m,r),f.transform=f.webkitTransform=f.transitionDuration="";const g=m[Yr]=w=>{w&&w.target!==m||(!w||/transform$/.test(w.propertyName))&&(m.removeEventListener("transitionend",g),m[Yr]=null,Oa(m,r))};m.addEventListener("transitionend",g)})}),()=>{const r=Mt(e),u=Vp(r);let d=r.tag||qe;if(a=[],s)for(let m=0;m<s.length;m++){const f=s[m];f.el&&f.el instanceof Element&&(a.push(f),ls(f,Ci(f,u,o,n)),of.set(f,f.el.getBoundingClientRect()))}s=t.default?mu(t.default()):[];for(let m=0;m<s.length;m++){const f=s[m];f.key!=null&&ls(f,Ci(f,u,o,n))}return at(d,null,s)}}});function s_(e){const t=e.el;t[Yr]&&t[Yr](),t[sf]&&t[sf]()}function i_(e){af.set(e,e.el.getBoundingClientRect())}function r_(e){const t=of.get(e),n=af.get(e),o=t.left-n.left,a=t.top-n.top;if(o||a){const s=e.el.style;return s.transform=s.webkitTransform=`translate(${o}px,${a}px)`,s.transitionDuration="0s",e}}function l_(e,t,n){const o=e.cloneNode(),a=e[Ps];a&&a.forEach(u=>{u.split(/\s+/).forEach(d=>d&&o.classList.remove(d))}),n.split(/\s+/).forEach(u=>u&&o.classList.add(u)),o.style.display="none";const s=t.nodeType===1?t:t.parentNode;s.appendChild(o);const{hasTransform:r}=jp(o);return s.removeChild(o),r}const Ra=e=>{const t=e.props["onUpdate:modelValue"]||!1;return dt(t)?n=>br(t,n):t};function u_(e){e.target.composing=!0}function rf(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const To=Symbol("_assign"),ze={created(e,{modifiers:{lazy:t,trim:n,number:o}},a){e[To]=Ra(a);const s=o||a.props&&a.props.type==="number";pa(e,t?"change":"input",r=>{if(r.target.composing)return;let u=e.value;n&&(u=u.trim()),s&&(u=wr(u)),e[To](u)}),n&&pa(e,"change",()=>{e.value=e.value.trim()}),t||(pa(e,"compositionstart",u_),pa(e,"compositionend",rf),pa(e,"change",rf))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:a,number:s}},r){if(e[To]=Ra(r),e.composing)return;const u=(s||e.type==="number")&&!/^0\d/.test(e.value)?wr(e.value):e.value,d=t??"";u!==d&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||a&&e.value.trim()===d)||(e.value=d))}},on={deep:!0,created(e,t,n){e[To]=Ra(n),pa(e,"change",()=>{const o=e._modelValue,a=Fs(e),s=e.checked,r=e[To];if(dt(o)){const u=Kl(o,a),d=u!==-1;if(s&&!d)r(o.concat(a));else if(!s&&d){const m=[...o];m.splice(u,1),r(m)}}else if(Is(o)){const u=new Set(o);s?u.add(a):u.delete(a),r(u)}else r(cf(e,s))})},mounted:lf,beforeUpdate(e,t,n){e[To]=Ra(n),lf(e,t,n)}};function lf(e,{value:t,oldValue:n},o){e._modelValue=t;let a;if(dt(t))a=Kl(t,o.props.value)>-1;else if(Is(t))a=t.has(o.props.value);else{if(t===n)return;a=ns(t,cf(e,!0))}e.checked!==a&&(e.checked=a)}const fa={created(e,{value:t},n){e.checked=ns(t,n.props.value),e[To]=Ra(n),pa(e,"change",()=>{e[To](Fs(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[To]=Ra(o),t!==n&&(e.checked=ns(t,o.props.value))}},an={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const a=Is(t);pa(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?wr(Fs(r)):Fs(r));e[To](e.multiple?a?new Set(s):s:s[0]),e._assigning=!0,wt(()=>{e._assigning=!1})}),e[To]=Ra(o)},mounted(e,{value:t}){uf(e,t)},beforeUpdate(e,t,n){e[To]=Ra(n)},updated(e,{value:t}){e._assigning||uf(e,t)}};function uf(e,t){const n=e.multiple,o=dt(t);if(!(n&&!o&&!Is(t))){for(let a=0,s=e.options.length;a<s;a++){const r=e.options[a],u=Fs(r);if(n)if(o){const d=typeof u;d==="string"||d==="number"?r.selected=t.some(m=>String(m)===String(u)):r.selected=Kl(t,u)>-1}else r.selected=t.has(u);else if(ns(Fs(r),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Fs(e){return"_value"in e?e._value:e.value}function cf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const df={created(e,t,n){Kr(e,t,n,null,"created")},mounted(e,t,n){Kr(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Kr(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Kr(e,t,n,o,"updated")}};function c_(e,t){switch(e){case"SELECT":return an;case"TEXTAREA":return ze;default:switch(t){case"checkbox":return on;case"radio":return fa;default:return ze}}}function Kr(e,t,n,o,a){const r=c_(e.tagName,n.props&&n.props.type)[a];r&&r(e,t,n,o)}const d_=["ctrl","shift","alt","meta"],p_={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)=>d_.some(n=>e[`${n}Key`]&&!t.includes(n))},vt=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(a,...s)=>{for(let r=0;r<t.length;r++){const u=p_[t[r]];if(u&&u(a,t))return}return e(a,...s)})},f_={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Pn=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=a=>{if(!("key"in a))return;const s=ka(a.key);if(t.some(r=>r===s||f_[r]===s))return e(a)})},g_=Sn({patchProp:n_},z1);let pf;function ff(){return pf||(pf=c1(g_))}const gf=(...e)=>{ff().render(...e)},m_=(...e)=>{const t=ff().createApp(...e),{mount:n}=t;return t.mount=o=>{const a=v_(o);if(!a)return;const s=t._component;!yt(s)&&!s.render&&!s.template&&(s.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const r=n(a,!1,h_(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),r},t};function h_(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function v_(e){return fn(e)?document.querySelector(e):e}/*!
* shared v11.1.2
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/const Jr=typeof window<"u",Pa=(e,t=!1)=>t?Symbol.for(e):Symbol(e),__=(e,t,n)=>y_({l:e,k:t,s:n}),y_=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),vn=e=>typeof e=="number"&&isFinite(e),b_=e=>Du(e)==="[object Date]",Bs=e=>Du(e)==="[object RegExp]",Xr=e=>Lt(e)&&Object.keys(e).length===0,kn=Object.assign,w_=Object.create,Zt=(e=null)=>w_(e);let mf;const gs=()=>mf||(mf=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Zt());function hf(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const x_=Object.prototype.hasOwnProperty;function Mo(e,t){return x_.call(e,t)}const _n=Array.isArray,cn=e=>typeof e=="function",Ze=e=>typeof e=="string",Vt=e=>typeof e=="boolean",Gt=e=>e!==null&&typeof e=="object",S_=e=>Gt(e)&&cn(e.then)&&cn(e.catch),vf=Object.prototype.toString,Du=e=>vf.call(e),Lt=e=>Du(e)==="[object Object]",T_=e=>e==null?"":_n(e)||Lt(e)&&e.toString===vf?JSON.stringify(e,null,2):String(e);function Ou(e,t=""){return e.reduce((n,o,a)=>a===0?n+o:n+t+o,"")}function k_(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const Qr=e=>!Gt(e)||_n(e);function Zr(e,t){if(Qr(e)||Qr(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__"&&(Gt(o[s])&&!Gt(a[s])&&(a[s]=Array.isArray(o[s])?[]:Zt()),Qr(a[s])||Qr(o[s])?a[s]=o[s]:n.push({src:o[s],des:a[s]}))})}}/*!
* message-compiler v11.1.2
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function C_(e,t,n){return{line:e,column:t,offset:n}}function Ru(e,t,n){return{start:e,end:t}}const Kt={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},E_=17;function el(e,t,n={}){const{domain:o,messages:a,args:s}=n,r=e,u=new SyntaxError(String(r));return u.code=e,t&&(u.location=t),u.domain=o,u}function $_(e){throw e}const ga=" ",I_="\r",Gn=`
`,A_="\u2028",L_="\u2029";function M_(e){const t=e;let n=0,o=1,a=1,s=0;const r=P=>t[P]===I_&&t[P+1]===Gn,u=P=>t[P]===Gn,d=P=>t[P]===L_,m=P=>t[P]===A_,f=P=>r(P)||u(P)||d(P)||m(P),g=()=>n,w=()=>o,b=()=>a,T=()=>s,E=P=>r(P)||d(P)||m(P)?Gn:t[P],O=()=>E(n),M=()=>E(n+s);function V(){return s=0,f(n)&&(o++,a=0),r(n)&&n++,n++,a++,t[n]}function pe(){return r(n+s)&&s++,s++,t[n+s]}function D(){n=0,o=1,a=1,s=0}function z(P=0){s=P}function ie(){const P=n+s;for(;P!==n;)V();s=0}return{index:g,line:w,column:b,peekOffset:T,charAt:E,currentChar:O,currentPeek:M,next:V,peek:pe,reset:D,resetPeek:z,skipToPeek:ie}}const Na=void 0,D_=".",_f="'",O_="tokenizer";function R_(e,t={}){const n=t.location!==!1,o=M_(e),a=()=>o.index(),s=()=>C_(o.line(),o.column(),o.index()),r=s(),u=a(),d={currentType:13,offset:u,startLoc:r,endLoc:r,lastType:13,lastOffset:u,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},m=()=>d,{onError:f}=t;function g(U,k,j,...ne){const Fe=m();if(k.column+=j,k.offset+=j,f){const Oe=n?Ru(Fe.startLoc,k):null,ge=el(U,Oe,{domain:O_,args:ne});f(ge)}}function w(U,k,j){U.endLoc=s(),U.currentType=k;const ne={type:k};return n&&(ne.loc=Ru(U.startLoc,U.endLoc)),j!=null&&(ne.value=j),ne}const b=U=>w(U,13);function T(U,k){return U.currentChar()===k?(U.next(),k):(g(Kt.EXPECTED_TOKEN,s(),0,k),"")}function E(U){let k="";for(;U.currentPeek()===ga||U.currentPeek()===Gn;)k+=U.currentPeek(),U.peek();return k}function O(U){const k=E(U);return U.skipToPeek(),k}function M(U){if(U===Na)return!1;const k=U.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function V(U){if(U===Na)return!1;const k=U.charCodeAt(0);return k>=48&&k<=57}function pe(U,k){const{currentType:j}=k;if(j!==2)return!1;E(U);const ne=M(U.currentPeek());return U.resetPeek(),ne}function D(U,k){const{currentType:j}=k;if(j!==2)return!1;E(U);const ne=U.currentPeek()==="-"?U.peek():U.currentPeek(),Fe=V(ne);return U.resetPeek(),Fe}function z(U,k){const{currentType:j}=k;if(j!==2)return!1;E(U);const ne=U.currentPeek()===_f;return U.resetPeek(),ne}function ie(U,k){const{currentType:j}=k;if(j!==7)return!1;E(U);const ne=U.currentPeek()===".";return U.resetPeek(),ne}function P(U,k){const{currentType:j}=k;if(j!==8)return!1;E(U);const ne=M(U.currentPeek());return U.resetPeek(),ne}function re(U,k){const{currentType:j}=k;if(!(j===7||j===11))return!1;E(U);const ne=U.currentPeek()===":";return U.resetPeek(),ne}function ce(U,k){const{currentType:j}=k;if(j!==9)return!1;const ne=()=>{const Oe=U.currentPeek();return Oe==="{"?M(U.peek()):Oe==="@"||Oe==="|"||Oe===":"||Oe==="."||Oe===ga||!Oe?!1:Oe===Gn?(U.peek(),ne()):Le(U,!1)},Fe=ne();return U.resetPeek(),Fe}function Re(U){E(U);const k=U.currentPeek()==="|";return U.resetPeek(),k}function Le(U,k=!0){const j=(Fe=!1,Oe="")=>{const ge=U.currentPeek();return ge==="{"||ge==="@"||!ge?Fe:ge==="|"?!(Oe===ga||Oe===Gn):ge===ga?(U.peek(),j(!0,ga)):ge===Gn?(U.peek(),j(!0,Gn)):!0},ne=j();return k&&U.resetPeek(),ne}function fe(U,k){const j=U.currentChar();return j===Na?Na:k(j)?(U.next(),j):null}function xe(U){const k=U.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function ae(U){return fe(U,xe)}function J(U){const k=U.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function se(U){return fe(U,J)}function X(U){const k=U.charCodeAt(0);return k>=48&&k<=57}function ee(U){return fe(U,X)}function Ee(U){const k=U.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function he(U){return fe(U,Ee)}function Q(U){let k="",j="";for(;k=ee(U);)j+=k;return j}function le(U){let k="";for(;;){const j=U.currentChar();if(j==="{"||j==="}"||j==="@"||j==="|"||!j)break;if(j===ga||j===Gn)if(Le(U))k+=j,U.next();else{if(Re(U))break;k+=j,U.next()}else k+=j,U.next()}return k}function be(U){O(U);let k="",j="";for(;k=se(U);)j+=k;return U.currentChar()===Na&&g(Kt.UNTERMINATED_CLOSING_BRACE,s(),0),j}function we(U){O(U);let k="";return U.currentChar()==="-"?(U.next(),k+=`-${Q(U)}`):k+=Q(U),U.currentChar()===Na&&g(Kt.UNTERMINATED_CLOSING_BRACE,s(),0),k}function _e(U){return U!==_f&&U!==Gn}function Z(U){O(U),T(U,"'");let k="",j="";for(;k=fe(U,_e);)k==="\\"?j+=W(U):j+=k;const ne=U.currentChar();return ne===Gn||ne===Na?(g(Kt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),ne===Gn&&(U.next(),T(U,"'")),j):(T(U,"'"),j)}function W(U){const k=U.currentChar();switch(k){case"\\":case"'":return U.next(),`\\${k}`;case"u":return te(U,k,4);case"U":return te(U,k,6);default:return g(Kt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function te(U,k,j){T(U,k);let ne="";for(let Fe=0;Fe<j;Fe++){const Oe=he(U);if(!Oe){g(Kt.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${ne}${U.currentChar()}`);break}ne+=Oe}return`\\${k}${ne}`}function N(U){return U!=="{"&&U!=="}"&&U!==ga&&U!==Gn}function q(U){O(U);let k="",j="";for(;k=fe(U,N);)j+=k;return j}function Y(U){let k="",j="";for(;k=ae(U);)j+=k;return j}function $(U){const k=j=>{const ne=U.currentChar();return ne==="{"||ne==="@"||ne==="|"||ne==="("||ne===")"||!ne||ne===ga?j:(j+=ne,U.next(),k(j))};return k("")}function I(U){O(U);const k=T(U,"|");return O(U),k}function H(U,k){let j=null;switch(U.currentChar()){case"{":return k.braceNest>=1&&g(Kt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),U.next(),j=w(k,2,"{"),O(U),k.braceNest++,j;case"}":return k.braceNest>0&&k.currentType===2&&g(Kt.EMPTY_PLACEHOLDER,s(),0),U.next(),j=w(k,3,"}"),k.braceNest--,k.braceNest>0&&O(U),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),j;case"@":return k.braceNest>0&&g(Kt.UNTERMINATED_CLOSING_BRACE,s(),0),j=de(U,k)||b(k),k.braceNest=0,j;default:{let Fe=!0,Oe=!0,ge=!0;if(Re(U))return k.braceNest>0&&g(Kt.UNTERMINATED_CLOSING_BRACE,s(),0),j=w(k,1,I(U)),k.braceNest=0,k.inLinked=!1,j;if(k.braceNest>0&&(k.currentType===4||k.currentType===5||k.currentType===6))return g(Kt.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,Ce(U,k);if(Fe=pe(U,k))return j=w(k,4,be(U)),O(U),j;if(Oe=D(U,k))return j=w(k,5,we(U)),O(U),j;if(ge=z(U,k))return j=w(k,6,Z(U)),O(U),j;if(!Fe&&!Oe&&!ge)return j=w(k,12,q(U)),g(Kt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,j.value),O(U),j;break}}return j}function de(U,k){const{currentType:j}=k;let ne=null;const Fe=U.currentChar();switch((j===7||j===8||j===11||j===9)&&(Fe===Gn||Fe===ga)&&g(Kt.INVALID_LINKED_FORMAT,s(),0),Fe){case"@":return U.next(),ne=w(k,7,"@"),k.inLinked=!0,ne;case".":return O(U),U.next(),w(k,8,".");case":":return O(U),U.next(),w(k,9,":");default:return Re(U)?(ne=w(k,1,I(U)),k.braceNest=0,k.inLinked=!1,ne):ie(U,k)||re(U,k)?(O(U),de(U,k)):P(U,k)?(O(U),w(k,11,Y(U))):ce(U,k)?(O(U),Fe==="{"?H(U,k)||ne:w(k,10,$(U))):(j===7&&g(Kt.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,Ce(U,k))}}function Ce(U,k){let j={type:13};if(k.braceNest>0)return H(U,k)||b(k);if(k.inLinked)return de(U,k)||b(k);switch(U.currentChar()){case"{":return H(U,k)||b(k);case"}":return g(Kt.UNBALANCED_CLOSING_BRACE,s(),0),U.next(),w(k,3,"}");case"@":return de(U,k)||b(k);default:{if(Re(U))return j=w(k,1,I(U)),k.braceNest=0,k.inLinked=!1,j;if(Le(U))return w(k,0,le(U));break}}return j}function Ae(){const{currentType:U,offset:k,startLoc:j,endLoc:ne}=d;return d.lastType=U,d.lastOffset=k,d.lastStartLoc=j,d.lastEndLoc=ne,d.offset=a(),d.startLoc=s(),o.currentChar()===Na?w(d,13):Ce(o,d)}return{nextToken:Ae,currentOffset:a,currentPosition:s,context:m}}const P_="parser",N_=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function F_(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 B_(e={}){const t=e.location!==!1,{onError:n}=e;function o(M,V,pe,D,...z){const ie=M.currentPosition();if(ie.offset+=D,ie.column+=D,n){const P=t?Ru(pe,ie):null,re=el(V,P,{domain:P_,args:z});n(re)}}function a(M,V,pe){const D={type:M};return t&&(D.start=V,D.end=V,D.loc={start:pe,end:pe}),D}function s(M,V,pe,D){t&&(M.end=V,M.loc&&(M.loc.end=pe))}function r(M,V){const pe=M.context(),D=a(3,pe.offset,pe.startLoc);return D.value=V,s(D,M.currentOffset(),M.currentPosition()),D}function u(M,V){const pe=M.context(),{lastOffset:D,lastStartLoc:z}=pe,ie=a(5,D,z);return ie.index=parseInt(V,10),M.nextToken(),s(ie,M.currentOffset(),M.currentPosition()),ie}function d(M,V){const pe=M.context(),{lastOffset:D,lastStartLoc:z}=pe,ie=a(4,D,z);return ie.key=V,M.nextToken(),s(ie,M.currentOffset(),M.currentPosition()),ie}function m(M,V){const pe=M.context(),{lastOffset:D,lastStartLoc:z}=pe,ie=a(9,D,z);return ie.value=V.replace(N_,F_),M.nextToken(),s(ie,M.currentOffset(),M.currentPosition()),ie}function f(M){const V=M.nextToken(),pe=M.context(),{lastOffset:D,lastStartLoc:z}=pe,ie=a(8,D,z);return V.type!==11?(o(M,Kt.UNEXPECTED_EMPTY_LINKED_MODIFIER,pe.lastStartLoc,0),ie.value="",s(ie,D,z),{nextConsumeToken:V,node:ie}):(V.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,pe.lastStartLoc,0,Go(V)),ie.value=V.value||"",s(ie,M.currentOffset(),M.currentPosition()),{node:ie})}function g(M,V){const pe=M.context(),D=a(7,pe.offset,pe.startLoc);return D.value=V,s(D,M.currentOffset(),M.currentPosition()),D}function w(M){const V=M.context(),pe=a(6,V.offset,V.startLoc);let D=M.nextToken();if(D.type===8){const z=f(M);pe.modifier=z.node,D=z.nextConsumeToken||M.nextToken()}switch(D.type!==9&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(D)),D=M.nextToken(),D.type===2&&(D=M.nextToken()),D.type){case 10:D.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(D)),pe.key=g(M,D.value||"");break;case 4:D.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(D)),pe.key=d(M,D.value||"");break;case 5:D.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(D)),pe.key=u(M,D.value||"");break;case 6:D.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(D)),pe.key=m(M,D.value||"");break;default:{o(M,Kt.UNEXPECTED_EMPTY_LINKED_KEY,V.lastStartLoc,0);const z=M.context(),ie=a(7,z.offset,z.startLoc);return ie.value="",s(ie,z.offset,z.startLoc),pe.key=ie,s(pe,z.offset,z.startLoc),{nextConsumeToken:D,node:pe}}}return s(pe,M.currentOffset(),M.currentPosition()),{node:pe}}function b(M){const V=M.context(),pe=V.currentType===1?M.currentOffset():V.offset,D=V.currentType===1?V.endLoc:V.startLoc,z=a(2,pe,D);z.items=[];let ie=null;do{const ce=ie||M.nextToken();switch(ie=null,ce.type){case 0:ce.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(ce)),z.items.push(r(M,ce.value||""));break;case 5:ce.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(ce)),z.items.push(u(M,ce.value||""));break;case 4:ce.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(ce)),z.items.push(d(M,ce.value||""));break;case 6:ce.value==null&&o(M,Kt.UNEXPECTED_LEXICAL_ANALYSIS,V.lastStartLoc,0,Go(ce)),z.items.push(m(M,ce.value||""));break;case 7:{const Re=w(M);z.items.push(Re.node),ie=Re.nextConsumeToken||null;break}}}while(V.currentType!==13&&V.currentType!==1);const P=V.currentType===1?V.lastOffset:M.currentOffset(),re=V.currentType===1?V.lastEndLoc:M.currentPosition();return s(z,P,re),z}function T(M,V,pe,D){const z=M.context();let ie=D.items.length===0;const P=a(1,V,pe);P.cases=[],P.cases.push(D);do{const re=b(M);ie||(ie=re.items.length===0),P.cases.push(re)}while(z.currentType!==13);return ie&&o(M,Kt.MUST_HAVE_MESSAGES_IN_PLURAL,pe,0),s(P,M.currentOffset(),M.currentPosition()),P}function E(M){const V=M.context(),{offset:pe,startLoc:D}=V,z=b(M);return V.currentType===13?z:T(M,pe,D,z)}function O(M){const V=R_(M,kn({},e)),pe=V.context(),D=a(0,pe.offset,pe.startLoc);return t&&D.loc&&(D.loc.source=M),D.body=E(V),e.onCacheKey&&(D.cacheKey=e.onCacheKey(M)),pe.currentType!==13&&o(V,Kt.UNEXPECTED_LEXICAL_ANALYSIS,pe.lastStartLoc,0,M[pe.offset]||""),s(D,V.currentOffset(),V.currentPosition()),D}return{parse:O}}function Go(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 U_(e,t={}){const n={ast:e,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function yf(e,t){for(let n=0;n<e.length;n++)Pu(e[n],t)}function Pu(e,t){switch(e.type){case 1:yf(e.cases,t),t.helper("plural");break;case 2:yf(e.items,t);break;case 6:{Pu(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 z_(e,t={}){const n=U_(e);n.helper("normalize"),e.body&&Pu(e.body,n);const o=n.context();e.helpers=Array.from(o.helpers)}function V_(e){const t=e.body;return t.type===2?bf(t):t.cases.forEach(n=>bf(n)),e}function bf(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=Ou(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 Us(e){switch(e.t=e.type,e.type){case 0:{const t=e;Us(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++)Us(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++)Us(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;Us(t.key),t.k=t.key,delete t.key,t.modifier&&(Us(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 W_(e,t){const{filename:n,breakLineCode:o,needIndent:a}=t,s=t.location!==!1,r={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};s&&e.loc&&(r.source=e.loc.source);const u=()=>r;function d(E,O){r.code+=E}function m(E,O=!0){const M=O?o:"";d(a?M+" ".repeat(E):M)}function f(E=!0){const O=++r.indentLevel;E&&m(O)}function g(E=!0){const O=--r.indentLevel;E&&m(O)}function w(){m(r.indentLevel)}return{context:u,push:d,indent:f,deindent:g,newline:w,helper:E=>`_${E}`,needIndent:()=>r.needIndent}}function H_(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),zs(e,t.key),t.modifier?(e.push(", "),zs(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function j_(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&&(zs(e,t.items[s]),s!==a-1);s++)e.push(", ");e.deindent(o()),e.push("])")}function G_(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&&(zs(e,t.cases[s]),s!==a-1);s++)e.push(", ");e.deindent(o()),e.push("])")}}function q_(e,t){t.body?zs(e,t.body):e.push("null")}function zs(e,t){const{helper:n}=e;switch(t.type){case 0:q_(e,t);break;case 1:G_(e,t);break;case 2:j_(e,t);break;case 6:H_(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 Y_=(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",r=e.helpers||[],u=W_(e,{filename:o,breakLineCode:a,needIndent:s});u.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),u.indent(s),r.length>0&&(u.push(`const { ${Ou(r.map(f=>`${f}: _${f}`),", ")} } = ctx`),u.newline()),u.push("return "),zs(u,e),u.deindent(s),u.push("}"),delete e.helpers;const{code:d,map:m}=u.context();return{ast:e,code:d,map:m?m.toJSON():void 0}};function K_(e,t={}){const n=kn({},t),o=!!n.jit,a=!!n.minify,s=n.optimize==null?!0:n.optimize,u=B_(n).parse(e);return o?(s&&V_(u),a&&Us(u),{ast:u,code:""}):(z_(u,n),Y_(u,n))}/*!
* core-base v11.1.2
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function J_(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(gs().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(gs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Nu(e){return n=>X_(n,e)}function X_(e,t){const n=Z_(t);if(n==null)throw Fi(0);if(Bu(n)===1){const s=t0(n);return e.plural(s.reduce((r,u)=>[...r,wf(e,u)],[]))}else return wf(e,n)}const Q_=["b","body"];function Z_(e){return Fa(e,Q_)}const e0=["c","cases"];function t0(e){return Fa(e,e0,[])}function wf(e,t){const n=o0(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const o=s0(t).reduce((a,s)=>[...a,Fu(e,s)],[]);return e.normalize(o)}}const n0=["s","static"];function o0(e){return Fa(e,n0)}const a0=["i","items"];function s0(e){return Fa(e,a0,[])}function Fu(e,t){const n=Bu(t);switch(n){case 3:return tl(t,n);case 9:return tl(t,n);case 4:{const o=t;if(Mo(o,"k")&&o.k)return e.interpolate(e.named(o.k));if(Mo(o,"key")&&o.key)return e.interpolate(e.named(o.key));throw Fi(n)}case 5:{const o=t;if(Mo(o,"i")&&vn(o.i))return e.interpolate(e.list(o.i));if(Mo(o,"index")&&vn(o.index))return e.interpolate(e.list(o.index));throw Fi(n)}case 6:{const o=t,a=u0(o),s=d0(o);return e.linked(Fu(e,s),a?Fu(e,a):void 0,e.type)}case 7:return tl(t,n);case 8:return tl(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const i0=["t","type"];function Bu(e){return Fa(e,i0)}const r0=["v","value"];function tl(e,t){const n=Fa(e,r0);if(n)return n;throw Fi(t)}const l0=["m","modifier"];function u0(e){return Fa(e,l0)}const c0=["k","key"];function d0(e){const t=Fa(e,c0);if(t)return t;throw Fi(6)}function Fa(e,t,n){for(let o=0;o<t.length;o++){const a=t[o];if(Mo(e,a)&&e[a]!=null)return e[a]}return n}function Fi(e){return new Error(`unhandled node type: ${e}`)}const p0=e=>e;let nl=Zt();function Vs(e){return Gt(e)&&Bu(e)===0&&(Mo(e,"b")||Mo(e,"body"))}function f0(e,t={}){let n=!1;const o=t.onError||$_;return t.onError=a=>{n=!0,o(a)},{...K_(e,t),detectError:n}}function g0(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ze(e)){Vt(t.warnHtmlMessage)&&t.warnHtmlMessage;const o=(t.onCacheKey||p0)(e),a=nl[o];if(a)return a;const{ast:s,detectError:r}=f0(e,{...t,location:!1,jit:!0}),u=Nu(s);return r?u:nl[o]=u}else{const n=e.cacheKey;if(n){const o=nl[n];return o||(nl[n]=Nu(e))}else return Nu(e)}}let Bi=null;function m0(e){Bi=e}function h0(e,t,n){Bi&&Bi.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}const v0=_0("function:translate");function _0(e){return t=>Bi&&Bi.emit(e,t)}const ma={INVALID_ARGUMENT:E_,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},y0=24;function ha(e){return el(e,null,void 0)}function Uu(e,t){return t.locale!=null?xf(t.locale):xf(e.locale)}let zu;function xf(e){if(Ze(e))return e;if(cn(e)){if(e.resolvedOnce&&zu!=null)return zu;if(e.constructor.name==="Function"){const t=e();if(S_(t))throw ha(ma.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return zu=t}else throw ha(ma.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw ha(ma.NOT_SUPPORT_LOCALE_TYPE)}function b0(e,t,n){return[...new Set([n,..._n(t)?t:Gt(t)?Object.keys(t):Ze(t)?[t]:[n]])]}function Sf(e,t,n){const o=Ze(n)?n:Ui,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let s=a.__localeChainCache.get(o);if(!s){s=[];let r=[n];for(;_n(r);)r=Tf(s,r,t);const u=_n(t)||!Lt(t)?t:t.default?t.default:null;r=Ze(u)?[u]:u,_n(r)&&Tf(s,r,!1),a.__localeChainCache.set(o,s)}return s}function Tf(e,t,n){let o=!0;for(let a=0;a<t.length&&Vt(o);a++){const s=t[a];Ze(s)&&(o=w0(e,t[a],n))}return o}function w0(e,t,n){let o;const a=t.split("-");do{const s=a.join("-");o=x0(e,s,n),a.splice(-1,1)}while(a.length&&o===!0);return o}function x0(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)||Lt(n))&&n[a]&&(o=n[a])}return o}const Ba=[];Ba[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ba[1]={w:[1],".":[2],"[":[4],o:[7]},Ba[2]={w:[2],i:[3,0],0:[3,0]},Ba[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ba[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ba[5]={"'":[4,0],o:8,l:[5,0]},Ba[6]={'"':[4,0],o:8,l:[6,0]};const S0=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function T0(e){return S0.test(e)}function k0(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 C0(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 E0(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:T0(t)?k0(t):"*"+t}function $0(e){const t=[];let n=-1,o=0,a=0,s,r,u,d,m,f,g;const w=[];w[0]=()=>{r===void 0?r=u:r+=u},w[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},w[2]=()=>{w[0](),a++},w[3]=()=>{if(a>0)a--,o=4,w[0]();else{if(a=0,r===void 0||(r=E0(r),r===!1))return!1;w[1]()}};function b(){const T=e[n+1];if(o===5&&T==="'"||o===6&&T==='"')return n++,u="\\"+T,w[0](),!0}for(;o!==null;)if(n++,s=e[n],!(s==="\\"&&b())){if(d=C0(s),g=Ba[o],m=g[d]||g.l||8,m===8||(o=m[0],m[1]!==void 0&&(f=w[m[1]],f&&(u=s,f()===!1))))return;if(o===7)return t}}const kf=new Map;function I0(e,t){return Gt(e)?e[t]:null}function A0(e,t){if(!Gt(e))return null;let n=kf.get(t);if(n||(n=$0(t),n&&kf.set(t,n)),!n)return null;const o=n.length;let a=e,s=0;for(;s<o;){const r=a[n[s]];if(r===void 0||cn(a))return null;a=r,s++}return a}const L0="11.1.2",ol=-1,Ui="en-US",Cf="",Ef=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function M0(){return{upper:(e,t)=>t==="text"&&Ze(e)?e.toUpperCase():t==="vnode"&&Gt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Ze(e)?e.toLowerCase():t==="vnode"&&Gt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Ze(e)?Ef(e):t==="vnode"&&Gt(e)&&"__v_isVNode"in e?Ef(e.children):e}}let $f;function D0(e){$f=e}let If;function O0(e){If=e}let Af;function R0(e){Af=e}let Lf=null;const P0=e=>{Lf=e},N0=()=>Lf;let Mf=null;const Df=e=>{Mf=e},F0=()=>Mf;let Of=0;function B0(e={}){const t=cn(e.onWarn)?e.onWarn:k_,n=Ze(e.version)?e.version:L0,o=Ze(e.locale)||cn(e.locale)?e.locale:Ui,a=cn(o)?Ui:o,s=_n(e.fallbackLocale)||Lt(e.fallbackLocale)||Ze(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,r=Lt(e.messages)?e.messages:Vu(a),u=Lt(e.datetimeFormats)?e.datetimeFormats:Vu(a),d=Lt(e.numberFormats)?e.numberFormats:Vu(a),m=kn(Zt(),e.modifiers,M0()),f=e.pluralRules||Zt(),g=cn(e.missing)?e.missing:null,w=Vt(e.missingWarn)||Bs(e.missingWarn)?e.missingWarn:!0,b=Vt(e.fallbackWarn)||Bs(e.fallbackWarn)?e.fallbackWarn:!0,T=!!e.fallbackFormat,E=!!e.unresolving,O=cn(e.postTranslation)?e.postTranslation:null,M=Lt(e.processor)?e.processor:null,V=Vt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,pe=!!e.escapeParameter,D=cn(e.messageCompiler)?e.messageCompiler:$f,z=cn(e.messageResolver)?e.messageResolver:If||I0,ie=cn(e.localeFallbacker)?e.localeFallbacker:Af||b0,P=Gt(e.fallbackContext)?e.fallbackContext:void 0,re=e,ce=Gt(re.__datetimeFormatters)?re.__datetimeFormatters:new Map,Re=Gt(re.__numberFormatters)?re.__numberFormatters:new Map,Le=Gt(re.__meta)?re.__meta:{};Of++;const fe={version:n,cid:Of,locale:o,fallbackLocale:s,messages:r,modifiers:m,pluralRules:f,missing:g,missingWarn:w,fallbackWarn:b,fallbackFormat:T,unresolving:E,postTranslation:O,processor:M,warnHtmlMessage:V,escapeParameter:pe,messageCompiler:D,messageResolver:z,localeFallbacker:ie,fallbackContext:P,onWarn:t,__meta:Le};return fe.datetimeFormats=u,fe.numberFormats=d,fe.__datetimeFormatters=ce,fe.__numberFormatters=Re,__INTLIFY_PROD_DEVTOOLS__&&h0(fe,n,Le),fe}const Vu=e=>({[e]:Zt()});function Wu(e,t,n,o,a){const{missing:s,onWarn:r}=e;if(s!==null){const u=s(e,n,t,a);return Ze(u)?u:t}else return t}function zi(e,t,n){const o=e;o.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function U0(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function z0(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let o=n+1;o<t.length;o++)if(U0(e,t[o]))return!0;return!1}function Rf(e,...t){const{datetimeFormats:n,unresolving:o,fallbackLocale:a,onWarn:s,localeFallbacker:r}=e,{__datetimeFormatters:u}=e,[d,m,f,g]=Hu(...t),w=Vt(f.missingWarn)?f.missingWarn:e.missingWarn;Vt(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const b=!!f.part,T=Uu(e,f),E=r(e,a,T);if(!Ze(d)||d==="")return new Intl.DateTimeFormat(T,g).format(m);let O={},M,V=null;const pe="datetime format";for(let ie=0;ie<E.length&&(M=E[ie],O=n[M]||{},V=O[d],!Lt(V));ie++)Wu(e,d,M,w,pe);if(!Lt(V)||!Ze(M))return o?ol:d;let D=`${M}__${d}`;Xr(g)||(D=`${D}__${JSON.stringify(g)}`);let z=u.get(D);return z||(z=new Intl.DateTimeFormat(M,kn({},V,g)),u.set(D,z)),b?z.formatToParts(m):z.format(m)}const Pf=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Hu(...e){const[t,n,o,a]=e,s=Zt();let r=Zt(),u;if(Ze(t)){const d=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!d)throw ha(ma.INVALID_ISO_DATE_ARGUMENT);const m=d[3]?d[3].trim().startsWith("T")?`${d[1].trim()}${d[3].trim()}`:`${d[1].trim()}T${d[3].trim()}`:d[1].trim();u=new Date(m);try{u.toISOString()}catch{throw ha(ma.INVALID_ISO_DATE_ARGUMENT)}}else if(b_(t)){if(isNaN(t.getTime()))throw ha(ma.INVALID_DATE_ARGUMENT);u=t}else if(vn(t))u=t;else throw ha(ma.INVALID_ARGUMENT);return Ze(n)?s.key=n:Lt(n)&&Object.keys(n).forEach(d=>{Pf.includes(d)?r[d]=n[d]:s[d]=n[d]}),Ze(o)?s.locale=o:Lt(o)&&(r=o),Lt(a)&&(r=a),[s.key||"",u,s,r]}function Nf(e,t,n){const o=e;for(const a in n){const s=`${t}__${a}`;o.__datetimeFormatters.has(s)&&o.__datetimeFormatters.delete(s)}}function Ff(e,...t){const{numberFormats:n,unresolving:o,fallbackLocale:a,onWarn:s,localeFallbacker:r}=e,{__numberFormatters:u}=e,[d,m,f,g]=ju(...t),w=Vt(f.missingWarn)?f.missingWarn:e.missingWarn;Vt(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn;const b=!!f.part,T=Uu(e,f),E=r(e,a,T);if(!Ze(d)||d==="")return new Intl.NumberFormat(T,g).format(m);let O={},M,V=null;const pe="number format";for(let ie=0;ie<E.length&&(M=E[ie],O=n[M]||{},V=O[d],!Lt(V));ie++)Wu(e,d,M,w,pe);if(!Lt(V)||!Ze(M))return o?ol:d;let D=`${M}__${d}`;Xr(g)||(D=`${D}__${JSON.stringify(g)}`);let z=u.get(D);return z||(z=new Intl.NumberFormat(M,kn({},V,g)),u.set(D,z)),b?z.formatToParts(m):z.format(m)}const Bf=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ju(...e){const[t,n,o,a]=e,s=Zt();let r=Zt();if(!vn(t))throw ha(ma.INVALID_ARGUMENT);const u=t;return Ze(n)?s.key=n:Lt(n)&&Object.keys(n).forEach(d=>{Bf.includes(d)?r[d]=n[d]:s[d]=n[d]}),Ze(o)?s.locale=o:Lt(o)&&(r=o),Lt(a)&&(r=a),[s.key||"",u,s,r]}function Uf(e,t,n){const o=e;for(const a in n){const s=`${t}__${a}`;o.__numberFormatters.has(s)&&o.__numberFormatters.delete(s)}}const V0=e=>e,W0=e=>"",H0="text",j0=e=>e.length===0?"":Ou(e),G0=T_;function zf(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function q0(e){const t=vn(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(vn(e.named.count)||vn(e.named.n))?vn(e.named.count)?e.named.count:vn(e.named.n)?e.named.n:t:t}function Y0(e,t){t.count||(t.count=e),t.n||(t.n=e)}function K0(e={}){const t=e.locale,n=q0(e),o=Gt(e.pluralRules)&&Ze(t)&&cn(e.pluralRules[t])?e.pluralRules[t]:zf,a=Gt(e.pluralRules)&&Ze(t)&&cn(e.pluralRules[t])?zf:void 0,s=M=>M[o(n,M.length,a)],r=e.list||[],u=M=>r[M],d=e.named||Zt();vn(e.pluralIndex)&&Y0(n,d);const m=M=>d[M];function f(M,V){const pe=cn(e.messages)?e.messages(M,!!V):Gt(e.messages)?e.messages[M]:!1;return pe||(e.parent?e.parent.message(M):W0)}const g=M=>e.modifiers?e.modifiers[M]:V0,w=Lt(e.processor)&&cn(e.processor.normalize)?e.processor.normalize:j0,b=Lt(e.processor)&&cn(e.processor.interpolate)?e.processor.interpolate:G0,T=Lt(e.processor)&&Ze(e.processor.type)?e.processor.type:H0,O={list:u,named:m,plural:s,linked:(M,...V)=>{const[pe,D]=V;let z="text",ie="";V.length===1?Gt(pe)?(ie=pe.modifier||ie,z=pe.type||z):Ze(pe)&&(ie=pe||ie):V.length===2&&(Ze(pe)&&(ie=pe||ie),Ze(D)&&(z=D||z));const P=f(M,!0)(O),re=z==="vnode"&&_n(P)&&ie?P[0]:P;return ie?g(ie)(re,z):re},message:f,type:T,interpolate:b,normalize:w,values:kn(Zt(),r,d)};return O}const Vf=()=>"",ko=e=>cn(e);function Wf(e,...t){const{fallbackFormat:n,postTranslation:o,unresolving:a,messageCompiler:s,fallbackLocale:r,messages:u}=e,[d,m]=Gu(...t),f=Vt(m.missingWarn)?m.missingWarn:e.missingWarn,g=Vt(m.fallbackWarn)?m.fallbackWarn:e.fallbackWarn,w=Vt(m.escapeParameter)?m.escapeParameter:e.escapeParameter,b=!!m.resolvedMessage,T=Ze(m.default)||Vt(m.default)?Vt(m.default)?s?d:()=>d:m.default:n?s?d:()=>d:null,E=n||T!=null&&(Ze(T)||cn(T)),O=Uu(e,m);w&&J0(m);let[M,V,pe]=b?[d,O,u[O]||Zt()]:Hf(e,d,O,r,g,f),D=M,z=d;if(!b&&!(Ze(D)||Vs(D)||ko(D))&&E&&(D=T,z=D),!b&&(!(Ze(D)||Vs(D)||ko(D))||!Ze(V)))return a?ol:d;let ie=!1;const P=()=>{ie=!0},re=ko(D)?D:jf(e,d,V,D,z,P);if(ie)return D;const ce=Z0(e,V,pe,m),Re=K0(ce),Le=X0(e,re,Re),fe=o?o(Le,d):Le;if(__INTLIFY_PROD_DEVTOOLS__){const xe={timestamp:Date.now(),key:Ze(d)?d:ko(D)?D.key:"",locale:V||(ko(D)?D.locale:""),format:Ze(D)?D:ko(D)?D.source:"",message:fe};xe.meta=kn({},e.__meta,N0()||{}),v0(xe)}return fe}function J0(e){_n(e.list)?e.list=e.list.map(t=>Ze(t)?hf(t):t):Gt(e.named)&&Object.keys(e.named).forEach(t=>{Ze(e.named[t])&&(e.named[t]=hf(e.named[t]))})}function Hf(e,t,n,o,a,s){const{messages:r,onWarn:u,messageResolver:d,localeFallbacker:m}=e,f=m(e,o,n);let g=Zt(),w,b=null;const T="translate";for(let E=0;E<f.length&&(w=f[E],g=r[w]||Zt(),(b=d(g,t))===null&&(b=g[t]),!(Ze(b)||Vs(b)||ko(b)));E++)if(!z0(w,f)){const O=Wu(e,t,w,s,T);O!==t&&(b=O)}return[b,w,g]}function jf(e,t,n,o,a,s){const{messageCompiler:r,warnHtmlMessage:u}=e;if(ko(o)){const m=o;return m.locale=m.locale||n,m.key=m.key||t,m}if(r==null){const m=()=>o;return m.locale=n,m.key=t,m}const d=r(o,Q0(e,n,a,o,u,s));return d.locale=n,d.key=t,d.source=o,d}function X0(e,t,n){return t(n)}function Gu(...e){const[t,n,o]=e,a=Zt();if(!Ze(t)&&!vn(t)&&!ko(t)&&!Vs(t))throw ha(ma.INVALID_ARGUMENT);const s=vn(t)?String(t):(ko(t),t);return vn(n)?a.plural=n:Ze(n)?a.default=n:Lt(n)&&!Xr(n)?a.named=n:_n(n)&&(a.list=n),vn(o)?a.plural=o:Ze(o)?a.default=o:Lt(o)&&kn(a,o),[s,a]}function Q0(e,t,n,o,a,s){return{locale:t,key:n,warnHtmlMessage:a,onError:r=>{throw s&&s(r),r},onCacheKey:r=>__(t,n,r)}}function Z0(e,t,n,o){const{modifiers:a,pluralRules:s,messageResolver:r,fallbackLocale:u,fallbackWarn:d,missingWarn:m,fallbackContext:f}=e,w={locale:t,modifiers:a,pluralRules:s,messages:(b,T)=>{let E=r(n,b);if(E==null&&(f||T)){const[,,O]=Hf(f||e,b,t,u,d,m);E=r(O,b)}if(Ze(E)||Vs(E)){let O=!1;const V=jf(e,b,t,E,b,()=>{O=!0});return O?Vf:V}else return ko(E)?E:Vf}};return e.processor&&(w.processor=e.processor),o.list&&(w.list=o.list),o.named&&(w.named=o.named),vn(o.plural)&&(w.pluralIndex=o.plural),w}J_();/*!
* vue-i18n v11.1.2
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/const e2="11.1.2";function t2(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(gs().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(gs().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(gs().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(gs().__INTLIFY_PROD_DEVTOOLS__=!1)}const oo={UNEXPECTED_RETURN_TYPE:y0,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 go(e,...t){return el(e,null,void 0)}const qu=Pa("__translateVNode"),Yu=Pa("__datetimeParts"),Ku=Pa("__numberParts"),Gf=Pa("__setPluralRules"),qf=Pa("__injectWithOption"),Ju=Pa("__dispose");function Vi(e){if(!Gt(e))return e;for(const t in e)if(Mo(e,t))if(!t.includes("."))Gt(e[t])&&Vi(e[t]);else{const n=t.split("."),o=n.length-1;let a=e,s=!1;for(let r=0;r<o;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in a||(a[n[r]]=Zt()),!Gt(a[n[r]])){s=!0;break}a=a[n[r]]}s||(a[n[o]]=e[t],delete e[t]),Gt(a[n[o]])&&Vi(a[n[o]])}return e}function Xu(e,t){const{messages:n,__i18n:o,messageResolver:a,flatJson:s}=t,r=Lt(n)?n:_n(o)?Zt():{[e]:Zt()};if(_n(o)&&o.forEach(u=>{if("locale"in u&&"resource"in u){const{locale:d,resource:m}=u;d?(r[d]=r[d]||Zt(),Zr(m,r[d])):Zr(m,r)}else Ze(u)&&Zr(JSON.parse(u),r)}),a==null&&s)for(const u in r)Mo(r,u)&&Vi(r[u]);return r}function Yf(e){return e.type}function Kf(e,t,n){let o=Gt(t.messages)?t.messages:Zt();"__i18nGlobal"in n&&(o=Xu(e.locale.value,{messages:o,__i18n:n.__i18nGlobal}));const a=Object.keys(o);a.length&&a.forEach(s=>{e.mergeLocaleMessage(s,o[s])});{if(Gt(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(Gt(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function Jf(e){return at(Ai,null,e,0)}const Xf="__INTLIFY_META__",Qf=()=>[],n2=()=>!1;let Zf=0;function eg(e){return(t,n,o,a)=>e(n,o,ps()||void 0,a)}const o2=()=>{const e=ps();let t=null;return e&&(t=Yf(e)[Xf])?{[Xf]:t}:null};function Qu(e={}){const{__root:t,__injectWithOption:n}=e,o=t===void 0,a=e.flatJson,s=Jr?S:hv;let r=Vt(e.inheritLocale)?e.inheritLocale:!0;const u=s(t&&r?t.locale.value:Ze(e.locale)?e.locale:Ui),d=s(t&&r?t.fallbackLocale.value:Ze(e.fallbackLocale)||_n(e.fallbackLocale)||Lt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),m=s(Xu(u.value,e)),f=s(Lt(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),g=s(Lt(e.numberFormats)?e.numberFormats:{[u.value]:{}});let w=t?t.missingWarn:Vt(e.missingWarn)||Bs(e.missingWarn)?e.missingWarn:!0,b=t?t.fallbackWarn:Vt(e.fallbackWarn)||Bs(e.fallbackWarn)?e.fallbackWarn:!0,T=t?t.fallbackRoot:Vt(e.fallbackRoot)?e.fallbackRoot:!0,E=!!e.fallbackFormat,O=cn(e.missing)?e.missing:null,M=cn(e.missing)?eg(e.missing):null,V=cn(e.postTranslation)?e.postTranslation:null,pe=t?t.warnHtmlMessage:Vt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,D=!!e.escapeParameter;const z=t?t.modifiers:Lt(e.modifiers)?e.modifiers:{};let ie=e.pluralRules||t&&t.pluralRules,P;P=(()=>{o&&Df(null);const ge={version:e2,locale:u.value,fallbackLocale:d.value,messages:m.value,modifiers:z,pluralRules:ie,missing:M===null?void 0:M,missingWarn:w,fallbackWarn:b,fallbackFormat:E,unresolving:!0,postTranslation:V===null?void 0:V,warnHtmlMessage:pe,escapeParameter:D,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};ge.datetimeFormats=f.value,ge.numberFormats=g.value,ge.__datetimeFormatters=Lt(P)?P.__datetimeFormatters:void 0,ge.__numberFormatters=Lt(P)?P.__numberFormatters:void 0;const $e=B0(ge);return o&&Df($e),$e})(),zi(P,u.value,d.value);function ce(){return[u.value,d.value,m.value,f.value,g.value]}const Re=Bt({get:()=>u.value,set:ge=>{P.locale=ge,u.value=ge}}),Le=Bt({get:()=>d.value,set:ge=>{P.fallbackLocale=ge,d.value=ge,zi(P,u.value,ge)}}),fe=Bt(()=>m.value),xe=Bt(()=>f.value),ae=Bt(()=>g.value);function J(){return cn(V)?V:null}function se(ge){V=ge,P.postTranslation=ge}function X(){return O}function ee(ge){ge!==null&&(M=eg(ge)),O=ge,P.missing=M}const Ee=(ge,$e,Ke,tt,it,bt)=>{ce();let ct;try{__INTLIFY_PROD_DEVTOOLS__,o||(P.fallbackContext=t?F0():void 0),ct=ge(P)}finally{__INTLIFY_PROD_DEVTOOLS__,o||(P.fallbackContext=void 0)}if(Ke!=="translate exists"&&vn(ct)&&ct===ol||Ke==="translate exists"&&!ct){const[rn,Rt]=$e();return t&&T?tt(t):it(rn)}else{if(bt(ct))return ct;throw go(oo.UNEXPECTED_RETURN_TYPE)}};function he(...ge){return Ee($e=>Reflect.apply(Wf,null,[$e,...ge]),()=>Gu(...ge),"translate",$e=>Reflect.apply($e.t,$e,[...ge]),$e=>$e,$e=>Ze($e))}function Q(...ge){const[$e,Ke,tt]=ge;if(tt&&!Gt(tt))throw go(oo.INVALID_ARGUMENT);return he($e,Ke,kn({resolvedMessage:!0},tt||{}))}function le(...ge){return Ee($e=>Reflect.apply(Rf,null,[$e,...ge]),()=>Hu(...ge),"datetime format",$e=>Reflect.apply($e.d,$e,[...ge]),()=>Cf,$e=>Ze($e))}function be(...ge){return Ee($e=>Reflect.apply(Ff,null,[$e,...ge]),()=>ju(...ge),"number format",$e=>Reflect.apply($e.n,$e,[...ge]),()=>Cf,$e=>Ze($e))}function we(ge){return ge.map($e=>Ze($e)||vn($e)||Vt($e)?Jf(String($e)):$e)}const Z={normalize:we,interpolate:ge=>ge,type:"vnode"};function W(...ge){return Ee($e=>{let Ke;const tt=$e;try{tt.processor=Z,Ke=Reflect.apply(Wf,null,[tt,...ge])}finally{tt.processor=null}return Ke},()=>Gu(...ge),"translate",$e=>$e[qu](...ge),$e=>[Jf($e)],$e=>_n($e))}function te(...ge){return Ee($e=>Reflect.apply(Ff,null,[$e,...ge]),()=>ju(...ge),"number format",$e=>$e[Ku](...ge),Qf,$e=>Ze($e)||_n($e))}function N(...ge){return Ee($e=>Reflect.apply(Rf,null,[$e,...ge]),()=>Hu(...ge),"datetime format",$e=>$e[Yu](...ge),Qf,$e=>Ze($e)||_n($e))}function q(ge){ie=ge,P.pluralRules=ie}function Y(ge,$e){return Ee(()=>{if(!ge)return!1;const Ke=Ze($e)?$e:u.value,tt=H(Ke),it=P.messageResolver(tt,ge);return Vs(it)||ko(it)||Ze(it)},()=>[ge],"translate exists",Ke=>Reflect.apply(Ke.te,Ke,[ge,$e]),n2,Ke=>Vt(Ke))}function $(ge){let $e=null;const Ke=Sf(P,d.value,u.value);for(let tt=0;tt<Ke.length;tt++){const it=m.value[Ke[tt]]||{},bt=P.messageResolver(it,ge);if(bt!=null){$e=bt;break}}return $e}function I(ge){const $e=$(ge);return $e??(t?t.tm(ge)||{}:{})}function H(ge){return m.value[ge]||{}}function de(ge,$e){if(a){const Ke={[ge]:$e};for(const tt in Ke)Mo(Ke,tt)&&Vi(Ke[tt]);$e=Ke[ge]}m.value[ge]=$e,P.messages=m.value}function Ce(ge,$e){m.value[ge]=m.value[ge]||{};const Ke={[ge]:$e};if(a)for(const tt in Ke)Mo(Ke,tt)&&Vi(Ke[tt]);$e=Ke[ge],Zr($e,m.value[ge]),P.messages=m.value}function Ae(ge){return f.value[ge]||{}}function U(ge,$e){f.value[ge]=$e,P.datetimeFormats=f.value,Nf(P,ge,$e)}function k(ge,$e){f.value[ge]=kn(f.value[ge]||{},$e),P.datetimeFormats=f.value,Nf(P,ge,$e)}function j(ge){return g.value[ge]||{}}function ne(ge,$e){g.value[ge]=$e,P.numberFormats=g.value,Uf(P,ge,$e)}function Fe(ge,$e){g.value[ge]=kn(g.value[ge]||{},$e),P.numberFormats=g.value,Uf(P,ge,$e)}Zf++,t&&Jr&&(It(t.locale,ge=>{r&&(u.value=ge,P.locale=ge,zi(P,u.value,d.value))}),It(t.fallbackLocale,ge=>{r&&(d.value=ge,P.fallbackLocale=ge,zi(P,u.value,d.value))}));const Oe={id:Zf,locale:Re,fallbackLocale:Le,get inheritLocale(){return r},set inheritLocale(ge){r=ge,ge&&t&&(u.value=t.locale.value,d.value=t.fallbackLocale.value,zi(P,u.value,d.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:fe,get modifiers(){return z},get pluralRules(){return ie||{}},get isGlobal(){return o},get missingWarn(){return w},set missingWarn(ge){w=ge,P.missingWarn=w},get fallbackWarn(){return b},set fallbackWarn(ge){b=ge,P.fallbackWarn=b},get fallbackRoot(){return T},set fallbackRoot(ge){T=ge},get fallbackFormat(){return E},set fallbackFormat(ge){E=ge,P.fallbackFormat=E},get warnHtmlMessage(){return pe},set warnHtmlMessage(ge){pe=ge,P.warnHtmlMessage=ge},get escapeParameter(){return D},set escapeParameter(ge){D=ge,P.escapeParameter=ge},t:he,getLocaleMessage:H,setLocaleMessage:de,mergeLocaleMessage:Ce,getPostTranslationHandler:J,setPostTranslationHandler:se,getMissingHandler:X,setMissingHandler:ee,[Gf]:q};return Oe.datetimeFormats=xe,Oe.numberFormats=ae,Oe.rt=Q,Oe.te=Y,Oe.tm=I,Oe.d=le,Oe.n=be,Oe.getDateTimeFormat=Ae,Oe.setDateTimeFormat=U,Oe.mergeDateTimeFormat=k,Oe.getNumberFormat=j,Oe.setNumberFormat=ne,Oe.mergeNumberFormat=Fe,Oe[qf]=n,Oe[qu]=W,Oe[Yu]=N,Oe[Ku]=te,Oe}function a2(e){const t=Ze(e.locale)?e.locale:Ui,n=Ze(e.fallbackLocale)||_n(e.fallbackLocale)||Lt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,o=cn(e.missing)?e.missing:void 0,a=Vt(e.silentTranslationWarn)||Bs(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=Vt(e.silentFallbackWarn)||Bs(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=Vt(e.fallbackRoot)?e.fallbackRoot:!0,u=!!e.formatFallbackMessages,d=Lt(e.modifiers)?e.modifiers:{},m=e.pluralizationRules,f=cn(e.postTranslation)?e.postTranslation:void 0,g=Ze(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,w=!!e.escapeParameterHtml,b=Vt(e.sync)?e.sync:!0;let T=e.messages;if(Lt(e.sharedMessages)){const z=e.sharedMessages;T=Object.keys(z).reduce((P,re)=>{const ce=P[re]||(P[re]={});return kn(ce,z[re]),P},T||{})}const{__i18n:E,__root:O,__injectWithOption:M}=e,V=e.datetimeFormats,pe=e.numberFormats,D=e.flatJson;return{locale:t,fallbackLocale:n,messages:T,flatJson:D,datetimeFormats:V,numberFormats:pe,missing:o,missingWarn:a,fallbackWarn:s,fallbackRoot:r,fallbackFormat:u,modifiers:d,pluralRules:m,postTranslation:f,warnHtmlMessage:g,escapeParameter:w,messageResolver:e.messageResolver,inheritLocale:b,__i18n:E,__root:O,__injectWithOption:M}}function Zu(e={}){const t=Qu(a2(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 Vt(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=Vt(a)?!a:a},get silentFallbackWarn(){return Vt(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=Vt(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 s2(e,t,n){return{beforeCreate(){const o=ps();if(!o)throw go(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=tg(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Zu(s);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=tg(e,a);else{this.$i18n=Zu({__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&&Kf(t,a,a),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,r)=>this.$i18n.te(s,r),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=ps();if(!o)throw go(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 tg(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[Gf](t.pluralizationRules||e.pluralizationRules);const n=Xu(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 ec={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function i2({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},Zt())}function ng(){return qe}const og=hu({name:"i18n-t",props:kn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>vn(e)||!isNaN(e)}},ec),setup(e,t){const{slots:n,attrs:o}=t,a=e.i18n||Yt({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(g=>g!=="_"),r=Zt();e.locale&&(r.locale=e.locale),e.plural!==void 0&&(r.plural=Ze(e.plural)?+e.plural:e.plural);const u=i2(t,s),d=a[qu](e.keypath,u,r),m=kn(Zt(),o),f=Ze(e.tag)||Gt(e.tag)?e.tag:ng();return zt(f,m,d)}}});function r2(e){return _n(e)&&!Ze(e[0])}function ag(e,t,n,o){const{slots:a,attrs:s}=t;return()=>{const r={part:!0};let u=Zt();e.locale&&(r.locale=e.locale),Ze(e.format)?r.key=e.format:Gt(e.format)&&(Ze(e.format.key)&&(r.key=e.format.key),u=Object.keys(e.format).reduce((w,b)=>n.includes(b)?kn(Zt(),w,{[b]:e.format[b]}):w,Zt()));const d=o(e.value,r,u);let m=[r.key];_n(d)?m=d.map((w,b)=>{const T=a[w.type],E=T?T({[w.type]:w.value,index:b,parts:d}):[w.value];return r2(E)&&(E[0].key=`${w.type}-${b}`),E}):Ze(d)&&(m=[d]);const f=kn(Zt(),s),g=Ze(e.tag)||Gt(e.tag)?e.tag:ng();return zt(g,f,m)}}const sg=hu({name:"i18n-n",props:kn({value:{type:Number,required:!0},format:{type:[String,Object]}},ec),setup(e,t){const n=e.i18n||Yt({useScope:e.scope,__useComponent:!0});return ag(e,t,Bf,(...o)=>n[Ku](...o))}});function l2(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 u2(e){const t=r=>{const{instance:u,value:d}=r;if(!u||!u.$)throw go(oo.UNEXPECTED_ERROR);const m=l2(e,u.$),f=ig(d);return[Reflect.apply(m.t,m,[...rg(f)]),m]};return{created:(r,u)=>{const[d,m]=t(u);Jr&&e.global===m&&(r.__i18nWatcher=It(m.locale,()=>{u.instance&&u.instance.$forceUpdate()})),r.__composer=m,r.textContent=d},unmounted:r=>{Jr&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:u})=>{if(r.__composer){const d=r.__composer,m=ig(u);r.textContent=Reflect.apply(d.t,d,[...rg(m)])}},getSSRProps:r=>{const[u]=t(r);return{textContent:u}}}}function ig(e){if(Ze(e))return{path:e};if(Lt(e)){if(!("path"in e))throw go(oo.REQUIRED_VALUE,"path");return e}else throw go(oo.INVALID_VALUE)}function rg(e){const{path:t,locale:n,args:o,choice:a,plural:s}=e,r={},u=o||{};return Ze(n)&&(r.locale=n),vn(a)&&(r.plural=a),vn(s)&&(r.plural=s),[t,u,r]}function c2(e,t,...n){const o=Lt(n[0])?n[0]:{};(Vt(o.globalInstall)?o.globalInstall:!0)&&([og.name,"I18nT"].forEach(s=>e.component(s,og)),[sg.name,"I18nN"].forEach(s=>e.component(s,sg)),[ug.name,"I18nD"].forEach(s=>e.component(s,ug))),e.directive("t",u2(t))}const d2=Pa("global-vue-i18n");function p2(e={}){const t=__VUE_I18N_LEGACY_API__&&Vt(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=Vt(e.globalInjection)?e.globalInjection:!0,o=new Map,[a,s]=f2(e,t),r=Pa("");function u(g){return o.get(g)||null}function d(g,w){o.set(g,w)}function m(g){o.delete(g)}const f={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(g,...w){if(g.__VUE_I18N_SYMBOL__=r,g.provide(g.__VUE_I18N_SYMBOL__,f),Lt(w[0])){const E=w[0];f.__composerExtend=E.__composerExtend,f.__vueI18nExtend=E.__vueI18nExtend}let b=null;!t&&n&&(b=w2(g,f.global)),__VUE_I18N_FULL_INSTALL__&&c2(g,f,...w),__VUE_I18N_LEGACY_API__&&t&&g.mixin(s2(s,s.__composer,f));const T=g.unmount;g.unmount=()=>{b&&b(),f.dispose(),T()}},get global(){return s},dispose(){a.stop()},__instances:o,__getInstance:u,__setInstance:d,__deleteInstance:m};return f}function Yt(e={}){const t=ps();if(t==null)throw go(oo.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw go(oo.NOT_INSTALLED);const n=g2(t),o=h2(n),a=Yf(t),s=m2(e,a);if(s==="global")return Kf(o,e,a),o;if(s==="parent"){let d=v2(n,t,e.__useComponent);return d==null&&(d=o),d}const r=n;let u=r.__getInstance(t);if(u==null){const d=kn({},e);"__i18n"in a&&(d.__i18n=a.__i18n),o&&(d.__root=o),u=Qu(d),r.__composerExtend&&(u[Ju]=r.__composerExtend(u)),y2(r,t,u),r.__setInstance(t,u)}return u}function f2(e,t){const n=Xl(),o=__VUE_I18N_LEGACY_API__&&t?n.run(()=>Zu(e)):n.run(()=>Qu(e));if(o==null)throw go(oo.UNEXPECTED_ERROR);return[n,o]}function g2(e){const t=Rs(e.isCE?d2:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw go(e.isCE?oo.NOT_INSTALLED_WITH_PROVIDE:oo.UNEXPECTED_ERROR);return t}function m2(e,t){return Xr(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function h2(e){return e.mode==="composition"?e.global:e.global.__composer}function v2(e,t,n=!1){let o=null;const a=t.root;let s=_2(t,n);for(;s!=null;){const r=e;if(e.mode==="composition")o=r.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const u=r.__getInstance(s);u!=null&&(o=u.__composer,n&&o&&!o[qf]&&(o=null))}if(o!=null||a===s)break;s=s.parent}return o}function _2(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function y2(e,t,n){jt(()=>{},t),po(()=>{const o=n;e.__deleteInstance(t);const a=o[Ju];a&&(a(),delete o[Ju])},t)}const b2=["locale","fallbackLocale","availableLocales"],lg=["t","rt","d","n","tm","te"];function w2(e,t){const n=Object.create(null);return b2.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s)throw go(oo.UNEXPECTED_ERROR);const r=gn(s.value)?{get(){return s.value.value},set(u){s.value.value=u}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,a,r)}),e.config.globalProperties.$i18n=n,lg.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s||!s.value)throw go(oo.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,s)}),()=>{delete e.config.globalProperties.$i18n,lg.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const ug=hu({name:"i18n-d",props:kn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},ec),setup(e,t){const n=e.i18n||Yt({useScope:e.scope,__useComponent:!0});return ag(e,t,Pf,(...o)=>n[Yu](...o))}});if(t2(),D0(g0),O0(A0),R0(Sf),__INTLIFY_PROD_DEVTOOLS__){const e=gs();e.__INTLIFY__=!0,m0(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}function cg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wi={exports:{}},x2=Wi.exports,dg;function S2(){return dg||(dg=1,function(e,t){(function(n,o){e.exports=o()})(x2,function(){function n(c,l){var p=Object.keys(c);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(c);l&&(h=h.filter(function(_){return Object.getOwnPropertyDescriptor(c,_).enumerable})),p.push.apply(p,h)}return p}function o(c){for(var l=1;l<arguments.length;l++){var p=arguments[l]!=null?arguments[l]:{};l%2?n(Object(p),!0).forEach(function(h){d(c,h,p[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(c,Object.getOwnPropertyDescriptors(p)):n(Object(p)).forEach(function(h){Object.defineProperty(c,h,Object.getOwnPropertyDescriptor(p,h))})}return c}function a(c){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},a(c)}function s(c,l){if(!(c instanceof l))throw new TypeError("Cannot call a class as a function")}function r(c,l){for(var p=0;p<l.length;p++){var h=l[p];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(c,E(h.key),h)}}function u(c,l,p){return l&&r(c.prototype,l),Object.defineProperty(c,"prototype",{writable:!1}),c}function d(c,l,p){return(l=E(l))in c?Object.defineProperty(c,l,{value:p,enumerable:!0,configurable:!0,writable:!0}):c[l]=p,c}function m(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(l&&l.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),l&&g(c,l)}function f(c){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},f(c)}function g(c,l){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,h){return p.__proto__=h,p},g(c,l)}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 l=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,h=f(c);if(l){var _=f(this).constructor;p=Reflect.construct(h,arguments,_)}else p=h.apply(this,arguments);return function(x,L){if(L&&(typeof L=="object"||typeof L=="function"))return L;if(L!==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,l,p){var h=function(x,L){for(;!Object.prototype.hasOwnProperty.call(x,L)&&(x=f(x))!==null;);return x}(c,l);if(h){var _=Object.getOwnPropertyDescriptor(h,l);return _.get?_.get.call(arguments.length<3?c:p):_.value}},T.apply(this,arguments)}function E(c){var l=function(p,h){if(typeof p!="object"||p===null)return p;var _=p[Symbol.toPrimitive];if(_!==void 0){var x=_.call(p,h);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}(c,"string");return typeof l=="symbol"?l:l+""}var O=function(c){return!(!c||!c.Window)&&c instanceof c.Window},M=void 0,V=void 0;function pe(c){M=c;var l=c.document.createTextNode("");l.ownerDocument!==c.document&&typeof c.wrap=="function"&&c.wrap(l)===l&&(c=c.wrap(c)),V=c}function D(c){return O(c)?c:(c.ownerDocument||c).defaultView||V.window}typeof window<"u"&&window&&pe(window);var z=function(c){return!!c&&a(c)==="object"},ie=function(c){return typeof c=="function"},P={window:function(c){return c===V||O(c)},docFrag:function(c){return z(c)&&c.nodeType===11},object:z,func:ie,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 l=D(c)||V;return/object|function/.test(typeof Element>"u"?"undefined":a(Element))?c instanceof Element||c instanceof l.Element:c.nodeType===1&&typeof c.nodeName=="string"},plainObject:function(c){return z(c)&&!!c.constructor&&/function Object\b/.test(c.constructor.toString())},array:function(c){return z(c)&&c.length!==void 0&&ie(c.splice)}};function re(c){var l=c.interaction;if(l.prepared.name==="drag"){var p=l.prepared.axis;p==="x"?(l.coords.cur.page.y=l.coords.start.page.y,l.coords.cur.client.y=l.coords.start.client.y,l.coords.velocity.client.y=0,l.coords.velocity.page.y=0):p==="y"&&(l.coords.cur.page.x=l.coords.start.page.x,l.coords.cur.client.x=l.coords.start.client.x,l.coords.velocity.client.x=0,l.coords.velocity.page.x=0)}}function ce(c){var l=c.iEvent,p=c.interaction;if(p.prepared.name==="drag"){var h=p.prepared.axis;if(h==="x"||h==="y"){var _=h==="x"?"y":"x";l.page[_]=p.coords.start.page[_],l.client[_]=p.coords.start.client[_],l.delta[_]=0}}}var Re={id:"actions/drag",install:function(c){var l=c.actions,p=c.Interactable,h=c.defaults;p.prototype.draggable=Re.draggable,l.map.drag=Re,l.methodDict.drag="draggable",h.actions.drag=Re.defaults},listeners:{"interactions:before-action-move":re,"interactions:action-resume":re,"interactions:action-move":ce,"auto-start:check":function(c){var l=c.interaction,p=c.interactable,h=c.buttons,_=p.options.drag;if(_&&_.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||(h&p.options.drag.mouseButtons)!=0))return c.action={name:"drag",axis:_.lockAxis==="start"?_.startAxis:_.lockAxis},!1}},draggable:function(c){return P.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):P.bool(c)?(this.options.drag.enabled=c,this):this.options.drag},beforeMove:re,move:ce,defaults:{startAxis:"xy",lockAxis:"xy"},getCursor:function(){return"move"},filterEventType:function(c){return c.search("drag")===0}},Le=Re,fe={init:function(c){var l=c;fe.document=l.document,fe.DocumentFragment=l.DocumentFragment||xe,fe.SVGElement=l.SVGElement||xe,fe.SVGSVGElement=l.SVGSVGElement||xe,fe.SVGElementInstance=l.SVGElementInstance||xe,fe.Element=l.Element||xe,fe.HTMLElement=l.HTMLElement||fe.Element,fe.Event=l.Event,fe.Touch=l.Touch||xe,fe.PointerEvent=l.PointerEvent||l.MSPointerEvent},document:null,DocumentFragment:null,SVGElement:null,SVGSVGElement:null,SVGElementInstance:null,Element:null,HTMLElement:null,Event:null,Touch:null,PointerEvent:null};function xe(){}var ae=fe,J={init:function(c){var l=ae.Element,p=c.navigator||{};J.supportsTouch="ontouchstart"in c||P.func(c.DocumentTouch)&&ae.document instanceof c.DocumentTouch,J.supportsPointerEvent=p.pointerEnabled!==!1&&!!ae.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 l.prototype?"matches":"webkitMatchesSelector"in l.prototype?"webkitMatchesSelector":"mozMatchesSelector"in l.prototype?"mozMatchesSelector":"oMatchesSelector"in l.prototype?"oMatchesSelector":"msMatchesSelector",J.pEventTypes=J.supportsPointerEvent?ae.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=ae.document&&"onmousewheel"in ae.document?"mousewheel":"wheel"},supportsTouch:null,supportsPointerEvent:null,isIOS7:null,isIOS:null,isIe9:null,isOperaMobile:null,prefixedMatchesSelector:null,pEventTypes:null,wheelEvent:null},se=J;function X(c,l){if(c.contains)return c.contains(l);for(;l;){if(l===c)return!0;l=l.parentNode}return!1}function ee(c,l){for(;P.element(c);){if(he(c,l))return c;c=Ee(c)}return null}function Ee(c){var l=c.parentNode;if(P.docFrag(l)){for(;(l=l.host)&&P.docFrag(l););return l}return l}function he(c,l){return V!==M&&(l=l.replace(/\/deep\//g," ")),c[se.prefixedMatchesSelector](l)}var Q=function(c){return c.parentNode||c.host};function le(c,l){for(var p,h=[],_=c;(p=Q(_))&&_!==l&&p!==_.ownerDocument;)h.unshift(_),_=p;return h}function be(c,l,p){for(;P.element(c);){if(he(c,l))return!0;if((c=Ee(c))===p)return he(c,l)}return!1}function we(c){return c.correspondingUseElement||c}function _e(c){var l=c instanceof ae.SVGElement?c.getBoundingClientRect():c.getClientRects()[0];return l&&{left:l.left,right:l.right,top:l.top,bottom:l.bottom,width:l.width||l.right-l.left,height:l.height||l.bottom-l.top}}function Z(c){var l,p=_e(c);if(!se.isIOS7&&p){var h={x:(l=(l=D(c))||V).scrollX||l.document.documentElement.scrollLeft,y:l.scrollY||l.document.documentElement.scrollTop};p.left+=h.x,p.right+=h.x,p.top+=h.y,p.bottom+=h.y}return p}function W(c){for(var l=[];c;)l.push(c),c=Ee(c);return l}function te(c){return!!P.string(c)&&(ae.document.querySelector(c),!0)}function N(c,l){for(var p in l)c[p]=l[p];return c}function q(c,l,p){return c==="parent"?Ee(p):c==="self"?l.getRect(p):ee(p,c)}function Y(c,l,p,h){var _=c;return P.string(_)?_=q(_,l,p):P.func(_)&&(_=_.apply(void 0,h)),P.element(_)&&(_=Z(_)),_}function $(c){return c&&{x:"x"in c?c.x:c.left,y:"y"in c?c.y:c.top}}function I(c){return!c||"x"in c&&"y"in c||((c=N({},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 H(c,l,p){c.left&&(l.left+=p.x),c.right&&(l.right+=p.x),c.top&&(l.top+=p.y),c.bottom&&(l.bottom+=p.y),l.width=l.right-l.left,l.height=l.bottom-l.top}function de(c,l,p){var h=p&&c.options[p];return $(Y(h&&h.origin||c.options.origin,c,l,[c&&l]))||{x:0,y:0}}function Ce(c,l){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(G){return!0},h=arguments.length>3?arguments[3]:void 0;if(h=h||{},P.string(c)&&c.search(" ")!==-1&&(c=Ae(c)),P.array(c))return c.forEach(function(G){return Ce(G,l,p,h)}),h;if(P.object(c)&&(l=c,c=""),P.func(l)&&p(c))h[c]=h[c]||[],h[c].push(l);else if(P.array(l))for(var _=0,x=l;_<x.length;_++){var L=x[_];Ce(c,L,p,h)}else if(P.object(l))for(var F in l)Ce(Ae(F).map(function(G){return"".concat(c).concat(G)}),l[F],p,h);return h}function Ae(c){return c.trim().split(/ +/)}var U=function(c,l){return Math.sqrt(c*c+l*l)},k=["webkit","moz"];function j(c,l){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[_]=l[_]},set:function(x){c.__set[_]=x},configurable:!0})};for(var h in l)p(h);return c}function ne(c,l){c.page=c.page||{},c.page.x=l.page.x,c.page.y=l.page.y,c.client=c.client||{},c.client.x=l.client.x,c.client.y=l.client.y,c.timeStamp=l.timeStamp}function Fe(c){c.page.x=0,c.page.y=0,c.client.x=0,c.client.y=0}function Oe(c){return c instanceof ae.Event||c instanceof ae.Touch}function ge(c,l,p){return c=c||"page",(p=p||{}).x=l[c+"X"],p.y=l[c+"Y"],p}function $e(c,l){return l=l||{x:0,y:0},se.isOperaMobile&&Oe(c)?(ge("screen",c,l),l.x+=window.scrollX,l.y+=window.scrollY):ge("page",c,l),l}function Ke(c){return P.number(c.pointerId)?c.pointerId:c.identifier}function tt(c,l,p){var h=l.length>1?bt(l):l[0];$e(h,c.page),function(_,x){x=x||{},se.isOperaMobile&&Oe(_)?ge("screen",_,x):ge("client",_,x)}(h,c.client),c.timeStamp=p}function it(c){var l=[];return P.array(c)?(l[0]=c[0],l[1]=c[1]):c.type==="touchend"?c.touches.length===1?(l[0]=c.touches[0],l[1]=c.changedTouches[0]):c.touches.length===0&&(l[0]=c.changedTouches[0],l[1]=c.changedTouches[1]):(l[0]=c.touches[0],l[1]=c.touches[1]),l}function bt(c){for(var l={pageX:0,pageY:0,clientX:0,clientY:0,screenX:0,screenY:0},p=0;p<c.length;p++){var h=c[p];for(var _ in l)l[_]+=h[_]}for(var x in l)l[x]/=c.length;return l}function ct(c){if(!c.length)return null;var l=it(c),p=Math.min(l[0].pageX,l[1].pageX),h=Math.min(l[0].pageY,l[1].pageY),_=Math.max(l[0].pageX,l[1].pageX),x=Math.max(l[0].pageY,l[1].pageY);return{x:p,y:h,left:p,top:h,right:_,bottom:x,width:_-p,height:x-h}}function rn(c,l){var p=l+"X",h=l+"Y",_=it(c),x=_[0][p]-_[1][p],L=_[0][h]-_[1][h];return U(x,L)}function Rt(c,l){var p=l+"X",h=l+"Y",_=it(c),x=_[1][p]-_[0][p],L=_[1][h]-_[0][h];return 180*Math.atan2(L,x)/Math.PI}function In(c){return P.string(c.pointerType)?c.pointerType:P.number(c.pointerType)?[void 0,void 0,"touch","pen","mouse"][c.pointerType]:/touch/.test(c.type||"")||c instanceof ae.Touch?"touch":"mouse"}function wn(c){var l=P.func(c.composedPath)?c.composedPath():c.path;return[we(l?l[0]:c.target),we(c.currentTarget)]}var Jt=function(){function c(l){s(this,c),this.immediatePropagationStopped=!1,this.propagationStopped=!1,this._interaction=l}return u(c,[{key:"preventDefault",value:function(){}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}}]),c}();Object.defineProperty(Jt.prototype,"interaction",{get:function(){return this._interaction._proxy},set:function(){}});var ln=function(c,l){for(var p=0;p<l.length;p++){var h=l[p];c.push(h)}return c},Kn=function(c){return ln([],c)},Co=function(c,l){for(var p=0;p<c.length;p++)if(l(c[p],p,c))return p;return-1},mt=function(c,l){return c[Co(c,l)]},Pe=function(c){m(p,c);var l=b(p);function p(h,_,x){var L;s(this,p),(L=l.call(this,_._interaction)).dropzone=void 0,L.dragEvent=void 0,L.relatedTarget=void 0,L.draggable=void 0,L.propagationStopped=!1,L.immediatePropagationStopped=!1;var F=x==="dragleave"?h.prev:h.cur,G=F.element,me=F.dropzone;return L.type=x,L.target=G,L.currentTarget=G,L.dropzone=me,L.dragEvent=_,L.relatedTarget=_.target,L.draggable=_.interactable,L.timeStamp=_.timeStamp,L}return u(p,[{key:"reject",value:function(){var h=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,L=Co(x,function(G){var me=G.dropzone,K=G.element;return me===h.dropzone&&K===h.target});_.activeDrops.splice(L,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}(Jt);function Ue(c,l){for(var p=0,h=c.slice();p<h.length;p++){var _=h[p],x=_.dropzone,L=_.element;l.dropzone=x,l.target=L,x.fire(l),l.propagationStopped=l.immediatePropagationStopped=!1}}function At(c,l){for(var p=function(x,L){for(var F=[],G=0,me=x.interactables.list;G<me.length;G++){var K=me[G];if(K.options.drop.enabled){var Te=K.options.drop.accept;if(!(P.element(Te)&&Te!==L||P.string(Te)&&!he(L,Te)||P.func(Te)&&!Te({dropzone:K,draggableElement:L})))for(var Be=0,je=K.getAllElements();Be<je.length;Be++){var Ve=je[Be];Ve!==L&&F.push({dropzone:K,element:Ve,rect:K.getRect(Ve)})}}}return F}(c,l),h=0;h<p.length;h++){var _=p[h];_.rect=_.dropzone.getRect(_.element)}return p}function Xt(c,l,p){for(var h=c.dropState,_=c.interactable,x=c.element,L=[],F=0,G=h.activeDrops;F<G.length;F++){var me=G[F],K=me.dropzone,Te=me.element,Be=me.rect,je=K.dropCheck(l,p,_,x,Te,Be);L.push(je?Te:null)}var Ve=function(Ge){for(var et,Xe,rt,Tt=[],Dt=0;Dt<Ge.length;Dt++){var ht=Ge[Dt],Et=Ge[et];if(ht&&Dt!==et)if(Et){var no=Q(ht),pn=Q(Et);if(no!==ht.ownerDocument)if(pn!==ht.ownerDocument)if(no!==pn){Tt=Tt.length?Tt:le(Et);var bo=void 0;if(Et instanceof ae.HTMLElement&&ht instanceof ae.SVGElement&&!(ht instanceof ae.SVGSVGElement)){if(ht===pn)continue;bo=ht.ownerSVGElement}else bo=ht;for(var Uo=le(bo,Et.ownerDocument),Ta=0;Uo[Ta]&&Uo[Ta]===Tt[Ta];)Ta++;var Hl=[Uo[Ta-1],Uo[Ta],Tt[Ta]];if(Hl[0])for(var hr=Hl[0].lastChild;hr;){if(hr===Hl[1]){et=Dt,Tt=Uo;break}if(hr===Hl[2])break;hr=hr.previousSibling}}else rt=Et,(parseInt(D(Xe=ht).getComputedStyle(Xe).zIndex,10)||0)>=(parseInt(D(rt).getComputedStyle(rt).zIndex,10)||0)&&(et=Dt);else et=Dt}else et=Dt}return et}(L);return h.activeDrops[Ve]||null}function ja(c,l,p){var h=c.dropState,_={enter:null,leave:null,activate:null,deactivate:null,move:null,drop:null};return p.type==="dragstart"&&(_.activate=new Pe(h,p,"dropactivate"),_.activate.target=null,_.activate.dropzone=null),p.type==="dragend"&&(_.deactivate=new Pe(h,p,"dropdeactivate"),_.deactivate.target=null,_.deactivate.dropzone=null),h.rejected||(h.cur.element!==h.prev.element&&(h.prev.dropzone&&(_.leave=new Pe(h,p,"dragleave"),p.dragLeave=_.leave.target=h.prev.element,p.prevDropzone=_.leave.dropzone=h.prev.dropzone),h.cur.dropzone&&(_.enter=new Pe(h,p,"dragenter"),p.dragEnter=h.cur.element,p.dropzone=h.cur.dropzone)),p.type==="dragend"&&h.cur.dropzone&&(_.drop=new Pe(h,p,"drop"),p.dropzone=h.cur.dropzone,p.relatedTarget=h.cur.element),p.type==="dragmove"&&h.cur.dropzone&&(_.move=new Pe(h,p,"dropmove"),p.dropzone=h.cur.dropzone)),_}function xa(c,l){var p=c.dropState,h=p.activeDrops,_=p.cur,x=p.prev;l.leave&&x.dropzone.fire(l.leave),l.enter&&_.dropzone.fire(l.enter),l.move&&_.dropzone.fire(l.move),l.drop&&_.dropzone.fire(l.drop),l.deactivate&&Ue(h,l.deactivate),p.prev.dropzone=_.dropzone,p.prev.element=_.element}function Ga(c,l){var p=c.interaction,h=c.iEvent,_=c.event;if(h.type==="dragmove"||h.type==="dragend"){var x=p.dropState;l.dynamicDrop&&(x.activeDrops=At(l,p.element));var L=h,F=Xt(p,L,_);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=ja(p,0,L)}}var ni={id:"actions/drop",install:function(c){var l=c.actions,p=c.interactStatic,h=c.Interactable,_=c.defaults;c.usePlugin(Le),h.prototype.dropzone=function(x){return function(L,F){if(P.object(F)){if(L.options.drop.enabled=F.enabled!==!1,F.listeners){var G=Ce(F.listeners),me=Object.keys(G).reduce(function(Te,Be){return Te[/^(enter|leave)/.test(Be)?"drag".concat(Be):/^(activate|deactivate|move)/.test(Be)?"drop".concat(Be):Be]=G[Be],Te},{}),K=L.options.drop.listeners;K&&L.off(K),L.on(me),L.options.drop.listeners=me}return P.func(F.ondrop)&&L.on("drop",F.ondrop),P.func(F.ondropactivate)&&L.on("dropactivate",F.ondropactivate),P.func(F.ondropdeactivate)&&L.on("dropdeactivate",F.ondropdeactivate),P.func(F.ondragenter)&&L.on("dragenter",F.ondragenter),P.func(F.ondragleave)&&L.on("dragleave",F.ondragleave),P.func(F.ondropmove)&&L.on("dropmove",F.ondropmove),/^(pointer|center)$/.test(F.overlap)?L.options.drop.overlap=F.overlap:P.number(F.overlap)&&(L.options.drop.overlap=Math.max(Math.min(1,F.overlap),0)),"accept"in F&&(L.options.drop.accept=F.accept),"checker"in F&&(L.options.drop.checker=F.checker),L}return P.bool(F)?(L.options.drop.enabled=F,L):L.options.drop}(this,x)},h.prototype.dropCheck=function(x,L,F,G,me,K){return function(Te,Be,je,Ve,Ge,et,Xe){var rt=!1;if(!(Xe=Xe||Te.getRect(et)))return!!Te.options.drop.checker&&Te.options.drop.checker(Be,je,rt,Te,et,Ve,Ge);var Tt=Te.options.drop.overlap;if(Tt==="pointer"){var Dt=de(Ve,Ge,"drag"),ht=$e(Be);ht.x+=Dt.x,ht.y+=Dt.y;var Et=ht.x>Xe.left&&ht.x<Xe.right,no=ht.y>Xe.top&&ht.y<Xe.bottom;rt=Et&&no}var pn=Ve.getRect(Ge);if(pn&&Tt==="center"){var bo=pn.left+pn.width/2,Uo=pn.top+pn.height/2;rt=bo>=Xe.left&&bo<=Xe.right&&Uo>=Xe.top&&Uo<=Xe.bottom}return pn&&P.number(Tt)&&(rt=Math.max(0,Math.min(Xe.right,pn.right)-Math.max(Xe.left,pn.left))*Math.max(0,Math.min(Xe.bottom,pn.bottom)-Math.max(Xe.top,pn.top))/(pn.width*pn.height)>=Tt),Te.options.drop.checker&&(rt=Te.options.drop.checker(Be,je,rt,Te,et,Ve,Ge)),rt}(this,x,L,F,G,me,K)},p.dynamicDrop=function(x){return P.bool(x)?(c.dynamicDrop=x,p):c.dynamicDrop},N(l.phaselessTypes,{dragenter:!0,dragleave:!0,dropactivate:!0,dropdeactivate:!0,dropmove:!0,drop:!0}),l.methodDict.drop="dropzone",c.dynamicDrop=!1,_.actions.drop=ni.defaults},listeners:{"interactions:before-action-start":function(c){var l=c.interaction;l.prepared.name==="drag"&&(l.dropState={cur:{dropzone:null,element:null},prev:{dropzone:null,element:null},rejected:null,events:null,activeDrops:[]})},"interactions:after-action-start":function(c,l){var p=c.interaction,h=(c.event,c.iEvent);if(p.prepared.name==="drag"){var _=p.dropState;_.activeDrops=[],_.events={},_.activeDrops=At(l,p.element),_.events=ja(p,0,h),_.events.activate&&(Ue(_.activeDrops,_.events.activate),l.fire("actions/drop:start",{interaction:p,dragEvent:h}))}},"interactions:action-move":Ga,"interactions:after-action-move":function(c,l){var p=c.interaction,h=c.iEvent;if(p.prepared.name==="drag"){var _=p.dropState;xa(p,_.events),l.fire("actions/drop:move",{interaction:p,dragEvent:h}),_.events={}}},"interactions:action-end":function(c,l){if(c.interaction.prepared.name==="drag"){var p=c.interaction,h=c.iEvent;Ga(c,l),xa(p,p.dropState.events),l.fire("actions/drop:end",{interaction:p,dragEvent:h})}},"interactions:stop":function(c){var l=c.interaction;if(l.prepared.name==="drag"){var p=l.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:At,getDrop:Xt,getDropEvents:ja,fireDropEvents:xa,filterEventType:function(c){return c.search("drag")===0||c.search("drop")===0},defaults:{enabled:!1,accept:null,overlap:"pointer"}},ar=ni;function qa(c){var l=c.interaction,p=c.iEvent,h=c.phase;if(l.prepared.name==="gesture"){var _=l.pointers.map(function(me){return me.pointer}),x=h==="start",L=h==="end",F=l.interactable.options.deltaSource;if(p.touches=[_[0],_[1]],x)p.distance=rn(_,F),p.box=ct(_),p.scale=1,p.ds=0,p.angle=Rt(_,F),p.da=0,l.gesture.startDistance=p.distance,l.gesture.startAngle=p.angle;else if(L||l.pointers.length<2){var G=l.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=ct(_),p.scale=p.distance/l.gesture.startDistance,p.angle=Rt(_,F),p.ds=p.scale-l.gesture.scale,p.da=p.angle-l.gesture.angle;l.gesture.distance=p.distance,l.gesture.angle=p.angle,P.number(p.scale)&&p.scale!==1/0&&!isNaN(p.scale)&&(l.gesture.scale=p.scale)}}var Ko={id:"actions/gesture",before:["actions/drag","actions/resize"],install:function(c){var l=c.actions,p=c.Interactable,h=c.defaults;p.prototype.gesturable=function(_){return P.object(_)?(this.options.gesture.enabled=_.enabled!==!1,this.setPerAction("gesture",_),this.setOnEvents("gesture",_),this):P.bool(_)?(this.options.gesture.enabled=_,this):this.options.gesture},l.map.gesture=Ko,l.methodDict.gesture="gesturable",h.actions.gesture=Ko.defaults},listeners:{"interactions:action-start":qa,"interactions:action-move":qa,"interactions:action-end":qa,"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 l=c.interactable.options.gesture;if(l&&l.enabled)return c.action={name:"gesture"},!1}}},defaults:{},getCursor:function(){return""},filterEventType:function(c){return c.search("gesture")===0}},oi=Ko;function ai(c,l,p,h,_,x,L){if(!l)return!1;if(l===!0){var F=P.number(x.width)?x.width:x.right-x.left,G=P.number(x.height)?x.height:x.bottom-x.top;if(L=Math.min(L,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+L}if(c==="top"){var K=G>=0?x.top:x.bottom;return p.y<K+L}if(c==="right")return p.x>(F>=0?x.right:x.left)-L;if(c==="bottom")return p.y>(G>=0?x.bottom:x.top)-L}return!!P.element(h)&&(P.element(l)?l===h:be(h,l,_))}function Ro(c){var l=c.iEvent,p=c.interaction;if(p.prepared.name==="resize"&&p.resizeAxes){var h=l;p.interactable.options.resize.square?(p.resizeAxes==="y"?h.delta.x=h.delta.y:h.delta.y=h.delta.x,h.axes="xy"):(h.axes=p.resizeAxes,p.resizeAxes==="x"?h.delta.y=0:p.resizeAxes==="y"&&(h.delta.x=0))}}var Bn,xn,_o={id:"actions/resize",before:["actions/drag"],install:function(c){var l=c.actions,p=c.browser,h=c.Interactable,_=c.defaults;_o.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),_o.defaultMargin=p.supportsTouch||p.supportsPointerEvent?20:10,h.prototype.resizable=function(x){return function(L,F,G){return P.object(F)?(L.options.resize.enabled=F.enabled!==!1,L.setPerAction("resize",F),L.setOnEvents("resize",F),P.string(F.axis)&&/^x$|^y$|^xy$/.test(F.axis)?L.options.resize.axis=F.axis:F.axis===null&&(L.options.resize.axis=G.defaults.actions.resize.axis),P.bool(F.preserveAspectRatio)?L.options.resize.preserveAspectRatio=F.preserveAspectRatio:P.bool(F.square)&&(L.options.resize.square=F.square),L):P.bool(F)?(L.options.resize.enabled=F,L):L.options.resize}(this,x,c)},l.map.resize=_o,l.methodDict.resize="resizable",_.actions.resize=_o.defaults},listeners:{"interactions:new":function(c){c.interaction.resizeAxes="xy"},"interactions:action-start":function(c){(function(l){var p=l.iEvent,h=l.interaction;if(h.prepared.name==="resize"&&h.prepared.edges){var _=p,x=h.rect;h._rects={start:N({},x),corrected:N({},x),previous:N({},x),delta:{left:0,right:0,width:0,top:0,bottom:0,height:0}},_.edges=h.prepared.edges,_.rect=h._rects.corrected,_.deltaRect=h._rects.delta}})(c),Ro(c)},"interactions:action-move":function(c){(function(l){var p=l.iEvent,h=l.interaction;if(h.prepared.name==="resize"&&h.prepared.edges){var _=p,x=h.interactable.options.resize.invert,L=x==="reposition"||x==="negate",F=h.rect,G=h._rects,me=G.start,K=G.corrected,Te=G.delta,Be=G.previous;if(N(Be,K),L){if(N(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 Ve=K.left;K.left=K.right,K.right=Ve}}}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)Te[Ge]=K[Ge]-Be[Ge];_.edges=h.prepared.edges,_.rect=K,_.deltaRect=Te}})(c),Ro(c)},"interactions:action-end":function(c){var l=c.iEvent,p=c.interaction;if(p.prepared.name==="resize"&&p.prepared.edges){var h=l;h.edges=p.prepared.edges,h.rect=p._rects.corrected,h.deltaRect=p._rects.delta}},"auto-start:check":function(c){var l=c.interaction,p=c.interactable,h=c.element,_=c.rect,x=c.buttons;if(_){var L=N({},l.coords.cur.page),F=p.options.resize;if(F&&F.enabled&&(!l.pointerIsDown||!/mouse|pointer/.test(l.pointerType)||(x&F.mouseButtons)!=0)){if(P.object(F.edges)){var G={left:!1,right:!1,top:!1,bottom:!1};for(var me in G)G[me]=ai(me,F.edges[me],L,l._latestPointer.eventTarget,h,_,F.margin||_o.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"&&L.x>_.right-_o.defaultMargin,Te=F.axis!=="x"&&L.y>_.bottom-_o.defaultMargin;(K||Te)&&(c.action={name:"resize",axes:(K?"x":"")+(Te?"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 l=c.edges,p=c.axis,h=c.name,_=_o.cursors,x=null;if(p)x=_[h+p];else if(l){for(var L="",F=0,G=["top","bottom","left","right"];F<G.length;F++){var me=G[F];l[me]&&(L+=me)}x=_[L]}return x},filterEventType:function(c){return c.search("resize")===0},defaultMargin:null},Jo=_o,Jn={id:"actions",install:function(c){c.usePlugin(oi),c.usePlugin(Jo),c.usePlugin(Le),c.usePlugin(ar)}},Xo=0,uo={request:function(c){return Bn(c)},cancel:function(c){return xn(c)},init:function(c){if(Bn=c.requestAnimationFrame,xn=c.cancelAnimationFrame,!Bn)for(var l=["ms","moz","webkit","o"],p=0;p<l.length;p++){var h=l[p];Bn=c["".concat(h,"RequestAnimationFrame")],xn=c["".concat(h,"CancelAnimationFrame")]||c["".concat(h,"CancelRequestAnimationFrame")]}Bn=Bn&&Bn.bind(c),xn=xn&&xn.bind(c),Bn||(Bn=function(_){var x=Date.now(),L=Math.max(0,16-(x-Xo)),F=c.setTimeout(function(){_(x+L)},L);return Xo=x+L,F},xn=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,uo.cancel(pt.i),c.autoScroll=pt,pt.interaction=c,pt.prevTime=pt.now(),pt.i=uo.request(pt.scroll)},stop:function(){pt.isScrolling=!1,pt.interaction&&(pt.interaction.autoScroll=null),uo.cancel(pt.i)},scroll:function(){var c=pt.interaction,l=c.interactable,p=c.element,h=c.prepared.name,_=l.options[h].autoScroll,x=Eo(_.container,l,p),L=pt.now(),F=(L-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);P.window(x)?x.scrollBy(me.x,me.y):x&&(x.scrollLeft+=me.x,x.scrollTop+=me.y);var Te=Po(x),Be={x:Te.x-K.x,y:Te.y-K.y};(Be.x||Be.y)&&l.fire({type:"autoscroll",target:p,interactable:l,delta:Be,interaction:c,container:x})}pt.prevTime=L}pt.isScrolling&&(uo.cancel(pt.i),pt.i=uo.request(pt.scroll))},check:function(c,l){var p;return(p=c.options[l].autoScroll)==null?void 0:p.enabled},onInteractionMove:function(c){var l=c.interaction,p=c.pointer;if(l.interacting()&&pt.check(l.interactable,l.prepared.name))if(l.simulation)pt.x=pt.y=0;else{var h,_,x,L,F=l.interactable,G=l.element,me=l.prepared.name,K=F.options[me].autoScroll,Te=Eo(K.container,F,G);if(P.window(Te))L=p.clientX<pt.margin,h=p.clientY<pt.margin,_=p.clientX>Te.innerWidth-pt.margin,x=p.clientY>Te.innerHeight-pt.margin;else{var Be=_e(Te);L=p.clientX<Be.left+pt.margin,h=p.clientY<Be.top+pt.margin,_=p.clientX>Be.right-pt.margin,x=p.clientY>Be.bottom-pt.margin}pt.x=_?1:L?-1:0,pt.y=x?1:h?-1:0,pt.isScrolling||(pt.margin=K.margin,pt.speed=K.speed,pt.start(l))}}};function Eo(c,l,p){return(P.string(c)?q(c,l,p):c)||D(p)}function Po(c){return P.window(c)&&(c=window.document.body),{x:c.scrollLeft,y:c.scrollTop}}var si={id:"auto-scroll",install:function(c){var l=c.defaults,p=c.actions;c.autoScroll=pt,pt.now=function(){return c.now()},p.phaselessTypes.autoscroll=!0,l.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)}}},Ya=si;function Qo(c,l){var p=!1;return function(){return p||(V.console.warn(l),p=!0),c.apply(this,arguments)}}function Xn(c,l){return c.name=l.name,c.axis=l.axis,c.edges=l.edges,c}function bs(c){return P.bool(c)?(this.options.styleCursor=c,this):c===null?(delete this.options.styleCursor,this):this.options.styleCursor}function ii(c){return P.func(c)?(this.options.actionChecker=c,this):c===null?(delete this.options.actionChecker,this):this.options.actionChecker}var ri={id:"auto-start/interactableMethods",install:function(c){var l=c.Interactable;l.prototype.getAction=function(p,h,_,x){var L=function(F,G,me,K,Te){var Be=F.getRect(K),je=G.buttons||{0:1,1:4,3:8,4:16}[G.button],Ve={action:null,interactable:F,interaction:me,element:K,rect:Be,buttons:je};return Te.fire("auto-start:check",Ve),Ve.action}(this,h,_,x,c);return this.options.actionChecker?this.options.actionChecker(p,h,L,this,x,_):L},l.prototype.ignoreFrom=Qo(function(p){return this._backCompatOption("ignoreFrom",p)},"Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."),l.prototype.allowFrom=Qo(function(p){return this._backCompatOption("allowFrom",p)},"Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."),l.prototype.actionChecker=ii,l.prototype.styleCursor=bs}};function ws(c,l,p,h,_){return l.testIgnoreAllow(l.options[c.name],p,h)&&l.options[c.name].enabled&&Zo(l,p,c,_)?c:null}function li(c,l,p,h,_,x,L){for(var F=0,G=h.length;F<G;F++){var me=h[F],K=_[F],Te=me.getAction(l,p,c,K);if(Te){var Be=ws(Te,me,K,x,L);if(Be)return{action:Be,interactable:me,element:K}}}return{action:null,interactable:null,element:null}}function ui(c,l,p,h,_){var x=[],L=[],F=h;function G(K){x.push(K),L.push(F)}for(;P.element(F);){x=[],L=[],_.interactables.forEachMatch(F,G);var me=li(c,l,p,x,L,h,_);if(me.action&&!me.interactable.options[me.action.name].manualStart)return me;F=Ee(F)}return{action:null,interactable:null,element:null}}function xs(c,l,p){var h=l.action,_=l.interactable,x=l.element;h=h||{name:null},c.interactable=_,c.element=x,Xn(c.prepared,h),c.rect=_&&h.name?_.getRect(x):null,di(c,p),p.fire("autoStart:prepared",{interaction:c})}function Zo(c,l,p,h){var _=c.options,x=_[p.name].max,L=_[p.name].maxPerElement,F=h.autoStart.maxInteractions,G=0,me=0,K=0;if(!(x&&L&&F))return!1;for(var Te=0,Be=h.interactions.list;Te<Be.length;Te++){var je=Be[Te],Ve=je.prepared.name;if(je.interacting()&&(++G>=F||je.interactable===c&&((me+=Ve===p.name?1:0)>=x||je.element===l&&(K++,Ve===p.name&&K>=L))))return!1}return F>0}function ci(c,l){return P.number(c)?(l.autoStart.maxInteractions=c,this):l.autoStart.maxInteractions}function Ka(c,l,p){var h=p.autoStart.cursorElement;h&&h!==c&&(h.style.cursor=""),c.ownerDocument.documentElement.style.cursor=l,c.style.cursor=l,p.autoStart.cursorElement=l?c:null}function di(c,l){var p=c.interactable,h=c.element,_=c.prepared;if(c.pointerType==="mouse"&&p&&p.options.styleCursor){var x="";if(_.name){var L=p.options[_.name].cursorChecker;x=P.func(L)?L(_,p,h,c._interacting):l.actions.map[_.name].getCursor(_)}Ka(c.element,x||"",l)}else l.autoStart.cursorElement&&Ka(l.autoStart.cursorElement,"",l)}var Ja={id:"auto-start/base",before:["actions"],install:function(c){var l=c.interactStatic,p=c.defaults;c.usePlugin(ri),p.base.actionChecker=null,p.base.styleCursor=!0,N(p.perAction,{manualStart:!1,max:1/0,maxPerElement:1,allowFrom:null,ignoreFrom:null,mouseButtons:1}),l.maxInteractions=function(h){return ci(h,c)},c.autoStart={maxInteractions:1/0,withinInteractionLimit:Zo,cursorElement:null}},listeners:{"interactions:down":function(c,l){var p=c.interaction,h=c.pointer,_=c.event,x=c.eventTarget;p.interacting()||xs(p,ui(p,h,_,x,l),l)},"interactions:move":function(c,l){(function(p,h){var _=p.interaction,x=p.pointer,L=p.event,F=p.eventTarget;_.pointerType!=="mouse"||_.pointerIsDown||_.interacting()||xs(_,ui(_,x,L,F,h),h)})(c,l),function(p,h){var _=p.interaction;if(_.pointerIsDown&&!_.interacting()&&_.pointerWasMoved&&_.prepared.name){h.fire("autoStart:before-start",p);var x=_.interactable,L=_.prepared.name;L&&x&&(x.options[L].manualStart||!Zo(x,_.element,_.prepared,h)?_.stop():(_.start(_.prepared,x,_.element),di(_,h)))}}(c,l)},"interactions:stop":function(c,l){var p=c.interaction,h=p.interactable;h&&h.options.styleCursor&&Ka(p.element,"",l)}},maxInteractions:ci,withinInteractionLimit:Zo,validateAction:ws},Xa=Ja,Qa={id:"auto-start/dragAxis",listeners:{"autoStart:before-start":function(c,l){var p=c.interaction,h=c.eventTarget,_=c.dx,x=c.dy;if(p.prepared.name==="drag"){var L=Math.abs(_),F=Math.abs(x),G=p.interactable.options.drag,me=G.startAxis,K=L>F?"x":L<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 Te=h,Be=function(Ve){if(Ve!==p.interactable){var Ge=p.interactable.options.drag;if(!Ge.manualStart&&Ve.testIgnoreAllow(Ge,Te,h)){var et=Ve.getAction(p.downPointer,p.downEvent,p,Te);if(et&&et.name==="drag"&&function(Xe,rt){if(!rt)return!1;var Tt=rt.options.drag.startAxis;return Xe==="xy"||Tt==="xy"||Tt===Xe}(K,Ve)&&Xa.validateAction(et,Ve,Te,h,l))return Ve}}};P.element(Te);){var je=l.interactables.forEachMatch(Te,Be);if(je){p.prepared.name="drag",p.interactable=je,p.element=Te;break}Te=Ee(Te)}}}}}};function Ss(c){var l=c.prepared&&c.prepared.name;if(!l)return null;var p=c.interactable.options;return p[l].hold||p[l].delay}var sr={id:"auto-start/hold",install:function(c){var l=c.defaults;c.usePlugin(Xa),l.perAction.hold=0,l.perAction.delay=0},listeners:{"interactions:new":function(c){c.interaction.autoStartHoldTimer=null},"autoStart:prepared":function(c){var l=c.interaction,p=Ss(l);p>0&&(l.autoStartHoldTimer=setTimeout(function(){l.start(l.prepared,l.interactable,l.element)},p))},"interactions:move":function(c){var l=c.interaction,p=c.duplicate;l.autoStartHoldTimer&&l.pointerWasMoved&&!p&&(clearTimeout(l.autoStartHoldTimer),l.autoStartHoldTimer=null)},"autoStart:before-start":function(c){var l=c.interaction;Ss(l)>0&&(l.prepared.name=null)}},getHoldDuration:Ss},No=sr,pi={id:"auto-start",install:function(c){c.usePlugin(Xa),c.usePlugin(No),c.usePlugin(Qa)}},ir=function(c){return/^(always|never|auto)$/.test(c)?(this.options.preventDefault=c,this):P.bool(c)?(this.options.preventDefault=c?"always":"never",this):this.options.preventDefault};function Za(c){var l=c.interaction,p=c.event;l.interactable&&l.interactable.checkAndPreventDefault(p)}var Sa={id:"core/interactablePreventDefault",install:function(c){var l=c.Interactable;l.prototype.preventDefault=ir,l.prototype.checkAndPreventDefault=function(p){return function(h,_,x){var L=h.options.preventDefault;if(L!=="never")if(L!=="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)||P.element(x.target)&&he(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 h=0,_=c.interactions.list;h<_.length;h++){var x=_[h];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,l){return c["interactions:".concat(l)]=Za,c},{})};function Qn(c,l){if(l.phaselessTypes[c])return!0;for(var p in l.map)if(c.indexOf(p)===0&&c.substr(p.length)in l.phases)return!0;return!1}function Fo(c){var l={};for(var p in c){var h=c[p];P.plainObject(h)?l[p]=Fo(h):P.array(h)?l[p]=Kn(h):l[p]=h}return l}var ea=function(){function c(l){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=l,this.result=$o(),this.edges={left:!1,right:!1,top:!1,bottom:!1}}return u(c,[{key:"start",value:function(l,p){var h,_,x=l.phase,L=this.interaction,F=function(me){var K=me.interactable.options[me.prepared.name],Te=K.modifiers;return Te&&Te.length?Te:["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})}(L);this.prepareStates(F),this.startEdges=N({},L.edges),this.edges=N({},this.startEdges),this.startOffset=(h=L.rect,_=p,h?{left:_.x-h.left,top:_.y-h.top,right:h.right-_.x,bottom:h.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(l){var p=this.interaction;return l.interaction=p,l.interactable=p.interactable,l.element=p.element,l.rect||(l.rect=p.rect),l.edges||(l.edges=this.startEdges),l.startOffset=this.startOffset,l}},{key:"startAll",value:function(l){for(var p=0,h=this.states;p<h.length;p++){var _=h[p];_.methods.start&&(l.state=_,_.methods.start(l))}}},{key:"setAll",value:function(l){var p=l.phase,h=l.preEnd,_=l.skipModifiers,x=l.rect,L=l.edges;l.coords=N({},l.pageCoords),l.rect=N({},x),l.edges=N({},L);for(var F=_?this.states.slice(_):this.states,G=$o(l.coords,l.rect),me=0;me<F.length;me++){var K,Te=F[me],Be=Te.options,je=N({},l.coords),Ve=null;(K=Te.methods)!=null&&K.set&&this.shouldDo(Be,h,p)&&(l.state=Te,Ve=Te.methods.set(l),H(l.edges,l.rect,{x:l.coords.x-je.x,y:l.coords.y-je.y})),G.eventProps.push(Ve)}N(this.edges,l.edges),G.delta.x=l.coords.x-l.pageCoords.x,G.delta.y=l.coords.y-l.pageCoords.y,G.rectDelta.left=l.rect.left-x.left,G.rectDelta.right=l.rect.right-x.right,G.rectDelta.top=l.rect.top-x.top,G.rectDelta.bottom=l.rect.bottom-x.bottom;var Ge=this.result.coords,et=this.result.rect;if(Ge&&et){var Xe=G.rect.left!==et.left||G.rect.right!==et.right||G.rect.top!==et.top||G.rect.bottom!==et.bottom;G.changed=Xe||Ge.x!==G.coords.x||Ge.y!==G.coords.y}return G}},{key:"applyToInteraction",value:function(l){var p=this.interaction,h=l.phase,_=p.coords.cur,x=p.coords.start,L=this.result,F=this.startDelta,G=L.delta;h==="start"&&N(this.startDelta,L.delta);for(var me=0,K=[[x,F],[_,G]];me<K.length;me++){var Te=K[me],Be=Te[0],je=Te[1];Be.page.x+=je.x,Be.page.y+=je.y,Be.client.x+=je.x,Be.client.y+=je.y}var Ve=this.result.rectDelta,Ge=l.rect||p.rect;Ge.left+=Ve.left,Ge.right+=Ve.right,Ge.top+=Ve.top,Ge.bottom+=Ve.bottom,Ge.width=Ge.right-Ge.left,Ge.height=Ge.bottom-Ge.top}},{key:"setAndApply",value:function(l){var p=this.interaction,h=l.phase,_=l.preEnd,x=l.skipModifiers,L=this.setAll(this.fillArg({preEnd:_,phase:h,pageCoords:l.modifiedCoords||p.coords.cur.page}));if(this.result=L,!L.changed&&(!x||x<this.states.length)&&p.interacting())return!1;if(l.modifiedCoords){var F=p.coords.cur.page,G={x:l.modifiedCoords.x-F.x,y:l.modifiedCoords.y-F.y};L.coords.x+=G.x,L.coords.y+=G.y,L.delta.x+=G.x,L.delta.y+=G.y}this.applyToInteraction(l)}},{key:"beforeEnd",value:function(l){var p=l.interaction,h=l.event,_=this.states;if(_&&_.length){for(var x=!1,L=0;L<_.length;L++){var F=_[L];l.state=F;var G=F.options,me=F.methods,K=me.beforeEnd&&me.beforeEnd(l);if(K)return this.endResult=K,!1;x=x||!x&&this.shouldDo(G,!0,l.phase,!0)}x&&p.move({event:h,preEnd:!0})}}},{key:"stop",value:function(l){var p=l.interaction;if(this.states&&this.states.length){var h=N({states:this.states,interactable:p.interactable,element:p.element,rect:null},l);this.fillArg(h);for(var _=0,x=this.states;_<x.length;_++){var L=x[_];h.state=L,L.methods.stop&&L.methods.stop(h)}this.states=null,this.endResult=null}}},{key:"prepareStates",value:function(l){this.states=[];for(var p=0;p<l.length;p++){var h=l[p],_=h.options,x=h.methods,L=h.name;this.states.push({options:_,methods:x,index:p,name:L})}return this.states}},{key:"restoreInteractionCoords",value:function(l){var p=l.interaction,h=p.coords,_=p.rect,x=p.modification;if(x.result){for(var L=x.startDelta,F=x.result,G=F.delta,me=F.rectDelta,K=0,Te=[[h.start,L],[h.cur,G]];K<Te.length;K++){var Be=Te[K],je=Be[0],Ve=Be[1];je.page.x-=Ve.x,je.page.y-=Ve.y,je.client.x-=Ve.x,je.client.y-=Ve.y}_.left-=me.left,_.right-=me.right,_.top-=me.top,_.bottom-=me.bottom}}},{key:"shouldDo",value:function(l,p,h,_){return!(!l||l.enabled===!1||_&&!l.endOnly||l.endOnly&&!p||h==="start"&&!l.setStart)}},{key:"copyFrom",value:function(l){this.startOffset=l.startOffset,this.startDelta=l.startDelta,this.startEdges=l.startEdges,this.edges=l.edges,this.states=l.states.map(function(p){return Fo(p)}),this.result=$o(N({},l.result.coords),N({},l.result.rect))}},{key:"destroy",value:function(){for(var l in this)this[l]=null}}]),c}();function $o(c,l){return{rect:l,coords:c,delta:{x:0,y:0},rectDelta:{left:0,right:0,top:0,bottom:0},eventProps:[],changed:!0}}function yo(c,l){var p=c.defaults,h={start:c.start,set:c.set,beforeEnd:c.beforeEnd,stop:c.stop},_=function(x){var L=x||{};for(var F in L.enabled=L.enabled!==!1,p)F in L||(L[F]=p[F]);var G={options:L,methods:h,name:l,enable:function(){return L.enabled=!0,G},disable:function(){return L.enabled=!1,G}};return G};return l&&typeof l=="string"&&(_._defaults=p,_._methods=h),_}function ta(c){var l=c.iEvent,p=c.interaction.modification.result;p&&(l.modifiers=p.eventProps)}var rr={id:"modifiers/base",before:["actions"],install:function(c){c.defaults.perAction.modifiers=[]},listeners:{"interactions:new":function(c){var l=c.interaction;l.modification=new ea(l)},"interactions:before-action-start":function(c){var l=c.interaction,p=c.interaction.modification;p.start(c,l.coords.start.page),l.edges=p.edges,p.applyToInteraction(c)},"interactions:before-action-move":function(c){var l=c.interaction,p=l.modification,h=p.setAndApply(c);return l.edges=p.edges,h},"interactions:before-action-end":function(c){var l=c.interaction,p=l.modification,h=p.beforeEnd(c);return l.edges=p.startEdges,h},"interactions:action-start":ta,"interactions:action-move":ta,"interactions:action-end":ta,"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)}}},ve=rr,oe={base:{preventDefault:"auto",deltaSource:"page"},perAction:{enabled:!1,origin:{x:0,y:0}},actions:{}},ye=function(c){m(p,c);var l=b(p);function p(h,_,x,L,F,G,me){var K;s(this,p),(K=l.call(this,h)).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||h.element;var Te=h.interactable,Be=(Te&&Te.options||oe).deltaSource,je=de(Te,F,x),Ve=L==="start",Ge=L==="end",et=Ve?w(K):h.prevEvent,Xe=Ve?h.coords.start:Ge?{page:et.page,client:et.client,timeStamp:h.coords.cur.timeStamp}:h.coords.cur;return K.page=N({},Xe.page),K.client=N({},Xe.client),K.rect=N({},h.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+(L||""),K.interactable=Te,K.t0=Ve?h.pointers[h.pointers.length-1].downTime:et.t0,K.x0=h.coords.start.page.x-je.x,K.y0=h.coords.start.page.y-je.y,K.clientX0=h.coords.start.client.x-je.x,K.clientY0=h.coords.start.client.y-je.y,K.delta=Ve||Ge?{x:0,y:0}:{x:K[Be].x-et[Be].x,y:K[Be].y-et[Be].y},K.dt=h.coords.delta.timeStamp,K.duration=K.timeStamp-K.t0,K.velocity=N({},h.coords.velocity[Be]),K.speed=U(K.velocity.x,K.velocity.y),K.swipe=Ge||L==="inertiastart"?K.getSwipe():null,K}return u(p,[{key:"getSwipe",value:function(){var h=this._interaction;if(h.prevEvent.speed<600||this.timeStamp-h.prevEvent.timeStamp>150)return null;var _=180*Math.atan2(h.prevEvent.velocityY,h.prevEvent.velocityX)/Math.PI;_<0&&(_+=360);var x=112.5<=_&&_<247.5,L=202.5<=_&&_<337.5;return{up:L,down:!L&&22.5<=_&&_<157.5,left:x,right:!x&&(292.5<=_||_<67.5),angle:_,speed:h.prevEvent.speed,velocity:{x:h.prevEvent.velocityX,y:h.prevEvent.velocityY}}}},{key:"preventDefault",value:function(){}},{key:"stopImmediatePropagation",value:function(){this.immediatePropagationStopped=this.propagationStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}}]),p}(Jt);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=u(function c(l,p,h,_,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=l,this.pointer=p,this.event=h,this.downTime=_,this.downTarget=x}),Ht=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}({}),Pt=0,un=function(){function c(l){var p=this,h=l.pointerType,_=l.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=Qo(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=Pt++,this._scopeFire=_,this.pointerType=h;var x=this;this._proxy={};var L=function(K){Object.defineProperty(p._proxy,K,{get:function(){return x[K]}})};for(var F in Ht)L(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 u(c,[{key:"pointerMoveTolerance",get:function(){return 1}},{key:"pointerDown",value:function(l,p,h){var _=this.updatePointer(l,p,h,!0),x=this.pointers[_];this._scopeFire("interactions:down",{pointer:l,event:p,eventTarget:h,pointerIndex:_,pointerInfo:x,type:"down",interaction:this})}},{key:"start",value:function(l,p,h){return!(this.interacting()||!this.pointerIsDown||this.pointers.length<(l.name==="gesture"?2:1)||!p.options[l.name].enabled)&&(Xn(this.prepared,l),this.interactable=p,this.element=h,this.rect=p.getRect(h),this.edges=this.prepared.edges?N({},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(l,p,h){this.simulation||this.modification&&this.modification.endResult||this.updatePointer(l,p,h,!1);var _,x,L=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=U(_,x)>this.pointerMoveTolerance);var F,G,me,K=this.getPointerIndex(l),Te={pointer:l,pointerIndex:K,pointerInfo:this.pointers[K],event:p,type:"move",eventTarget:h,dx:_,dy:x,duplicate:L,interaction:this};L||(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",Te),L||this.simulation||(this.interacting()&&(Te.type=null,this.move(Te)),this.pointerWasMoved&&ne(this.coords.prev,this.coords.cur))}},{key:"move",value:function(l){l&&l.event||Fe(this.coords.delta),(l=N({pointer:this._latestPointer.pointer,event:this._latestPointer.event,eventTarget:this._latestPointer.eventTarget,interaction:this},l||{})).phase="move",this._doPhase(l)}},{key:"pointerUp",value:function(l,p,h,_){var x=this.getPointerIndex(l);x===-1&&(x=this.updatePointer(l,p,h,!1));var L=/cancel$/i.test(p.type)?"cancel":"up";this._scopeFire("interactions:".concat(L),{pointer:l,pointerIndex:x,pointerInfo:this.pointers[x],event:p,eventTarget:h,type:L,curEventTarget:_,interaction:this}),this.simulation||this.end(p),this.removePointer(l,p)}},{key:"documentBlur",value:function(l){this.end(l),this._scopeFire("interactions:blur",{event:l,type:"blur",interaction:this})}},{key:"end",value:function(l){var p;this._ending=!0,l=l||this._latestPointer.event,this.interacting()&&(p=this._doPhase({event:l,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(l){var p=Ke(l);return this.pointerType==="mouse"||this.pointerType==="pen"?this.pointers.length-1:Co(this.pointers,function(h){return h.id===p})}},{key:"getPointerInfo",value:function(l){return this.pointers[this.getPointerIndex(l)]}},{key:"updatePointer",value:function(l,p,h,_){var x,L,F,G=Ke(l),me=this.getPointerIndex(l),K=this.pointers[me];return _=_!==!1&&(_||/(down|start)$/i.test(p.type)),K?K.pointer=l:(K=new nt(G,l,p,null,null),me=this.pointers.length,this.pointers.push(K)),tt(this.coords.cur,this.pointers.map(function(Te){return Te.pointer}),this._now()),x=this.coords.delta,L=this.coords.prev,F=this.coords.cur,x.page.x=F.page.x-L.page.x,x.page.y=F.page.y-L.page.y,x.client.x=F.client.x-L.client.x,x.client.y=F.client.y-L.client.y,x.timeStamp=F.timeStamp-L.timeStamp,_&&(this.pointerIsDown=!0,K.downTime=this.coords.cur.timeStamp,K.downTarget=h,j(this.downPointer,l),this.interacting()||(ne(this.coords.start,this.coords.cur),ne(this.coords.prev,this.coords.cur),this.downEvent=p,this.pointerWasMoved=!1)),this._updateLatestPointer(l,p,h),this._scopeFire("interactions:update-pointer",{pointer:l,event:p,eventTarget:h,down:_,pointerInfo:K,pointerIndex:me,interaction:this}),me}},{key:"removePointer",value:function(l,p){var h=this.getPointerIndex(l);if(h!==-1){var _=this.pointers[h];this._scopeFire("interactions:remove-pointer",{pointer:l,event:p,eventTarget:null,pointerIndex:h,pointerInfo:_,interaction:this}),this.pointers.splice(h,1),this.pointerIsDown=!1}}},{key:"_updateLatestPointer",value:function(l,p,h){this._latestPointer.pointer=l,this._latestPointer.event=p,this._latestPointer.eventTarget=h}},{key:"destroy",value:function(){this._latestPointer.pointer=null,this._latestPointer.event=null,this._latestPointer.eventTarget=null}},{key:"_createPreparedEvent",value:function(l,p,h,_){return new ye(this,l,this.prepared.name,p,this.element,h,_)}},{key:"_fireEvent",value:function(l){var p;(p=this.interactable)==null||p.fire(l),(!this.prevEvent||l.timeStamp>=this.prevEvent.timeStamp)&&(this.prevEvent=l)}},{key:"_doPhase",value:function(l){var p=l.event,h=l.phase,_=l.preEnd,x=l.type,L=this.rect;if(L&&h==="move"&&(H(this.edges,L,this.coords.delta[this.interactable.options.deltaSource]),L.width=L.right-L.left,L.height=L.bottom-L.top),this._scopeFire("interactions:before-action-".concat(h),l)===!1)return!1;var F=l.iEvent=this._createPreparedEvent(p,h,_,x);return this._scopeFire("interactions:action-".concat(h),l),h==="start"&&(this.prevEvent=F),this._fireEvent(F),this._scopeFire("interactions:after-action-".concat(h),l),!0}},{key:"_now",value:function(){return Date.now()}}]),c}();function es(c){Zn(c.interaction)}function Zn(c){if(!function(p){return!(!p.offset.pending.x&&!p.offset.pending.y)}(c))return!1;var l=c.offset.pending;return lr(c.coords.cur,l),lr(c.coords.delta,l),H(c.edges,c.rect,l),l.x=0,l.y=0,!0}function fi(c){var l=c.x,p=c.y;this.offset.pending.x+=l,this.offset.pending.y+=p,this.offset.total.x+=l,this.offset.total.y+=p}function lr(c,l){var p=c.page,h=c.client,_=l.x,x=l.y;p.x+=_,p.y+=x,h.x+=_,h.y+=x}hn.offsetBy="";var Ll={id:"offset",before:["modifiers","pointer-events","actions","inertia"],install:function(c){c.Interaction.prototype.offsetBy=fi},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(l){l.pointerIsDown&&(lr(l.coords.cur,l.offset.total),l.offset.pending.x=0,l.offset.pending.y=0)}(c.interaction)},"interactions:before-action-start":es,"interactions:before-action-move":es,"interactions:before-action-end":function(c){var l=c.interaction;if(Zn(l))return l.move({offset:!0}),l.end(),!1},"interactions:stop":function(c){var l=c.interaction;l.offset.total.x=0,l.offset.total.y=0,l.offset.pending.x=0,l.offset.pending.y=0}}},Ml=Ll,Dl=function(){function c(l){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=l}return u(c,[{key:"start",value:function(l){var p=this.interaction,h=gi(p);if(!h||!h.enabled)return!1;var _=p.coords.velocity.client,x=U(_.x,_.y),L=this.modification||(this.modification=new ea(p));if(L.copyFrom(p.modification),this.t0=p._now(),this.allowResume=h.allowResume,this.v0=x,this.currentOffset={x:0,y:0},this.startCoords=p.coords.cur.page,this.modifierArg=L.fillArg({pageCoords:this.startCoords,preEnd:!0,phase:"inertiastart"}),this.t0-p.coords.cur.timeStamp<50&&x>h.minSpeed&&x>h.endSpeed)this.startInertia();else{if(L.result=L.setAll(this.modifierArg),!L.result.changed)return!1;this.startSmoothEnd()}return p.modification.result.rect=null,p.offsetBy(this.targetOffset),p._doPhase({interaction:p,event:l,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 l=this,p=this.interaction.coords.velocity.client,h=gi(this.interaction),_=h.resistance,x=-Math.log(h.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-h.endSpeed/this.v0;var L=this.modification,F=this.modifierArg;F.pageCoords={x:this.startCoords.x+this.targetOffset.x,y:this.startCoords.y+this.targetOffset.y},L.result=L.setAll(F),L.result.changed&&(this.isModified=!0,this.modifiedOffset={x:this.targetOffset.x+L.result.delta.x,y:this.targetOffset.y+L.result.delta.y}),this.onNextFrame(function(){return l.inertiaTick()})}},{key:"startSmoothEnd",value:function(){var l=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 l.smoothEndTick()})}},{key:"onNextFrame",value:function(l){var p=this;this.timeout=uo.request(function(){p.active&&l()})}},{key:"inertiaTick",value:function(){var l,p,h,_,x,L,F,G=this,me=this.interaction,K=gi(me).resistance,Te=(me._now()-this.t0)/1e3;if(Te<this.te){var Be,je=1-(Math.exp(-K*Te)-this.lambda_v0)/this.one_ve_v0;this.isModified?(l=0,p=0,h=this.targetOffset.x,_=this.targetOffset.y,x=this.modifiedOffset.x,L=this.modifiedOffset.y,Be={x:Rl(F=je,l,h,x),y:Rl(F,p,_,L)}):Be={x:this.targetOffset.x*je,y:this.targetOffset.y*je};var Ve={x:Be.x-this.currentOffset.x,y:Be.y-this.currentOffset.y};this.currentOffset.x+=Ve.x,this.currentOffset.y+=Ve.y,me.offsetBy(Ve),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 l=this,p=this.interaction,h=p._now()-this.t0,_=gi(p).smoothEndDuration;if(h<_){var x={x:ur(h,0,this.targetOffset.x,_),y:ur(h,0,this.targetOffset.y,_)},L={x:x.x-this.currentOffset.x,y:x.y-this.currentOffset.y};this.currentOffset.x+=L.x,this.currentOffset.y+=L.y,p.offsetBy(L),p.move({skipModifiers:this.modifierCount}),this.onNextFrame(function(){return l.smoothEndTick()})}else p.offsetBy({x:this.targetOffset.x-this.currentOffset.x,y:this.targetOffset.y-this.currentOffset.y}),this.end()}},{key:"resume",value:function(l){var p=l.pointer,h=l.event,_=l.eventTarget,x=this.interaction;x.offsetBy({x:-this.currentOffset.x,y:-this.currentOffset.y}),x.updatePointer(p,h,_,!0),x._doPhase({interaction:x,event:h,phase:"resume"}),ne(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,uo.cancel(this.timeout)}}]),c}();function gi(c){var l=c.interactable,p=c.prepared;return l&&l.options&&p.name&&l.options[p.name].inertia}var Ol={id:"inertia",before:["modifiers","actions"],install:function(c){var l=c.defaults;c.usePlugin(Ml),c.usePlugin(ve),c.actions.phases.inertiastart=!0,c.actions.phases.resume=!0,l.perAction.inertia={enabled:!1,resistance:10,minSpeed:100,endSpeed:10,allowResume:!0,smoothEndDuration:300}},listeners:{"interactions:new":function(c){var l=c.interaction;l.inertia=new Dl(l)},"interactions:before-action-end":function(c){var l=c.interaction,p=c.event;return(!l._interacting||l.simulation||!l.inertia.start(p))&&null},"interactions:down":function(c){var l=c.interaction,p=c.eventTarget,h=l.inertia;if(h.active)for(var _=p;P.element(_);){if(_===l.element){h.resume(c);break}_=Ee(_)}},"interactions:stop":function(c){var l=c.interaction.inertia;l.active&&l.stop()},"interactions:before-action-resume":function(c){var l=c.interaction.modification;l.stop(c),l.start(c,c.interaction.coords.cur.page),l.applyToInteraction(c)},"interactions:before-action-inertiastart":function(c){return c.interaction.modification.setAndApply(c)},"interactions:action-resume":ta,"interactions:action-inertiastart":ta,"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 Rl(c,l,p,h){var _=1-c;return _*_*l+2*_*c*p+c*c*h}function ur(c,l,p,h){return-p*(c/=h)*(c-2)+l}var Pl=Ol;function cr(c,l){for(var p=0;p<l.length;p++){var h=l[p];if(c.immediatePropagationStopped)break;h(c)}}var Ts=function(){function c(l){s(this,c),this.options=void 0,this.types={},this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.global=void 0,this.options=N({},l||{})}return u(c,[{key:"fire",value:function(l){var p,h=this.global;(p=this.types[l.type])&&cr(l,p),!l.propagationStopped&&h&&(p=h[l.type])&&cr(l,p)}},{key:"on",value:function(l,p){var h=Ce(l,p);for(l in h)this.types[l]=ln(this.types[l]||[],h[l])}},{key:"off",value:function(l,p){var h=Ce(l,p);for(l in h){var _=this.types[l];if(_&&_.length)for(var x=0,L=h[l];x<L.length;x++){var F=L[x],G=_.indexOf(F);G!==-1&&_.splice(G,1)}}}},{key:"getRect",value:function(l){return null}}]),c}(),ks=function(){function c(l){s(this,c),this.currentTarget=void 0,this.originalEvent=void 0,this.type=void 0,this.originalEvent=l,j(this,l)}return u(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 P.object(c)?{capture:!!c.capture,passive:!!c.passive}:{capture:!!c,passive:!1}}function Bo(c,l){return c===l||(typeof c=="boolean"?!!l.capture===c&&!l.passive:!!c.capture==!!l.capture&&!!c.passive==!!l.passive)}var na={id:"events",install:function(c){var l,p=[],h={},_=[],x={add:L,remove:F,addDelegate:function(K,Te,Be,je,Ve){var Ge=Mn(Ve);if(!h[Be]){h[Be]=[];for(var et=0;et<_.length;et++){var Xe=_[et];L(Xe,Be,G),L(Xe,Be,me,!0)}}var rt=h[Be],Tt=mt(rt,function(Dt){return Dt.selector===K&&Dt.context===Te});Tt||(Tt={selector:K,context:Te,listeners:[]},rt.push(Tt)),Tt.listeners.push({func:je,options:Ge})},removeDelegate:function(K,Te,Be,je,Ve){var Ge,et=Mn(Ve),Xe=h[Be],rt=!1;if(Xe)for(Ge=Xe.length-1;Ge>=0;Ge--){var Tt=Xe[Ge];if(Tt.selector===K&&Tt.context===Te){for(var Dt=Tt.listeners,ht=Dt.length-1;ht>=0;ht--){var Et=Dt[ht];if(Et.func===je&&Bo(Et.options,et)){Dt.splice(ht,1),Dt.length||(Xe.splice(Ge,1),F(Te,Be,G),F(Te,Be,me,!0)),rt=!0;break}}if(rt)break}}},delegateListener:G,delegateUseCapture:me,delegatedEvents:h,documents:_,targets:p,supportsOptions:!1,supportsPassive:!1};function L(K,Te,Be,je){if(K.addEventListener){var Ve=Mn(je),Ge=mt(p,function(et){return et.eventTarget===K});Ge||(Ge={eventTarget:K,events:{}},p.push(Ge)),Ge.events[Te]||(Ge.events[Te]=[]),mt(Ge.events[Te],function(et){return et.func===Be&&Bo(et.options,Ve)})||(K.addEventListener(Te,Be,x.supportsOptions?Ve:Ve.capture),Ge.events[Te].push({func:Be,options:Ve}))}}function F(K,Te,Be,je){if(K.addEventListener&&K.removeEventListener){var Ve=Co(p,function(no){return no.eventTarget===K}),Ge=p[Ve];if(Ge&&Ge.events)if(Te!=="all"){var et=!1,Xe=Ge.events[Te];if(Xe){if(Be==="all"){for(var rt=Xe.length-1;rt>=0;rt--){var Tt=Xe[rt];F(K,Te,Tt.func,Tt.options)}return}for(var Dt=Mn(je),ht=0;ht<Xe.length;ht++){var Et=Xe[ht];if(Et.func===Be&&Bo(Et.options,Dt)){K.removeEventListener(Te,Be,x.supportsOptions?Dt:Dt.capture),Xe.splice(ht,1),Xe.length===0&&(delete Ge.events[Te],et=!0);break}}}et&&!Object.keys(Ge.events).length&&p.splice(Ve,1)}else for(Te in Ge.events)Ge.events.hasOwnProperty(Te)&&F(K,Te,"all")}}function G(K,Te){for(var Be=Mn(Te),je=new ks(K),Ve=h[K.type],Ge=wn(K)[0],et=Ge;P.element(et);){for(var Xe=0;Xe<Ve.length;Xe++){var rt=Ve[Xe],Tt=rt.selector,Dt=rt.context;if(he(et,Tt)&&X(Dt,Ge)&&X(Dt,et)){var ht=rt.listeners;je.currentTarget=et;for(var Et=0;Et<ht.length;Et++){var no=ht[Et];Bo(no.options,Be)&&no.func(je)}}}et=Ee(et)}}function me(K){return G(K,!0)}return(l=c.document)==null||l.createElement("div").addEventListener("test",null,{get capture(){return x.supportsOptions=!0},get passive(){return x.supportsPassive=!0}}),c.events=x,x}},dr={methodOrder:["simulationResume","mouseOrPen","hasPointer","idle"],search:function(c){for(var l=0,p=dr.methodOrder;l<p.length;l++){var h=p[l],_=dr[h](c);if(_)return _}return null},simulationResume:function(c){var l=c.pointerType,p=c.eventType,h=c.eventTarget,_=c.scope;if(!/down|start/i.test(p))return null;for(var x=0,L=_.interactions.list;x<L.length;x++){var F=L[x],G=h;if(F.simulation&&F.simulation.allowResume&&F.pointerType===l)for(;G;){if(G===F.element)return F;G=Ee(G)}}return null},mouseOrPen:function(c){var l,p=c.pointerId,h=c.pointerType,_=c.eventType,x=c.scope;if(h!=="mouse"&&h!=="pen")return null;for(var L=0,F=x.interactions.list;L<F.length;L++){var G=F[L];if(G.pointerType===h){if(G.simulation&&!Nl(G,p))continue;if(G.interacting())return G;l||(l=G)}}if(l)return l;for(var me=0,K=x.interactions.list;me<K.length;me++){var Te=K[me];if(!(Te.pointerType!==h||/down/i.test(_)&&Te.simulation))return Te}return null},hasPointer:function(c){for(var l=c.pointerId,p=0,h=c.scope.interactions.list;p<h.length;p++){var _=h[p];if(Nl(_,l))return _}return null},idle:function(c){for(var l=c.pointerType,p=0,h=c.scope.interactions.list;p<h.length;p++){var _=h[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()&&l===_.pointerType)return _}return null}};function Nl(c,l){return c.pointers.some(function(p){return p.id===l})}var zc=dr,mi=["pointerDown","pointerMove","pointerUp","updatePointer","removePointer","windowBlur"];function Fl(c,l){return function(p){var h=l.interactions.list,_=In(p),x=wn(p),L=x[0],F=x[1],G=[];if(/^touch/.test(p.type)){l.prevTouchTime=l.now();for(var me=0,K=p.changedTouches;me<K.length;me++){var Te=K[me],Be={pointer:Te,pointerId:Ke(Te),pointerType:_,eventType:p.type,eventTarget:L,curEventTarget:F,scope:l},je=Bl(Be);G.push([Be.pointer,Be.eventTarget,Be.curEventTarget,je])}}else{var Ve=!1;if(!se.supportsPointerEvent&&/mouse/.test(p.type)){for(var Ge=0;Ge<h.length&&!Ve;Ge++)Ve=h[Ge].pointerType!=="mouse"&&h[Ge].pointerIsDown;Ve=Ve||l.now()-l.prevTouchTime<500||p.timeStamp===0}if(!Ve){var et={pointer:p,pointerId:Ke(p),pointerType:_,eventType:p.type,curEventTarget:F,eventTarget:L,scope:l},Xe=Bl(et);G.push([et.pointer,et.eventTarget,et.curEventTarget,Xe])}}for(var rt=0;rt<G.length;rt++){var Tt=G[rt],Dt=Tt[0],ht=Tt[1],Et=Tt[2];Tt[3][c](Dt,p,ht,Et)}}}function Bl(c){var l=c.pointerType,p=c.scope,h={interaction:zc.search(c),searchDetails:c};return p.fire("interactions:find",h),h.interaction||p.interactions.new({pointerType:l})}function Un(c,l){var p=c.doc,h=c.scope,_=c.options,x=h.interactions.docEvents,L=h.events,F=L[l];for(var G in h.browser.isIOS&&!_.events&&(_.events={passive:!1}),L.delegatedEvents)F(p,G,L.delegateListener),F(p,G,L.delegateUseCapture,!0);for(var me=_&&_.events,K=0;K<x.length;K++){var Te=x[K];F(p,Te.type,Te.listener,me)}}var Vc={id:"core/interactions",install:function(c){for(var l={},p=0;p<mi.length;p++){var h=mi[p];l[h]=Fl(h,c)}var _,x=se.pEventTypes;function L(){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[Te];c.documents.some(function(Ve){return X(Ve.doc,je.downTarget)})||me.removePointer(je.pointer,je.event)},Te=0,Be=me.pointers;Te<Be.length;Te++)K()}}(_=ae.PointerEvent?[{type:x.down,listener:L},{type:x.down,listener:l.pointerDown},{type:x.move,listener:l.pointerMove},{type:x.up,listener:l.pointerUp},{type:x.cancel,listener:l.pointerUp}]:[{type:"mousedown",listener:l.pointerDown},{type:"mousemove",listener:l.pointerMove},{type:"mouseup",listener:l.pointerUp},{type:"touchstart",listener:L},{type:"touchstart",listener:l.pointerDown},{type:"touchmove",listener:l.pointerMove},{type:"touchend",listener:l.pointerUp},{type:"touchcancel",listener:l.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){m(me,F);var G=b(me);function me(){return s(this,me),G.apply(this,arguments)}return u(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:l,docEvents:_,pointerMoveTolerance:1},c.usePlugin(Sa)},listeners:{"scope:add-document":function(c){return Un(c,"add")},"scope:remove-document":function(c){return Un(c,"remove")},"interactable:unset":function(c,l){for(var p=c.interactable,h=l.interactions.list.length-1;h>=0;h--){var _=l.interactions.list[h];_.interactable===p&&(_.stop(),l.fire("interactions:destroy",{interaction:_}),_.destroy(),l.interactions.list.length>2&&l.interactions.list.splice(h,1))}}},onDocSignal:Un,doOnInteractions:Fl,methodNames:mi},Wc=Vc,oa=function(c){return c[c.On=0]="On",c[c.Off=1]="Off",c}(oa||{}),Hc=function(){function c(l,p,h,_){s(this,c),this.target=void 0,this.options=void 0,this._actions=void 0,this.events=new Ts,this._context=void 0,this._win=void 0,this._doc=void 0,this._scopeEvents=void 0,this._actions=p.actions,this.target=l,this._context=p.context||h,this._win=D(te(l)?this._context:l),this._doc=this._win.document,this._scopeEvents=_,this.set(p)}return u(c,[{key:"_defaults",get:function(){return{base:{},perAction:{},actions:{}}}},{key:"setOnEvents",value:function(l,p){return P.func(p.onstart)&&this.on("".concat(l,"start"),p.onstart),P.func(p.onmove)&&this.on("".concat(l,"move"),p.onmove),P.func(p.onend)&&this.on("".concat(l,"end"),p.onend),P.func(p.oninertiastart)&&this.on("".concat(l,"inertiastart"),p.oninertiastart),this}},{key:"updatePerActionListeners",value:function(l,p,h){var _,x=this,L=(_=this._actions.map[l])==null?void 0:_.filterEventType,F=function(G){return(L==null||L(G))&&Qn(G,x._actions)};(P.array(p)||P.object(p))&&this._onOff(oa.Off,l,p,void 0,F),(P.array(h)||P.object(h))&&this._onOff(oa.On,l,h,void 0,F)}},{key:"setPerAction",value:function(l,p){var h=this._defaults;for(var _ in p){var x=_,L=this.options[l],F=p[x];x==="listeners"&&this.updatePerActionListeners(l,L.listeners,F),P.array(F)?L[x]=Kn(F):P.plainObject(F)?(L[x]=N(L[x]||{},Fo(F)),P.object(h.perAction[x])&&"enabled"in h.perAction[x]&&(L[x].enabled=F.enabled!==!1)):P.bool(F)&&P.object(h.perAction[x])?L[x].enabled=F:L[x]=F}}},{key:"getRect",value:function(l){return l=l||(P.element(this.target)?this.target:null),P.string(this.target)&&(l=l||this._context.querySelector(this.target)),Z(l)}},{key:"rectChecker",value:function(l){var p=this;return P.func(l)?(this.getRect=function(h){var _=N({},l.apply(p,h));return"width"in _||(_.width=_.right-_.left,_.height=_.bottom-_.top),_},this):l===null?(delete this.getRect,this):this.getRect}},{key:"_backCompatOption",value:function(l,p){if(te(p)||P.object(p)){for(var h in this.options[l]=p,this._actions.map)this.options[h][l]=p;return this}return this.options[l]}},{key:"origin",value:function(l){return this._backCompatOption("origin",l)}},{key:"deltaSource",value:function(l){return l==="page"||l==="client"?(this.options.deltaSource=l,this):this.options.deltaSource}},{key:"getAllElements",value:function(){var l=this.target;return P.string(l)?Array.from(this._context.querySelectorAll(l)):P.func(l)&&l.getAllElements?l.getAllElements():P.element(l)?[l]:[]}},{key:"context",value:function(){return this._context}},{key:"inContext",value:function(l){return this._context===l.ownerDocument||X(this._context,l)}},{key:"testIgnoreAllow",value:function(l,p,h){return!this.testIgnore(l.ignoreFrom,p,h)&&this.testAllow(l.allowFrom,p,h)}},{key:"testAllow",value:function(l,p,h){return!l||!!P.element(h)&&(P.string(l)?be(h,l,p):!!P.element(l)&&X(l,h))}},{key:"testIgnore",value:function(l,p,h){return!(!l||!P.element(h))&&(P.string(l)?be(h,l,p):!!P.element(l)&&X(l,h))}},{key:"fire",value:function(l){return this.events.fire(l),this}},{key:"_onOff",value:function(l,p,h,_,x){P.object(p)&&!P.array(p)&&(_=h,h=null);var L=Ce(p,h,x);for(var F in L){F==="wheel"&&(F=se.wheelEvent);for(var G=0,me=L[F];G<me.length;G++){var K=me[G];Qn(F,this._actions)?this.events[l===oa.On?"on":"off"](F,K):P.string(this.target)?this._scopeEvents[l===oa.On?"addDelegate":"removeDelegate"](this.target,this._context,F,K,_):this._scopeEvents[l===oa.On?"add":"remove"](this.target,F,K,_)}}return this}},{key:"on",value:function(l,p,h){return this._onOff(oa.On,l,p,h)}},{key:"off",value:function(l,p,h){return this._onOff(oa.Off,l,p,h)}},{key:"set",value:function(l){var p=this._defaults;for(var h in P.object(l)||(l={}),this.options=Fo(p.base),this._actions.methodDict){var _=h,x=this._actions.methodDict[_];this.options[_]={},this.setPerAction(_,N(N({},p.perAction),p.actions[_])),this[x](l[_])}for(var L in l)L!=="getRect"?P.func(this[L])&&this[L](l[L]):this.rectChecker(l.getRect);return this}},{key:"unset",value:function(){if(P.string(this.target))for(var l in this._scopeEvents.delegatedEvents)for(var p=this._scopeEvents.delegatedEvents[l],h=p.length-1;h>=0;h--){var _=p[h],x=_.selector,L=_.context,F=_.listeners;x===this.target&&L===this._context&&p.splice(h,1);for(var G=F.length-1;G>=0;G--)this._scopeEvents.removeDelegate(this.target,this._context,l,F[G][0],F[G][1])}else this._scopeEvents.remove(this.target,"all")}}]),c}(),jc=function(){function c(l){var p=this;s(this,c),this.list=[],this.selectorMap={},this.scope=void 0,this.scope=l,l.addListeners({"interactable:unset":function(h){var _=h.interactable,x=_.target,L=P.string(x)?p.selectorMap[x]:x[p.scope.id],F=Co(L,function(G){return G===_});L.splice(F,1)}})}return u(c,[{key:"new",value:function(l,p){p=N(p||{},{actions:this.scope.actions});var h=new this.scope.Interactable(l,p,this.scope.document,this.scope.events);return this.scope.addDocument(h._doc),this.list.push(h),P.string(l)?(this.selectorMap[l]||(this.selectorMap[l]=[]),this.selectorMap[l].push(h)):(h.target[this.scope.id]||Object.defineProperty(l,this.scope.id,{value:[],configurable:!0}),l[this.scope.id].push(h)),this.scope.fire("interactable:new",{target:l,options:p,interactable:h,win:this.scope._win}),h}},{key:"getExisting",value:function(l,p){var h=p&&p.context||this.scope.document,_=P.string(l),x=_?this.selectorMap[l]:l[this.scope.id];if(x)return mt(x,function(L){return L._context===h&&(_||L.inContext(l))})}},{key:"forEachMatch",value:function(l,p){for(var h=0,_=this.list;h<_.length;h++){var x=_[h],L=void 0;if((P.string(x.target)?P.element(l)&&he(l,x.target):l===x.target)&&x.inContext(l)&&(L=p(x)),L!==void 0)return L}}}]),c}(),ts=function(){function c(){var l=this;s(this,c),this.id="__interact_scope_".concat(Math.floor(100*Math.random())),this.isInitialized=!1,this.listenerMaps=[],this.browser=se,this.defaults=Fo(oe),this.Eventable=Ts,this.actions={map:{},phases:{start:!0,move:!0,end:!0},methodDict:{},phaselessTypes:{}},this.interactStatic=function(h){var _=function x(L,F){var G=h.interactables.getExisting(L,F);return G||((G=h.interactables.new(L,F)).events.global=x.globalEvents),G};return _.getPointerAverage=bt,_.getTouchBBox=ct,_.getTouchDistance=rn,_.getTouchAngle=Rt,_.getElementRect=Z,_.getElementClientRect=_e,_.matchesSelector=he,_.closest=ee,_.globalEvents={},_.version="1.10.27",_.scope=h,_.use=function(x,L){return this.scope.usePlugin(x,L),this},_.isSet=function(x,L){return!!this.scope.interactables.get(x,L&&L.context)},_.on=Qo(function(x,L,F){if(P.string(x)&&x.search(" ")!==-1&&(x=x.trim().split(/ +/)),P.array(x)){for(var G=0,me=x;G<me.length;G++){var K=me[G];this.on(K,L,F)}return this}if(P.object(x)){for(var Te in x)this.on(Te,x[Te],L);return this}return Qn(x,this.scope.actions)?this.globalEvents[x]?this.globalEvents[x].push(L):this.globalEvents[x]=[L]:this.scope.events.add(this.scope.document,x,L,{options:F}),this},"The interact.on() method is being deprecated"),_.off=Qo(function(x,L,F){if(P.string(x)&&x.search(" ")!==-1&&(x=x.trim().split(/ +/)),P.array(x)){for(var G=0,me=x;G<me.length;G++){var K=me[G];this.off(K,L,F)}return this}if(P.object(x)){for(var Te in x)this.off(Te,x[Te],L);return this}var Be;return Qn(x,this.scope.actions)?x in this.globalEvents&&(Be=this.globalEvents[x].indexOf(L))!==-1&&this.globalEvents[x].splice(Be,1):this.scope.events.remove(this.scope.document,x,L,F),this},"The interact.off() method is being deprecated"),_.debug=function(){return this.scope},_.supportsTouch=function(){return se.supportsTouch},_.supportsPointerEvent=function(){return se.supportsPointerEvent},_.stop=function(){for(var x=0,L=this.scope.interactions.list;x<L.length;x++)L[x].stop();return this},_.pointerMoveTolerance=function(x){return P.number(x)?(this.scope.interactions.pointerMoveTolerance=x,this):this.scope.interactions.pointerMoveTolerance},_.addDocument=function(x,L){this.scope.addDocument(x,L)},_.removeDocument=function(x){this.scope.removeDocument(x)},_}(this),this.InteractEvent=ye,this.Interactable=void 0,this.interactables=new jc(this),this._win=void 0,this.document=void 0,this.window=void 0,this.documents=[],this._plugins={list:[],map:{}},this.onWindowUnload=function(h){return l.removeDocument(h.target)};var p=this;this.Interactable=function(h){m(x,h);var _=b(x);function x(){return s(this,x),_.apply(this,arguments)}return u(x,[{key:"_defaults",get:function(){return p.defaults}},{key:"set",value:function(L){return T(f(x.prototype),"set",this).call(this,L),p.fire("interactable:set",{options:L,interactable:this}),this}},{key:"unset",value:function(){T(f(x.prototype),"unset",this).call(this);var L=p.interactables.list.indexOf(this);L<0||(p.interactables.list.splice(L,1),p.fire("interactable:unset",{interactable:this}))}}]),x}(Hc)}return u(c,[{key:"addListeners",value:function(l,p){this.listenerMaps.push({id:p,map:l})}},{key:"fire",value:function(l,p){for(var h=0,_=this.listenerMaps;h<_.length;h++){var x=_[h].map[l];if(x&&x(p,this,l)===!1)return!1}}},{key:"init",value:function(l){return this.isInitialized?this:function(p,h){return p.isInitialized=!0,P.window(h)&&pe(h),ae.init(h),se.init(h),uo.init(h),p.window=h,p.document=h.document,p.usePlugin(Wc),p.usePlugin(na),p}(this,l)}},{key:"pluginIsInstalled",value:function(l){var p=l.id;return p?!!this._plugins.map[p]:this._plugins.list.indexOf(l)!==-1}},{key:"usePlugin",value:function(l,p){if(!this.isInitialized)return this;if(this.pluginIsInstalled(l))return this;if(l.id&&(this._plugins.map[l.id]=l),this._plugins.list.push(l),l.install&&l.install(this,p),l.listeners&&l.before){for(var h=0,_=this.listenerMaps.length,x=l.before.reduce(function(F,G){return F[G]=!0,F[Ul(G)]=!0,F},{});h<_;h++){var L=this.listenerMaps[h].id;if(L&&(x[L]||x[Ul(L)]))break}this.listenerMaps.splice(h,0,{id:l.id,map:l.listeners})}else l.listeners&&this.listenerMaps.push({id:l.id,map:l.listeners});return this}},{key:"addDocument",value:function(l,p){if(this.getDocIndex(l)!==-1)return!1;var h=D(l);p=p?N({},p):{},this.documents.push({doc:l,options:p}),this.events.documents.push(l),l!==this.document&&this.events.add(h,"unload",this.onWindowUnload),this.fire("scope:add-document",{doc:l,window:h,scope:this,options:p})}},{key:"removeDocument",value:function(l){var p=this.getDocIndex(l),h=D(l),_=this.documents[p].options;this.events.remove(h,"unload",this.onWindowUnload),this.documents.splice(p,1),this.events.documents.splice(p,1),this.fire("scope:remove-document",{doc:l,window:h,scope:this,options:_})}},{key:"getDocIndex",value:function(l){for(var p=0;p<this.documents.length;p++)if(this.documents[p].doc===l)return p;return-1}},{key:"getDocOptions",value:function(l){var p=this.getDocIndex(l);return p===-1?null:this.documents[p].options}},{key:"now",value:function(){return(this.window.Date||Date).now()}}]),c}();function Ul(c){return c&&c.replace(/\/.*$/,"")}var zl=new ts,Dn=zl.interactStatic,Gc=typeof globalThis<"u"?globalThis:window;zl.init(Gc);var pr=Object.freeze({__proto__:null,edgeTarget:function(){},elements:function(){},grid:function(c){var l=[["x","y"],["left","top"],["right","bottom"],["width","height"]].filter(function(h){var _=h[0],x=h[1];return _ in c||x in c}),p=function(h,_){for(var x=c.range,L=c.limits,F=L===void 0?{left:-1/0,right:1/0,top:-1/0,bottom:1/0}:L,G=c.offset,me=G===void 0?{x:0,y:0}:G,K={range:x,grid:c,x:null,y:null},Te=0;Te<l.length;Te++){var Be=l[Te],je=Be[0],Ve=Be[1],Ge=Math.round((h-me.x)/c[je]),et=Math.round((_-me.y)/c[Ve]);K[je]=Math.max(F.left,Math.min(F.right,Ge*c[je]+me.x)),K[Ve]=Math.max(F.top,Math.min(F.bottom,et*c[Ve]+me.y))}return K};return p.grid=c,p.coordFields=l,p}}),qc={id:"snappers",install:function(c){var l=c.interactStatic;l.snappers=N(l.snappers||{},pr),l.createSnapGrid=l.snappers.grid}},Yc=qc,Kc={start:function(c){var l=c.state,p=c.rect,h=c.edges,_=c.pageCoords,x=l.options,L=x.ratio,F=x.enabled,G=l.options,me=G.equalDelta,K=G.modifiers;L==="preserve"&&(L=p.width/p.height),l.startCoords=N({},_),l.startRect=N({},p),l.ratio=L,l.equalDelta=me;var Te=l.linkedEdges={top:h.top||h.left&&!h.bottom,left:h.left||h.top&&!h.right,bottom:h.bottom||h.right&&!h.top,right:h.right||h.bottom&&!h.left};if(l.xIsPrimaryAxis=!(!h.left&&!h.right),l.equalDelta){var Be=(Te.left?1:-1)*(Te.top?1:-1);l.edgeSign={x:Be,y:Be}}else l.edgeSign={x:Te.left?-1:1,y:Te.top?-1:1};if(F!==!1&&N(h,Te),K!=null&&K.length){var je=new ea(c.interaction);je.copyFrom(c.interaction.modification),je.prepareStates(K),l.subModification=je,je.startAll(o({},c))}},set:function(c){var l=c.state,p=c.rect,h=c.coords,_=l.linkedEdges,x=N({},h),L=l.equalDelta?Jc:B;if(N(c.edges,_),L(l,l.xIsPrimaryAxis,h,p),!l.subModification)return null;var F=N({},p);H(_,F,{x:h.x-x.x,y:h.y-x.y});var G=l.subModification.setAll(o(o({},c),{},{rect:F,edges:_,pageCoords:h,prevCoords:h,prevRect:F})),me=G.delta;return G.changed&&(L(l,Math.abs(me.x)>Math.abs(me.y),G.coords,G.rect),N(h,G.coords)),G.eventProps},defaults:{ratio:"preserve",equalDelta:!1,modifiers:[],enabled:!1}};function Jc(c,l,p){var h=c.startCoords,_=c.edgeSign;l?p.y=h.y+(p.x-h.x)*_.y:p.x=h.x+(p.y-h.y)*_.x}function B(c,l,p,h){var _=c.startRect,x=c.startCoords,L=c.ratio,F=c.edgeSign;if(l){var G=h.width/L;p.y=x.y+(G-_.height)*F.y}else{var me=h.height*L;p.x=x.x+(me-_.width)*F.x}}var R=yo(Kc,"aspectRatio"),ke=function(){};ke._defaults={};var De=ke;function Qe(c,l,p){return P.func(c)?Y(c,l.interactable,l.element,[p.x,p.y,l]):Y(c,l.interactable,l.element)}var Me={start:function(c){var l=c.rect,p=c.startOffset,h=c.state,_=c.interaction,x=c.pageCoords,L=h.options,F=L.elementRect,G=N({left:0,top:0,right:0,bottom:0},L.offset||{});if(l&&F){var me=Qe(L.restriction,_,x);if(me){var K=me.right-me.left-l.width,Te=me.bottom-me.top-l.height;K<0&&(G.left+=K,G.right+=K),Te<0&&(G.top+=Te,G.bottom+=Te)}G.left+=p.left-l.width*F.left,G.top+=p.top-l.height*F.top,G.right+=p.right-l.width*(1-F.right),G.bottom+=p.bottom-l.height*(1-F.bottom)}h.offset=G},set:function(c){var l=c.coords,p=c.interaction,h=c.state,_=h.options,x=h.offset,L=Qe(_.restriction,p,l);if(L){var F=function(G){return!G||"left"in G&&"top"in G||((G=N({},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}(L);l.x=Math.max(Math.min(F.right-x.right,l.x),F.left+x.left),l.y=Math.max(Math.min(F.bottom-x.bottom,l.y),F.top+x.top)}},defaults:{restriction:null,elementRect:null,offset:null,endOnly:!1,enabled:!1}},He=yo(Me,"restrict"),Je={top:1/0,left:1/0,bottom:-1/0,right:-1/0},_t={top:-1/0,left:-1/0,bottom:1/0,right:1/0};function kt(c,l){for(var p=0,h=["top","left","bottom","right"];p<h.length;p++){var _=h[p];_ in c||(c[_]=l[_])}return c}var Ct={noInner:Je,noOuter:_t,start:function(c){var l,p=c.interaction,h=c.startOffset,_=c.state,x=_.options;x&&(l=$(Qe(x.offset,p,p.coords.start.page))),l=l||{x:0,y:0},_.offset={top:l.y+h.top,left:l.x+h.left,bottom:l.y-h.bottom,right:l.x-h.right}},set:function(c){var l=c.coords,p=c.edges,h=c.interaction,_=c.state,x=_.offset,L=_.options;if(p){var F=N({},l),G=Qe(L.inner,h,F)||{},me=Qe(L.outer,h,F)||{};kt(G,Je),kt(me,_t),p.top?l.y=Math.min(Math.max(me.top+x.top,F.y),G.top+x.top):p.bottom&&(l.y=Math.max(Math.min(me.bottom+x.bottom,F.y),G.bottom+x.bottom)),p.left?l.x=Math.min(Math.max(me.left+x.left,F.x),G.left+x.left):p.right&&(l.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}},en=yo(Ct,"restrictEdges"),dn=N({get elementRect(){return{top:0,left:0,bottom:1,right:1}},set elementRect(c){}},Me.defaults),eo=yo({start:Me.start,set:Me.set,defaults:dn},"restrictRect"),co={width:-1/0,height:-1/0},ft={width:1/0,height:1/0},gt=yo({start:function(c){return Ct.start(c)},set:function(c){var l=c.interaction,p=c.state,h=c.rect,_=c.edges,x=p.options;if(_){var L=I(Qe(x.min,l,c.coords))||co,F=I(Qe(x.max,l,c.coords))||ft;p.options={endOnly:x.endOnly,inner:N({},Ct.noInner),outer:N({},Ct.noOuter)},_.top?(p.options.inner.top=h.bottom-L.height,p.options.outer.top=h.bottom-F.height):_.bottom&&(p.options.inner.bottom=h.top+L.height,p.options.outer.bottom=h.top+F.height),_.left?(p.options.inner.left=h.right-L.width,p.options.outer.left=h.right-F.width):_.right&&(p.options.inner.right=h.left+L.width,p.options.outer.right=h.left+F.width),Ct.set(c),p.options=x}},defaults:{min:null,max:null,endOnly:!1,enabled:!1}},"restrictSize"),St={start:function(c){var l,p=c.interaction,h=c.interactable,_=c.element,x=c.rect,L=c.state,F=c.startOffset,G=L.options,me=G.offsetWithOrigin?function(Be){var je=Be.interaction.element,Ve=$(Y(Be.state.options.origin,null,null,[je])),Ge=Ve||de(Be.interactable,je,Be.interaction.prepared.name);return Ge}(c):{x:0,y:0};if(G.offset==="startCoords")l={x:p.coords.start.page.x,y:p.coords.start.page.y};else{var K=Y(G.offset,h,_,[p]);(l=$(K)||{x:0,y:0}).x+=me.x,l.y+=me.y}var Te=G.relativePoints;L.offsets=x&&Te&&Te.length?Te.map(function(Be,je){return{index:je,relativePoint:Be,x:F.left-x.width*Be.x+l.x,y:F.top-x.height*Be.y+l.y}}):[{index:0,relativePoint:null,x:l.x,y:l.y}]},set:function(c){var l=c.interaction,p=c.coords,h=c.state,_=h.options,x=h.offsets,L=de(l.interactable,l.element,l.prepared.name),F=N({},p),G=[];_.offsetWithOrigin||(F.x-=L.x,F.y-=L.y);for(var me=0,K=x;me<K.length;me++)for(var Te=K[me],Be=F.x-Te.x,je=F.y-Te.y,Ve=0,Ge=_.targets.length;Ve<Ge;Ve++){var et=_.targets[Ve],Xe=void 0;(Xe=P.func(et)?et(Be,je,l._proxy,Te,Ve):et)&&G.push({x:(P.number(Xe.x)?Xe.x:Be)+Te.x,y:(P.number(Xe.y)?Xe.y:je)+Te.y,range:P.number(Xe.range)?Xe.range:_.range,source:et,index:Ve,offset:Te})}for(var rt={target:null,inRange:!1,distance:0,range:0,delta:{x:0,y:0}},Tt=0;Tt<G.length;Tt++){var Dt=G[Tt],ht=Dt.range,Et=Dt.x-F.x,no=Dt.y-F.y,pn=U(Et,no),bo=pn<=ht;ht===1/0&&rt.inRange&&rt.range!==1/0&&(bo=!1),rt.target&&!(bo?rt.inRange&&ht!==1/0?pn/ht<rt.distance/rt.range:ht===1/0&&rt.range!==1/0||pn<rt.distance:!rt.inRange&&pn<rt.distance)||(rt.target=Dt,rt.distance=pn,rt.range=ht,rt.inRange=bo,rt.delta.x=Et,rt.delta.y=no)}return rt.inRange&&(p.x=rt.target.x,p.y=rt.target.y),h.closest=rt,rt},defaults:{range:1/0,targets:null,offset:null,offsetWithOrigin:!0,origin:null,relativePoints:null,endOnly:!1,enabled:!1}},$t=yo(St,"snap"),Nt={start:function(c){var l=c.state,p=c.edges,h=l.options;if(!p)return null;c.state={options:{targets:null,relativePoints:[{x:p.left?0:1,y:p.top?0:1}],offset:h.offset||"self",origin:{x:0,y:0},range:h.range}},l.targetFields=l.targetFields||[["width","height"],["x","y"]],St.start(c),l.offsets=c.state.offsets,c.state=l},set:function(c){var l=c.interaction,p=c.state,h=c.coords,_=p.options,x=p.offsets,L={x:h.x-x[0].x,y:h.y-x[0].y};p.options=N({},_),p.options.targets=[];for(var F=0,G=_.targets||[];F<G.length;F++){var me=G[F],K=void 0;if(K=P.func(me)?me(L.x,L.y,l):me){for(var Te=0,Be=p.targetFields;Te<Be.length;Te++){var je=Be[Te],Ve=je[0],Ge=je[1];if(Ve in K||Ge in K){K.x=K[Ve],K.y=K[Ge];break}}p.options.targets.push(K)}}var et=St.set(c);return p.options=_,et},defaults:{range:1/0,targets:null,offset:null,endOnly:!1,enabled:!1}},En=yo(Nt,"snapSize"),An={aspectRatio:R,restrictEdges:en,restrict:He,restrictRect:eo,restrictSize:gt,snapEdges:yo({start:function(c){var l=c.edges;return l?(c.state.targetFields=c.state.targetFields||[[l.left?"left":"right",l.top?"top":"bottom"]],Nt.start(c)):null},set:Nt.set,defaults:N(Fo(Nt.defaults),{targets:void 0,range:void 0,offset:{x:0,y:0}})},"snapEdges"),snap:$t,snapSize:En,spring:De,avoid:De,transform:De,rubberband:De},Vl={id:"modifiers",install:function(c){var l=c.interactStatic;for(var p in c.usePlugin(ve),c.usePlugin(Yc),l.modifiers=An,An){var h=An[p],_=h._defaults,x=h._methods;_._methods=x,c.defaults.perAction[p]=_}}},Wl=Vl,fr=function(c){m(p,c);var l=b(p);function p(h,_,x,L,F,G){var me;if(s(this,p),j(w(me=l.call(this,F)),x),x!==_&&j(w(me),_),me.timeStamp=G,me.originalEvent=x,me.type=h,me.pointerId=Ke(_),me.pointerType=In(_),me.target=L,me.currentTarget=null,h==="tap"){var K=F.getPointerIndex(_);me.dt=me.timeStamp-F.pointers[K].downTime;var Te=me.timeStamp-F.tapTime;me.double=!!F.prevTap&&F.prevTap.type!=="doubletap"&&F.prevTap.target===me.target&&Te<500}else h==="doubletap"&&(me.dt=_.timeStamp-F.tapTime,me.double=!0);return me}return u(p,[{key:"_subtractOrigin",value:function(h){var _=h.x,x=h.y;return this.pageX-=_,this.pageY-=x,this.clientX-=_,this.clientY-=x,this}},{key:"_addOrigin",value:function(h){var _=h.x,x=h.y;return this.pageX+=_,this.pageY+=x,this.clientX+=_,this.clientY+=x,this}},{key:"preventDefault",value:function(){this.originalEvent.preventDefault()}}]),p}(Jt),to={id:"pointer-events/base",before:["inertia","modifiers","auto-start","actions"],install:function(c){c.pointerEvents=to,c.defaults.actions.pointerEvents=to.defaults,N(c.actions.phaselessTypes,to.types)},listeners:{"interactions:new":function(c){var l=c.interaction;l.prevTap=null,l.tapTime=0},"interactions:update-pointer":function(c){var l=c.down,p=c.pointerInfo;!l&&p.hold||(p.hold={duration:1/0,timeout:null})},"interactions:move":function(c,l){var p=c.interaction,h=c.pointer,_=c.event,x=c.eventTarget;c.duplicate||p.pointerIsDown&&!p.pointerWasMoved||(p.pointerIsDown&&mr(c),aa({interaction:p,pointer:h,event:_,eventTarget:x,type:"move"},l))},"interactions:down":function(c,l){(function(p,h){for(var _=p.interaction,x=p.pointer,L=p.event,F=p.eventTarget,G=p.pointerIndex,me=_.pointers[G].hold,K=W(F),Te={interaction:_,pointer:x,event:L,eventTarget:F,type:"hold",targets:[],path:K,node:null},Be=0;Be<K.length;Be++){var je=K[Be];Te.node=je,h.fire("pointerEvents:collect-targets",Te)}if(Te.targets.length){for(var Ve=1/0,Ge=0,et=Te.targets;Ge<et.length;Ge++){var Xe=et[Ge].eventable.options.holdDuration;Xe<Ve&&(Ve=Xe)}me.duration=Ve,me.timeout=setTimeout(function(){aa({interaction:_,eventTarget:F,pointer:x,event:L,type:"hold"},h)},Ve)}})(c,l),aa(c,l)},"interactions:up":function(c,l){mr(c),aa(c,l),function(p,h){var _=p.interaction,x=p.pointer,L=p.event,F=p.eventTarget;_.pointerWasMoved||aa({interaction:_,eventTarget:F,pointer:x,event:L,type:"tap"},h)}(c,l)},"interactions:cancel":function(c,l){mr(c),aa(c,l)}},PointerEvent:fr,fire:aa,collectEventTargets:gr,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 aa(c,l){var p=c.interaction,h=c.pointer,_=c.event,x=c.eventTarget,L=c.type,F=c.targets,G=F===void 0?gr(c,l):F,me=new fr(L,h,_,x,p,l.now());l.fire("pointerEvents:new",{pointerEvent:me});for(var K={interaction:p,pointer:h,event:_,eventTarget:x,targets:G,type:L,pointerEvent:me},Te=0;Te<G.length;Te++){var Be=G[Te];for(var je in Be.props||{})me[je]=Be.props[je];var Ve=de(Be.eventable,Be.node);if(me._subtractOrigin(Ve),me.eventable=Be.eventable,me.currentTarget=Be.node,Be.eventable.fire(me),me._addOrigin(Ve),me.immediatePropagationStopped||me.propagationStopped&&Te+1<G.length&&G[Te+1].node!==me.currentTarget)break}if(l.fire("pointerEvents:fired",K),L==="tap"){var Ge=me.double?aa({interaction:p,pointer:h,event:_,eventTarget:x,type:"doubletap"},l):me;p.prevTap=Ge,p.tapTime=Ge.timeStamp}return me}function gr(c,l){var p=c.interaction,h=c.pointer,_=c.event,x=c.eventTarget,L=c.type,F=p.getPointerIndex(h),G=p.pointers[F];if(L==="tap"&&(p.pointerWasMoved||!G||G.downTarget!==x))return[];for(var me=W(x),K={interaction:p,pointer:h,event:_,eventTarget:x,type:L,path:me,targets:[],node:null},Te=0;Te<me.length;Te++){var Be=me[Te];K.node=Be,l.fire("pointerEvents:collect-targets",K)}return L==="hold"&&(K.targets=K.targets.filter(function(je){var Ve,Ge;return je.eventable.options.holdDuration===((Ve=p.pointers[F])==null||(Ge=Ve.hold)==null?void 0:Ge.duration)})),K.targets}function mr(c){var l=c.interaction,p=c.pointerIndex,h=l.pointers[p].hold;h&&h.timeout&&(clearTimeout(h.timeout),h.timeout=null)}var HD=Object.freeze({__proto__:null,default:to});function jD(c){var l=c.interaction;l.holdIntervalHandle&&(clearInterval(l.holdIntervalHandle),l.holdIntervalHandle=null)}var GD={id:"pointer-events/holdRepeat",install:function(c){c.usePlugin(to);var l=c.pointerEvents;l.defaults.holdRepeatInterval=0,l.types.holdrepeat=c.actions.phaselessTypes.holdrepeat=!0},listeners:["move","up","cancel","endall"].reduce(function(c,l){return c["pointerEvents:".concat(l)]=jD,c},{"pointerEvents:new":function(c){var l=c.pointerEvent;l.type==="hold"&&(l.count=(l.count||0)+1)},"pointerEvents:fired":function(c,l){var p=c.interaction,h=c.pointerEvent,_=c.eventTarget,x=c.targets;if(h.type==="hold"&&x.length){var L=x[0].eventable.options.holdRepeatInterval;L<=0||(p.holdIntervalHandle=setTimeout(function(){l.pointerEvents.fire({interaction:p,eventTarget:_,type:"hold",pointer:h,event:h},l)},L))}}})},qD=GD,YD={id:"pointer-events/interactableTargets",install:function(c){var l=c.Interactable;l.prototype.pointerEvents=function(h){return N(this.events.options,h),this};var p=l.prototype._backCompatOption;l.prototype._backCompatOption=function(h,_){var x=p.call(this,h,_);return x===this&&(this.events.options[h]=_),x}},listeners:{"pointerEvents:collect-targets":function(c,l){var p=c.targets,h=c.node,_=c.type,x=c.eventTarget;l.interactables.forEachMatch(h,function(L){var F=L.events,G=F.options;F.types[_]&&F.types[_].length&&L.testIgnoreAllow(G,h,x)&&p.push({node:h,eventable:F,props:{interactable:L}})})},"interactable:new":function(c){var l=c.interactable;l.events.getRect=function(p){return l.getRect(p)}},"interactable:set":function(c,l){var p=c.interactable,h=c.options;N(p.events.options,l.pointerEvents.defaults),N(p.events.options,h.pointerEvents||{})}}},KD=YD,JD={id:"pointer-events",install:function(c){c.usePlugin(HD),c.usePlugin(qD),c.usePlugin(KD)}},XD=JD,QD={id:"reflow",install:function(c){var l=c.Interactable;c.actions.phases.reflow=!0,l.prototype.reflow=function(p){return function(h,_,x){for(var L=h.getAllElements(),F=x.window.Promise,G=F?[]:null,me=function(){var Te=L[K],Be=h.getRect(Te);if(!Be)return 1;var je,Ve=mt(x.interactions.list,function(Xe){return Xe.interacting()&&Xe.interactable===h&&Xe.element===Te&&Xe.prepared.name===_.name});if(Ve)Ve.move(),G&&(je=Ve._reflowPromise||new F(function(Xe){Ve._reflowResolve=Xe}));else{var Ge=I(Be),et=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,rt,Tt,Dt,ht){var Et=Xe.interactions.new({pointerType:"reflow"}),no={interaction:Et,event:ht,pointer:ht,eventTarget:Tt,phase:"reflow"};Et.interactable=rt,Et.element=Tt,Et.prevEvent=ht,Et.updatePointer(ht,ht,Tt,!0),Fe(Et.coords.delta),Xn(Et.prepared,Dt),Et._doPhase(no);var pn=Xe.window,bo=pn.Promise,Uo=bo?new bo(function(Ta){Et._reflowResolve=Ta}):void 0;return Et._reflowPromise=Uo,Et.start(Dt,rt,Tt),Et._interacting?(Et.move(no),Et.end(ht)):(Et.stop(),Et._reflowResolve()),Et.removePointer(ht,ht),Uo}(x,h,Te,_,et)}G&&G.push(je)},K=0;K<L.length&&!me();K++);return G&&F.all(G).then(function(){return h})}(this,p,c)}},listeners:{"interactions:stop":function(c,l){var p=c.interaction;p.pointerType==="reflow"&&(p._reflowResolve&&p._reflowResolve(),function(h,_){h.splice(h.indexOf(_),1)}(l.interactions.list,p))}}},ZD=QD;if(Dn.use(Sa),Dn.use(Ml),Dn.use(XD),Dn.use(Pl),Dn.use(Wl),Dn.use(pi),Dn.use(Jn),Dn.use(Ya),Dn.use(ZD),Dn.default=Dn,a(e)==="object"&&e)try{e.exports=Dn}catch{}return Dn.default=Dn,Dn})}(Wi,Wi.exports)),Wi.exports}var T2=S2();const pg=cg(T2),Wt=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},k2={class:"weilin_prompt_ui_window-title"},C2=["title"],E2=["title"],$2=["title"],I2=["title"],mo=Wt({__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}=Yt(),a=t,s=S(null);let r=null,u=null;const d=S({x:0,y:0}),m=S({width:600,height:400});It(()=>n.position,z=>{z&&(d.value={...z})},{immediate:!0,deep:!0}),It(()=>n.size,z=>{z&&(m.value={...z})},{immediate:!0,deep:!0});let f=null;const g=()=>{f||(f=setTimeout(()=>{window.parent.postMessage({type:`weilin_prompt_ui_window_change_${n.name}_scroll`},"*"),f=null},100))},w=(z,ie,P=m.value.width)=>{const re=window.innerWidth,ce=window.innerHeight;return{x:Math.min(Math.max(100-P,z),re-100),y:Math.min(Math.max(100,ie),ce-100)}},b=()=>{u&&(u.stop(),u=null)},T=z=>{var P;return((z==null?void 0:z.buttons)??((P=z==null?void 0:z.originalEvent)==null?void 0:P.buttons))===0},E=z=>T(z)?(b(),!0):!1,O=()=>{b()},M=()=>{s.value&&(r=pg(s.value).draggable({allowFrom:".weilin_prompt_ui_window-header",ignoreFrom:".weilin_prompt_ui_close-btn,.weilin_prompt_ui_resize-handle",listeners:{start(z){u=z.interaction},move(z){if(E(z))return;const ie=w(d.value.x+z.dx,d.value.y+z.dy);d.value=ie,a("update:position",ie)},end(){u=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:[pg.modifiers.restrictSize({min:{width:200,height:200}})],listeners:{start(z){u=z.interaction},move(z){if(E(z))return;const ie={width:z.rect.width,height:z.rect.height},P=w(d.value.x+z.deltaRect.left,d.value.y+z.deltaRect.top,ie.width);d.value=P,m.value=ie,a("update:position",P),a("update:size",ie)},end(){u=null}}}))};jt(()=>{var z;n.position&&(d.value=w(n.position.x,n.position.y,((z=n.size)==null?void 0:z.width)||m.value.width)),n.size&&(m.value={...n.size}),M(),window.addEventListener("blur",O),window.addEventListener("mouseup",b),window.addEventListener("pointerup",b)}),po(()=>{f&&(clearTimeout(f),f=null),window.removeEventListener("blur",O),window.removeEventListener("mouseup",b),window.removeEventListener("pointerup",b),b(),r&&(r.unset(),r=null)});const V=()=>{a("active")},pe=()=>{a("close")},D=()=>{V()};return(z,ie)=>(C(),Qt(Vd,{to:"#weilin_comfyui_tools_prompt_ui_div"},[i("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:`${m.value.width}px`,height:`${m.value.height}px`,zIndex:e.zIndex}),onMousedown:V},[i("div",{class:"weilin_prompt_ui_window-header",onMousedown:vt(D,["stop"])},[i("div",k2,y(e.title),1),i("button",{class:"weilin_prompt_ui_close-btn",onClick:pe},"×")],32),i("div",{class:"weilin_prompt_ui_window-content",onScroll:g},[Ei(z.$slots,"default",{},void 0,!0)],32),i("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-nw",title:v(o)("common.windowSize")},null,8,C2),i("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-ne",title:v(o)("common.windowSize")},null,8,E2),i("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-sw",title:v(o)("common.windowSize")},null,8,$2),i("div",{class:"weilin_prompt_ui_resize-handle weilin_prompt_ui_resize-handle-se",title:v(o)("common.windowSize")},null,8,I2)],36)]))}},[["__scopeId","data-v-d64522ec"]]),va="v0.0.79",A2={promptBox:{placeholder:"请输入文本...",delete:"删除",newline:"换行",tab:"制表符",windowTitle:`WeiLin提示词UI窗口 ${va}`,windowTitleGlobal:`WeiLin全局提示词UI窗口 ${va}`,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标签"}},L2={promptBox:{placeholder:"Please enter text...",delete:"Delete",newline:"New Line",tab:"Tab",windowTitle:`WeiLin Prompt UI Window ${va}`,windowTitleGlobal:`WeiLin Global Prompt UI Window ${va}`,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.1
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let fg;const al=e=>fg=e,gg=Symbol();function tc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Hi;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Hi||(Hi={}));function M2(){const e=Xl(!0),t=e.run(()=>S({}));let n=[],o=[];const a=uu({install(s){al(a),a._a=s,s.provide(gg,a),s.config.globalProperties.$pinia=a,o.forEach(r=>n.push(r)),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 mg=()=>{};function hg(e,t,n,o=mg){e.push(t);const a=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),o())};return!n&&rd()&&Kh(a),a}function Ws(e,...t){e.slice().forEach(n=>{n(...t)})}const D2=e=>e(),vg=Symbol(),nc=Symbol();function oc(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];tc(a)&&tc(o)&&e.hasOwnProperty(n)&&!gn(o)&&!Ea(o)?e[n]=oc(a,o):e[n]=o}return e}const O2=Symbol();function R2(e){return!tc(e)||!e.hasOwnProperty(O2)}const{assign:Ua}=Object;function P2(e){return!!(gn(e)&&e.effect)}function N2(e,t,n,o){const{state:a,actions:s,getters:r}=t,u=n.state.value[e];let d;function m(){u||(n.state.value[e]=a?a():{});const f=yv(n.state.value[e]);return Ua(f,s,Object.keys(r||{}).reduce((g,w)=>(g[w]=uu(Bt(()=>{al(n);const b=n._s.get(e);return r[w].call(b,b)})),g),{}))}return d=_g(e,m,t,n,o,!0),d}function _g(e,t,n={},o,a,s){let r;const u=Ua({actions:{}},n),d={deep:!0};let m,f,g=[],w=[],b;const T=o.state.value[e];!s&&!T&&(o.state.value[e]={}),S({});let E;function O(re){let ce;m=f=!1,typeof re=="function"?(re(o.state.value[e]),ce={type:Hi.patchFunction,storeId:e,events:b}):(oc(o.state.value[e],re),ce={type:Hi.patchObject,payload:re,storeId:e,events:b});const Re=E=Symbol();wt().then(()=>{E===Re&&(m=!0)}),f=!0,Ws(g,ce,o.state.value[e])}const M=s?function(){const{state:ce}=n,Re=ce?ce():{};this.$patch(Le=>{Ua(Le,Re)})}:mg;function V(){r.stop(),g=[],w=[],o._s.delete(e)}const pe=(re,ce="")=>{if(vg in re)return re[nc]=ce,re;const Re=function(){al(o);const Le=Array.from(arguments),fe=[],xe=[];function ae(X){fe.push(X)}function J(X){xe.push(X)}Ws(w,{args:Le,name:Re[nc],store:z,after:ae,onError:J});let se;try{se=re.apply(this&&this.$id===e?this:z,Le)}catch(X){throw Ws(xe,X),X}return se instanceof Promise?se.then(X=>(Ws(fe,X),X)).catch(X=>(Ws(xe,X),Promise.reject(X))):(Ws(fe,se),se)};return Re[vg]=!0,Re[nc]=ce,Re},D={_p:o,$id:e,$onAction:hg.bind(null,w),$patch:O,$reset:M,$subscribe(re,ce={}){const Re=hg(g,re,ce.detached,()=>Le()),Le=r.run(()=>It(()=>o.state.value[e],fe=>{(ce.flush==="sync"?f:m)&&re({storeId:e,type:Hi.direct,events:b},fe)},Ua({},d,ce)));return Re},$dispose:V},z=as(D);o._s.set(e,z);const P=(o._a&&o._a.runWithContext||D2)(()=>o._e.run(()=>(r=Xl()).run(()=>t({action:pe}))));for(const re in P){const ce=P[re];if(gn(ce)&&!P2(ce)||Ea(ce))s||(T&&R2(ce)&&(gn(ce)?ce.value=T[re]:oc(ce,T[re])),o.state.value[e][re]=ce);else if(typeof ce=="function"){const Re=pe(ce,re);P[re]=Re,u.actions[re]=ce}}return Ua(z,P),Ua(Mt(z),P),Object.defineProperty(z,"$state",{get:()=>o.state.value[e],set:re=>{O(ce=>{Ua(ce,re)})}}),o._p.forEach(re=>{Ua(z,r.run(()=>re({store:z,app:o._a,pinia:o,options:u})))}),T&&s&&n.hydrate&&n.hydrate(z.$state,T),m=!0,f=!0,z}/*! #__NO_SIDE_EFFECTS__ */function F2(e,t,n){let o;const a=typeof t=="function";o=a?n:t;function s(r,u){const d=o1();return r=r||(d?Rs(gg,null):null),r&&al(r),r=fg,r._s.has(e)||(a?_g(e,t,o,r):N2(e,o,r)),r._s.get(e)}return s.$id=e,s}const ac=F2("tag",()=>{const e=S([]),t=S({user_lang:"zh_CN"}),n=S(0);return{categories:e,setCategories:r=>{e.value=r},userSetting:t,setUserSetting:r=>{t.value=r},isFirstLoading:n,setisFirstLoading:r=>{n.value=r}}});function yg(e,t){return function(){return e.apply(t,arguments)}}const{toString:B2}=Object.prototype,{getPrototypeOf:sc}=Object,sl=(e=>t=>{const n=B2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Do=e=>(e=e.toLowerCase(),t=>sl(t)===e),il=e=>t=>typeof t===e,{isArray:Hs}=Array,ji=il("undefined");function U2(e){return e!==null&&!ji(e)&&e.constructor!==null&&!ji(e.constructor)&&ho(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bg=Do("ArrayBuffer");function z2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bg(e.buffer),t}const V2=il("string"),ho=il("function"),wg=il("number"),rl=e=>e!==null&&typeof e=="object",W2=e=>e===!0||e===!1,ll=e=>{if(sl(e)!=="object")return!1;const t=sc(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},H2=Do("Date"),j2=Do("File"),G2=Do("Blob"),q2=Do("FileList"),Y2=e=>rl(e)&&ho(e.pipe),K2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ho(e.append)&&((t=sl(e))==="formdata"||t==="object"&&ho(e.toString)&&e.toString()==="[object FormData]"))},J2=Do("URLSearchParams"),[X2,Q2,Z2,ey]=["ReadableStream","Request","Response","Headers"].map(Do),ty=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Gi(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,a;if(typeof e!="object"&&(e=[e]),Hs(e))for(o=0,a=e.length;o<a;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let u;for(o=0;o<r;o++)u=s[o],t.call(null,e[u],u,e)}}function xg(e,t){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 ms=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sg=e=>!ji(e)&&e!==ms;function ic(){const{caseless:e}=Sg(this)&&this||{},t={},n=(o,a)=>{const s=e&&xg(t,a)||a;ll(t[s])&&ll(o)?t[s]=ic(t[s],o):ll(o)?t[s]=ic({},o):Hs(o)?t[s]=o.slice():t[s]=o};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Gi(arguments[o],n);return t}const ny=(e,t,n,{allOwnKeys:o}={})=>(Gi(t,(a,s)=>{n&&ho(a)?e[s]=yg(a,n):e[s]=a},{allOwnKeys:o}),e),oy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ay=(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)},sy=(e,t,n,o)=>{let a,s,r;const u={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)r=a[s],(!o||o(r,e,t))&&!u[r]&&(t[r]=e[r],u[r]=!0);e=n!==!1&&sc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},iy=(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},ry=e=>{if(!e)return null;if(Hs(e))return e;let t=e.length;if(!wg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ly=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&sc(Uint8Array)),uy=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=o.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},cy=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},dy=Do("HTMLFormElement"),py=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,a){return o.toUpperCase()+a}),Tg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fy=Do("RegExp"),kg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Gi(n,(a,s)=>{let r;(r=t(a,s,e))!==!1&&(o[s]=r||a)}),Object.defineProperties(e,o)},gy=e=>{kg(e,(t,n)=>{if(ho(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(ho(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+"'")})}})},my=(e,t)=>{const n={},o=a=>{a.forEach(s=>{n[s]=!0})};return Hs(e)?o(e):o(String(e).split(t)),n},hy=()=>{},vy=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function _y(e){return!!(e&&ho(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const yy=e=>{const t=new Array(10),n=(o,a)=>{if(rl(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[a]=o;const s=Hs(o)?[]:{};return Gi(o,(r,u)=>{const d=n(r,a+1);!ji(d)&&(s[u]=d)}),t[a]=void 0,s}}return o};return n(e,0)},by=Do("AsyncFunction"),wy=e=>e&&(rl(e)||ho(e))&&ho(e.then)&&ho(e.catch),Cg=((e,t)=>e?setImmediate:t?((n,o)=>(ms.addEventListener("message",({source:a,data:s})=>{a===ms&&s===n&&o.length&&o.shift()()},!1),a=>{o.push(a),ms.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ho(ms.postMessage)),xy=typeof queueMicrotask<"u"?queueMicrotask.bind(ms):typeof process<"u"&&process.nextTick||Cg,Ne={isArray:Hs,isArrayBuffer:bg,isBuffer:U2,isFormData:K2,isArrayBufferView:z2,isString:V2,isNumber:wg,isBoolean:W2,isObject:rl,isPlainObject:ll,isReadableStream:X2,isRequest:Q2,isResponse:Z2,isHeaders:ey,isUndefined:ji,isDate:H2,isFile:j2,isBlob:G2,isRegExp:fy,isFunction:ho,isStream:Y2,isURLSearchParams:J2,isTypedArray:ly,isFileList:q2,forEach:Gi,merge:ic,extend:ny,trim:ty,stripBOM:oy,inherits:ay,toFlatObject:sy,kindOf:sl,kindOfTest:Do,endsWith:iy,toArray:ry,forEachEntry:uy,matchAll:cy,isHTMLForm:dy,hasOwnProperty:Tg,hasOwnProp:Tg,reduceDescriptors:kg,freezeMethods:gy,toObjectSet:my,toCamelCase:py,noop:hy,toFiniteNumber:vy,findKey:xg,global:ms,isContextDefined:Sg,isSpecCompliantForm:_y,toJSONObject:yy,isAsyncFn:by,isThenable:wy,setImmediate:Cg,asap:xy};function xt(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)}Ne.inherits(xt,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:Ne.toJSONObject(this.config),code:this.code,status:this.status}}});const Eg=xt.prototype,$g={};["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=>{$g[e]={value:e}}),Object.defineProperties(xt,$g),Object.defineProperty(Eg,"isAxiosError",{value:!0}),xt.from=(e,t,n,o,a,s)=>{const r=Object.create(Eg);return Ne.toFlatObject(e,r,function(d){return d!==Error.prototype},u=>u!=="isAxiosError"),xt.call(r,e.message,t,n,o,a),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const Sy=null;function rc(e){return Ne.isPlainObject(e)||Ne.isArray(e)}function Ig(e){return Ne.endsWith(e,"[]")?e.slice(0,-2):e}function Ag(e,t,n){return e?e.concat(t).map(function(a,s){return a=Ig(a),!n&&s?"["+a+"]":a}).join(n?".":""):t}function Ty(e){return Ne.isArray(e)&&!e.some(rc)}const ky=Ne.toFlatObject(Ne,{},null,function(t){return/^is[A-Z]/.test(t)});function ul(e,t,n){if(!Ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!Ne.isUndefined(O[E])});const o=n.metaTokens,a=n.visitor||f,s=n.dots,r=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&Ne.isSpecCompliantForm(t);if(!Ne.isFunction(a))throw new TypeError("visitor must be a function");function m(T){if(T===null)return"";if(Ne.isDate(T))return T.toISOString();if(!d&&Ne.isBlob(T))throw new xt("Blob is not supported. Use a Buffer instead.");return Ne.isArrayBuffer(T)||Ne.isTypedArray(T)?d&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function f(T,E,O){let M=T;if(T&&!O&&typeof T=="object"){if(Ne.endsWith(E,"{}"))E=o?E:E.slice(0,-2),T=JSON.stringify(T);else if(Ne.isArray(T)&&Ty(T)||(Ne.isFileList(T)||Ne.endsWith(E,"[]"))&&(M=Ne.toArray(T)))return E=Ig(E),M.forEach(function(pe,D){!(Ne.isUndefined(pe)||pe===null)&&t.append(r===!0?Ag([E],D,s):r===null?E:E+"[]",m(pe))}),!1}return rc(T)?!0:(t.append(Ag(O,E,s),m(T)),!1)}const g=[],w=Object.assign(ky,{defaultVisitor:f,convertValue:m,isVisitable:rc});function b(T,E){if(!Ne.isUndefined(T)){if(g.indexOf(T)!==-1)throw Error("Circular reference detected in "+E.join("."));g.push(T),Ne.forEach(T,function(M,V){(!(Ne.isUndefined(M)||M===null)&&a.call(t,M,Ne.isString(V)?V.trim():V,E,w))===!0&&b(M,E?E.concat(V):[V])}),g.pop()}}if(!Ne.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Lg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function lc(e,t){this._pairs=[],e&&ul(e,this,t)}const Mg=lc.prototype;Mg.append=function(t,n){this._pairs.push([t,n])},Mg.toString=function(t){const n=t?function(o){return t.call(this,o,Lg)}:Lg;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function Cy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Dg(e,t,n){if(!t)return e;const o=n&&n.encode||Cy;Ne.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let s;if(a?s=a(t,n):s=Ne.isURLSearchParams(t)?t.toString():new lc(t,n).toString(o),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Og{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){Ne.forEach(this.handlers,function(o){o!==null&&t(o)})}}const Rg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ey={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:lc,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},uc=typeof window<"u"&&typeof document<"u",cc=typeof navigator=="object"&&navigator||void 0,$y=uc&&(!cc||["ReactNative","NativeScript","NS"].indexOf(cc.product)<0),Iy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ay=uc&&window.location.href||"http://localhost",Nn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:uc,hasStandardBrowserEnv:$y,hasStandardBrowserWebWorkerEnv:Iy,navigator:cc,origin:Ay},Symbol.toStringTag,{value:"Module"})),...Ey};function Ly(e,t){return ul(e,new Nn.classes.URLSearchParams,Object.assign({visitor:function(n,o,a,s){return Nn.isNode&&Ne.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function My(e){return Ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dy(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 Pg(e){function t(n,o,a,s){let r=n[s++];if(r==="__proto__")return!0;const u=Number.isFinite(+r),d=s>=n.length;return r=!r&&Ne.isArray(a)?a.length:r,d?(Ne.hasOwnProp(a,r)?a[r]=[a[r],o]:a[r]=o,!u):((!a[r]||!Ne.isObject(a[r]))&&(a[r]=[]),t(n,o,a[r],s)&&Ne.isArray(a[r])&&(a[r]=Dy(a[r])),!u)}if(Ne.isFormData(e)&&Ne.isFunction(e.entries)){const n={};return Ne.forEachEntry(e,(o,a)=>{t(My(o),a,n,0)}),n}return null}function Oy(e,t,n){if(Ne.isString(e))try{return(t||JSON.parse)(e),Ne.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const qi={transitional:Rg,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",a=o.indexOf("application/json")>-1,s=Ne.isObject(t);if(s&&Ne.isHTMLForm(t)&&(t=new FormData(t)),Ne.isFormData(t))return a?JSON.stringify(Pg(t)):t;if(Ne.isArrayBuffer(t)||Ne.isBuffer(t)||Ne.isStream(t)||Ne.isFile(t)||Ne.isBlob(t)||Ne.isReadableStream(t))return t;if(Ne.isArrayBufferView(t))return t.buffer;if(Ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Ly(t,this.formSerializer).toString();if((u=Ne.isFileList(t))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ul(u?{"files[]":t}:t,d&&new d,this.formSerializer)}}return s||a?(n.setContentType("application/json",!1),Oy(t)):t}],transformResponse:[function(t){const n=this.transitional||qi.transitional,o=n&&n.forcedJSONParsing,a=this.responseType==="json";if(Ne.isResponse(t)||Ne.isReadableStream(t))return t;if(t&&Ne.isString(t)&&(o&&!this.responseType||a)){const r=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(u){if(r)throw u.name==="SyntaxError"?xt.from(u,xt.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nn.classes.FormData,Blob:Nn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ne.forEach(["delete","get","head","post","put","patch"],e=>{qi.headers[e]={}});const Ry=Ne.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"]),Py=e=>{const t={};let n,o,a;return e&&e.split(`
`).forEach(function(r){a=r.indexOf(":"),n=r.substring(0,a).trim().toLowerCase(),o=r.substring(a+1).trim(),!(!n||t[n]&&Ry[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Ng=Symbol("internals");function Yi(e){return e&&String(e).trim().toLowerCase()}function cl(e){return e===!1||e==null?e:Ne.isArray(e)?e.map(cl):String(e)}function Ny(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 Fy=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function dc(e,t,n,o,a){if(Ne.isFunction(o))return o.call(this,t,n);if(a&&(t=n),!!Ne.isString(t)){if(Ne.isString(o))return t.indexOf(o)!==-1;if(Ne.isRegExp(o))return o.test(t)}}function By(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Uy(e,t){const n=Ne.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(a,s,r){return this[o].call(this,t,a,s,r)},configurable:!0})})}let ao=class{constructor(t){t&&this.set(t)}set(t,n,o){const a=this;function s(u,d,m){const f=Yi(d);if(!f)throw new Error("header name must be a non-empty string");const g=Ne.findKey(a,f);(!g||a[g]===void 0||m===!0||m===void 0&&a[g]!==!1)&&(a[g||d]=cl(u))}const r=(u,d)=>Ne.forEach(u,(m,f)=>s(m,f,d));if(Ne.isPlainObject(t)||t instanceof this.constructor)r(t,n);else if(Ne.isString(t)&&(t=t.trim())&&!Fy(t))r(Py(t),n);else if(Ne.isHeaders(t))for(const[u,d]of t.entries())s(d,u,o);else t!=null&&s(n,t,o);return this}get(t,n){if(t=Yi(t),t){const o=Ne.findKey(this,t);if(o){const a=this[o];if(!n)return a;if(n===!0)return Ny(a);if(Ne.isFunction(n))return n.call(this,a,o);if(Ne.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Yi(t),t){const o=Ne.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||dc(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let a=!1;function s(r){if(r=Yi(r),r){const u=Ne.findKey(o,r);u&&(!n||dc(o,o[u],u,n))&&(delete o[u],a=!0)}}return Ne.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||dc(this,this[s],s,t,!0))&&(delete this[s],a=!0)}return a}normalize(t){const n=this,o={};return Ne.forEach(this,(a,s)=>{const r=Ne.findKey(o,s);if(r){n[r]=cl(a),delete n[s];return}const u=t?By(s):String(s).trim();u!==s&&delete n[s],n[u]=cl(a),o[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ne.forEach(this,(o,a)=>{o!=null&&o!==!1&&(n[a]=t&&Ne.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(`
`)}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[Ng]=this[Ng]={accessors:{}}).accessors,a=this.prototype;function s(r){const u=Yi(r);o[u]||(Uy(a,r),o[u]=!0)}return Ne.isArray(t)?t.forEach(s):s(t),this}};ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ne.reduceDescriptors(ao.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),Ne.freezeMethods(ao);function pc(e,t){const n=this||qi,o=t||n,a=ao.from(o.headers);let s=o.data;return Ne.forEach(e,function(u){s=u.call(n,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function Fg(e){return!!(e&&e.__CANCEL__)}function js(e,t,n){xt.call(this,e??"canceled",xt.ERR_CANCELED,t,n),this.name="CanceledError"}Ne.inherits(js,xt,{__CANCEL__:!0});function Bg(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new xt("Request failed with status code "+n.status,[xt.ERR_BAD_REQUEST,xt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zy(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vy(e,t){e=e||10;const n=new Array(e),o=new Array(e);let a=0,s=0,r;return t=t!==void 0?t:1e3,function(d){const m=Date.now(),f=o[s];r||(r=m),n[a]=d,o[a]=m;let g=s,w=0;for(;g!==a;)w+=n[g++],g=g%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),m-r<t)return;const b=f&&m-f;return b?Math.round(w*1e3/b):void 0}}function Wy(e,t){let n=0,o=1e3/t,a,s;const r=(m,f=Date.now())=>{n=f,a=null,s&&(clearTimeout(s),s=null),e.apply(null,m)};return[(...m)=>{const f=Date.now(),g=f-n;g>=o?r(m,f):(a=m,s||(s=setTimeout(()=>{s=null,r(a)},o-g)))},()=>a&&r(a)]}const dl=(e,t,n=3)=>{let o=0;const a=Vy(50,250);return Wy(s=>{const r=s.loaded,u=s.lengthComputable?s.total:void 0,d=r-o,m=a(d),f=r<=u;o=r;const g={loaded:r,total:u,progress:u?r/u:void 0,bytes:d,rate:m||void 0,estimated:m&&u&&f?(u-r)/m:void 0,event:s,lengthComputable:u!=null,[t?"download":"upload"]:!0};e(g)},n)},Ug=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},zg=e=>(...t)=>Ne.asap(()=>e(...t)),Hy=Nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Nn.origin),Nn.navigator&&/(msie|trident)/i.test(Nn.navigator.userAgent)):()=>!0,jy=Nn.hasStandardBrowserEnv?{write(e,t,n,o,a,s){const r=[e+"="+encodeURIComponent(t)];Ne.isNumber(n)&&r.push("expires="+new Date(n).toGMTString()),Ne.isString(o)&&r.push("path="+o),Ne.isString(a)&&r.push("domain="+a),s===!0&&r.push("secure"),document.cookie=r.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 Gy(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qy(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Vg(e,t,n){let o=!Gy(t);return e&&o||n==!1?qy(e,t):t}const Wg=e=>e instanceof ao?{...e}:e;function hs(e,t){t=t||{};const n={};function o(m,f,g,w){return Ne.isPlainObject(m)&&Ne.isPlainObject(f)?Ne.merge.call({caseless:w},m,f):Ne.isPlainObject(f)?Ne.merge({},f):Ne.isArray(f)?f.slice():f}function a(m,f,g,w){if(Ne.isUndefined(f)){if(!Ne.isUndefined(m))return o(void 0,m,g,w)}else return o(m,f,g,w)}function s(m,f){if(!Ne.isUndefined(f))return o(void 0,f)}function r(m,f){if(Ne.isUndefined(f)){if(!Ne.isUndefined(m))return o(void 0,m)}else return o(void 0,f)}function u(m,f,g){if(g in t)return o(m,f);if(g in e)return o(void 0,m)}const d={url:s,method:s,data:s,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:u,headers:(m,f,g)=>a(Wg(m),Wg(f),g,!0)};return Ne.forEach(Object.keys(Object.assign({},e,t)),function(f){const g=d[f]||a,w=g(e[f],t[f],f);Ne.isUndefined(w)&&g!==u||(n[f]=w)}),n}const Hg=e=>{const t=hs({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:s,headers:r,auth:u}=t;t.headers=r=ao.from(r),t.url=Dg(Vg(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&r.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let d;if(Ne.isFormData(n)){if(Nn.hasStandardBrowserEnv||Nn.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((d=r.getContentType())!==!1){const[m,...f]=d?d.split(";").map(g=>g.trim()).filter(Boolean):[];r.setContentType([m||"multipart/form-data",...f].join("; "))}}if(Nn.hasStandardBrowserEnv&&(o&&Ne.isFunction(o)&&(o=o(t)),o||o!==!1&&Hy(t.url))){const m=a&&s&&jy.read(s);m&&r.set(a,m)}return t},Yy=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const a=Hg(e);let s=a.data;const r=ao.from(a.headers).normalize();let{responseType:u,onUploadProgress:d,onDownloadProgress:m}=a,f,g,w,b,T;function E(){b&&b(),T&&T(),a.cancelToken&&a.cancelToken.unsubscribe(f),a.signal&&a.signal.removeEventListener("abort",f)}let O=new XMLHttpRequest;O.open(a.method.toUpperCase(),a.url,!0),O.timeout=a.timeout;function M(){if(!O)return;const pe=ao.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),z={data:!u||u==="text"||u==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:pe,config:e,request:O};Bg(function(P){n(P),E()},function(P){o(P),E()},z),O=null}"onloadend"in O?O.onloadend=M:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(M)},O.onabort=function(){O&&(o(new xt("Request aborted",xt.ECONNABORTED,e,O)),O=null)},O.onerror=function(){o(new xt("Network Error",xt.ERR_NETWORK,e,O)),O=null},O.ontimeout=function(){let D=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const z=a.transitional||Rg;a.timeoutErrorMessage&&(D=a.timeoutErrorMessage),o(new xt(D,z.clarifyTimeoutError?xt.ETIMEDOUT:xt.ECONNABORTED,e,O)),O=null},s===void 0&&r.setContentType(null),"setRequestHeader"in O&&Ne.forEach(r.toJSON(),function(D,z){O.setRequestHeader(z,D)}),Ne.isUndefined(a.withCredentials)||(O.withCredentials=!!a.withCredentials),u&&u!=="json"&&(O.responseType=a.responseType),m&&([w,T]=dl(m,!0),O.addEventListener("progress",w)),d&&O.upload&&([g,b]=dl(d),O.upload.addEventListener("progress",g),O.upload.addEventListener("loadend",b)),(a.cancelToken||a.signal)&&(f=pe=>{O&&(o(!pe||pe.type?new js(null,e,O):pe),O.abort(),O=null)},a.cancelToken&&a.cancelToken.subscribe(f),a.signal&&(a.signal.aborted?f():a.signal.addEventListener("abort",f)));const V=zy(a.url);if(V&&Nn.protocols.indexOf(V)===-1){o(new xt("Unsupported protocol "+V+":",xt.ERR_BAD_REQUEST,e));return}O.send(s||null)})},Ky=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,a;const s=function(m){if(!a){a=!0,u();const f=m instanceof Error?m:this.reason;o.abort(f instanceof xt?f:new js(f instanceof Error?f.message:f))}};let r=t&&setTimeout(()=>{r=null,s(new xt(`timeout ${t} of ms exceeded`,xt.ETIMEDOUT))},t);const u=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(m=>{m.unsubscribe?m.unsubscribe(s):m.removeEventListener("abort",s)}),e=null)};e.forEach(m=>m.addEventListener("abort",s));const{signal:d}=o;return d.unsubscribe=()=>Ne.asap(u),d}},Jy=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},Xy=async function*(e,t){for await(const n of Qy(e))yield*Jy(n,t)},Qy=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()}},jg=(e,t,n,o)=>{const a=Xy(e,t);let s=0,r,u=d=>{r||(r=!0,o&&o(d))};return new ReadableStream({async pull(d){try{const{done:m,value:f}=await a.next();if(m){u(),d.close();return}let g=f.byteLength;if(n){let w=s+=g;n(w)}d.enqueue(new Uint8Array(f))}catch(m){throw u(m),m}},cancel(d){return u(d),a.return()}},{highWaterMark:2})},pl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Gg=pl&&typeof ReadableStream=="function",Zy=pl&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),qg=(e,...t)=>{try{return!!e(...t)}catch{return!1}},eb=Gg&&qg(()=>{let e=!1;const t=new Request(Nn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Yg=64*1024,fc=Gg&&qg(()=>Ne.isReadableStream(new Response("").body)),fl={stream:fc&&(e=>e.body)};pl&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fl[t]&&(fl[t]=Ne.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new xt(`Response type '${t}' is not supported`,xt.ERR_NOT_SUPPORT,o)})})})(new Response);const tb=async e=>{if(e==null)return 0;if(Ne.isBlob(e))return e.size;if(Ne.isSpecCompliantForm(e))return(await new Request(Nn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ne.isArrayBufferView(e)||Ne.isArrayBuffer(e))return e.byteLength;if(Ne.isURLSearchParams(e)&&(e=e+""),Ne.isString(e))return(await Zy(e)).byteLength},nb=async(e,t)=>{const n=Ne.toFiniteNumber(e.getContentLength());return n??tb(t)},gc={http:Sy,xhr:Yy,fetch:pl&&(async e=>{let{url:t,method:n,data:o,signal:a,cancelToken:s,timeout:r,onDownloadProgress:u,onUploadProgress:d,responseType:m,headers:f,withCredentials:g="same-origin",fetchOptions:w}=Hg(e);m=m?(m+"").toLowerCase():"text";let b=Ky([a,s&&s.toAbortSignal()],r),T;const E=b&&b.unsubscribe&&(()=>{b.unsubscribe()});let O;try{if(d&&eb&&n!=="get"&&n!=="head"&&(O=await nb(f,o))!==0){let z=new Request(t,{method:"POST",body:o,duplex:"half"}),ie;if(Ne.isFormData(o)&&(ie=z.headers.get("content-type"))&&f.setContentType(ie),z.body){const[P,re]=Ug(O,dl(zg(d)));o=jg(z.body,Yg,P,re)}}Ne.isString(g)||(g=g?"include":"omit");const M="credentials"in Request.prototype;T=new Request(t,{...w,signal:b,method:n.toUpperCase(),headers:f.normalize().toJSON(),body:o,duplex:"half",credentials:M?g:void 0});let V=await fetch(T);const pe=fc&&(m==="stream"||m==="response");if(fc&&(u||pe&&E)){const z={};["status","statusText","headers"].forEach(ce=>{z[ce]=V[ce]});const ie=Ne.toFiniteNumber(V.headers.get("content-length")),[P,re]=u&&Ug(ie,dl(zg(u),!0))||[];V=new Response(jg(V.body,Yg,P,()=>{re&&re(),E&&E()}),z)}m=m||"text";let D=await fl[Ne.findKey(fl,m)||"text"](V,e);return!pe&&E&&E(),await new Promise((z,ie)=>{Bg(z,ie,{data:D,headers:ao.from(V.headers),status:V.status,statusText:V.statusText,config:e,request:T})})}catch(M){throw E&&E(),M&&M.name==="TypeError"&&/fetch/i.test(M.message)?Object.assign(new xt("Network Error",xt.ERR_NETWORK,e,T),{cause:M.cause||M}):xt.from(M,M&&M.code,e,T)}})};Ne.forEach(gc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Kg=e=>`- ${e}`,ob=e=>Ne.isFunction(e)||e===null||e===!1,Jg={getAdapter:e=>{e=Ne.isArray(e)?e:[e];const{length:t}=e;let n,o;const a={};for(let s=0;s<t;s++){n=e[s];let r;if(o=n,!ob(n)&&(o=gc[(r=String(n)).toLowerCase()],o===void 0))throw new xt(`Unknown adapter '${r}'`);if(o)break;a[r||"#"+s]=o}if(!o){const s=Object.entries(a).map(([u,d])=>`adapter ${u} `+(d===!1?"is not supported by the environment":"is not available in the build"));let r=t?s.length>1?`since :
`+s.map(Kg).join(`
`):" "+Kg(s[0]):"as no adapter specified";throw new xt("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return o},adapters:gc};function mc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new js(null,e)}function Xg(e){return mc(e),e.headers=ao.from(e.headers),e.data=pc.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jg.getAdapter(e.adapter||qi.adapter)(e).then(function(o){return mc(e),o.data=pc.call(e,e.transformResponse,o),o.headers=ao.from(o.headers),o},function(o){return Fg(o)||(mc(e),o&&o.response&&(o.response.data=pc.call(e,e.transformResponse,o.response),o.response.headers=ao.from(o.response.headers))),Promise.reject(o)})}const Qg="1.8.3",gl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gl[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const Zg={};gl.transitional=function(t,n,o){function a(s,r){return"[Axios v"+Qg+"] Transitional option '"+s+"'"+r+(o?". "+o:"")}return(s,r,u)=>{if(t===!1)throw new xt(a(r," has been removed"+(n?" in "+n:"")),xt.ERR_DEPRECATED);return n&&!Zg[r]&&(Zg[r]=!0,console.warn(a(r," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,r,u):!0}},gl.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function ab(e,t,n){if(typeof e!="object")throw new xt("options must be an object",xt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let a=o.length;for(;a-- >0;){const s=o[a],r=t[s];if(r){const u=e[s],d=u===void 0||r(u,s,e);if(d!==!0)throw new xt("option "+s+" must be "+d,xt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new xt("Unknown option "+s,xt.ERR_BAD_OPTION)}}const ml={assertOptions:ab,validators:gl},qo=ml.validators;let vs=class{constructor(t){this.defaults=t,this.interceptors={request:new Og,response:new Og}}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=hs(this.defaults,n);const{transitional:o,paramsSerializer:a,headers:s}=n;o!==void 0&&ml.assertOptions(o,{silentJSONParsing:qo.transitional(qo.boolean),forcedJSONParsing:qo.transitional(qo.boolean),clarifyTimeoutError:qo.transitional(qo.boolean)},!1),a!=null&&(Ne.isFunction(a)?n.paramsSerializer={serialize:a}:ml.assertOptions(a,{encode:qo.function,serialize:qo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ml.assertOptions(n,{baseUrl:qo.spelling("baseURL"),withXsrfToken:qo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let r=s&&Ne.merge(s.common,s[n.method]);s&&Ne.forEach(["delete","get","head","post","put","patch","common"],T=>{delete s[T]}),n.headers=ao.concat(r,s);const u=[];let d=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(n)===!1||(d=d&&E.synchronous,u.unshift(E.fulfilled,E.rejected))});const m=[];this.interceptors.response.forEach(function(E){m.push(E.fulfilled,E.rejected)});let f,g=0,w;if(!d){const T=[Xg.bind(this),void 0];for(T.unshift.apply(T,u),T.push.apply(T,m),w=T.length,f=Promise.resolve(n);g<w;)f=f.then(T[g++],T[g++]);return f}w=u.length;let b=n;for(g=0;g<w;){const T=u[g++],E=u[g++];try{b=T(b)}catch(O){E.call(this,O);break}}try{f=Xg.call(this,b)}catch(T){return Promise.reject(T)}for(g=0,w=m.length;g<w;)f=f.then(m[g++],m[g++]);return f}getUri(t){t=hs(this.defaults,t);const n=Vg(t.baseURL,t.url,t.allowAbsoluteUrls);return Dg(n,t.params,t.paramsSerializer)}};Ne.forEach(["delete","get","head","options"],function(t){vs.prototype[t]=function(n,o){return this.request(hs(o||{},{method:t,url:n,data:(o||{}).data}))}}),Ne.forEach(["post","put","patch"],function(t){function n(o){return function(s,r,u){return this.request(hs(u||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}vs.prototype[t]=n(),vs.prototype[t+"Form"]=n(!0)});let sb=class Ph{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 r=new Promise(u=>{o.subscribe(u),s=u}).then(a);return r.cancel=function(){o.unsubscribe(s)},r},t(function(s,r,u){o.reason||(o.reason=new js(s,r,u),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 Ph(function(a){t=a}),cancel:t}}};function ib(e){return function(n){return e.apply(null,n)}}function rb(e){return Ne.isObject(e)&&e.isAxiosError===!0}const hc={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(hc).forEach(([e,t])=>{hc[t]=e});function em(e){const t=new vs(e),n=yg(vs.prototype.request,t);return Ne.extend(n,vs.prototype,t,{allOwnKeys:!0}),Ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return em(hs(e,a))},n}const mn=em(qi);mn.Axios=vs,mn.CanceledError=js,mn.CancelToken=sb,mn.isCancel=Fg,mn.VERSION=Qg,mn.toFormData=ul,mn.AxiosError=xt,mn.Cancel=mn.CanceledError,mn.all=function(t){return Promise.all(t)},mn.spread=ib,mn.isAxiosError=rb,mn.mergeConfig=hs,mn.AxiosHeaders=ao,mn.formToJSON=e=>Pg(Ne.isHTMLForm(e)?new FormData(e):e),mn.getAdapter=Jg.getAdapter,mn.HttpStatusCode=hc,mn.default=mn;const{Axios:vO,AxiosError:_O,CanceledError:yO,isCancel:bO,CancelToken:wO,VERSION:xO,all:SO,Cancel:TO,isAxiosError:kO,spread:CO,toFormData:EO,AxiosHeaders:$O,HttpStatusCode:IO,formToJSON:AO,getAdapter:LO,mergeConfig:MO}=mn,Ye=mn.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 hl={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"})},tm=()=>ac(),Ki=p2({legacy:!1,locale:"zh_CN",fallbackLocale:"zh_CN",messages:{zh_CN:A2,en_US:L2}}),lb=()=>{const e=tm();hl.getUserSetting().then(t=>{var o;e.setUserSetting(t.data);const n=((o=e.userSetting)==null?void 0:o.user_lang)||"zh_CN";Ki.global.locale.value=n})},ub=e=>{Ki.global.locale.value=e,tm().setUserSetting({user_lang:e})},cb=()=>{lb()},db={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 jt(()=>{t.value=!0}),{style:e,visible:t}}},pb={class:"text"};function fb(e,t,n,o,a,s){return Se((C(),A("div",{class:"pop-message",style:Ft(o.style[n.type])},[i("i",{class:We(["icon",[o.style[n.type].icon]])},null,2),i("span",pb,y(n.str),1)],4)),[[Ns,o.visible]])}const gb=Wt(db,[["render",fb],["__scopeId","data-v-466143c4"]]),vc=document.createElement("div");document.body.appendChild(vc);let _c=null;const ue=({str:e,type:t,name:n=""})=>{let o=Ki.global.t(e);n.length>0&&(o=Ki.global.t(e,{name:n}));const a=at(gb,{str:o,type:t});gf(a,vc),_c&&clearTimeout(_c),_c=setTimeout(()=>{gf(null,vc)},2e3)},mb={class:"language-selector-content"},hb=["onClick"],vb={class:"lang-name"},_b=Wt({__name:"LanguageSwitcher",emits:["close"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=S(null),s=ac(),r=Bt(()=>s.userSetting.user_lang),u=[{code:"zh_CN",name:"简体中文"},{code:"en_US",name:"English"}],d=n,m=w=>{f(w),d("close",{})},f=w=>{hl.setUserLanguage(w).then(()=>{ub(w),window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*"),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.setLanguageSuccess"})}).catch(()=>{ue({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(),A("div",{class:"language-selector",ref_key:"selectorRef",ref:a},[i("div",mb,[(C(),A(qe,null,ot(u,(T,E)=>i("div",{style:Ft({"margin-top":E===0?"0":"2px"}),key:T.code,class:We(["language-option",{active:r.value===T.code}]),onClick:O=>m(T.code)},[i("span",vb,y(T.name),1)],14,hb)),64))])],512))}},[["__scopeId","data-v-ed3849db"]]),_a="weilin_prompt_ui_",Gs=Wt({__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(r,u)=>(C(),Qt(Vd,{to:"#weilin_comfyui_tools_prompt_ui_div"},[at(jr,{name:`${_a}dialog-fade`},{default:Ut(()=>[e.modelValue?(C(),A("div",{key:0,class:We(`${_a}dialog-overlay`),onClick:s},[at(jr,{name:`${_a}dialog-slide`},{default:Ut(()=>[e.modelValue?(C(),A("div",{key:0,style:Ft({width:e.width}),class:We(`${_a}dialog`),onClick:u[0]||(u[0]=vt(()=>{},["stop"]))},[i("div",{class:We(`${_a}dialog-header`)},[i("h3",{class:We(`${_a}dialog-title`)},y(e.title),3),i("button",{class:We(`${_a}dialog-close`),onClick:a},u[1]||(u[1]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("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),i("div",{class:We(`${_a}dialog-content`)},[Ei(r.$slots,"default")],2),r.$slots.footer?(C(),A("div",{key:0,class:We(`${_a}dialog-footer`)},[Ei(r.$slots,"footer")],2)):Ie("",!0)],6)):Ie("",!0)]),_:3},8,["name"])],2)):Ie("",!0)]),_:3},8,["name"])]))}},[["__scopeId","data-v-48cece99"]]),so={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}})},yc={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}})},Ji={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"})},yb=["alibaba","bing","youdao"],Xi=[{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"}],bc={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:{}})},bb={class:"ai-server-setting-panel"},wb={class:"weilin-comfyui-translater-setting-box"},xb={class:"weilin-comfyui-setting-item"},Sb={class:"weilin-comfyui-setting-item"},Tb={class:"weilin-comfyui-setting-item"},kb={style:{display:"flex",gap:"10px"}},Cb=["value"],Eb={class:"weilin-comfyui-translater-setting-box"},$b={class:"weilin-comfyui-setting-small-titile"},Ib={class:"weilin-comfyui-language-selectors"},Ab={class:"weilin-comfyui-setting-item"},Lb=["index","value"],Mb={class:"weilin-comfyui-setting-item"},Db=["index","value"],Ob={class:"weilin-comfyui-translater-setting-box"},Rb={class:"weilin-comfyui-setting-small-titile"},Pb={class:"weilin-comfyui-setting-item"},Nb=["placeholder"],Fb={class:"weilin-comfyui-setting-item"},Bb=["placeholder"],Ub=Wt({__name:"ai_server_setting",setup(e){const{t}=Yt(),n=S(""),o=S(""),a=S(""),s=S(""),r=S(""),u=S({api_key:"",base_url:"https://api.siliconflow.cn/v1",model:"",temperature:0,top_p:.7,max_tokens:4096}),d=S({object:"list",data:[]}),m=()=>{bc.updateAiServerSetting(u.value).then(E=>{E.info==="ok"?ue({type:"success",str:"message.saveSuccess"}):ue({type:"warn",str:"message.saveFailed"})}).catch(()=>{ue({type:"warn",str:"message.saveFailed"})})},f=()=>{bc.getAiServerSetting().then(E=>{u.value=E.data}).catch(()=>{ue({type:"warn",str:"message.getTranslaterFail"})})},g=()=>{bc.getAiModels().then(E=>{d.value=E.data}).catch(()=>{ue({type:"warn",str:"message.getTranslaterFail"})})},w=()=>{so.getTranslateBuktSetting().then(E=>{n.value=E.data.translate_service,o.value=E.data.translate_source_lang,a.value=E.data.translate_target_lang}).catch(()=>{ue({type:"warn",str:"message.getTranslaterFail"})})},b=()=>{so.saveTranslateSetting(n.value,o.value,a.value).then(E=>{E.info==="ok"?ue({type:"success",str:"message.saveSuccess"}):ue({type:"warn",str:"message.saveFailed"})}).catch(()=>{ue({type:"warn",str:"message.saveFailed"})})},T=()=>{so.translaterInputText("",r.value).then(E=>{E&&E.data&&(s.value=E.data)}).catch(()=>{ue({type:"warn",str:"message.translaterTestFail"})})};return jt(()=>{f(),g(),w()}),(E,O)=>(C(),A("div",bb,[i("div",wb,[i("div",xb,[O[7]||(O[7]=i("label",null,"API Key",-1)),Se(i("input",{type:"text","onUpdate:modelValue":O[0]||(O[0]=M=>u.value.api_key=M),placeholder:"请输入API Key",class:"weilin-comfyui-common-select"},null,512),[[ze,u.value.api_key]])]),i("div",Sb,[O[9]||(O[9]=i("label",null,"AI平台",-1)),Se(i("select",{"onUpdate:modelValue":O[1]||(O[1]=M=>u.value.base_url=M),disabled:"",class:"weilin-comfyui-common-select"},O[8]||(O[8]=[i("option",{value:"https://api.siliconflow.cn/v1"},"硅基AI",-1)]),512),[[an,u.value.base_url]])]),i("div",Tb,[O[10]||(O[10]=i("label",null,"Model(获取前请先填写完API Key点击保存后再获取!)",-1)),i("div",kb,[Se(i("select",{"onUpdate:modelValue":O[2]||(O[2]=M=>u.value.model=M),class:"weilin-comfyui-common-select",style:{flex:"1"}},[(C(!0),A(qe,null,ot(d.value.data,M=>(C(),A("option",{key:M.id,value:M.id},y(M.id),9,Cb))),128))],512),[[an,u.value.model]]),i("button",{type:"button",class:"weilin-comfyui-install-button",style:{width:"auto","min-width":"120px"},onClick:g}," 获取模型列表 ")])]),i("button",{class:"weilin-comfyui-save-button",onClick:m}," 保存AI平台设置 ")]),i("div",Eb,[i("div",$b,y(v(t)("promptBox.settings.translaterSetting")),1),i("div",Ib,[i("div",Ab,[i("label",null,y(v(t)("promptBox.settings.translaterLangSourceSetting")),1),Se(i("select",{"onUpdate:modelValue":O[3]||(O[3]=M=>o.value=M)},[(C(!0),A(qe,null,ot(v(Xi),(M,V)=>(C(),A("option",{index:V,key:"lan-item_"+V,value:M.translator},y(v(t)("translaterLanguage."+M.language)),9,Lb))),128))],512),[[an,o.value]])]),i("div",Mb,[i("label",null,y(v(t)("promptBox.settings.translaterLangTargeSetting")),1),Se(i("select",{"onUpdate:modelValue":O[4]||(O[4]=M=>a.value=M)},[(C(!0),A(qe,null,ot(v(Xi),(M,V)=>(C(),A("option",{index:V,key:"lan-mu-item_"+V,value:M.translator},y(v(t)("translaterLanguage."+M.language)),9,Db))),128))],512),[[an,a.value]])])]),i("button",{class:"weilin-comfyui-install-button",onClick:b},y(v(t)("promptBox.settings.saveTranslaterSetting")),1)]),i("div",Ob,[i("div",Rb,y(v(t)("promptBox.settings.testTranslaterTitle")),1),i("div",Pb,[i("label",null,y(v(t)("promptBox.settings.inputTestTranslater")),1),Se(i("input",{type:"text","onUpdate:modelValue":O[5]||(O[5]=M=>r.value=M),placeholder:v(t)("promptBox.settings.inputTestTranslaterPlaceholder")},null,8,Nb),[[ze,r.value]])]),i("div",Fb,[i("label",null,y(v(t)("promptBox.settings.outPutTestTranslater")),1),Se(i("input",{type:"text","onUpdate:modelValue":O[6]||(O[6]=M=>s.value=M),readonly:"",placeholder:v(t)("promptBox.settings.outPutTestTranslaterPlaceholder")},null,8,Bb),[[ze,s.value]])]),i("button",{class:"weilin-comfyui-install-button",onClick:T},y(v(t)("promptBox.settings.testingTranslater")),1)])]))}},[["__scopeId","data-v-8663ecc8"]]),zb={class:"weilin-comfyui-settings-content"},Vb={class:"weilin-comfyui-settings-sidebar"},Wb={class:"weilin-comfyui-settings-main"},Hb={key:0},jb={class:"weilin-comfyui-setting-select"},Gb={value:"translater"},qb={class:"weilin-comfyui-translator-settings"},Yb={key:0,class:"weilin-comfyui-group-box"},Kb={key:1,class:"weilin-comfyui-group-box"},Jb={class:"weilin-comfyui-group-title"},Xb={class:"weilin-comfyui-note-top"},Qb={class:"weilin-comfyui-setting-item"},Zb={value:"auto"},e4={value:"chinese_simplified"},t4={value:"english"},n4={class:"weilin-comfyui-setting-item"},o4={value:"chinese_simplified"},a4={value:"english"},s4={key:2,class:"weilin-comfyui-group-box"},i4={class:"weilin-comfyui-group-title"},r4={class:"weilin-comfyui-translater-setting-box"},l4={class:"weilin-comfyui-setting-small-titile"},u4={class:"weilin-comfyui-setting-item"},c4=["index","value"],d4={class:"weilin-comfyui-language-selectors"},p4={class:"weilin-comfyui-setting-item"},f4=["index","value"],g4={class:"weilin-comfyui-setting-item"},m4=["index","value"],h4={class:"weilin-comfyui-tranlater-text-box"},v4={class:"weilin-comfyui-setting-small-titile"},_4={class:"weilin-comfyui-setting-item"},y4=["placeholder"],b4={class:"weilin-comfyui-setting-item"},w4=["placeholder"],x4={key:1},S4={class:"weilin-comfyui-floating-ball-settings"},T4={class:"weilin-comfyui-setting-item"},k4=["placeholder"],C4={class:"weilin-comfyui-setting-item"},E4=["placeholder"],$4={class:"weilin-comfyui-setting-item"},I4=["placeholder"],A4={key:2},L4={class:"weilin-comfyui-floating-ball-settings"},M4={class:"weilin-comfyui-setting-item"},D4={class:"weilin-comfyui-setting-item"},O4={class:"weilin-comfyui-setting-item"},R4={class:"weilin-comfyui-setting-item"},P4={class:"weilin-comfyui-setting-item"},N4={class:"weilin-comfyui-setting-item"},F4={key:3},B4={class:"weilin-comfyui-floating-ball-settings",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"15px"}},U4={class:"weilin-comfyui-settings-column"},z4={class:"weilin-comfyui-setting-item"},V4={class:"weilin-comfyui-setting-item"},W4=["placeholder"],H4={class:"weilin-comfyui-setting-item"},j4=["placeholder"],G4={class:"weilin-comfyui-setting-item"},q4=["placeholder"],Y4={class:"weilin-comfyui-settings-column"},K4={class:"weilin-comfyui-setting-item"},J4={value:"default"},X4={value:"custom"},Q4={key:0,class:"weilin-comfyui-setting-item"},Z4={key:0,class:"weilin-comfyui-skin-preview"},ew=["src"],tw={class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},nw={value:"gradient"},ow={value:"transparent"},aw={key:0,class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},sw={style:{display:"flex",gap:"10px","align-items":"center"}},iw={class:"weilin-comfyui-setting-item",style:{"grid-column":"span 2"}},rw={key:4},lw={class:"weilin-comfyui-floating-ball-settings"},uw={class:"weilin-comfyui-setting-item"},cw={class:"weilin-comfyui-setting-item"},dw={class:"weilin-comfyui-setting-item"},pw={class:"weilin-comfyui-setting-item"},fw={class:"weilin-comfyui-setting-item"},gw={class:"weilin-comfyui-setting-item"},mw={class:"weilin-comfyui-setting-item"},hw={key:5},vw={class:"weilin-comfyui-openai-settings"},_w={class:"weilin-comfyui-setting-item"},yw=["value"],bw={class:"weilin-comfyui-config-list"},ww={class:"weilin-comfyui-config-header"},xw={class:"weilin-comfyui-config-actions"},Sw=["onClick"],Tw=["onClick"],kw={key:0,class:"weilin-comfyui-config-form"},Cw={class:"weilin-comfyui-form-group"},Ew=["placeholder"],$w={class:"weilin-comfyui-form-group"},Iw=["placeholder"],Aw={class:"weilin-comfyui-form-group"},Lw=["placeholder"],Mw={class:"weilin-comfyui-form-actions"},Dw=["onClick"],Ow={key:1,class:"weilin-comfyui-config-details"},Rw={key:0,class:"weilin-comfyui-config-form"},Pw={class:"weilin-comfyui-form-group"},Nw=["placeholder"],Fw={class:"weilin-comfyui-form-group"},Bw=["placeholder"],Uw={class:"weilin-comfyui-form-group"},zw=["placeholder"],Vw={class:"weilin-comfyui-form-actions"},Ww={key:6},Hw={class:"weilin-comfyui-sponsor-me-settings"},jw={key:7},Gw={class:"weilin-comfyui-start-panel-settings"},nm=Wt({__name:"setting_dialog",emits:["functionTogglesUpdated"],setup(e,{expose:t,emit:n}){const o=n,{t:a}=Yt(),s=S(!1),r=S("translator"),u=S("baidu"),d=S(""),m=S(localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english"),f=S(localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified"),g=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"),O=S(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),M=S(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),V=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),z=S(localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true"),ie=S(localStorage.getItem("weilin_prompt_ui_period_conversion")==="true"),P=S(localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true"),re=S(localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true"),ce=S(localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"),Re=S(localStorage.getItem("weilin_prompt_ui_comma_close_autocomplete")==="true"),Le=S(localStorage.getItem("weilin_prompt_ui_bracket_escape")==="true"),fe=S(localStorage.getItem("weilin_function_toggles_clearAll")!=="false"),xe=S(localStorage.getItem("weilin_function_toggles_deleteButton")!=="false"),ae=S(localStorage.getItem("weilin_function_toggles_randomTag")!=="false"),J=S(localStorage.getItem("weilin_function_toggles_randomTagSettings")!=="false"),se=S(localStorage.getItem("weilin_function_toggles_translateTag")!=="false"),X=S(localStorage.getItem("weilin_function_toggles_clearDisabled")!=="false"),ee=S(""),Ee=S(""),he=S(""),Q=S(0),le=S([]),be=S(!1),we=S({api_key:"",base_url:"https://api.openai.com/v1",model:""}),_e=S(!1),Z=S(-1),W=S("");S(!1),S(!1);const te=S(""),N=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),I=mt=>{r.value=mt,mt==="setting_auto_complete_limit"&&ln()},H=()=>{localStorage.setItem("weilin_prompt_ui_sourceLanguage",m.value),localStorage.setItem("weilin_prompt_ui_targetLanguage",f.value),window.parent.postMessage({type:"weilin_prompt_ui_translate_setting"},"*"),ue({type:"success",str:"message.saveSuccess"})},de=()=>{localStorage.setItem("weilin_function_toggles_clearAll",fe.value),localStorage.setItem("weilin_function_toggles_deleteButton",xe.value),localStorage.setItem("weilin_function_toggles_randomTag",ae.value),localStorage.setItem("weilin_function_toggles_randomTagSettings",J.value),localStorage.setItem("weilin_function_toggles_translateTag",se.value),localStorage.setItem("weilin_function_toggles_clearDisabled",X.value),o("functionTogglesUpdated",{clearAll:fe.value,deleteButton:xe.value,randomTag:ae.value,randomTagSettings:J.value,translateTag:se.value,clearDisabled:X.value}),ue({type:"success",str:"message.saveSuccess"})},Ce=mt=>{const Pe=mt.target.files[0];if(Pe){const Ue=new FileReader;Ue.onload=At=>{O.value=At.target.result,localStorage.setItem("weilin_prompt_ui_customSkinUrl",At.target.result)},Ue.readAsDataURL(Pe)}},Ae=()=>{V.value="#6a11cb",pe.value="#2575fc"},U=()=>{if(g.value<1||w.value<5||b.value<5){ue({type:"warn",str:"message.error"});return}localStorage.setItem("weilin_prompt_ui_floatingBallEnabled",T.value),localStorage.setItem("weilin_prompt_ui_floatingBallCount",g.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",M.value),localStorage.setItem("weilin_prompt_ui_gradientColor1",V.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"},"*"),ue({type:"success",str:"message.saveSuccess"})},k=()=>{localStorage.setItem("weilin_prompt_ui_comma_conversion",z.value),localStorage.setItem("weilin_prompt_ui_period_conversion",ie.value),localStorage.setItem("weilin_prompt_ui_bracket_conversion",P.value),localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion",re.value),localStorage.setItem("weilin_prompt_ui_underscore_to_bracket",ce.value),localStorage.setItem("weilin_prompt_ui_comma_close_autocomplete",Re.value),localStorage.setItem("weilin_prompt_ui_bracket_escape",Le.value),ue({type:"success",str:"message.saveSuccess"})},j=()=>{hl.getUserSetting().then(mt=>{le.value=mt.data.openai_settings,Q.value=mt.data.select_openai})},ne=()=>{we.value={api_key:"",base_url:"https://api.openai.com/v1",model:""},_e.value=!1,be.value=!0},Fe=mt=>{Ji.deleteOpenAiSetting({index:mt}).then(()=>{j(),ue({type:"success",str:"message.deleteSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},Oe=mt=>{Z.value===mt?Z.value=-1:(we.value={...le.value[mt]},Z.value=mt)},ge=mt=>{Ji.updateOpenAiSetting({index:mt,...we.value}).then(()=>{j(),Z.value=-1,ue({type:"success",str:"message.saveSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},$e=()=>{Ji.addOpenAiSetting({...we.value}).then(()=>{j(),be.value=!1,Z.value=-1,ue({type:"success",str:"message.saveSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},Ke=()=>{be.value=!1,Z.value=-1},tt=()=>{Ji.setOpenAiSelect({index:Q.value}).then(()=>{ue({type:"success",str:"message.saveSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},it=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},bt=()=>{hl.startPanel().then(()=>{ue({type:"success",str:"message.startPanelSuccess"})}).catch(()=>{ue({type:"warn",str:"message.startPanelFailed"})})},ct=()=>{so.getTranslateSetting().then(mt=>{localStorage.setItem("weilin_prompt_ui_translater_setting",mt.data),W.value=mt.data}).catch(()=>{ue({type:"warn",str:"message.getTranslaterFail"})})},rn=()=>{so.applyTranslateSetting(W.value).then(mt=>{mt.info==="ok"?(localStorage.setItem("weilin_prompt_ui_translater_setting",W.value),ue({type:"success",str:"message.applyTranslaterSuccess"})):ue({type:"warn",str:"message.applyToTranslaterFail"})}).catch(()=>{ue({type:"warn",str:"message.applyTranslaterFail"})})},Rt=()=>{so.getTranslateBuktSetting().then(mt=>{ee.value=mt.data.translate_service,Ee.value=mt.data.translate_source_lang,he.value=mt.data.translate_target_lang}).catch(()=>{ue({type:"warn",str:"message.getTranslaterFail"})})},In=()=>{so.saveTranslateSetting(ee.value,Ee.value,he.value).then(mt=>{mt.info==="ok"?ue({type:"success",str:"message.saveSuccess"}):ue({type:"warn",str:"message.saveFailed"})}).catch(()=>{ue({type:"warn",str:"message.saveFailed"})})},wn=()=>{so.translaterInputText("",te.value).then(mt=>{N.value=mt.data}).catch(()=>{ue({type:"warn",str:"message.translaterTestFail"})})},Jt=S(null),ln=async()=>{await yc.getAutocompleteLimit().then(mt=>{q.value=mt.data}).catch(mt=>{console.error(mt),ue({type:"warn",str:"message.networkError"})})},Kn=async()=>{await yc.updateAutocompleteLimit(q.value).then(()=>{ue({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(mt=>{console.error(mt),ue({type:"warn",str:"message.networkError"})})},Co=mt=>{const Pe=Xi.find(Ue=>Ue.translator===mt);return Pe?Pe.language:mt};return jt(()=>{Rt(),ct(),j()}),po(()=>{Jt.value&&clearInterval(Jt.value)}),t({open:()=>{r.value="translator",u.value="baidu",d.value="",m.value=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",f.value=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified",g.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",z.value=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",ie.value=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",P.value=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",re.value=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true",ce.value=localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true",Re.value=localStorage.getItem("weilin_prompt_ui_comma_close_autocomplete")==="true",s.value=!0}}),(mt,Pe)=>(C(),Qt(Gs,{modelValue:s.value,"onUpdate:modelValue":Pe[48]||(Pe[48]=Ue=>s.value=Ue),title:v(a)("promptBox.settings.title")},{footer:Ut(()=>[i("button",{onClick:Pe[47]||(Pe[47]=Ue=>s.value=!1)},y(v(a)("promptBox.settings.close")),1)]),default:Ut(()=>[i("div",zb,[i("div",Vb,[i("ul",null,[i("li",{class:We({"weilin-comfyui-active":r.value==="translator"}),onClick:Pe[0]||(Pe[0]=Ue=>I("translator"))},y(v(a)("promptBox.settings.translator")),3),i("li",{class:We({"weilin-comfyui-active":r.value==="setting_function_toggles"}),onClick:Pe[1]||(Pe[1]=Ue=>I("setting_function_toggles"))},y(v(a)("promptBox.settings.setting_function_toggles")),3),i("li",{class:We({"weilin-comfyui-active":r.value==="setting_auto_complete_limit"}),onClick:Pe[2]||(Pe[2]=Ue=>I("setting_auto_complete_limit"))},y(v(a)("promptBox.settings.setting_auto_complete_limit")),3),i("li",{class:We({"weilin-comfyui-active":r.value==="setting_floating_ball"}),onClick:Pe[3]||(Pe[3]=Ue=>I("setting_floating_ball"))},y(v(a)("promptBox.settings.setting_floating_ball")),3),i("li",{class:We({"weilin-comfyui-active":r.value==="setting_prompt_box"}),onClick:Pe[4]||(Pe[4]=Ue=>I("setting_prompt_box"))},y(v(a)("promptBox.settings.setting_prompt_box")),3),i("li",{class:We({"weilin-comfyui-active":r.value==="setting_openai_box"}),onClick:Pe[5]||(Pe[5]=Ue=>I("setting_openai_box"))},y(v(a)("promptBox.settings.setting_openai_box")),3),i("li",{class:We({"weilin-comfyui-active":r.value==="setting_sponsor_me"}),onClick:Pe[6]||(Pe[6]=Ue=>I("setting_sponsor_me"))},y(v(a)("promptBox.settings.setting_sponsor_me")),3)])]),i("div",Wb,[r.value==="translator"?(C(),A("div",Hb,[i("h3",null,y(v(a)("promptBox.settings.translator")),1),i("div",jb,[i("label",null,y(v(a)("promptBox.settings.selectTranslater")),1),Se(i("select",{style:{"margin-left":"10px"},"onUpdate:modelValue":Pe[7]||(Pe[7]=Ue=>W.value=Ue),class:"weilin-comfyui-common-select"},[i("option",Gb,y(v(a)("promptBox.settings.selectOptionPythonTranslater")),1),Pe[49]||(Pe[49]=i("option",{value:"other_ai_plate"},"使用三方AI平台翻译",-1)),Pe[50]||(Pe[50]=i("option",{value:"openai"},"OpenAI API 翻译",-1))],512),[[an,W.value]]),i("button",{class:"weilin-comfyui-install-button",onClick:rn},y(v(a)("promptBox.settings.apply")),1)]),i("div",qb,[W.value=="other_ai_plate"?(C(),A("div",Yb,[at(Ub)])):Ie("",!0),W.value=="network"?(C(),A("div",Kb,[i("div",Jb,y(v(a)("promptBox.settings.selectOptionNetworkTranslaterTitle")),1),i("div",Xb,y(v(a)("promptBox.settings.selectOptionNetworkTranslaterInfo"))+":https://github.com/xnx3/translate ",1),i("div",Qb,[i("label",null,y(v(a)("promptBox.settings.sourceLanguage")),1),Se(i("select",{"onUpdate:modelValue":Pe[8]||(Pe[8]=Ue=>m.value=Ue),class:"weilin-comfyui-common-select"},[i("option",Zb,y(v(a)("promptBox.settings.auto_detect")),1),i("option",e4,y(v(a)("promptBox.settings.chinese_simplified")),1),i("option",t4,y(v(a)("promptBox.settings.english")),1)],512),[[an,m.value]])]),i("div",n4,[i("label",null,y(v(a)("promptBox.settings.targetLanguage")),1),Se(i("select",{"onUpdate:modelValue":Pe[9]||(Pe[9]=Ue=>f.value=Ue),class:"weilin-comfyui-common-select"},[i("option",o4,y(v(a)("promptBox.settings.chinese_simplified")),1),i("option",a4,y(v(a)("promptBox.settings.english")),1)],512),[[an,f.value]])]),i("button",{class:"weilin-comfyui-save-button",onClick:H},y(v(a)("promptBox.settings.save")),1)])):Ie("",!0),W.value=="translater"?(C(),A("div",s4,[i("div",i4,y(v(a)("promptBox.settings.selectOptionPythonTranslaterTitle")),1),i("div",r4,[i("div",l4,y(v(a)("promptBox.settings.translaterSetting")),1),i("div",u4,[i("label",null,y(v(a)("promptBox.settings.chooseTranslaterSetting")),1),Se(i("select",{"onUpdate:modelValue":Pe[10]||(Pe[10]=Ue=>ee.value=Ue)},[(C(!0),A(qe,null,ot(v(yb),(Ue,At)=>(C(),A("option",{index:At,key:"tran-item_"+At,value:Ue},y(v(a)("translaterService."+Ue)),9,c4))),128))],512),[[an,ee.value]])]),i("div",d4,[i("div",p4,[i("label",null,y(v(a)("promptBox.settings.translaterLangSourceSetting")),1),Se(i("select",{"onUpdate:modelValue":Pe[11]||(Pe[11]=Ue=>Ee.value=Ue)},[(C(!0),A(qe,null,ot(v(Xi),(Ue,At)=>(C(),A("option",{index:At,key:"lan-item_"+At,value:Ue.translator},y(v(a)("translaterLanguage."+Ue.language)),9,f4))),128))],512),[[an,Ee.value]])]),i("div",g4,[i("label",null,y(v(a)("promptBox.settings.translaterLangTargeSetting")),1),Se(i("select",{"onUpdate:modelValue":Pe[12]||(Pe[12]=Ue=>he.value=Ue)},[(C(!0),A(qe,null,ot(v(Xi),(Ue,At)=>(C(),A("option",{index:At,key:"lan-mu-item_"+At,value:Ue.translator},y(v(a)("translaterLanguage."+Ue.language)),9,m4))),128))],512),[[an,he.value]])])]),i("button",{class:"weilin-comfyui-install-button",onClick:In},y(v(a)("promptBox.settings.saveTranslaterSetting")),1)]),i("div",h4,[i("div",v4,y(v(a)("promptBox.settings.testTranslaterTitle")),1),i("div",_4,[i("label",null,y(v(a)("promptBox.settings.inputTestTranslater"))+" - "+y(v(a)("translaterLanguage."+Co(he.value))),1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[13]||(Pe[13]=Ue=>te.value=Ue),placeholder:v(a)("promptBox.settings.inputTestTranslaterPlaceholder")},null,8,y4),[[ze,te.value]])]),i("div",b4,[i("label",null,y(v(a)("promptBox.settings.outPutTestTranslater"))+" - "+y(v(a)("translaterLanguage."+Co(Ee.value))),1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[14]||(Pe[14]=Ue=>N.value=Ue),readonly:"",placeholder:v(a)("promptBox.settings.outPutTestTranslaterPlaceholder")},null,8,w4),[[ze,N.value]])]),i("button",{class:"weilin-comfyui-install-button",onClick:wn},y(v(a)("promptBox.settings.testingTranslater")),1)])])):Ie("",!0)])])):Ie("",!0),r.value==="setting_auto_complete_limit"?(C(),A("div",x4,[i("h3",null,y(v(a)("promptBox.settings.setting_auto_complete_limit")),1),i("div",S4,[i("div",T4,[i("label",null,y(v(a)("promptBox.settings.show_auto_limit")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[15]||(Pe[15]=Ue=>q.value=Ue),min:"1",max:"99999999",style:{width:"100px"},placeholder:v(a)("promptBox.settings.showAutoLimitPlaceholder")},null,8,k4),[[ze,q.value,void 0,{number:!0}]])]),i("div",C4,[i("label",null,y(v(a)("promptBox.settings.settingAutoCompleteWidth")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[16]||(Pe[16]=Ue=>Y.value=Ue),min:"5",style:{width:"100px"},placeholder:v(a)("promptBox.settings.settingAutoCompleteWidthPlaceholder")},null,8,E4),[[ze,Y.value,void 0,{number:!0}]])]),i("div",$4,[i("label",null,y(v(a)("promptBox.settings.settingAutoCompleteHeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[17]||(Pe[17]=Ue=>$.value=Ue),min:"5",style:{width:"100px"},placeholder:v(a)("promptBox.settings.settingAutoCompleteHeightPlaceholder")},null,8,I4),[[ze,$.value,void 0,{number:!0}]])]),i("button",{class:"weilin-comfyui-save-button",onClick:Kn},y(v(a)("promptBox.settings.save")),1)])])):Ie("",!0),r.value==="setting_function_toggles"?(C(),A("div",A4,[i("h3",null,y(v(a)("promptBox.settings.setting_function_toggles_full")),1),i("div",L4,[i("div",M4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[18]||(Pe[18]=Ue=>fe.value=Ue)},null,512),[[on,fe.value]]),ut(" "+y(v(a)("promptBox.settings.enableClearAll")),1)])]),i("div",D4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[19]||(Pe[19]=Ue=>xe.value=Ue)},null,512),[[on,xe.value]]),ut(" "+y(v(a)("promptBox.settings.enableDeleteButton")),1)])]),i("div",O4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[20]||(Pe[20]=Ue=>ae.value=Ue)},null,512),[[on,ae.value]]),ut(" "+y(v(a)("promptBox.settings.enableRandomTag")),1)])]),i("div",R4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[21]||(Pe[21]=Ue=>J.value=Ue)},null,512),[[on,J.value]]),ut(" "+y(v(a)("promptBox.settings.enableRandomTagSettings")),1)])]),i("div",P4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[22]||(Pe[22]=Ue=>se.value=Ue)},null,512),[[on,se.value]]),ut(" "+y(v(a)("promptBox.settings.enableTranslateTag")),1)])]),i("div",N4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[23]||(Pe[23]=Ue=>X.value=Ue)},null,512),[[on,X.value]]),ut(" "+y(v(a)("promptBox.settings.enableClearDisabled")),1)])]),i("button",{class:"weilin-comfyui-save-button",onClick:de},y(v(a)("promptBox.settings.save")),1)])])):Ie("",!0),r.value==="setting_floating_ball"?(C(),A("div",F4,[i("h3",null,y(v(a)("promptBox.settings.setting_floating_ball")),1),i("div",B4,[i("div",U4,[i("div",z4,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[24]||(Pe[24]=Ue=>T.value=Ue)},null,512),[[on,T.value]]),ut(" "+y(v(a)("promptBox.settings.enableFloatingBall")),1)])]),i("div",V4,[i("label",null,y(v(a)("promptBox.settings.floatingBallCount")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[25]||(Pe[25]=Ue=>g.value=Ue),min:"1",max:"100",placeholder:v(a)("promptBox.settings.floatingBallCountPlaceholder")},null,8,W4),[[ze,g.value,void 0,{number:!0}]])]),i("div",H4,[i("label",null,y(v(a)("promptBox.settings.floatingBallSize")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[26]||(Pe[26]=Ue=>w.value=Ue),min:"5",max:"999999",placeholder:v(a)("promptBox.settings.floatingBallSizePlaceholder")},null,8,j4),[[ze,w.value,void 0,{number:!0}]])]),i("div",G4,[i("label",null,y(v(a)("promptBox.settings.floatingBallHeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[27]||(Pe[27]=Ue=>b.value=Ue),min:"5",max:"999999",placeholder:v(a)("promptBox.settings.floatingBallHeightPlaceholder")},null,8,q4),[[ze,b.value,void 0,{number:!0}]])])]),i("div",Y4,[i("div",K4,[i("label",null,y(v(a)("promptBox.settings.skinSetting")),1),Se(i("select",{"onUpdate:modelValue":Pe[28]||(Pe[28]=Ue=>E.value=Ue)},[i("option",J4,y(v(a)("promptBox.settings.defaultSkin")),1),i("option",X4,y(v(a)("promptBox.settings.customSkin")),1)],512),[[an,E.value]])]),E.value==="custom"?(C(),A("div",Q4,[i("label",null,y(v(a)("promptBox.settings.uploadSkin")),1),i("input",{type:"file",accept:"image/*",onChange:Ce,ref:"skinUploader"},null,544),O.value?(C(),A("div",Z4,[i("img",{src:O.value,alt:"Custom Skin Preview"},null,8,ew)])):Ie("",!0)])):Ie("",!0)]),i("div",tw,[i("label",null,y(v(a)("promptBox.settings.bgSetting")),1),Se(i("select",{"onUpdate:modelValue":Pe[29]||(Pe[29]=Ue=>M.value=Ue)},[i("option",nw,y(v(a)("promptBox.settings.gradientBg")),1),i("option",ow,y(v(a)("promptBox.settings.transparentBg")),1)],512),[[an,M.value]])]),M.value==="gradient"?(C(),A("div",aw,[i("label",null,y(v(a)("promptBox.settings.gradientColor")),1),i("div",sw,[Se(i("input",{type:"color","onUpdate:modelValue":Pe[30]||(Pe[30]=Ue=>V.value=Ue)},null,512),[[ze,V.value]]),Se(i("input",{type:"color","onUpdate:modelValue":Pe[31]||(Pe[31]=Ue=>pe.value=Ue)},null,512),[[ze,pe.value]]),i("button",{onClick:Ae,style:{"margin-left":"10px",width:"200px"}},y(v(a)("promptBox.settings.resetToDefault")),1)])])):Ie("",!0),i("div",iw,[i("label",null,y(v(a)("promptBox.settings.borderRadius")),1),Se(i("input",{type:"number","onUpdate:modelValue":Pe[32]||(Pe[32]=Ue=>D.value=Ue),min:"0",max:"50"},null,512),[[ze,D.value,void 0,{number:!0}]])]),i("button",{class:"weilin-comfyui-save-button",style:{"grid-column":"span 2"},onClick:U},y(v(a)("promptBox.settings.save")),1)])])):Ie("",!0),r.value==="setting_prompt_box"?(C(),A("div",rw,[i("h3",null,y(v(a)("promptBox.settings.setting_prompt_box")),1),i("div",lw,[i("div",uw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[33]||(Pe[33]=Ue=>z.value=Ue)},null,512),[[on,z.value]]),ut(" "+y(v(a)("promptBox.settings.enableCommaConversion")),1)])]),i("div",cw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[34]||(Pe[34]=Ue=>ie.value=Ue)},null,512),[[on,ie.value]]),ut(" "+y(v(a)("promptBox.settings.enablePeriodConversion")),1)])]),i("div",dw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[35]||(Pe[35]=Ue=>P.value=Ue)},null,512),[[on,P.value]]),ut(" "+y(v(a)("promptBox.settings.enableBracketConversion")),1)])]),i("div",pw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[36]||(Pe[36]=Ue=>re.value=Ue)},null,512),[[on,re.value]]),ut(" "+y(v(a)("promptBox.settings.enableAngleBracketConversion")),1)])]),i("div",fw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[37]||(Pe[37]=Ue=>ce.value=Ue)},null,512),[[on,ce.value]]),ut(" "+y(v(a)("promptBox.settings.enableUnderscoreToBracket")),1)])]),i("div",gw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[38]||(Pe[38]=Ue=>Re.value=Ue)},null,512),[[on,Re.value]]),ut(" "+y(v(a)("promptBox.settings.enableCommaCloseAutocomplete")),1)])]),i("div",mw,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":Pe[39]||(Pe[39]=Ue=>Le.value=Ue)},null,512),[[on,Le.value]]),ut(" "+y(v(a)("promptBox.settings.enableBracketEscape")),1)])]),i("button",{class:"weilin-comfyui-save-button",onClick:k},y(v(a)("promptBox.settings.save")),1)])])):Ie("",!0),r.value==="setting_openai_box"?(C(),A("div",hw,[i("h3",null,y(v(a)("promptBox.settings.openaiSettings")),1),i("div",vw,[i("div",_w,[i("label",null,y(v(a)("promptBox.settings.selectedOpenaiConfig")),1),Se(i("select",{"onUpdate:modelValue":Pe[40]||(Pe[40]=Ue=>Q.value=Ue),onChange:tt},[(C(!0),A(qe,null,ot(le.value,(Ue,At)=>(C(),A("option",{key:At,value:At},y(Ue.model)+" ("+y(Ue.base_url)+") ",9,yw))),128))],544),[[an,Q.value]])]),i("div",bw,[(C(!0),A(qe,null,ot(le.value,(Ue,At)=>(C(),A("div",{key:At,class:"weilin-comfyui-config-item"},[i("div",ww,[i("span",null,y(Ue.model),1),i("div",xw,[i("button",{onClick:Xt=>Oe(At)},y(Z.value===At?v(a)("promptBox.settings.cancel"):v(a)("promptBox.settings.edit")),9,Sw),i("button",{onClick:Xt=>Fe(At)},y(v(a)("promptBox.settings.delete")),9,Tw)])]),Z.value===At?(C(),A("div",kw,[i("div",Cw,[i("label",null,y(v(a)("promptBox.settings.openai_api_key"))+":",1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[41]||(Pe[41]=Xt=>we.value.api_key=Xt),placeholder:v(a)("promptBox.settings.openai_api_key_placeholder")},null,8,Ew),[[ze,we.value.api_key]])]),i("div",$w,[i("label",null,y(v(a)("promptBox.settings.openai_base_url"))+":",1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[42]||(Pe[42]=Xt=>we.value.base_url=Xt),placeholder:v(a)("promptBox.settings.openai_base_url_placeholder")},null,8,Iw),[[ze,we.value.base_url]])]),i("div",Aw,[i("label",null,y(v(a)("promptBox.settings.openai_model"))+":",1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[43]||(Pe[43]=Xt=>we.value.model=Xt),placeholder:v(a)("promptBox.settings.openai_model_placeholder")},null,8,Lw),[[ze,we.value.model]])]),i("div",Mw,[i("button",{onClick:Xt=>ge(At)},y(v(a)("promptBox.settings.save")),9,Dw)])])):(C(),A("div",Ow,[i("div",null,y(v(a)("promptBox.settings.openai_api_key"))+": "+y(Ue.api_key?"******":v(a)("promptBox.settings.not_set")),1),i("div",null,y(v(a)("promptBox.settings.openai_base_url"))+": "+y(Ue.base_url),1)]))]))),128))]),be.value?(C(),A("div",Rw,[i("div",Pw,[i("label",null,y(v(a)("promptBox.settings.openai_api_key"))+":",1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[44]||(Pe[44]=Ue=>we.value.api_key=Ue),placeholder:v(a)("promptBox.settings.openai_api_key_placeholder")},null,8,Nw),[[ze,we.value.api_key]])]),i("div",Fw,[i("label",null,y(v(a)("promptBox.settings.openai_base_url"))+":",1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[45]||(Pe[45]=Ue=>we.value.base_url=Ue),placeholder:v(a)("promptBox.settings.openai_base_url_placeholder")},null,8,Bw),[[ze,we.value.base_url]])]),i("div",Uw,[i("label",null,y(v(a)("promptBox.settings.openai_model"))+":",1),Se(i("input",{type:"text","onUpdate:modelValue":Pe[46]||(Pe[46]=Ue=>we.value.model=Ue),placeholder:v(a)("promptBox.settings.openai_model_placeholder")},null,8,zw),[[ze,we.value.model]])]),i("div",Vw,[i("button",{onClick:Ke},y(v(a)("promptBox.settings.cancel")),1),i("button",{onClick:$e},y(v(a)("promptBox.settings.save")),1)])])):Ie("",!0),be.value?Ie("",!0):(C(),A("button",{key:1,class:"weilin-comfyui-add-button",onClick:ne},y(v(a)("promptBox.settings.addNewConfig")),1))])])):Ie("",!0),r.value==="setting_sponsor_me"?(C(),A("div",Ww,[i("h3",null,y(v(a)("promptBox.settings.setting_sponsor_me")),1),i("div",Hw,[i("h1",null,y(v(a)("promptBox.settings.sponsorMeTip")),1),i("h2",null,y(v(a)("promptBox.settings.sponsorMeLink")),1),i("button",{class:"weilin-comfyui-sponsor-me-button",onClick:it},y(v(a)("promptBox.settings.sponsorMe")),1)])])):Ie("",!0),r.value==="setting_start_panel"?(C(),A("div",jw,[i("h3",null,y(v(a)("promptBox.settings.setting_start_panel")),1),i("div",Gw,[i("h4",null,y(v(a)("promptBox.settings.startPanelTip")),1),i("button",{class:"weilin-comfyui-start-panel-button",onClick:bt},y(v(a)("promptBox.settings.startPanel")),1)])])):Ie("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-067a4b09"]]),qw=["title"],Yw={class:"switch-icon"},Kw={key:0,class:"moon",viewBox:"0 0 24 24"},Jw={key:1,class:"sun",viewBox:"0 0 24 24"},Xw="weilin_tools_",Qw=Wt({__name:"ThemeSwitch",setup(e){const{t}=Yt(),n=`${Xw}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,r)=>(C(),A("button",{class:"theme-switch",onClick:a,title:v(t)("theme.toggle")},[i("div",Yw,[o.value?(C(),A("svg",Kw,r[0]||(r[0]=[i("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)]))):(C(),A("svg",Jw,r[1]||(r[1]=[i("circle",{cx:"12",cy:"12",r:"5"},null,-1),i("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)])))]),Ei(s.$slots,"default",{isDark:o.value},void 0,!0)],8,qw))}},[["__scopeId","data-v-687d9c9d"]]),io="weilin_tools_",ya={categories:null,subCategories:{},tags:{},lastUpdated:0},Zw=5*60*1e3,ro=()=>{ya.categories=null,ya.subCategories={},ya.tags={},ya.lastUpdated=0},Ot={getTagsList:async e=>{const t=localStorage.getItem(`${io}userLocale`)||"zh_CN",n=Date.now();if(ya.categories&&n-ya.lastUpdated<Zw)return ya.categories;const o=await Ye({url:"/prompt/get_group_tags",method:"get",params:{...e,lang:t}});return ya.categories=o,ya.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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 ro(),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 vl="0123456789abcdef";class _s{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new _s(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 _s(s)}static parse(t){var n,o,a,s;let r;switch(t.length){case 32:r=(n=/^[0-9a-f]{32}$/i.exec(t))===null||n===void 0?void 0:n[0];break;case 36:r=(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:r=(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:r=(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(r){const u=new Uint8Array(16);for(let d=0;d<16;d+=4){const m=parseInt(r.substring(2*d,2*d+8),16);u[d+0]=m>>>24,u[d+1]=m>>>16,u[d+2]=m>>>8,u[d+3]=m}return new _s(u)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let n=0;n<this.bytes.length;n++)t+=vl.charAt(this.bytes[n]>>>4),t+=vl.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+=vl.charAt(this.bytes[n]>>>4),t+=vl.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 _s(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 e3{constructor(t){this.timestamp=0,this.counter=0,this.random=t??t3()}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 _s.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,_s.ofInner(t)}}const t3=()=>{if(typeof crypto<"u"&&typeof crypto.getRandomValues<"u")return new n3;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 n3{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 om;const za=()=>o3().toString(),o3=()=>(om||(om=new e3)).generate(),a3={class:"tag-manager"},s3={class:"category-tabs"},i3={class:"tabs-wrapper primary-tabs"},r3={class:"tabs-scroll"},l3=["onClick"],u3={class:"tab-text"},c3={key:0,class:"tabs-wrapper group-tabs"},d3={class:"tabs-scroll"},p3=["onClick"],f3={class:"tab-text"},am=Wt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=n,s=S([]),r=S(null),u=S(null),d=S([]),m=S(!1),f=S(!1),g=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},w=async()=>{try{const V=await Ot.getTagsGroupList();if(s.value=V.info,u.value){const pe=s.value.flatMap(D=>D.groups).find(D=>D.p_uuid===u.value.p_uuid);pe?u.value=pe:u.value=null}if(r.value){const pe=s.value.find(D=>D.p_uuid===r.value.p_uuid);pe?r.value=pe:r.value=null}}catch(V){console.error("获取标签列表失败:",V)}},b=V=>{if(!V||V==="transparent")return"var(--primary-text)";let pe,D,z,ie=1;if(V.startsWith("rgba")){const re=V.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);re&&([,pe,D,z,ie]=re.map(Number))}else if(V.startsWith("rgb")){const re=V.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);re&&([,pe,D,z]=re.map(Number))}return ie<.5?"var(--primary-text)":(pe*299+D*587+z*114)/1e3>128?"#000000":"#ffffff"};jt(()=>{window.addEventListener("message",O)}),Aa(()=>{window.removeEventListener("message",O)});const T=V=>{r.value=V,u.value=null,m.value=!1,d.value=[]},E=V=>{u.value=V,m.value=!1,d.value=[]},O=V=>{!V.data||!V.data.type||V.data.type.startsWith("weilin_prompt_ui_")&&V.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&w()},M=()=>{if(u.value===null||r.value===null){ue({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{group:r.value,sub:u.value}),f.value=!1};return t({open:()=>{g(),f.value=!0}}),(V,pe)=>(C(),Qt(Gs,{modelValue:f.value,"onUpdate:modelValue":pe[1]||(pe[1]=D=>f.value=D),title:v(o)("importDialog.selectTitle")},{footer:Ut(()=>[i("button",{onClick:pe[0]||(pe[0]=D=>f.value=!1)},y(v(o)("promptBox.settings.close")),1),i("button",{onClick:M},y(v(o)("importDialog.sureSelect")),1)]),default:Ut(()=>[i("div",a3,[i("div",s3,[i("div",i3,[i("div",r3,[(C(!0),A(qe,null,ot(s.value,(D,z)=>{var ie,P,re;return C(),A("div",{key:"Tabss-"+z,class:We(["tab-item",{active:((ie=r.value)==null?void 0:ie.name)===D.name}]),style:Ft({backgroundColor:((P=r.value)==null?void 0:P.name)===D.name?"var(--primary-color)":D.color,color:((re=r.value)==null?void 0:re.name)===D.name?"#ffffff":b(D.color)}),onClick:ce=>T(D)},[i("span",u3,y(D.name),1)],14,l3)}),128))])]),r.value?(C(),A("div",c3,[i("div",d3,[(C(!0),A(qe,null,ot(r.value.groups,(D,z)=>{var ie,P,re;return C(),A("div",{key:"TabsSw-"+z,class:We(["tab-item",{active:((ie=u.value)==null?void 0:ie.name)===D.name}]),style:Ft({backgroundColor:((P=u.value)==null?void 0:P.name)===D.name?"var(--primary-color)":D.color,color:((re=u.value)==null?void 0:re.name)===D.name?"#ffffff":b(D.color)}),onClick:ce=>E(D)},[i("span",f3,y(D.name),1)],14,p3)}),128))])])):Ie("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-d1f6a811"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function sm(e){return typeof e>"u"||e===null}function g3(e){return typeof e=="object"&&e!==null}function m3(e){return Array.isArray(e)?e:sm(e)?[]:[e]}function h3(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 v3(e,t){var n="",o;for(o=0;o<t;o+=1)n+=e;return n}function _3(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var y3=sm,b3=g3,w3=m3,x3=v3,S3=_3,T3=h3,Cn={isNothing:y3,isObject:b3,toArray:w3,repeat:x3,isNegativeZero:S3,extend:T3};function im(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 Qi(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=im(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Qi.prototype=Object.create(Error.prototype),Qi.prototype.constructor=Qi,Qi.prototype.toString=function(t){return this.name+": "+im(this,t)};var qn=Qi;function wc(e,t,n,o,a){var s="",r="",u=Math.floor(a/2)-1;return o-t>u&&(s=" ... ",t=o-u+s.length),n-o>u&&(r=" ...",n=o+u-r.length),{str:s+e.slice(t,n).replace(/\t/g,"→")+r,pos:o-t+s.length}}function xc(e,t){return Cn.repeat(" ",t-e.length)+e}function k3(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,r=-1;s=n.exec(e.buffer);)a.push(s.index),o.push(s.index+s[0].length),e.position<=s.index&&r<0&&(r=o.length-2);r<0&&(r=o.length-1);var u="",d,m,f=Math.min(e.line+t.linesAfter,a.length).toString().length,g=t.maxLength-(t.indent+f+3);for(d=1;d<=t.linesBefore&&!(r-d<0);d++)m=wc(e.buffer,o[r-d],a[r-d],e.position-(o[r]-o[r-d]),g),u=Cn.repeat(" ",t.indent)+xc((e.line-d+1).toString(),f)+" | "+m.str+`
`+u;for(m=wc(e.buffer,o[r],a[r],e.position,g),u+=Cn.repeat(" ",t.indent)+xc((e.line+1).toString(),f)+" | "+m.str+`
`,u+=Cn.repeat("-",t.indent+f+3+m.pos)+`^
`,d=1;d<=t.linesAfter&&!(r+d>=a.length);d++)m=wc(e.buffer,o[r+d],a[r+d],e.position-(o[r]-o[r+d]),g),u+=Cn.repeat(" ",t.indent)+xc((e.line+d+1).toString(),f)+" | "+m.str+`
`;return u.replace(/\n$/,"")}var C3=k3,E3=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],$3=["scalar","sequence","mapping"];function I3(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(o){t[String(o)]=n})}),t}function A3(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(E3.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=I3(t.styleAliases||null),$3.indexOf(this.kind)===-1)throw new qn('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ln=A3;function rm(e,t){var n=[];return e[t].forEach(function(o){var a=n.length;n.forEach(function(s,r){s.tag===o.tag&&s.kind===o.kind&&s.multi===o.multi&&(a=r)}),n[a]=o}),n}function L3(){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 Sc(e){return this.extend(e)}Sc.prototype.extend=function(t){var n=[],o=[];if(t instanceof Ln)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 Ln))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 Ln))throw new qn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Sc.prototype);return a.implicit=(this.implicit||[]).concat(n),a.explicit=(this.explicit||[]).concat(o),a.compiledImplicit=rm(a,"implicit"),a.compiledExplicit=rm(a,"explicit"),a.compiledTypeMap=L3(a.compiledImplicit,a.compiledExplicit),a};var lm=Sc,um=new Ln("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),cm=new Ln("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),dm=new Ln("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),pm=new lm({explicit:[um,cm,dm]});function M3(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function D3(){return null}function O3(e){return e===null}var fm=new Ln("tag:yaml.org,2002:null",{kind:"scalar",resolve:M3,construct:D3,predicate:O3,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function R3(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 P3(e){return e==="true"||e==="True"||e==="TRUE"}function N3(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var gm=new Ln("tag:yaml.org,2002:bool",{kind:"scalar",resolve:R3,construct:P3,predicate:N3,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 F3(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function B3(e){return 48<=e&&e<=55}function U3(e){return 48<=e&&e<=57}function z3(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(!F3(e.charCodeAt(n)))return!1;o=!0}return o&&a!=="_"}if(a==="o"){for(n++;n<t;n++)if(a=e[n],a!=="_"){if(!B3(e.charCodeAt(n)))return!1;o=!0}return o&&a!=="_"}}if(a==="_")return!1;for(;n<t;n++)if(a=e[n],a!=="_"){if(!U3(e.charCodeAt(n)))return!1;o=!0}return!(!o||a==="_")}function V3(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 W3(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Cn.isNegativeZero(e)}var mm=new Ln("tag:yaml.org,2002:int",{kind:"scalar",resolve:z3,construct:V3,predicate:W3,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"]}}),H3=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function j3(e){return!(e===null||!H3.test(e)||e[e.length-1]==="_")}function G3(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 q3=/^[-+]?[0-9]+e/;function Y3(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(Cn.isNegativeZero(e))return"-0.0";return n=e.toString(10),q3.test(n)?n.replace("e",".e"):n}function K3(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Cn.isNegativeZero(e))}var hm=new Ln("tag:yaml.org,2002:float",{kind:"scalar",resolve:j3,construct:G3,predicate:K3,represent:Y3,defaultStyle:"lowercase"}),vm=pm.extend({implicit:[fm,gm,mm,hm]}),_m=vm,ym=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),bm=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 J3(e){return e===null?!1:ym.exec(e)!==null||bm.exec(e)!==null}function X3(e){var t,n,o,a,s,r,u,d=0,m=null,f,g,w;if(t=ym.exec(e),t===null&&(t=bm.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],r=+t[5],u=+t[6],t[7]){for(d=t[7].slice(0,3);d.length<3;)d+="0";d=+d}return t[9]&&(f=+t[10],g=+(t[11]||0),m=(f*60+g)*6e4,t[9]==="-"&&(m=-m)),w=new Date(Date.UTC(n,o,a,s,r,u,d)),m&&w.setTime(w.getTime()-m),w}function Q3(e){return e.toISOString()}var wm=new Ln("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J3,construct:X3,instanceOf:Date,represent:Q3});function Z3(e){return e==="<<"||e===null}var xm=new Ln("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Z3}),Tc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function e5(e){if(e===null)return!1;var t,n,o=0,a=e.length,s=Tc;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 t5(e){var t,n,o=e.replace(/[\r\n=]/g,""),a=o.length,s=Tc,r=0,u=[];for(t=0;t<a;t++)t%4===0&&t&&(u.push(r>>16&255),u.push(r>>8&255),u.push(r&255)),r=r<<6|s.indexOf(o.charAt(t));return n=a%4*6,n===0?(u.push(r>>16&255),u.push(r>>8&255),u.push(r&255)):n===18?(u.push(r>>10&255),u.push(r>>2&255)):n===12&&u.push(r>>4&255),new Uint8Array(u)}function n5(e){var t="",n=0,o,a,s=e.length,r=Tc;for(o=0;o<s;o++)o%3===0&&o&&(t+=r[n>>18&63],t+=r[n>>12&63],t+=r[n>>6&63],t+=r[n&63]),n=(n<<8)+e[o];return a=s%3,a===0?(t+=r[n>>18&63],t+=r[n>>12&63],t+=r[n>>6&63],t+=r[n&63]):a===2?(t+=r[n>>10&63],t+=r[n>>4&63],t+=r[n<<2&63],t+=r[64]):a===1&&(t+=r[n>>2&63],t+=r[n<<4&63],t+=r[64],t+=r[64]),t}function o5(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Sm=new Ln("tag:yaml.org,2002:binary",{kind:"scalar",resolve:e5,construct:t5,predicate:o5,represent:n5}),a5=Object.prototype.hasOwnProperty,s5=Object.prototype.toString;function i5(e){if(e===null)return!0;var t=[],n,o,a,s,r,u=e;for(n=0,o=u.length;n<o;n+=1){if(a=u[n],r=!1,s5.call(a)!=="[object Object]")return!1;for(s in a)if(a5.call(a,s))if(!r)r=!0;else return!1;if(!r)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function r5(e){return e!==null?e:[]}var Tm=new Ln("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i5,construct:r5}),l5=Object.prototype.toString;function u5(e){if(e===null)return!0;var t,n,o,a,s,r=e;for(s=new Array(r.length),t=0,n=r.length;t<n;t+=1){if(o=r[t],l5.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;s[t]=[a[0],o[a[0]]]}return!0}function c5(e){if(e===null)return[];var t,n,o,a,s,r=e;for(s=new Array(r.length),t=0,n=r.length;t<n;t+=1)o=r[t],a=Object.keys(o),s[t]=[a[0],o[a[0]]];return s}var km=new Ln("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:u5,construct:c5}),d5=Object.prototype.hasOwnProperty;function p5(e){if(e===null)return!0;var t,n=e;for(t in n)if(d5.call(n,t)&&n[t]!==null)return!1;return!0}function f5(e){return e!==null?e:{}}var Cm=new Ln("tag:yaml.org,2002:set",{kind:"mapping",resolve:p5,construct:f5}),kc=_m.extend({implicit:[wm,xm],explicit:[Sm,Tm,km,Cm]}),Va=Object.prototype.hasOwnProperty,_l=1,Em=2,$m=3,yl=4,Cc=1,g5=2,Im=3,m5=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,h5=/[\x85\u2028\u2029]/,v5=/[,\[\]\{\}]/,Am=/^(?:!|!!|![a-z\-]+!)$/i,Lm=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Mm(e){return Object.prototype.toString.call(e)}function Yo(e){return e===10||e===13}function ys(e){return e===9||e===32}function lo(e){return e===9||e===32||e===10||e===13}function qs(e){return e===44||e===91||e===93||e===123||e===125}function _5(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function y5(e){return e===120?2:e===117?4:e===85?8:0}function b5(e){return 48<=e&&e<=57?e-48:-1}function Dm(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 w5(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Om=new Array(256),Rm=new Array(256),Ys=0;Ys<256;Ys++)Om[Ys]=Dm(Ys)?1:0,Rm[Ys]=Dm(Ys);function x5(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||kc,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 Pm(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=C3(n),new qn(t,n)}function lt(e,t){throw Pm(e,t)}function bl(e,t){e.onWarning&&e.onWarning.call(null,Pm(e,t))}var Nm={YAML:function(t,n,o){var a,s,r;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),r=parseInt(a[2],10),s!==1&&lt(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=r<2,r!==1&&r!==2&&bl(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],Am.test(a)||lt(t,"ill-formed tag handle (first argument) of the TAG directive"),Va.call(t.tagMap,a)&&lt(t,'there is a previously declared suffix for "'+a+'" tag handle'),Lm.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 Wa(e,t,n,o){var a,s,r,u;if(t<n){if(u=e.input.slice(t,n),o)for(a=0,s=u.length;a<s;a+=1)r=u.charCodeAt(a),r===9||32<=r&&r<=1114111||lt(e,"expected valid JSON character");else m5.test(u)&&lt(e,"the stream contains non-printable characters");e.result+=u}}function Fm(e,t,n,o){var a,s,r,u;for(Cn.isObject(n)||lt(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(n),r=0,u=a.length;r<u;r+=1)s=a[r],Va.call(t,s)||(t[s]=n[s],o[s]=!0)}function Ks(e,t,n,o,a,s,r,u,d){var m,f;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),m=0,f=a.length;m<f;m+=1)Array.isArray(a[m])&&lt(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Mm(a[m])==="[object Object]"&&(a[m]="[object Object]");if(typeof a=="object"&&Mm(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(m=0,f=s.length;m<f;m+=1)Fm(e,t,s[m],n);else Fm(e,t,s,n);else!e.json&&!Va.call(n,a)&&Va.call(t,a)&&(e.line=r||e.line,e.lineStart=u||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 Ec(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 yn(e,t,n){for(var o=0,a=e.input.charCodeAt(e.position);a!==0;){for(;ys(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(Yo(a))for(Ec(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&&bl(e,"deficient indentation"),o}function wl(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||lo(n)))}function $c(e,t){t===1?e.result+=" ":t>1&&(e.result+=Cn.repeat(`
`,t-1))}function S5(e,t,n){var o,a,s,r,u,d,m,f,g=e.kind,w=e.result,b;if(b=e.input.charCodeAt(e.position),lo(b)||qs(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),lo(a)||n&&qs(a)))return!1;for(e.kind="scalar",e.result="",s=r=e.position,u=!1;b!==0;){if(b===58){if(a=e.input.charCodeAt(e.position+1),lo(a)||n&&qs(a))break}else if(b===35){if(o=e.input.charCodeAt(e.position-1),lo(o))break}else{if(e.position===e.lineStart&&wl(e)||n&&qs(b))break;if(Yo(b))if(d=e.line,m=e.lineStart,f=e.lineIndent,yn(e,!1,-1),e.lineIndent>=t){u=!0,b=e.input.charCodeAt(e.position);continue}else{e.position=r,e.line=d,e.lineStart=m,e.lineIndent=f;break}}u&&(Wa(e,s,r,!1),$c(e,e.line-d),s=r=e.position,u=!1),ys(b)||(r=e.position+1),b=e.input.charCodeAt(++e.position)}return Wa(e,s,r,!1),e.result?!0:(e.kind=g,e.result=w,!1)}function T5(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(Wa(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 Yo(n)?(Wa(e,o,a,!0),$c(e,yn(e,!1,t)),o=a=e.position):e.position===e.lineStart&&wl(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 k5(e,t){var n,o,a,s,r,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return Wa(e,n,e.position,!0),e.position++,!0;if(u===92){if(Wa(e,n,e.position,!0),u=e.input.charCodeAt(++e.position),Yo(u))yn(e,!1,t);else if(u<256&&Om[u])e.result+=Rm[u],e.position++;else if((r=y5(u))>0){for(a=r,s=0;a>0;a--)u=e.input.charCodeAt(++e.position),(r=_5(u))>=0?s=(s<<4)+r:lt(e,"expected hexadecimal character");e.result+=w5(s),e.position++}else lt(e,"unknown escape sequence");n=o=e.position}else Yo(u)?(Wa(e,n,o,!0),$c(e,yn(e,!1,t)),n=o=e.position):e.position===e.lineStart&&wl(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 C5(e,t){var n=!0,o,a,s,r=e.tag,u,d=e.anchor,m,f,g,w,b,T=Object.create(null),E,O,M,V;if(V=e.input.charCodeAt(e.position),V===91)f=93,b=!1,u=[];else if(V===123)f=125,b=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),V=e.input.charCodeAt(++e.position);V!==0;){if(yn(e,!0,t),V=e.input.charCodeAt(e.position),V===f)return e.position++,e.tag=r,e.anchor=d,e.kind=b?"mapping":"sequence",e.result=u,!0;n?V===44&&lt(e,"expected the node content, but found ','"):lt(e,"missed comma between flow collection entries"),O=E=M=null,g=w=!1,V===63&&(m=e.input.charCodeAt(e.position+1),lo(m)&&(g=w=!0,e.position++,yn(e,!0,t))),o=e.line,a=e.lineStart,s=e.position,Js(e,t,_l,!1,!0),O=e.tag,E=e.result,yn(e,!0,t),V=e.input.charCodeAt(e.position),(w||e.line===o)&&V===58&&(g=!0,V=e.input.charCodeAt(++e.position),yn(e,!0,t),Js(e,t,_l,!1,!0),M=e.result),b?Ks(e,u,T,O,E,M,o,a,s):g?u.push(Ks(e,null,T,O,E,M,o,a,s)):u.push(E),yn(e,!0,t),V=e.input.charCodeAt(e.position),V===44?(n=!0,V=e.input.charCodeAt(++e.position)):n=!1}lt(e,"unexpected end of the stream within a flow collection")}function E5(e,t){var n,o,a=Cc,s=!1,r=!1,u=t,d=0,m=!1,f,g;if(g=e.input.charCodeAt(e.position),g===124)o=!1;else if(g===62)o=!0;else return!1;for(e.kind="scalar",e.result="";g!==0;)if(g=e.input.charCodeAt(++e.position),g===43||g===45)Cc===a?a=g===43?Im:g5:lt(e,"repeat of a chomping mode identifier");else if((f=b5(g))>=0)f===0?lt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):r?lt(e,"repeat of an indentation width identifier"):(u=t+f-1,r=!0);else break;if(ys(g)){do g=e.input.charCodeAt(++e.position);while(ys(g));if(g===35)do g=e.input.charCodeAt(++e.position);while(!Yo(g)&&g!==0)}for(;g!==0;){for(Ec(e),e.lineIndent=0,g=e.input.charCodeAt(e.position);(!r||e.lineIndent<u)&&g===32;)e.lineIndent++,g=e.input.charCodeAt(++e.position);if(!r&&e.lineIndent>u&&(u=e.lineIndent),Yo(g)){d++;continue}if(e.lineIndent<u){a===Im?e.result+=Cn.repeat(`
`,s?1+d:d):a===Cc&&s&&(e.result+=`
`);break}for(o?ys(g)?(m=!0,e.result+=Cn.repeat(`
`,s?1+d:d)):m?(m=!1,e.result+=Cn.repeat(`
`,d+1)):d===0?s&&(e.result+=" "):e.result+=Cn.repeat(`
`,d):e.result+=Cn.repeat(`
`,s?1+d:d),s=!0,r=!0,d=0,n=e.position;!Yo(g)&&g!==0;)g=e.input.charCodeAt(++e.position);Wa(e,n,e.position,!1)}return!0}function Bm(e,t){var n,o=e.tag,a=e.anchor,s=[],r,u=!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||(r=e.input.charCodeAt(e.position+1),!lo(r))));){if(u=!0,e.position++,yn(e,!0,-1)&&e.lineIndent<=t){s.push(null),d=e.input.charCodeAt(e.position);continue}if(n=e.line,Js(e,t,$m,!1,!0),s.push(e.result),yn(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 u?(e.tag=o,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}function $5(e,t,n){var o,a,s,r,u,d,m=e.tag,f=e.anchor,g={},w=Object.create(null),b=null,T=null,E=null,O=!1,M=!1,V;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=g),V=e.input.charCodeAt(e.position);V!==0;){if(!O&&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,(V===63||V===58)&&lo(o))V===63?(O&&(Ks(e,g,w,b,T,null,r,u,d),b=T=E=null),M=!0,O=!0,a=!0):O?(O=!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,V=o;else{if(r=e.line,u=e.lineStart,d=e.position,!Js(e,n,Em,!1,!0))break;if(e.line===s){for(V=e.input.charCodeAt(e.position);ys(V);)V=e.input.charCodeAt(++e.position);if(V===58)V=e.input.charCodeAt(++e.position),lo(V)||lt(e,"a whitespace character is expected after the key-value separator within a block mapping"),O&&(Ks(e,g,w,b,T,null,r,u,d),b=T=E=null),M=!0,O=!1,a=!1,b=e.tag,T=e.result;else if(M)lt(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=m,e.anchor=f,!0}else if(M)lt(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=m,e.anchor=f,!0}if((e.line===s||e.lineIndent>t)&&(O&&(r=e.line,u=e.lineStart,d=e.position),Js(e,t,yl,!0,a)&&(O?T=e.result:E=e.result),O||(Ks(e,g,w,b,T,E,r,u,d),b=T=E=null),yn(e,!0,-1),V=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&V!==0)lt(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return O&&Ks(e,g,w,b,T,null,r,u,d),M&&(e.tag=m,e.anchor=f,e.kind="mapping",e.result=g),M}function I5(e){var t,n=!1,o=!1,a,s,r;if(r=e.input.charCodeAt(e.position),r!==33)return!1;if(e.tag!==null&&lt(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),r===60?(n=!0,r=e.input.charCodeAt(++e.position)):r===33?(o=!0,a="!!",r=e.input.charCodeAt(++e.position)):a="!",t=e.position,n){do r=e.input.charCodeAt(++e.position);while(r!==0&&r!==62);e.position<e.length?(s=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):lt(e,"unexpected end of the stream within a verbatim tag")}else{for(;r!==0&&!lo(r);)r===33&&(o?lt(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Am.test(a)||lt(e,"named tag handle cannot contain such characters"),o=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),v5.test(s)&&lt(e,"tag suffix cannot contain flow indicator characters")}s&&!Lm.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:Va.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 A5(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&&!lo(n)&&!qs(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 L5(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&&!lo(o)&&!qs(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),Va.call(e.anchorMap,n)||lt(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],yn(e,!0,-1),!0}function Js(e,t,n,o,a){var s,r,u,d=1,m=!1,f=!1,g,w,b,T,E,O;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=r=u=yl===n||$m===n,o&&yn(e,!0,-1)&&(m=!0,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)),d===1)for(;I5(e)||A5(e);)yn(e,!0,-1)?(m=!0,u=s,e.lineIndent>t?d=1:e.lineIndent===t?d=0:e.lineIndent<t&&(d=-1)):u=!1;if(u&&(u=m||a),(d===1||yl===n)&&(_l===n||Em===n?E=t:E=t+1,O=e.position-e.lineStart,d===1?u&&(Bm(e,O)||$5(e,O,E))||C5(e,E)?f=!0:(r&&E5(e,E)||T5(e,E)||k5(e,E)?f=!0:L5(e)?(f=!0,(e.tag!==null||e.anchor!==null)&&lt(e,"alias node should not have any properties")):S5(e,E,_l===n)&&(f=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d===0&&(f=u&&Bm(e,O))),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+'"'),g=0,w=e.implicitTypes.length;g<w;g+=1)if(T=e.implicitTypes[g],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(Va.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"],g=0,w=b.length;g<w;g+=1)if(e.tag.slice(0,b[g].tag.length)===b[g].tag){T=b[g];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 M5(e){var t=e.position,n,o,a,s=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(yn(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){for(s=!0,r=e.input.charCodeAt(++e.position),n=e.position;r!==0&&!lo(r);)r=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");r!==0;){for(;ys(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!Yo(r));break}if(Yo(r))break;for(n=e.position;r!==0&&!lo(r);)r=e.input.charCodeAt(++e.position);a.push(e.input.slice(n,e.position))}r!==0&&Ec(e),Va.call(Nm,o)?Nm[o](e,o,a):bl(e,'unknown document directive "'+o+'"')}if(yn(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,yn(e,!0,-1)):s&&lt(e,"directives end mark is expected"),Js(e,e.lineIndent-1,yl,!1,!0),yn(e,!0,-1),e.checkLineBreaks&&h5.test(e.input.slice(t,e.position))&&bl(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&wl(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,yn(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 Um(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 x5(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;)M5(n);return n.documents}function D5(e,t,n){t!==null&&typeof t=="object"&&typeof n>"u"&&(n=t,t=null);var o=Um(e,n);if(typeof t!="function")return o;for(var a=0,s=o.length;a<s;a+=1)t(o[a])}function O5(e,t){var n=Um(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 R5=D5,P5=O5,zm={loadAll:R5,load:P5},Vm=Object.prototype.toString,Wm=Object.prototype.hasOwnProperty,Ic=65279,N5=9,Zi=10,F5=13,B5=32,U5=33,z5=34,Ac=35,V5=37,W5=38,H5=39,j5=42,Hm=44,G5=45,xl=58,q5=61,Y5=62,K5=63,J5=64,jm=91,Gm=93,X5=96,qm=123,Q5=124,Ym=125,Fn={};Fn[0]="\\0",Fn[7]="\\a",Fn[8]="\\b",Fn[9]="\\t",Fn[10]="\\n",Fn[11]="\\v",Fn[12]="\\f",Fn[13]="\\r",Fn[27]="\\e",Fn[34]='\\"',Fn[92]="\\\\",Fn[133]="\\N",Fn[160]="\\_",Fn[8232]="\\L",Fn[8233]="\\P";var Z5=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],e6=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function t6(e,t){var n,o,a,s,r,u,d;if(t===null)return{};for(n={},o=Object.keys(t),a=0,s=o.length;a<s;a+=1)r=o[a],u=String(t[r]),r.slice(0,2)==="!!"&&(r="tag:yaml.org,2002:"+r.slice(2)),d=e.compiledTypeMap.fallback[r],d&&Wm.call(d.styleAliases,u)&&(u=d.styleAliases[u]),n[r]=u;return n}function n6(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+Cn.repeat("0",o-t.length)+t}var o6=1,er=2;function a6(e){this.schema=e.schema||kc,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Cn.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=t6(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==='"'?er:o6,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 Km(e,t){for(var n=Cn.repeat(" ",t),o=0,a=-1,s="",r,u=e.length;o<u;)a=e.indexOf(`
`,o),a===-1?(r=e.slice(o),o=u):(r=e.slice(o,a+1),o=a+1),r.length&&r!==`
`&&(s+=n),s+=r;return s}function Lc(e,t){return`
`+Cn.repeat(" ",e.indent*t)}function s6(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 Sl(e){return e===B5||e===N5}function tr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Ic||65536<=e&&e<=1114111}function Jm(e){return tr(e)&&e!==Ic&&e!==F5&&e!==Zi}function Xm(e,t,n){var o=Jm(e),a=o&&!Sl(e);return(n?o:o&&e!==Hm&&e!==jm&&e!==Gm&&e!==qm&&e!==Ym)&&e!==Ac&&!(t===xl&&!a)||Jm(t)&&!Sl(t)&&e===Ac||t===xl&&a}function i6(e){return tr(e)&&e!==Ic&&!Sl(e)&&e!==G5&&e!==K5&&e!==xl&&e!==Hm&&e!==jm&&e!==Gm&&e!==qm&&e!==Ym&&e!==Ac&&e!==W5&&e!==j5&&e!==U5&&e!==Q5&&e!==q5&&e!==Y5&&e!==H5&&e!==z5&&e!==V5&&e!==J5&&e!==X5}function r6(e){return!Sl(e)&&e!==xl}function nr(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 Qm(e){var t=/^\n* /;return t.test(e)}var Zm=1,Mc=2,eh=3,th=4,Xs=5;function l6(e,t,n,o,a,s,r,u){var d,m=0,f=null,g=!1,w=!1,b=o!==-1,T=-1,E=i6(nr(e,0))&&r6(nr(e,e.length-1));if(t||r)for(d=0;d<e.length;m>=65536?d+=2:d++){if(m=nr(e,d),!tr(m))return Xs;E=E&&Xm(m,f,u),f=m}else{for(d=0;d<e.length;m>=65536?d+=2:d++){if(m=nr(e,d),m===Zi)g=!0,b&&(w=w||d-T-1>o&&e[T+1]!==" ",T=d);else if(!tr(m))return Xs;E=E&&Xm(m,f,u),f=m}w=w||b&&d-T-1>o&&e[T+1]!==" "}return!g&&!w?E&&!r&&!a(e)?Zm:s===er?Xs:Mc:n>9&&Qm(e)?Xs:r?s===er?Xs:Mc:w?th:eh}function u6(e,t,n,o,a){e.dump=function(){if(t.length===0)return e.quotingType===er?'""':"''";if(!e.noCompatMode&&(Z5.indexOf(t)!==-1||e6.test(t)))return e.quotingType===er?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,n),r=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),u=o||e.flowLevel>-1&&n>=e.flowLevel;function d(m){return s6(e,m)}switch(l6(t,u,e.indent,r,d,e.quotingType,e.forceQuotes&&!o,a)){case Zm:return t;case Mc:return"'"+t.replace(/'/g,"''")+"'";case eh:return"|"+nh(t,e.indent)+oh(Km(t,s));case th:return">"+nh(t,e.indent)+oh(Km(c6(t,r),s));case Xs:return'"'+d6(t)+'"';default:throw new qn("impossible error: invalid scalar style")}}()}function nh(e,t){var n=Qm(e)?String(t):"",o=e[e.length-1]===`
`,a=o&&(e[e.length-2]===`
`||e===`
`),s=a?"+":o?"":"-";return n+s+`
`}function oh(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function c6(e,t){for(var n=/(\n+)([^\n]*)/g,o=function(){var m=e.indexOf(`
`);return m=m!==-1?m:e.length,n.lastIndex=m,ah(e.slice(0,m),t)}(),a=e[0]===`
`||e[0]===" ",s,r;r=n.exec(e);){var u=r[1],d=r[2];s=d[0]===" ",o+=u+(!a&&!s&&d!==""?`
`:"")+ah(d,t),a=s}return o}function ah(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,o,a=0,s,r=0,u=0,d="";o=n.exec(e);)u=o.index,u-a>t&&(s=r>a?r:u,d+=`
`+e.slice(a,s),a=s+1),r=u;return d+=`
`,e.length-a>t&&r>a?d+=e.slice(a,r)+`
`+e.slice(r+1):d+=e.slice(a),d.slice(1)}function d6(e){for(var t="",n=0,o,a=0;a<e.length;n>=65536?a+=2:a++)n=nr(e,a),o=Fn[n],!o&&tr(n)?(t+=e[a],n>=65536&&(t+=e[a+1])):t+=o||n6(n);return t}function p6(e,t,n){var o="",a=e.tag,s,r,u;for(s=0,r=n.length;s<r;s+=1)u=n[s],e.replacer&&(u=e.replacer.call(n,String(s),u)),(ba(e,t,u,!1,!1)||typeof u>"u"&&ba(e,t,null,!1,!1))&&(o!==""&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=a,e.dump="["+o+"]"}function sh(e,t,n,o){var a="",s=e.tag,r,u,d;for(r=0,u=n.length;r<u;r+=1)d=n[r],e.replacer&&(d=e.replacer.call(n,String(r),d)),(ba(e,t+1,d,!0,!0,!1,!0)||typeof d>"u"&&ba(e,t+1,null,!0,!0,!1,!0))&&((!o||a!=="")&&(a+=Lc(e,t)),e.dump&&Zi===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function f6(e,t,n){var o="",a=e.tag,s=Object.keys(n),r,u,d,m,f;for(r=0,u=s.length;r<u;r+=1)f="",o!==""&&(f+=", "),e.condenseFlow&&(f+='"'),d=s[r],m=n[d],e.replacer&&(m=e.replacer.call(n,d,m)),ba(e,t,d,!1,!1)&&(e.dump.length>1024&&(f+="? "),f+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ba(e,t,m,!1,!1)&&(f+=e.dump,o+=f));e.tag=a,e.dump="{"+o+"}"}function g6(e,t,n,o){var a="",s=e.tag,r=Object.keys(n),u,d,m,f,g,w;if(e.sortKeys===!0)r.sort();else if(typeof e.sortKeys=="function")r.sort(e.sortKeys);else if(e.sortKeys)throw new qn("sortKeys must be a boolean or a function");for(u=0,d=r.length;u<d;u+=1)w="",(!o||a!=="")&&(w+=Lc(e,t)),m=r[u],f=n[m],e.replacer&&(f=e.replacer.call(n,m,f)),ba(e,t+1,m,!0,!0,!0)&&(g=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,g&&(e.dump&&Zi===e.dump.charCodeAt(0)?w+="?":w+="? "),w+=e.dump,g&&(w+=Lc(e,t)),ba(e,t+1,f,!0,g)&&(e.dump&&Zi===e.dump.charCodeAt(0)?w+=":":w+=": ",w+=e.dump,a+=w));e.tag=s,e.dump=a||"{}"}function ih(e,t,n){var o,a,s,r,u,d;for(a=n?e.explicitTypes:e.implicitTypes,s=0,r=a.length;s<r;s+=1)if(u=a[s],(u.instanceOf||u.predicate)&&(!u.instanceOf||typeof t=="object"&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(n?u.multi&&u.representName?e.tag=u.representName(t):e.tag=u.tag:e.tag="?",u.represent){if(d=e.styleMap[u.tag]||u.defaultStyle,Vm.call(u.represent)==="[object Function]")o=u.represent(t,d);else if(Wm.call(u.represent,d))o=u.represent[d](t,d);else throw new qn("!<"+u.tag+'> tag resolver accepts not "'+d+'" style');e.dump=o}return!0}return!1}function ba(e,t,n,o,a,s,r){e.tag=null,e.dump=n,ih(e,n,!1)||ih(e,n,!0);var u=Vm.call(e.dump),d=o,m;o&&(o=e.flowLevel<0||e.flowLevel>t);var f=u==="[object Object]"||u==="[object Array]",g,w;if(f&&(g=e.duplicates.indexOf(n),w=g!==-1),(e.tag!==null&&e.tag!=="?"||w||e.indent!==2&&t>0)&&(a=!1),w&&e.usedDuplicates[g])e.dump="*ref_"+g;else{if(f&&w&&!e.usedDuplicates[g]&&(e.usedDuplicates[g]=!0),u==="[object Object]")o&&Object.keys(e.dump).length!==0?(g6(e,t,e.dump,a),w&&(e.dump="&ref_"+g+e.dump)):(f6(e,t,e.dump),w&&(e.dump="&ref_"+g+" "+e.dump));else if(u==="[object Array]")o&&e.dump.length!==0?(e.noArrayIndent&&!r&&t>0?sh(e,t-1,e.dump,a):sh(e,t,e.dump,a),w&&(e.dump="&ref_"+g+e.dump)):(p6(e,t,e.dump),w&&(e.dump="&ref_"+g+" "+e.dump));else if(u==="[object String]")e.tag!=="?"&&u6(e,e.dump,t,s,d);else{if(u==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new qn("unacceptable kind of an object to dump "+u)}e.tag!==null&&e.tag!=="?"&&(m=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",e.dump=m+" "+e.dump)}return!0}function m6(e,t){var n=[],o=[],a,s;for(Dc(e,n,o),a=0,s=o.length;a<s;a+=1)t.duplicates.push(n[o[a]]);t.usedDuplicates=new Array(s)}function Dc(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)Dc(e[a],t,n);else for(o=Object.keys(e),a=0,s=o.length;a<s;a+=1)Dc(e[o[a]],t,n)}function h6(e,t){t=t||{};var n=new a6(t);n.noRefs||m6(e,n);var o=e;return n.replacer&&(o=n.replacer.call({"":o},"",o)),ba(n,0,o,!0,!0)?n.dump+`
`:""}var v6=h6,_6={dump:v6};function Oc(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 y6=Ln,b6=lm,w6=pm,x6=vm,S6=_m,T6=kc,k6=zm.load,C6=zm.loadAll,E6=_6.dump,$6=qn,I6={binary:Sm,float:hm,map:dm,null:fm,pairs:km,set:Cm,timestamp:wm,bool:gm,int:mm,merge:xm,omap:Tm,seq:cm,str:um},A6=Oc("safeLoad","load"),L6=Oc("safeLoadAll","loadAll"),M6=Oc("safeDump","dump"),rh={Type:y6,Schema:b6,FAILSAFE_SCHEMA:w6,JSON_SCHEMA:x6,CORE_SCHEMA:S6,DEFAULT_SCHEMA:T6,load:k6,loadAll:C6,dump:E6,YAMLException:$6,types:I6,safeLoad:A6,safeLoadAll:L6,safeDump:M6};const D6={key:0,class:"loading-overlay"},O6={class:"settings-content"},R6={class:"info-links"},P6={class:"info-link-item"},N6={class:"info-link-label"},F6={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"},B6={class:"info-link-item"},U6={class:"info-link-label"},z6={href:"https://github.com/weilin9999/WeiLin-Comfyui-Tools-Prompt",target:"_blank",class:"info-link"},V6={class:"info-link-item"},W6={class:"info-link-label"},H6={href:"https://weilin9999.github.io/WeiLin-Share-Prompt-Web/#/",target:"_blank",class:"info-link"},j6={style:{"margin-bottom":"16px"}},G6=["placeholder"],q6={style:{"margin-bottom":"16px"}},Y6=["placeholder"],K6=["placeholder"],J6={style:{"margin-bottom":"16px"}},X6=["placeholder"],Q6=["placeholder"],Z6={style:{"margin-bottom":"16px"}},ex=["placeholder"],tx={class:"data-container"},nx={key:0},ox={key:0},ax={class:"tag-group-container"},sx={style:{display:"flex","align-items":"center"}},ix={key:0},rx=["placeholder"],lx=["onClick"],ux=["onClick"],cx=["onClick"],dx=Wt({__name:"import_tag",setup(e,{expose:t}){const{t:n}=Yt(),o=S(!1),a=S(""),s=S(""),r=S(""),u=S(""),d=S(""),m=S(""),f=S(""),g=S(""),w=S(""),b=S([]),T=S(-1),E=S(""),O=S(""),M=S(null),V=S(null),pe=S(null),D=S(!1),z=S(""),ie=S(null);function P(){if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}ie.value.click()}function re(){a.value="",s.value="",r.value="",u.value="",d.value="",m.value="",f.value="",g.value="",w.value="",b.value=[],T.value=-1,E.value="",O.value="",D.value=!1}function ce(I){const H=I.target.files[0];if(H){const de=new FileReader;de.onload=Ce=>{const U=Ce.target.result.split(`
`).filter(j=>j.trim());let k=0;U.forEach(j=>{const[ne,Fe]=j.split(",");if(ne&&Fe){const Oe=ne.trim().replace(/'/g,"''"),ge=Fe.trim().replace(/'/g,"''"),$e=za();k=k+1;const Ke=parseInt(new Date().getTime()/1e3,10)+k,tt=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Oe}', '${ge}', 'rgba(255, 123, 2, .4)', ${Ke}, '${w.value}', '${$e}');`;b.value.push(tt)}})},de.readAsText(H)}I.target.value=""}function Re(I){const H=I.target.files[0];if(H){const de=new FileReader;de.onload=Ce=>{try{const Ae=JSON.parse(Ce.target.result);let U=0;Object.entries(Ae).forEach(([k,j])=>{const ne=k.replace(/'/g,"''"),Fe=j.replace(/'/g,"''"),Oe=za();U=U+1;const ge=parseInt(new Date().getTime()/1e3,10)+U,$e=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${ne}', '${Fe}', 'rgba(255, 123, 2, .4)', ${ge}, '${w.value}', '${Oe}');`;b.value.push($e)})}catch{ue({type:"warn",str:"message.jsonErrorMesg"})}},de.readAsText(H)}I.target.value=""}function Le(I){const H=I.target.files[0];if(H){const de=new FileReader;de.onload=Ce=>{try{const Ae=rh.load(Ce.target.result);let U=0;Object.entries(Ae).forEach(([k,j])=>{const ne=k.replace(/'/g,"''"),Fe=String(j).replace(/'/g,"''"),Oe=za();U=U+1;const ge=parseInt(new Date().getTime()/1e3,10)+U,$e=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${ne}', '${Fe}', 'rgba(255, 123, 2, .4)', ${ge}, '${w.value}', '${Oe}');`;b.value.push($e)})}catch{ue({type:"warn",str:"message.yamlErrorMesg"})}},de.readAsText(H)}I.target.value=""}function fe(I){re();const H=I.target.files[0];if(H){const de=new FileReader;de.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 ne=k.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);ne&&(w.value=ne[1]);const Fe=k.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);Fe&&(f.value=Fe[1].replace(/''/g,"'"))}else{u.value=`${k};`;const ne=k.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);ne&&(g.value=ne[1]);const Fe=k.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);Fe&&(m.value=Fe[1].replace(/''/g,"'"))}else k.includes("tag_tags")&&b.value.push(`${k};`)})},de.readAsText(H)}I.target.value=""}function xe(){if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}pe.value.click()}function ae(){if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}V.value.click()}function J(){M.value.click()}function se(){const I=[u.value,d.value,...b.value].join(`
`),H=new Blob([I],{type:"text/sql"}),de=document.createElement("a");if(de.href=URL.createObjectURL(H),z.value.length<=0){const Ce=parseInt(new Date().getTime()/1e3,10);de.download=`export_${Ce}.sql`}else de.download=`${z.value}.sql`;de.click()}const X=()=>{const I=[...b.value].join(`
`),H=new Blob([I],{type:"text/sql"}),de=document.createElement("a");if(de.href=URL.createObjectURL(H),z.value.length<=0){const Ce=parseInt(new Date().getTime()/1e3,10);de.download=`export_tags_${Ce}.sql`}else de.download=`${z.value}.sql`;de.click()};function ee(I){const H=I.match(/VALUES\s*\([^']*'([^']+)'/),de=I.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:H?H[1].replace(/''/g,"'"):"",desc:de?de[1].replace(/''/g,"'"):""}}function Ee(I){b.value.splice(I,1)}function he(I){const H=b.value[I],de=ee(H);E.value=de.text,O.value=de.desc,T.value=I}function Q(I){const H=E.value.replace(/'/g,"''"),de=O.value.replace(/'/g,"''");b.value[I]=b.value[I].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${H}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${de}'`),T.value=-1}function le(){T.value=-1}function be(){if(!w.value){ue({type:"warn",str:"message.pleaseAddSub"});return}const I=a.value.replace(/'/g,"''"),H=s.value.replace(/'/g,"''"),de=za(),Ce=parseInt(new Date().getTime()/1e3,10);r.value=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${I}', '${H}', 'rgba(255, 123, 2, .4)', ${Ce}, '${w.value}', '${de}');`,b.value.push(r.value)}function we(){if(m.value.length<=0){ue({type:"warn",str:"importDialog.pleaseAddGroupName"});return}const I=m.value.replace(/'/g,"''");g.value.length<=0&&(g.value=za());const H=parseInt(new Date().getTime()/1e3,10);u.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${I}', 'rgba(255, 123, 2, .4)', ${H}, '${g.value}');`}function _e(){if(f.value.length<=0){ue({type:"warn",str:"importDialog.pleaseAddSubGroupName"});return}if(!g.value){ue({type:"warn",str:"message.pleaseAddMainCeb"});return}const I=f.value.replace(/'/g,"''");w.value.length<=0&&(w.value=za());const H=parseInt(new Date().getTime()/1e3,10);d.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${I}', 'rgba(255, 123, 2, .4)', ${H}, '${g.value}', '${w.value}');`}const Z=S(null),W=()=>{Z.value.open()},te=I=>{D.value=!0,m.value=I.group.name,f.value=I.sub.name,g.value=I.group.p_uuid,w.value=I.sub.g_uuid;const H=I.group.name.replace(/'/g,"''"),de=I.sub.name.replace(/'/g,"''");u.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${H}', '${I.group.color}', ${I.group.create_time}, '${I.group.p_uuid}');`,d.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${de}', '${I.sub.color}', ${I.sub.create_time}, '${I.group.p_uuid}', '${I.sub.g_uuid}');`},N=S(!1),q=async I=>{N.value=!0;try{await Ot.runSQLToServer(I).then(H=>{H.code!==200?ue({type:"warn",str:H.message}):(Y(),ue({type:"success",str:"importDialog.successImport"}))}).catch(H=>{console.error(H),ue({type:"warn",str:"importDialog.importFail"})})}catch(H){console.error(H),ue({type:"warn",str:"importDialog.importFail"})}finally{N.value=!1}},Y=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},$=async()=>{if(D.value){if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}const I=[...b.value];await q(I)}else{if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}const I=[u.value,d.value,...b.value];await q(I)}};return It(u,(I,H)=>{var Ae,U;if(!I||I===H)return;const de=(Ae=I.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Ae[1],Ce=(U=H==null?void 0:H.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:U[1];de&&Ce&&d.value&&(d.value=d.value.replace(new RegExp(`'${Ce}'`,"g"),`'${de}'`))}),It(d,(I,H)=>{var Ae,U;if(!I||I===H)return;const de=(Ae=I.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Ae[1],Ce=(U=H==null?void 0:H.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:U[1];de&&Ce&&b.value.length>0&&(b.value=b.value.map(k=>k.replace(new RegExp(`'${Ce}'`,"g"),`'${de}'`)))}),t({open:()=>{o.value=!0}}),(I,H)=>(C(),A(qe,null,[N.value?(C(),A("div",D6,H[11]||(H[11]=[i("div",{class:"loading-spinner"},null,-1)]))):Ie("",!0),at(Gs,{modelValue:o.value,"onUpdate:modelValue":H[10]||(H[10]=de=>o.value=de),title:v(n)("importDialog.title")},{footer:Ut(()=>[i("button",{onClick:H[9]||(H[9]=de=>o.value=!1)},y(v(n)("promptBox.settings.close")),1),i("button",{onClick:$},y(v(n)("importDialog.sure")),1)]),default:Ut(()=>[i("div",O6,[i("div",R6,[i("div",P6,[i("span",N6,y(v(n)("importDialog.tips1")),1),i("a",F6,y(v(n)("importDialog.tips1text")),1)]),i("div",B6,[i("span",U6,y(v(n)("importDialog.tips2")),1),i("a",z6,y(v(n)("importDialog.tips2text")),1)]),i("div",V6,[i("span",W6,y(v(n)("importDialog.tips3")),1),i("a",H6,y(v(n)("importDialog.tips3text")),1)])]),i("div",j6,[i("button",{onClick:re,class:"upload-btn"},y(v(n)("importDialog.cleanAll")),1),i("button",{style:{"margin-left":"10px"},onClick:J,class:"upload-btn"},y(v(n)("importDialog.uploadSQL")),1),i("button",{style:{"margin-left":"10px"},onClick:W},y(v(n)("importDialog.selectGroup")),1),i("button",{style:{"margin-left":"10px"},onClick:se},y(v(n)("importDialog.dumpSQL")),1),i("button",{style:{"margin-left":"10px"},onClick:X},y(v(n)("importDialog.dumpOnlySQL")),1),Se(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":H[0]||(H[0]=de=>z.value=de),placeholder:v(n)("importDialog.settingOutputName")},null,8,G6),[[ze,z.value]]),i("input",{type:"file",ref_key:"fileInput",ref:M,onChange:fe,accept:".sql",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"jsonFileInput",ref:V,onChange:Re,accept:".json",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"txtFileInput",ref:pe,onChange:ce,accept:".txt",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"yamlFileInput",ref:ie,onChange:Le,accept:".yaml,.yml",style:{display:"none"}},null,544)]),i("div",q6,[Se(i("input",{"onUpdate:modelValue":H[1]||(H[1]=de=>m.value=de),placeholder:v(n)("importDialog.pleaseMainCeb")},null,8,Y6),[[ze,m.value]]),i("button",{onClick:we},y(v(n)("importDialog.setMainCeb")),1),Se(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":H[2]||(H[2]=de=>g.value=de),placeholder:v(n)("importDialog.pleaseMainCebUuid")},null,8,K6),[[ze,g.value]])]),i("div",J6,[Se(i("input",{"onUpdate:modelValue":H[3]||(H[3]=de=>f.value=de),placeholder:v(n)("importDialog.pleaseSubGroup")},null,8,X6),[[ze,f.value]]),i("button",{onClick:_e},y(v(n)("importDialog.setSubCeb")),1),Se(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":H[4]||(H[4]=de=>w.value=de),placeholder:v(n)("importDialog.pleaseSubGroupUuid")},null,8,Q6),[[ze,w.value]])]),i("div",Z6,[Se(i("input",{"onUpdate:modelValue":H[5]||(H[5]=de=>a.value=de),placeholder:"Tag"},null,512),[[ze,a.value]]),Se(i("input",{"onUpdate:modelValue":H[6]||(H[6]=de=>s.value=de),placeholder:v(n)("importDialog.translater")},null,8,ex),[[ze,s.value]]),i("button",{onClick:be},y(v(n)("importDialog.add")),1),i("button",{style:{"margin-left":"10px"},onClick:ae,class:"upload-btn"},y(v(n)("importDialog.fromJSONImput")),1),i("button",{style:{"margin-left":"10px"},onClick:xe,class:"upload-btn"},y(v(n)("importDialog.fromTxtInput")),1),i("button",{style:{"margin-left":"10px"},onClick:P,class:"upload-btn"},y(v(n)("importDialog.fromYmalInput")),1)]),i("div",tx,[u.value?(C(),A("div",nx,[i("h3",null,y(ee(u.value).text),1),d.value?(C(),A("div",ox,[i("h4",null,y(ee(d.value).text),1),i("div",ax,[(C(!0),A(qe,null,ot(b.value,(de,Ce)=>(C(),A("div",{key:Ce,style:{display:"flex","flex-direction":"column","align-items":"center"}},[i("p",null,y(ee(de).text)+" - "+y(ee(de).desc),1),i("div",sx,[T.value===Ce?(C(),A("div",ix,[Se(i("input",{"onUpdate:modelValue":H[7]||(H[7]=Ae=>E.value=Ae),placeholder:"Tag"},null,512),[[ze,E.value]]),Se(i("input",{"onUpdate:modelValue":H[8]||(H[8]=Ae=>O.value=Ae),placeholder:v(n)("importDialog.translater")},null,8,rx),[[ze,O.value]]),i("button",{onClick:Ae=>Q(Ce)},y(v(n)("importDialog.sureYes")),9,lx),i("button",{style:{"margin-left":"10px"},onClick:le},y(v(n)("importDialog.cancel")),1)])):(C(),A("button",{key:1,onClick:Ae=>he(Ce)},y(v(n)("importDialog.edit")),9,ux)),i("button",{style:{"margin-left":"10px"},onClick:Ae=>Ee(Ce)},y(v(n)("importDialog.delete")),9,cx)])]))),128))])])):Ie("",!0)])):Ie("",!0)])])]),_:1},8,["modelValue","title"]),at(am,{ref_key:"tagGroupSelectDialogItem",ref:Z,onSureSelect:te},null,512)],64))}},[["__scopeId","data-v-9427256d"]]),px={class:"weilin-tools-dialog-header"},fx={class:"weilin-tools-dialog-body"},gx={class:"form-group"},mx=["value"],hx={class:"form-group"},vx=["value"],_x={class:"form-group"},yx=["value"],bx={class:"form-group"},wx=["value"],xx={class:"form-row"},Sx={class:"form-group form-group-half"},Tx={class:"form-group form-group-half"},kx={class:"form-group"},Cx={class:"form-group"},Ex={class:"form-group"},$x={class:"weilin-tools-dialog-footer"},Ix=["disabled"],Ax=Wt({__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=as({checkpoint:"",sizeIndex:0,sampler_name:"euler",scheduler:"normal",steps:20,cfg:7,seed:-1,positive:"",negative:"worst quality, low quality, nsfw"});It(()=>n.visible,d=>{var m,f;if(d&&n.tag){s.positive=`${n.tag.text||""}, masterpiece, best quality`,s.negative="worst quality, low quality, nsfw",s.checkpoint=((f=(m=n.options.checkpoints)==null?void 0:m[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 g=JSON.parse(localStorage.getItem("weilin_tools_gen_params")||"{}");g.checkpoint&&n.options.checkpoints.some(w=>w.name===g.checkpoint)&&(s.checkpoint=g.checkpoint),g.sizeIndex!==void 0&&(s.sizeIndex=g.sizeIndex),g.sampler_name&&(s.sampler_name=g.sampler_name),g.scheduler&&(s.scheduler=g.scheduler),g.steps!==void 0&&(s.steps=g.steps),g.cfg!==void 0&&(s.cfg=g.cfg),g.seed!==void 0&&(s.seed=g.seed),g.negative&&(s.negative=g.negative)}catch{}}});function r(){a.value||o("close")}async function u(){var m;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 g;n.mode==="regenerate"?g=await Ot.regenerateTagImage(n.tag.t_uuid,f):g=await Ot.generateTagImage(n.tag.t_uuid,f),o("generated",{task_id:g.data.task_id,t_uuid:n.tag.t_uuid}),o("close")}catch(f){((m=f.response)==null?void 0:m.status)===409?alert("已有生成任务进行中"):alert("生成失败: "+(f.message||"未知错误"))}finally{a.value=!1}}return(d,m)=>e.visible?(C(),A("div",{key:0,class:"weilin-tools-dialog-overlay",onMousedown:vt(r,["self"])},[i("div",{class:"weilin-tools-dialog-content generate-image-dialog",onMousedown:m[9]||(m[9]=vt(()=>{},["stop"]))},[i("div",px,[i("h2",null,y(e.mode==="regenerate"?"重新生成预览图":"生成标签预览图"),1),i("button",{class:"close-btn",onClick:r},"×")]),i("div",fx,[i("div",gx,[m[10]||(m[10]=i("label",null,"模型",-1)),Se(i("select",{"onUpdate:modelValue":m[0]||(m[0]=f=>s.checkpoint=f),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.checkpoints,f=>(C(),A("option",{key:f.name,value:f.name},y(f.name),9,mx))),128))],512),[[an,s.checkpoint]])]),i("div",hx,[m[11]||(m[11]=i("label",null,"尺寸",-1)),Se(i("select",{"onUpdate:modelValue":m[1]||(m[1]=f=>s.sizeIndex=f),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.sizes,(f,g)=>(C(),A("option",{key:g,value:g},y(f.label),9,vx))),128))],512),[[an,s.sizeIndex]])]),i("div",_x,[m[12]||(m[12]=i("label",null,"采样器",-1)),Se(i("select",{"onUpdate:modelValue":m[2]||(m[2]=f=>s.sampler_name=f),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.samplers,f=>(C(),A("option",{key:f,value:f},y(f),9,yx))),128))],512),[[an,s.sampler_name]])]),i("div",bx,[m[13]||(m[13]=i("label",null,"调度器",-1)),Se(i("select",{"onUpdate:modelValue":m[3]||(m[3]=f=>s.scheduler=f),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.schedulers,f=>(C(),A("option",{key:f,value:f},y(f),9,wx))),128))],512),[[an,s.scheduler]])]),i("div",xx,[i("div",Sx,[i("label",null,"步数: "+y(s.steps),1),Se(i("input",{type:"range","onUpdate:modelValue":m[4]||(m[4]=f=>s.steps=f),min:"1",max:"50",class:"form-range"},null,512),[[ze,s.steps,void 0,{number:!0}]])]),i("div",Tx,[i("label",null,"CFG: "+y(s.cfg),1),Se(i("input",{type:"range","onUpdate:modelValue":m[5]||(m[5]=f=>s.cfg=f),min:"1",max:"20",step:"0.5",class:"form-range"},null,512),[[ze,s.cfg,void 0,{number:!0}]])])]),i("div",kx,[m[14]||(m[14]=i("label",null,"种子 (-1 为随机)",-1)),Se(i("input",{type:"number","onUpdate:modelValue":m[6]||(m[6]=f=>s.seed=f),class:"form-input"},null,512),[[ze,s.seed,void 0,{number:!0}]])]),i("div",Cx,[m[15]||(m[15]=i("label",null,"正向提示词",-1)),Se(i("textarea",{"onUpdate:modelValue":m[7]||(m[7]=f=>s.positive=f),class:"form-textarea",rows:"3"},null,512),[[ze,s.positive]])]),i("div",Ex,[m[16]||(m[16]=i("label",null,"负向提示词",-1)),Se(i("textarea",{"onUpdate:modelValue":m[8]||(m[8]=f=>s.negative=f),class:"form-textarea",rows:"2"},null,512),[[ze,s.negative]])])]),i("div",$x,[i("button",{class:"cancel-btn",onClick:r},"取消"),i("button",{class:"confirm-btn",onClick:u,disabled:a.value},y(e.mode==="regenerate"?"重新生成":"生成"),9,Ix)])],32)],32)):Ie("",!0)}},[["__scopeId","data-v-71f1fdde"]]),Lx={class:"weilin-tools-dialog-header"},Mx={class:"weilin-tools-dialog-body"},Dx={class:"form-group"},Ox=["value"],Rx={class:"form-group"},Px=["value"],Nx={class:"form-group"},Fx=["value"],Bx={class:"form-group"},Ux=["value"],zx={class:"form-row"},Vx={class:"form-group form-group-half"},Wx={class:"form-group form-group-half"},Hx={class:"form-group"},jx={key:0,class:"batch-progress-section"},Gx={class:"batch-progress-bar-wrap"},qx={class:"batch-progress-text"},Yx={class:"weilin-tools-dialog-footer"},Kx=["disabled"],Jx=["disabled"],Xx=Wt({__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),r=S(0),u=Bt(()=>r.value?Math.round(s.value/r.value*100):0),d=as({checkpoint:"",sizeIndex:0,sampler_name:"euler",scheduler:"normal",steps:20,cfg:7,seed:-1});It(()=>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,r.value=0;try{const E=JSON.parse(localStorage.getItem("weilin_tools_gen_params")||"{}");E.checkpoint&&n.options.checkpoints.some(O=>O.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 m=Bt(()=>n.tags?n.tags.filter(w=>!w.image_status||w.image_status==="failed").length:0);function f(){a.value||o("close")}async function g(){var E;const w=n.options.sizes[d.sizeIndex]||n.options.sizes[0],b=n.tags.filter(O=>!O.image_status||O.image_status==="failed");if(!b.length){alert("所有标签已有预览图");return}a.value=!0,r.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 M=((E=(await Ot.batchGenerateTagImages(b,T)).data)==null?void 0:E.task_ids)||[];o("generated",{task_ids:M});const V=new Map;for(const pe of M)V.set(pe.task_id,pe.t_uuid);for(s.value=M.length-V.size,r.value=M.length;V.size>0;){await new Promise(pe=>setTimeout(pe,2e3));for(const[pe,D]of[...V])try{const z=await Ot.getTagImageStatus(pe),ie=z.data||z;(ie.status==="ready"||ie.status==="failed")&&(V.delete(pe),s.value=r.value-V.size)}catch{}}}catch(O){alert("批量生成失败: "+(O.message||"未知错误"))}finally{a.value=!1}}return(w,b)=>e.visible?(C(),A("div",{key:0,class:"weilin-tools-dialog-overlay",onMousedown:vt(f,["self"])},[i("div",{class:"weilin-tools-dialog-content batch-generate-dialog",onMousedown:b[7]||(b[7]=vt(()=>{},["stop"]))},[i("div",Lx,[i("h2",null,"一键生成预览图 —— "+y(m.value)+" 个标签",1),i("button",{class:"close-btn",onClick:f},"×")]),i("div",Mx,[i("div",Dx,[b[8]||(b[8]=i("label",null,"模型",-1)),Se(i("select",{"onUpdate:modelValue":b[0]||(b[0]=T=>d.checkpoint=T),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.checkpoints,T=>(C(),A("option",{key:T.name,value:T.name},y(T.name),9,Ox))),128))],512),[[an,d.checkpoint]])]),i("div",Rx,[b[9]||(b[9]=i("label",null,"尺寸",-1)),Se(i("select",{"onUpdate:modelValue":b[1]||(b[1]=T=>d.sizeIndex=T),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.sizes,(T,E)=>(C(),A("option",{key:E,value:E},y(T.label),9,Px))),128))],512),[[an,d.sizeIndex]])]),i("div",Nx,[b[10]||(b[10]=i("label",null,"采样器",-1)),Se(i("select",{"onUpdate:modelValue":b[2]||(b[2]=T=>d.sampler_name=T),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.samplers,T=>(C(),A("option",{key:T,value:T},y(T),9,Fx))),128))],512),[[an,d.sampler_name]])]),i("div",Bx,[b[11]||(b[11]=i("label",null,"调度器",-1)),Se(i("select",{"onUpdate:modelValue":b[3]||(b[3]=T=>d.scheduler=T),class:"form-select"},[(C(!0),A(qe,null,ot(e.options.schedulers,T=>(C(),A("option",{key:T,value:T},y(T),9,Ux))),128))],512),[[an,d.scheduler]])]),i("div",zx,[i("div",Vx,[i("label",null,"步数: "+y(d.steps),1),Se(i("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}]])]),i("div",Wx,[i("label",null,"CFG: "+y(d.cfg),1),Se(i("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}]])])]),i("div",Hx,[b[12]||(b[12]=i("label",null,"种子 (-1 为随机)",-1)),Se(i("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(),A("div",jx,[i("div",Gx,[i("div",{class:"batch-progress-bar",style:Ft({width:u.value+"%"})},null,4)]),i("div",qx,y(s.value)+" / "+y(r.value),1)])):Ie("",!0)]),i("div",Yx,[i("button",{class:"cancel-btn",onClick:f,disabled:a.value},"取消",8,Kx),i("button",{class:"confirm-btn",onClick:g,disabled:a.value},"开始生成",8,Jx)])],32)],32)):Ie("",!0)}},[["__scopeId","data-v-aa7a0823"]]),Qx={class:"tag-manager"},Zx={class:"toolbar"},e8={class:"toolbar-top"},t8={class:"search-container"},n8=["placeholder"],o8={key:0,class:"no-results"},a8=["onClick"],s8={class:"result-content"},i8={class:"result-text"},r8={class:"result-path"},l8={class:"toolbar-bottom"},u8={class:"auto-add-checkbox"},c8={class:"category-tabs"},d8={class:"tabs-wrapper primary-tabs"},p8={class:"tabs-scroll"},f8=["onClick","onMouseenter","onMouseleave"],g8={class:"tab-text"},m8={key:0,class:"tab-actions"},h8=["onClick","title"],v8=["onClick","title"],_8=["onClick","title"],y8=["onClick","title"],b8={class:"group-edit-mode"},w8={class:"group-edit-mode"},x8={key:0,class:"tabs-wrapper group-tabs"},S8={class:"tabs-scroll"},T8=["onClick","onMouseenter","onMouseleave"],k8={class:"tab-text"},C8={key:0,class:"tab-actions"},E8=["onClick","title"],$8=["onClick","title"],I8=["onClick","title"],A8=["onClick","title"],L8={class:"group-edit-mode"},M8={class:"tags-content"},D8={class:"tags-header"},O8={class:"tags-title"},R8={class:"tags-actions"},P8=["disabled"],N8=["disabled"],F8={viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",style:{"margin-right":"4px"}},B8=["disabled"],U8={viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",style:{"margin-right":"4px"}},z8=["disabled"],V8=["disabled"],W8=["disabled"],H8=["disabled"],j8={key:0,class:"tags-grid"},G8=["onMouseenter"],q8={key:0,class:"tag-thumb-ready-wrap"},Y8=["src"],K8=["onClick"],J8={key:1,class:"tag-thumb-placeholder tag-thumb-loading"},X8=["onClick"],Q8=["onClick"],Z8=["src"],e7=["onClick"],t7={class:"tag-actions"},n7=["onClick","title"],o7=["onClick","title"],a7=["onClick","title"],s7={class:"tag-desc"},i7=["value"],r7={key:0,class:"weilin-tools-dialog-overlay"},l7={class:"weilin-tools-dialog-header"},u7={class:"weilin-tools-dialog-body"},c7={key:0,class:"form-group"},d7=["placeholder"],p7={key:1,class:"form-group"},f7=["placeholder"],g7={class:"form-group"},m7={class:"color-picker"},h7={class:"color-controls"},v7={class:"alpha-control"},_7={class:"alpha-value"},y7={class:"weilin-tools-dialog-footer"},b7={key:1,class:"weilin-tools-dialog-overlay"},w7={class:"weilin-tools-dialog-header"},x7={class:"weilin-tools-dialog-body"},S7={class:"form-group"},T7=["placeholder"],k7={class:"form-group"},C7=["placeholder"],E7={class:"form-group"},$7={class:"color-picker"},I7={class:"color-controls"},A7={class:"alpha-control"},L7={class:"alpha-value"},M7={class:"weilin-tools-dialog-footer"},D7={key:2,class:"weilin-tools-dialog-overlay"},O7={class:"weilin-tools-dialog-header"},R7={class:"weilin-tools-dialog-body"},P7={class:"confirm-message"},N7={class:"weilin-tools-dialog-footer"},F7={key:3,class:"weilin-tools-dialog-overlay"},B7={class:"weilin-tools-dialog-content"},U7={class:"weilin-tools-dialog-header"},z7={class:"weilin-tools-dialog-body"},V7={class:"form-group"},W7=["value"],H7={class:"form-group"},j7={class:"radio-group"},G7={class:"weilin-tools-dialog-footer"},q7={key:4,class:"weilin-tools-dialog-overlay"},Y7={class:"weilin-tools-dialog-content"},K7={class:"weilin-tools-dialog-header"},J7={class:"weilin-tools-dialog-body"},X7={class:"form-group"},Q7=["value"],Z7={class:"form-group"},e9={class:"radio-group"},t9={class:"weilin-tools-dialog-footer"},n9={key:5,class:"weilin-tools-dialog-overlay"},o9={class:"weilin-tools-dialog-header"},a9={class:"weilin-tools-dialog-body"},s9={class:"config-section"},i9={class:"form-group"},r9={class:"width-control"},l9={class:"radio-label"},u9={class:"radio-label"},c9={class:"form-group"},d9={class:"form-group"},p9={class:"config-section"},f9={class:"form-group"},g9={class:"width-control"},m9={class:"radio-label"},h9={class:"radio-label"},v9={class:"form-group"},_9={class:"form-group"},y9={class:"weilin-tools-dialog-footer"},lh=Wt({__name:"tag_index",props:{tagManager:{type:String,default:"prompt"}},setup(e){ac();const{t}=Yt(),n=S([]),o=S(null),a=S([]),s=S([]),r=S(null),u=S(!1),d=S(!1),m=S(!1),f=S(!1),g=S("primary"),w=S([]),b=S(!1),T=S(!1),E=S("None"),O=S("None"),M=S(0),V=S(0),pe=S(!1),D=S(null),z=S(0),ie=S(!1),P=S(null),re=S("before"),ce=S(null),Re=S("before"),Le=S(null),fe=S(null),xe=S(!1),ae=S(!1),J=S(!1),se=S(null),X=S({checkpoints:[],samplers:[],sizes:[]}),ee=S({}),Ee=S(null),he=S(null),Q=S({}),le=S(!1),be=S(null),we=as({}),_e=Bt(()=>Object.keys(ee.value).length>0),Z=S(!1),W=S({primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}}),te={primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}},N=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)"}),I=ve=>{const oe=ve.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(oe){const[,ye,nt,Ht,hn]=oe,Pt=`#${((1<<24)+(parseInt(ye)<<16)+(parseInt(nt)<<8)+parseInt(Ht)).toString(16).slice(1)}`,un=hn?Math.round(parseFloat(hn)*100):100;return{hex:Pt,alpha:un}}return{hex:"#FFFFFF",alpha:100}},H=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},de=async()=>{try{await Ot.getTagMainGroup().then(ve=>{n.value=ve}).catch(ve=>{console.error(ve),ue({type:"warn",str:"message.networkError"})}),o.value&&await Ce(o.value.p_uuid),r.value&&await Ae(r.value.g_uuid)}catch(ve){console.error("Tag管理器列表失败:",ve)}},Ce=async ve=>{try{await Ot.getTagSubGroup(ve).then(oe=>{a.value=oe}).catch(oe=>{console.error(oe),ue({type:"warn",str:"message.networkError"})})}catch(oe){console.error("二级分类列表失败:",oe)}},Ae=async ve=>{try{await Ot.getTagList(ve).then(oe=>{s.value=oe;for(const ye of oe)(ye.image_status==="pending"||ye.image_status==="generating")&&$o(ye.t_uuid)}).catch(oe=>{console.error(oe),ue({type:"warn",str:"message.networkError"})})}catch(oe){console.error("Tag列表失败:",oe)}};jt(async()=>{Xn(),window.addEventListener("click",ii),window.addEventListener("resize",Xn),window.addEventListener("message",bs),window.addEventListener("keydown",ri),Ka(),H()}),Aa(()=>{window.removeEventListener("click",ii),window.removeEventListener("resize",Xn),window.removeEventListener("message",bs),window.removeEventListener("keydown",ri)});const U=async ve=>{o.value=ve,r.value=null,b.value=!1,w.value=[],await Ce(ve.p_uuid)},k=async ve=>{r.value=ve,b.value=!1,w.value=[],await Ae(ve.g_uuid)},j=ve=>{g.value=ve,m.value=!1,ct.value=I("rgba(255, 123, 2, .4)"),ve==="primary"?q.value={name:"",color:"rgba(255, 123, 2, .4)",groups:[]}:Y.value={name:"",color:"rgba(255, 123, 2, .4)",tags:[]},u.value=!0},ne=ve=>{m.value=!0,g.value="primary",q.value={...ve},ct.value=I(ve.color),u.value=!0},Fe=ve=>{m.value=!0,g.value="group",Y.value={...ve},ct.value=I(ve.color),u.value=!0},Oe=()=>{if(g.value==="primary"){if(!q.value.name){ue({type:"warn",str:"tagManager.categoryNameRequired"});return}m.value?n.value.findIndex(oe=>oe.id_index===q.value.id_index)!==-1&&Ot.editPrimaryCategory({id_index:q.value.id_index,name:q.value.name,color:q.value.color}).then(oe=>{oe.code===200?(H(),ue({type:"success",str:"message.editSuccess"})):oe.code===201?ue({type:"error",str:"message.editNameExist"}):ue({type:"error",str:"message.editFailed"})}).catch(oe=>{ue({type:"warn",str:"message.networkError"})}):Ot.addPrimaryCategory({name:q.value.name,color:q.value.color}).then(ve=>{ve.code===200?(H(),ue({type:"success",str:"message.addSuccess"})):ve.code===201?ue({type:"error",str:"message.editNameExist"}):ue({type:"error",str:"message.addFailed"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})})}else{if(!Y.value.name){ue({type:"warn",str:"tagManager.groupNameRequired"});return}m.value?Ot.editSubCategory({id_index:Y.value.id_index,name:Y.value.name,color:Y.value.color}).then(ve=>{ve.code===200?(H(),ue({type:"success",str:"message.editSuccess"})):ve.code===201?ue({type:"error",str:"message.editNameExist"}):ue({type:"error",str:"message.editFailed"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})}):Ot.addSubCategory({name:Y.value.name,color:Y.value.color,key:o.value.id_index,p_uuid:o.value.p_uuid}).then(ve=>{ve.code===200?(H(),ue({type:"success",str:"message.addSuccess"})):ve.code===201?ue({type:"error",str:"message.editNameExist"}):ue({type:"error",str:"message.editFailed"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})})}$e()},ge=()=>m.value?g.value==="primary"?t("tagManager.editPrimaryCategory"):t("tagManager.editSubCategory"):g.value==="primary"?t("tagManager.addPrimaryCategory"):t("tagManager.addSubCategory"),$e=()=>{u.value=!1,q.value={id:"",name:"",parentId:null,subCategories:[],backgroundColor:"transparent"},ct.value={hex:"#FFFFFF",alpha:0}},Ke=()=>{r.value&&(f.value=!1,$.value={id:"",text:"",desc:"",categoryId:r.value.id,g_uuid:r.value.g_uuid,backgroundColor:Y.value.color},ct.value=I(Y.value.color),d.value=!0)},tt=ve=>{f.value=!0,$.value={...ve},ct.value=I(ve.color),d.value=!0},it=()=>{if(!$.value.text||!$.value.desc){ue({type:"warn",str:"tagManager.textRequired"});return}f.value&&r.value?Ot.editTags({id_index:$.value.id_index,text:$.value.text,desc:$.value.desc,color:$.value.color}).then(ve=>{H(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.editSuccess"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})}):r.value&&Ot.addNewTags({id_index:r.value.id_index,g_uuid:r.value.g_uuid,text:$.value.text,desc:$.value.desc,color:$.value.color?$.value.color:"rgba(255, 123, 2, .4)"}).then(ve=>{H(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.addSuccess"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})}),bt()},bt=()=>{d.value=!1,$.value={text:"",desc:"",color:"rgba(255, 123, 2, .4)"},f.value=!1},ct=S({hex:"#FFFFFF",alpha:100}),rn=Bt(()=>In(ct.value.hex,ct.value.alpha)),Rt=()=>{const ve=In(ct.value.hex,ct.value.alpha);u.value?g.value==="primary"?q.value.color=ve:Y.value.color=ve:d.value&&($.value.color=ve)},In=(ve,oe)=>{const ye=parseInt(ve.slice(1,3),16),nt=parseInt(ve.slice(3,5),16),Ht=parseInt(ve.slice(5,7),16);return`rgba(${ye}, ${nt}, ${Ht}, ${oe/100})`},wn=S(""),Jt=S([]),ln=S(!1),Kn=async()=>{ln.value=wn.value.trim().length>0;const ve=wn.value.trim().toLowerCase();if(!ve){Jt.value=[];return}Jt.value=[],await Ot.searchTag(ve).then(oe=>{Jt.value=oe}).catch(oe=>{ue({type:"warn",str:"message.networkError"})})};It(wn,()=>{Kn()});const Co=async ve=>{const oe=n.value.find(ye=>ye.p_uuid===ve.p_uuid);oe&&await U(oe).then(async()=>{await wt(async()=>{const ye=a.value.find(nt=>nt.g_uuid===ve.g_uuid);ye&&await k(ye).then(async()=>{await wt(()=>{z.value==1&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:ve.text},"*"),D.value=ve.id_index,setTimeout(()=>{const nt=document.querySelector(".tag-wrapper.highlight");nt&&nt.scrollIntoView({behavior:"smooth",block:"center"})},100),setTimeout(()=>{D.value=null},5e3)})})})}),wn.value=""},mt=ve=>{if(!ve||ve==="transparent")return"var(--primary-text)";let oe,ye,nt,Ht=1;if(ve.startsWith("rgba")){const Pt=ve.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);Pt&&([,oe,ye,nt,Ht]=Pt.map(Number))}else if(ve.startsWith("rgb")){const Pt=ve.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);Pt&&([,oe,ye,nt]=Pt.map(Number))}return Ht<.5?"var(--primary-text)":(oe*299+ye*587+nt*114)/1e3>128?"#000000":"#ffffff"},Pe=ve=>{N.tagManager==="prompt"&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:ve.text},"*")},Ue=S(!1),At=S(""),Xt=S(null),ja=Bt(()=>{if(!Xt.value)return"";switch(At.value){case"category":return t("tagManager.deletePrimaryCategoryConfirm",{name:Xt.value.name});case"group":return t("tagManager.deleteGroupConfirm",{name:Xt.value.name});case"tag":return t("tagManager.deleteTagConfirm",{name:Xt.value.text});case"deleteSelected":return t("tagManager.confirmDeleteSelected");default:return""}}),xa=ve=>{At.value="category",Xt.value=ve,Ue.value=!0},Ga=ve=>{At.value="group",Xt.value=ve,Ue.value=!0},ni=ve=>{At.value="tag",Xt.value=ve,Ue.value=!0},ar=async()=>{try{switch(At.value){case"category":Ot.deletePrimaryCategory({p_uuid:Xt.value.p_uuid}).then(ve=>{H(),ue({type:"success",str:"message.deleteSuccess"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})});break;case"group":Ot.deleteSubCategory({g_uuid:Xt.value.g_uuid}).then(ve=>{H(),ue({type:"success",str:"message.deleteSuccess"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})});break;case"tag":Ot.deleteTags({id_index:Xt.value.id_index}).then(ve=>{H(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.deleteSuccess"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Ot.batchDeleteTags({id_indexs:w.value}).then(ve=>{H(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.deleteSuccess"})}).catch(ve=>{ue({type:"warn",str:"message.networkError"})});break}Po()}catch(ve){console.error("删除失败:",ve)}},qa=async ve=>{const oe=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${ve.name.replace(/'/g,"''")}', '${ve.color}', ${ve.create_time}, '${ve.p_uuid}');`;try{const ye=await Ot.getTagSubGroup(ve.p_uuid);let nt=[];nt.push(oe);for(const Pt of ye){const un=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${Pt.name.replace(/'/g,"''")}', '${Pt.color}', ${Pt.create_time}, '${Pt.p_uuid}', '${Pt.g_uuid}');`;nt.push(un);try{(await Ot.getTagList(Pt.g_uuid)).forEach(Zn=>{const fi=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Zn.text!=null&&Zn.text.length>0?Zn.text.replace(/'/g,"''"):""}', '${Zn.desc!=null&&Zn.desc.length>0?Zn.desc.replace(/'/g,"''"):""}', '${Zn.color}', ${Zn.create_time}, '${Zn.g_uuid}', '${za()}');`;nt.push(fi)})}catch(es){console.error("Tag列表失败:",es),ue({type:"warn",str:"message.shareTagError"})}}const Ht=new Blob([nt.join(`
`)],{type:"text/sql"}),hn=document.createElement("a");hn.href=URL.createObjectURL(Ht),hn.download=`${ve.name}_export_${Date.now()}.sql`,hn.click(),ue({type:"success",str:"tagManager.outputSuccess"})}catch(ye){console.error("二级分类列表失败:",ye),ue({type:"warn",str:"message.shareGroupError"})}},Ko=async ve=>{try{let oe=[];const ye=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${ve.name.replace(/'/g,"''")}', '${ve.color}', ${ve.create_time}, '${ve.p_uuid}', '${ve.g_uuid}');`;oe.push(ye);try{(await Ot.getTagList(ve.g_uuid)).forEach(Pt=>{const un=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Pt.text!=null&&Pt.text.length>0?Pt.text.replace(/'/g,"''"):""}', '${Pt.desc!=null&&Pt.desc.length>0?Pt.desc.replace(/'/g,"''"):""}', '${Pt.color}', ${Pt.create_time}, '${Pt.g_uuid}', '${za()}');`;oe.push(un)})}catch(hn){console.error("Tag列表失败:",hn),ue({type:"warn",str:"message.shareTagError"})}const nt=new Blob([oe.join(`
`)],{type:"text/sql"}),Ht=document.createElement("a");Ht.href=URL.createObjectURL(nt),Ht.download=`${ve.name}_export_${Date.now()}.sql`,Ht.click(),ue({type:"success",str:"tagManager.outputSuccess"})}catch(oe){console.error("二级分类列表失败:",oe),ue({type:"warn",str:"message.shareGroupError"})}},oi=ve=>{ce.value=ve.id_index,ie.value=!0},ai=async()=>{try{Ot.moveTag({id_index:ce.value,reference_id_index:P.value,position:re.value}).then(ve=>{H(),ie.value=!1,ue({type:"success",str:t("message.moveSuccess")})}).catch(ve=>{ue({type:"error",str:t("message.moveFailed")})})}catch(ve){console.error("移动标签失败:",ve),ue({type:"error",str:t("message.moveFailed")})}},Ro=S([]),Bn=S(1),xn=(ve,oe)=>{Bn.value=oe,oe===1?(Ro.value=n.value,Le.value=ve.id_index,T.value=!0):(Ro.value=a.value,Le.value=ve.id_index,T.value=!0)},_o=async()=>{if(Bn.value===1)try{Ot.moveMainGroup({id_index:Le.value,reference_id_index:fe.value,position:Re.value}).then(ve=>{H(),T.value=!1,ue({type:"success",str:t("message.moveSuccess")})}).catch(ve=>{ue({type:"error",str:t("message.moveFailed")})})}catch(ve){console.error("移动标签失败:",ve),ue({type:"error",str:t("message.moveFailed")})}else try{Ot.moveSubGroup({id_index:Le.value,reference_id_index:fe.value,position:Re.value}).then(ve=>{H(),T.value=!1,ue({type:"success",str:t("message.moveSuccess")})}).catch(ve=>{ue({type:"error",str:t("message.moveFailed")})})}catch(ve){console.error("移动标签失败:",ve),ue({type:"error",str:t("message.moveFailed")})}},Jo=()=>{b.value=!0,xe.value=!0},Jn=()=>{b.value=!1,xe.value=!1,w.value=[]},Xo=()=>{w.value.length!==0&&(At.value="deleteSelected",Xt.value={},Ue.value=!0)},uo=()=>{b.value=!0,ae.value=!0},pt=()=>{b.value=!1,ae.value=!1,w.value=[]},Eo=()=>{if(w.value.length===0){ue({type:"warn",str:"tagManager.noTagsSelected"});return}const ve={};w.value.forEach(nt=>{ve[nt.text]=nt.desc});const oe=new Blob([rh.dump(ve)],{type:"text/yaml"}),ye=document.createElement("a");ye.href=URL.createObjectURL(oe),ye.download=`selected_tags_export_${Date.now()}.yaml`,ye.click(),ue({type:"success",str:"tagManager.outputSuccess"}),pt()},Po=()=>{Ue.value=!1,At.value="",Xt.value=null},si=async()=>{try{await H()}catch(ve){console.error("刷新标签列表失败:",ve)}},Ya=S(),Qo=S({}),Xn=()=>{if(Ya.value){const ve=Ya.value.getBoundingClientRect();Qo.value={position:"fixed",top:`${ve.bottom}px`,left:`${ve.left}px`,width:`${ve.width}px`,zIndex:1e3}}},bs=ve=>{ve.data.type==="weilin_prompt_ui_window_change_tagManager_position"||ve.data.type==="weilin_prompt_ui_window_change_tagManager_size"||ve.data.type==="weilin_prompt_ui_window_change_tagManager_scroll"||ve.data.type==="weilin_prompt_ui_window_change_promptBox_position"||ve.data.type==="weilin_prompt_ui_window_change_promptBox_size"||ve.data.type==="weilin_prompt_ui_window_change_promptBox_scroll"?Xn():ve.data.type==="weilin_prompt_ui_window_change_click_outside"||ve.data.type==="weilin_prompt_ui_tag_manager_refresh"&&de()},ii=ve=>{ln.value&&!Ya.value.contains(ve.target)&&(ln.value=!1)},ri=ve=>{ve.key==="Escape"&&(ln.value=!1)},ws=ve=>{V.value==1&&(E.value="TabID-"+ve)},li=ve=>{E.value="None"},ui=ve=>{M.value==1&&(O.value="TabID-"+ve)},xs=ve=>{O.value="None"},Zo=S(),ci=()=>{Zo.value.open()},Ka=()=>{const ve=JSON.parse(JSON.stringify(te));try{const oe=localStorage.getItem("weilin_tag_manager_tab_size_config");if(oe){const ye=JSON.parse(oe);W.value={...ve,...ye}}else W.value={...ve}}catch(oe){console.error("读取标签尺寸配置失败:",oe),W.value={...ve}}},di=()=>{try{localStorage.setItem("weilin_tag_manager_tab_size_config",JSON.stringify(W.value)),ue({type:"success",str:"tagManager.tabSizeConfigSaved"}),Z.value=!1}catch(ve){console.error("保存标签尺寸配置失败:",ve),ue({type:"error",str:"tagManager.tabSizeConfigSaveFailed"})}},Ja=()=>{Z.value=!0},Xa=()=>{Z.value=!1,Ka()},Qa=()=>{const ve=JSON.parse(JSON.stringify(te));W.value={...ve}};function Ss(ve){const oe=we[ve]||0;return`/weilin/prompt_ui/api/tag_thumb/${ve}?v=${oe}`}function sr(ve){const oe=we[ve]||0;return`/weilin/prompt_ui/api/tag_image/${ve}?v=${oe}`}async function No(ve){if(!X.value.checkpoints.length)try{const oe=await Ot.getGenerationOptions();X.value=oe.data||oe||X.value}catch(oe){console.error("Failed to load generation options:",oe)}se.value=ve,J.value=!0}async function pi(ve){if(!X.value.checkpoints.length)try{const oe=await Ot.getGenerationOptions();X.value=oe.data||oe||X.value}catch(oe){console.error("Failed to load generation options:",oe);return}be.value=ve,J.value=!0}async function ir(){if(!s.value.filter(oe=>!oe.image_status||oe.image_status==="failed").length){alert("当前分组所有标签已有预览图");return}if(!X.value.checkpoints.length)try{const oe=await Ot.getGenerationOptions();X.value=oe.data||oe||X.value}catch(oe){console.error("Failed to load generation options:",oe);return}le.value=!0}async function Za(){try{const ve=await Ot.cancelAllTasks(),oe=(ve.data||ve).cancelled||0;ue.success(`已中止 ${oe} 个任务`);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(ve){ue.error("中止失败: "+(ve.message||"未知错误"))}}function Sa(){J.value=!1,se.value=null,be.value=null}async function Qn({task_id:ve,t_uuid:oe}){const ye=s.value.find(nt=>nt.t_uuid===oe);ye&&(ye.image_status="pending"),ea(ve,oe)}function Fo({task_ids:ve}){le.value=!1;for(const oe of ve){const ye=s.value.find(nt=>nt.t_uuid===oe.t_uuid);ye&&(ye.image_status="pending"),ea(oe.task_id,oe.t_uuid)}}function ea(ve,oe){ee.value[oe]&&clearInterval(ee.value[oe]);const ye=setInterval(async()=>{try{const nt=await Ot.getTagImageStatus(ve),Ht=nt.data||nt;(Ht.status==="ready"||Ht.status==="failed")&&(clearInterval(ye),delete ee.value[oe],await $o(oe))}catch(nt){console.error("Polling error:",nt)}},2e3);ee.value[oe]=ye}async function $o(ve){try{const oe=await Ot.getTagImageStatusByUuid(ve),ye=oe.data||oe,nt=s.value.find(Ht=>Ht.t_uuid===ve);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&&ea(ye.task_id,ve),ye.status==="ready"&&(we[ve]=Date.now(),delete Q.value[ve])}catch(oe){console.error("Failed to refresh tag image status:",oe)}}const yo=S({});function ta(ve,oe){ve.image_status!=="ready"||!ve.t_uuid||(clearTimeout(Ee.value),Ee.value=setTimeout(async()=>{he.value=ve.id_index,Q.value[ve.t_uuid]||(Q.value[ve.t_uuid]=sr(ve.t_uuid));const ye=oe.target.getBoundingClientRect();yo.value={left:ye.right+12+"px",top:ye.top+"px"}},200))}function rr(){clearTimeout(Ee.value),he.value=null}return(ve,oe)=>(C(),A("div",Qx,[i("div",Zx,[i("div",e8,[i("button",{class:"refresh-btn",onClick:si},oe[42]||(oe[42]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[i("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)])),i("div",t8,[Se(i("input",{type:"text","onUpdate:modelValue":oe[0]||(oe[0]=ye=>wn.value=ye),placeholder:v(t)("tagManager.searchPlaceholder"),class:"search-input",ref_key:"searchInput",ref:Ya,onInput:oe[1]||(oe[1]=ye=>ln.value=wn.value.trim().length>0)},null,40,n8),[[ze,wn.value]]),ln.value?(C(),A("div",{key:0,class:"search-results",style:Ft(Qo.value)},[Jt.value.length===0?(C(),A("div",o8,y(v(t)("tagManager.noResults")),1)):(C(!0),A(qe,{key:1},ot(Jt.value,(ye,nt)=>(C(),A("div",{key:`${nt}-search_item`,class:"search-result-item",onClick:Ht=>Co(ye)},[i("div",s8,[i("span",i8,y(ye.name||ye.text),1),i("span",r8,y(ye.where),1)])],8,a8))),128))],4)):Ie("",!0)]),i("button",{class:"import-btn",onClick:ci},y(v(t)("tagManager.importTags")),1)]),i("div",l8,[i("div",u8,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":oe[2]||(oe[2]=ye=>z.value=ye),"true-value":1,"false-value":0},null,512),[[on,z.value]]),ut(" "+y(v(t)("tagManager.autoAddSearchTag")),1)])]),i("button",{class:"tab-size-btn",onClick:Ja},y(v(t)("tagManager.modifyTabSize")),1)])]),i("div",c8,[i("div",d8,[i("div",p8,[(C(!0),A(qe,null,ot(n.value,(ye,nt)=>{var Ht,hn,Pt;return C(),A("div",{key:"Tabss-"+nt,class:We(["tab-item",{active:((Ht=o.value)==null?void 0:Ht.name)===ye.name}]),style:Ft({backgroundColor:((hn=o.value)==null?void 0:hn.name)===ye.name?"var(--primary-color)":ye.color,color:((Pt=o.value)==null?void 0:Pt.name)===ye.name?"#ffffff":mt(ye.color),width:W.value.primaryTab.width==="fit-content"?"fit-content":W.value.primaryTab.width+"px",height:W.value.primaryTab.height+"px",fontSize:W.value.primaryTab.fontSize+"px"}),onClick:un=>U(ye),onMouseenter:un=>ws(nt),onMouseleave:un=>li()},[i("span",g8,y(ye.name),1),E.value=="TabID-"+nt?(C(),A("div",m8,[i("button",{class:"action-btn move",onClick:vt(un=>xn(ye,1),["stop"]),title:v(t)("tagManager.moveGroup")},oe[43]||(oe[43]=[i("svg",{viewBox:"0 0 24 24",class:"move-icon"},[i("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)]),8,h8),i("button",{class:"action-btn edit",onClick:vt(un=>ne(ye),["stop"]),title:v(t)("tagManager.edit")},oe[44]||(oe[44]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("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,v8),i("button",{class:"action-btn share",onClick:vt(un=>qa(ye),["stop"]),title:v(t)("tagManager.share")},oe[45]||(oe[45]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("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,_8),i("button",{class:"action-btn delete",onClick:vt(un=>xa(ye),["stop"]),title:v(t)("tagManager.delete")},oe[46]||(oe[46]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("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,y8)])):Ie("",!0)],46,f8)}),128)),i("button",{class:"add-tab",onClick:oe[3]||(oe[3]=ye=>j("primary"))},[oe[47]||(oe[47]=i("span",{class:"plus-icon"},"+",-1)),ut(" "+y(v(t)("tagManager.addPrimaryCategory")),1)]),i("div",b8,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":oe[4]||(oe[4]=ye=>pe.value=ye)},null,512),[[on,pe.value]]),oe[48]||(oe[48]=ut(" 隐藏示意图 "))])]),i("div",w8,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":oe[5]||(oe[5]=ye=>V.value=ye),"true-value":1,"false-value":0},null,512),[[on,V.value]]),ut(" "+y(V.value==1?v(t)("tagManager.exitEditMode"):v(t)("tagManager.editGroupMode")),1)])])])]),o.value?(C(),A("div",x8,[i("div",S8,[(C(!0),A(qe,null,ot(a.value,(ye,nt)=>{var Ht,hn,Pt;return C(),A("div",{key:"TabsSw-"+nt,class:We(["tab-item",{active:((Ht=r.value)==null?void 0:Ht.name)===ye.name}]),style:Ft({backgroundColor:((hn=r.value)==null?void 0:hn.name)===ye.name?"var(--primary-color)":ye.color,color:((Pt=r.value)==null?void 0:Pt.name)===ye.name?"#ffffff":mt(ye.color),width:W.value.groupTab.width==="fit-content"?"fit-content":W.value.groupTab.width+"px",height:W.value.groupTab.height+"px",fontSize:W.value.groupTab.fontSize+"px"}),onClick:un=>k(ye),onMouseenter:un=>ui(nt),onMouseleave:un=>xs()},[i("span",k8,y(ye.name),1),O.value=="TabID-"+nt?(C(),A("div",C8,[i("button",{class:"action-btn move",onClick:vt(un=>xn(ye,2),["stop"]),title:v(t)("tagManager.moveGroup")},oe[49]||(oe[49]=[i("svg",{viewBox:"0 0 24 24",class:"move-icon"},[i("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)]),8,E8),i("button",{class:"action-btn edit",onClick:vt(un=>Fe(ye),["stop"]),title:v(t)("tagManager.edit")},oe[50]||(oe[50]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("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,$8),i("button",{class:"action-btn delete",onClick:vt(un=>Ga(ye),["stop"]),title:v(t)("tagManager.delete")},oe[51]||(oe[51]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("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,I8),i("button",{class:"action-btn share",onClick:vt(un=>Ko(ye),["stop"]),title:v(t)("tagManager.share")},oe[52]||(oe[52]=[i("svg",{viewBox:"0 0 24 24",class:"action-icon"},[i("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,A8)])):Ie("",!0)],46,T8)}),128)),o.value?(C(),A("button",{key:0,class:"add-tab",onClick:oe[6]||(oe[6]=ye=>j("group"))},[oe[53]||(oe[53]=i("span",{class:"plus-icon"},"+",-1)),ut(" "+y(v(t)("tagManager.addGroup")),1)])):Ie("",!0),i("div",L8,[i("label",null,[Se(i("input",{type:"checkbox","onUpdate:modelValue":oe[7]||(oe[7]=ye=>M.value=ye),"true-value":1,"false-value":0},null,512),[[on,M.value]]),ut(" "+y(M.value==1?v(t)("tagManager.exitEditMode"):v(t)("tagManager.editGroupMode")),1)])])])])):Ie("",!0)]),i("div",M8,[i("div",D8,[i("div",O8,y(r.value?r.value.name:v(t)("tagManager.selectCategory")),1),i("div",R8,[i("button",{class:"add-btn",onClick:Ke,disabled:!r.value},[oe[54]||(oe[54]=i("span",{class:"plus-icon"},"+",-1)),ut(" "+y(v(t)("tagManager.addTag")),1)],8,P8),i("button",{class:"add-btn batch-generate-btn",onClick:ir,disabled:!r.value},[(C(),A("svg",F8,oe[55]||(oe[55]=[i("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)]))),oe[56]||(oe[56]=ut(" 一键生成 "))],8,N8),i("button",{class:"add-btn cancel-generate-btn",onClick:Za,disabled:!_e.value},[(C(),A("svg",U8,oe[57]||(oe[57]=[i("path",{d:"M6 6h12v12H6V6z"},null,-1)]))),oe[58]||(oe[58]=ut(" 中止生成 "))],8,B8),ae.value?(C(),A("button",{key:0,class:"share-selected-btn",onClick:Eo,disabled:!w.value.length},y(v(t)("tagManager.shareSelected")),9,z8)):(C(),A("button",{key:1,class:"share-btn",onClick:uo,disabled:!r.value},y(v(t)("tagManager.batchShare")),9,V8)),ae.value?(C(),A("button",{key:2,class:"cancel-delete-btn",onClick:pt},y(v(t)("tagManager.cancelShare")),1)):Ie("",!0),xe.value?(C(),A("button",{key:3,class:"delete-btn",onClick:Xo,disabled:!w.value.length},y(v(t)("tagManager.deleteSelected")),9,W8)):(C(),A("button",{key:4,class:"delete-action-btn",onClick:Jo,disabled:!r.value},y(v(t)("tagManager.hasDeleteAction")),9,H8)),xe.value?(C(),A("button",{key:5,class:"cancel-delete-btn",onClick:Jn},y(v(t)("tagManager.cancelDelete")),1)):Ie("",!0)])]),r.value?(C(),A("div",j8,[(C(!0),A(qe,null,ot(s.value,ye=>(C(),A("div",{key:"tag-grid-"+ye.id_index,class:We(D.value===ye.id_index?"tag-wrapper highlight":"tag-wrapper")},[Se(i("div",{class:"tag-thumb-area",onMouseenter:nt=>ta(ye,nt),onMouseleave:rr},[ye.image_status==="ready"&&ye.t_uuid?(C(),A("div",q8,[i("img",{class:"tag-thumb-img",src:Ss(ye.t_uuid),alt:"preview",loading:"lazy"},null,8,Y8),i("button",{class:"tag-thumb-regen-btn",onClick:vt(nt=>pi(ye),["stop"]),title:"重新生成"},oe[59]||(oe[59]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor"},[i("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,K8)])):ye.image_status==="pending"||ye.image_status==="generating"?(C(),A("div",J8,[oe[60]||(oe[60]=i("div",{class:"tag-thumb-spinner"},null,-1)),i("span",null,y(ye.image_status==="pending"?"排队中…":"生成中…"),1)])):ye.image_status==="failed"?(C(),A("div",{key:2,class:"tag-thumb-placeholder tag-thumb-failed",onClick:vt(nt=>No(ye),["stop"]),title:"生成失败,点击重试"},oe[61]||(oe[61]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"#ff6b6b"},[i("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),i("span",null,"重试",-1)]),8,X8)):(C(),A("div",{key:3,class:"tag-thumb-placeholder tag-thumb-empty",onClick:vt(nt=>No(ye),["stop"]),title:"生成预览图"},oe[62]||(oe[62]=[i("svg",{viewBox:"0 0 24 24",width:"28",height:"28",fill:"currentColor",opacity:"0.5"},[i("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),i("span",null,"生成",-1)]),8,Q8))],40,G8),[[Ns,!pe.value]]),he.value===ye.id_index&&Q.value[ye.t_uuid]?(C(),A("div",{key:0,class:"tag-thumb-overlay",style:Ft(yo.value)},[i("img",{src:Q.value[ye.t_uuid],class:"tag-thumb-full"},null,8,Z8)],4)):Ie("",!0),i("div",{class:"tag-content",onClick:nt=>Pe(ye)},[i("div",{class:"tag-main",style:Ft({backgroundColor:ye.color||"transparent"})},[ut(y(ye.desc)+" ",1),i("div",t7,[i("button",{class:"action-btn move",onClick:vt(nt=>oi(ye),["stop"]),title:v(t)("tagManager.moveTag")},oe[63]||(oe[63]=[i("svg",{viewBox:"0 0 24 24",class:"move-icon"},[i("path",{d:"M13 6v3h8V6h-8zm0 5v3h8v-3h-8zm-8 5v3h8v-3H5zm0-5v3h8v-3H5zm0-5v3h8V6H5z"})],-1)]),8,n7),i("button",{class:"action-btn edit",onClick:vt(nt=>tt(ye),["stop"]),title:v(t)("tagManager.editTag")},oe[64]||(oe[64]=[i("svg",{viewBox:"0 0 24 24",class:"edit-icon"},[i("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,o7),i("button",{class:"action-btn delete",onClick:vt(nt=>ni(ye),["stop"]),title:v(t)("tagManager.deleteTag")},oe[65]||(oe[65]=[i("svg",{viewBox:"0 0 24 24",class:"delete-icon"},[i("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,a7)])],4),i("div",s7,y(ye.text),1)],8,e7),b.value?Se((C(),A("input",{key:1,type:"checkbox","onUpdate:modelValue":oe[8]||(oe[8]=nt=>w.value=nt),value:ye,class:"tag-checkbox"},null,8,i7)),[[on,w.value]]):Ie("",!0)],2))),128))])):Ie("",!0)]),u.value?(C(),A("div",r7,[i("div",{class:"weilin-tools-dialog-content",onMousedown:oe[13]||(oe[13]=vt(()=>{},["stop"]))},[i("div",l7,[i("h2",null,y(ge()),1),i("button",{class:"close-btn",onClick:$e},"×")]),i("div",u7,[g.value=="primary"?(C(),A("div",c7,[i("label",null,y(v(t)("tagManager.categoryName")),1),Se(i("input",{type:"text","onUpdate:modelValue":oe[9]||(oe[9]=ye=>q.value.name=ye),placeholder:v(t)("tagManager.categoryNamePlaceholder"),onKeyup:Pn(Oe,["enter"])},null,40,d7),[[ze,q.value.name]])])):Ie("",!0),g.value=="group"?(C(),A("div",p7,[i("label",null,y(v(t)("tagManager.groupName")),1),Se(i("input",{type:"text","onUpdate:modelValue":oe[10]||(oe[10]=ye=>Y.value.name=ye),placeholder:v(t)("tagManager.groupNamePlaceholder"),onKeyup:Pn(Oe,["enter"])},null,40,f7),[[ze,Y.value.name]])])):Ie("",!0),i("div",g7,[i("label",null,y(v(t)("tagManager.backgroundColor")),1),i("div",m7,[i("div",{class:"color-preview",style:Ft({backgroundColor:rn.value})},null,4),i("div",h7,[Se(i("input",{type:"color","onUpdate:modelValue":oe[11]||(oe[11]=ye=>ct.value.hex=ye),onInput:Rt,class:"color-input"},null,544),[[ze,ct.value.hex]]),i("div",v7,[Se(i("input",{type:"range","onUpdate:modelValue":oe[12]||(oe[12]=ye=>ct.value.alpha=ye),min:"0",max:"100",onInput:Rt,class:"alpha-slider"},null,544),[[ze,ct.value.alpha,void 0,{number:!0}]]),i("span",_7,y(ct.value.alpha)+"%",1)])])])])]),i("div",y7,[i("button",{class:"cancel-btn",onClick:$e},y(v(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Oe},y(v(t)("common.confirm")),1)])],32)])):Ie("",!0),d.value?(C(),A("div",b7,[i("div",{class:"weilin-tools-dialog-content",onMousedown:oe[18]||(oe[18]=vt(()=>{},["stop"]))},[i("div",w7,[i("h2",null,y(f.value?v(t)("tagManager.editTag"):v(t)("tagManager.addTag")),1),i("button",{class:"close-btn",onClick:bt},"×")]),i("div",x7,[i("div",S7,[i("label",null,y(v(t)("tagManager.text")),1),Se(i("input",{type:"text","onUpdate:modelValue":oe[14]||(oe[14]=ye=>$.value.desc=ye),placeholder:v(t)("tagManager.textPlaceholder")},null,8,T7),[[ze,$.value.desc]])]),i("div",k7,[i("label",null,y(v(t)("tagManager.description")),1),Se(i("textarea",{"onUpdate:modelValue":oe[15]||(oe[15]=ye=>$.value.text=ye),placeholder:v(t)("tagManager.descriptionPlaceholder"),rows:"4"}," ",8,C7),[[ze,$.value.text]])]),i("div",E7,[i("label",null,y(v(t)("tagManager.backgroundColor")),1),i("div",$7,[i("div",{class:"color-preview",style:Ft({backgroundColor:rn.value})},null,4),i("div",I7,[Se(i("input",{type:"color","onUpdate:modelValue":oe[16]||(oe[16]=ye=>ct.value.hex=ye),onInput:Rt,class:"color-input"},null,544),[[ze,ct.value.hex]]),i("div",A7,[Se(i("input",{type:"range","onUpdate:modelValue":oe[17]||(oe[17]=ye=>ct.value.alpha=ye),min:"0",max:"100",onInput:Rt,class:"alpha-slider"},null,544),[[ze,ct.value.alpha,void 0,{number:!0}]]),i("span",L7,y(ct.value.alpha)+"%",1)])])])])]),i("div",M7,[i("button",{class:"cancel-btn",onClick:bt},y(v(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:it},y(v(t)("common.confirm")),1)])],32)])):Ie("",!0),Ue.value?(C(),A("div",D7,[i("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:oe[19]||(oe[19]=vt(()=>{},["stop"]))},[i("div",O7,[i("h2",null,y(v(t)("common.confirmDelete")),1),i("button",{class:"close-btn",onClick:Po},"×")]),i("div",R7,[i("p",P7,y(ja.value),1)]),i("div",N7,[i("button",{class:"cancel-btn",onClick:Po},y(v(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:ar},y(v(t)("common.delete")),1)])],32)])):Ie("",!0),ie.value?(C(),A("div",F7,[i("div",B7,[i("div",U7,[i("h2",null,y(v(t)("tagManager.moveTag")),1),i("button",{class:"close-btn",onClick:oe[20]||(oe[20]=ye=>ie.value=!1)},"×")]),i("div",z7,[i("div",V7,[i("label",null,y(v(t)("tagManager.targetTag")),1),Se(i("select",{"onUpdate:modelValue":oe[21]||(oe[21]=ye=>P.value=ye),class:"form-select"},[(C(!0),A(qe,null,ot(s.value,ye=>(C(),A("option",{key:ye.id_index,value:ye.id_index},y(ye.desc+" --> "+ye.text),9,W7))),128))],512),[[an,P.value]])]),i("div",H7,[i("label",null,y(v(t)("tagManager.movePosition")),1),i("div",j7,[i("label",null,[Se(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":oe[22]||(oe[22]=ye=>re.value=ye),value:"before"},null,512),[[fa,re.value]]),ut(" "+y(v(t)("tagManager.moveBefore")),1)]),i("label",null,[Se(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":oe[23]||(oe[23]=ye=>re.value=ye),value:"after"},null,512),[[fa,re.value]]),ut(" "+y(v(t)("tagManager.moveAfter")),1)])])])]),i("div",G7,[i("button",{class:"cancel-btn",onClick:oe[24]||(oe[24]=ye=>ie.value=!1)},y(v(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:ai},y(v(t)("common.confirm")),1)])])])):Ie("",!0),T.value?(C(),A("div",q7,[i("div",Y7,[i("div",K7,[i("h2",null,y(v(t)("tagManager.moveGroup")),1),i("button",{class:"close-btn",onClick:oe[25]||(oe[25]=ye=>T.value=!1)},"×")]),i("div",J7,[i("div",X7,[i("label",null,y(v(t)("tagManager.targetGroup")),1),Se(i("select",{"onUpdate:modelValue":oe[26]||(oe[26]=ye=>fe.value=ye),class:"form-select"},[(C(!0),A(qe,null,ot(Ro.value,(ye,nt)=>(C(),A("option",{key:"group_move_id"+nt,value:ye.id_index},y(ye.name),9,Q7))),128))],512),[[an,fe.value]])]),i("div",Z7,[i("label",null,y(v(t)("tagManager.movePosition")),1),i("div",e9,[i("label",null,[Se(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":oe[27]||(oe[27]=ye=>Re.value=ye),value:"before"},null,512),[[fa,Re.value]]),ut(" "+y(v(t)("tagManager.moveGroupBefore")),1)]),i("label",null,[Se(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":oe[28]||(oe[28]=ye=>Re.value=ye),value:"after"},null,512),[[fa,Re.value]]),ut(" "+y(v(t)("tagManager.moveGroupAfter")),1)])])])]),i("div",t9,[i("button",{class:"cancel-btn",onClick:oe[29]||(oe[29]=ye=>T.value=!1)},y(v(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:_o},y(v(t)("common.confirm")),1)])])])):Ie("",!0),Z.value?(C(),A("div",n9,[i("div",{class:"weilin-tools-dialog-content tab-size-weilin-tools-dialog",onMousedown:oe[40]||(oe[40]=vt(()=>{},["stop"]))},[i("div",o9,[i("h2",null,y(v(t)("tagManager.tabSizeConfig")),1),i("button",{class:"close-btn",onClick:Xa},"×")]),i("div",a9,[i("div",s9,[i("h3",null,y(v(t)("tagManager.primaryTabConfig")),1),i("div",i9,[i("label",null,y(v(t)("tagManager.tabWidth")),1),i("div",r9,[i("label",l9,[Se(i("input",{type:"radio","onUpdate:modelValue":oe[30]||(oe[30]=ye=>W.value.primaryTab.width=ye),value:"fit-content"},null,512),[[fa,W.value.primaryTab.width]]),ut(" "+y(v(t)("tagManager.fitContent")),1)]),i("label",u9,[Se(i("input",{type:"radio","onUpdate:modelValue":oe[31]||(oe[31]=ye=>W.value.primaryTab.width=ye),value:"custom"},null,512),[[fa,W.value.primaryTab.width]]),ut(" "+y(v(t)("tagManager.customWidth")),1)]),W.value.primaryTab.width!=="fit-content"?Se((C(),A("input",{key:0,type:"number","onUpdate:modelValue":oe[32]||(oe[32]=ye=>W.value.primaryTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[ze,W.value.primaryTab.width,void 0,{number:!0}]]):Ie("",!0)])]),i("div",c9,[i("label",null,y(v(t)("tagManager.tabHeight"))+" ("+y(W.value.primaryTab.height)+"px)",1),Se(i("input",{type:"range","onUpdate:modelValue":oe[33]||(oe[33]=ye=>W.value.primaryTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[ze,W.value.primaryTab.height,void 0,{number:!0}]])]),i("div",d9,[i("label",null,y(v(t)("tagManager.fontSize"))+" ("+y(W.value.primaryTab.fontSize)+"px)",1),Se(i("input",{type:"range","onUpdate:modelValue":oe[34]||(oe[34]=ye=>W.value.primaryTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[ze,W.value.primaryTab.fontSize,void 0,{number:!0}]])])]),i("div",p9,[i("h3",null,y(v(t)("tagManager.groupTabConfig")),1),i("div",f9,[i("label",null,y(v(t)("tagManager.tabWidth")),1),i("div",g9,[i("label",m9,[Se(i("input",{type:"radio","onUpdate:modelValue":oe[35]||(oe[35]=ye=>W.value.groupTab.width=ye),value:"fit-content"},null,512),[[fa,W.value.groupTab.width]]),ut(" "+y(v(t)("tagManager.fitContent")),1)]),i("label",h9,[Se(i("input",{type:"radio","onUpdate:modelValue":oe[36]||(oe[36]=ye=>W.value.groupTab.width=ye),value:"custom"},null,512),[[fa,W.value.groupTab.width]]),ut(" "+y(v(t)("tagManager.customWidth")),1)]),W.value.groupTab.width!=="fit-content"?Se((C(),A("input",{key:0,type:"number","onUpdate:modelValue":oe[37]||(oe[37]=ye=>W.value.groupTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[ze,W.value.groupTab.width,void 0,{number:!0}]]):Ie("",!0)])]),i("div",v9,[i("label",null,y(v(t)("tagManager.tabHeight"))+" ("+y(W.value.groupTab.height)+"px)",1),Se(i("input",{type:"range","onUpdate:modelValue":oe[38]||(oe[38]=ye=>W.value.groupTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[ze,W.value.groupTab.height,void 0,{number:!0}]])]),i("div",_9,[i("label",null,y(v(t)("tagManager.fontSize"))+" ("+y(W.value.groupTab.fontSize)+"px)",1),Se(i("input",{type:"range","onUpdate:modelValue":oe[39]||(oe[39]=ye=>W.value.groupTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[ze,W.value.groupTab.fontSize,void 0,{number:!0}]])])])]),i("div",y9,[i("button",{class:"reset-btn",onClick:Qa},y(v(t)("tagManager.resetDefault")),1),i("button",{class:"cancel-btn",onClick:Xa},y(v(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:di},y(v(t)("common.confirm")),1)])],32)])):Ie("",!0),at(dx,{ref_key:"importTagDialogItem",ref:Zo},null,512),at(Ax,{visible:J.value,tag:se.value||be.value,options:X.value,mode:be.value?"regenerate":"generate",onClose:Sa,onGenerated:Qn},null,8,["visible","tag","options","mode"]),at(Xx,{visible:le.value,tags:s.value,options:X.value,onClose:oe[41]||(oe[41]=ye=>le.value=!1),onGenerated:Fo},null,8,["visible","tags","options"])]))}},[["__scopeId","data-v-9378c73b"]]),Tl=100,uh=S(""),wa=S({}),st={setActiveWindow(e){uh.value!==e&&(uh.value=e,Object.keys(wa.value).forEach(t=>{wa.value[t]=Tl}),wa.value[e]=Tl+10)},getZIndex(e){return wa.value[e]||(wa.value[e]=Tl),wa.value[e]},registerWindow(e){wa.value[e]||(wa.value[e]=Tl)},unregisterWindow(e){delete wa.value[e]}},vo={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}})};function kl(e){"@babel/helpers - typeof";return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(e)}var b9=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/,ch={name:"JsonString",props:{jsonValue:{type:String,required:!0}},data:function(){return{expand:!0,canExtend:!1}},mounted:function(){this.$refs.itemRef.offsetHeight>this.$refs.holderRef.offsetHeight&&(this.canExtend=!0)},methods:{toggle:function(){this.expand=!this.expand}},render:function(){var t=this.jsonValue,n=b9.test(t),o;return this.expand?(o={class:{"jv-item":!0,"jv-string":!0},ref:"itemRef"},n?(t='<a href="'.concat(t,'" target="_blank" class="jv-link">').concat(t,"</a>"),o.innerHTML='"'.concat(t.toString(),'"')):o.innerText='"'.concat(t.toString(),'"')):o={class:{"jv-ellipsis":!0},onClick:this.toggle,innerText:"..."},zt("span",{},[this.canExtend&&zt("span",{class:{"jv-toggle":!0,open:this.expand},onClick:this.toggle}),zt("span",{class:{"jv-holder-node":!0},ref:"holderRef"}),zt("span",o)])}};ch.__file="src/Components/types/json-string.vue";var dh={name:"JsonUndefined",functional:!0,props:{jsonValue:{type:Object,default:null}},render:function(){return zt("span",{class:{"jv-item":!0,"jv-undefined":!0},innerText:this.jsonValue===null?"null":"undefined"})}};dh.__file="src/Components/types/json-undefined.vue";var ph={name:"JsonNumber",functional:!0,props:{jsonValue:{type:Number,required:!0}},render:function(){var t=Number.isInteger(this.jsonValue);return zt("span",{class:{"jv-item":!0,"jv-number":!0,"jv-number-integer":t,"jv-number-float":!t},innerText:this.jsonValue.toString()})}};ph.__file="src/Components/types/json-number.vue";var fh={name:"JsonBoolean",functional:!0,props:{jsonValue:Boolean},render:function(){return zt("span",{class:{"jv-item":!0,"jv-boolean":!0},innerText:this.jsonValue.toString()})}};fh.__file="src/Components/types/json-boolean.vue";var gh={name:"JsonObject",props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean,previewMode:Boolean},data:function(){return{value:{}}},computed:{ordered:function(){var t=this;if(!this.sort)return this.value;var n={};return Object.keys(this.value).sort().forEach(function(o){n[o]=t.value[o]}),n}},watch:{jsonValue:function(t){this.setValue(t)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(t){var n=this;setTimeout(function(){n.value=t},0)},toggle:function(){this.$emit("update:expand",!this.expand),this.dispatchEvent()},dispatchEvent:function(){try{this.$el.dispatchEvent(new Event("resized"))}catch{var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(){var t=[];if(!this.previewMode&&!this.keyName&&t.push(zt("span",{class:{"jv-toggle":!0,open:!!this.expand},onClick:this.toggle})),t.push(zt("span",{class:{"jv-item":!0,"jv-object":!0},innerText:"{"})),this.expand){for(var n in this.ordered)if(this.ordered.hasOwnProperty(n)){var o=this.ordered[n];t.push(zt(Cl,{key:n,style:{display:this.expand?void 0:"none"},sort:this.sort,keyName:n,depth:this.depth+1,value:o,previewMode:this.previewMode}))}}return!this.expand&&Object.keys(this.value).length&&t.push(zt("span",{style:{display:this.expand?"none":void 0},class:{"jv-ellipsis":!0},onClick:this.toggle,title:"click to reveal object content (keys: ".concat(Object.keys(this.ordered).join(", "),")"),innerText:"..."})),t.push(zt("span",{class:{"jv-item":!0,"jv-object":!0},innerText:"}"})),zt("span",t)}};gh.__file="src/Components/types/json-object.vue";var mh={name:"JsonArray",props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,previewMode:Boolean},data:function(){return{value:[]}},watch:{jsonValue:function(t){this.setValue(t)}},mounted:function(){this.setValue(this.jsonValue)},methods:{setValue:function(t){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;o===0&&(this.value=[]),setTimeout(function(){t.length>o&&(n.value.push(t[o]),n.setValue(t,o+1))},0)},toggle:function(){this.$emit("update:expand",!this.expand);try{this.$el.dispatchEvent(new Event("resized"))}catch{var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(){var t=this,n=[];return!this.previewMode&&!this.keyName&&n.push(zt("span",{class:{"jv-toggle":!0,open:!!this.expand},onClick:this.toggle})),n.push(zt("span",{class:{"jv-item":!0,"jv-array":!0},innerText:"["})),this.expand&&this.value.forEach(function(o,a){n.push(zt(Cl,{key:a,style:{display:t.expand?void 0:"none"},sort:t.sort,depth:t.depth+1,value:o,previewMode:t.previewMode}))}),!this.expand&&this.value.length&&n.push(zt("span",{style:{display:void 0},class:{"jv-ellipsis":!0},onClick:this.toggle,title:"click to reveal ".concat(this.value.length," hidden items"),innerText:"..."})),n.push(zt("span",{class:{"jv-item":!0,"jv-array":!0},innerText:"]"})),zt("span",n)}};mh.__file="src/Components/types/json-array.vue";var hh={name:"JsonFunction",functional:!0,props:{jsonValue:{type:Function,required:!0}},render:function(){return zt("span",{class:{"jv-item":!0,"jv-function":!0},attrs:{title:this.jsonValue.toString()},innerHTML:"&lt;function&gt;"})}};hh.__file="src/Components/types/json-function.vue";var vh={name:"JsonDate",inject:["timeformat"],functional:!0,props:{jsonValue:{type:Date,required:!0}},render:function(){var t=this.jsonValue,n=this.timeformat;return zt("span",{class:{"jv-item":!0,"jv-string":!0},innerText:'"'.concat(n(t),'"')})}};vh.__file="src/Components/types/json-date.vue";var w9=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/,_h={name:"JsonString",props:{jsonValue:{type:RegExp,required:!0}},data:function(){return{expand:!0,canExtend:!1}},mounted:function(){this.$refs.itemRef.offsetHeight>this.$refs.holderRef.offsetHeight&&(this.canExtend=!0)},methods:{toggle:function(){this.expand=!this.expand}},render:function(){var t=this.jsonValue,n=w9.test(t),o;return this.expand?(o={class:{"jv-item":!0,"jv-string":!0},ref:"itemRef"},n?(t='<a href="'.concat(t,'" target="_blank" class="jv-link">').concat(t,"</a>"),o.innerHTML="".concat(t.toString())):o.innerText="".concat(t.toString())):o={class:{"jv-ellipsis":!0},onClick:this.toggle,innerText:"..."},zt("span",{},[this.canExtend&&zt("span",{class:{"jv-toggle":!0,open:this.expand},onClick:this.toggle}),zt("span",{class:{"jv-holder-node":!0},ref:"holderRef"}),zt("span",o)])}};_h.__file="src/Components/types/json-regexp.vue";var Cl={name:"JsonBox",inject:["expandDepth","keyClick"],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},data:function(){return{expand:!0}},mounted:function(){this.expand=this.previewMode||!(this.depth>=this.expandDepth)},methods:{toggle:function(){this.expand=!this.expand;try{this.$el.dispatchEvent(new Event("resized"))}catch{var t=document.createEvent("Event");t.initEvent("resized",!0,!1),this.$el.dispatchEvent(t)}}},render:function(){var t=this,n=[],o;this.value===null||this.value===void 0?o=dh:Array.isArray(this.value)?o=mh:Object.prototype.toString.call(this.value)==="[object Date]"?o=vh:kl(this.value)==="object"?o=gh:typeof this.value=="number"?o=ph:typeof this.value=="string"?o=ch:typeof this.value=="boolean"?o=fh:typeof this.value=="function"&&(o=hh),this.value.constructor===RegExp&&(o=_h);var a=this.keyName&&this.value&&(Array.isArray(this.value)||kl(this.value)==="object"&&Object.prototype.toString.call(this.value)!=="[object Date]");return!this.previewMode&&a&&n.push(zt("span",{class:{"jv-toggle":!0,open:!!this.expand},onClick:this.toggle})),this.keyName&&n.push(zt("span",{class:{"jv-key":!0},onClick:function(){t.keyClick(t.keyName)},innerText:"".concat(this.keyName,":")})),n.push(zt(o,{class:{"jv-push":!0},jsonValue:this.value,keyName:this.keyName,sort:this.sort,depth:this.depth,expand:this.expand,previewMode:this.previewMode,"onUpdate:expand":function(r){t.expand=r}})),zt("div",{class:{"jv-node":!0,"jv-key-node":!!this.keyName&&!a,toggle:!this.previewMode&&a}},n)}};Cl.__file="src/Components/json-box.vue";var x9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S9(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yh={exports:{}};(function(e,t){(function(o,a){e.exports=a()})(x9,function(){return function(){var n={686:function(s,r,u){u.d(r,{default:function(){return Q}});var d=u(279),m=u.n(d),f=u(370),g=u.n(f),w=u(817),b=u.n(w);function T(le){try{return document.execCommand(le)}catch{return!1}}var E=function(be){var we=b()(be);return T("cut"),we},O=E;function M(le){var be=document.documentElement.getAttribute("dir")==="rtl",we=document.createElement("textarea");we.style.fontSize="12pt",we.style.border="0",we.style.padding="0",we.style.margin="0",we.style.position="absolute",we.style[be?"right":"left"]="-9999px";var _e=window.pageYOffset||document.documentElement.scrollTop;return we.style.top="".concat(_e,"px"),we.setAttribute("readonly",""),we.value=le,we}var V=function(be,we){var _e=M(be);we.container.appendChild(_e);var Z=b()(_e);return T("copy"),_e.remove(),Z},pe=function(be){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},_e="";return typeof be=="string"?_e=V(be,we):be instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(be==null?void 0:be.type)?_e=V(be.value,we):(_e=b()(be),T("copy")),_e},D=pe;function z(le){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z=function(we){return typeof we}:z=function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},z(le)}var ie=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},we=be.action,_e=we===void 0?"copy":we,Z=be.container,W=be.target,te=be.text;if(_e!=="copy"&&_e!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(W!==void 0)if(W&&z(W)==="object"&&W.nodeType===1){if(_e==="copy"&&W.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(_e==="cut"&&(W.hasAttribute("readonly")||W.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(te)return D(te,{container:Z});if(W)return _e==="cut"?O(W):D(W,{container:Z})},P=ie;function re(le){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?re=function(we){return typeof we}:re=function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},re(le)}function ce(le,be){if(!(le instanceof be))throw new TypeError("Cannot call a class as a function")}function Re(le,be){for(var we=0;we<be.length;we++){var _e=be[we];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(le,_e.key,_e)}}function Le(le,be,we){return be&&Re(le.prototype,be),we&&Re(le,we),le}function fe(le,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(be&&be.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),be&&xe(le,be)}function xe(le,be){return xe=Object.setPrototypeOf||function(_e,Z){return _e.__proto__=Z,_e},xe(le,be)}function ae(le){var be=X();return function(){var _e=ee(le),Z;if(be){var W=ee(this).constructor;Z=Reflect.construct(_e,arguments,W)}else Z=_e.apply(this,arguments);return J(this,Z)}}function J(le,be){return be&&(re(be)==="object"||typeof be=="function")?be:se(le)}function se(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}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(le){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(we){return we.__proto__||Object.getPrototypeOf(we)},ee(le)}function Ee(le,be){var we="data-clipboard-".concat(le);if(be.hasAttribute(we))return be.getAttribute(we)}var he=function(le){fe(we,le);var be=ae(we);function we(_e,Z){var W;return ce(this,we),W=be.call(this),W.resolveOptions(Z),W.listenClick(_e),W}return Le(we,[{key:"resolveOptions",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Z.action=="function"?Z.action:this.defaultAction,this.target=typeof Z.target=="function"?Z.target:this.defaultTarget,this.text=typeof Z.text=="function"?Z.text:this.defaultText,this.container=re(Z.container)==="object"?Z.container:document.body}},{key:"listenClick",value:function(Z){var W=this;this.listener=g()(Z,"click",function(te){return W.onClick(te)})}},{key:"onClick",value:function(Z){var W=Z.delegateTarget||Z.currentTarget,te=this.action(W)||"copy",N=P({action:te,container:this.container,target:this.target(W),text:this.text(W)});this.emit(N?"success":"error",{action:te,text:N,trigger:W,clearSelection:function(){W&&W.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Z){return Ee("action",Z)}},{key:"defaultTarget",value:function(Z){var W=Ee("target",Z);if(W)return document.querySelector(W)}},{key:"defaultText",value:function(Z){return Ee("text",Z)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Z){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return D(Z,W)}},{key:"cut",value:function(Z){return O(Z)}},{key:"isSupported",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof Z=="string"?[Z]:Z,te=!!document.queryCommandSupported;return W.forEach(function(N){te=te&&!!document.queryCommandSupported(N)}),te}}]),we}(m()),Q=he},828:function(s){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function d(m,f){for(;m&&m.nodeType!==r;){if(typeof m.matches=="function"&&m.matches(f))return m;m=m.parentNode}}s.exports=d},438:function(s,r,u){var d=u(828);function m(w,b,T,E,O){var M=g.apply(this,arguments);return w.addEventListener(T,M,O),{destroy:function(){w.removeEventListener(T,M,O)}}}function f(w,b,T,E,O){return typeof w.addEventListener=="function"?m.apply(null,arguments):typeof T=="function"?m.bind(null,document).apply(null,arguments):(typeof w=="string"&&(w=document.querySelectorAll(w)),Array.prototype.map.call(w,function(M){return m(M,b,T,E,O)}))}function g(w,b,T,E){return function(O){O.delegateTarget=d(O.target,b),O.delegateTarget&&E.call(w,O)}}s.exports=f},879:function(s,r){r.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},r.nodeList=function(u){var d=Object.prototype.toString.call(u);return u!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in u&&(u.length===0||r.node(u[0]))},r.string=function(u){return typeof u=="string"||u instanceof String},r.fn=function(u){var d=Object.prototype.toString.call(u);return d==="[object Function]"}},370:function(s,r,u){var d=u(879),m=u(438);function f(T,E,O){if(!T&&!E&&!O)throw new Error("Missing required arguments");if(!d.string(E))throw new TypeError("Second argument must be a String");if(!d.fn(O))throw new TypeError("Third argument must be a Function");if(d.node(T))return g(T,E,O);if(d.nodeList(T))return w(T,E,O);if(d.string(T))return b(T,E,O);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function g(T,E,O){return T.addEventListener(E,O),{destroy:function(){T.removeEventListener(E,O)}}}function w(T,E,O){return Array.prototype.forEach.call(T,function(M){M.addEventListener(E,O)}),{destroy:function(){Array.prototype.forEach.call(T,function(M){M.removeEventListener(E,O)})}}}function b(T,E,O){return m(document.body,T,E,O)}s.exports=f},817:function(s){function r(u){var d;if(u.nodeName==="SELECT")u.focus(),d=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var m=u.hasAttribute("readonly");m||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),m||u.removeAttribute("readonly"),d=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var f=window.getSelection(),g=document.createRange();g.selectNodeContents(u),f.removeAllRanges(),f.addRange(g),d=f.toString()}return d}s.exports=r},279:function(s){function r(){}r.prototype={on:function(u,d,m){var f=this.e||(this.e={});return(f[u]||(f[u]=[])).push({fn:d,ctx:m}),this},once:function(u,d,m){var f=this;function g(){f.off(u,g),d.apply(m,arguments)}return g._=d,this.on(u,g,m)},emit:function(u){var d=[].slice.call(arguments,1),m=((this.e||(this.e={}))[u]||[]).slice(),f=0,g=m.length;for(f;f<g;f++)m[f].fn.apply(m[f].ctx,d);return this},off:function(u,d){var m=this.e||(this.e={}),f=m[u],g=[];if(f&&d)for(var w=0,b=f.length;w<b;w++)f[w].fn!==d&&f[w].fn._!==d&&g.push(f[w]);return g.length?m[u]=g:delete m[u],this}},s.exports=r,s.exports.TinyEmitter=r}},o={};function a(s){if(o[s])return o[s].exports;var r=o[s]={exports:{}};return n[s](r,r.exports,a),r.exports}return function(){a.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(r,{a:r}),r}}(),function(){a.d=function(s,r){for(var u in r)a.o(r,u)&&!a.o(s,u)&&Object.defineProperty(s,u,{enumerable:!0,get:r[u]})}}(),function(){a.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)}}(),a(686)}().default})})(yh);var T9=S9(yh.exports),k9=function(t,n){var o=Date.now(),a;return function(){for(var s=arguments.length,r=new Array(s),u=0;u<s;u++)r[u]=arguments[u];Date.now()-o<n&&a&&clearTimeout(a),a=setTimeout(function(){t.apply(void 0,r)},n),o=Date.now()}},Rc={name:"JsonViewer",components:{JsonBox:Cl},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:function(t){return t.toLocaleString()}},previewMode:{type:Boolean,default:!1},parse:{type:Boolean,default:!1}},provide:function(){return{expandDepth:this.expandDepth,timeformat:this.timeformat,keyClick:this.keyClick}},data:function(){return{copied:!1,expandableCode:!1,expandCode:this.expanded}},emits:["onKeyClick"],computed:{jvClass:function(){return"jv-container jv-"+this.theme+(this.boxed?" boxed":"")},copyText:function(){var t=this.copyable,n=t.copyText,o=t.copiedText,a=t.timeout,s=t.align;return{copyText:n||"copy",copiedText:o||"copied!",timeout:a||2e3,align:s}},parseValue:function(){if(!this.parse||typeof this.value!="string")return this.value;try{return JSON.parse(this.value)}catch{return this.value}}},watch:{value:function(){this.onResized()}},mounted:function(){var t=this;if(this.debounceResized=k9(this.debResized.bind(this),200),this.boxed&&this.$refs.jsonBox&&(this.onResized(),this.$refs.jsonBox.$el.addEventListener("resized",this.onResized,!0)),this.copyable){var n=new T9(this.$refs.clip,{text:function(){return JSON.stringify(t.value,null,2)}});n.on("success",function(o){t.onCopied(o)})}},methods:{onResized:function(){this.debounceResized()},debResized:function(){var t=this;this.$nextTick(function(){t.$refs.jsonBox&&(t.$refs.jsonBox.$el.clientHeight>=250?t.expandableCode=!0:t.expandableCode=!1)})},keyClick:function(t){this.$emit("onKeyClick",t)},onCopied:function(t){var n=this;this.copied||(this.copied=!0,setTimeout(function(){n.copied=!1},this.copyText.timeout),this.$emit("copied",t))},toggleExpandCode:function(){this.expandCode=!this.expandCode}}};function C9(e,t,n,o,a,s){var r=jv("json-box");return C(),A("div",{class:We(s.jvClass)},[n.copyable?(C(),A("div",{key:0,class:We("jv-tooltip ".concat(s.copyText.align||"right"))},[i("span",{ref:"clip",class:We(["jv-button",{copied:a.copied}])},[Ei(e.$slots,"copy",{copied:a.copied},function(){return[ut(y(a.copied?s.copyText.copiedText:s.copyText.copyText),1)]})],2)],2)):Ie("v-if",!0),i("div",{class:We(["jv-code",{open:a.expandCode,boxed:n.boxed}])},[at(r,{ref:"jsonBox",value:s.parseValue,sort:n.sort,"preview-mode":n.previewMode},null,8,["value","sort","preview-mode"])],2),a.expandableCode&&n.boxed?(C(),A("div",{key:1,class:"jv-more",onClick:t[0]||(t[0]=function(){return s.toggleExpandCode&&s.toggleExpandCode.apply(s,arguments)})},[i("span",{class:We(["jv-toggle",{open:!!a.expandCode}])},null,2)])):Ie("v-if",!0)],2)}Rc.render=C9,Rc.__file="src/Components/json-viewer.vue";const E9={class:"lora-raw__content"},bh="weilin_tools_",$9=Wt({__name:"lora_raw",emits:["close","update"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=S({}),s=S(!1),r={loraRaw:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},d=S((()=>{try{const b=localStorage.getItem(`${bh}loraRawState`);if(b){const T=JSON.parse(b),E={...r};return T.loraRaw&&(E.loraRaw={...r.loraRaw,...T.loraRaw}),E}}catch(b){console.error("Error loading window states:",b)}return{...r}})());It(d,b=>{try{localStorage.setItem(`${bh}loraRawState`,JSON.stringify(b))}catch(T){console.error("Error saving window states:",T)}},{deep:!0}),jt(()=>{st.registerWindow("loraRaw")}),po(()=>{st.unregisterWindow("loraRaw")});const m=()=>{s.value=!1},f=(b,T)=>{d.value[b]&&(d.value[b].position={...T})},g=(b,T)=>{d.value[b]&&(d.value[b].size={...T})};return t({open:b=>{s.value=!0,st.setActiveWindow("loraRaw"),a.value=b}}),(b,T)=>s.value?(C(),Qt(mo,{key:0,title:v(o)("lora.rawTitle"),position:d.value.loraRaw.position,size:d.value.loraRaw.size,"z-index":v(st).getZIndex("loraRaw"),"onUpdate:position":T[0]||(T[0]=E=>f("loraRaw",E)),"onUpdate:size":T[1]||(T[1]=E=>g("loraRaw",E)),onActive:T[2]||(T[2]=E=>v(st).setActiveWindow("loraRaw")),onClose:T[3]||(T[3]=E=>m())},{default:Ut(()=>[i("div",E9,[at(v(Rc),{value:a.value,copyable:"",sort:"",theme:"dark"},null,8,["value"])])]),_:1},8,["title","position","size","z-index"])):Ie("",!0)}},[["__scopeId","data-v-f2df06a0"]]),I9={key:0,class:"lora-detail__loading"},A9={class:"lora-detail__body"},L9={class:"lora-detail__tags"},M9=["title"],D9=["title"],O9={class:"lora-detail__table"},R9={class:"label"},P9={colspan:"2"},N9={colspan:"3"},F9={class:"label"},B9={colspan:"2",class:"hash"},U9={class:"label"},z9={colspan:"2"},V9=["href"],W9={key:1,class:"not-found"},H9=["title"],j9={class:"label"},G9=["title"],q9={key:1,class:"text"},Y9={class:"actions"},K9={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},J9={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},X9={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"},Q9={class:"label"},Z9={colspan:"2"},eS={class:"label"},tS={colspan:"2"},nS={class:"label"},oS=["title"],aS=["onUpdate:modelValue","type","onKeyup"],sS={key:1,class:"text"},iS={class:"actions"},rS=["onClick","title"],lS={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},uS={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},cS={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"},dS={class:"label"},pS=["onUpdate:modelValue"],fS={key:1},gS=["onUpdate:modelValue","type","onKeyup"],mS={key:1,class:"text"},hS={class:"actions"},vS=["onClick","title"],_S={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},yS={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},bS={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"},wS=["onClick","title"],xS={class:"field-management"},SS=["title"],TS={key:0},kS={class:"label"},CS=["title"],ES={key:0,class:"word-selection"},$S={colspan:"2"},IS={class:"word-list"},AS=["onClick"],LS={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},MS={key:1},DS={key:0,class:"lora-detail__images"},OS={class:"image-wrapper"},RS=["onClick"],PS=["src"],NS={class:"image-info"},FS={key:0,class:"info-item"},BS=["href"],US={key:1,class:"info-item"},zS={key:2,class:"info-item"},VS={key:3,class:"info-item"},WS={key:4,class:"info-item"},HS={key:5,class:"info-item"},jS={key:6,class:"info-item"},GS={key:7,class:"info-item"},wh="weilin_tools_",El=Wt({__name:"lora_detail",emits:["close","update"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=S(!1),s=S({}),r=S(!1),u=S(),d=S(null),m=S({}),f={loraDetail:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},w=S((()=>{try{const te=localStorage.getItem(`${wh}loraDetailState`);if(te){const N=JSON.parse(te),q={...f};return N.loraDetail&&(q.loraDetail={...f.loraDetail,...N.loraDetail}),q}}catch(te){console.error("Error loading window states:",te)}return{...f}})());It(w,te=>{try{localStorage.setItem(`${wh}loraDetailState`,JSON.stringify(te))}catch(N){console.error("Error saving window states:",N)}},{deep:!0}),jt(()=>{st.registerWindow("loraDetail")}),po(()=>{st.unregisterWindow("loraDetail")});const b=()=>{r.value=!1},T=(te,N)=>{w.value[te]&&(w.value[te].position={...N})},E=(te,N)=>{w.value[te]&&(w.value[te].size={...N})};t({open:te=>{r.value=!0,st.setActiveWindow("loraDetail"),a.value=!0,s.value=te,wt(()=>{Re()})}});const M=S(""),V=S(),pe=te=>{V.value.open(te)},D=S({}),z=S({}),ie=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")}],re=()=>{const te=`custom_${Date.now()}`;s.value.user_diy_fileds||(s.value.user_diy_fileds={}),m.value[te]={label:"新字段",type:"text"},s.value.user_diy_fileds[te]={label:"新字段",value:""},z.value[te]="",Ee(te)},ce=async te=>{var N,q;delete m.value[te],delete z.value[te],(q=(N=s.value)==null?void 0:N.user_diy_fileds)!=null&&q[te]&&delete s.value.user_diy_fileds[te],await wt(async()=>{await le(te)})},Re=()=>{M.value=s.value.name,s.value={},ie.value=[],z.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},vo.getLoraDetail({file:M.value,refresh:!1,light:!1}).then(te=>{s.value=te.data,wt(()=>{let N,q,Y,$,I,H;s.value.name=s.value.name||((q=(N=s.value.raw)===null||N===void 0?void 0:N.metadata)===null||q===void 0?void 0:q.ss_output_name===void 0?q["modelspec.title"]:q.ss_output_name)||"",z.value.nameValue=s.value.name,s.value.strengthMin=(Y=s.value.strengthMin)!==null&&Y!==void 0?Y:"",z.value.minValue=s.value.strengthMin,s.value.strengthMax=($=s.value.strengthMax)!==null&&$!==void 0?$:"",z.value.maxValue=s.value.strengthMax,s.value.userNote=(I=s.value.userNote)!==null&&I!==void 0?I:"",z.value.notesValue=s.value.userNote,s.value.loraWorks=(H=s.value.loraWorks)!==null&&H!==void 0?H:"",z.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(m.value=s.value.user_diy_fileds),a.value=!1})}).catch(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},Le=te=>{let q=new URL(te).pathname.split("/").pop();return q=q.split("?")[0],decodeURIComponent(q)},fe=async te=>{try{const N=await fetch(te),q=Le(te),Y=await N.blob();vo.postUplaodImg(Y,s.value.file,q).then(()=>{ue({type:"success",str:"message.saveSuccess"})}).catch(()=>{ue({type:"warn",str:"message.unknownError"})})}catch{ue({type:"warn",str:"message.unknownError"})}},xe=Bt(()=>{var te;return(te=s.value.links)==null?void 0:te.find(N=>N.includes("civitai.com/models"))}),ae=Bt(()=>{var te,N;return((N=(te=s.value.raw)==null?void 0:te.civitai)==null?void 0:N.error)==="Model not found"}),J=Bt(()=>s.value.trainedWords||[]),se=()=>{var N;const te=((N=u.value)==null?void 0:N.scrollTop)||0;a.value=!0,vo.getLoraRefresh({file:M.value}).then(q=>{s.value=q.data,wt(()=>{let Y,$,I,H,de,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)||"",z.value.nameValue=s.value.name,s.value.strengthMin=(I=s.value.strengthMin)!==null&&I!==void 0?I:"",z.value.minValue=s.value.strengthMin,s.value.strengthMax=(H=s.value.strengthMax)!==null&&H!==void 0?H:"",z.value.maxValue=s.value.strengthMax,s.value.userNote=(de=s.value.userNote)!==null&&de!==void 0?de:"",z.value.notesValue=s.value.userNote,s.value.loraWorks=(Ce=s.value.loraWorks)!==null&&Ce!==void 0?Ce:"",z.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(m.value=s.value.user_diy_fileds),a.value=!1}),wt(()=>{a.value=!1}),u.value&&(u.value.scrollTop=te),ue({type:"success",str:"message.dataLoaded"})}).catch(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},X=te=>{D.value[te]?Ee(te):ee(te)},ee=te=>{var N,q;D.value[te]=!0,te in m.value?z.value[te]=((q=(N=s.value.user_diy_fileds)==null?void 0:N[te])==null?void 0:q.value)||"":z.value[te]=s.value[te],wt(()=>{te==="name"&&d.value&&d.value.focus()})},Ee=te=>{te in m.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[te]={label:m.value[te].label,value:z.value[te]}):s.value[te]=z.value[te],Q(s.value),D.value[te]=!1},he=te=>{D.value[te]=!1,z.value[te]=s.value[te]},Q=te=>{var q;const N=((q=u.value)==null?void 0:q.scrollTop)||0;a.value=!0,vo.postLoraSave(M.value,te).then(Y=>{s.value=Y.data,wt(()=>{let $,I,H,de,Ce,Ae;s.value.name=s.value.name||((I=($=s.value.raw)===null||$===void 0?void 0:$.metadata)===null||I===void 0?void 0:I.ss_output_name===void 0?I["modelspec.title"]:I.ss_output_name)||"",z.value.nameValue=s.value.name,s.value.strengthMin=(H=s.value.strengthMin)!==null&&H!==void 0?H:"",z.value.minValue=s.value.strengthMin,s.value.strengthMax=(de=s.value.strengthMax)!==null&&de!==void 0?de:"",z.value.maxValue=s.value.strengthMax,s.value.userNote=(Ce=s.value.userNote)!==null&&Ce!==void 0?Ce:"",z.value.notesValue=s.value.userNote,s.value.loraWorks=(Ae=s.value.loraWorks)!==null&&Ae!==void 0?Ae:"",z.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(m.value=s.value.user_diy_fileds),a.value=!1,wt(()=>{u.value&&(u.value.scrollTop=N)})}),ue({type:"success",str:"message.saveSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},le=async te=>{var q;const N=((q=u.value)==null?void 0:q.scrollTop)||0;a.value=!0,await vo.postLoraDelet(M.value,te).then(Y=>{s.value=Y.data,wt(()=>{let $,I,H,de,Ce,Ae;s.value.name=s.value.name||((I=($=s.value.raw)===null||$===void 0?void 0:$.metadata)===null||I===void 0?void 0:I.ss_output_name===void 0?I["modelspec.title"]:I.ss_output_name)||"",z.value.nameValue=s.value.name,s.value.strengthMin=(H=s.value.strengthMin)!==null&&H!==void 0?H:"",z.value.minValue=s.value.strengthMin,s.value.strengthMax=(de=s.value.strengthMax)!==null&&de!==void 0?de:"",z.value.maxValue=s.value.strengthMax,s.value.userNote=(Ce=s.value.userNote)!==null&&Ce!==void 0?Ce:"",z.value.notesValue=s.value.userNote,s.value.loraWorks=(Ae=s.value.loraWorks)!==null&&Ae!==void 0?Ae:"",z.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(m.value=s.value.user_diy_fileds),a.value=!1,wt(()=>{u.value&&(u.value.scrollTop=N)})}),ue({type:"success",str:"message.deleteSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},be=te=>{const N=ie.value.indexOf(te);N===-1?ie.value.push(te):ie.value.splice(N,1)},we=te=>ie.value.includes(te),_e=()=>{ie.value.length&&navigator.clipboard.writeText(ie.value).then(()=>{ue({type:"success",str:"message.copySuccess"})},()=>{ue({type:"warn",str:"message.copyFailed"})})};S(!1),S(!1),Bt(()=>a.value?o("common.loading"):o("common.ready"));const Z=S(!0),W=()=>{Z.value=!Z.value};return(te,N)=>(C(),A(qe,null,[r.value?(C(),Qt(mo,{key:0,title:v(o)("lora.title"),position:w.value.loraDetail.position,size:w.value.loraDetail.size,"z-index":v(st).getZIndex("loraDetail"),"onUpdate:position":N[5]||(N[5]=q=>T("loraDetail",q)),"onUpdate:size":N[6]||(N[6]=q=>E("loraDetail",q)),onActive:N[7]||(N[7]=q=>v(st).setActiveWindow("loraDetail")),onClose:N[8]||(N[8]=q=>b())},{default:Ut(()=>{var q;return[i("div",{class:"lora-detail__content",ref_key:"loraContent",ref:u},[a.value?(C(),A("div",I9,N[9]||(N[9]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"is-rotating"},[i("path",{d:"M12 4V2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4Z"})],-1)]))):Ie("",!0),i("div",A9,[N[24]||(N[24]=i("div",{class:"lora-detail__title"},"Lora 信息",-1)),i("ul",L9,[s.value.type?(C(),A("li",{key:0,class:We(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:v(o)("lora.type")},y(s.value.type),11,M9)):Ie("",!0),s.value.baseModel?(C(),A("li",{key:1,class:We(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:v(o)("lora.baseModel")},y(s.value.baseModel),11,D9)):Ie("",!0)]),i("table",O9,[i("tbody",null,[i("tr",null,[i("td",R9,y(v(o)("lora.file")),1),i("td",P9,y(s.value.file),1),i("td",N9,[i("button",{class:"fetch-btn",onClick:N[0]||(N[0]=Y=>pe(s.value.raw.metadata))},y(v(o)("lora.seeLoraRaw")),1)])]),i("tr",null,[i("td",F9,y(v(o)("lora.hash")),1),i("td",B9,y(s.value.sha256),1)]),i("tr",null,[i("td",U9,y(v(o)("lora.civitai")),1),i("td",z9,[xe.value?(C(),A(qe,{key:0},[i("a",{href:xe.value,target:"_blank",class:"civitai-link"},[N[10]||(N[10]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},[i("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)),i("span",null,y(v(o)("lora.viewOnCivitai")),1)],8,V9),i("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:se},y(v(o)("lora.getCivitData")),1)],64)):ae.value?(C(),A("div",W9,[i("i",null,y(v(o)("lora.modelNotFound")),1),(C(),A("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:v(o)("lora.modelNotFoundTip")},N[11]||(N[11]=[i("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,H9))])):(C(),A("button",{key:2,class:"fetch-btn",onClick:se},y(v(o)("lora.fetchFromCivitai")),1))])]),i("tr",{class:We({"is-editing":D.value.name})},[i("td",j9,[ut(y(v(o)("lora.name"))+" ",1),(C(),A("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:v(o)("lora.nameTip")},N[12]||(N[12]=[i("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,G9))]),i("td",null,[D.value.name?Se((C(),A("input",{key:0,"onUpdate:modelValue":N[1]||(N[1]=Y=>z.value.name=Y),type:"text",onKeyup:[N[2]||(N[2]=Pn(Y=>Ee("name"),["enter"])),N[3]||(N[3]=Pn(Y=>he("name"),["esc"]))],ref_key:"nameInput",ref:d},null,544)),[[ze,z.value.name]]):(C(),A("span",q9,y(s.value.name),1))]),i("td",Y9,[i("button",{class:"edit-btn",onClick:N[4]||(N[4]=Y=>X("name"))},[(C(),A("svg",K9,[D.value.name?(C(),A("path",J9)):(C(),A("path",X9))]))])])],2),i("tr",null,[i("td",Q9,y(v(o)("lora.baseModel")),1),i("td",Z9,y(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),i("tr",null,[i("td",eS,y(v(o)("lora.skipClip")),1),i("td",tS,y((te._t=(te._s=s.value.raw)===null||te._s===void 0?void 0:te._s.metadata)===null||te._t===void 0?void 0:te._t.ss_clip_skip),1)]),(C(),A(qe,null,ot(P,Y=>i("tr",{key:Y.key,class:We({"is-editing":D.value[Y.key]})},[i("td",nS,[ut(y(Y.label)+" ",1),Y.tip?(C(),A("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:Y.tip},N[13]||(N[13]=[i("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,oS)):Ie("",!0)]),i("td",null,[D.value[Y.key]?Se((C(),A("input",{key:0,"onUpdate:modelValue":$=>z.value[Y.key]=$,type:Y.type||"text",onKeyup:[Pn($=>Ee(Y.key),["enter"]),Pn($=>he(Y.key),["esc"])]},null,40,aS)),[[df,z.value[Y.key]]]):(C(),A("span",sS,y(s.value[Y.key]),1))]),i("td",iS,[i("button",{class:"edit-btn",onClick:$=>X(Y.key),title:v(o)("promptBox.settings.edit")},[(C(),A("svg",lS,[D.value[Y.key]?(C(),A("path",uS)):(C(),A("path",cS))]))],8,rS)])],2)),64)),(C(!0),A(qe,null,ot(m.value,(Y,$)=>{var I;return C(),A("tr",{key:$,class:We({"is-editing":D.value[$]})},[i("td",dS,[D.value[$]?Se((C(),A("input",{key:0,"onUpdate:modelValue":H=>Y.label=H,type:"text"},null,8,pS)),[[ze,Y.label]]):(C(),A("span",fS,y(Y.label),1))]),i("td",null,[D.value[$]?Se((C(),A("input",{key:0,"onUpdate:modelValue":H=>z.value[$]=H,type:Y.type||"text",onKeyup:[Pn(H=>Ee($),["enter"]),Pn(H=>he($),["esc"])]},null,40,gS)),[[df,z.value[$]]]):(C(),A("span",mS,y(s.value.user_diy_fileds?(I=s.value.user_diy_fileds[$])==null?void 0:I.value:""),1))]),i("td",hS,[i("button",{class:"edit-btn",onClick:H=>X($),title:v(o)("promptBox.settings.edit")},[(C(),A("svg",_S,[D.value[$]?(C(),A("path",yS)):(C(),A("path",bS))]))],8,vS),i("button",{style:{"margin-left":"5px",color:"#f87171"},onClick:H=>ce($),class:"edit-btn",title:v(o)("promptBox.settings.delete")},y(v(o)("promptBox.settings.delete")),9,wS)])],2)}),128)),i("div",xS,[i("button",{onClick:re,class:"add-btn",title:v(o)("lora.addDiyFiled")},y(v(o)("lora.addDiyFiled")),9,SS)]),J.value.length?(C(),A("tr",TS,[i("td",kS,[ut(y(v(o)("lora.trainedWords"))+" ",1),(C(),A("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:v(o)("lora.trainedWordsTip")},N[14]||(N[14]=[i("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,CS)),ie.value.length?(C(),A("div",ES,[ut(y(v(o)("lora.selectedWords",{count:ie.value.length}))+" ",1),i("button",{class:"copy-btn",onClick:_e},y(v(o)("common.copy")),1)])):Ie("",!0)]),i("td",$S,[i("ul",IS,[(C(!0),A(qe,null,ot(Z.value?J.value.slice(0,10):J.value,(Y,$)=>(C(),A("li",{key:"words-"+$,class:We(["word-item",{"is-selected":we(Y.word),"is-hidden":Z.value&&$>=10}]),onClick:I=>be(Y.word)},[i("span",null,y(Y.word),1),Y.civitai?(C(),A("svg",LS,N[15]||(N[15]=[i("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)]))):Ie("",!0),Y.count!=null?(C(),A("small",MS,y(Y.count),1)):Ie("",!0)],10,AS))),128)),J.value.length>10?(C(),A("li",{key:0,class:"toggle-btn",onClick:W},y(Z.value?v(o)("common.showMore"):v(o)("common.showLess")),1)):Ie("",!0)])])])):Ie("",!0)])]),(q=s.value.images)!=null&&q.length?(C(),A("ul",DS,[(C(!0),A(qe,null,ot(s.value.images,(Y,$)=>(C(),A("li",{key:$,class:"lora-detail__image-item"},[i("figure",null,[i("div",OS,[i("div",{class:"image-action",onClick:I=>fe(Y.url)},"设置为Lora封面",8,RS),i("img",{src:Y.url},null,8,PS)]),i("figcaption",NS,[Y.civitaiUrl?(C(),A("span",FS,[i("a",{href:Y.civitaiUrl,target:"_blank",class:"civitai-link"},N[16]||(N[16]=[ut(" C站 civitai "),i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("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,BS)])):Ie("",!0),Y.seed?(C(),A("span",US,[N[17]||(N[17]=i("label",null,"种子 seed",-1)),ut(" "+y(Y.seed),1)])):Ie("",!0),Y.steps?(C(),A("span",zS,[N[18]||(N[18]=i("label",null,"步数 steps",-1)),ut(" "+y(Y.steps),1)])):Ie("",!0),Y.cfg?(C(),A("span",VS,[N[19]||(N[19]=i("label",null,"引导系数 cfg",-1)),ut(" "+y(Y.cfg),1)])):Ie("",!0),Y.sampler?(C(),A("span",WS,[N[20]||(N[20]=i("label",null,"采样器 sampler",-1)),ut(" "+y(Y.sampler),1)])):Ie("",!0),Y.model?(C(),A("span",HS,[N[21]||(N[21]=i("label",null,"基础模型 model",-1)),ut(" "+y(Y.model),1)])):Ie("",!0),Y.positive?(C(),A("span",jS,[N[22]||(N[22]=i("label",null,"正向提示词 positive",-1)),ut(" "+y(Y.positive),1)])):Ie("",!0),Y.negative?(C(),A("span",GS,[N[23]||(N[23]=i("label",null,"反向提示词 negative",-1)),ut(" "+y(Y.negative),1)])):Ie("",!0)])])]))),128))])):Ie("",!0)])],512)]}),_:1},8,["title","position","size","z-index"])):Ie("",!0),at($9,{ref_key:"loraRawRef",ref:V},null,512)],64))}},[["__scopeId","data-v-0b29ccf2"]]),qS={key:0,class:"lora-detail__loading"},YS={class:"lora-detail__body"},KS={class:"lora-detail__tags"},JS=["title"],XS=["title"],QS={class:"lora-detail__table"},ZS={class:"label"},eT={colspan:"2"},tT={class:"label"},nT={colspan:"2",class:"hash"},oT={class:"label"},aT={colspan:"2"},sT=["href"],iT={key:1,class:"not-found"},rT=["title"],lT={class:"label"},uT=["title"],cT={key:1,class:"text"},dT={class:"label"},pT={colspan:"2"},fT={class:"label"},gT={colspan:"2"},mT={class:"label"},hT=["title"],vT={class:"text"},_T={class:"actions"},yT=["onClick","title"],bT={class:"label"},wT=["onUpdate:modelValue"],xT={key:1},ST={class:"text"},TT={class:"actions"},kT=["onClick","title"],CT={key:0},ET={class:"label"},$T=["title"],IT={key:0,class:"word-selection"},AT={colspan:"2"},LT={class:"word-list"},MT=["onClick"],DT={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},OT={key:1},RT={key:0,class:"lora-detail__images",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"12px"}},PT={class:"image-wrapper",style:{height:"200px"}},NT=["src"],Pc=Wt({__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}=Yt(),a=S(!1),s=S({}),r=S(),u=S(null),d=S({}),m=e,f=S(""),g=n,w=()=>{g("cardLeave")},b=()=>{g("cardenter")},T=S({}),E=S({}),O=S([]),M=[{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")}];jt(()=>{V()});const V=()=>{f.value=m.fileNmae,s.value={},O.value=[],E.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},vo.getLoraDetail({file:f.value,refresh:!1,light:!1}).then(X=>{s.value=X.data,wt(()=>{let ee,Ee,he,Q,le,be;s.value.name=s.value.name||((Ee=(ee=s.value.raw)===null||ee===void 0?void 0:ee.metadata)===null||Ee===void 0?void 0:Ee.ss_output_name===void 0?Ee["modelspec.title"]:Ee.ss_output_name)||"",E.value.nameValue=s.value.name,s.value.strengthMin=(he=s.value.strengthMin)!==null&&he!==void 0?he:"",E.value.minValue=s.value.strengthMin,s.value.strengthMax=(Q=s.value.strengthMax)!==null&&Q!==void 0?Q:"",E.value.maxValue=s.value.strengthMax,s.value.userNote=(le=s.value.userNote)!==null&&le!==void 0?le:"",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(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},pe=X=>{navigator.clipboard.writeText(X).then(()=>{ue({type:"success",str:"已复制到剪贴板"})}).catch(()=>{ue({type:"error",str:"复制失败"})})},D=Bt(()=>{var X;return(X=s.value.links)==null?void 0:X.find(ee=>ee.includes("civitai.com/models"))}),z=Bt(()=>{var X,ee;return((ee=(X=s.value.raw)==null?void 0:X.civitai)==null?void 0:ee.error)==="Model not found"}),ie=Bt(()=>s.value.trainedWords||[]),P=()=>{var ee;const X=((ee=r.value)==null?void 0:ee.scrollTop)||0;a.value=!0,vo.getLoraRefresh({file:f.value}).then(Ee=>{s.value=Ee.data,wt(()=>{let he,Q,le,be,we;s.value.name=s.value.name||((Q=(he=s.value.raw)===null||he===void 0?void 0:he.metadata)===null||Q===void 0?void 0:Q.ss_output_name===void 0?Q["modelspec.title"]:Q.ss_output_name)||"",E.value.nameValue=s.value.name,s.value.strengthMin=(le=s.value.strengthMin)!==null&&le!==void 0?le:"",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=(we=s.value.userNote)!==null&&we!==void 0?we:"",E.value.notesValue=s.value.userNote,a.value=!1}),wt(()=>{a.value=!1}),r.value&&(r.value.scrollTop=X),ue({type:"success",str:"message.dataLoaded"})}).catch(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},re=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],Re(s.value),T.value[X]=!1},ce=X=>{T.value[X]=!1,E.value[X]=s.value[X]},Re=X=>{var Ee;const ee=((Ee=r.value)==null?void 0:Ee.scrollTop)||0;a.value=!0,vo.postLoraSave(f.value,X).then(he=>{s.value=he.data,wt(()=>{let Q,le,be,we,_e;s.value.name=s.value.name||((le=(Q=s.value.raw)===null||Q===void 0?void 0:Q.metadata)===null||le===void 0?void 0:le.ss_output_name===void 0?le["modelspec.title"]:le.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=(we=s.value.strengthMax)!==null&&we!==void 0?we:"",E.value.maxValue=s.value.strengthMax,s.value.userNote=(_e=s.value.userNote)!==null&&_e!==void 0?_e:"",E.value.notesValue=s.value.userNote,a.value=!1,wt(()=>{r.value&&(r.value.scrollTop=ee)})}),ue({type:"success",str:"message.saveSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"}),a.value=!1})},Le=X=>{const ee=O.value.indexOf(X);ee===-1?O.value.push(X):O.value.splice(ee,1)},fe=X=>O.value.includes(X),xe=()=>{O.value.length&&navigator.clipboard.writeText(O.value).then(()=>{ue({type:"success",str:"message.copySuccess"})},()=>{ue({type:"warn",str:"message.copyFailed"})})},ae=S(!0),J=()=>{ae.value=!ae.value};return t({refresh:()=>{V()}}),(X,ee)=>{var Ee;return C(),A("div",{class:"lora_catd_content",style:Ft(["left: "+e.paddingLeft+"px;top: "+e.paddingTop+"px;",{"font-size":"0.55em"}]),onMouseenter:b,onMouseleave:w},[i("div",{class:"close-button",onClick:w,title:"关闭"},ee[3]||(ee[3]=[i("span",null,"×",-1)])),i("div",{class:"lora-detail__content",ref_key:"loraContent",ref:r},[a.value?(C(),A("div",qS,ee[4]||(ee[4]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"is-rotating"},[i("path",{d:"M12 4V2C6.48 2 2 6.48 2 12H4C4 7.58 7.58 4 12 4Z"})],-1)]))):Ie("",!0),i("div",YS,[ee[13]||(ee[13]=i("div",{class:"lora-detail__title"},"Lora 信息",-1)),i("ul",KS,[s.value.type?(C(),A("li",{key:0,class:We(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:v(o)("lora.type")},y(s.value.type),11,JS)):Ie("",!0),s.value.baseModel?(C(),A("li",{key:1,class:We(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:v(o)("lora.baseModel")},y(s.value.baseModel),11,XS)):Ie("",!0)]),i("table",QS,[i("tbody",null,[i("tr",null,[i("td",ZS,y(v(o)("lora.file")),1),i("td",eT,y(s.value.file),1)]),i("tr",null,[i("td",tT,y(v(o)("lora.hash")),1),i("td",nT,y(s.value.sha256),1)]),i("tr",null,[i("td",oT,y(v(o)("lora.civitai")),1),i("td",aT,[D.value?(C(),A(qe,{key:0},[i("a",{href:D.value,target:"_blank",class:"civitai-link"},[ee[5]||(ee[5]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},[i("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)),i("span",null,y(v(o)("lora.viewOnCivitai")),1)],8,sT),i("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:P},y(v(o)("lora.getCivitData")),1)],64)):z.value?(C(),A("div",iT,[i("i",null,y(v(o)("lora.modelNotFound")),1),(C(),A("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:v(o)("lora.modelNotFoundTip")},ee[6]||(ee[6]=[i("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,rT))])):(C(),A("button",{key:2,class:"fetch-btn",onClick:P},y(v(o)("lora.fetchFromCivitai")),1))])]),i("tr",{class:We({"is-editing":T.value.name})},[i("td",lT,[ut(y(v(o)("lora.name"))+" ",1),(C(),A("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:v(o)("lora.nameTip")},ee[7]||(ee[7]=[i("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))]),i("td",null,[T.value.name?Se((C(),A("input",{key:0,"onUpdate:modelValue":ee[0]||(ee[0]=he=>E.value.name=he),type:"text",onKeyup:[ee[1]||(ee[1]=Pn(he=>re("name"),["enter"])),ee[2]||(ee[2]=Pn(he=>ce("name"),["esc"]))],ref_key:"nameInput",ref:u},null,544)),[[ze,E.value.name]]):(C(),A("span",cT,y(s.value.name),1))])],2),i("tr",null,[i("td",dT,y(v(o)("lora.baseModel")),1),i("td",pT,y(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),i("tr",null,[i("td",fT,y(v(o)("lora.skipClip")),1),i("td",gT,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(),A(qe,null,ot(M,he=>i("tr",{key:he.key,class:We({"is-editing":T.value[he.key]})},[i("td",mT,[ut(y(he.label)+" ",1),he.tip?(C(),A("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:he.tip},ee[8]||(ee[8]=[i("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,hT)):Ie("",!0)]),i("td",null,[i("span",vT,y(s.value[he.key]),1)]),i("td",_T,[i("button",{class:"copy-btn",onClick:Q=>pe(s.value[he.key]),title:v(o)("lora.copy")},[ee[9]||(ee[9]=i("svg",{class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},[i("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)),ut(" "+y(v(o)("lora.copy")),1)],8,yT)])],2)),64)),(C(!0),A(qe,null,ot(d.value,(he,Q)=>{var le;return C(),A("tr",{key:Q,class:We({"is-editing":T.value[Q]})},[i("td",bT,[T.value[Q]?Se((C(),A("input",{key:0,"onUpdate:modelValue":be=>he.label=be,type:"text"},null,8,wT)),[[ze,he.label]]):(C(),A("span",xT,y(he.label),1))]),i("td",null,[i("span",ST,y(s.value.user_diy_fileds?(le=s.value.user_diy_fileds[Q])==null?void 0:le.value:""),1)]),i("td",TT,[i("button",{class:"copy-btn",onClick:be=>{var we;return pe((we=s.value.user_diy_fileds[Q])==null?void 0:we.value)},title:v(o)("lora.copy")},[ee[10]||(ee[10]=i("svg",{class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},[i("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)),ut(" "+y(v(o)("lora.copy")),1)],8,kT)])],2)}),128)),ie.value.length?(C(),A("tr",CT,[i("td",ET,[ut(y(v(o)("lora.trainedWords"))+" ",1),(C(),A("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:v(o)("lora.trainedWordsTip")},ee[11]||(ee[11]=[i("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,$T)),O.value.length?(C(),A("div",IT,[ut(y(v(o)("lora.selectedWords",{count:O.value.length}))+" ",1),i("button",{class:"copy-btn",onClick:xe},y(v(o)("common.copy")),1)])):Ie("",!0)]),i("td",AT,[i("ul",LT,[(C(!0),A(qe,null,ot(ae.value?ie.value.slice(0,10):ie.value,(he,Q)=>(C(),A("li",{key:"words-"+Q,class:We(["word-item",{"is-selected":fe(he.word),"is-hidden":ae.value&&Q>=10}]),onClick:le=>Le(he.word)},[i("span",null,y(he.word),1),he.civitai?(C(),A("svg",DT,ee[12]||(ee[12]=[i("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)]))):Ie("",!0),he.count!=null?(C(),A("small",OT,y(he.count),1)):Ie("",!0)],10,MT))),128)),ie.value.length>10?(C(),A("li",{key:0,class:"toggle-btn",onClick:J},y(ae.value?v(o)("common.showMore"):v(o)("common.showLess")),1)):Ie("",!0)])])])):Ie("",!0)])]),(Ee=s.value.images)!=null&&Ee.length?(C(),A("ul",RT,[(C(!0),A(qe,null,ot(s.value.images,(he,Q)=>(C(),A("li",{key:Q,class:"lora-detail__image-item"},[i("div",PT,[i("img",{src:he.url,style:{width:"100%",height:"100%","object-fit":"contain"}},null,8,NT)])]))),128))])):Ie("",!0)])],512)],36)}}},[["__scopeId","data-v-b0ee2f35"]]),FT={class:"header-actions"},BT=["title"],UT=["onMouseover","onDragstart","onDrop"],zT={class:"lora-info"},VT={class:"lora-header"},WT=["title"],HT={class:"lora-actions"},jT=["onClick","title"],GT=["onClick","title"],qT={class:"lora-weights-row"},YT={class:"weight-item-col"},KT=["onUpdate:modelValue"],JT={class:"weight-item-col"},XT=["onUpdate:modelValue"],QT={class:"weight-item-col"},ZT=["onUpdate:modelValue"],ek={class:"switch-item-col"},tk={class:"switch"},nk=["checked","onChange"],Ha="weilin_prompt_ui_",ok=Wt({__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}=Yt(),a=S(!1),s=S(""),r=S(100),u=S(0),d=S(),m=S(!1),f=S(!1),g=S(),w=e,b=n,T=(ae,J)=>{if(f.value=!0,s.value===ae&&a.value)return;const X=J.currentTarget.getBoundingClientRect(),Ee={left:X.left-450-10,top:X.top};Ee.left<10&&(Ee.left=X.right+10),Ee.top=Math.max(10,Math.min(Ee.top,window.innerHeight-310)),r.value=Ee.left,u.value=Ee.top,a.value=!0,s.value=ae,wt(()=>{g.value.refresh()})},E=()=>{f.value=!1,setTimeout(()=>{!m.value&&!f.value&&(a.value=!1,s.value="",m.value=!1)},200)},O=()=>{m.value=!0,f.value=!0},M=()=>{a.value=!1,s.value="",m.value=!1},V=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora"},"*")},pe=ae=>{ae.hidden=!ae.hidden},D=ae=>{if(w.selectedLoras&&!w.selectedLoras.find(J=>J.name===ae.name)){const J={name:ae.name,weight:ae.weight||1,text_encoder_weight:ae.text_encoder_weight||1,trigger_weight:ae.trigger_weight||1,lora:ae.lora,loraWorks:ae.loraWorks||"",display_name:ae.display_name||ae.name},se=[...w.selectedLoras,J];b("update:selectedLoras",se)}},z=ae=>{const J=w.selectedLoras.findIndex(se=>se.name===ae.name);if(J>-1){const se=w.selectedLoras.filter((X,ee)=>ee!==J);b("update:selectedLoras",se)}},ie=S(),P=ae=>{ie.value.open({name:ae.lora})};window.addEventListener("message",ae=>{ae.data.type==="weilin_prompt_ui_selectLora"&&D(ae.data.lora)});let re="",ce=!1;It(()=>w.selectedLoras,ae=>{if(ce){if(ae&&ae.length>0){const se=ae.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}>`);re=JSON.stringify(se)}else re="";return}if(ae&&ae.length>0){const se=ae.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(se);X!==re&&(re=X,window.postMessage({type:"weilin_prompt_ui_update_lora_tags",tags:se},"*"))}else re!==""&&(re="",window.postMessage({type:"weilin_prompt_ui_update_lora_tags",tags:[]},"*"))},{deep:!0});const Re=ae=>{ce=ae},Le=S(null),fe=ae=>{Le.value=ae},xe=ae=>{if(Le.value===null||Le.value===ae)return;const J=[...w.selectedLoras],se=J.splice(Le.value,1)[0];J.splice(ae,0,se),Le.value=null,b("update:selectedLoras",J)};return t({addLora:D,removeLora:z,setInitializing:Re}),(ae,J)=>(C(),A("div",{class:We(`${Ha}lora-stack`),style:Ft([{width:e.isOpen?"300px":"0"},{paddingRight:e.isOpen?"16px":"0"}])},[i("div",{class:We(`${Ha}lora-content`)},[i("div",{class:We(`${Ha}lora-header`)},[i("h3",{class:We(`${Ha}lora-title`)},y(v(o)("controls.loraStack")),3),i("div",FT,[i("button",{class:We(`${Ha}add-btn`),onClick:V,title:v(o)("controls.addLora")},J[2]||(J[2]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)]),10,BT),i("button",{class:We(`${Ha}close-btn`),onClick:J[0]||(J[0]=se=>ae.$emit("close"))},J[3]||(J[3]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("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),i("div",{class:We(`${Ha}lora-body`)},[i("div",{class:We(`${Ha}lora-list`)},[(C(!0),A(qe,null,ot(e.selectedLoras,(se,X)=>(C(),A("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:d,key:se.name,class:We(["lora-item",{"hidden-lora":se.hidden}]),onMouseover:ee=>T(se.lora,ee),onMouseleave:E,draggable:"true",onDragstart:ee=>fe(X),onDragover:J[1]||(J[1]=vt(()=>{},["prevent"])),onDrop:ee=>xe(X)},[i("div",zT,[i("div",VT,[i("span",{class:"lora-name",title:se.name},y(se.name),9,WT),i("div",HT,[i("button",{class:"look-on-btn",onClick:ee=>P(se),title:v(o)("controls.lookOnLora")},J[4]||(J[4]=[i("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[i("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"}),i("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"}),i("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"}),i("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,jT),i("button",{class:"remove-btn",onClick:ee=>z(se),title:v(o)("controls.removeLora")},J[5]||(J[5]=[i("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[i("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,GT)])]),i("div",qT,[i("div",YT,[i("label",null,y(v(o)("loraManager.modelWeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":ee=>se.weight=ee,class:"lora-weight",step:"0.1"},null,8,KT),[[ze,se.weight]])]),i("div",JT,[i("label",null,y(v(o)("loraManager.textEncoderWeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":ee=>se.text_encoder_weight=ee,class:"lora-weight",step:"0.1"},null,8,XT),[[ze,se.text_encoder_weight]])]),i("div",QT,[i("label",null,y(v(o)("loraManager.triggerWeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":ee=>se.trigger_weight=ee,class:"lora-weight",step:"0.1"},null,8,ZT),[[ze,se.trigger_weight]])]),i("div",ek,[i("label",null,y(se.hidden?v(o)("lora.hideLora"):v(o)("lora.showLora")),1),i("label",tk,[i("input",{type:"checkbox",checked:!se.hidden,onChange:ee=>pe(se)},null,40,nk),J[6]||(J[6]=i("span",{class:"slider"},null,-1))])])])])],42,UT))),128))],2)],2)],2),at(El,{ref_key:"loraDetailLoraStackRef",ref:ie},null,512),a.value?(C(),Qt(Pc,{key:0,ref_key:"loraCardItem",ref:g,fileNmae:s.value,paddingLeft:r.value,paddingTop:u.value,onCardLeave:M,onCardenter:O},null,8,["fileNmae","paddingLeft","paddingTop"])):Ie("",!0)],6))}},[["__scopeId","data-v-ac4d42a1"]]),ak={class:"main-label-manager"},sk={class:"mlm-header"},ik={class:"mlm-grid"},rk=["disabled"],lk=["disabled"],uk=["onClick","title","onDragstart","onDragenter","onDrop"],ck={class:"mlm-item-main"},dk={key:0,class:"pin-badge"},pk={class:"mlm-name"},fk={class:"mlm-item-actions"},gk=["title","onClick"],mk=["title","onClick"],xh="/weilin/prompt_ui/api/",hk="weilin_prompt_ui_main_labels_v1",vk=Wt({__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),r=S(""),u=S([]),d=S(o.selectedId),m=S(!0),f=S(!0),g=S("time"),w=S(null),b=S(null);async function T(){const _e={items:u.value,settings:{sortMode:g.value,sortTimeDesc:m.value,sortNameAsc:f.value,selectedId:d.value}};try{await mn.post(`${xh}labels/save`,_e)}catch(Z){console.error("保存标签数据失败:",Z),alert(`保存失败: ${Z.message}`)}}async function E(){var _e;try{const W=(_e=(await mn.get(`${xh}labels/get`)).data)==null?void 0:_e.data;if(!W)throw new Error("no data");const te=Array.isArray(W)?W:(W==null?void 0:W.items)??[],N=Array.isArray(W)?{}:(W==null?void 0:W.settings)??{};u.value=te.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})),N.sortMode&&(g.value=N.sortMode),typeof N.sortTimeDesc=="boolean"&&(m.value=N.sortTimeDesc),typeof N.sortNameAsc=="boolean"&&(f.value=N.sortNameAsc),(typeof N.selectedId=="string"||N.selectedId===null)&&(d.value=N.selectedId)}catch(Z){console.error("加载标签数据失败:",Z),u.value=[]}}jt(async()=>{await E()}),It(()=>o.selectedId,_e=>{d.value=_e}),It([g,m,f],()=>{T()}),It(u,()=>{T()},{deep:!0}),It(d,_e=>{T();const Z=_e?D(_e):null;a("select",Z?{...Z}:null)});const O=Bt(()=>{const _e=r.value.trim().toLowerCase();return _e?u.value.filter(Z=>(Z.name||"").toLowerCase().includes(_e)):u.value}),M=Bt(()=>{const _e=[...O.value];if(g.value==="manual")return _e.sort((N,q)=>{const Y=N.order??0,$=q.order??0;return Y!==$?Y-$:(N.createdAt??0)-(q.createdAt??0)});const Z=(N,q)=>{const Y=N.name||"",$=q.name||"";let I=Y.localeCompare($,void 0,{numeric:!0,sensitivity:"base"});return f.value||(I=-I),I},W=(N,q)=>{let Y=N.createdAt-q.createdAt;return m.value&&(Y=-Y),Y},te=N=>N.pinned?0:1;return _e.sort((N,q)=>{const Y=te(N)-te(q);if(Y!==0)return Y;if(g.value==="name"){const I=Z(N,q);return I!==0?I:W(N,q)}const $=W(N,q);return $!==0?$:Z(N,q)}),_e}),V=Bt(()=>D(d.value));function pe(){return`mlm_${Math.random().toString(36).slice(2)}_${Date.now()}`}function D(_e){return u.value.find(Z=>Z.id===_e)||null}function z(_e){d.value=_e.id,a("select",{..._e})}function ie(){const _e=window.prompt("新建标签名称:","");if(!_e)return;se(),g.value="manual";const Z=pe(),W=Date.now(),te=u.value.reduce((q,Y)=>typeof Y.order=="number"?Math.min(q,Y.order):q,0),N={id:Z,name:_e.trim(),content:"",createdAt:W,updatedAt:W,pinned:!1,highlighted:!1,order:te-1};u.value.push(N),T(),d.value=Z,a("select",{...N})}function P(){const _e=V.value;if(!_e)return;const Z=window.prompt("重命名标签:",_e.name||"");Z&&(_e.name=Z.trim(),_e.updatedAt=Date.now(),T())}function re(){const _e=V.value;if(!_e||!window.confirm(`确定删除标签"${_e.name}"吗?`))return;const Z=u.value.findIndex(W=>W.id===_e.id);Z>=0&&u.value.splice(Z,1),T(),u.value.length?(d.value=u.value[0].id,a("select",{...u.value[0]})):(d.value=null,a("select",null))}function ce(){g.value="time",m.value=!m.value}function Re(){g.value="name",f.value=!f.value}function Le(_e){_e.pinned=!_e.pinned,_e.updatedAt=Date.now(),T()}function fe(_e){_e.highlighted=!_e.highlighted,_e.updatedAt=Date.now(),T()}function xe(_e){const Z=V.value;Z&&(Z.content=_e??"",Z.updatedAt=Date.now(),clearTimeout(ae),ae=setTimeout(()=>T(),400))}let ae=null;function J(_e){try{const Z=new Date(_e);return`${Z.getFullYear()}-${(Z.getMonth()+1).toString().padStart(2,"0")}-${Z.getDate().toString().padStart(2,"0")} ${Z.getHours().toString().padStart(2,"0")}:${Z.getMinutes().toString().padStart(2,"0")}`}catch{return""}}function se(){M.value.forEach((Z,W)=>{Z.order=W})}function X(_e,Z,W){try{W.dataTransfer.effectAllowed="move"}catch{}w.value=_e.id,b.value=null,se(),g.value="manual"}function ee(_e){w.value&&(b.value=_e.id)}function Ee(_e){if(!w.value)return;const Z=w.value,W=_e==null?void 0:_e.id;if(!W||Z===W)return he();const te=[...M.value],N=te.findIndex($=>$.id===Z),q=te.findIndex($=>$.id===W);if(N<0||q<0)return he();const[Y]=te.splice(N,1);te.splice(q,0,Y),te.forEach(($,I)=>{$.order=I}),T(),he()}function he(){w.value=null,b.value=null}async function Q(){try{const _e=localStorage.getItem(hk);if(!_e){alert("未找到浏览器中的旧数据");return}const Z=JSON.parse(_e),W=Array.isArray(Z)?Z:(Z==null?void 0:Z.items)??[],te=Array.isArray(Z)?{}:(Z==null?void 0:Z.settings)??{};if(!Array.isArray(W)||W.length===0){alert("浏览器中没有可迁移的数据");return}if(!window.confirm(`发现浏览器中有 ${W.length} 个标签
点击"确定"将这些数据迁移到服务器
(会与服务器现有数据合并,不会覆盖)`))return;const q=new Set(u.value.map(I=>I.id)),Y=u.value.reduce((I,H)=>Math.max(I,typeof H.order=="number"?H.order:I),-1);let $=0;W.forEach((I,H)=>{let de=I.id;q.has(de)&&(de=pe()),q.add(de),u.value.push({id:de,name:I.name??"未命名",content:I.content??"",createdAt:I.createdAt??I.updatedAt??Date.now(),updatedAt:I.updatedAt??I.createdAt??Date.now(),pinned:!!I.pinned,highlighted:!!I.highlighted,order:(typeof I.order=="number",Y+1+H)}),$++}),!g.value&&te.sortMode&&(g.value=te.sortMode),typeof m.value>"u"&&typeof te.sortTimeDesc=="boolean"&&(m.value=te.sortTimeDesc),typeof f.value>"u"&&typeof te.sortNameAsc=="boolean"&&(f.value=te.sortNameAsc),await T(),alert(`迁移成功!
已从浏览器迁移 ${$} 个标签到服务器
当前共 ${u.value.length} 个标签`)}catch(_e){console.error("迁移失败:",_e),alert(`迁移失败: ${_e.message}`)}}function le(){try{const _e={items:u.value,settings:{sortMode:g.value,sortTimeDesc:m.value,sortNameAsc:f.value,selectedId:d.value},exportTime:new Date().toISOString(),version:"v1"},Z=JSON.stringify(_e,null,2),W=new Blob([Z],{type:"application/json"}),te=URL.createObjectURL(W),N=document.createElement("a");N.href=te;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");N.download=`weilin_prompt_labels_${Y}_${$}.json`,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(te),alert(`导出成功!共导出 ${u.value.length} 个标签`)}catch(_e){console.error("导出失败:",_e),alert(`导出失败: ${_e.message}`)}}function be(){var _e;(_e=s.value)==null||_e.click()}function we(_e){var te;const Z=(te=_e.target.files)==null?void 0:te[0];if(!Z)return;const W=new FileReader;W.onload=async N=>{var q,Y;try{const $=(q=N.target)==null?void 0:q.result;if(typeof $!="string")throw new Error("文件读取失败");const I=JSON.parse($);if(!I||typeof I!="object")throw new Error("JSON格式不正确");const H=Array.isArray(I)?I:(I==null?void 0:I.items)??[],de=Array.isArray(I)?{}:(I==null?void 0:I.settings)??{};if(!Array.isArray(H))throw new Error("数据格式错误:未找到items数组");const Ce=window.confirm(`检测到 ${H.length} 个标签
点击"确定"将替换当前所有数据
点击"取消"将合并导入(保留现有数据)`)?"replace":"merge";if(Ce==="replace"){u.value=H.map((U,k)=>({id:U.id??pe(),name:U.name??"未命名",content:U.content??"",createdAt:U.createdAt??U.updatedAt??Date.now(),updatedAt:U.updatedAt??U.createdAt??Date.now(),pinned:!!U.pinned,highlighted:!!U.highlighted,order:typeof U.order=="number"?U.order:k})),de.sortMode&&(g.value=de.sortMode),typeof de.sortTimeDesc=="boolean"&&(m.value=de.sortTimeDesc),typeof de.sortNameAsc=="boolean"&&(f.value=de.sortNameAsc);const Ae=de.selectedId&&u.value.find(U=>U.id===de.selectedId)?de.selectedId:((Y=u.value[0])==null?void 0:Y.id)??null;d.value=Ae}else{const Ae=new Set(u.value.map(j=>j.id)),U=u.value.reduce((j,ne)=>Math.max(j,typeof ne.order=="number"?ne.order:j),-1);let k=0;H.forEach((j,ne)=>{let Fe=j.id;Ae.has(Fe)&&(Fe=pe()),Ae.add(Fe),u.value.push({id:Fe,name:j.name??"未命名",content:j.content??"",createdAt:j.createdAt??j.updatedAt??Date.now(),updatedAt:j.updatedAt??j.createdAt??Date.now(),pinned:!!j.pinned,highlighted:!!j.highlighted,order:(typeof j.order=="number",U+1+ne)}),k++}),alert(`合并成功!新增 ${k} 个标签,当前共 ${u.value.length} 个标签`)}await T(),Ce==="replace"&&alert(`导入成功!已替换为 ${u.value.length} 个标签`)}catch($){console.error("导入失败:",$),alert(`导入失败: ${$.message}`)}finally{s.value&&(s.value.value="")}},W.onerror=()=>{alert("文件读取失败"),s.value&&(s.value.value="")},W.readAsText(Z)}return t({updateSelectedContent:xe}),(_e,Z)=>(C(),A("div",ak,[i("div",sk,[Se(i("input",{"onUpdate:modelValue":Z[0]||(Z[0]=W=>r.value=W),class:"mlm-search",type:"text",placeholder:"搜索标签…"},null,512),[[ze,r.value]]),i("button",{class:"mlm-add",onClick:ie},"+ 新建标签"),i("button",{class:"mlm-migrate",onClick:Q,title:"将浏览器中的旧数据迁移到服务器"}," 📦 从浏览器迁移数据 "),i("div",{class:"mlm-io-grid"},[i("button",{class:"mlm-export",onClick:le,title:"导出提示词数据到JSON文件"}," 导出数据 "),i("button",{class:"mlm-import",onClick:be,title:"从JSON文件导入提示词数据"}," 导入数据 ")]),i("input",{ref_key:"fileInput",ref:s,type:"file",accept:".json",style:{display:"none"},onChange:we},null,544),i("div",ik,[i("button",{class:"mlm-sort",onClick:ce}," 按时间 "+y(m.value?"后→先":"先→后"),1),i("button",{class:"mlm-sort",onClick:Re}," 按名称 "+y(f.value?"A→Z":"Z→A"),1),i("button",{class:"mlm-edit",disabled:!V.value,onClick:P},"编辑",8,rk),i("button",{class:"mlm-delete",disabled:!V.value,onClick:re},"删除",8,lk)])]),at(a_,{name:"mlm",tag:"div",class:"mlm-list"},{default:Ut(()=>[(C(!0),A(qe,null,ot(M.value,(W,te)=>(C(),A("div",{key:W.id,class:We(["mlm-item",{active:W.id===d.value,pinned:!!W.pinned,highlighted:!!W.highlighted},{dragging:w.value===W.id,"drag-over":b.value===W.id}]),onClick:N=>z(W),title:W.updatedAt?J(W.updatedAt):"",draggable:"true",onDragstart:N=>X(W,te,N),onDragenter:vt(N=>ee(W),["prevent"]),onDragover:Z[1]||(Z[1]=vt(()=>{},["prevent"])),onDrop:vt(N=>Ee(W),["prevent"]),onDragend:he},[i("div",ck,[W.pinned?(C(),A("span",dk,"置顶")):Ie("",!0),i("span",pk,y(W.name),1)]),i("div",fk,[i("button",{class:We(["mini-btn","pin",{active:W.pinned}]),title:W.pinned?"取消置顶":"置顶",onClick:vt(N=>Le(W),["stop"])},Z[2]||(Z[2]=[i("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[i("path",{d:"M4 14h4v6h8v-6h4L12 4 4 14z"})],-1)]),10,gk),i("button",{class:We(["mini-btn","highlight",{active:W.highlighted}]),title:W.highlighted?"取消高亮":"高亮",onClick:vt(N=>fe(W),["stop"])},Z[3]||(Z[3]=[i("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"currentColor"},[i("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,mk)])],42,uk))),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}})},_k={class:"lora-manager-top-bar"},yk=["placeholder"],bk=["title"],wk=["title"],xk={class:"checkbox-container"},Sk=["onClick"],Tk=["onClick"],kk={key:0,class:"loading-indicator"},Ck={key:1,class:"empty-list"},Ek=["onClick","onMouseover"],$k=["src","alt","title"],Ik={key:0,class:"loading-more"},Ak={key:1,class:"no-more-data"},bn="weilin_prompt_ui_",Sh=Wt({__name:"lora_index",props:{loraManager:{type:String,default:"look"}},setup(e,{expose:t}){const{t:n}=Yt(),o=S(!1),a=S(!1),s=S(!1),r=S(!1),u=S("all"),d=S(""),m=S(null),f=S(""),g=S(null),w=S(!1),b=S(""),T=S(100),E=S(0),O=S(),M=S(!1),V=S(!1),pe=S(),D=S(localStorage.getItem("weilin_prompt_ui_showHoverInfo")),z=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),(z.value===null||z.value===void 0||z.value==="")&&(localStorage.setItem("weilin_prompt_ui_clickAddTag",!1),z.value=!1);const ie=e;It(D,k=>{localStorage.setItem("weilin_prompt_ui_showHoverInfo",k)}),It(z,k=>{localStorage.setItem("weilin_prompt_ui_clickAddTag",k)});const P=S(1),re=S(50),ce=Bt(()=>{if(u.value==="all"){const j=J.value;if(j){const ne=Object.values(j);return Math.ceil(ne.length/re.value)}return 1}const k=J.value[d.value];if(k){const j=k.all||Object.keys(k).filter(ne=>ne!=="all").map(ne=>k[ne]);return Math.ceil(j.length/re.value)}return 1}),Re=()=>{M.value=!0,V.value=!0},Le=(k,j)=>{if(!D.value||D.value==="false"||(V.value=!0,b.value===k&&w.value))return;const Fe=j.currentTarget.getBoundingClientRect(),Oe=window.innerHeight,ge=450,$e={left:Fe.left+(Fe.width-ge)/2,top:Fe.top+Fe.height+10};$e.top+310>Oe&&($e.top=Fe.top-310),$e.left=Math.max(10,Math.min($e.left,window.innerWidth-ge-10)),$e.top=Math.max(10,Math.min($e.top,Oe-310)),T.value=$e.left,E.value=$e.top,w.value=!0,b.value=k,wt(()=>{pe.value.refresh()})},fe=()=>{V.value=!1,setTimeout(()=>{!M.value&&!V.value&&(w.value=!1,b.value="",M.value=!1)},200)},xe=()=>{w.value=!1,b.value="",M.value=!1},ae=S([]),J=S([]),se=S(""),X=S(0),ee=(k,j)=>{X.value=k,se.value=j},Ee=async()=>{try{const k=await vo.getLoraFolderList();ae.value=k.data}catch(k){console.error("Failed to get folder list:",k),ue({type:"error",str:"message.loadFailed"})}},he=()=>{if(!g.value||s.value||r.value)return;const k=g.value;k.scrollHeight-k.scrollTop-k.clientHeight<100&&de()},Q=S(!1);let le=null;const be=()=>{le&&clearTimeout(le),le=setTimeout(()=>{f.value.length>0?(Q.value=!0,W()):(Q.value=!1,H())},300)},we=k=>{var j;return(j=k.local_info)!=null&&j.name&&k.local_info.name!==""&&k.local_info.name.length>0?k.local_info.name:k.name},_e=S(),Z=k=>{ie.loraManager==="addLora"?Ae(k):ie.loraManager==="prompt_inner"&&z.value?U(k):_e.value.open(k)},W=async()=>{try{const k=await vo.searchLoraGetFolderList(f.value);if(J.value=k.data,J.value.length>0){P.value=1;const j=Object.values(J.value),ne=(P.value-1)*50,Fe=ne+50,Oe=j.slice(ne,Fe);Y(Oe)}}catch(k){console.error("Failed to get folder list:",k),ue({type:"error",str:"message.loadFailed"})}},te=S([]),N=k=>{if(k==="all"){te.value=[],u.value=k,d.value="/",J.value=ae.value[k];const j=J.value;if(j){r.value=!1,P.value=1;const ne=Object.values(j),Fe=(P.value-1)*50,Oe=Fe+50,ge=ne.slice(Fe,Oe);Y(ge)}}else{te.value=[],u.value=k,d.value="/",J.value=ae.value[k];const j=J.value["/"];if(j){r.value=!1,P.value=1;const ne=Object.values(j),Fe=(P.value-1)*50,Oe=Fe+50,ge=ne.slice(Fe,Oe);Y(ge)}}},q=k=>{if(k!==d.value){d.value=k,te.value=[];const j=J.value[d.value];if(j){r.value=!1,P.value=1;const ne=j.all||Object.keys(j).filter($e=>$e!=="all").map($e=>j[$e]),Fe=(P.value-1)*50,Oe=Fe+50,ge=ne.slice(Fe,Oe);Y(ge)}}},Y=async k=>{const j=await vo.getLoraRangeList(k);P.value===1?te.value=j.data.loras:te.value=te.value.concat(j.data.loras)},$=async()=>{if(m.value!==null){ue({type:"warn",str:"message.isLoading"});return}try{ue({type:"success",str:"message.isLoadingPleaseWait"}),await vo.getAllLoraList(),m.value=setInterval(async()=>{await I()},1e3)}catch(k){console.error("Failed to get all lora list:",k),ue({type:"error",str:"message.loadFailed"})}},I=async()=>{try{const k=await vo.getAllLoraStatus();k.data.isLoading===!1?(clearInterval(m.value),m.value=null,ue({type:"success",str:"message.loaddingSuccess"}),await H()):ue({type:"warn",str:"message.loaddingPrc",name:k.data.progress})}catch(k){console.error("Failed to get lora status:",k),clearInterval(m.value),m.value=null,ue({type:"error",str:"message.loadFailed"})}},H=async()=>{if(!o.value){o.value=!0,P.value=1,r.value=!1,s.value=!1;try{await Ee(),wt(()=>{N("all")})}catch(k){console.error("Failed to refresh lora list:",k)}finally{o.value=!1}}},de=()=>{if(P.value>=ce.value){r.value=!0;return}s.value=!0;try{if(P.value++,Q.value){if(J.value.length>0){const k=Object.values(J.value),j=(P.value-1)*50,ne=j+50,Fe=k.slice(j,ne);Y(Fe)}}else if(u.value==="all"){J.value=ae.value[u.value];const k=J.value;if(k){const j=Object.values(k),ne=(P.value-1)*50,Fe=ne+50,Oe=j.slice(ne,Fe);Y(Oe)}}else{const k=J.value[d.value];if(k){const j=k.all||Object.keys(k).filter(ge=>ge!=="all").map(ge=>k[ge]),ne=(P.value-1)*50,Fe=ne+50,Oe=j.slice(ne,Fe);Y(Oe)}}}finally{s.value=!1}},Ce=()=>{P.value=1,r.value=!1,s.value=!1};It([u,d,f],()=>{Ce()}),jt(()=>{H()});const Ae=k=>{var j,ne,Fe,Oe,ge,$e,Ke,tt,it,bt,ct,rn,Rt,In,wn;X.value===0?window.postMessage({type:"weilin_prompt_ui_selectLora",lora:{name:k.model_name,display_name:we(k),lora:k.name,weight:(j=k.local_info)!=null&&j.strengthMin?k.local_info.strengthMin:1,text_encoder_weight:(ne=k.local_info)!=null&&ne.strWeight?k.local_info.strWeight:1,trigger_weight:(Fe=k.local_info)!=null&&Fe.triggerWeight?k.local_info.triggerWeight:(Oe=k.local_info)!=null&&Oe.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_${se.value}`,lora:{name:k.model_name,display_name:we(k),lora:k.name,weight:($e=k.local_info)!=null&&$e.strengthMin?k.local_info.strengthMin:1,text_encoder_weight:(Ke=k.local_info)!=null&&Ke.strWeight?k.local_info.strWeight:1,trigger_weight:(tt=k.local_info)!=null&&tt.triggerWeight?k.local_info.triggerWeight:(it=k.local_info)!=null&&it.strWeight?k.local_info.strWeight:1,loraWorks:(bt=k.local_info)!=null&&bt.loraWorks?k.local_info.loraWorks:""}},"*"):X.value===2&&window.postMessage({type:`weilin_prompt_ui_selectLora_stack_node_${se.value}`,lora:{name:k.model_name,display_name:we(k),lora:k.name,weight:(ct=k.local_info)!=null&&ct.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:(In=k.local_info)!=null&&In.strWeight?k.local_info.strWeight:1,loraWorks:(wn=k.local_info)!=null&&wn.loraWorks?k.local_info.loraWorks:""}},"*")},U=k=>{var $e,Ke,tt;const j=k.model_name,ne=($e=k.local_info)!=null&&$e.strengthMin?k.local_info.strengthMin:1,Fe=(Ke=k.local_info)!=null&&Ke.strWeight?k.local_info.strWeight:1,Oe=(tt=k.local_info)!=null&&tt.triggerWeight?k.local_info.triggerWeight:Fe,ge=`<wlr:${j}:${ne}:${Fe}:${Oe}>`;window.postMessage({type:"weilin_prompt_ui_add_lora_tag",tag:ge},"*")};return t({openSetSeed:ee}),(k,j)=>(C(),A("div",{class:We(`${bn}lora-manager`)},[i("div",_k,[Se(i("input",{"onUpdate:modelValue":j[0]||(j[0]=ne=>f.value=ne),class:We(`${bn}search-input`),placeholder:v(n)("loraManager.searchPlaceholder"),onInput:be},null,42,yk),[[ze,f.value]]),i("button",{class:We(`${bn}refresh-btn`),onClick:H,title:v(n)("loraManager.refresh")},[(C(),A("svg",{class:We([`${bn}refresh-icon`,{"is-rotating":o.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},j[3]||(j[3]=[i("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,bk),i("button",{style:{"margin-left":"10px"},class:We(`${bn}refresh-btn`),onClick:$,title:v(n)("loraManager.cacheAll")},[(C(),A("svg",{class:We([`${bn}refresh-icon`,{"is-rotating":o.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},j[4]||(j[4]=[i("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,wk),i("div",xk,[i("label",{class:We(`${bn}checkbox-label`)},[Se(i("input",{type:"checkbox","onUpdate:modelValue":j[1]||(j[1]=ne=>D.value=ne),class:We(`${bn}checkbox`)},null,2),[[on,D.value]]),j[5]||(j[5]=i("span",null,"悬浮信息",-1))],2),e.loraManager=="prompt_inner"?(C(),A("label",{key:0,class:We(`${bn}checkbox-label`)},[Se(i("input",{type:"checkbox","onUpdate:modelValue":j[2]||(j[2]=ne=>z.value=ne),class:We(`${bn}checkbox`)},null,2),[[on,z.value]]),j[6]||(j[6]=i("span",null,"点击添加Tag",-1))],2)):Ie("",!0)])]),Q.value?Ie("",!0):(C(),A("div",{key:0,class:We(`${bn}category-nav`)},[(C(!0),A(qe,null,ot(Object.keys(ae.value),ne=>(C(),A("button",{key:ne,class:We([`${bn}category-btn`,{active:u.value===ne}]),onClick:Fe=>N(ne)},y(ne==="/"?v(n)("loraManager.root"):ne=="all"?v(n)("loraManager.all"):ne),11,Sk))),128))],2)),u.value!="all"&&!Q.value?(C(),A("div",{key:1,class:We(`${bn}subcategory-nav`)},[(C(!0),A(qe,null,ot(Object.keys(J.value),ne=>(C(),A("button",{key:ne,class:We([`${bn}category-btn`,{active:d.value===ne}]),onClick:Fe=>q(ne)},y(ne==="/"?v(n)("loraManager.root"):ne=="all"?v(n)("loraManager.all"):ne),11,Tk))),128))],2)):Ie("",!0),i("div",{class:We(`${bn}lora-list-container`),ref_key:"scrollContainer",ref:g,onScroll:he},[a.value&&!s.value?(C(),A("div",kk,y(v(n)("loraManager.loading")),1)):te.value.length===0?(C(),A("div",Ck,y(v(n)("loraManager.noResults")),1)):Ie("",!0),i("div",{class:We(`${bn}lora-list`),style:{display:"grid","grid-template-columns":"repeat(auto-fill, minmax(150px, 1fr))",gap:"12px"}},[(C(!0),A(qe,null,ot(te.value,ne=>(C(),A("div",{key:ne.file_path,class:We(`${bn}lora-card`),ref_for:!0,ref_key:"loraCardRef",ref:O,onClick:Fe=>Z(ne),onMouseover:Fe=>Le(ne.name,Fe),onMouseleave:fe,style:{display:"flex","flex-direction":"column","min-height":"200px",cursor:"pointer"}},[i("div",{class:We(`${bn}lora-preview`),style:{flex:"1",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden",width:"100%"}},[ne.preview?(C(),A("img",{key:0,src:ne.preview,alt:ne.model_name,title:ne.model_name,loading:"lazy",style:{width:"100%",height:"100%","object-fit":"contain","min-height":"150px"}},null,8,$k)):(C(),A("div",{key:1,class:We(`${bn}no-preview`),style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","min-height":"150px"}},j[7]||(j[7]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24"},[i("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),i("div",{class:We(`${bn}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(we(ne)),3)],42,Ek))),128))],2),i("div",null,[s.value?(C(),A("div",Ik,y(v(n)("loraManager.loadingMore")),1)):Ie("",!0),!s.value&&r.value?(C(),A("div",Ak,y(v(n)("loraManager.noMoreData")),1)):Ie("",!0)])],34),at(El,{ref_key:"loraDetailRef",ref:_e},null,512),w.value?(C(),Qt(Pc,{key:2,ref_key:"loraCardItem",ref:pe,fileNmae:b.value,paddingLeft:T.value,paddingTop:E.value,onCardLeave:xe,onCardenter:Re},null,8,["fileNmae","paddingLeft","paddingTop"])):Ie("",!0)],2))}},[["__scopeId","data-v-61a57bab"]]),Lk={class:"tag-manager"},Mk={class:"selected-categories-container"},Dk={class:"selected-categories-header"},Ok={class:"selected-categories-content"},Rk={key:0,class:"selected-category-section"},Pk={class:"section-title"},Nk={class:"selected-items"},Fk={class:"category-name"},Bk=["onClick"],Uk={key:1,class:"selected-category-section"},zk={class:"section-title"},Vk={class:"selected-items"},Wk={class:"category-name"},Hk={class:"subcategory-name"},jk=["onClick"],Gk={key:2,class:"no-selected"},qk={class:"category-tabs"},Yk={class:"tabs-wrapper primary-tabs"},Kk={class:"tabs-scroll"},Jk=["onClick"],Xk={class:"tab-text"},Qk=["onClick","title"],Zk={key:0,class:"tabs-wrapper group-tabs"},eC={class:"tabs-scroll"},tC=["onClick"],nC={class:"tab-text"},oC=["onClick","disabled","title"],aC=Wt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=n,s=S([]),r=S(null),u=S(null),d=S([]),m=S(!1),f=S([]),g=S(!1),w=S(0),b=Bt(()=>f.value.filter(xe=>!xe.sub)),T=Bt(()=>f.value.filter(xe=>xe.sub)),E=xe=>f.value.findIndex(ae=>ae.group.p_uuid===xe.group.p_uuid&&!ae.sub),O=xe=>f.value.findIndex(ae=>ae.group.p_uuid===xe.group.p_uuid&&ae.sub&&ae.sub.g_uuid===xe.sub.g_uuid),M=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},V=async()=>{try{const xe=await Ot.getTagsGroupList();if(s.value=xe.info,u.value){const ae=s.value.flatMap(J=>J.groups).find(J=>J.p_uuid===u.value.p_uuid);ae?u.value=ae:u.value=null}if(r.value){const ae=s.value.find(J=>J.p_uuid===r.value.p_uuid);ae?r.value=ae:r.value=null}}catch(xe){console.error("获取标签列表失败:",xe)}},pe=xe=>{if(!xe||xe==="transparent")return"var(--primary-text)";let ae,J,se,X=1;if(xe.startsWith("rgba")){const Ee=xe.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);Ee&&([,ae,J,se,X]=Ee.map(Number))}else if(xe.startsWith("rgb")){const Ee=xe.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);Ee&&([,ae,J,se]=Ee.map(Number))}return X<.5?"var(--primary-text)":(ae*299+J*587+se*114)/1e3>128?"#000000":"#ffffff"};jt(()=>{window.addEventListener("message",Le)}),Aa(()=>{window.removeEventListener("message",Le)});const D=xe=>{r.value=xe,u.value=null,m.value=!1,d.value=[]},z=xe=>{ie(r.value)||(u.value=xe,m.value=!1,d.value=[])},ie=xe=>xe?f.value.some(ae=>ae.group.p_uuid===xe.p_uuid&&!ae.sub):!1,P=xe=>{const ae=f.value.findIndex(J=>J.group.p_uuid===xe.p_uuid&&!J.sub);ae!==-1?f.value.splice(ae,1):(f.value=f.value.filter(J=>J.group.p_uuid!==xe.p_uuid),f.value.push({group:{p_uuid:xe.p_uuid,name:xe.name},sub:null}))},re=(xe,ae)=>{if(ie(xe))return;const J=f.value.findIndex(se=>se.group.p_uuid===xe.p_uuid&&se.sub&&se.sub.g_uuid===ae.g_uuid);if(J!==-1)f.value.splice(J,1);else{const se=f.value.findIndex(X=>X.group.p_uuid===xe.p_uuid&&!X.sub);se!==-1&&f.value.splice(se,1),f.value.push({group:{p_uuid:xe.p_uuid,name:xe.name},sub:ae?{g_uuid:ae.g_uuid,name:ae.name}:null})}},ce=xe=>{f.value.splice(xe,1)},Re=()=>{f.value=[]},Le=xe=>{!xe.data||!xe.data.type||xe.data.type.startsWith("weilin_prompt_ui_")&&xe.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&V()},fe=()=>{if(f.value.length===0){ue({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{data:f.value,index:w.value}),g.value=!1};return t({open:(xe,ae)=>{M(),w.value=xe,f.value=ae,g.value=!0}}),(xe,ae)=>(C(),Qt(Gs,{modelValue:g.value,"onUpdate:modelValue":ae[1]||(ae[1]=J=>g.value=J),title:v(o)("importDialog.selectTitle")},{footer:Ut(()=>[i("button",{onClick:ae[0]||(ae[0]=J=>g.value=!1)},y(v(o)("promptBox.settings.close")),1),i("button",{onClick:fe},y(v(o)("importDialog.sureSelect")),1)]),default:Ut(()=>[i("div",Lk,[i("div",Mk,[i("div",Dk,[i("span",null,y(v(o)("importDialog.selectedCategories")),1),f.value.length>0?(C(),A("button",{key:0,class:"clear-all-btn",onClick:Re},y(v(o)("importDialog.clearAll")),1)):Ie("",!0)]),i("div",Ok,[b.value.length>0?(C(),A("div",Rk,[i("div",Pk,y(v(o)("importDialog.primaryCategories")),1),i("div",Nk,[(C(!0),A(qe,null,ot(b.value,(J,se)=>(C(),A("div",{key:"primary-"+se,class:"selected-item"},[i("span",Fk,y(J.group.name),1),i("button",{class:"remove-selected-btn",onClick:X=>ce(E(J))}," × ",8,Bk)]))),128))])])):Ie("",!0),T.value.length>0?(C(),A("div",Uk,[i("div",zk,y(v(o)("importDialog.subCategories")),1),i("div",Vk,[(C(!0),A(qe,null,ot(T.value,(J,se)=>(C(),A("div",{key:"sub-"+se,class:"selected-item"},[i("span",Wk,y(J.group.name),1),ae[2]||(ae[2]=i("span",{class:"separator"},">",-1)),i("span",Hk,y(J.sub.name),1),i("button",{class:"remove-selected-btn",onClick:X=>ce(O(J))}," × ",8,jk)]))),128))])])):Ie("",!0),f.value.length===0?(C(),A("div",Gk,y(v(o)("importDialog.noSelectedCategories")),1)):Ie("",!0)])]),i("div",qk,[i("div",Yk,[i("div",Kk,[(C(!0),A(qe,null,ot(s.value,(J,se)=>{var X,ee,Ee;return C(),A("div",{key:"Tabss-"+se,class:We(["tab-item",{active:((X=r.value)==null?void 0:X.p_uuid)===J.p_uuid}]),style:Ft({backgroundColor:((ee=r.value)==null?void 0:ee.p_uuid)===J.p_uuid?"var(--weilin-prompt-ui-primary-bg)":J.color,color:((Ee=r.value)==null?void 0:Ee.p_uuid)===J.p_uuid?"var(--weilin-prompt-ui-primary-text)":pe(J.color)}),onClick:he=>D(J)},[i("span",Xk,y(J.name),1),i("button",{class:"select-tab-btn",onClick:vt(he=>P(J),["stop"]),title:v(o)("importDialog.selectCategory")},ae[3]||(ae[3]=[i("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[i("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]),8,Qk)],14,Jk)}),128))])]),r.value?(C(),A("div",Zk,[i("div",eC,[(C(!0),A(qe,null,ot(r.value.groups,(J,se)=>{var X,ee,Ee;return C(),A("div",{key:"TabsSw-"+se,class:We(["tab-item",{active:((X=u.value)==null?void 0:X.g_uuid)===J.g_uuid,disabled:ie(r.value)}]),style:Ft({backgroundColor:((ee=u.value)==null?void 0:ee.g_uuid)===J.g_uuid?"var(--weilin-prompt-ui-primary-bg)":J.color,color:((Ee=u.value)==null?void 0:Ee.g_uuid)===J.g_uuid?"var(--weilin-prompt-ui-primary-text)":pe(J.color),opacity:ie(r.value)?"0.5":"1",cursor:ie(r.value)?"not-allowed":"pointer"}),onClick:he=>ie(r.value)?null:z(J)},[i("span",nC,y(J.name),1),ie(r.value)?Ie("",!0):(C(),A("button",{key:0,class:"select-tab-btn",onClick:vt(he=>re(r.value,J),["stop"]),disabled:ie(r.value),title:v(o)("importDialog.selectSubcategory")},ae[4]||(ae[4]=[i("svg",{viewBox:"0 0 24 24",width:"28",height:"28"},[i("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]),8,oC))],14,tC)}),128))])])):Ie("",!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}})},sC={class:"random-rule-container"},iC={class:"settings-section template-section"},rC={class:"section-header"},lC={class:"template-controls"},uC={class:"template-select-group"},cC={class:"template-select-with-apply"},dC={value:""},pC=["value"],fC=["disabled"],gC={class:"template-bottom-buttons"},mC=["disabled"],hC=["disabled"],vC={key:0,class:"template-name-input"},_C=["placeholder"],yC={class:"template-actions"},bC={key:0},wC={class:"settings-section"},xC={class:"section-header"},SC={class:"rules-reminder"},TC={class:"rules-list"},kC={class:"rule-header"},CC=["onClick"],EC={class:"rule-content"},$C={class:"form-group"},IC={class:"range-inputs"},AC=["onUpdate:modelValue"],LC=["onUpdate:modelValue"],MC={class:"form-group"},DC=["onUpdate:modelValue"],OC={value:"category"},RC={value:"specific"},PC={key:0,class:"form-group"},NC={class:"selected-categories-container"},FC={class:"selected-categories-header"},BC={class:"selected-categories-content"},UC={key:0,class:"selected-category-section"},zC={class:"section-title"},VC={class:"selected-items"},WC={class:"category-name"},HC={key:1,class:"selected-category-section"},jC={class:"section-title"},GC={class:"selected-items"},qC={class:"category-name"},YC={class:"subcategory-name"},KC={key:2,class:"no-selected"},JC=["onClick"],XC={key:1,class:"form-group"},QC={class:"tags-input-container"},ZC=["onClick"],eE=["onUpdate:modelValue","onKeydown","placeholder"],tE=["onClick"],nE={class:"actions-section"},oE=["disabled"],Th="weilin_tools_",aE=Wt({__name:"random_setting",emits:["close","update","generateRandomTags"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=S(!1),s=S(null),r=S(!1),u=S(""),d=S(""),m={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:""}]},g=S({});async function w(){try{u.value==="prompt_global"?await Yn.getRandomTemplateApple().then(N=>{N.data===""?g.value=f:Yn.getTemplateData(N.data).then(q=>{J.value=N.data,g.value=q.data,r.value=!0}).catch(q=>{console.error("加载模板失败:",q),ue({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(N=>{console.error(N),ue({type:"warn",str:"message.networkError"})}):d.value===""?g.value=f:Yn.getTemplateData(d.value).then(N=>{J.value=d.value,g.value=N.data,r.value=!0}).catch(N=>{console.error("加载模板失败:",N),ue({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(N){ue({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",N)}}function b(){try{const N=JSON.parse(JSON.stringify(g.value));N.rules&&N.rules.forEach(q=>{delete q.tagInput}),Yn.updateTemplateData(J.value,N).then(q=>{Yn.getTemplateData(q.path_name).then(Y=>{g.value=Y.data,ue({type:"success",str:"randomUtils.templateSaved"})}).catch(Y=>{console.error("加载模板失败:",Y),ue({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(q=>{console.error("更新模板失败:",q),ue({type:"warn",str:"randomUtils.errorSavingTemplate"})})}catch(N){console.error("Error saving random tag settings:",N),ue({type:"warn",str:"randomUtils.errorSavingSettings"})}}function T(){g.value.rules.push({range:{min:g.value.rules.length>0?g.value.rules[g.value.rules.length-1].range.max+1:1,max:g.value.rules.length>0?g.value.rules[g.value.rules.length-1].range.max+3:3},type:"category",categoryId:1,specificTags:[],tagGroupList:[],tagInput:""})}function E(N){g.value.rules.splice(N,1)}function O(N){N.tagInput&&N.tagInput.trim()&&(N.specificTags.push(N.tagInput.trim()),N.tagInput="")}function M(N,q){N.specificTags.splice(q,1)}function V(){}const D=S((()=>{try{const N=localStorage.getItem(`${Th}randomRuleSettingState`);if(N){const q=JSON.parse(N),Y={...m};return q.randomRuleSetting&&(Y.randomRuleSetting={...m.randomRuleSetting,...q.randomRuleSetting}),Y}}catch(N){console.error("Error loading window states:",N)}return{...m}})());It(D,N=>{try{localStorage.setItem(`${Th}randomRuleSettingState`,JSON.stringify(N))}catch(q){console.error("Error saving window states:",q)}},{deep:!0});const z=()=>{a.value=!1},ie=(N,q)=>{D.value[N]&&(D.value[N].position={...q})},P=(N,q)=>{D.value[N]&&(D.value[N].size={...q})},re=N=>{a.value=!0,u.value=N,st.registerWindow("randomRuleSetting"),wt(()=>{st.setActiveWindow("randomRuleSetting"),N==="prompt_global"?Ee(1):W()})},ce=(N,q)=>{s.value.open(N,q)},Re=()=>void 0,Le=N=>!N||!Array.isArray(N)||N.length<=0?[]:N.filter(q=>!q.sub),fe=N=>!N||!Array.isArray(N)||N.length<=0?[]:N.filter(q=>q.sub),xe=N=>{N&&N.data&&Array.isArray(N.data)?g.value.rules[N.index].tagGroupList=N.data:g.value.rules[N.index].tagGroupList=[]},ae=S([]),J=S(""),se=S(""),X=S(!1),ee=S(!1);async function Ee(N=0){try{await Yn.getTemplateList().then(q=>{ae.value=q.data,N===1&&w()}).catch(q=>{console.error(q),ue({type:"warn",str:"message.networkError"})})}catch(q){ue({type:"warn",str:"message.networkError"}),console.error("RandomTemplate获取列表失败:",q)}}function he(){X.value=!0,se.value=""}function Q(){X.value=!1,se.value=""}function le(){if(!J.value){ue.warm(o("randomUtils.pleaseChooseTemplate"));return}u.value==="prompt_global"?Yn.updateRandomTemplateApple(J.value).then(()=>{ue({type:"success",str:"randomUtils.templateApplied"})}).catch(N=>{console.error("获取模板失败:",N),ue({type:"warn",str:"randomUtils.errorApplyingTemplate"})}):(window.postMessage({type:"weilin_prompt_ui_prompt_inner_update_node_tag_template_id",data:J.value},"*"),ue({type:"success",str:"randomUtils.templateApplied"}))}function be(){J.value&&Yn.deleteTemplateData(J.value).then(()=>{ue({type:"success",str:"randomUtils.templateDeleted"}),Ee(),J.value=""}).catch(N=>{console.error("删除模板失败:",N),ue({type:"warn",str:"randomUtils.errorDeletingTemplate"})})}function we(){if(!J.value)return;const N=ae.value.find(q=>q.path_name===J.value);N&&(X.value=!0,se.value=N.file_name,ee.value=!0)}function _e(){if(!se.value.trim()){ue({type:"warn",str:"randomUtils.templateNameRequired"});return}if(g.value.file_name=se.value.trim(),ee.value){const N=ae.value.find(q=>q.path_name===J.value);if(N){N.file_name=se.value.trim();const q=JSON.parse(JSON.stringify(g.value));q.rules&&q.rules.forEach(Y=>{delete Y.tagInput}),Yn.updateTemplateData(N.path_name,q).then(Y=>{ue({type:"success",str:"randomUtils.templateSaved"}),Ee().then(()=>{Yn.getTemplateData(Y.path_name).then($=>{J.value=Y.path_name,g.value=$.data,ue({type:"success",str:"randomUtils.templateSaved"})}).catch($=>{console.error("加载模板失败:",$),ue({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(Y=>{console.error("保存模板失败:",Y),ue({type:"warn",str:"randomUtils.errorSavingTemplate"})})}}else{g.value=f,g.value.file_name=se.value.trim();const N=JSON.parse(JSON.stringify(g.value));N.rules&&N.rules.forEach(q=>{delete q.tagInput}),Yn.saveTemplateData(N).then(q=>{Ee().then(()=>{Yn.getTemplateData(q.path_name).then(Y=>{J.value=q.path_name,g.value=Y.data,ue({type:"success",str:"randomUtils.templateSaved"})}).catch(Y=>{console.error("加载模板失败:",Y),ue({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(q=>{console.error("保存模板失败:",q),ue({type:"warn",str:"randomUtils.errorSavingTemplate"})})}X.value=!1,se.value="",ee.value=!1}const Z=N=>{if(N.target.value!=="")try{Yn.getTemplateData(N.target.value).then(q=>{J.value=q.path_name,g.value=q.data,r.value=!0}).catch(q=>{console.error("加载模板失败:",q),ue({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(q){ue({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",q)}},W=()=>{window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id"},"*")},te=N=>{!N.data||!N.data.type||N.data.type.startsWith("weilin_prompt_ui_")&&N.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response"&&(d.value=N.data.data,Ee(1))};return jt(()=>{window.addEventListener("message",te)}),po(()=>{st.unregisterWindow("randomRuleSetting"),window.removeEventListener("message",te)}),t({open:re,getRandomTags:Re}),(N,q)=>(C(),A(qe,null,[a.value?(C(),Qt(mo,{key:0,title:v(o)("randomUtils.title"),position:D.value.randomRuleSetting.position,size:D.value.randomRuleSetting.size,"z-index":v(st).getZIndex("randomRuleSetting"),"onUpdate:position":q[2]||(q[2]=Y=>ie("randomRuleSetting",Y)),"onUpdate:size":q[3]||(q[3]=Y=>P("randomRuleSetting",Y)),onActive:q[4]||(q[4]=Y=>v(st).setActiveWindow("randomRuleSetting")),onClose:q[5]||(q[5]=Y=>z())},{default:Ut(()=>[i("div",sC,[i("div",iC,[i("div",rC,[i("h3",null,y(v(o)("randomUtils.ruleTemplates")),1)]),i("div",lC,[i("div",uC,[i("div",cC,[Se(i("select",{"onUpdate:modelValue":q[0]||(q[0]=Y=>J.value=Y),onChange:Z,class:"form-select template-select"},[i("option",dC,y(v(o)("randomUtils.selectTemplate")),1),(C(!0),A(qe,null,ot(ae.value,(Y,$)=>(C(),A("option",{key:$,value:Y.path_name},y(Y.file_name),9,pC))),128))],544),[[an,J.value]]),i("button",{class:"apply-template-btn",onClick:le,disabled:!J.value},y(v(o)("randomUtils.applyTemplate")),9,fC)]),i("div",gC,[i("button",{class:"new-template-btn",onClick:he},y(v(o)("randomUtils.newTemplate")),1),i("button",{class:"edit-template-btn",onClick:we,disabled:!J.value},y(v(o)("randomUtils.editTemplate")),9,mC),i("button",{class:"delete-template-btn",onClick:be,disabled:!J.value},y(v(o)("randomUtils.deleteTemplate")),9,hC)])]),X.value?(C(),A("div",vC,[Se(i("input",{type:"text","onUpdate:modelValue":q[1]||(q[1]=Y=>se.value=Y),class:"form-input",placeholder:v(o)("randomUtils.templateNamePlaceholder")},null,8,_C),[[ze,se.value]]),i("div",yC,[i("button",{class:"save-template-btn",onClick:_e},y(v(o)("randomUtils.save")),1),i("button",{class:"cancel-template-btn",onClick:Q},y(v(o)("randomUtils.cancel")),1)])])):Ie("",!0)])]),J.value&&r.value?(C(),A("div",bC,[i("div",wC,[i("div",xC,[i("h3",null,y(v(o)("randomUtils.rules")),1),i("button",{class:"add-rule-btn",onClick:T},[q[6]||(q[6]=i("span",null,"+",-1)),ut(" "+y(v(o)("randomUtils.addRule")),1)])]),i("div",SC,[i("p",null,y(v(o)("randomUtils.rulesReminder")),1)]),i("div",TC,[(C(!0),A(qe,null,ot(g.value.rules,(Y,$)=>(C(),A("div",{key:$,class:"rule-item"},[i("div",kC,[i("h4",null,y(v(o)("randomUtils.rule"))+" #"+y($+1),1),i("button",{class:"delete-rule-btn",onClick:I=>E($)},"×",8,CC)]),i("div",EC,[i("div",$C,[i("label",null,y(v(o)("randomUtils.range")),1),i("div",IC,[Se(i("input",{type:"number","onUpdate:modelValue":I=>Y.range.min=I,min:"1",class:"form-input range-input"},null,8,AC),[[ze,Y.range.min,void 0,{number:!0}]]),q[7]||(q[7]=i("span",null,"-",-1)),Se(i("input",{type:"number","onUpdate:modelValue":I=>Y.range.max=I,min:"1",class:"form-input range-input"},null,8,LC),[[ze,Y.range.max,void 0,{number:!0}]])])]),i("div",MC,[i("label",null,y(v(o)("randomUtils.tagType")),1),Se(i("select",{"onUpdate:modelValue":I=>Y.type=I,class:"form-select"},[i("option",OC,y(v(o)("randomUtils.category")),1),i("option",RC,y(v(o)("randomUtils.specificTags")),1)],8,DC),[[an,Y.type]])]),Y.type==="category"?(C(),A("div",PC,[i("div",NC,[i("div",FC,[i("span",null,y(v(o)("importDialog.selectedCategories")),1)]),i("div",BC,[Le(Y.tagGroupList).length>0?(C(),A("div",UC,[i("div",zC,y(v(o)("importDialog.primaryCategories")),1),i("div",VC,[(C(!0),A(qe,null,ot(Le(Y.tagGroupList),(I,H)=>(C(),A("div",{key:"primary-"+H,class:"selected-item"},[i("span",WC,y(I.group.name),1)]))),128))])])):Ie("",!0),fe(Y.tagGroupList).length>0?(C(),A("div",HC,[i("div",jC,y(v(o)("importDialog.subCategories")),1),i("div",GC,[(C(!0),A(qe,null,ot(fe(Y.tagGroupList),(I,H)=>(C(),A("div",{key:"sub-"+H,class:"selected-item"},[i("span",qC,y(I.group.name),1),q[8]||(q[8]=i("span",{class:"separator"},">",-1)),i("span",YC,y(I.sub.name),1)]))),128))])])):Ie("",!0),!Y.tagGroupList||Y.tagGroupList.length===0?(C(),A("div",KC,y(v(o)("importDialog.noSelectedCategories")),1)):Ie("",!0)])]),i("button",{class:"add-tag-btn",onClick:I=>ce($,Y.tagGroupList)},y(v(o)("randomUtils.selectTagGroup")),9,JC)])):Ie("",!0),Y.type==="specific"?(C(),A("div",XC,[i("label",null,y(v(o)("randomUtils.specificTags")),1),i("div",QC,[(C(!0),A(qe,null,ot(Y.specificTags,(I,H)=>(C(),A("div",{key:H,class:"tag-chip"},[ut(y(I)+" ",1),i("button",{class:"remove-tag-btn",onClick:de=>M(Y,H)},"×",8,ZC)]))),128)),Se(i("input",{type:"text","onUpdate:modelValue":I=>Y.tagInput=I,onKeydown:Pn(vt(I=>O(Y),["prevent"]),["enter"]),class:"tag-input",placeholder:v(o)("randomUtils.addTagPlaceholder")},null,40,eE),[[ze,Y.tagInput]])]),i("button",{class:"add-tag-btn",onClick:I=>O(Y)},y(v(o)("randomUtils.addTag")),9,tE)])):Ie("",!0)])]))),128))])])])):Ie("",!0)]),i("div",nE,[i("button",{class:"save-btn",onClick:b,disabled:!J.value},y(v(o)("common.save")),9,oE)])]),_:1},8,["title","position","size","z-index"])):Ie("",!0),at(aC,{ref_key:"tagGroupSelectItem",ref:s,onSureSelect:xe},null,512)],64))}},[["__scopeId","data-v-576f597a"]]);function Qs(e){let t=e.length;for(;--t>=0;)e[t]=0}const sE=3,iE=258,kh=29,rE=256+1+kh,Ch=30,lE=512,uE=new Array((rE+2)*2);Qs(uE);const cE=new Array(Ch*2);Qs(cE);const dE=new Array(lE);Qs(dE);const pE=new Array(iE-sE+1);Qs(pE);const fE=new Array(kh);Qs(fE);const gE=new Array(Ch);Qs(gE);try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const Nc=new Uint8Array(256);for(let e=0;e<256;e++)Nc[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Nc[254]=Nc[254]=1;const mE={class:"tag-manager"},hE={class:"form-group"},vE={class:"select-group-item"},_E=["value","placeholder"],yE={class:"form-group"},bE=["placeholder"],wE={class:"form-group"},xE=["placeholder"],SE={class:"form-group"},TE={class:"color-picker"},kE={class:"color-controls"},CE={class:"alpha-control"},EE={class:"alpha-value"},$E=Wt({__name:"favour",emits:["sureSelect"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=S(null),s=S(!1),r=S({text:"",desc:"",id_index:"",color:"rgba(255, 123, 2, .4)"}),u=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}),m=Bt(()=>g(d.value.hex,d.value.alpha)),f=()=>{const O=g(d.value.hex,d.value.alpha);r.value.color=O},g=(O,M)=>{const V=parseInt(O.slice(1,3),16),pe=parseInt(O.slice(3,5),16),D=parseInt(O.slice(5,7),16);return`rgba(${V}, ${pe}, ${D}, ${M/100})`},w=()=>{a.value.open()},b=()=>{if(!r.value.text||!r.value.desc||!u.value.sub.id_index||!u.value.sub.g_uuid){ue({type:"warn",str:"tagManager.textRequired"});return}Ot.addNewTags({id_index:u.value.sub.id_index,g_uuid:u.value.sub.g_uuid,text:r.value.text,desc:r.value.desc,color:r.value.color?r.value.color:"rgba(255, 123, 2, .4)"}).then(()=>{window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.addSuccess"}),T()}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},T=()=>{r.value={id_index:"",text:"",desc:"",color:"rgba(255, 123, 2, .4)"},s.value=!1},E=O=>{u.value=O,r.value.id_index=O.sub.id_index};return t({open:(O,M)=>{r.value={id_index:"",text:"",desc:"",color:"rgba(255, 123, 2, .4)"},r.value.text=O,r.value.desc=M,s.value=!0}}),(O,M)=>(C(),A(qe,null,[at(Gs,{modelValue:s.value,"onUpdate:modelValue":M[5]||(M[5]=V=>s.value=V),title:v(o)("tagManager.addTag")},{footer:Ut(()=>[i("button",{onClick:M[4]||(M[4]=V=>s.value=!1)},y(v(o)("common.cancel")),1),i("button",{onClick:b},y(v(o)("common.confirm")),1)]),default:Ut(()=>[i("div",mE,[i("div",hE,[i("label",null,y(v(o)("importDialog.selectGroup")),1),i("div",vE,[i("input",{type:"text",value:r.value.id_index!=""?u.value.group.name+" -> "+u.value.sub.name:"请选择分组",readonly:"",placeholder:v(o)("importDialog.selectGroup")},null,8,_E),i("button",{class:"add-tag-btn",style:{"margin-left":"10px","min-width":"fit-content"},onClick:w},y(v(o)("importDialog.selectGroup")),1)])]),i("div",yE,[i("label",null,y(v(o)("tagManager.text")),1),Se(i("input",{type:"text","onUpdate:modelValue":M[0]||(M[0]=V=>r.value.desc=V),placeholder:v(o)("tagManager.textPlaceholder")},null,8,bE),[[ze,r.value.desc]])]),i("div",wE,[i("label",null,y(v(o)("tagManager.description")),1),Se(i("textarea",{"onUpdate:modelValue":M[1]||(M[1]=V=>r.value.text=V),placeholder:v(o)("tagManager.descriptionPlaceholder"),rows:"4"}," ",8,xE),[[ze,r.value.text]])]),i("div",SE,[i("label",null,y(v(o)("tagManager.backgroundColor")),1),i("div",TE,[i("div",{class:"color-preview",style:Ft({backgroundColor:m.value})},null,4),i("div",kE,[Se(i("input",{type:"color","onUpdate:modelValue":M[2]||(M[2]=V=>d.value.hex=V),onInput:f,class:"color-input"},null,544),[[ze,d.value.hex]]),i("div",CE,[Se(i("input",{type:"range","onUpdate:modelValue":M[3]||(M[3]=V=>d.value.alpha=V),min:"0",max:"100",onInput:f,class:"alpha-slider"},null,544),[[ze,d.value.alpha,void 0,{number:!0}]]),i("span",EE,y(d.value.alpha)+"%",1)])])])])])]),_:1},8,["modelValue","title"]),at(am,{ref_key:"tagGroupSelectItem",ref:a,onSureSelect:E},null,512)],64))}},[["__scopeId","data-v-7f6ca984"]]),IE={class:"weilin_prompt_ui_prompt-box"},AE={key:0,class:"weilin-toast",role:"status","aria-live":"polite"},LE={class:"center-container"},ME={class:"action-item"},DE=["title"],OE={class:"action-text"},RE={class:"action-item"},PE=["title"],NE={class:"action-text"},FE={class:"action-item"},BE={class:"action-text"},UE={class:"action-item"},zE=["title"],VE={class:"action-text"},WE={class:"action-item"},HE=["title"],jE={class:"action-text"},GE={class:"action-item"},qE=["title"],YE={class:"action-text"},KE={key:0,class:"action-item"},JE=["title"],XE={class:"action-text"},QE={class:"action-item"},ZE=["title"],e$={class:"action-text"},t$={class:"action-item"},n$=["title"],o$={class:"action-text"},a$={class:"action-item"},s$=["title"],i$={class:"action-text"},r$={class:"action-item"},l$=["title"],u$={class:"action-text"},c$={class:"action-item"},d$=["title"],p$={class:"action-text"},f$={class:"action-item"},g$=["title"],m$={class:"action-text"},h$={class:"action-item"},v$=["title"],_$={class:"action-text"},y$={class:"action-item weilin-comfyui-toolbar-right"},b$=["disabled"],w$=["placeholder"],x$={class:"token-counter"},S$=["onClick"],T$={class:"tag"},k$={class:"desc"},C$={class:"prompt-input-translate-area"},E$={style:{display:"flex","align-items":"center"}},$$=["placeholder"],I$=["title"],A$={style:{"margin-left":"5px"},class:"action-text"},L$=["title"],M$={class:"action-text"},D$=["title"],O$={class:"action-text"},R$=["title"],P$={class:"action-text"},N$=["title"],F$={class:"action-text"},B$=["title"],U$={class:"action-text"},z$={key:0,class:"tokens-container"},V$=["draggable","onDragstart","onDragover","onDrop","onDblclick"],W$={key:0,class:"newline-token"},H$=["title"],j$=["onMouseenter","onMouseleave"],G$=["title"],q$=["title","onMouseenter","onMouseleave"],Y$={style:{"margin-left":"5px"}},K$=["onMouseenter","onMouseleave"],J$=["onClick"],X$=["value","onInput","onBlur","onKeyup"],Q$=["onClick","title"],Z$={key:4,class:"translation-result"},eI=["onClick","title"],tI={class:"translated-text"},nI={key:0,class:"line-break"},oI={class:"tag-tips-content"},aI=["innerHTML"],sI={key:0,class:"weight-control"},iI={class:"weight-label"},rI={key:1,class:"lora-weight-controls"},lI={class:"weight-control"},uI={class:"weight-label"},cI={class:"weight-control"},dI={class:"weight-label"},pI=["title"],fI=["title"],gI={key:2,class:"bracket-btn-group"},mI={class:"bracket-btn-container"},hI={class:"vertical-btn-group"},vI=["title"],_I=["title"],yI={class:"bracket-btn-container"},bI={class:"vertical-btn-group"},wI=["title"],xI=["title"],SI={class:"bracket-btn-container"},TI={class:"vertical-btn-group"},kI=["title"],CI=["title"],EI=["title"],$I={class:"tag-manager-section"},II={class:"weilin-comfyui-selection-actions-content"},AI={class:"weilin-comfyui-selection-actions-count"},LI={class:"header-left"},MI={class:"section-title"},DI={class:"header-right"},OI={class:"lora-manager-container"},RI={class:"tag-manager-section"},PI={class:"header-left"},NI={class:"section-title"},FI={class:"header-right"},BI={class:"tag-manager-container"},UI="weilin_prompt_ui_",or="weilin-selection-box",zI=16,Eh="weilin_prompt_ui_sidebar_visible",VI="weilin_prompt_ui_main_labels_v1",WI=50,HI=Wt({__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}=Yt(),a=S(),s=S(),r=S({top:0,left:0}),u=S(0),d=e,m=S(null),f=S(""),g=S([]),w={},b=S(null),T=S(!1),E=S({top:"0px",left:"0px"}),O=S(!1),M=S(null),V=S(null),pe=S(null),D=S([]),z=S(!1),ie=S(!1),P=S([]),re=S(0),ce=S(null),Re=S(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),Le=S(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),fe=S(""),xe=S(!1),ae=S({x:0,y:0}),J=S({x:0,y:0}),se=S([]),X=S(null),ee=S(!1),Ee=S(!1),he=S(!1),Q=S({top:"0px",left:"0px"}),le=S(!1),be=S(!1),we=S(0),_e=S(!1),Z=S({top:"0px",left:"0px"}),W=S(localStorage.getItem("weilin_prompt_ui_show_delete_button")!=="false"),te=()=>{localStorage.setItem("weilin_prompt_ui_show_delete_button",String(W.value))},N=()=>{W.value=!W.value,te()},q=B=>{B.key==="weilin_prompt_ui_show_delete_button"&&(W.value=B.newValue!=="false")};jt(()=>{window.addEventListener("storage",q),window.addEventListener("storage",Fe)}),po(()=>{window.removeEventListener("storage",q),window.removeEventListener("storage",Fe)});const Y=S(null),$=S(null),I=S(""),H=S(0),de=S(!0),Ce=S(localStorage.getItem("weilin_function_toggles_clearAll")!=="false"),Ae=S(localStorage.getItem("weilin_function_toggles_deleteButton")!=="false"),U=S(localStorage.getItem("weilin_function_toggles_randomTag")!=="false"),k=S(localStorage.getItem("weilin_function_toggles_randomTagSettings")!=="false"),j=S(localStorage.getItem("weilin_function_toggles_translateTag")!=="false"),ne=S(localStorage.getItem("weilin_function_toggles_clearDisabled")!=="false");It([Ce,Ae,U,k,j,ne],([B,R,ke,De,Qe,Me])=>{localStorage.setItem("weilin_function_toggles_clearAll",String(B)),localStorage.setItem("weilin_function_toggles_deleteButton",String(R)),localStorage.setItem("weilin_function_toggles_randomTag",String(ke)),localStorage.setItem("weilin_function_toggles_randomTagSettings",String(De)),localStorage.setItem("weilin_function_toggles_translateTag",String(Qe)),localStorage.setItem("weilin_function_toggles_clearDisabled",String(Me))});const Fe=B=>{B.key==="weilin_function_toggles_clearAll"?Ce.value=B.newValue!=="false":B.key==="weilin_function_toggles_deleteButton"?Ae.value=B.newValue!=="false":B.key==="weilin_function_toggles_randomTag"?U.value=B.newValue!=="false":B.key==="weilin_function_toggles_randomTagSettings"?k.value=B.newValue!=="false":B.key==="weilin_function_toggles_translateTag"?j.value=B.newValue!=="false":B.key==="weilin_function_toggles_clearDisabled"&&(ne.value=B.newValue!=="false")},Oe=()=>{de.value=!de.value};It(de,B=>{localStorage.setItem(Eh,String(B))}),jt(()=>{const B=localStorage.getItem(Eh);de.value=B!=="false"});const ge=()=>(H.value++,`token_${H.value}_${Date.now()}`),$e=()=>{z.value=!z.value},Ke=()=>{z.value=!1},tt=S(null),it=S(null),bt=S(!1),ct=`weilin_prompt_ui_last_main_label_id_${d.promptManager||"default"}`,rn=Bt(()=>{const B=de.value?280:0;return`calc(100% - ${(z.value?300:0)+B}px)`});let Rt=!1;const In=B=>{if(!B){it.value=null,f.value="",wt(()=>{s.value&&(s.value.value="",Ro({target:s.value}))}),bt.value=!1;return}it.value=B.id,Rt=!0,f.value=B.content||"",wt(()=>{s.value&&(s.value.value=f.value,Ro({target:s.value}))}),bt.value=!1};It(f,B=>{if(Rt){Rt=!1;return}bt.value=!0}),It(g,()=>{Rt||(bt.value=!0)},{deep:!0}),It(it,B=>{try{localStorage.setItem(ct,B||"")}catch{}});function wn(){try{const B=localStorage.getItem(ct);if(!B)return;const R=localStorage.getItem(VI),ke=R?JSON.parse(R):[],De=Array.isArray(ke)?ke.find(Qe=>Qe&&Qe.id===B):null;if(!De)return;it.value=B,Rt=!0,f.value=De.content||"",wt(()=>{s.value&&(s.value.value=f.value,Ro({target:s.value})),Rt=!1}),bt.value=!1}catch{}}jt(()=>{wn();const B=()=>{try{localStorage.setItem(ct,it.value||"")}catch{}};window.addEventListener("beforeunload",B),Aa(()=>window.removeEventListener("beforeunload",B))});function Jt(){var B;it.value&&(B=tt.value)!=null&&B.updateSelectedContent&&(tt.value.updateSelectedContent(f.value),bt.value=!1,Co())}const ln=S(!1);let Kn=null;function Co(){ln.value=!0,Kn&&clearTimeout(Kn),Kn=setTimeout(()=>{ln.value=!1},1600)}Aa(()=>{Kn&&clearTimeout(Kn)});const mt=()=>{M.value.open()},Pe=S(1),Ue=()=>{if(b.value===null)return;let R=g.value[b.value].text;if(!ni(R)){ue({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 De=R;const Qe=/:(-?\d+(\.\d+)?)$/.test(R),Me=R.match(/^\((.*?):(-?\d+(\.\d+)?)\)$/);if(Qe||Me)Pe.value===1?R.startsWith("(")&&R.endsWith(")")?De=R.slice(1,-1).replace(/:(\d+(\.\d+)?)$/,""):De=R.replace(/:(\d+(\.\d+)?)$/,""):Me?De=`(${Me[1]}:${Pe.value})`:De=R.replace(/:(-?\d+(\.\d+)?)$/,`:${Pe.value}`);else{const He=R.match(/^([^_]+)_(\([^)]+\))$/);if(He&&!R.includes("\\(")&&!R.includes("\\)")){const[,Je,_t]=He;Pe.value===1?De=R:De=`(${Je} ${_t}:${Pe.value})`}else R.includes("\\(")&&R.includes("\\)")&&!/[\(\)\[\]\{\}<>]/.test(R.replace(/\\[\(\)\[\]\{\}<>]/g,""))?Pe.value===1?De=R:R.startsWith("(")&&R.endsWith(")")?De=R.replace(/\)$/,`:${Pe.value})`):De=`(${R}:${Pe.value})`:/[\(\[\{\<\)\]\}\>]/.test(R)?Pe.value===1&&ke(R)?De=R.slice(1,-1):Pe.value===1?De=R:R.startsWith("(")&&R.endsWith(")")?De=R.replace(/\)$/,`:${Pe.value})`):De=`(${R}:${Pe.value})`:Pe.value===1?De=R:De=`(${R}:${Pe.value})`}g.value[b.value].text=De,Un()},At=S(.5),Xt=S(.5);It(b,B=>{var R;if(B!==null&&((R=g.value[B])!=null&&R.isLoraTag)){const De=g.value[B].text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);De&&(At.value=parseFloat(De[2]),Xt.value=parseFloat(De[3]))}});const ja=()=>{var B;if(b.value!==null&&((B=g.value[b.value])!=null&&B.isLoraTag)){const R=g.value[b.value],ke=R.text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);if(ke){const Qe=`<wlr:${ke[1]}:${At.value}:${Xt.value}>`;R.text=Qe,Un()}}},xa=B=>{if(b.value===null)return;let ke=g.value[b.value].text;const De={"(":")","[":"]","{":"}","<":">"}[B];ke=`${B}${ke}${De}`,g.value[b.value].text=ke,Jn()},Ga=B=>{if(b.value===null)return;let ke=g.value[b.value].text;const De={"(":")","[":"]","{":"}","<":">"};ke.startsWith(B)&&ke.endsWith(De[B])&&(ke=ke.slice(1,-1),g.value[b.value].text=ke,Jn())},ni=B=>{const R=[],ke={"(":")","[":"]","{":"}","<":">"};for(let De of B)if(ke[De])R.push(De);else if(Object.values(ke).includes(De)&&(R.length===0||ke[R.pop()]!==De))return!1;return R.length===0};Qd(()=>{for(const B in w)delete w[B]}),S(!0),S(!1);const ar=B=>/[\p{L}]/u.test(B),qa=B=>{const R=B.match(/([^:]+):[\d.]+/);return R?R[1]:B};let Ko=null;const oi=async()=>{Ko&&clearTimeout(Ko),Ko=setTimeout(async()=>{if(!s.value)return;const B=s.value,R=B.selectionStart;await wt();const ke=B.value.substring(0,R),De=document.createElement("div");De.style.position="absolute",De.style.top="0",De.style.left="0",De.style.visibility="hidden",De.style.whiteSpace="pre-wrap",De.style.wordWrap="break-word",De.style.width=window.getComputedStyle(B).width,De.style.font=window.getComputedStyle(B).font,De.style.padding=window.getComputedStyle(B).padding;const Qe=document.createTextNode(ke),Me=document.createElement("span");Me.textContent="|",De.appendChild(Qe),De.appendChild(Me),B.parentNode.appendChild(De);const He=Me.getBoundingClientRect(),Je=B.parentNode.getBoundingClientRect();let _t=He.top-Je.top+He.height,kt=He.left-Je.left;if(await wt(),a.value){const Ct=a.value.offsetWidth,en=B.offsetWidth,dn=B.getBoundingClientRect().left-Je.left;kt+Ct>dn+en&&(kt=dn+en-Ct),kt<dn&&(kt=dn),kt=Math.max(0,Math.min(kt,Je.width-Ct))}B.parentNode.removeChild(De),r.value={top:_t,left:kt},Ko=null},50)},ai=S(null),Ro=B=>{if(!(B!=null&&B.target)||!s.value)return;const R=B.target.value,ke=B.target.selectionStart,De=B.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(gt=>{gt.enabled&&(gt.pattern?(Me=Me.replace(gt.pattern,gt.replace),He=He.replace(gt.pattern,gt.replace)):gt.patterns&&gt.patterns.forEach(({pattern:St,replace:$t})=>{Me=Me.replace(St,$t),He=He.replace(St,$t)}))}),f.value=He;const Je=Me.length,_t=De-ke,kt=Je+_t;wt(()=>{s.value&&(s.value.setSelectionRange(Je,kt),s.value.focus())});const Ct=He.substring(0,Je),en=localStorage.getItem("weilin_prompt_ui_comma_close_autocomplete")==="true",dn=Je>0?Ct[Je-1]:"";if((dn===","||dn===" ")&&en){ie.value=!1,Y.value&&clearTimeout(Y.value),Y.value=setTimeout(()=>{var An;const gt=((An=s.value)==null?void 0:An.selectionStart)||0,$t=(f.value||"").substring(0,gt);let Nt=gt;for(;Nt>0&&!/[,\s]/.test($t[Nt-1]);)Nt--;const En=$t.substring(Nt,gt).trim();En&&Dl(En),Xo()},300),u.value=Bn(f.value);return}let co=Je;for(;co>0&&!/[,\s]/.test(Ct[co-1]);)co--;const ft=Ct.substring(co,Je).trim();Y.value&&clearTimeout(Y.value),Y.value=setTimeout(()=>{ft&&Dl(ft),Xo()},300),u.value=Bn(f.value)},Bn=B=>B?B.trim().split(/\s+/).length:0,xn=async()=>{let B=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",De=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"),B=!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"),De=!0),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")||localStorage.setItem("weilin_prompt_ui_underscore_to_bracket","false"),B&&(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,")")),De&&(f.value=f.value.replace(/《/g,"<").replace(/》/g,">"));const Qe=f.value;let Me=[];const He=g.value.map((ft,gt)=>({token:ft,originalIndex:gt})).filter(({token:ft})=>ft.isHidden);Me=((ft,gt=0)=>{let St=[],$t=gt,Nt="",En=[];for(;$t<ft.length;){const An=ft[$t];if(An===`
`){Nt.trim()&&(St.push(Nt.trim()),Nt=""),St.push(`
`),$t++;continue}En.length===0&&An===","?(Nt.trim()&&St.push(Nt.trim()),Nt=""):Nt+=An,$t++}return Nt.trim()&&(En.length===0?St.push(...Nt.split(",").filter(Boolean).map(An=>An.trim())):St.push(Nt.trim())),St})(Qe);const _t=new Map;g.value.forEach((ft,gt)=>{ft.id||(ft.id=ge()),_t.set(gt,ft)});const kt=[];Me.forEach(ft=>{if(ft===`
`){let gt=!1;for(const[St,$t]of _t)if($t.text===`
`&&!kt.includes($t)){kt.push($t),_t.delete(St),gt=!0;break}gt||kt.push({id:ge(),text:`
`,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:""})}else if(ft.trim()){const gt=ft.trim(),St=/^<wlr:[^:]+:\d+(\.\d+)?:\d+(\.\d+)?>$/.test(gt);let $t=!1;for(const[Nt,En]of _t)if(En.text===gt&&!En.isHidden&&!kt.includes(En)){St&&!En.isLoraTag&&(En.isLoraTag=!0),kt.push(En),_t.delete(Nt),$t=!0;break}$t||kt.push({id:ge(),text:gt,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:"",isLoraTag:St})}});const Ct=new Set,en=new Map;kt.forEach((ft,gt)=>{ft.id&&en.set(ft.id,gt)});const dn=[];He.forEach(({token:ft,originalIndex:gt})=>{if(Ct.has(ft.id)||(Ct.add(ft.id),kt.some($t=>$t.id===ft.id)))return;let St=-1;for(let $t=gt+1;$t<g.value.length;$t++){const Nt=g.value[$t];if(!Nt.isHidden&&en.has(Nt.id)){St=en.get(Nt.id);break}}if(St===-1)for(let $t=gt-1;$t>=0;$t--){const Nt=g.value[$t];if(!Nt.isHidden&&en.has(Nt.id)){St=en.get(Nt.id)+1;break}}dn.push({token:ft,insertBeforeIndex:St,originalIndex:gt})}),dn.sort((ft,gt)=>ft.insertBeforeIndex!==gt.insertBeforeIndex?gt.insertBeforeIndex-ft.insertBeforeIndex:gt.originalIndex-ft.originalIndex),dn.forEach(({token:ft,insertBeforeIndex:gt})=>{const St=gt===-1?kt.length:Math.max(0,Math.min(gt,kt.length));kt.splice(St,0,ft)}),g.value=kt,f.value=g.value.length>0?g.value.reduce((ft,gt,St)=>{var Wl,fr;if(gt.isHidden)return ft;if(gt.text===`
`){const to=ts(St);return to!==-1&&g.value[to],ft+gt.text}if(ft===""){let to=St+1;for(;to<g.value.length&&((Wl=g.value[to])!=null&&Wl.isHidden);)to++;const aa=to>=g.value.length,gr=to<g.value.length?g.value[to]:null,mr=aa||gr&&gr.text===`
`;return gt.text+(mr?",":"")}let $t=St+1;for(;$t<g.value.length&&((fr=g.value[$t])!=null&&fr.isHidden);)$t++;const Nt=$t>=g.value.length,En=$t<g.value.length?g.value[$t]:null,An=En&&En.text===`
`||Nt,Vl=ts(St);return Vl!==-1&&g.value[Vl].text===`
`?ft+gt.text+(An?",":""):ft+", "+gt.text+(An?",":"")},""):"",$.value&&clearTimeout($.value),$.value=setTimeout(()=>{Jn()},100),Xo();const eo=50;let co=0;for(;co<g.value.length;){const ft=Math.min(co+eo,g.value.length),gt=[];for(let St=co;St<ft;St++)if(g.value[St].text.length>0&&!g.value[St].translate){let $t=g.value[St].text;const Nt=qa($t.trim());gt.push(so.getTranslateLocal(Nt).then(En=>{const An=En;g.value[St].translate=An.translated.translate,g.value[St].color=An.translated.color}))}await Promise.all(gt),co=ft}u.value=Bn(f.value)},_o=async()=>{let R=0,ke=0,De=0;for(let Qe=0;Qe<g.value.length;Qe++){const Me=g.value[Qe];Me.translate&&(Me.translate===Me.text||/[a-zA-Z]/.test(Me.translate))&&!(typeof Me.text=="string"&&Me.text.startsWith("<wlr"))&&De++}for(console.log(`开始批量翻译,总共需要翻译 ${De} 个项目,批量大小: 50`);R<g.value.length;){const Qe=Math.min(R+50,g.value.length),Me=[],He=[];for(let Je=R;Je<Qe;Je++){const _t=g.value[Je];_t.translate&&(_t.translate===_t.text||/[a-zA-Z]/.test(_t.translate))&&!(typeof _t.text=="string"&&_t.text.startsWith("<wlr"))&&(Me.push(_t.text),He.push(Je))}if(Me.length>0){console.log(`处理第 ${Math.floor(R/50)+1} 批,翻译 ${Me.length} 个项目`);const Je=Me.join(`
`);try{const _t=new Promise((Ct,en)=>setTimeout(()=>en(new Error("翻译请求超时")),3e4)),kt=await Promise.race([so.translaterText("",Je),_t]);if(kt.data&&kt.data.length>0){const Ct=kt.data.split(`
`);if(Ct.length===Me.length){for(let en=0;en<He.length;en++){const dn=He[en];en<Ct.length&&Ct[en].trim()&&(g.value[dn].translate=Ct[en].trim(),ke++)}console.log(`第 ${Math.floor(R/50)+1} 批翻译完成,已处理 ${ke}/${De} 个`)}else throw new Error(`翻译结果数量不匹配: 期望${Me.length}个,实际${Ct.length}个`)}else throw new Error("翻译返回结果为空")}catch(_t){console.error(`第 ${Math.floor(R/50)+1} 批批量翻译失败:`,_t),console.log("回退到逐个翻译模式...");let kt=0;for(let Ct=0;Ct<He.length;Ct++){const en=He[Ct],dn=Me[Ct];try{const eo=await so.translaterText("",dn);eo.data&&eo.data.length>0&&(g.value[en].translate=eo.data,ke++,kt++)}catch(eo){console.error(`单个翻译失败 (${dn}):`,eo)}}console.log(`回退翻译完成,成功 ${kt} 个`)}}R=Qe}console.log(`批量翻译完成!总共处理 ${ke}/${De} 个项目`)},Jo=S(""),Jn=()=>{const B=f.value.replace(/[\s\t\n]+/g,"");if(D.value.length>0){if(B.length>0){const R=D.value.filter(Qe=>!Qe.hidden);let ke={prompt:f.value,lora:"",temp_prompt:g.value,temp_lora:D.value};R.length>0&&(ke.lora=R);const De=JSON.stringify(ke);Jo.value!=De&&(Jo.value=De,Oo.saveHistory({tag:De}))}}else if(Jo.value!=f.value){const R={prompt:f.value,lora:"",temp_prompt:g.value,temp_lora:""},ke=JSON.stringify(R);B.length>0&&Oo.saveHistory({tag:ke})}Xo(),Rt||(bt.value=!0)},Xo=()=>{if(D.value.length>0){Jo.value=f.value;const B=D.value.filter(De=>!De.hidden);let R={prompt:f.value,lora:"",temp_prompt:g.value,temp_lora:D.value};B.length>0&&(R.lora=B);const ke=JSON.stringify(R);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:ke},"*")}else{Jo.value=f.value;const B={prompt:f.value,lora:"",temp_prompt:g.value,temp_lora:""},R=JSON.stringify(B);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:R},"*")}},uo=(B,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=B;const De=g.value[B].text;Pe.value=pt(De),Z.value={top:`${ke.bottom+window.scrollY+ke.height+10}px`,left:`${ke.left+ke.width/2}px`},g.value[B].isLoraTag||(_e.value=!0)},pt=B=>{const R=[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"<",close:">"}];for(const De of R)if(B.startsWith(De.open)&&B.endsWith(De.close))return pt(B.slice(1,-1));const ke=B.match(/:(\d+(\.\d+)?)$/);return ke?parseFloat(ke[1]):1},Eo=S(null),Po=B=>{Eo.value&&clearTimeout(Eo.value),Eo.value=setTimeout(()=>{T.value||Ya(),Eo.value=null},100),_e.value=!1},si=()=>{T.value=!1,Po(b.value),setTimeout(()=>{T.value||(ee.value=!1)},100)},Ya=()=>{T.value||(b.value=null)},Qo=()=>{if(b.value!==null){const B=b.value;bs(B),b.value=null,T.value=!1}},Xn=()=>{if(b.value!==null){const B=b.value;g.value.splice(B+1,0,{id:ge(),text:`
`,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),Un()}},bs=B=>{const R=f.value;let ke=g.value[B],De=0,Qe=-1;for(let Me=0;Me<B;Me++){let He=R.indexOf(g.value[Me].text,De);He!==-1&&(De=He+g.value[Me].text.length)}if(ke.text===`
`||ke.text===" "){for(let Me=De;Me<R.length;Me++)if(R[Me]===ke.text){Qe=Me;break}}else Qe=R.indexOf(ke.text,De);if(Qe!==-1){const Me=ke.text===`
`?" ":"",He=R.substring(0,Qe)+Me+R.substring(Qe+ke.text.length);f.value=He}g.value.splice(B,1),f.value=g.value.length>0?g.value.reduce((Me,He,Je)=>{var eo,co;if(He.isHidden)return Me;if(He.text===`
`){const ft=ts(Je);return ft!==-1&&g.value[ft],Me+He.text}if(Me===""){let ft=Je+1;for(;ft<g.value.length&&((eo=g.value[ft])!=null&&eo.isHidden);)ft++;const gt=ft>=g.value.length,St=ft<g.value.length?g.value[ft]:null,$t=gt||St&&St.text===`
`;return He.text+($t?",":"")}let _t=Je+1;for(;_t<g.value.length&&((co=g.value[_t])!=null&&co.isHidden);)_t++;const kt=_t>=g.value.length,Ct=_t<g.value.length?g.value[_t]:null,en=Ct&&Ct.text===`
`||kt,dn=ts(Je);return dn!==-1&&g.value[dn].text===`
`?Me+He.text+(en?",":""):Me+", "+He.text+(en?",":"")},""):"",Jn(),bt.value=!0},ii=(B,R)=>{const ke=f.value;let De=0,Qe=-1;for(let He=0;He<B;He++){let Je=ke.indexOf(g.value[He].text,De);Je!==-1&&(De=Je+g.value[He].text.length)}const Me=g.value[B].text;if(Qe=ke.indexOf(Me,De),Qe!==-1){const He=R.target.value,Je=ke.substring(0,Qe)+He+ke.substring(Qe+Me.length);f.value=Je,g.value[B]={...g.value[B],text:He},Jn()}},ri=B=>{g.value[B].isPunctuation||(g.value[B].isEditing=!0,setTimeout(()=>{const R=w[B];if(R){R.focus();const ke=R.value.length;R.setSelectionRange(ke,ke),ws(R),R.addEventListener("input",()=>ws(R)),Jn(),bt.value=!0}}))},ws=B=>{const R=document.createElement("span");R.style.visibility="hidden",R.style.position="absolute",R.style.whiteSpace="pre";const ke=window.getComputedStyle(B);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=B.value||B.placeholder||"",document.body.appendChild(R);const De=R.offsetWidth;B.style.width=`${Math.max(De+4,20)}px`,document.body.removeChild(R)},li=B=>{g.value[B].isEditing=!1};It(g,B=>{Un()},{deep:!0}),It(D,B=>{Jn(),bt.value=!0},{deep:!0});const ui=()=>{O.value=!O.value,O.value&&wt(()=>{var R;const B=V.value.getBoundingClientRect();(R=pe.value)==null||R.setPosition(B)})},xs=()=>{O.value=!1},Zo=B=>{var R,ke;V.value&&!V.value.contains(B.target)&&pe.value&&!pe.value.$el.contains(B.target)&&xs(),(R=a.value)!=null&&R.contains&&((ke=s.value)!=null&&ke.contains)&&!a.value.contains(B.target)&&!s.value.contains(B.target)&&(ie.value=!1)},ci=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openTagManager_prompt"},"*")},Ka=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openLoraManager"},"*")},di=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openHistoryManager"},"*")},Ja=S(!0),Xa=()=>{Ja.value=!Ja.value},Qa=S(!1),Ss=()=>{Qa.value=!Qa.value};S(null);const sr=()=>{const B=s.value;B&&(B.addEventListener("keyup",No),B.addEventListener("click",No),B.addEventListener("input",No))},No=()=>{ie.value&&oi()},pi=()=>{if(s.value){const B=s.value.style.height||`${s.value.offsetHeight}px`;localStorage.setItem("weilinPromptTextAreaHeight",B)}},ir=()=>{const B=localStorage.getItem("weilinPromptTextAreaHeight");B&&s.value&&(s.value.style.height=B)};jt(()=>{document.addEventListener("click",Zo),window.addEventListener("message",Zn),fi(),sr(),wt(()=>{ir()}),setTimeout(()=>{X.value||(X.value=document.querySelector(".tokens-container")),X.value?(X.value.removeEventListener("mousedown",Za),X.value.removeEventListener("mousemove",Sa),X.value.removeEventListener("mouseup",Qn),X.value.removeEventListener("mouseleave",Qn),X.value.addEventListener("mousedown",Za),X.value.addEventListener("mousemove",Sa),X.value.addEventListener("mouseup",Qn),X.value.addEventListener("mouseleave",Qn),X.value.style.userSelect="none",X.value.style.cursor="default",console.log("框选功能事件监听器绑定成功")):console.warn("未能找到tokens-container元素,框选功能可能无法正常工作")},100)}),Aa(()=>{X.value&&(X.value.removeEventListener("mousedown",Za),X.value.removeEventListener("mousemove",Sa),X.value.removeEventListener("mouseup",Qn),X.value.removeEventListener("mouseleave",Qn)),$o()});const Za=B=>{if(B.button===0&&!B.ctrlKey&&!B.metaKey){const R=B.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){Ee.value=!1,xe.value=!1,le.value=!1,be.value=!1,Ht(),$o();const De=ke.getBoundingClientRect();ae.value={x:Math.max(B.clientX,De.left),y:Math.max(B.clientY,De.top)},J.value={x:Math.max(B.clientX,De.left),y:Math.max(B.clientY,De.top)},Ee.value=!0,console.log("记录框选起始位置")}}},Sa=B=>{if(Ee.value&&X.value&&!xe.value&&Math.sqrt(Math.pow(B.clientX-ae.value.x,2)+Math.pow(B.clientY-ae.value.y,2))>3&&(B.preventDefault(),B.stopPropagation(),xe.value=!0,ee.value=!0,se.value=[],Fo(),console.log("开始实际框选")),xe.value&&X.value){B.preventDefault(),B.stopPropagation();const R=X.value.getBoundingClientRect();J.value={x:Math.min(Math.max(B.clientX,R.left),R.right),y:Math.min(Math.max(B.clientY,R.top),R.bottom)};const ke=5;Math.abs(J.value.x-ae.value.x)<ke&&(J.value.x=ae.value.x+ke),Math.abs(J.value.y-ae.value.y)<ke&&(J.value.y=ae.value.y+ke),(!le.value||Date.now()-we.value>100)&&(le.value=!0,requestAnimationFrame(()=>{ea(),le.value=!1}));const De=Date.now();!be.value&&De-we.value>zI&&(we.value=De,be.value=!0,requestAnimationFrame(()=>{yo(),be.value=!1}))}},Qn=()=>{if(Ee.value=!1,xe.value){const B=se.value.length;xe.value=!1,ee.value=!1,le.value=!1,be.value=!1,$o(),B>0&&rr()}},Fo=()=>{try{let B=document.getElementById(or);B&&document.body.removeChild(B),B=document.createElement("div"),B.id=or,B.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(B),console.log("选择框已创建"),ea()}catch(B){console.error("创建选择框失败:",B),le.value=!1}},ea=()=>{try{let B=document.getElementById(or);if(!B&&xe.value&&(Fo(),B=document.getElementById(or),!B))return;const R=Math.min(ae.value.x,J.value.x),ke=Math.min(ae.value.y,J.value.y),De=Math.abs(J.value.x-ae.value.x),Qe=Math.abs(J.value.y-ae.value.y),Me=5,He=Math.max(De,Me),Je=Math.max(Qe,Me);B&&(B.style.left=`${R}px`,B.style.top=`${ke}px`,B.style.width=`${He}px`,B.style.height=`${Je}px`)}catch(B){console.error("更新选择框失败:",B),le.value=!1}},$o=()=>{try{const B=document.getElementById(or);B&&document.body.removeChild(B)}catch(B){console.error("移除选择框失败:",B)}},yo=()=>{se.value=[];const B=Math.min(ae.value.x,J.value.x),R=Math.min(ae.value.y,J.value.y),ke=Math.max(ae.value.x,J.value.x),De=Math.max(ae.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 _t=Me.getBoundingClientRect();_t.right>=B&&_t.left<=ke&&_t.bottom>=R&&_t.top<=De&&se.value.push(He)}),ta()},ta=()=>{const B=document.querySelectorAll(".token-item-box"),R=[],ke=[];B.forEach((De,Qe)=>{se.value.includes(Qe)?R.push(De):ke.push(De)}),R.forEach(De=>{De.classList.add("token-item-box-selected")}),ke.forEach(De=>{De.classList.remove("token-item-box-selected"),De.style.border="",De.style.boxShadow="",De.style.backgroundColor=De.dataset.originalBgColor||""})},rr=()=>{if(se.value.length>0){const B=Math.min(ae.value.x,J.value.x),R=Math.min(ae.value.y,J.value.y),ke=Math.max(ae.value.x,J.value.x);Math.max(ae.value.y,J.value.y),Q.value={top:`${R-50}px`,left:`${(B+ke)/2}px`},he.value=!0,setTimeout(()=>{document.addEventListener("click",hn)},0)}},ve=()=>{if(se.value.length===0)return;const ke=[...se.value].sort((De,Qe)=>De-Qe).map(De=>g.value[De].text).join(", ");navigator.clipboard.writeText(ke).then(()=>{const De=document.createElement("div");De.style.cssText=`
position: fixed;
top: 20px;
right: 20px;
background-color: #4caf50;
color: white;
padding: 10px 15px;
border-radius: 4px;
z-index: 999999;
`,De.textContent="已复制到剪贴板",document.body.appendChild(De),setTimeout(()=>{document.body.removeChild(De)},2e3)}),Ht()},oe=()=>{se.value.length!==0&&(se.value.forEach(B=>{g.value[B]&&!g.value[B].isHidden&&(g.value[B].isHidden=!0,g.value[B].hiddenHint=o("promptBox.hiddenHint"))}),Un(),Jn(),Ht())},ye=()=>{se.value.length!==0&&(se.value.forEach(B=>{g.value[B]&&g.value[B].isHidden&&(g.value[B].isHidden=!1,g.value[B].hiddenHint="")}),Un(),Jn(),Ht())},nt=()=>{se.value.length>0&&(confirm(`确定要删除选中的 ${se.value.length} 个标签吗?`)?Pt():un())},Ht=()=>{he.value=!1,document.removeEventListener("click",hn),un()},hn=B=>{const R=document.querySelector(".token-controls");R&&!R.contains(B.target)&&Ht()},Pt=()=>{if(se.value.length===0)return;[...se.value].sort((R,ke)=>ke-R).forEach(R=>{g.value.splice(R,1)}),Un(),Jn(),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||""}),se.value=[],he.value&&(he.value=!1,document.removeEventListener("click",hn))},es=B=>{if(se.value.length===0)return;const R=B.target.closest(".token-item-box, .token-item, .token-controls, .delete-btn, .weight-control, .bracket-btn, .translate-button, .tag-tips-box"),ke=X.value;(B.target===s.value||!R&&(!ke||!ke.contains(B.target)))&&un()};jt(()=>{document.addEventListener("click",es)}),po(()=>{document.removeEventListener("click",Zo),document.removeEventListener("click",es),ai.value&&clearTimeout(ai.value),window.removeEventListener("message",Zn);const B=s.value;B&&(B.removeEventListener("keyup",No),B.removeEventListener("click",No),B.removeEventListener("input",No)),X.value&&(X.value.removeEventListener("mousedown",Za),X.value.removeEventListener("mousemove",Sa),X.value.removeEventListener("mouseup",Qn),X.value.removeEventListener("mouseleave",Qn)),$o()});const Zn=B=>{if(B.data.type==="weilin_prompt_ui_insertTag"){const R=f.value,ke=B.data.tagText;R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),I.value=f.value,xn(),wt(()=>{Jn()})}else if(B.data.type==="weilin_prompt_ui_user_history_tag"){const R=B.data.tagText;Jo.value=R,cr(R)}else if(B.data.type!=="weilin_prompt_ui_refresh_all_data"){if(B.data.type==="weilin_prompt_ui_translate_setting")fi();else if(B.data.type==="weilin_prompt_ui_selectLora"){if(B.data.lora.loraWorks!=null&&B.data.lora.loraWorks.length>0){const R=f.value,ke=B.data.lora.loraWorks;R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),I.value=f.value,xn()}}else if(B.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response")Gc(B.data.data);else if(B.data.type==="weilin_prompt_ui_addLoraTag_inner")if(B.data.lora.loraWorks!=null&&B.data.lora.loraWorks.length>0){const R=f.value,ke=B.data.lora.tag+(B.data.lora.loraWorks===""?"":", "+B.data.lora.loraWorks);R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),I.value=f.value,xn()}else{const R=f.value,ke=B.data.lora.tag;R===""?f.value=ke:(R.endsWith(" "),f.value=R+", "+ke+","),I.value=f.value,xn()}}},fi=async()=>{const B=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",B),localStorage.getItem("weilin_prompt_ui_targetLanguage")||localStorage.setItem("weilin_prompt_ui_targetLanguage",R),await wt()},lr=(B,R)=>{so.translaterText("",B).then(ke=>{ke.data.length>0&&(R.translate=ke.data)})},Ll=()=>{so.translaterInputText("",fe.value).then(B=>{B.data.length>0&&(g.value.push({text:B.data,translate:fe.value,isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),fe.value="",Un())})},Ml=()=>{setTimeout(()=>{ie.value||(I.value=f.value,xn())},100)},Dl=B=>{let R=B.replace(/[\[\]{}]/g,"").trim();const De=qa(R).trim();if(!De){ie.value=!1;return}if(De.length>20){ie.value=!1;return}try{const Qe=De.toLowerCase();yc.getAutocomplete(String(Qe)).then(async Me=>{P.value=Me.data,await oi(),setTimeout(()=>{Re.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450,Le.value=localStorage.getItem("weilin_prompt_ui_auto_box_height")||350,ie.value=P.value.length>0,re.value=0},50)})}catch(Qe){console.error("Autocomplete error:",Qe),ie.value=!1}},gi=B=>{ie.value&&(B.key==="ArrowDown"?(B.preventDefault(),re.value=Math.min(re.value+1,P.value.length-1),Ol()):B.key==="ArrowUp"?(B.preventDefault(),re.value=Math.max(re.value-1,0),Ol()):B.key==="Tab"||B.key==="Enter"?(B.preventDefault(),ur(re.value,null)):B.key==="Escape"&&(B.preventDefault(),Pl()))},Ol=()=>{wt(()=>{if(ce.value&&a.value){const B=a.value,R=ce.value,ke=B.getBoundingClientRect(),De=R.getBoundingClientRect(),Qe=De.top<ke.top,Me=De.bottom>ke.bottom;Qe?B.scrollTop=B.scrollTop+(De.top-ke.top):Me&&(B.scrollTop=B.scrollTop+(De.bottom-ke.bottom))}})},Rl=Bt(()=>{if(!m.value)return{left:r.value.left};const B=m.value.offsetWidth;Re.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450;const R=Re.value;let ke=r.value.left;return ke+R>B&&(ke=B-R),ke<0&&(ke=0),{left:ke}}),ur=(B,R)=>{if(R&&(R.preventDefault(),R.stopPropagation()),!P.value[B])return;ie.value=!1;const ke=s.value.selectionStart,De=s.value.selectionEnd,Qe=f.value;let Me=P.value[B].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=De;for(;He>0&&!/[,\s]/.test(Qe[He-1]);)He--;for(;!1;)Je++;let _t=Qe.substring(0,He)+Me+", "+Qe.substring(Je);const kt=He+Me.length+2;f.value=_t,I.value=_t,xn(),wt(()=>{s.value&&(s.value.selectionStart=kt,s.value.selectionEnd=kt)})},Pl=()=>{ie.value=!1},cr=B=>{if(B.length>0)try{const R=JSON.parse(B);if(f.value=R.prompt,I.value=f.value,R.lora&&R.lora!=""&&(D.value=R.lora),R.temp_prompt&&R.temp_prompt!=""){const ke=R.temp_prompt;let De=!1;ke.tokens&&ke.tokens.length>0&&ke.tokens!=""&&(g.value=ke.tokens,De=!0),ke.lora&&ke.lora.length>0&&ke.lora!=""&&(D.value=ke.lora,De=!0),!De&&ke.length>0&&ke!=""&&(g.value=ke)}if(R.temp_lora&&R.temp_lora.length>0&&R.temp_lora!=""){const ke=R.temp_lora;D.value=ke}xn()}catch{ue({type:"warn",str:"promptBox.settings.errorPrompt"})}},Ts=S(!1),ks=S(null),Mn=S([]);let Bo=null,na=null;const dr=(B,R=!1)=>{Ts.value=!0,ks.value=null,Mn.value=[],R&&se.value.length>1&&se.value.includes(B)?Mn.value=[...se.value].sort((ke,De)=>ke-De):(se.value=[],ks.value=B),na={originalTokens:[...g.value],draggedItems:Mn.value.length>0?Mn.value.map(ke=>g.value[ke]):[g.value[B]]}},Nl=(B,R)=>{if(ee.value){R.preventDefault();return}dr(B,!0),R.dataTransfer.effectAllowed="move"},zc=(B,R,ke)=>{const De=R.filter(He=>He<ke).length;let Qe=Math.max(0,ke-De);const Me=B.length-R.length;return Qe=Math.min(Qe,Me),Qe},mi=B=>{if(!na)return;const R=[...na.originalTokens],ke=Mn.value.length>0?Mn.value:[ks.value],De=ke.map(Me=>na.originalTokens[Me]);for(let Me=ke.length-1;Me>=0;Me--){const He=ke[Me];He<R.length&&R.splice(He,1)}const Qe=zc(na.originalTokens,ke,B);if(na.draggedItems.forEach((Me,He)=>{R.splice(Qe+He,0,Me)}),g.value=R,Un(),Mn.value.length>0&&se.value.length>0){const Me=[];for(let He=0;He<R.length;He++){const Je=R[He];De.some(_t=>_t.text===Je.text)&&Me.push(He)}se.value=Me,setTimeout(()=>{ta()},0)}},Fl=(B,R)=>{if(ee.value){R.preventDefault();return}R.preventDefault(),Ts.value&&(B<0||B>=g.value.length||Mn.value.length>0&&Mn.value.includes(B)||Mn.value.length===0&&ks.value===B||(Bo&&clearTimeout(Bo),Bo=setTimeout(()=>{mi(B)},WI)))},Bl=(B,R)=>{R.preventDefault(),Bo&&(clearTimeout(Bo),Bo=null),Ts.value&&na&&mi(B),Ts.value=!1,ks.value=null,Mn.value=[],na=null},Un=()=>{f.value=g.value.length>0?g.value.reduce((B,R,ke)=>{var _t,kt;if(R.isHidden)return B;if(R.text===`
`){const Ct=ts(ke);return Ct!==-1&&g.value[Ct],B+R.text}if(B===""){let Ct=ke+1;for(;Ct<g.value.length&&((_t=g.value[Ct])!=null&&_t.isHidden);)Ct++;const en=Ct>=g.value.length,dn=Ct<g.value.length?g.value[Ct]:null,eo=en||dn&&dn.text===`
`;return R.text+(eo?",":"")}let De=ke+1;for(;De<g.value.length&&((kt=g.value[De])!=null&&kt.isHidden);)De++;const Qe=De>=g.value.length,Me=De<g.value.length?g.value[De]:null,He=Me&&Me.text===`
`||Qe,Je=ts(ke);return Je!==-1&&g.value[Je].text===`
`?B+R.text+(He?",":""):B+", "+R.text+(He?",":"")},""):"",Xo(),Rt||(bt.value=!0)},Vc=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openAiWindow"},"*")},Wc=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank")},oa=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_cloud_window"},"*")},Hc=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_danbooru_manager_window"},"*")},jc=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},ts=B=>{for(let R=B-1;R>=0;R--)if(!g.value[R].isHidden)return R;return-1},Ul=B=>{if(B>=0&&B<g.value.length){if(g.value[B].text===`
`||g.value[B].text===" ")return;g.value[B].isHidden=!g.value[B].isHidden,g.value[B].isHidden?g.value[B].hiddenHint=o("promptBox.hiddenHint"):g.value[B].hiddenHint="",Un()}},zl=()=>{window.open("https://www.bilibili.com/list/288025756/?sid=4690314&spm_id_from=333.1387.0.0&oid=114342431298474&bvid=BV1txdfYxE7X","_blank")},Dn=async()=>{if(d.promptManager=="prompt_global")try{await Yn.goRandomTemplate().then(B=>{B.code===200?(f.value=B.random_tags,wt(()=>{xn()})):ue({type:"warn",str:B.info})}).catch(B=>{console.error(B),ue({type:"warn",str:"message.networkError"})})}catch(B){ue({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",B)}else window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"},"*")},Gc=async B=>{try{await Yn.goRandomTemplatePath(B).then(R=>{R.code===200?(f.value=R.random_tags,wt(()=>{xn()})):ue({type:"warn",str:R.info})}).catch(R=>{console.error(R),ue({type:"warn",str:"message.networkError"})})}catch(R){ue({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",R)}},pr=S(null),qc=B=>{pr.value&&pr.value.open(B.text,B.translate)},Yc=()=>{n.value.open(d.promptManager)},Kc=()=>{f.value="",g.value=[],fe.value="",D.value=[],I.value="",Un()},Jc=()=>{const B=g.value.filter(R=>!R.isHidden);g.value=B,Un(),ue({type:"success",str:o("promptBox.clearDisabledSuccess")||"已清空所有禁用标签"})};return t({setPromptText:cr}),(B,R)=>{var ke,De,Qe;return C(),A(qe,null,[i("div",IE,[at(jr,{name:"weilin-fade"},{default:Ut(()=>[ln.value?(C(),A("div",AE,"已更新标签")):Ie("",!0)]),_:1}),d.promptManager==="prompt"?(C(),Qt(ok,{key:0,"is-open":z.value,"selected-loras":D.value,onClose:Ke},null,8,["is-open","selected-loras"])):Ie("",!0),de.value?(C(),Qt(vk,{key:1,ref_key:"mainLabelManagerRef",ref:tt,"selected-id":it.value,onSelect:In},null,8,["selected-id"])):Ie("",!0),i("div",{class:We(`${UI}main-content`),style:Ft({width:rn.value})},[i("div",LE,[i("div",ME,[i("button",{class:"tag-manager-btn",onClick:Oe,title:de.value?"收起标签栏":"展开标签栏"},[(C(),A("svg",{class:We(["weilin-comfyui-sidebar-toggle-icon",{"is-closed":!de.value}]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},R[16]||(R[16]=[i("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"},null,-1)]),2)),i("span",OE,y(de.value?"收起标签栏":"展开标签栏"),1)],8,DE)]),i("div",RE,[i("button",{class:"language-switch-btn",onClick:vt(ui,["stop"]),ref_key:"langBtnRef",ref:V,title:v(o)("controls.language")},[R[17]||(R[17]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"translate-icon"},[i("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)),i("span",NE,y(v(o)("controls.language")),1)],8,PE),at(jr,{name:"fade"},{default:Ut(()=>[O.value?(C(),Qt(_b,{key:0,ref_key:"languageSwitcherRef",ref:pe,onClose:xs},null,512)):Ie("",!0)]),_:1})]),i("div",FE,[at(Qw,{title:v(o)("controls.switchTheme")},{default:Ut(({isDark:Me})=>[i("span",BE,y(v(o)(Me?"controls.darkMode":"controls.lightMode")),1)]),_:1},8,["title"])]),i("div",UE,[i("button",{class:"settings-btn",onClick:mt,title:v(o)("controls.settings")},[R[18]||(R[18]=i("svg",{class:"settings-icon",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("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)),i("span",VE,y(v(o)("controls.settings")),1)],8,zE)]),i("div",WE,[i("button",{class:"tag-manager-btn",onClick:ci,title:v(o)("controls.tagManager")},[R[19]||(R[19]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon"},[i("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)),i("span",jE,y(v(o)("controls.tagManager")),1)],8,HE)]),i("div",GE,[i("button",{class:"tag-manager-btn",onClick:Hc,title:v(o)("controls.danbooruManager")},[R[20]||(R[20]=i("svg",{class:"tag-icon",viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},[i("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)),i("span",YE,y(v(o)("controls.danbooruManager")),1)],8,qE)]),d.hasPromptLoraStack?(C(),A("div",KE,[i("button",{class:"tag-manager-btn",onClick:$e,title:v(o)("controls.loraStack")},[R[21]||(R[21]=i("svg",{sxmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("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)),i("span",XE,y(v(o)("controls.loraStack")),1)],8,JE)])):Ie("",!0),i("div",QE,[i("button",{class:"tag-manager-btn",onClick:Ka,title:v(o)("controls.loraManager")},[R[22]||(R[22]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("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"}),i("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)),i("span",e$,y(v(o)("controls.loraManager")),1)],8,ZE)]),i("div",t$,[i("button",{class:"tag-manager-btn",onClick:di,title:v(o)("controls.history")},[R[23]||(R[23]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("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"}),i("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)),i("span",o$,y(v(o)("controls.history")),1)],8,n$)]),i("div",a$,[i("button",{class:"tag-manager-btn",onClick:Vc,title:v(o)("controls.aiChat")},[R[24]||(R[24]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[i("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"}),i("path",{d:"M6 14h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"})],-1)),i("span",i$,y(v(o)("controls.aiChat")),1)],8,s$)]),i("div",r$,[i("button",{class:"tag-manager-btn",onClick:Wc,title:v(o)("controls.github")},[R[25]||(R[25]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[i("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)),i("span",u$,y(v(o)("controls.github")),1)],8,l$)]),i("div",c$,[i("button",{class:"tag-manager-btn",onClick:oa,title:v(o)("controls.shareCloudData")},[R[26]||(R[26]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",class:"tag-icon",width:"24",height:"24"},[i("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)),i("span",p$,y(v(o)("controls.shareCloudData")),1)],8,d$)]),i("div",f$,[i("button",{class:"tag-manager-btn",onClick:zl,title:v(o)("controls.tutorialVideo")},[R[27]||(R[27]=i("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"},[i("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"}),i("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)),i("span",m$,y(v(o)("controls.tutorialVideo")),1)],8,g$)]),i("div",h$,[i("button",{class:"tag-manager-btn",onClick:jc,title:v(o)("controls.sponsor")},[R[28]||(R[28]=i("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"},[i("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"}),i("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)),i("span",_$,y(v(o)("controls.sponsor")),1)],8,v$)]),at(nm,{ref_key:"settingDialog",ref:M},null,512),i("div",y$,[i("button",{class:We(["update-label-btn",{"is-dirty":bt.value}]),disabled:!it.value||!bt.value,onClick:Jt}," 更新标签 ",10,b$)])]),i("div",{style:{position:"relative"},ref_key:"parentCneterBox",ref:m},[Se(i("textarea",{"onUpdate:modelValue":R[0]||(R[0]=Me=>f.value=Me),class:"input-area",onInput:Ro,placeholder:v(o)("promptBox.placeholder"),onKeydown:gi,onBlur:Ml,rows:"6",ref_key:"inputAreaRef",ref:s,onMouseup:pi,onResize:pi},null,40,w$),[[ze,f.value]]),i("div",x$,y(u.value)+" tokens ",1),i("div",{class:"autocomplete-container",ref_key:"autocompleteContainerRef",ref:a,style:Ft({top:`${r.value.top}px`,left:`${Rl.value.left}px`,display:ie.value?"block":"none",width:`${Re.value}px`,maxHeight:`${Le.value}px`})},[i("button",{class:"close-autocomplete-btn",onClick:vt(Pl,["stop"])},"×"),(C(!0),A(qe,null,ot(P.value,(Me,He)=>(C(),A("div",{key:He,class:We(["autocomplete-item",{selected:He===re.value}]),onClick:vt(Je=>ur(He,Je),["stop"]),ref_for:!0,ref:Je=>{Je&&He===re.value&&(ce.value=Je)}},[i("span",T$,y(Me.text),1),i("span",k$,y(Me.desc),1)],10,S$))),128))],4)],512),i("div",C$,[i("div",E$,[Se(i("input",{type:"text","onUpdate:modelValue":R[1]||(R[1]=Me=>fe.value=Me),class:"prompt-input-translate-area-textarea",onKeyup:R[2]||(R[2]=Pn(Me=>Ll(),["enter"])),placeholder:v(o)("promptBox.translatePlaceholder")},null,40,$$),[[ze,fe.value]]),i("button",{class:"translate-btn",style:{"margin-left":"8px"},onClick:R[3]||(R[3]=Me=>Ll())}," 翻译 ")]),j.value?(C(),A("button",{key:0,class:"translate-btn random-tag-settings-btn",onClick:_o,title:v(o)("promptBox.oneClickTranslate")},[R[29]||(R[29]=i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"token-item-icon",width:"24",height:"24"},[i("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"}),i("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)),i("span",A$,y(v(o)("promptBox.oneClickTranslate")),1)],8,I$)):Ie("",!0),k.value?(C(),A("button",{key:1,class:"translate-btn random-tag-settings-btn",onClick:Yc,title:v(o)("promptBox.randomTagSettings")},[R[30]||(R[30]=i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[i("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"}),i("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)),i("span",M$,y(v(o)("promptBox.randomTagSettings")),1)],8,L$)):Ie("",!0),U.value?(C(),A("button",{key:2,class:"translate-btn random-tag-btn",onClick:Dn,title:v(o)("promptBox.oneClickRandomTag")},[R[31]||(R[31]=i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[i("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)),i("span",O$,y(v(o)("promptBox.oneClickRandomTag")),1)],8,D$)):Ie("",!0),Ae.value?(C(),A("button",{key:3,class:We(["translate-btn toggle-delete-btn",{active:W.value}]),onClick:N,title:W.value?v(o)("promptBox.hideDeleteButton"):v(o)("promptBox.showDeleteButton")},[R[32]||(R[32]=i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:"utils-item-icon",width:"24",height:"24"},[i("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)),i("span",P$,y(W.value?v(o)("promptBox.hideDeleteButton"):v(o)("promptBox.showDeleteButton")),1)],10,R$)):Ie("",!0),Ce.value?(C(),A("button",{key:4,class:"translate-btn clear-all-btn",onClick:Kc,title:v(o)("promptBox.oneClickCleanAll")},[R[33]||(R[33]=i("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"},[i("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"}),i("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"}),i("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"}),i("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)),i("span",F$,y(v(o)("promptBox.oneClickCleanAll")),1)],8,N$)):Ie("",!0),ne.value?(C(),A("button",{key:5,class:"translate-btn clear-disabled-btn",onClick:Jc,title:v(o)("promptBox.oneClickClearDisabled")},[R[34]||(R[34]=i("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"},[i("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"}),i("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"}),i("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"}),i("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)),i("span",U$,y(v(o)("promptBox.oneClickClearDisabled")),1)],8,B$)):Ie("",!0)]),g.value.length>0?(C(),A("div",z$,[(C(!0),A(qe,null,ot(g.value,(Me,He)=>(C(),A(qe,{key:"tag-item-"+He},[i("div",{class:We(["token-item-box",{"token-item-box-disabled":Me.isHidden}]),draggable:!Me.isEditing,onDragstart:Je=>Nl(He,Je),onDragover:vt(Je=>Fl(He,Je),["prevent"]),onDrop:Je=>Bl(He,Je),onDblclick:Je=>Ul(He),style:Ft({backgroundColor:Me.color})},[Me.text===`
`?(C(),A("div",W$,[i("span",{class:"token-symbol",title:v(o)("promptBox.newline")},"↵",8,H$)])):Me.text===" "?(C(),A("div",{key:1,class:"token-item tab-token",onMouseenter:Je=>uo(He,Je),onMouseleave:Je=>Po()},[i("span",{class:"token-symbol",title:v(o)("promptBox.tab")},"→",8,G$)],40,j$)):Me.isLoraTag?(C(),A("div",{key:2,class:"lora-tag-icon",title:v(o)("promptBox.loraTag"),onMouseenter:Je=>uo(He,Je),onMouseleave:Je=>Po()},[R[35]||(R[35]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"15",height:"15"},[i("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)),i("span",Y$,y(Me.text),1)],40,q$)):Me.text&&!Me.isLoraTag?(C(),A("div",{key:3,class:We(["token-item",{punctuation:Me.isPunctuation}]),onMouseenter:Je=>uo(He,Je),onMouseleave:Je=>Po()},[!Me.isEditing||Me.isPunctuation?(C(),A("span",{key:0,onClick:Je=>!Me.isPunctuation&&ri(He)},y(Me.text),9,J$)):Me.isPunctuation?Ie("",!0):(C(),A("input",{key:1,value:Me.text,onInput:Je=>ii(He,Je),onBlur:Je=>li(He),onKeyup:Pn(Je=>li(He),["enter"]),ref_for:!0,ref:Je=>{Je&&(w[He]=Je)}},null,40,X$)),W.value?(C(),A("button",{key:2,class:"quick-delete-btn",onClick:vt(Je=>bs(He),["stop"]),title:v(o)("promptBox.delete"),style:{"margin-left":"4px"}},R[36]||(R[36]=[i("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none"},[i("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,Q$)):Ie("",!0)],42,K$)):Ie("",!0),Me.text!==`
`&&Me.text!==" "&&!Me.isLoraTag?(C(),A("div",Z$,[ar(Me.text)?(C(),A("div",{key:0,onClick:Je=>lr(Me.text,Me),class:"translate-button",title:v(o)("promptBox.translate")},R[37]||(R[37]=[i("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",class:"token-item-icon",width:"24",height:"24"},[i("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"}),i("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,eI)):Ie("",!0),i("span",tI,y(Me.translate?Me.translate:""),1)])):Ie("",!0)],46,V$),Me.text===`
`?(C(),A("div",nI)):Ie("",!0)],64))),128))])):Ie("",!0),_e.value?(C(),A("div",{key:1,class:"tag-tips-box",style:Ft(Z.value)},[i("div",oI,[i("p",{innerHTML:v(o)("promptBox.tagTips")},null,8,aI)])],4)):Ie("",!0),Se(i("div",{class:"token-controls",style:Ft(E.value),onMouseenter:R[14]||(R[14]=Me=>T.value=!0),onMouseleave:si},[(ke=g.value[b.value])!=null&&ke.isLoraTag?Ie("",!0):(C(),A("div",sI,[Se(i("input",{type:"number","onUpdate:modelValue":R[4]||(R[4]=Me=>Pe.value=Me),step:"0.1",class:"weight-input",onChange:Ue},null,544),[[ze,Pe.value]]),i("span",iI,y(v(o)("promptBox.weight")),1)])),(De=g.value[b.value])!=null&&De.isLoraTag?(C(),A("div",rI,[i("div",lI,[Se(i("input",{type:"number","onUpdate:modelValue":R[5]||(R[5]=Me=>At.value=Me),step:"0.1",class:"weight-input",onChange:ja},null,544),[[ze,At.value]]),i("span",uI,y(v(o)("promptBox.modelWeight")),1)]),i("div",cI,[Se(i("input",{type:"number","onUpdate:modelValue":R[6]||(R[6]=Me=>Xt.value=Me),step:"0.1",class:"weight-input",onChange:ja},null,544),[[ze,Xt.value]]),i("span",dI,y(v(o)("promptBox.textWeight")),1)])])):Ie("",!0),i("button",{class:"favour-btn",onClick:R[7]||(R[7]=Me=>qc(g.value[b.value])),title:v(o)("promptBox.favour")},R[38]||(R[38]=[i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},[i("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,pI),i("button",{onClick:Qo,class:"delete-btn",title:v(o)("promptBox.delete")},R[39]||(R[39]=[i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("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,fI),(Qe=g.value[b.value])!=null&&Qe.isLoraTag?Ie("",!0):(C(),A("div",gI,[i("div",mI,[R[40]||(R[40]=i("div",{class:"bracket-btn"}," () ",-1)),i("div",hI,[i("button",{class:"vertical-btn",onClick:R[8]||(R[8]=Me=>xa("(")),title:v(o)("promptBox.addBracket")}," + ",8,vI),i("button",{class:"vertical-btn",onClick:R[9]||(R[9]=Me=>Ga("(")),title:v(o)("promptBox.removeLayer")}," - ",8,_I)])]),i("div",yI,[R[41]||(R[41]=i("div",{class:"bracket-btn"}," [] ",-1)),i("div",bI,[i("button",{class:"vertical-btn",onClick:R[10]||(R[10]=Me=>xa("[")),title:v(o)("promptBox.addBracket")}," + ",8,wI),i("button",{class:"vertical-btn",onClick:R[11]||(R[11]=Me=>Ga("[")),title:v(o)("promptBox.removeLayer")}," - ",8,xI)])]),i("div",SI,[R[42]||(R[42]=i("div",{class:"bracket-btn"}," {} ",-1)),i("div",TI,[i("button",{class:"vertical-btn",onClick:R[12]||(R[12]=Me=>xa("{")),title:v(o)("promptBox.addBracket")}," + ",8,kI),i("button",{class:"vertical-btn",onClick:R[13]||(R[13]=Me=>Ga("{")),title:v(o)("promptBox.removeLayer")}," - ",8,CI)])])])),i("button",{class:"line-token-btn",onClick:Xn,title:v(o)("promptBox.addLineToken"),style:{"margin-left":"8px"}},R[43]||(R[43]=[i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},[i("path",{d:"M5 19h14v-2H5v2zm0-7h14v-2H5v2zm0-7v2h14V5H5z",fill:"#888"}),i("path",{d:"M7 17v-2h2v2H7zm0-7V8h2v2H7zm0-7V3h2v2H7z",fill:"#4285f4"})],-1)]),8,EI)],36),[[Ns,b.value!==null&&g.value[b.value]]]),i("div",$I,[Se(i("div",{class:"token-controls",style:Ft(Q.value),onMouseenter:R[15]||(R[15]=Me=>T.value=!0),onMouseleave:si},[i("div",II,[i("div",AI,"选中 "+y(se.value.length)+" 个标签",1),i("div",{class:"weilin-comfyui-selection-actions-buttons"},[i("button",{class:"delete-btn copy-btn",onClick:ve,title:"复制"},R[44]||(R[44]=[i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("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)])),i("button",{class:"delete-btn",onClick:oe,title:"禁用"},R[45]||(R[45]=[i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("circle",{cx:"12",cy:"12",r:"10",fill:"none",stroke:"#ff4d4f","stroke-width":"2"}),i("path",{d:"M8.5 8.5l7 7",stroke:"#ff4d4f","stroke-width":"2","stroke-linecap":"round"})],-1)])),i("button",{class:"delete-btn enable-btn",onClick:ye,title:"启用"},R[46]||(R[46]=[i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("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)])),i("button",{class:"delete-btn",onClick:nt,title:"删除"},R[47]||(R[47]=[i("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[i("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),[[Ns,he.value]]),i("div",{class:"tag-manager-header",onClick:Ss},[i("div",LI,[R[48]||(R[48]=i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",class:"tag-icon",width:"24",height:"24"},[i("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"}),i("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)),i("span",MI,y(v(o)("controls.loraManager")),1)]),i("div",DI,[(C(),A("svg",{class:We(["collapse-icon",{"is-collapsed":!Qa.value}]),viewBox:"0 0 24 24"},R[49]||(R[49]=[i("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)]),2))])]),Se(i("div",OI,[at(Sh,{loraManager:"prompt_inner"})],512),[[Ns,Qa.value]])]),i("div",RI,[i("div",{class:"tag-manager-header",onClick:Xa},[i("div",PI,[R[50]||(R[50]=i("svg",{class:"tag-icon",viewBox:"0 0 24 24"},[i("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)),i("span",NI,y(v(o)("controls.tagManager")),1)]),i("div",FI,[(C(),A("svg",{class:We(["collapse-icon",{"is-collapsed":!Ja.value}]),viewBox:"0 0 24 24"},R[51]||(R[51]=[i("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)]),2))])]),Se(i("div",BI,[at(lh)],512),[[Ns,Ja.value]])])],6)]),at(aE,{ref_key:"randomSettingItem",ref:n},null,512),at($E,{ref_key:"favourItemRef",ref:pr},null,512)],64)}}},[["__scopeId","data-v-60678485"]]),jI={class:"container"},GI={class:"tab-container"},qI={key:0},YI={class:"search-container"},KI=["placeholder"],JI=["title"],XI=["title","disabled"],QI=["title"],ZI={class:"history-list"},eA={class:"action-buttons"},tA=["onClick","title"],nA=["onClick","title"],oA=["onClick","title"],aA=["value"],sA={key:1},iA={class:"search-container"},rA=["placeholder"],lA=["title"],uA=["title"],cA=["title","disabled"],dA=["title"],pA={class:"history-list"},fA={key:0,class:"favor-name"},gA={class:"action-buttons"},mA=["onClick","title"],hA=["onClick","title"],vA=["onClick","title"],_A=["value"],yA={key:2,class:"weilin-tools-dialog-overlay"},bA={class:"weilin-tools-dialog-header"},wA={class:"weilin-tools-dialog-body"},xA={class:"form-group"},SA=["placeholder"],TA={class:"form-group"},kA=["placeholder"],CA={class:"form-group"},EA={class:"color-picker"},$A={class:"color-controls"},IA={class:"alpha-control"},AA={class:"alpha-value"},LA={class:"weilin-tools-dialog-footer"},MA={key:3,class:"weilin-tools-dialog-overlay"},DA={class:"weilin-tools-dialog-header"},OA={class:"weilin-tools-dialog-body"},RA={class:"confirm-message"},PA={class:"weilin-tools-dialog-footer"},NA=Wt({__name:"history_index",setup(e){const{t}=Yt(),n=S(""),o=S([]),a=S([]),s=S([]),r=S([]),u=S("history"),d=S([]),m=S(!1),f=S(!1),g=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),O=q=>JSON.parse(q).prompt,M=q=>({hex:"#FFFFFF",alpha:0}),V=q=>{const{hex:Y,alpha:$}=M();w.value={hex:Y,alpha:$}},pe=()=>{g.value=!1,b.value={id:"",name:"",tag:"",backgroundColor:"transparent"},V(),m.value=!0},D=q=>{const Y=q.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(Y){const[,$,I,H,de]=Y,Ce=`#${((1<<24)+(parseInt($,10)<<16)+(parseInt(I,10)<<8)+parseInt(H,10)).toString(16).slice(1)}`,Ae=de?Math.round(parseFloat(de)*100):100;return{hex:Ce,alpha:Ae}}return{hex:"#FF7B02",alpha:50}},z=q=>{g.value=!0,b.value={...q},w.value=D(q.color),m.value=!0},ie=()=>{const q=X(w.value.hex,w.value.alpha);b.value.color=q},P=()=>{m.value=!1,b.value={name:"",tag:"",color:"rgba(255, 123, 2, .4)"},g.value=!1},re=S(""),ce=S(null),Re=Bt(()=>{if(!ce.value)return"";switch(re.value){case"history":return t("history.deleteHistoryConfirm",{name:ce.value.tag});case"favorite":return t("history.deleteFavoriteConfirm",{name:ce.value.tag});case"deleteSelected":return t("history.confirmDeleteSelected");case"deleteSelectedFavorite":return t("history.confirmDeleteSelected");default:return""}}),Le=q=>{re.value="history",ce.value=q,f.value=!0},fe=q=>{re.value="favorite",ce.value=q,f.value=!0},xe=()=>{T.value=!1,E.value=0,re.value="deleteSelected",ce.value=d.value,f.value=!0},ae=()=>{T.value=!1,E.value=0,re.value="deleteSelectedFavorite",ce.value=d.value,f.value=!0},J=()=>{try{switch(re.value){case"history":Oo.deleteHistory(ce.value.id_index).then(()=>{he(),ue({type:"success",str:"message.deleteSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})});break;case"favorite":Oo.deleteFavorite(ce.value.id_index).then(()=>{Q(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.deleteSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Oo.batchDeleteHistory(d.value).then(()=>{he(),ue({type:"success",str:"message.deleteSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})});break;case"deleteSelectedFavorite":Oo.batchDeleteFavorite(ce.value).then(()=>{Q(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.deleteSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})});break}ee()}catch{ue({type:"warn",str:"message.networkError"})}},se=q=>{q.target.checked?u.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),I=parseInt(q.slice(3,5),16),H=parseInt(q.slice(5,7),16);return`rgba(${$}, ${I}, ${H}, ${Y/100})`},ee=()=>{f.value=!1,re.value="",ce.value=null},Ee=()=>{if(!b.value.tag){ue({type:"warn",str:"history.dialog.tag_placeholder"});return}g.value?Oo.editFavorite({id_index:b.value.id_index,name:b.value.name,tag:b.value.tag,color:b.value.color}).then(()=>{Q(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.editSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})}):Oo.addFavorite({name:b.value.name,tag:b.value.tag,color:b.value.color}).then(()=>{Q(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),ue({type:"success",str:"message.addSuccess"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})}),P()},he=()=>{Oo.getHistory({}).then(q=>{o.value=q.data,a.value=o.value}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},Q=()=>{Oo.getFavorite().then(q=>{s.value=q.data,r.value=s.value}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},le=()=>{a.value=o.value.filter(q=>q.tag.includes(n.value))},be=()=>{r.value=s.value.filter(q=>q.tag.includes(n.value))},we=()=>{he()},_e=()=>{Q()},Z=q=>{Oo.addFavorite({tag:q.tag}).then(Y=>{Y.code===200?(window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Q(),ue({type:"success",str:"message.addFavoriteSuccess"})):ue({type:"success",str:"message.addFavoriteIsExist"})}).catch(()=>{ue({type:"warn",str:"message.networkError"})})},W=q=>{window.postMessage({type:"weilin_prompt_ui_user_history_tag",tagText:q.tag},"*")},te=()=>{d.value=[],T.value=!0},N=()=>{d.value=[],T.value=!1,E.value=0};return jt(()=>{he(),Q()}),(q,Y)=>(C(),A("div",jI,[i("h1",null,y(u.value==="history"?v(t)("history.title"):v(t)("history.favorites")),1),i("div",GI,[i("button",{class:We([{active:u.value==="history"},"tab-button"]),onClick:Y[0]||(Y[0]=$=>u.value="history")},y(v(t)("history.history")),3),i("button",{class:We([{active:u.value==="favorites"},"tab-button"]),onClick:Y[1]||(Y[1]=$=>u.value="favorites")},y(v(t)("history.favorites")),3)]),u.value==="history"?(C(),A("div",qI,[i("div",YI,[i("button",{class:"refresh-btn",onClick:we},Y[14]||(Y[14]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[i("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)])),Se(i("input",{type:"text","onUpdate:modelValue":Y[2]||(Y[2]=$=>n.value=$),placeholder:v(t)("history.search_placeholder"),onInput:le,class:"search-input"},null,40,KI),[[ze,n.value]]),T.value?Se((C(),A("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[3]||(Y[3]=$=>E.value=$),value:1,class:"tag-checkbox",onChange:se},null,544)),[[on,E.value]]):Ie("",!0),T.value?Ie("",!0):(C(),A("button",{key:1,class:"bulk-delete-btn",onClick:te,title:v(t)("history.bulk_delete")},Y[15]||(Y[15]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("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,JI)),T.value?(C(),A("button",{key:2,class:"bulk-delete-btn",onClick:xe,title:v(t)("history.sure_delete"),disabled:d.value.length===0},Y[16]||(Y[16]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("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,XI)):Ie("",!0),T.value?(C(),A("button",{key:3,class:"bulk-delete-btn",onClick:N,title:v(t)("history.cancel_delete")},Y[17]||(Y[17]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("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"}),i("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,QI)):Ie("",!0)]),i("ul",ZI,[(C(!0),A(qe,null,ot(a.value,$=>(C(),A("li",{key:$.id_index,class:"history-item"},[i("span",null,y(O($.tag)),1),i("div",eA,[i("button",{onClick:I=>Z($),class:"favorite-btn",title:v(t)("history.add_to_favorites")},Y[18]||(Y[18]=[i("svg",{viewBox:"0 0 24 24",width:"24",height:"24",class:"favorite-icon"},[i("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,tA),i("button",{onClick:I=>Le($),class:"delete-favorite-btn",title:v(t)("history.delete_history")},Y[19]||(Y[19]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[i("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,nA),i("button",{onClick:I=>W($),class:"use-btn",title:v(t)("history.use_item")},Y[20]||(Y[20]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"use-icon"},[i("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,oA),T.value?Se((C(),A("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[4]||(Y[4]=I=>d.value=I),value:$.id_index,class:"tag-checkbox"},null,8,aA)),[[on,d.value]]):Ie("",!0)])]))),128))])])):(C(),A("div",sA,[i("div",iA,[i("button",{class:"refresh-btn",onClick:_e},Y[21]||(Y[21]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"refresh-icon"},[i("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)])),Se(i("input",{type:"text","onUpdate:modelValue":Y[5]||(Y[5]=$=>n.value=$),placeholder:v(t)("history.search_placeholder"),onInput:be,class:"search-input"},null,40,rA),[[ze,n.value]]),T.value?Se((C(),A("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[6]||(Y[6]=$=>E.value=$),value:1,class:"tag-checkbox",onChange:se},null,544)),[[on,E.value]]):Ie("",!0),i("button",{class:"add-his-btn",onClick:pe,title:v(t)("history.add_new")},Y[22]||(Y[22]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"add-icon"},[i("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,lA),T.value?Ie("",!0):(C(),A("button",{key:1,class:"bulk-delete-btn",onClick:te,title:v(t)("history.bulk_delete")},Y[23]||(Y[23]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("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,uA)),T.value?(C(),A("button",{key:2,class:"bulk-delete-btn",onClick:ae,title:v(t)("history.sure_delete"),disabled:d.value.length===0},Y[24]||(Y[24]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("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,cA)):Ie("",!0),T.value?(C(),A("button",{key:3,class:"bulk-delete-btn",onClick:N,title:v(t)("history.cancel_delete")},Y[25]||(Y[25]=[i("svg",{viewBox:"0 0 1024 1024",width:"16",height:"16",class:"delete-favorite-icon"},[i("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"}),i("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,dA)):Ie("",!0)]),i("ul",pA,[(C(!0),A(qe,null,ot(r.value,$=>(C(),A("li",{key:$.id_index,class:"history-item"},[i("div",{class:"favor-name-box",style:Ft({backgroundColor:$.color||"transparent"})},[$.name.length>0?(C(),A("span",fA,y($.name),1)):Ie("",!0)],4),i("span",null,y(O($.tag)),1),i("div",gA,[i("button",{onClick:I=>z($),class:"delete-favorite-btn",title:v(t)("history.edit_favorite")},Y[26]||(Y[26]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[i("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,mA),i("button",{onClick:I=>fe($),class:"delete-favorite-btn",title:v(t)("history.delete_favorite")},Y[27]||(Y[27]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"delete-favorite-icon"},[i("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,hA),i("button",{onClick:I=>W($),class:"use-btn",title:v(t)("history.use_favorite")},Y[28]||(Y[28]=[i("svg",{viewBox:"0 0 1024 1024",width:"24",height:"24",class:"use-icon"},[i("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,vA),T.value?Se((C(),A("input",{key:0,type:"checkbox","onUpdate:modelValue":Y[7]||(Y[7]=I=>d.value=I),value:$.id_index,class:"tag-checkbox"},null,8,_A)),[[on,d.value]]):Ie("",!0)])]))),128))])])),m.value?(C(),A("div",yA,[i("div",{class:"weilin-tools-dialog-content",onMousedown:Y[12]||(Y[12]=vt(()=>{},["stop"]))},[i("div",bA,[i("h2",null,y(g.value?v(t)("history.dialog.edit_tag"):v(t)("history.dialog.add_tag")),1),i("button",{class:"close-btn",onClick:P},"×")]),i("div",wA,[i("div",xA,[i("label",null,y(v(t)("history.dialog.name")),1),Se(i("input",{type:"text","onUpdate:modelValue":Y[8]||(Y[8]=$=>b.value.name=$),placeholder:v(t)("history.dialog.name_placeholder")},null,8,SA),[[ze,b.value.name]])]),i("div",TA,[i("label",null,y(v(t)("history.dialog.tag")),1),Se(i("textarea",{"onUpdate:modelValue":Y[9]||(Y[9]=$=>b.value.tag=$),placeholder:v(t)("history.dialog.tag_placeholder"),rows:"4"}," ",8,kA),[[ze,b.value.tag]])]),i("div",CA,[i("label",null,y(v(t)("history.dialog.background_color")),1),i("div",EA,[i("div",{class:"color-preview",style:Ft({backgroundColor:q.previewColor})},null,4),i("div",$A,[Se(i("input",{type:"color","onUpdate:modelValue":Y[10]||(Y[10]=$=>w.value.hex=$),onInput:ie,class:"color-input"},null,544),[[ze,w.value.hex]]),i("div",IA,[Se(i("input",{type:"range","onUpdate:modelValue":Y[11]||(Y[11]=$=>w.value.alpha=$),min:"0",max:"100",onInput:ie,class:"alpha-slider"},null,544),[[ze,w.value.alpha,void 0,{number:!0}]]),i("span",AA,y(w.value.alpha)+"%",1)])])])])]),i("div",LA,[i("button",{class:"cancel-btn",onClick:P},y(v(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Ee},y(v(t)("common.confirm")),1)])],32)])):Ie("",!0),f.value?(C(),A("div",MA,[i("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:Y[13]||(Y[13]=vt(()=>{},["stop"]))},[i("div",DA,[i("h2",null,y(v(t)("common.confirmDelete")),1),i("button",{class:"close-btn",onClick:ee},"×")]),i("div",OA,[i("p",RA,y(Re.value),1)]),i("div",PA,[i("button",{class:"cancel-btn",onClick:ee},y(v(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:J},y(v(t)("common.delete")),1)])],32)])):Ie("",!0)]))}},[["__scopeId","data-v-6d1ae298"]]),FA={key:0,class:"drop-zone"},BA={key:1,class:"preview-container"},UA=["srcdoc"],zA={class:"action-buttons"},$h="weilin_tools_",VA=Wt({__name:"tranToWeb",emits:["close","update"],setup(e,{expose:t,emit:n}){const{t:o}=Yt(),a=S(!1),s=S(""),r=S(null),u={tranToWeb:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},m=S((()=>{try{const re=localStorage.getItem(`${$h}tranToWebState`);if(re){const ce=JSON.parse(re),Re={...u};return ce.tranToWeb&&(Re.tranToWeb={...u.tranToWeb,...ce.tranToWeb}),Re}}catch(re){console.error("Error loading window states:",re)}return{...u}})());It(m,re=>{try{localStorage.setItem(`${$h}tranToWebState`,JSON.stringify(re))}catch(ce){console.error("Error saving window states:",ce)}},{deep:!0}),jt(()=>{st.registerWindow("tranToWeb")}),po(()=>{st.unregisterWindow("tranToWeb")});const f=()=>{a.value=!1},g=(re,ce)=>{m.value[re]&&(m.value[re].position={...ce})},w=(re,ce)=>{m.value[re]&&(m.value[re].size={...ce})},b=()=>{a.value=!0,st.setActiveWindow("tranToWeb")},T=re=>{re.dataTransfer.dropEffect="copy"},E=re=>{const ce=re.dataTransfer.files[0];ce&&ce.type.startsWith("image/")&&M(ce)},O=re=>{const ce=re.clipboardData.items;for(let Re=0;Re<ce.length;Re++)if(ce[Re].type.startsWith("image/")){const Le=ce[Re].getAsFile();M(Le);break}},M=re=>{const ce=new FileReader;ce.onload=Re=>{const Le=Re.target.result,fe=btoa(Le);r.value=fe,V()},ce.readAsDataURL(re)},V=()=>{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 = "${r.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 re=new Blob([s.value],{type:"text/html"}),ce=URL.createObjectURL(re),Re=document.createElement("a");Re.href=ce,Re.download="image-to-html.html",document.body.appendChild(Re),Re.click(),document.body.removeChild(Re),URL.revokeObjectURL(ce)},D=()=>{s.value="",r.value=null},z=S(null),ie=()=>{s.value||z.value.click()},P=re=>{const ce=re.target.files[0];ce&&ce.type.startsWith("image/")&&M(ce)};return t({open:b}),(re,ce)=>a.value?(C(),Qt(mo,{key:0,title:v(o)("utils.tranToWeb"),position:m.value.tranToWeb.position,size:m.value.tranToWeb.size,"z-index":v(st).getZIndex("tranToWeb"),"onUpdate:position":ce[0]||(ce[0]=Re=>g("tranToWeb",Re)),"onUpdate:size":ce[1]||(ce[1]=Re=>w("tranToWeb",Re)),onActive:ce[2]||(ce[2]=Re=>v(st).setActiveWindow("tranToWeb")),onClose:ce[3]||(ce[3]=Re=>f())},{default:Ut(()=>[i("div",{class:"utils_tran_web__content",onDragover:vt(T,["prevent"]),onDrop:vt(E,["prevent"]),onPaste:O,onClick:ie},[s.value?(C(),A("div",BA,[i("iframe",{srcdoc:s.value,class:"html-preview"},null,8,UA),i("div",zA,[i("button",{onClick:pe},y(v(o)("utils.downloadHtml")),1),i("button",{onClick:D},y(v(o)("utils.clear")),1)])])):(C(),A("div",FA,y(v(o)("utils.dropOrPasteImage")),1)),i("input",{type:"file",ref_key:"fileInput",ref:z,style:{display:"none"},accept:"image/*",onChange:P},null,544)],32)]),_:1},8,["title","position","size","z-index"])):Ie("",!0)}},[["__scopeId","data-v-a865c34f"]]),WA=["onMouseenter","onMouseleave","onMousedown","onMouseup"],HA=Wt({__name:"FloatingBall",setup(e){const{t}=Yt(),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"),r=S(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),u=S(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),d=S(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),m=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 g=S([]),w=S([]),b=S([]),T=S([]),E=S(null),O=Bt(()=>T.value.map(Le=>{const fe={...Le};return s.value==="custom"&&r.value?(fe.backgroundImage=`url(${r.value})`,fe.backgroundSize="contain",fe.backgroundRepeat="no-repeat",fe.backgroundPosition="center",fe.imageRendering="optimizeQuality"):u.value==="gradient"?fe.background=`linear-gradient(135deg, ${d.value}, ${m.value})`:fe.background="transparent",fe.borderRadius=`${f.value}%`,fe}));for(let Le=0;Le<n.value;Le++){b.value[Le]=!1,w.value[Le]=!1;const fe=window.innerWidth,xe=window.innerHeight,ae=o.value,J=a.value,se=10,X=Math.floor(fe/(ae+se)),ee=Math.floor(Le/X);let he=20+Le%X*(ae+se),Q=xe-100-ee*(J+se);he=Math.max(0,he),he=Math.min(he,fe-ae),Q=Math.max(0,Q),Q=Math.min(Q,xe-J),g.value[Le]={x:he,y:Q,width:`${ae}px`,height:`${J}px`},T.value[Le]={left:`${g.value[Le].x}px`,top:`${g.value[Le].y}px`,width:`${ae}px`,height:`${J}px`}}const M=(Le,fe)=>{Le.target.closest(".weilin_prompt_ui_floating-ball")&&(w.value[fe]=!0,document.addEventListener("mousemove",ae=>V(ae,fe)),document.addEventListener("mouseup",ae=>pe(ae,fe)))},V=(Le,fe)=>{if(w.value[fe]){const xe=window.innerWidth,ae=window.innerHeight,J=o.value,se=a.value;let X=Le.clientX-J/2,ee=Le.clientY-se/2;X=Math.max(0,X),X=Math.min(X,xe-J),ee=Math.max(0,ee),ee=Math.min(ee,ae-se),g.value[fe]={x:X,y:ee,width:`${J}px`,height:`${se}px`},T.value[fe]={left:`${g.value[fe].x}px`,top:`${g.value[fe].y}px`,width:`${J}px`,height:`${se}px`}}},pe=(Le,fe)=>{w.value[fe]=!1,document.removeEventListener("mousemove",xe=>V(xe,fe)),document.removeEventListener("mouseup",xe=>pe(xe,fe))},D=()=>{},z=Le=>{switch(Le){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":P();break;case"item8":E.value.open();break}},ie=S(),P=()=>{ie.value.open()},re=Le=>{if(!(!Le.data||!Le.data.type)&&Le.data.type.startsWith("weilin_prompt_ui_")&&Le.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",r.value=localStorage.getItem("weilin_prompt_ui_customSkinUrl")||"",u.value=localStorage.getItem("weilin_prompt_ui_bgType")||"gradient",d.value=localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb",m.value=localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc",f.value=localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50,b.value=[],w.value=[],g.value=[],T.value=[];for(let fe=0;fe<n.value;fe++){b.value[fe]=!1,w.value[fe]=!1;const xe=window.innerWidth,ae=window.innerHeight,J=o.value,se=a.value,X=10,ee=Math.floor(xe/(J+X)),Ee=Math.floor(fe/ee);let Q=20+fe%ee*(J+X),le=ae-100-Ee*(se+X);Q=Math.max(0,Q),Q=Math.min(Q,xe-J),le=Math.max(0,le),le=Math.min(le,ae-se),g.value[fe]={x:Q,y:le,width:`${J}px`,height:`${se}px`},T.value[fe]={left:`${g.value[fe].x}px`,top:`${g.value[fe].y}px`,width:`${J}px`,height:`${se}px`,...s.value==="custom"&&r.value?{backgroundImage:`url(${r.value})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}:u.value==="gradient"?{background:`linear-gradient(135deg, ${d.value}, ${m.value})`}:{background:"transparent"},borderRadius:`${f.value}%`}}}},ce=Le=>{b.value[Le]=!0},Re=Le=>{b.value[Le]=!1};return jt(()=>{window.addEventListener("message",re)}),po(()=>{window.removeEventListener("message",re),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",pe)}),(Le,fe)=>(C(),A(qe,null,[(C(!0),A(qe,null,ot(n.value,xe=>(C(),A("div",{class:"weilin_prompt_ui_floating-ball",style:Ft(O.value[xe-1]),onMouseenter:ae=>ce(xe-1),onMouseleave:ae=>Re(xe-1),onMousedown:ae=>M(ae,xe-1),onMouseup:ae=>pe(ae,xe-1),key:"floating-ball-"+xe},[i("div",{class:"weilin_prompt_ui_ball-content",onClick:D},y(s.value==="default"?"WeiLin":""),1),b.value[xe-1]?(C(),A("div",{key:0,class:"weilin_prompt_ui_menu-container",onMousedown:fe[8]||(fe[8]=vt(()=>{},["stop"]))},[i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[0]||(fe[0]=ae=>z("item1"))},y(v(t)("floatingBall.promptBox")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[1]||(fe[1]=ae=>z("item2"))},y(v(t)("floatingBall.tagManager")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[2]||(fe[2]=ae=>z("item3"))},y(v(t)("floatingBall.loraManager")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[3]||(fe[3]=ae=>z("item4"))},y(v(t)("floatingBall.aiWindow")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[4]||(fe[4]=ae=>z("item6"))},y(v(t)("floatingBall.openNodeListWindow")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[5]||(fe[5]=ae=>z("item7"))},y(v(t)("floatingBall.tranToWeb")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[6]||(fe[6]=ae=>z("item8"))},y(v(t)("floatingBall.openSetting")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:fe[7]||(fe[7]=ae=>z("item5"))},y(v(t)("floatingBall.restoreWindow")),1)],32)):Ie("",!0)],44,WA))),128)),at(VA,{ref_key:"tranToWebRef",ref:ie},null,512),at(nm,{ref_key:"settingDialog",ref:E},null,512)],64))}},[["__scopeId","data-v-dc48fe8a"]]),jA={class:"ai-chat-window"},GA={class:"history-sidebar"},qA={class:"history-list"},YA=["onClick"],KA={key:0},JA=["onKeyup","onBlur"],XA={class:"item-actions"},QA=["onClick"],ZA=["onClick"],eL={class:"chat-main"},tL={class:"message-list"},nL={class:"message-content"},oL={key:0,class:"message assistant"},aL={class:"message-content"},sL={class:"input-area"},iL=["placeholder","onKeydown"],rL=["disabled"],lL=Wt({__name:"ai_window",setup(e){const{t}=Yt(),n=S([]),o=S(-1),a=S(""),s=S(!1),r=S({}),u=S(!1),d=S(""),m=z=>{var ie;n.value[z]&&(u.value=!0,d.value=((ie=n.value[z])==null?void 0:ie.title)||`对话 ${z+1}`,o.value=z)},f=z=>{n.value[z]&&(d.value.trim()&&(n.value[z].title=d.value.trim(),M()),u.value=!1)},g=()=>{u.value=!1},w=()=>{Ji.getOpenAiSetting().then(z=>{r.value=z.data}).catch(()=>{ue({type:"warn",str:"message.networkError"})})};jt(()=>{w()});const b=Bt(()=>n.value[o.value]||{messages:[]}),T=z=>{o.value=z},E=()=>{s.value=!0;const z={title:`对话 ${n.value.length+1}`,messages:[],createdAt:new Date().toISOString()};return n.value.push(z),o.value=n.value.length-1,M(),s.value=!1,z},O=()=>{const z=localStorage.getItem("aiChatHistory");z&&(n.value=JSON.parse(z))},M=()=>{localStorage.setItem("aiChatHistory",JSON.stringify(n.value))};jt(()=>{w(),O()});const V=async()=>{if(!a.value.trim()||s.value)return;(n.value.length===0||o.value===-1)&&E();const z={role:"user",content:a.value,timestamp:new Date().toISOString()};b.value.messages.push(z),M(),a.value="";const ie={role:"assistant",content:"",timestamp:new Date().toISOString()};b.value.messages.push(ie),M(),s.value=!0;try{await D({messages:b.value.messages},P=>{const re=b.value.messages[b.value.messages.length-1];re.content+=P.content,M()},P=>{console.error("Error:",P);const re=b.value.messages[b.value.messages.length-1];re.content="抱歉,出错了,请稍后再试。",M()},()=>{s.value=!1,M()})}catch(P){console.error("Error:",P),s.value=!1;const re=b.value.messages[b.value.messages.length-1];re.content="请求失败,请检查网络连接。",M()}},pe=z=>{n.value.splice(z,1),o.value===z&&(o.value=Math.max(0,z-1)),M()},D=async(z,ie,P,re)=>{var ce,Re;try{const Le=await fetch(`${r.value.base_url}/chat/completions`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r.value.api_key}`},body:JSON.stringify({model:r.value.model,messages:z.messages,stream:!0})});if(!Le.ok)throw new Error(`HTTP error! status: ${Le.status}`);const fe=Le.body.getReader(),xe=new TextDecoder;let ae="";for(;;){const{done:J,value:se}=await fe.read();if(J){re();break}ae+=xe.decode(se,{stream:!0});const X=ae.split(`
`);ae=X.pop();for(const ee of X)if(ee.trim()!==""){if(ee==="data: [DONE]"){re();return}try{const Ee=ee.replace(/^data: /,""),Q=((Re=(ce=JSON.parse(Ee).choices[0])==null?void 0:ce.delta)==null?void 0:Re.content)||"";Q&&ie({content:Q})}catch{console.error("Failed to parse message:",ee)}}}}catch(Le){P(Le)}};return(z,ie)=>(C(),A("div",jA,[i("div",GA,[i("button",{class:"new-chat-btn",onClick:E},y(v(t)("aiWindow.newChat")),1),i("div",qA,[(C(!0),A(qe,null,ot(n.value,(P,re)=>(C(),A("div",{key:re,class:We(["history-item",{active:o.value===re}]),onClick:ce=>T(re)},[!u.value||o.value!==re?(C(),A("span",KA,y((P==null?void 0:P.title)||v(t)("aiWindow.chatName")+` ${re+1}`),1)):Se((C(),A("input",{key:1,"onUpdate:modelValue":ie[0]||(ie[0]=ce=>d.value=ce),onKeyup:[Pn(ce=>f(re),["enter"]),Pn(g,["esc"])],onBlur:ce=>f(re),class:"rename-input"},null,40,JA)),[[ze,d.value]]),i("div",XA,[i("button",{class:"rename-btn",onClick:vt(ce=>m(re),["stop"])},"✎",8,QA),u.value?Ie("",!0):(C(),A("button",{key:0,class:"delete-btn",onClick:vt(ce=>pe(re),["stop"])},"×",8,ZA))])],10,YA))),128))])]),i("div",eL,[i("div",tL,[(C(!0),A(qe,null,ot(b.value.messages,(P,re)=>(C(),A("div",{key:re,class:We(["message",P.role])},[i("div",nL,[i("pre",null,y(P.content),1)])],2))),128)),s.value?(C(),A("div",oL,[i("div",aL,[i("pre",null,y(v(t)("aiWindow.thinking")),1)])])):Ie("",!0)]),i("div",sL,[Se(i("textarea",{class:"ai-chat-textarea","onUpdate:modelValue":ie[1]||(ie[1]=P=>a.value=P),placeholder:v(t)("aiWindow.inputMessage"),onKeydown:Pn(vt(V,["exact","prevent"]),["enter"])},null,40,iL),[[ze,a.value]]),i("button",{class:"ai-chat-btn",onClick:V,disabled:s.value},y(v(t)("aiWindow.send")),9,rL)])])]))}},[["__scopeId","data-v-a48359ca"]]),uL={class:"lora-info"},cL={class:"lora-header"},dL=["title"],pL={class:"lora-weights"},fL={class:"weight-item"},gL=["title"],mL={class:"weight-item"},hL={class:"center-box"},vL=["onClick"],$l="weilin_prompt_ui_",_L=Wt({__name:"index",setup(e){const{t}=Yt(),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 jt(()=>{window.postMessage({type:"weilin_prompt_ui_prompt_get_node_list_info"},"*")}),(a,s)=>(C(),A("div",{class:We(`${$l}lora-stack`)},[i("div",{class:We(`${$l}lora-content`)},[i("div",{class:We(`${$l}lora-body`)},[i("div",{class:We(`${$l}lora-list`)},[(C(!0),A(qe,null,ot(n.value,r=>(C(),A("div",{key:r.id,class:"lora-item"},[i("div",uL,[i("div",cL,[i("span",{class:"lora-name",title:r.title},"#"+y(r.id)+" - "+y(r.title),9,dL)]),i("div",pL,[i("div",fL,[i("div",{class:"text-label",title:r.text},y(r.text),9,gL)]),i("div",mL,[i("div",hL,[i("button",{onClick:u=>o(r.seed),class:"open-button"},y(v(t)("nodeListWindow.openPromptUI")),9,vL)])])])])]))),128))],2)],2)],2)],2))}},[["__scopeId","data-v-bd98d345"]]),Fc={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}})},yL={class:"cloud-manager"},bL={class:"weilin-toolbar"},wL={class:"current-path"},xL={class:"file-list"},SL={class:"file-info"},TL={class:"file-name"},kL={class:"file-type"},CL={class:"file-actions"},EL=["onClick"],$L={key:1,class:"install-container"},IL={key:0,class:"installed-badge"},AL=["onClick","disabled"],LL=Wt({__name:"index",setup(e){const{t}=Yt(),n=S([]),o=S("tags"),a=S("tags"),s=S([]),r=async E=>{try{const O=await Fc.getTreeFromCloud(E);n.value=O.data}catch(O){console.error("获取文件树失败:",O),ue({type:"warn",str:"message.networkError"})}},u=async()=>{try{const E=await Fc.getLocalInstallPackage();s.value=E.data||[]}catch(E){console.error("获取已安装包列表失败:",E),ue({type:"warn",str:"message.networkError"})}},d=E=>s.value.some(O=>O===E),m=async E=>{try{const O=n.value.find(M=>M.path===E);O&&(O.isInstalling=!0,await Fc.installSelectPackage(a.value,[E]).then(()=>{u(),ue({type:"success",str:"message.installPackageSuccess"})}))}catch(O){console.error("安装包失败:",O),ue({type:"warn",str:"message.installPackageFail"})}finally{const O=n.value.find(M=>M.path===E);O&&(O.isInstalling=!1)}},f=()=>{const E=o.value.split("/");E.length>1&&(o.value=E.slice(0,-1).join("/"),r(o.value))},g=()=>{r(o.value),u()},w=E=>{o.value=E,r(E)},b=()=>{a.value="tags",o.value="tags",r(o.value)},T=()=>{a.value="danbooru",o.value="danbooru",r(o.value)};return jt(()=>{r(o.value),u()}),(E,O)=>(C(),A("div",yL,[i("div",bL,[i("button",{class:"refresh-btn",onClick:g},O[0]||(O[0]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("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)])),i("button",{class:"database-btn",onClick:b},[O[1]||(O[1]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("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)),i("span",null,y(v(t)("cloudWindow.tagDatabase")),1)]),i("button",{class:"database-btn",onClick:T},[O[2]||(O[2]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("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)),i("span",null,y(v(t)("cloudWindow.danbooruDatabase")),1)]),i("div",wL,[i("span",null,y(v(t)("cloudWindow.currentPath"))+": "+y(a.value=="tags"?v(t)("cloudWindow.tagDatabase"):v(t)("cloudWindow.danbooruDatabase")),1)])]),i("div",xL,[o.value!=="tags"&&o.value!=="danbooru"?(C(),A("button",{key:0,class:"back-btn",onClick:f},[O[3]||(O[3]=i("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"tag-icon"},[i("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})],-1)),ut(" "+y(v(t)("cloudWindow.back")),1)])):Ie("",!0),(C(!0),A(qe,null,ot(n.value,M=>(C(),A("div",{key:M.path,class:"file-item"},[i("div",SL,[i("span",TL,y(M.name),1),i("span",kL,y(M.type=="dir"?"文件夹":M.type=="file"?"文件":"其它未知文件"),1)]),i("div",CL,[M.type==="dir"?(C(),A("button",{key:0,onClick:V=>w(M.path),class:"open-btn"},y(v(t)("cloudWindow.open")),9,EL)):M.type==="file"?(C(),A("div",$L,[d(M.path)?(C(),A("span",IL,y(v(t)("cloudWindow.installed")),1)):(C(),A("button",{key:1,onClick:V=>m(M.path),class:"install-btn",disabled:M.isInstalling},y(M.isInstalling?v(t)("cloudWindow.installing"):v(t)("cloudWindow.install")),9,AL))])):Ie("",!0)])]))),128))])]))}},[["__scopeId","data-v-d34491cd"]]),ML={class:"header-actions"},DL=["title"],OL=["onMouseover","onDragstart","onDrop"],RL={class:"lora-info"},PL={class:"lora-header"},NL=["title"],FL={class:"lora-actions"},BL=["onClick","title"],UL=["onClick","title"],zL={class:"lora-weights-row"},VL={class:"weight-item-col"},WL=["onUpdate:modelValue"],HL={class:"weight-item-col"},jL=["onUpdate:modelValue"],GL={class:"weight-item-col"},qL=["onUpdate:modelValue"],YL={class:"switch-item-col"},KL={class:"switch"},JL=["checked","onChange"],Zs="weilin_prompt_ui_",XL=Wt({__name:"lora_stack",setup(e,{expose:t}){const{t:n}=Yt(),o=S([]),a=S(""),s=()=>`lora_stack_${Math.random().toString(36).substring(2,15)}`;jt(()=>{a.value||(a.value=s())});let r=!1;const u=J=>{if(J.data.type===`weilin_prompt_ui_selectLora_stack_${a.value}`)P(J.data.lora);else if(J.data.type===`weilin_prompt_ui_prompt_node_finish_lora_stack_${a.value}`)try{const se=JSON.parse(J.data.data);r=!0,se.temp_lora&&se.temp_lora.length>0&&se.temp_lora!==""?o.value=se.temp_lora:se.lora&&se.lora!==""?o.value=se.lora:o.value=[],wt(()=>{r=!1})}catch(se){console.error("解析节点lora数据失败:",se),r=!1}else if(J.data.type===`weilin_prompt_ui_query_lora_stack_response_${a.value}`)try{const se=JSON.parse(J.data.data);r=!0,se.temp_lora&&se.temp_lora.length>0?o.value=se.temp_lora:o.value=[],wt(()=>{r=!1})}catch(se){console.error("解析节点查询响应失败:",se),r=!1}};window.addEventListener("message",u);const d=(J,se)=>{if(a.value=se,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{ue({type:"warn",str:"promptBox.settings.errorPrompt"})}},m=S(!1),f=S(""),g=S(100),w=S(0),b=S(),T=S(!1),E=S(!1),O=S(),M=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora_stack",seed:a.value},"*")},V=J=>{J.hidden=!J.hidden},pe=(J,se)=>{if(E.value=!0,f.value===J&&m.value)return;const ee=se.currentTarget.getBoundingClientRect(),he={left:ee.left-450-10,top:ee.top};he.left<10&&(he.left=ee.right+10),he.top=Math.max(10,Math.min(he.top,window.innerHeight-310)),g.value=he.left,w.value=he.top,m.value=!0,f.value=J,wt(()=>{O.value.refresh()})},D=()=>{E.value=!1,setTimeout(()=>{!T.value&&!E.value&&(m.value=!1,f.value="",T.value=!1)},200)},z=()=>{T.value=!0,E.value=!0},ie=()=>{m.value=!1,f.value="",T.value=!1},P=J=>{const se=o.value.findIndex(X=>X.name===J.name);se===-1?o.value.push({name:J.name,weight:1,text_encoder_weight:1,...J}):o.value[se]={...o.value[se],...J,weight:o.value[se].weight,text_encoder_weight:o.value[se].text_encoder_weight}},re=J=>{const se=o.value.findIndex(X=>X.name===J.name);se>-1&&o.value.splice(se,1)},ce=S(),Re=J=>{ce.value.open({name:J.lora})};It(o,()=>{r||Le()},{deep:!0});const Le=()=>{const J=o.value.filter(Ee=>!Ee.hidden),se={lora:J.length>0?J:"",temp_lora:o.value.length>0?o.value:[]},X=JSON.stringify(se);window.postMessage({type:`weilin_prompt_ui_prompt_node_finish_lora_stack_${a.value}`,data:X},"*");const ee=J.map(Ee=>`<wlr:${Ee.lora?Ee.lora.replace(".safetensors",""):Ee.name}:${Ee.weight||1}:${Ee.text_encoder_weight||1}:${Ee.trigger_weight||1}>`);window.postMessage({type:`weilin_prompt_ui_update_lora_tags_${a.value}`,tags:ee},"*")},fe=S(null),xe=J=>{fe.value=J},ae=J=>{if(fe.value===null||fe.value===J)return;const se=o.value.splice(fe.value,1)[0];o.value.splice(J,0,se),fe.value=null,Le()};return t({initLoraStack:d}),(J,se)=>(C(),A("div",{class:We(`${Zs}lora-stack`)},[i("div",{class:We(`${Zs}lora-content`)},[i("div",{class:We(`${Zs}lora-header`)},[i("div",ML,[i("button",{class:We(`${Zs}add-btn`),onClick:M,title:v(n)("controls.addLora")},se[1]||(se[1]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)]),10,DL)])],2),i("div",{class:We(`${Zs}lora-body`)},[i("div",{class:We(`${Zs}lora-list`)},[(C(!0),A(qe,null,ot(o.value,(X,ee)=>(C(),A("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:b,key:X.name,class:We(["lora-item",{"hidden-lora":X.hidden}]),onMouseover:Ee=>pe(X.lora,Ee),onMouseleave:D,draggable:"true",onDragstart:Ee=>xe(ee),onDragover:se[0]||(se[0]=vt(()=>{},["prevent"])),onDrop:Ee=>ae(ee)},[i("div",RL,[i("div",PL,[i("span",{class:"lora-name",title:X.name},y(X.name),9,NL),i("div",FL,[i("button",{class:"look-on-btn",onClick:Ee=>Re(X),title:v(n)("controls.lookOnLora")},se[2]||(se[2]=[i("svg",{viewBox:"0 0 1024 1024",width:"14",height:"14"},[i("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"}),i("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"}),i("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"}),i("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,BL),i("button",{class:"remove-btn",onClick:Ee=>re(X),title:v(n)("controls.removeLora")},se[3]||(se[3]=[i("svg",{viewBox:"0 0 24 24",width:"14",height:"14"},[i("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,UL)])]),i("div",zL,[i("div",VL,[i("label",null,y(v(n)("loraManager.modelWeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":Ee=>X.weight=Ee,class:"lora-weight",step:"0.1"},null,8,WL),[[ze,X.weight]])]),i("div",HL,[i("label",null,y(v(n)("loraManager.textEncoderWeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":Ee=>X.text_encoder_weight=Ee,class:"lora-weight",step:"0.1"},null,8,jL),[[ze,X.text_encoder_weight]])]),i("div",GL,[i("label",null,y(v(n)("loraManager.triggerWeight")),1),Se(i("input",{type:"number","onUpdate:modelValue":Ee=>X.trigger_weight=Ee,class:"lora-weight",step:"0.1"},null,8,qL),[[ze,X.trigger_weight]])]),i("div",YL,[i("label",null,y(X.hidden?v(n)("lora.hideLora"):v(n)("lora.showLora")),1),i("label",KL,[i("input",{type:"checkbox",checked:!X.hidden,onChange:Ee=>V(X)},null,40,JL),se[4]||(se[4]=i("span",{class:"slider"},null,-1))])])])])],42,OL))),128))],2)],2)],2),at(El,{ref_key:"loraDetailLoraStackRef",ref:ce},null,512),m.value?(C(),Qt(Pc,{key:0,ref_key:"loraCardItem",ref:O,fileNmae:f.value,paddingLeft:g.value,paddingTop:w.value,onCardLeave:ie,onCardenter:z},null,8,["fileNmae","paddingLeft","paddingTop"])):Ie("",!0)],2))}},[["__scopeId","data-v-0a691b76"]]),ei={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}})},QL={key:0,class:"loading-overlay"},ZL={class:"settings-content"},eM={style:{"margin-bottom":"16px"}},tM=["placeholder"],nM={style:{"margin-bottom":"16px"}},oM=["placeholder"],aM=["placeholder"],sM=["placeholder"],iM={class:"data-container"},rM={key:0},lM={key:0},uM={class:"tag-group-container"},cM={key:0},dM={key:1},pM={style:{display:"flex","align-items":"center"}},fM={key:0},gM=["placeholder"],mM=["placeholder"],hM=["placeholder"],vM=["placeholder"],_M=["onClick"],yM=["onClick"],bM=["onClick"],wM={key:1},xM={class:"tag-group-container"},SM={key:0},TM={key:1},kM={style:{display:"flex","align-items":"center"}},CM={key:0},EM=["placeholder"],$M=["placeholder"],IM=["placeholder"],AM=["placeholder"],LM=Wt({__name:"import_danbooru",setup(e,{expose:t}){const{t:n}=Yt(),o=S(!1),a=S(""),s=S(""),r=S(""),u=S(""),d=S(""),m=S(""),f=S(""),g=S(""),w=S(""),b=S([]),T=S(-1),E=S(""),O=S(""),M=S(null);S(null);const V=S(null),pe=S(!1),D=S(""),z=S(0),ie=S(0);function P(){a.value="",s.value="",z.value=0,ie.value=0,r.value="",u.value="",d.value="",m.value="",f.value="",g.value="",w.value="",b.value=[],T.value=-1,E.value="",O.value="",pe.value=!1}function re(Z){P();const W=Z.target.files[0];if(W){const te=new FileReader;te.onload=N=>{N.target.result.split(";").filter($=>$.trim()).forEach($=>{if(($.includes("tag_groups")||$.includes("tag_subgroups"))&&$.includes("p_uuid"))if($.includes("g_uuid")){d.value=`${$};`;const H=$.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);H&&(w.value=H[1]);const de=$.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);de&&(f.value=de[1].replace(/''/g,"'"))}else{u.value=`${$};`;const H=$.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);H&&(g.value=H[1]);const de=$.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);de&&(m.value=de[1].replace(/''/g,"'"))}else $.includes("tag_tags")&&b.value.push(`${$};`)})},te.readAsText(W)}Z.target.value=""}function ce(Z){const W=Z.target.files[0];if(W){const te=new FileReader;te.onload=N=>{N.target.result.split(`
`).filter($=>$.trim()).forEach($=>{const I=$.split(",");if(I.length>=2){let H,de,Ce,Ae;I.length===2?(H=I[0].trim(),Ae=I[1].trim(),de=0,Ce=0):I.length>=3&&(H=I[0].trim(),de=parseInt(I[1].trim(),10)||0,Ce=parseInt(I[2].trim(),10)||0,Ae=I.slice(3).join(",").trim(),Ae=Ae.replace(/^"(.*)"$/,"$1"));const U=H.replace(/'/g,"''"),k=Ae.replace(/'/g,"''"),j=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${U}', '', '${k}', ${Ce}, ${de});`;b.value.push(j)}})},te.readAsText(W)}Z.target.value=""}function Re(){V.value.click()}function Le(){let Z;b.value.length>0&&xe(b.value[0])?Z=[...b.value].join(`
`):Z=[u.value,d.value,...b.value].join(`
`);const W=new Blob([Z],{type:"text/sql"}),te=document.createElement("a");if(te.href=URL.createObjectURL(W),D.value.length<=0){const N=parseInt(new Date().getTime()/1e3,10);te.download=`export_${N}.sql`}else te.download=`${D.value}.sql`;te.click()}function fe(Z){const W=Z.match(/VALUES\s*\([^']*'([^']+)'/),te=Z.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:W?W[1].replace(/''/g,"'"):"",desc:te?te[1].replace(/''/g,"'"):""}}function xe(Z){return Z.includes("danbooru_tag")}function ae(Z){const W=Z.match(/VALUES\s*\(\s*'([^']+)'\s*,\s*'([^']*)'\s*,\s*'([^']*)'\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return W?{tag:W[1].replace(/''/g,"'"),color_id:W[2],translate:W[3].replace(/''/g,"'"),hot:parseInt(W[4],10),aliases:parseInt(W[5],10)}:{tag:"",color_id:"",translate:"",hot:0,aliases:0}}const J=S(0),se=S(0);function X(Z){const W=b.value[Z];if(xe(W)){const te=ae(W);E.value=te.tag,O.value=te.translate,J.value=te.hot,se.value=te.aliases}else{const te=fe(W);E.value=te.text,O.value=te.desc}T.value=Z}function ee(Z){const W=E.value.replace(/'/g,"''"),te=O.value.replace(/'/g,"''");if(xe(b.value[Z])){const N=ae(b.value[Z]),q=parseInt(J.value,10)||0,Y=parseInt(se.value,10)||0;b.value[Z]=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${W}', '${N.color_id}', '${te}', ${q}, ${Y});`}else b.value[Z]=b.value[Z].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${W}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${te}'`);T.value=-1}function Ee(){T.value=-1,E.value="",O.value="",J.value=0,se.value=0}function he(Z){b.value.splice(Z,1)}function Q(){const Z=a.value.replace(/'/g,"''"),W=s.value.replace(/'/g,"''"),te=parseInt(z.value,10)||0,N=parseInt(ie.value,10)||0,q=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${Z}', '', '${W}', ${te}, ${N});`;b.value.push(q),a.value="",s.value="",z.value=0,ie.value=0}const le=S(!1),be=async Z=>{le.value=!0;try{await ei.runSQLToServer(Z).then(W=>{W.code!==200?ue({type:"warn",str:W.message}):(we(),ue({type:"success",str:"importDialog.successImport"}))}).catch(W=>{console.error(W),ue({type:"warn",str:"importDialog.importFail"})})}catch(W){console.error(W),ue({type:"warn",str:"importDialog.importFail"})}finally{le.value=!1}},we=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},_e=async()=>{if(b.value.length>0&&xe(b.value[0])){const Z=[...b.value];await be(Z)}else if(pe.value){if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}const Z=[...b.value];await be(Z)}else{if(u.value.length<=0||d.value.length<=0){ue({type:"warn",str:"importDialog.pleaseFullRequest"});return}const Z=[u.value,d.value,...b.value];await be(Z)}};return It(u,(Z,W)=>{var q,Y;if(!Z||Z===W)return;const te=(q=Z.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:q[1],N=(Y=W==null?void 0:W.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Y[1];te&&N&&d.value&&(d.value=d.value.replace(new RegExp(`'${N}'`,"g"),`'${te}'`))}),It(d,(Z,W)=>{var q,Y;if(!Z||Z===W)return;const te=(q=Z.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:q[1],N=(Y=W==null?void 0:W.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Y[1];te&&N&&b.value.length>0&&(b.value=b.value.map($=>$.replace(new RegExp(`'${N}'`,"g"),`'${te}'`)))}),t({open:()=>{o.value=!0}}),(Z,W)=>(C(),A(qe,null,[le.value?(C(),A("div",QL,W[22]||(W[22]=[i("div",{class:"loading-spinner"},null,-1)]))):Ie("",!0),at(Gs,{modelValue:o.value,"onUpdate:modelValue":W[21]||(W[21]=te=>o.value=te),title:v(n)("danbooruManager.importBatchTitle")},{footer:Ut(()=>[i("button",{onClick:W[20]||(W[20]=te=>o.value=!1)},y(v(n)("promptBox.settings.close")),1),i("button",{onClick:_e},y(v(n)("importDialog.sure")),1)]),default:Ut(()=>[i("div",ZL,[i("div",eM,[i("button",{onClick:P,class:"upload-btn"},y(v(n)("importDialog.cleanAll")),1),i("button",{style:{"margin-left":"10px"},onClick:Le},y(v(n)("importDialog.dumpSQL")),1),Se(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":W[0]||(W[0]=te=>D.value=te),placeholder:v(n)("importDialog.settingOutputName")},null,8,tM),[[ze,D.value]]),i("input",{type:"file",ref_key:"fileInput",ref:M,onChange:re,accept:".sql",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"danbooruTxtFileInput",ref:V,onChange:ce,accept:".txt,.csv",style:{display:"none"}},null,544)]),i("div",nM,[Se(i("input",{"onUpdate:modelValue":W[1]||(W[1]=te=>a.value=te),placeholder:"Tag"},null,512),[[ze,a.value]]),Se(i("input",{"onUpdate:modelValue":W[2]||(W[2]=te=>s.value=te),placeholder:v(n)("importDialog.translater")},null,8,oM),[[ze,s.value]]),Se(i("input",{"onUpdate:modelValue":W[3]||(W[3]=te=>z.value=te),placeholder:v(n)("danbooruManager.hot"),type:"number"},null,8,aM),[[ze,z.value]]),Se(i("input",{"onUpdate:modelValue":W[4]||(W[4]=te=>ie.value=te),placeholder:v(n)("danbooruManager.aliases"),type:"number"},null,8,sM),[[ze,ie.value]]),i("button",{onClick:Q},y(v(n)("importDialog.add")),1),i("button",{style:{"margin-left":"10px"},onClick:Re,class:"upload-btn"},y(v(n)("danbooruManager.import")),1)]),i("div",iM,[u.value?(C(),A("div",rM,[i("h3",null,y(fe(u.value).text),1),d.value?(C(),A("div",lM,[i("h4",null,y(fe(d.value).text),1),i("div",uM,[(C(!0),A(qe,null,ot(b.value,(te,N)=>(C(),A("div",{key:N,style:{display:"flex","flex-direction":"column","align-items":"center"}},[xe(te)?(C(),A("p",cM,y(ae(te).tag)+" - "+y(ae(te).translate)+" ("+y(v(n)("danbooruManager.hot"))+": "+y(ae(te).hot)+", "+y(v(n)("danbooruManager.aliases"))+": "+y(ae(te).aliases)+") ",1)):(C(),A("p",dM,y(fe(te).text)+" - "+y(fe(te).desc),1)),i("div",pM,[T.value===N?(C(),A("div",fM,[xe(te)?Se((C(),A("input",{key:0,"onUpdate:modelValue":W[5]||(W[5]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]):Se((C(),A("input",{key:1,"onUpdate:modelValue":W[6]||(W[6]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]),xe(te)?Se((C(),A("input",{key:2,"onUpdate:modelValue":W[7]||(W[7]=q=>O.value=q),placeholder:v(n)("importDialog.translate")},null,8,gM)),[[ze,O.value]]):Se((C(),A("input",{key:3,"onUpdate:modelValue":W[8]||(W[8]=q=>O.value=q),placeholder:v(n)("importDialog.translater")},null,8,mM)),[[ze,O.value]]),xe(te)?Se((C(),A("input",{key:4,"onUpdate:modelValue":W[9]||(W[9]=q=>J.value=q),placeholder:v(n)("danbooruManager.hot"),type:"number"},null,8,hM)),[[ze,J.value]]):Ie("",!0),xe(a.value)?Se((C(),A("input",{key:5,"onUpdate:modelValue":W[10]||(W[10]=q=>se.value=q),placeholder:v(n)("danbooruManager.aliases"),type:"number"},null,8,vM)),[[ze,se.value]]):Ie("",!0),i("button",{onClick:q=>ee(N)},y(v(n)("importDialog.sureYes")),9,_M),i("button",{style:{"margin-left":"10px"},onClick:Ee},y(v(n)("importDialog.cancel")),1)])):(C(),A("button",{key:1,onClick:q=>X(N)},y(v(n)("importDialog.edit")),9,yM)),i("button",{style:{"margin-left":"10px"},onClick:q=>he(N)},y(v(n)("importDialog.delete")),9,bM)])]))),128))])])):Ie("",!0)])):b.value.length>0?(C(),A("div",wM,[i("h3",null,y(v(n)("danbooruManager.importTitle")),1),i("div",xM,[(C(!0),A(qe,null,ot(b.value,(te,N)=>(C(),A("div",{key:N,style:{display:"flex","flex-direction":"column","align-items":"center"}},[xe(te)?(C(),A("p",SM,y(ae(te).tag)+" - "+y(ae(te).translate)+" (热度: "+y(ae(te).hot)+", 别名: "+y(ae(te).aliases)+") ",1)):(C(),A("p",TM,y(fe(te).text)+" - "+y(fe(te).desc),1)),i("div",kM,[T.value===N?(C(),A("div",CM,[xe(te)?Se((C(),A("input",{key:0,"onUpdate:modelValue":W[11]||(W[11]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]):Se((C(),A("input",{key:1,"onUpdate:modelValue":W[12]||(W[12]=q=>E.value=q),placeholder:"Tag"},null,512)),[[ze,E.value]]),xe(te)?Se((C(),A("input",{key:2,"onUpdate:modelValue":W[13]||(W[13]=q=>O.value=q),placeholder:v(n)("importDialog.translater")},null,8,EM)),[[ze,O.value]]):Se((C(),A("input",{key:3,"onUpdate:modelValue":W[14]||(W[14]=q=>O.value=q),placeholder:v(n)("importDialog.translater")},null,8,$M)),[[ze,O.value]]),xe(te)?Se((C(),A("input",{key:4,"onUpdate:modelValue":W[15]||(W[15]=q=>J.value=q),placeholder:v(n)("danbooruManager.hot"),type:"number"},null,8,IM)),[[ze,J.value]]):Ie("",!0),xe(a.value)?Se((C(),A("input",{key:5,"onUpdate:modelValue":W[16]||(W[16]=q=>se.value=q),placeholder:v(n)("danbooruManager.aliases"),type:"number"},null,8,AM)),[[ze,se.value]]):Ie("",!0),i("button",{onClick:W[17]||(W[17]=q=>ee(Z.index))},y(v(n)("importDialog.sureYes")),1),i("button",{style:{"margin-left":"10px"},onClick:Ee},y(v(n)("importDialog.cancel")),1)])):(C(),A("button",{key:1,onClick:W[18]||(W[18]=q=>X(Z.index))},y(v(n)("importDialog.edit")),1)),i("button",{style:{"margin-left":"10px"},onClick:W[19]||(W[19]=q=>he(Z.index))},y(v(n)("importDialog.delete")),1)])]))),128))])])):Ie("",!0)])])]),_:1},8,["modelValue","title"])],64))}},[["__scopeId","data-v-422476cf"]]),MM={class:"danbooru-manager"},DM={class:"title"},OM={class:"action-bar"},RM={class:"search-box"},PM=["placeholder"],NM=["disabled"],FM={class:"pagination"},BM=["disabled"],UM={class:"page-info"},zM=["disabled"],VM={class:"page-size-control"},WM={key:0,class:"tag-list"},HM={style:{"table-layout":"fixed",overflow:"auto"}},jM={class:"checkbox-column"},GM=["checked"],qM={class:"tag-column"},YM={class:"translate-column"},KM={class:"color-column"},JM={class:"hot-column"},XM={class:"aliases-column"},QM={class:"control-column"},ZM=["value"],eD=["onClick"],tD=["onClick"],nD={key:1,class:"no-results"},oD={key:2,class:"weilin-tools-dialog"},aD={class:"weilin-tools-dialog-content"},sD={class:"form-group"},iD=["placeholder"],rD={class:"form-group"},lD=["placeholder"],uD={class:"form-group"},cD=["value"],dD={class:"form-group"},pD={key:0,class:"form-group"},fD={class:"weilin-tools-dialog-actions"},gD={key:3,class:"weilin-tools-dialog"},mD={class:"weilin-tools-dialog-content"},hD={class:"weilin-tools-dialog-actions"},vD={key:4,class:"weilin-tools-dialog"},_D={class:"weilin-tools-dialog-content"},yD={class:"weilin-tools-dialog-actions"},bD={key:5,class:"overlay"},wD=Wt({__name:"danbooru_manager",setup(e){const{t}=Yt(),n=S(""),o=S([]),a=S(1),s=S(1),r=S(100),u=S(!1),d=S(!1),m=S(!1),f=S(!1),g=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 O=null;const M=()=>{O&&clearTimeout(O),O=setTimeout(()=>{a.value=1,V()},300)},V=async()=>{u.value=!0,Le.value=[];try{const ee=await ei.searchDanbooru(n.value,a.value,r.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),ue({type:"error",str:t("message.searchFailed")}),o.value=[]}finally{u.value=!1}},pe=ee=>{ee<1||ee>s.value||(a.value=ee,V())},D=()=>{r.value<10&&(r.value=10),r.value>500&&(r.value=500),a.value=1,Le.value=[],V()},z=()=>{g.value=!1,b.value={tag:"",translate:"",color_id:0,hot:0,aliases:0},d.value=!0},ie=ee=>{g.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},P=()=>{d.value=!1},re=async()=>{if(!b.value.tag){ue({type:"error",str:t("tagManager.textRequired")});return}try{if(g.value){const ee=await ei.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?(ue({type:"success",str:t("message.editSuccess")}),V()):ue({type:"error",str:t("message.editFailed")})}else{const ee=await ei.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?(ue({type:"success",str:t("message.addSuccess")}),V()):ue({type:"error",str:t("message.addFailed")})}P()}catch(ee){console.error("提交表单失败:",ee),ue({type:"error",str:g.value?t("message.editFailed"):t("message.addFailed")})}},ce=ee=>{w.value=ee,m.value=!0},Re=async()=>{if(!(!w.value||!w.value.id_index))try{const ee=await ei.deleteDanbooruTag(w.value.id_index);ee&&ee.code===200?(ue({type:"success",str:t("message.deleteSuccess")}),V()):ue({type:"error",str:t("message.deleteFailed")}),m.value=!1}catch(ee){console.error("删除标签失败:",ee),ue({type:"error",str:t("message.deleteFailed")})}},Le=S([]),fe=Bt(()=>o.value.length>0&&Le.value.length===o.value.length),xe=()=>{fe.value?Le.value=[]:Le.value=o.value.map(ee=>ee.id_index)},ae=()=>{Le.value.length!==0&&(f.value=!0)},J=async()=>{if(Le.value.length!==0){try{const ee=await ei.batchDeleteDanbooruTags(Le.value);ee&&ee.code===200?(ue({type:"success",str:`成功删除 ${Le.value.length} 个标签`}),Le.value=[],V()):ue({type:"error",str:"批量删除失败"})}catch(ee){console.error("批量删除失败:",ee),ue({type:"error",str:"批量删除失败"})}f.value=!1}},se=S(),X=()=>{se.value.open()};return jt(()=>{V()}),(ee,Ee)=>{var he;return C(),A("div",MM,[i("h2",DM,y(v(t)("danbooruManager.title")),1),i("div",OM,[i("div",RM,[Se(i("input",{"onUpdate:modelValue":Ee[0]||(Ee[0]=Q=>n.value=Q),type:"text",placeholder:v(t)("danbooruManager.searchPlaceholder"),onInput:M},null,40,PM),[[ze,n.value]]),i("button",{class:"search-btn",onClick:V},y(v(t)("tagManager.search")),1)]),i("button",{class:"add-btn",onClick:z},y(v(t)("danbooruManager.add")),1),i("button",{class:"add-btn",onClick:X},y(v(t)("tagManager.importDanbooru")),1),i("button",{class:We(["batch-delete-btn",{disabled:Le.value.length===0}]),disabled:Le.value.length===0,onClick:ae},y(v(t)("tagManager.hasDeleteAction"))+" ("+y(Le.value.length)+") ",11,NM)]),i("div",FM,[i("button",{disabled:a.value<=1,onClick:Ee[1]||(Ee[1]=Q=>pe(a.value-1)),class:"page-btn"},y(v(t)("loraManager.prevPage")),9,BM),i("span",UM,y(a.value)+" / "+y(s.value),1),i("button",{disabled:a.value>=s.value,onClick:Ee[2]||(Ee[2]=Q=>pe(a.value+1)),class:"page-btn"},y(v(t)("loraManager.nextPage")),9,zM),i("div",VM,[i("label",null,y(v(t)("danbooruManager.pageShow")),1),Se(i("input",{"onUpdate:modelValue":Ee[3]||(Ee[3]=Q=>r.value=Q),type:"number",min:"10",max:"500",onChange:D,class:"page-size-input"},null,544),[[ze,r.value,void 0,{number:!0}]]),i("span",null,y(v(t)("danbooruManager.pageLimit")),1)])]),o.value.length>0?(C(),A("div",WM,[i("table",HM,[i("thead",null,[i("tr",null,[i("th",jM,[i("input",{type:"checkbox",checked:fe.value,onChange:xe},null,40,GM)]),Ee[12]||(Ee[12]=i("th",{class:"id-column"},"ID",-1)),i("th",qM,y(v(t)("tagManager.description")),1),i("th",YM,y(v(t)("promptBox.translate")),1),i("th",KM,y(v(t)("tagManager.backgroundColor")),1),i("th",JM,y(v(t)("danbooruManager.hot")),1),i("th",XM,y(v(t)("danbooruManager.aliases")),1),i("th",QM,y(v(t)("danbooruManager.controle")),1)])]),i("tbody",null,[(C(!0),A(qe,null,ot(o.value,Q=>(C(),A("tr",{key:Q.id_index},[i("td",null,[Se(i("input",{type:"checkbox",value:Q.id_index,"onUpdate:modelValue":Ee[4]||(Ee[4]=le=>Le.value=le)},null,8,ZM),[[on,Le.value]])]),i("td",null,y(Q.id_index),1),i("td",null,y(Q.tag),1),i("td",null,y(Q.translate),1),i("td",null,[i("div",{class:"color-box",style:Ft({backgroundColor:E(Q.color_id)})},null,4)]),i("td",null,y(Q.hot),1),i("td",null,y(Q.aliases),1),i("td",null,[i("button",{class:"edit-btn",onClick:le=>ie(Q)},y(v(t)("common.edit")),9,eD),i("button",{style:{"margin-left":"10px"},class:"delete-btn",onClick:le=>ce(Q)},y(v(t)("common.delete")),9,tD)])]))),128))])])])):(C(),A("div",nD,y(v(t)("tagManager.noResults")),1)),d.value?(C(),A("div",oD,[i("div",aD,[i("h3",null,y(g.value?v(t)("danbooruManager.edit"):v(t)("danbooruManager.add")),1),i("div",sD,[i("label",null,y(v(t)("tagManager.description")),1),Se(i("input",{"onUpdate:modelValue":Ee[5]||(Ee[5]=Q=>b.value.tag=Q),type:"text",placeholder:v(t)("tagManager.descriptionPlaceholder")},null,8,iD),[[ze,b.value.tag]])]),i("div",rD,[i("label",null,y(v(t)("promptBox.translate")),1),Se(i("input",{"onUpdate:modelValue":Ee[6]||(Ee[6]=Q=>b.value.translate=Q),type:"text",placeholder:v(t)("danbooruManager.translatePlaceholder")},null,8,lD),[[ze,b.value.translate]])]),i("div",uD,[i("label",null,y(v(t)("tagManager.backgroundColor")),1),Se(i("select",{"onUpdate:modelValue":Ee[7]||(Ee[7]=Q=>b.value.color_id=Q)},[(C(),A(qe,null,ot(T,(Q,le)=>i("option",{key:le,value:le},y(Q.name),9,cD)),64))],512),[[an,b.value.color_id]]),i("div",{class:"color-preview",style:Ft({backgroundColor:E(b.value.color_id)})},null,4)]),i("div",dD,[Ee[13]||(Ee[13]=i("label",null,"Hot",-1)),Se(i("input",{"onUpdate:modelValue":Ee[8]||(Ee[8]=Q=>b.value.hot=Q),type:"number",min:"0"},null,512),[[ze,b.value.hot,void 0,{number:!0}]])]),g.value?Ie("",!0):(C(),A("div",pD,[Ee[14]||(Ee[14]=i("label",null,"Aliases",-1)),Se(i("input",{"onUpdate:modelValue":Ee[9]||(Ee[9]=Q=>b.value.aliases=Q),type:"number",min:"0"},null,512),[[ze,b.value.aliases,void 0,{number:!0}]])])),i("div",fD,[i("button",{onClick:P},y(v(t)("common.cancel")),1),i("button",{onClick:re},y(v(t)("common.save")),1)])])])):Ie("",!0),m.value?(C(),A("div",gD,[i("div",mD,[i("h3",null,y(v(t)("common.confirmDelete")),1),i("p",null,y(v(t)("tagManager.deleteTagConfirm",{name:((he=w.value)==null?void 0:he.tag)||""})),1),i("div",hD,[i("button",{onClick:Ee[10]||(Ee[10]=Q=>m.value=!1)},y(v(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:Re},y(v(t)("common.delete")),1)])])])):Ie("",!0),f.value?(C(),A("div",vD,[i("div",_D,[i("h3",null,y(v(t)("danbooruManager.sureBatchDelete")),1),i("p",null,y(v(t)("danbooruManager.sureBatchDeleteTips1"))+" "+y(Le.value.length)+" "+y(v(t)("danbooruManager.sureBatchDeleteTips2")),1),i("div",yD,[i("button",{onClick:Ee[11]||(Ee[11]=Q=>f.value=!1)},y(v(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:J},y(v(t)("danbooruManager.sureDelete")),1)])])])):Ie("",!0),d.value||m.value||f.value?(C(),A("div",bD)):Ie("",!0),at(LM,{ref_key:"importDanbooruDialog",ref:se},null,512)])}}},[["__scopeId","data-v-cbcf8313"]]),xD={id:"weilin_comfyui_tools_prompt_ui_container_main"},SD={key:10,class:"version-update-notification"},TD={class:"version-update-content"},ti="weilin_tools_",kD=Wt({__name:"App",setup(e){const{t}=Yt(),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"),r=S("prompt_global"),u=S(!1),d=`${ti}theme`,m=S(localStorage.getItem(d)==="dark"),f=S(""),g=S(!1),w=S(""),b=S(null),T=`${ti}version_update_remind`,E=()=>{g.value=!1,b.value&&(clearTimeout(b.value),b.value=null)},O=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank"),E()},M=()=>{localStorage.setItem(T,"false"),E()},V={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 he=localStorage.getItem(`${ti}windowStates`);if(he){const Q=JSON.parse(he),le={...V};return Object.keys(Q).forEach(be=>{be in le&&(le[be]={...V[be],...Q[be],visible:Q[be].is_default_close?!1:Q[be].visible})}),le}}catch(he){console.error("Error loading window states:",he)}return{...V}},D=S(pe());let z=null;It(D,he=>{z&&clearTimeout(z),z=setTimeout(()=>{try{localStorage.setItem(`${ti}windowStates`,JSON.stringify(he))}catch(Q){console.error("Error saving window states:",Q)}z=null},500)},{deep:!0}),jt(()=>{Object.keys(D.value).forEach(he=>{st.registerWindow(he)}),ie(),window.addEventListener("message",ee),Ee()});const ie=()=>{let he=localStorage.getItem(d);he||(localStorage.setItem(d,"dark"),he="dark",m.value=!0),m.value=he==="dark";const Q=document.getElementById("weilin_comfyui_tools_prompt_ui_div");Q&&Q.setAttribute("data-theme",m.value?"dark":"light")};po(()=>{Object.keys(D.value).forEach(he=>{st.unregisterWindow(he)}),window.removeEventListener("message",ee),b.value&&(clearTimeout(b.value),b.value=null)});const P=he=>{he==="prompt"&&(o.value=""),D.value[he].visible=!1},re=(he,Q)=>{D.value[he]&&(D.value[he].position={...Q})},ce=(he,Q)=>{D.value[he]&&(D.value[he].size={...Q})},Re=()=>{const he={loraDetail:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}}},Q={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(`${ti}windowStates`,JSON.stringify(Q)),localStorage.setItem(`${ti}loraDetailState`,JSON.stringify(he)),D.value=pe()};(()=>{so.getTranslateSetting().then(he=>{localStorage.setItem("weilin_prompt_ui_translater_setting",he.data)}).catch(()=>{ue({type:"warn",str:"message.getTranslaterFail"})})})();const fe=S(),xe=S(),ae=S(),J=S(),se=S(),X=(he,Q,le=50)=>{let be=0;const we=()=>{be++,he.value?Q(he.value):be<le?wt(we):console.warn("[WeiLin] Ref not ready after",le,"attempts")};wt(we)},ee=he=>{!he.data||!he.data.type||he.data.type.startsWith("weilin_prompt_ui_")&&(he.data.type==="weilin_prompt_ui_openTagManager"?(s.value="manager",D.value.tag.visible=!0,st.setActiveWindow("tag")):he.data.type==="weilin_prompt_ui_openTagManager_prompt"?(s.value="prompt",D.value.tag.visible=!0,st.setActiveWindow("tag")):he.data.type==="weilin_prompt_ui_openPromptBox"?(o.value=he.data.id,r.value="prompt",D.value.prompt.visible=!0,u.value=!1,he.data.node==="WeiLinPromptUI"&&(u.value=!0),X(fe,Q=>{Q.setPromptText(he.data.prompt),Q.setCurrentEditNodeId(he.data.id)}),st.setActiveWindow("prompt")):he.data.type==="weilin_prompt_ui_openLoraManager"?(a.value="look",D.value.lora.visible=!0,st.setActiveWindow("lora")):he.data.type==="weilin_prompt_ui_openLoraManager_addLora"?(a.value="addLora",D.value.lora.visible=!0,X(ae,Q=>{Q.openSetSeed(0,"")}),st.setActiveWindow("lora")):he.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack"?(a.value="addLora",D.value.lora.visible=!0,X(ae,Q=>{Q.openSetSeed(1,he.data.seed)}),st.setActiveWindow("lora")):he.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack_node"?(a.value="addLora",D.value.lora.visible=!0,X(ae,Q=>{Q.openSetSeed(2,he.data.seed)}),st.setActiveWindow("lora")):he.data.type==="weilin_prompt_ui_openHistoryManager"?(D.value.history.visible=!0,st.setActiveWindow("history")):he.data.type==="weilin_prompt_ui_openAiWindow"?(D.value.ai_window.visible=!0,st.setActiveWindow("ai_window")):he.data.type==="weilin_prompt_ui_open_node_list_window"?(D.value.node_list_window.visible=!0,st.setActiveWindow("node_list_window")):he.data.type==="weilin_prompt_ui_prompt_finish_prompt"?window.postMessage({type:`weilin_prompt_ui_prompt_update_prompt_${o.value}`,data:he.data.data},"*"):he.data.type==="weilin_prompt_ui_open_global_prompt_box"?(r.value="prompt_global",o.value="global",D.value.prompt.visible=!0,u.value=!1,X(fe,Q=>{Q.setPromptText(f.value)}),st.setActiveWindow("prompt")):he.data.type==="weilin_prompt_ui_open_global_tag_manager"?(s.value="manager",D.value.tag.visible=!0,st.setActiveWindow("tag")):he.data.type==="weilin_prompt_ui_open_global_lora_manager"?(a.value="look",D.value.lora.visible=!0,st.setActiveWindow("lora")):he.data.type==="weilin_prompt_ui_prompt_update_prompt_global"?f.value=he.data.data:he.data.type==="weilin_prompt_ui_floating_ball_setting"?n.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true":he.data.type==="weilin_prompt_ui_restore_window"?Re():he.data.type==="weilin_prompt_ui_open_cloud_window"?(D.value.cloud_window.visible=!0,st.setActiveWindow("cloud_window")):he.data.type==="weilin_prompt_ui_open_prompt_lora_stack_window"?(D.value.lora_stack_window.visible=!0,X(xe,Q=>{Q.initLoraStack(he.data.prompt,he.data.seed)}),st.setActiveWindow("lora_stack_window")):he.data.type==="weilin_prompt_ui_open_node_lora_stack_window"?(D.value.lora_stack_window.visible=!0,X(xe,Q=>{Q.initLoraStack(he.data.prompt,he.data.seed)}),st.setActiveWindow("lora_stack_window")):he.data.type==="weilin_prompt_ui_openLoraDetail"?X(J,Q=>{Q.open({name:he.data.lora})}):he.data.type==="weilin_prompt_ui_open_danbooru_manager_window"?(D.value.danbooru_manager_window.visible=!0,st.setActiveWindow("danbooru_manager_window")):he.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id"?window.postMessage({type:`weilin_prompt_ui_get_template_${o.value}`,data:he.data.data},"*"):he.data.type==="weilin_prompt_ui_get_template_response"?o.value===he.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response",data:he.data.data},"*"):he.data.type==="weilin_prompt_ui_prompt_inner_update_node_tag_template_id"?window.postMessage({type:`weilin_prompt_ui_update_template_${o.value}`,data:he.data.data},"*"):he.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:he.data.data},"*"):he.data.type==="weilin_prompt_ui_get_template_go_random_response"&&o.value===he.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response",data:he.data.data},"*"))},Ee=async()=>{try{if(localStorage.getItem(T)==="false"){console.info("WeiLin-Comfyui-Tools 版本更新提醒已禁用");return}const Q=await fetch("https://raw.githubusercontent.com/weilin9999/WeiLin-Comfyui-Tools/refs/heads/main/src/src/utils/version.js");if(!Q.ok){console.error("获取版本信息失败:",Q.status);return}const be=(await Q.text()).match(/export const version = "([^"]+)"/);if(be&&be[1]){const we=be[1];console.info(`WeiLin-Comfyui-Tools GitHub版本: ${we}`),we!==va&&(w.value=`WeiLin-Comfyui-Tools 发现新版本 ${we},当前版本 ${va}`,g.value=!0,b.value&&clearTimeout(b.value),b.value=setTimeout(()=>{g.value=!1,b.value=null},1e4),console.info(`WeiLin-Comfyui-Tools 发现新版本 ${we},当前版本 ${va} GitHub链接:https://github.com/weilin9999/WeiLin-Comfyui-Tools`))}}catch(he){console.error("WeiLin-Comfyui-Tools 检查更新失败:",he)}};return(he,Q)=>(C(),A("div",xD,[D.value.prompt.visible?(C(),Qt(mo,{key:0,name:"promptBox",title:r.value==="prompt"?v(t)("promptBox.windowTitle"):v(t)("promptBox.windowTitleGlobal"),position:D.value.prompt.position,size:D.value.prompt.size,"z-index":v(st).getZIndex("prompt"),"onUpdate:position":Q[0]||(Q[0]=le=>re("prompt",le)),"onUpdate:size":Q[1]||(Q[1]=le=>ce("prompt",le)),onActive:Q[2]||(Q[2]=le=>v(st).setActiveWindow("prompt")),onClose:Q[3]||(Q[3]=le=>P("prompt"))},{default:Ut(()=>[at(HI,{promptManager:r.value,hasPromptLoraStack:u.value,ref_key:"promptBoxRef",ref:fe},null,8,["promptManager","hasPromptLoraStack"])]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.tag.visible?(C(),Qt(mo,{key:1,name:"tagManager",title:v(t)("tagManager.windowTitle"),position:D.value.tag.position,size:D.value.tag.size,"z-index":v(st).getZIndex("tag"),"onUpdate:position":Q[4]||(Q[4]=le=>re("tag",le)),"onUpdate:size":Q[5]||(Q[5]=le=>ce("tag",le)),onActive:Q[6]||(Q[6]=le=>v(st).setActiveWindow("tag")),onClose:Q[7]||(Q[7]=le=>P("tag"))},{default:Ut(()=>[at(lh,{tagManager:s.value},null,8,["tagManager"])]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.lora.visible?(C(),Qt(mo,{key:2,name:"loraManager",title:v(t)("loraManager.windowTitle"),position:D.value.lora.position,size:D.value.lora.size,"z-index":v(st).getZIndex("lora"),"onUpdate:position":Q[8]||(Q[8]=le=>re("lora",le)),"onUpdate:size":Q[9]||(Q[9]=le=>ce("lora",le)),onActive:Q[10]||(Q[10]=le=>v(st).setActiveWindow("lora")),onClose:Q[11]||(Q[11]=le=>P("lora"))},{default:Ut(()=>[at(Sh,{loraManager:a.value,ref_key:"loraManagerRef",ref:ae},null,8,["loraManager"])]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.history.visible?(C(),Qt(mo,{key:3,name:"historyManager",title:v(t)("history.windowTitle"),position:D.value.history.position,size:D.value.history.size,"z-index":v(st).getZIndex("history"),"onUpdate:position":Q[12]||(Q[12]=le=>re("history",le)),"onUpdate:size":Q[13]||(Q[13]=le=>ce("history",le)),onActive:Q[14]||(Q[14]=le=>v(st).setActiveWindow("history")),onClose:Q[15]||(Q[15]=le=>P("history"))},{default:Ut(()=>[at(NA)]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.ai_window.visible?(C(),Qt(mo,{key:4,name:"aiWindow",title:v(t)("aiWindow.windowTitle"),position:D.value.ai_window.position,size:D.value.ai_window.size,"z-index":v(st).getZIndex("ai_window"),"onUpdate:position":Q[16]||(Q[16]=le=>re("ai_window",le)),"onUpdate:size":Q[17]||(Q[17]=le=>ce("ai_window",le)),onActive:Q[18]||(Q[18]=le=>v(st).setActiveWindow("ai_window")),onClose:Q[19]||(Q[19]=le=>P("ai_window"))},{default:Ut(()=>[at(lL)]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.node_list_window.visible?(C(),Qt(mo,{key:5,name:"nodeListWindow",title:v(t)("nodeListWindow.windowTitle"),position:D.value.node_list_window.position,size:D.value.node_list_window.size,"z-index":v(st).getZIndex("node_list_window"),"onUpdate:position":Q[20]||(Q[20]=le=>re("node_list_window",le)),"onUpdate:size":Q[21]||(Q[21]=le=>ce("node_list_window",le)),onActive:Q[22]||(Q[22]=le=>v(st).setActiveWindow("node_list_window")),onClose:Q[23]||(Q[23]=le=>P("node_list_window"))},{default:Ut(()=>[at(_L)]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.cloud_window.visible?(C(),Qt(mo,{key:6,name:"cloudWindow",title:v(t)("cloudWindow.windowTitle"),position:D.value.cloud_window.position,size:D.value.cloud_window.size,"z-index":v(st).getZIndex("cloud_window"),"onUpdate:position":Q[24]||(Q[24]=le=>re("cloud_window",le)),"onUpdate:size":Q[25]||(Q[25]=le=>ce("cloud_window",le)),onActive:Q[26]||(Q[26]=le=>v(st).setActiveWindow("cloud_window")),onClose:Q[27]||(Q[27]=le=>P("cloud_window"))},{default:Ut(()=>[at(LL)]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.lora_stack_window.visible?(C(),Qt(mo,{key:7,name:"loraStackWindow",title:v(t)("controls.loraStack"),position:D.value.lora_stack_window.position,size:D.value.lora_stack_window.size,"z-index":v(st).getZIndex("lora_stack_window"),"onUpdate:position":Q[28]||(Q[28]=le=>re("lora_stack_window",le)),"onUpdate:size":Q[29]||(Q[29]=le=>ce("lora_stack_window",le)),onActive:Q[30]||(Q[30]=le=>v(st).setActiveWindow("lora_stack_window")),onClose:Q[31]||(Q[31]=le=>P("lora_stack_window"))},{default:Ut(()=>[at(XL,{ref_key:"loraStackRef",ref:xe},null,512)]),_:1},8,["title","position","size","z-index"])):Ie("",!0),D.value.danbooru_manager_window.visible?(C(),Qt(mo,{key:8,name:"DanbooruManagerWindow",title:v(t)("controls.danbooruManager"),position:D.value.danbooru_manager_window.position,size:D.value.danbooru_manager_window.size,"z-index":v(st).getZIndex("danbooru_manager_window"),"onUpdate:position":Q[32]||(Q[32]=le=>re("danbooru_manager_window",le)),"onUpdate:size":Q[33]||(Q[33]=le=>ce("danbooru_manager_window",le)),onActive:Q[34]||(Q[34]=le=>v(st).setActiveWindow("danbooru_manager_window")),onClose:Q[35]||(Q[35]=le=>P("danbooru_manager_window"))},{default:Ut(()=>[at(wD,{ref_key:"danbooruManagerRef",ref:se},null,512)]),_:1},8,["title","position","size","z-index"])):Ie("",!0),n.value?(C(),Qt(HA,{key:9})):Ie("",!0),at(El,{ref_key:"loraDetailLoraStackRef",ref:J},null,512),g.value?(C(),A("div",SD,[i("div",TD,[i("span",null,y(w.value),1),i("div",{class:"version-update-actions"},[i("button",{class:"goto-github-btn",onClick:O},"前往GitHub"),i("button",{class:"no-remind-btn",onClick:M},"不再提醒"),i("button",{class:"close-version-update",onClick:E},"×")])])])):Ie("",!0)]))}},[["__scopeId","data-v-1af60f9a"]]);var Il={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var CD=Il.exports,Ih;function ED(){return Ih||(Ih=1,function(e,t){(function(o,a){e.exports=a()})(CD,function(){return function(){var n={686:function(s,r,u){u.d(r,{default:function(){return Q}});var d=u(279),m=u.n(d),f=u(370),g=u.n(f),w=u(817),b=u.n(w);function T(le){try{return document.execCommand(le)}catch{return!1}}var E=function(be){var we=b()(be);return T("cut"),we},O=E;function M(le){var be=document.documentElement.getAttribute("dir")==="rtl",we=document.createElement("textarea");we.style.fontSize="12pt",we.style.border="0",we.style.padding="0",we.style.margin="0",we.style.position="absolute",we.style[be?"right":"left"]="-9999px";var _e=window.pageYOffset||document.documentElement.scrollTop;return we.style.top="".concat(_e,"px"),we.setAttribute("readonly",""),we.value=le,we}var V=function(be,we){var _e=M(be);we.container.appendChild(_e);var Z=b()(_e);return T("copy"),_e.remove(),Z},pe=function(be){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},_e="";return typeof be=="string"?_e=V(be,we):be instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(be==null?void 0:be.type)?_e=V(be.value,we):(_e=b()(be),T("copy")),_e},D=pe;function z(le){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?z=function(we){return typeof we}:z=function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},z(le)}var ie=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},we=be.action,_e=we===void 0?"copy":we,Z=be.container,W=be.target,te=be.text;if(_e!=="copy"&&_e!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(W!==void 0)if(W&&z(W)==="object"&&W.nodeType===1){if(_e==="copy"&&W.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(_e==="cut"&&(W.hasAttribute("readonly")||W.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(te)return D(te,{container:Z});if(W)return _e==="cut"?O(W):D(W,{container:Z})},P=ie;function re(le){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?re=function(we){return typeof we}:re=function(we){return we&&typeof Symbol=="function"&&we.constructor===Symbol&&we!==Symbol.prototype?"symbol":typeof we},re(le)}function ce(le,be){if(!(le instanceof be))throw new TypeError("Cannot call a class as a function")}function Re(le,be){for(var we=0;we<be.length;we++){var _e=be[we];_e.enumerable=_e.enumerable||!1,_e.configurable=!0,"value"in _e&&(_e.writable=!0),Object.defineProperty(le,_e.key,_e)}}function Le(le,be,we){return be&&Re(le.prototype,be),we&&Re(le,we),le}function fe(le,be){if(typeof be!="function"&&be!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(be&&be.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),be&&xe(le,be)}function xe(le,be){return xe=Object.setPrototypeOf||function(_e,Z){return _e.__proto__=Z,_e},xe(le,be)}function ae(le){var be=X();return function(){var _e=ee(le),Z;if(be){var W=ee(this).constructor;Z=Reflect.construct(_e,arguments,W)}else Z=_e.apply(this,arguments);return J(this,Z)}}function J(le,be){return be&&(re(be)==="object"||typeof be=="function")?be:se(le)}function se(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}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(le){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(we){return we.__proto__||Object.getPrototypeOf(we)},ee(le)}function Ee(le,be){var we="data-clipboard-".concat(le);if(be.hasAttribute(we))return be.getAttribute(we)}var he=function(le){fe(we,le);var be=ae(we);function we(_e,Z){var W;return ce(this,we),W=be.call(this),W.resolveOptions(Z),W.listenClick(_e),W}return Le(we,[{key:"resolveOptions",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Z.action=="function"?Z.action:this.defaultAction,this.target=typeof Z.target=="function"?Z.target:this.defaultTarget,this.text=typeof Z.text=="function"?Z.text:this.defaultText,this.container=re(Z.container)==="object"?Z.container:document.body}},{key:"listenClick",value:function(Z){var W=this;this.listener=g()(Z,"click",function(te){return W.onClick(te)})}},{key:"onClick",value:function(Z){var W=Z.delegateTarget||Z.currentTarget,te=this.action(W)||"copy",N=P({action:te,container:this.container,target:this.target(W),text:this.text(W)});this.emit(N?"success":"error",{action:te,text:N,trigger:W,clearSelection:function(){W&&W.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Z){return Ee("action",Z)}},{key:"defaultTarget",value:function(Z){var W=Ee("target",Z);if(W)return document.querySelector(W)}},{key:"defaultText",value:function(Z){return Ee("text",Z)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Z){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return D(Z,W)}},{key:"cut",value:function(Z){return O(Z)}},{key:"isSupported",value:function(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],W=typeof Z=="string"?[Z]:Z,te=!!document.queryCommandSupported;return W.forEach(function(N){te=te&&!!document.queryCommandSupported(N)}),te}}]),we}(m()),Q=he},828:function(s){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var u=Element.prototype;u.matches=u.matchesSelector||u.mozMatchesSelector||u.msMatchesSelector||u.oMatchesSelector||u.webkitMatchesSelector}function d(m,f){for(;m&&m.nodeType!==r;){if(typeof m.matches=="function"&&m.matches(f))return m;m=m.parentNode}}s.exports=d},438:function(s,r,u){var d=u(828);function m(w,b,T,E,O){var M=g.apply(this,arguments);return w.addEventListener(T,M,O),{destroy:function(){w.removeEventListener(T,M,O)}}}function f(w,b,T,E,O){return typeof w.addEventListener=="function"?m.apply(null,arguments):typeof T=="function"?m.bind(null,document).apply(null,arguments):(typeof w=="string"&&(w=document.querySelectorAll(w)),Array.prototype.map.call(w,function(M){return m(M,b,T,E,O)}))}function g(w,b,T,E){return function(O){O.delegateTarget=d(O.target,b),O.delegateTarget&&E.call(w,O)}}s.exports=f},879:function(s,r){r.node=function(u){return u!==void 0&&u instanceof HTMLElement&&u.nodeType===1},r.nodeList=function(u){var d=Object.prototype.toString.call(u);return u!==void 0&&(d==="[object NodeList]"||d==="[object HTMLCollection]")&&"length"in u&&(u.length===0||r.node(u[0]))},r.string=function(u){return typeof u=="string"||u instanceof String},r.fn=function(u){var d=Object.prototype.toString.call(u);return d==="[object Function]"}},370:function(s,r,u){var d=u(879),m=u(438);function f(T,E,O){if(!T&&!E&&!O)throw new Error("Missing required arguments");if(!d.string(E))throw new TypeError("Second argument must be a String");if(!d.fn(O))throw new TypeError("Third argument must be a Function");if(d.node(T))return g(T,E,O);if(d.nodeList(T))return w(T,E,O);if(d.string(T))return b(T,E,O);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function g(T,E,O){return T.addEventListener(E,O),{destroy:function(){T.removeEventListener(E,O)}}}function w(T,E,O){return Array.prototype.forEach.call(T,function(M){M.addEventListener(E,O)}),{destroy:function(){Array.prototype.forEach.call(T,function(M){M.removeEventListener(E,O)})}}}function b(T,E,O){return m(document.body,T,E,O)}s.exports=f},817:function(s){function r(u){var d;if(u.nodeName==="SELECT")u.focus(),d=u.value;else if(u.nodeName==="INPUT"||u.nodeName==="TEXTAREA"){var m=u.hasAttribute("readonly");m||u.setAttribute("readonly",""),u.select(),u.setSelectionRange(0,u.value.length),m||u.removeAttribute("readonly"),d=u.value}else{u.hasAttribute("contenteditable")&&u.focus();var f=window.getSelection(),g=document.createRange();g.selectNodeContents(u),f.removeAllRanges(),f.addRange(g),d=f.toString()}return d}s.exports=r},279:function(s){function r(){}r.prototype={on:function(u,d,m){var f=this.e||(this.e={});return(f[u]||(f[u]=[])).push({fn:d,ctx:m}),this},once:function(u,d,m){var f=this;function g(){f.off(u,g),d.apply(m,arguments)}return g._=d,this.on(u,g,m)},emit:function(u){var d=[].slice.call(arguments,1),m=((this.e||(this.e={}))[u]||[]).slice(),f=0,g=m.length;for(f;f<g;f++)m[f].fn.apply(m[f].ctx,d);return this},off:function(u,d){var m=this.e||(this.e={}),f=m[u],g=[];if(f&&d)for(var w=0,b=f.length;w<b;w++)f[w].fn!==d&&f[w].fn._!==d&&g.push(f[w]);return g.length?m[u]=g:delete m[u],this}},s.exports=r,s.exports.TinyEmitter=r}},o={};function a(s){if(o[s])return o[s].exports;var r=o[s]={exports:{}};return n[s](r,r.exports,a),r.exports}return function(){a.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(r,{a:r}),r}}(),function(){a.d=function(s,r){for(var u in r)a.o(r,u)&&!a.o(s,u)&&Object.defineProperty(s,u,{enumerable:!0,get:r[u]})}}(),function(){a.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)}}(),a(686)}().default})}(Il)),Il.exports}var $D=ED();const ID=cg($D),AD=e=>({toClipboard(t,n){return new Promise((o,a)=>{const s=document.createElement("button"),r=new ID(s,{text:()=>t,action:()=>"copy",container:n!==void 0?n:document.body});r.on("success",u=>{r.destroy(),o(u)}),r.on("error",u=>{r.destroy(),a(u)}),document.body.appendChild(s),s.click(),document.body.removeChild(s)})}}),LD=/"(?:_|\\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*:/,MD=/"(?: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*:/,DD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function OD(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){RD(e);return}return t}function RD(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function PD(e,t={}){if(typeof e!="string")return e;const n=e.trim();if(e[0]==='"'&&e.endsWith('"')&&!e.includes("\\"))return n.slice(1,-1);if(n.length<=9){const o=n.toLowerCase();if(o==="true")return!0;if(o==="false")return!1;if(o==="undefined")return;if(o==="null")return null;if(o==="nan")return Number.NaN;if(o==="infinity")return Number.POSITIVE_INFINITY;if(o==="-infinity")return Number.NEGATIVE_INFINITY}if(!DD.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(LD.test(e)||MD.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,OD)}return JSON.parse(e)}catch(o){if(t.strict)throw o;return e}}function ND(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 Bc(e,t,n){if(n.length===0)return t;const o=n[0];return n.length>1&&(t=Bc(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 Ah(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 Bc(e,Ah(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function Lh(e,t){return t.map(n=>n.split(".")).map(n=>[n,ND(e,n)]).filter(n=>n[1]!==void 0).reduce((n,o)=>Bc(n,o[1],o[0]),{})}function Mh(e,t){return t.map(n=>n.split(".")).reduce((n,o)=>Ah(n,o),e)}function Dh(e,{storage:t,serializer:n,key:o,debug:a,pick:s,omit:r,beforeHydrate:u,afterHydrate:d},m,f=!0){try{f&&(u==null||u(m));const g=t.getItem(o);if(g){const w=n.deserialize(g),b=s?Lh(w,s):w,T=r?Mh(b,r):b;e.$patch(T)}f&&(d==null||d(m))}catch(g){a&&console.error("[pinia-plugin-persistedstate]",g)}}function Oh(e,{storage:t,serializer:n,key:o,debug:a,pick:s,omit:r}){try{const u=s?Lh(e,s):e,d=r?Mh(u,r):u,m=n.serialize(d);t.setItem(o,m)}catch(u){a&&console.error("[pinia-plugin-persistedstate]",u)}}function FD(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 u=(Array.isArray(s)?s:s===!0?[{}]:[s]).map(t);a.$hydrate=({runHooks:d=!0}={})=>{u.forEach(m=>{Dh(a,m,e,d)})},a.$persist=()=>{u.forEach(d=>{Oh(a.$state,d)})},u.forEach(d=>{Dh(a,d,e),a.$subscribe((m,f)=>Oh(f,d),{detached:!0})})}function BD(e={}){return function(t){FD(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=>PD(o)},storage:n.storage??e.storage??window.localStorage,beforeHydrate:n.beforeHydrate,afterHydrate:n.afterHydrate,pick:n.pick,omit:n.omit}),e.auto??!1)}}var UD=BD();const{toClipboard:zD}=AD(),Uc=document.createElement("div");Uc.id="weilin_comfyui_tools_prompt_ui_div",document.querySelector("body").appendChild(Uc);const Rh=M2();Rh.use(UD);const Al=m_(kD);Al.use(Rh),Al.use(Ki),cb(),Al.config.globalProperties.$copyText=zD,Al.mount(Uc),console.log(`WeiLin Prompt UI is running - version ${va}`),console.log(`WeiLin 节点插件已运行 - 版本 ${va}`);const VD=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"}})}),WD={childList:!0,subtree:!0};VD.observe(document.body,WD)});
//# sourceMappingURL=main.entry.js.map