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

256 lines
676 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(Zo){typeof define=="function"&&define.amd?define(Zo):Zo()})((function(){"use strict";/**
* @vue/shared v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Zo(e){const t=Object.create(null);for(const o of e.split(","))t[o]=1;return o=>o in t}const mt={},ea=[],Un=()=>{},Zi=()=>!1,xs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Xr=e=>e.startsWith("onUpdate:"),Wt=Object.assign,Zr=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},Pg=Object.prototype.hasOwnProperty,it=(e,t)=>Pg.call(e,t),He=Array.isArray,ta=e=>Aa(e)==="[object Map]",na=e=>Aa(e)==="[object Set]",eu=e=>Aa(e)==="[object Date]",ze=e=>typeof e=="function",$t=e=>typeof e=="string",An=e=>typeof e=="symbol",vt=e=>e!==null&&typeof e=="object",tu=e=>(vt(e)||ze(e))&&ze(e.then)&&ze(e.catch),nu=Object.prototype.toString,Aa=e=>nu.call(e),Fg=e=>Aa(e).slice(8,-1),ou=e=>Aa(e)==="[object Object]",el=e=>$t(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ia=Zo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ts=e=>{const t=Object.create(null);return(o=>t[o]||(t[o]=e(o)))},Ug=/-\w/g,Sn=Ts(e=>e.replace(Ug,t=>t.slice(1).toUpperCase())),Bg=/\B([A-Z])/g,vo=Ts(e=>e.replace(Bg,"-$1").toLowerCase()),Ss=Ts(e=>e.charAt(0).toUpperCase()+e.slice(1)),tl=Ts(e=>e?`on${Ss(e)}`:""),_o=(e,t)=>!Object.is(e,t),ks=(e,...t)=>{for(let o=0;o<e.length;o++)e[o](...t)},au=(e,t,o,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:o})},Cs=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Hg=e=>{const t=$t(e)?Number(e):NaN;return isNaN(t)?e:t};let su;const Es=()=>su||(su=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ct(e){if(He(e)){const t={};for(let o=0;o<e.length;o++){const n=e[o],a=$t(n)?zg(n):ct(n);if(a)for(const s in a)t[s]=a[s]}return t}else if($t(e)||vt(e))return e}const jg=/;(?![^(]*\))/g,Wg=/:([^]+)/,Vg=/\/\*[^]*?\*\//g;function zg(e){const t={};return e.replace(Vg,"").split(jg).forEach(o=>{if(o){const n=o.split(Wg);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ce(e){let t="";if($t(e))t=e;else if(He(e))for(let o=0;o<e.length;o++){const n=Ce(e[o]);n&&(t+=n+" ")}else if(vt(e))for(const o in e)e[o]&&(t+=o+" ");return t.trim()}const qg=Zo("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function ru(e){return!!e||e===""}function Gg(e,t){if(e.length!==t.length)return!1;let o=!0;for(let n=0;o&&n<e.length;n++)o=No(e[n],t[n]);return o}function No(e,t){if(e===t)return!0;let o=eu(e),n=eu(t);if(o||n)return o&&n?e.getTime()===t.getTime():!1;if(o=An(e),n=An(t),o||n)return e===t;if(o=He(e),n=He(t),o||n)return o&&n?Gg(e,t):!1;if(o=vt(e),n=vt(t),o||n){if(!o||!n)return!1;const a=Object.keys(e).length,s=Object.keys(t).length;if(a!==s)return!1;for(const r in e){const l=e.hasOwnProperty(r),u=t.hasOwnProperty(r);if(l&&!u||!l&&u||!No(e[r],t[r]))return!1}}return String(e)===String(t)}function nl(e,t){return e.findIndex(o=>No(o,t))}const lu=e=>!!(e&&e.__v_isRef===!0),m=e=>$t(e)?e:e==null?"":He(e)||vt(e)&&(e.toString===nu||!ze(e.toString))?lu(e)?m(e.value):JSON.stringify(e,iu,2):String(e),iu=(e,t)=>lu(t)?iu(e,t.value):ta(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[n,a],s)=>(o[ol(n,s)+" =>"]=a,o),{})}:na(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>ol(o))}:An(t)?ol(t):vt(t)&&!He(t)&&!ou(t)?String(t):t,ol=(e,t="")=>{var o;return An(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};/**
* @vue/reactivity v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Kt;class uu{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Kt,!t&&Kt&&(this.index=(Kt.scopes||(Kt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes)for(t=0,o=this.scopes.length;t<o;t++)this.scopes[t].pause();for(t=0,o=this.effects.length;t<o;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,o;if(this.scopes)for(t=0,o=this.scopes.length;t<o;t++)this.scopes[t].resume();for(t=0,o=this.effects.length;t<o;t++)this.effects[t].resume()}}run(t){if(this._active){const o=Kt;try{return Kt=this,t()}finally{Kt=o}}}on(){++this._on===1&&(this.prevScope=Kt,Kt=this)}off(){this._on>0&&--this._on===0&&(Kt=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let o,n;for(o=0,n=this.effects.length;o<n;o++)this.effects[o].stop();for(this.effects.length=0,o=0,n=this.cleanups.length;o<n;o++)this.cleanups[o]();if(this.cleanups.length=0,this.scopes){for(o=0,n=this.scopes.length;o<n;o++)this.scopes[o].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 al(e){return new uu(e)}function cu(){return Kt}function Qg(e,t=!1){Kt&&Kt.cleanups.push(e)}let xt;const sl=new WeakSet;class du{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,Kt&&Kt.active&&Kt.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,sl.has(this)&&(sl.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||pu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,_u(this),gu(this);const t=xt,o=In;xt=this,In=!0;try{return this.fn()}finally{hu(this),xt=t,In=o,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ul(t);this.deps=this.depsTail=void 0,_u(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?sl.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){il(this)&&this.run()}get dirty(){return il(this)}}let fu=0,Ma,Oa;function pu(e,t=!1){if(e.flags|=8,t){e.next=Oa,Oa=e;return}e.next=Ma,Ma=e}function rl(){fu++}function ll(){if(--fu>0)return;if(Oa){let t=Oa;for(Oa=void 0;t;){const o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;Ma;){let t=Ma;for(Ma=void 0;t;){const o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=o}}if(e)throw e}function gu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function hu(e){let t,o=e.depsTail,n=o;for(;n;){const a=n.prevDep;n.version===-1?(n===o&&(o=a),ul(n),Yg(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=a}e.deps=t,e.depsTail=o}function il(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(mu(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function mu(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ra)||(e.globalVersion=Ra,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!il(e))))return;e.flags|=2;const t=e.dep,o=xt,n=In;xt=e,In=!0;try{gu(e);const a=e.fn(e._value);(t.version===0||_o(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{xt=o,In=n,hu(e),e.flags&=-3}}function ul(e,t=!1){const{dep:o,prevSub:n,nextSub:a}=e;if(n&&(n.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=n,e.nextSub=void 0),o.subs===e&&(o.subs=n,!n&&o.computed)){o.computed.flags&=-5;for(let s=o.computed.deps;s;s=s.nextDep)ul(s,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function Yg(e){const{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}let In=!0;const vu=[];function Bn(){vu.push(In),In=!1}function Hn(){const e=vu.pop();In=e===void 0?!0:e}function _u(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const o=xt;xt=void 0;try{t()}finally{xt=o}}}let Ra=0;class Kg{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class cl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!xt||!In||xt===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==xt)o=this.activeLink=new Kg(xt,this),xt.deps?(o.prevDep=xt.depsTail,xt.depsTail.nextDep=o,xt.depsTail=o):xt.deps=xt.depsTail=o,yu(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const n=o.nextDep;n.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=n),o.prevDep=xt.depsTail,o.nextDep=void 0,xt.depsTail.nextDep=o,xt.depsTail=o,xt.deps===o&&(xt.deps=n)}return o}trigger(t){this.version++,Ra++,this.notify(t)}notify(t){rl();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{ll()}}}function yu(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)yu(n)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const Ls=new WeakMap,Do=Symbol(""),dl=Symbol(""),Na=Symbol("");function Jt(e,t,o){if(In&&xt){let n=Ls.get(e);n||Ls.set(e,n=new Map);let a=n.get(o);a||(n.set(o,a=new cl),a.map=n,a.key=o),a.track()}}function Jn(e,t,o,n,a,s){const r=Ls.get(e);if(!r){Ra++;return}const l=u=>{u&&u.trigger()};if(rl(),t==="clear")r.forEach(l);else{const u=He(e),d=u&&el(o);if(u&&o==="length"){const c=Number(n);r.forEach((f,h)=>{(h==="length"||h===Na||!An(h)&&h>=c)&&l(f)})}else switch((o!==void 0||r.has(void 0))&&l(r.get(o)),d&&l(r.get(Na)),t){case"add":u?d&&l(r.get("length")):(l(r.get(Do)),ta(e)&&l(r.get(dl)));break;case"delete":u||(l(r.get(Do)),ta(e)&&l(r.get(dl)));break;case"set":ta(e)&&l(r.get(Do));break}}ll()}function Jg(e,t){const o=Ls.get(e);return o&&o.get(t)}function oa(e){const t=Ze(e);return t===e?t:(Jt(t,"iterate",Na),kn(e)?t:t.map(qt))}function $s(e){return Jt(e=Ze(e),"iterate",Na),e}const Xg={__proto__:null,[Symbol.iterator](){return fl(this,Symbol.iterator,qt)},concat(...e){return oa(this).concat(...e.map(t=>He(t)?oa(t):t))},entries(){return fl(this,"entries",e=>(e[1]=qt(e[1]),e))},every(e,t){return Xn(this,"every",e,t,void 0,arguments)},filter(e,t){return Xn(this,"filter",e,t,o=>o.map(qt),arguments)},find(e,t){return Xn(this,"find",e,t,qt,arguments)},findIndex(e,t){return Xn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Xn(this,"findLast",e,t,qt,arguments)},findLastIndex(e,t){return Xn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Xn(this,"forEach",e,t,void 0,arguments)},includes(...e){return pl(this,"includes",e)},indexOf(...e){return pl(this,"indexOf",e)},join(e){return oa(this).join(e)},lastIndexOf(...e){return pl(this,"lastIndexOf",e)},map(e,t){return Xn(this,"map",e,t,void 0,arguments)},pop(){return Da(this,"pop")},push(...e){return Da(this,"push",e)},reduce(e,...t){return bu(this,"reduce",e,t)},reduceRight(e,...t){return bu(this,"reduceRight",e,t)},shift(){return Da(this,"shift")},some(e,t){return Xn(this,"some",e,t,void 0,arguments)},splice(...e){return Da(this,"splice",e)},toReversed(){return oa(this).toReversed()},toSorted(e){return oa(this).toSorted(e)},toSpliced(...e){return oa(this).toSpliced(...e)},unshift(...e){return Da(this,"unshift",e)},values(){return fl(this,"values",qt)}};function fl(e,t,o){const n=$s(e),a=n[t]();return n!==e&&!kn(e)&&(a._next=a.next,a.next=()=>{const s=a._next();return s.value&&(s.value=o(s.value)),s}),a}const Zg=Array.prototype;function Xn(e,t,o,n,a,s){const r=$s(e),l=r!==e&&!kn(e),u=r[t];if(u!==Zg[t]){const f=u.apply(e,s);return l?qt(f):f}let d=o;r!==e&&(l?d=function(f,h){return o.call(this,qt(f),h,e)}:o.length>2&&(d=function(f,h){return o.call(this,f,h,e)}));const c=u.call(r,d,n);return l&&a?a(c):c}function bu(e,t,o,n){const a=$s(e);let s=o;return a!==e&&(kn(e)?o.length>3&&(s=function(r,l,u){return o.call(this,r,l,u,e)}):s=function(r,l,u){return o.call(this,r,qt(l),u,e)}),a[t](s,...n)}function pl(e,t,o){const n=Ze(e);Jt(n,"iterate",Na);const a=n[t](...o);return(a===-1||a===!1)&&hl(o[0])?(o[0]=Ze(o[0]),n[t](...o)):a}function Da(e,t,o=[]){Bn(),rl();const n=Ze(e)[t].apply(e,o);return ll(),Hn(),n}const eh=Zo("__proto__,__v_isRef,__isVue"),wu=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(An));function th(e){An(e)||(e=String(e));const t=Ze(this);return Jt(t,"has",e),t.hasOwnProperty(e)}class xu{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,n){if(o==="__v_skip")return t.__v_skip;const a=this._isReadonly,s=this._isShallow;if(o==="__v_isReactive")return!a;if(o==="__v_isReadonly")return a;if(o==="__v_isShallow")return s;if(o==="__v_raw")return n===(a?s?Lu:Eu:s?Cu:ku).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=He(t);if(!a){let u;if(r&&(u=Xg[o]))return u;if(o==="hasOwnProperty")return th}const l=Reflect.get(t,o,At(t)?t:n);return(An(o)?wu.has(o):eh(o))||(a||Jt(t,"get",o),s)?l:At(l)?r&&el(o)?l:l.value:vt(l)?a?$u(l):Os(l):l}}class Tu extends xu{constructor(t=!1){super(!1,t)}set(t,o,n,a){let s=t[o];if(!this._isShallow){const u=bo(s);if(!kn(n)&&!bo(n)&&(s=Ze(s),n=Ze(n)),!He(t)&&At(s)&&!At(n))return u||(s.value=n),!0}const r=He(t)&&el(o)?Number(o)<t.length:it(t,o),l=Reflect.set(t,o,n,At(t)?t:a);return t===Ze(a)&&(r?_o(n,s)&&Jn(t,"set",o,n):Jn(t,"add",o,n)),l}deleteProperty(t,o){const n=it(t,o);t[o];const a=Reflect.deleteProperty(t,o);return a&&n&&Jn(t,"delete",o,void 0),a}has(t,o){const n=Reflect.has(t,o);return(!An(o)||!wu.has(o))&&Jt(t,"has",o),n}ownKeys(t){return Jt(t,"iterate",He(t)?"length":Do),Reflect.ownKeys(t)}}class Su extends xu{constructor(t=!1){super(!0,t)}set(t,o){return!0}deleteProperty(t,o){return!0}}const nh=new Tu,oh=new Su,ah=new Tu(!0),sh=new Su(!0),gl=e=>e,As=e=>Reflect.getPrototypeOf(e);function rh(e,t,o){return function(...n){const a=this.__v_raw,s=Ze(a),r=ta(s),l=e==="entries"||e===Symbol.iterator&&r,u=e==="keys"&&r,d=a[e](...n),c=o?gl:t?Ns:qt;return!t&&Jt(s,"iterate",u?dl:Do),{next(){const{value:f,done:h}=d.next();return h?{value:f,done:h}:{value:l?[c(f[0]),c(f[1])]:c(f),done:h}},[Symbol.iterator](){return this}}}}function Is(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function lh(e,t){const o={get(a){const s=this.__v_raw,r=Ze(s),l=Ze(a);e||(_o(a,l)&&Jt(r,"get",a),Jt(r,"get",l));const{has:u}=As(r),d=t?gl:e?Ns:qt;if(u.call(r,a))return d(s.get(a));if(u.call(r,l))return d(s.get(l));s!==r&&s.get(a)},get size(){const a=this.__v_raw;return!e&&Jt(Ze(a),"iterate",Do),a.size},has(a){const s=this.__v_raw,r=Ze(s),l=Ze(a);return e||(_o(a,l)&&Jt(r,"has",a),Jt(r,"has",l)),a===l?s.has(a):s.has(a)||s.has(l)},forEach(a,s){const r=this,l=r.__v_raw,u=Ze(l),d=t?gl:e?Ns:qt;return!e&&Jt(u,"iterate",Do),l.forEach((c,f)=>a.call(s,d(c),d(f),r))}};return Wt(o,e?{add:Is("add"),set:Is("set"),delete:Is("delete"),clear:Is("clear")}:{add(a){!t&&!kn(a)&&!bo(a)&&(a=Ze(a));const s=Ze(this);return As(s).has.call(s,a)||(s.add(a),Jn(s,"add",a,a)),this},set(a,s){!t&&!kn(s)&&!bo(s)&&(s=Ze(s));const r=Ze(this),{has:l,get:u}=As(r);let d=l.call(r,a);d||(a=Ze(a),d=l.call(r,a));const c=u.call(r,a);return r.set(a,s),d?_o(s,c)&&Jn(r,"set",a,s):Jn(r,"add",a,s),this},delete(a){const s=Ze(this),{has:r,get:l}=As(s);let u=r.call(s,a);u||(a=Ze(a),u=r.call(s,a)),l&&l.call(s,a);const d=s.delete(a);return u&&Jn(s,"delete",a,void 0),d},clear(){const a=Ze(this),s=a.size!==0,r=a.clear();return s&&Jn(a,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(a=>{o[a]=rh(a,e,t)}),o}function Ms(e,t){const o=lh(e,t);return(n,a,s)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?n:Reflect.get(it(o,a)&&a in n?o:n,a,s)}const ih={get:Ms(!1,!1)},uh={get:Ms(!1,!0)},ch={get:Ms(!0,!1)},dh={get:Ms(!0,!0)},ku=new WeakMap,Cu=new WeakMap,Eu=new WeakMap,Lu=new WeakMap;function fh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ph(e){return e.__v_skip||!Object.isExtensible(e)?0:fh(Fg(e))}function Os(e){return bo(e)?e:Rs(e,!1,nh,ih,ku)}function gh(e){return Rs(e,!1,ah,uh,Cu)}function $u(e){return Rs(e,!0,oh,ch,Eu)}function N$(e){return Rs(e,!0,sh,dh,Lu)}function Rs(e,t,o,n,a){if(!vt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=ph(e);if(s===0)return e;const r=a.get(e);if(r)return r;const l=new Proxy(e,s===2?n:o);return a.set(e,l),l}function yo(e){return bo(e)?yo(e.__v_raw):!!(e&&e.__v_isReactive)}function bo(e){return!!(e&&e.__v_isReadonly)}function kn(e){return!!(e&&e.__v_isShallow)}function hl(e){return e?!!e.__v_raw:!1}function Ze(e){const t=e&&e.__v_raw;return t?Ze(t):e}function ml(e){return!it(e,"__v_skip")&&Object.isExtensible(e)&&au(e,"__v_skip",!0),e}const qt=e=>vt(e)?Os(e):e,Ns=e=>vt(e)?$u(e):e;function At(e){return e?e.__v_isRef===!0:!1}function b(e){return Au(e,!1)}function hh(e){return Au(e,!0)}function Au(e,t){return At(e)?e:new mh(e,t)}class mh{constructor(t,o){this.dep=new cl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:Ze(t),this._value=o?t:qt(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){const o=this._rawValue,n=this.__v_isShallow||kn(t)||bo(t);t=n?t:Ze(t),_o(t,o)&&(this._rawValue=t,this._value=n?t:qt(t),this.dep.trigger())}}function g(e){return At(e)?e.value:e}const vh={get:(e,t,o)=>t==="__v_raw"?e:g(Reflect.get(e,t,o)),set:(e,t,o,n)=>{const a=e[t];return At(a)&&!At(o)?(a.value=o,!0):Reflect.set(e,t,o,n)}};function Iu(e){return yo(e)?e:new Proxy(e,vh)}function _h(e){const t=He(e)?new Array(e.length):{};for(const o in e)t[o]=bh(e,o);return t}class yh{constructor(t,o,n){this._object=t,this._key=o,this._defaultValue=n,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 Jg(Ze(this._object),this._key)}}function bh(e,t,o){const n=e[t];return At(n)?n:new yh(e,t,o)}class wh{constructor(t,o,n){this.fn=t,this.setter=o,this._value=void 0,this.dep=new cl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ra-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&xt!==this)return pu(this,!0),!0}get value(){const t=this.dep.track();return mu(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function xh(e,t,o=!1){let n,a;return ze(e)?n=e:(n=e.get,a=e.set),new wh(n,a,o)}const Ds={},Ps=new WeakMap;let Po;function Th(e,t=!1,o=Po){if(o){let n=Ps.get(o);n||Ps.set(o,n=[]),n.push(e)}}function Sh(e,t,o=mt){const{immediate:n,deep:a,once:s,scheduler:r,augmentJob:l,call:u}=o,d=w=>a?w:kn(w)||a===!1||a===0?Zn(w,1):Zn(w);let c,f,h,p,v=!1,y=!1;if(At(e)?(f=()=>e.value,v=kn(e)):yo(e)?(f=()=>d(e),v=!0):He(e)?(y=!0,v=e.some(w=>yo(w)||kn(w)),f=()=>e.map(w=>{if(At(w))return w.value;if(yo(w))return d(w);if(ze(w))return u?u(w,2):w()})):ze(e)?t?f=u?()=>u(e,2):e:f=()=>{if(h){Bn();try{h()}finally{Hn()}}const w=Po;Po=c;try{return u?u(e,3,[p]):e(p)}finally{Po=w}}:f=Un,t&&a){const w=f,M=a===!0?1/0:a;f=()=>Zn(w(),M)}const T=cu(),k=()=>{c.stop(),T&&T.active&&Zr(T.effects,c)};if(s&&t){const w=t;t=(...M)=>{w(...M),k()}}let $=y?new Array(e.length).fill(Ds):Ds;const B=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(t){const M=c.run();if(a||v||(y?M.some((H,W)=>_o(H,$[W])):_o(M,$))){h&&h();const H=Po;Po=c;try{const W=[M,$===Ds?void 0:y&&$[0]===Ds?[]:$,p];$=M,u?u(t,3,W):t(...W)}finally{Po=H}}}else c.run()};return l&&l(B),c=new du(f),c.scheduler=r?()=>r(B,!1):B,p=w=>Th(w,!1,c),h=c.onStop=()=>{const w=Ps.get(c);if(w){if(u)u(w,4);else for(const M of w)M();Ps.delete(c)}},t?n?B(!0):$=c.run():r?r(B.bind(null,!0),!0):c.run(),k.pause=c.pause.bind(c),k.resume=c.resume.bind(c),k.stop=k,k}function Zn(e,t=1/0,o){if(t<=0||!vt(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,At(e))Zn(e.value,t,o);else if(He(e))for(let n=0;n<e.length;n++)Zn(e[n],t,o);else if(na(e)||ta(e))e.forEach(n=>{Zn(n,t,o)});else if(ou(e)){for(const n in e)Zn(e[n],t,o);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Zn(e[n],t,o)}return e}/**
* @vue/runtime-core v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Pa=[];let vl=!1;function D$(e,...t){if(vl)return;vl=!0,Bn();const o=Pa.length?Pa[Pa.length-1].component:null,n=o&&o.appContext.config.warnHandler,a=kh();if(n)aa(n,o,11,[e+t.map(s=>{var r,l;return(l=(r=s.toString)==null?void 0:r.call(s))!=null?l:JSON.stringify(s)}).join(""),o&&o.proxy,a.map(({vnode:s})=>`at <${Dc(o,s.type)}>`).join(`
`),a]);else{const s=[`[Vue warn]: ${e}`,...t];a.length&&s.push(`
`,...Ch(a)),console.warn(...s)}Hn(),vl=!1}function kh(){let e=Pa[Pa.length-1];if(!e)return[];const t=[];for(;e;){const o=t[0];o&&o.vnode===e?o.recurseCount++:t.push({vnode:e,recurseCount:0});const n=e.component&&e.component.parent;e=n&&n.vnode}return t}function Ch(e){const t=[];return e.forEach((o,n)=>{t.push(...n===0?[]:[`
`],...Eh(o))}),t}function Eh({vnode:e,recurseCount:t}){const o=t>0?`... (${t} recursive calls)`:"",n=e.component?e.component.parent==null:!1,a=` at <${Dc(e.component,e.type,n)}`,s=">"+o;return e.props?[a,...Lh(e.props),s]:[a+s]}function Lh(e){const t=[],o=Object.keys(e);return o.slice(0,3).forEach(n=>{t.push(...Mu(n,e[n]))}),o.length>3&&t.push(" ..."),t}function Mu(e,t,o){return $t(t)?(t=JSON.stringify(t),o?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?o?t:[`${e}=${t}`]:At(t)?(t=Mu(e,Ze(t.value),!0),o?t:[`${e}=Ref<`,t,">"]):ze(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Ze(t),o?t:[`${e}=`,t])}function aa(e,t,o,n){try{return n?e(...n):e()}catch(a){Fs(a,t,o)}}function Mn(e,t,o,n){if(ze(e)){const a=aa(e,t,o,n);return a&&tu(a)&&a.catch(s=>{Fs(s,t,o)}),a}if(He(e)){const a=[];for(let s=0;s<e.length;s++)a.push(Mn(e[s],t,o,n));return a}}function Fs(e,t,o,n=!0){const a=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||mt;if(t){let l=t.parent;const u=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${o}`;for(;l;){const c=l.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](e,u,d)===!1)return}l=l.parent}if(s){Bn(),aa(s,null,10,[e,u,d]),Hn();return}}$h(e,o,a,n,r)}function $h(e,t,o,n=!0,a=!1){if(a)throw e;console.error(e)}const an=[];let jn=-1;const sa=[];let wo=null,ra=0;const Ou=Promise.resolve();let Us=null;function Qe(e){const t=Us||Ou;return e?t.then(this?e.bind(this):e):t}function Ah(e){let t=jn+1,o=an.length;for(;t<o;){const n=t+o>>>1,a=an[n],s=Fa(a);s<e||s===e&&a.flags&2?t=n+1:o=n}return t}function _l(e){if(!(e.flags&1)){const t=Fa(e),o=an[an.length-1];!o||!(e.flags&2)&&t>=Fa(o)?an.push(e):an.splice(Ah(t),0,e),e.flags|=1,Ru()}}function Ru(){Us||(Us=Ou.then(Pu))}function Ih(e){He(e)?sa.push(...e):wo&&e.id===-1?wo.splice(ra+1,0,e):e.flags&1||(sa.push(e),e.flags|=1),Ru()}function Nu(e,t,o=jn+1){for(;o<an.length;o++){const n=an[o];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;an.splice(o,1),o--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function Du(e){if(sa.length){const t=[...new Set(sa)].sort((o,n)=>Fa(o)-Fa(n));if(sa.length=0,wo){wo.push(...t);return}for(wo=t,ra=0;ra<wo.length;ra++){const o=wo[ra];o.flags&4&&(o.flags&=-2),o.flags&8||o(),o.flags&=-2}wo=null,ra=0}}const Fa=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Pu(e){try{for(jn=0;jn<an.length;jn++){const t=an[jn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),aa(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;jn<an.length;jn++){const t=an[jn];t&&(t.flags&=-2)}jn=-1,an.length=0,Du(),Us=null,(an.length||sa.length)&&Pu()}}let Gt=null,Fu=null;function Bs(e){const t=Gt;return Gt=e,Fu=e&&e.type.__scopeId||null,t}function pt(e,t=Gt,o){if(!t||e._n)return e;const n=(...a)=>{n._d&&Ks(-1);const s=Bs(t);let r;try{r=e(...a)}finally{Bs(s),n._d&&Ks(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function we(e,t){if(Gt===null)return e;const o=Zs(Gt),n=e.dirs||(e.dirs=[]);for(let a=0;a<t.length;a++){let[s,r,l,u=mt]=t[a];s&&(ze(s)&&(s={mounted:s,updated:s}),s.deep&&Zn(r),n.push({dir:s,instance:o,value:r,oldValue:void 0,arg:l,modifiers:u}))}return e}function Fo(e,t,o,n){const a=e.dirs,s=t&&t.dirs;for(let r=0;r<a.length;r++){const l=a[r];s&&(l.oldValue=s[r].value);let u=l.dir[n];u&&(Bn(),Mn(u,o,8,[e.el,l,e,t]),Hn())}}const Uu=Symbol("_vte"),Bu=e=>e.__isTeleport,Ua=e=>e&&(e.disabled||e.disabled===""),Hu=e=>e&&(e.defer||e.defer===""),ju=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Wu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,yl=(e,t)=>{const o=e&&e.to;return $t(o)?t?t(o):null:o},Vu={name:"Teleport",__isTeleport:!0,process(e,t,o,n,a,s,r,l,u,d){const{mc:c,pc:f,pbc:h,o:{insert:p,querySelector:v,createText:y,createComment:T}}=d,k=Ua(t.props);let{shapeFlag:$,children:B,dynamicChildren:w}=t;if(e==null){const M=t.el=y(""),H=t.anchor=y("");p(M,o,n),p(H,o,n);const W=(I,ee)=>{$&16&&(a&&a.isCE&&(a.ce._teleportTarget=I),c(B,I,ee,a,s,r,l,u))},D=()=>{const I=t.target=yl(t.props,v),ee=qu(I,t,y,p);I&&(r!=="svg"&&ju(I)?r="svg":r!=="mathml"&&Wu(I)&&(r="mathml"),k||(W(I,ee),js(t,!1)))};k&&(W(o,H),js(t,!0)),Hu(t.props)?(t.el.__isMounted=!1,rn(()=>{D(),delete t.el.__isMounted},s)):D()}else{if(Hu(t.props)&&e.el.__isMounted===!1){rn(()=>{Vu.process(e,t,o,n,a,s,r,l,u,d)},s);return}t.el=e.el,t.targetStart=e.targetStart;const M=t.anchor=e.anchor,H=t.target=e.target,W=t.targetAnchor=e.targetAnchor,D=Ua(e.props),I=D?o:H,ee=D?M:W;if(r==="svg"||ju(H)?r="svg":(r==="mathml"||Wu(H))&&(r="mathml"),w?(h(e.dynamicChildren,w,I,a,s,r,l),Al(e,t,!0)):u||f(e,t,I,ee,a,s,r,l,!1),k)D?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Hs(t,o,M,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const K=t.target=yl(t.props,v);K&&Hs(t,K,null,d,0)}else D&&Hs(t,H,W,d,1);js(t,k)}},remove(e,t,o,{um:n,o:{remove:a}},s){const{shapeFlag:r,children:l,anchor:u,targetStart:d,targetAnchor:c,target:f,props:h}=e;if(f&&(a(d),a(c)),s&&a(u),r&16){const p=s||!Ua(h);for(let v=0;v<l.length;v++){const y=l[v];n(y,t,o,p,!!y.dynamicChildren)}}},move:Hs,hydrate:Mh};function Hs(e,t,o,{o:{insert:n},m:a},s=2){s===0&&n(e.targetAnchor,t,o);const{el:r,anchor:l,shapeFlag:u,children:d,props:c}=e,f=s===2;if(f&&n(r,t,o),(!f||Ua(c))&&u&16)for(let h=0;h<d.length;h++)a(d[h],t,o,2);f&&n(l,t,o)}function Mh(e,t,o,n,a,s,{o:{nextSibling:r,parentNode:l,querySelector:u,insert:d,createText:c}},f){function h(y,T,k,$){T.anchor=f(r(y),T,l(y),o,n,a,s),T.targetStart=k,T.targetAnchor=$}const p=t.target=yl(t.props,u),v=Ua(t.props);if(p){const y=p._lpa||p.firstChild;if(t.shapeFlag&16)if(v)h(e,t,y,y&&r(y));else{t.anchor=r(e);let T=y;for(;T;){if(T&&T.nodeType===8){if(T.data==="teleport start anchor")t.targetStart=T;else if(T.data==="teleport anchor"){t.targetAnchor=T,p._lpa=t.targetAnchor&&r(t.targetAnchor);break}}T=r(T)}t.targetAnchor||qu(p,t,c,d),f(y&&r(y),t,p,o,n,a,s)}js(t,v)}else v&&t.shapeFlag&16&&h(e,t,e,r(e));return t.anchor&&r(t.anchor)}const zu=Vu;function js(e,t){const o=e.ctx;if(o&&o.ut){let n,a;for(t?(n=e.el,a=e.anchor):(n=e.targetStart,a=e.targetAnchor);n&&n!==a;)n.nodeType===1&&n.setAttribute("data-v-owner",o.uid),n=n.nextSibling;o.ut()}}function qu(e,t,o,n){const a=t.targetStart=o(""),s=t.targetAnchor=o("");return a[Uu]=s,e&&(n(a,e),n(s,e)),s}const eo=Symbol("_leaveCb"),Ws=Symbol("_enterCb");function Oh(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return _t(()=>{e.isMounted=!0}),ia(()=>{e.isUnmounting=!0}),e}const Cn=[Function,Array],Gu={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Cn,onEnter:Cn,onAfterEnter:Cn,onEnterCancelled:Cn,onBeforeLeave:Cn,onLeave:Cn,onAfterLeave:Cn,onLeaveCancelled:Cn,onBeforeAppear:Cn,onAppear:Cn,onAfterAppear:Cn,onAppearCancelled:Cn},Qu=e=>{const t=e.subTree;return t.component?Qu(t.component):t},Rh={name:"BaseTransition",props:Gu,setup(e,{slots:t}){const o=So(),n=Oh();return()=>{const a=t.default&&Xu(t.default(),!0);if(!a||!a.length)return;const s=Yu(a),r=Ze(e),{mode:l}=r;if(n.isLeaving)return wl(s);const u=Ju(s);if(!u)return wl(s);let d=bl(u,r,n,o,f=>d=f);u.type!==Xt&&Ba(u,d);let c=o.subTree&&Ju(o.subTree);if(c&&c.type!==Xt&&!Ho(c,u)&&Qu(o).type!==Xt){let f=bl(c,r,n,o);if(Ba(c,f),l==="out-in"&&u.type!==Xt)return n.isLeaving=!0,f.afterLeave=()=>{n.isLeaving=!1,o.job.flags&8||o.update(),delete f.afterLeave,c=void 0},wl(s);l==="in-out"&&u.type!==Xt?f.delayLeave=(h,p,v)=>{const y=Ku(n,c);y[String(c.key)]=c,h[eo]=()=>{p(),h[eo]=void 0,delete d.delayedLeave,c=void 0},d.delayedLeave=()=>{v(),delete d.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return s}}};function Yu(e){let t=e[0];if(e.length>1){for(const o of e)if(o.type!==Xt){t=o;break}}return t}const Nh=Rh;function Ku(e,t){const{leavingVNodes:o}=e;let n=o.get(t.type);return n||(n=Object.create(null),o.set(t.type,n)),n}function bl(e,t,o,n,a){const{appear:s,mode:r,persisted:l=!1,onBeforeEnter:u,onEnter:d,onAfterEnter:c,onEnterCancelled:f,onBeforeLeave:h,onLeave:p,onAfterLeave:v,onLeaveCancelled:y,onBeforeAppear:T,onAppear:k,onAfterAppear:$,onAppearCancelled:B}=t,w=String(e.key),M=Ku(o,e),H=(I,ee)=>{I&&Mn(I,n,9,ee)},W=(I,ee)=>{const K=ee[1];H(I,ee),He(I)?I.every(V=>V.length<=1)&&K():I.length<=1&&K()},D={mode:r,persisted:l,beforeEnter(I){let ee=u;if(!o.isMounted)if(s)ee=T||u;else return;I[eo]&&I[eo](!0);const K=M[w];K&&Ho(e,K)&&K.el[eo]&&K.el[eo](),H(ee,[I])},enter(I){let ee=d,K=c,V=f;if(!o.isMounted)if(s)ee=k||d,K=$||c,V=B||f;else return;let ne=!1;const oe=I[Ws]=X=>{ne||(ne=!0,X?H(V,[I]):H(K,[I]),D.delayedLeave&&D.delayedLeave(),I[Ws]=void 0)};ee?W(ee,[I,oe]):oe()},leave(I,ee){const K=String(e.key);if(I[Ws]&&I[Ws](!0),o.isUnmounting)return ee();H(h,[I]);let V=!1;const ne=I[eo]=oe=>{V||(V=!0,ee(),oe?H(y,[I]):H(v,[I]),I[eo]=void 0,M[K]===e&&delete M[K])};M[K]=e,p?W(p,[I,ne]):ne()},clone(I){const ee=bl(I,t,o,n,a);return a&&a(ee),ee}};return D}function wl(e){if(zs(e))return e=xo(e),e.children=null,e}function Ju(e){if(!zs(e))return Bu(e.type)&&e.children?Yu(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&ze(o.default))return o.default()}}function Ba(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ba(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 Xu(e,t=!1,o){let n=[],a=0;for(let s=0;s<e.length;s++){let r=e[s];const l=o==null?r.key:String(o)+String(r.key!=null?r.key:s);r.type===Oe?(r.patchFlag&128&&a++,n=n.concat(Xu(r.children,t,l))):(t||r.type!==Xt)&&n.push(l!=null?xo(r,{key:l}):r)}if(a>1)for(let s=0;s<n.length;s++)n[s].patchFlag=-2;return n}function pn(e,t){return ze(e)?Wt({name:e.name},t,{setup:e}):e}function Zu(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Vs=new WeakMap;function Ha(e,t,o,n,a=!1){if(He(e)){e.forEach((v,y)=>Ha(v,t&&(He(t)?t[y]:t),o,n,a));return}if(la(n)&&!a){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ha(e,t,o,n.component.subTree);return}const s=n.shapeFlag&4?Zs(n.component):n.el,r=a?null:s,{i:l,r:u}=e,d=t&&t.r,c=l.refs===mt?l.refs={}:l.refs,f=l.setupState,h=Ze(f),p=f===mt?Zi:v=>it(h,v);if(d!=null&&d!==u){if(ec(t),$t(d))c[d]=null,p(d)&&(f[d]=null);else if(At(d)){d.value=null;const v=t;v.k&&(c[v.k]=null)}}if(ze(u))aa(u,l,12,[r,c]);else{const v=$t(u),y=At(u);if(v||y){const T=()=>{if(e.f){const k=v?p(u)?f[u]:c[u]:u.value;if(a)He(k)&&Zr(k,s);else if(He(k))k.includes(s)||k.push(s);else if(v)c[u]=[s],p(u)&&(f[u]=c[u]);else{const $=[s];u.value=$,e.k&&(c[e.k]=$)}}else v?(c[u]=r,p(u)&&(f[u]=r)):y&&(u.value=r,e.k&&(c[e.k]=r))};if(r){const k=()=>{T(),Vs.delete(e)};k.id=-1,Vs.set(e,k),rn(k,o)}else ec(e),T()}}}function ec(e){const t=Vs.get(e);t&&(t.flags|=8,Vs.delete(e))}Es().requestIdleCallback,Es().cancelIdleCallback;const la=e=>!!e.type.__asyncLoader,zs=e=>e.type.__isKeepAlive;function Dh(e,t){tc(e,"a",t)}function Ph(e,t){tc(e,"da",t)}function tc(e,t,o=Zt){const n=e.__wdc||(e.__wdc=()=>{let a=o;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(qs(t,n,o),o){let a=o.parent;for(;a&&a.parent;)zs(a.parent.vnode)&&Fh(n,t,o,a),a=a.parent}}function Fh(e,t,o,n){const a=qs(t,e,n,!0);On(()=>{Zr(n[t],a)},o)}function qs(e,t,o=Zt,n=!1){if(o){const a=o[e]||(o[e]=[]),s=t.__weh||(t.__weh=(...r)=>{Bn();const l=Ya(o),u=Mn(t,o,e,r);return l(),Hn(),u});return n?a.unshift(s):a.push(s),s}}const to=e=>(t,o=Zt)=>{(!Ka||e==="sp")&&qs(e,(...n)=>t(...n),o)},Uh=to("bm"),_t=to("m"),nc=to("bu"),Bh=to("u"),ia=to("bum"),On=to("um"),Hh=to("sp"),jh=to("rtg"),Wh=to("rtc");function Vh(e,t=Zt){qs("ec",e,t)}const zh="components";function qh(e,t){return Qh(zh,e,!0,t)||e}const Gh=Symbol.for("v-ndc");function Qh(e,t,o=!0,n=!1){const a=Gt||Zt;if(a){const s=a.type;{const l=Nc(s,!1);if(l&&(l===t||l===Sn(t)||l===Ss(Sn(t))))return s}const r=oc(a[e]||s[e],t)||oc(a.appContext[e],t);return!r&&n?s:r}}function oc(e,t){return e&&(e[t]||e[Sn(t)]||e[Ss(Sn(t))])}function We(e,t,o,n){let a;const s=o,r=He(e);if(r||$t(e)){const l=r&&yo(e);let u=!1,d=!1;l&&(u=!kn(e),d=bo(e),e=$s(e)),a=new Array(e.length);for(let c=0,f=e.length;c<f;c++)a[c]=t(u?d?Ns(qt(e[c])):qt(e[c]):e[c],c,void 0,s)}else if(typeof e=="number"){a=new Array(e);for(let l=0;l<e;l++)a[l]=t(l+1,l,void 0,s)}else if(vt(e))if(e[Symbol.iterator])a=Array.from(e,(l,u)=>t(l,u,void 0,s));else{const l=Object.keys(e);a=new Array(l.length);for(let u=0,d=l.length;u<d;u++){const c=l[u];a[u]=t(e[c],c,u,s)}}else a=[];return a}function ja(e,t,o={},n,a){if(Gt.ce||Gt.parent&&la(Gt.parent)&&Gt.parent.ce)return t!=="default"&&(o.name=t),x(),yt(Oe,null,[qe("slot",o,n&&n())],64);let s=e[t];s&&s._c&&(s._d=!1),x();const r=s&&ac(s(o)),l=o.key||r&&r.key,u=yt(Oe,{key:(l&&!An(l)?l:`_${t}`)+(!r&&n?"_fb":"")},r||(n?n():[]),r&&e._===1?64:-2);return!a&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),s&&s._c&&(s._d=!0),u}function ac(e){return e.some(t=>Qa(t)?!(t.type===Xt||t.type===Oe&&!ac(t.children)):!0)?e:null}const xl=e=>e?Mc(e)?Zs(e):xl(e.parent):null,Wa=Wt(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=>xl(e.parent),$root:e=>xl(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ic(e),$forceUpdate:e=>e.f||(e.f=()=>{_l(e.update)}),$nextTick:e=>e.n||(e.n=Qe.bind(e.proxy)),$watch:e=>mm.bind(e)}),Tl=(e,t)=>e!==mt&&!e.__isScriptSetup&&it(e,t),Yh={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:o,setupState:n,data:a,props:s,accessCache:r,type:l,appContext:u}=e;let d;if(t[0]!=="$"){const p=r[t];if(p!==void 0)switch(p){case 1:return n[t];case 2:return a[t];case 4:return o[t];case 3:return s[t]}else{if(Tl(n,t))return r[t]=1,n[t];if(a!==mt&&it(a,t))return r[t]=2,a[t];if((d=e.propsOptions[0])&&it(d,t))return r[t]=3,s[t];if(o!==mt&&it(o,t))return r[t]=4,o[t];Sl&&(r[t]=0)}}const c=Wa[t];let f,h;if(c)return t==="$attrs"&&Jt(e.attrs,"get",""),c(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(o!==mt&&it(o,t))return r[t]=4,o[t];if(h=u.config.globalProperties,it(h,t))return h[t]},set({_:e},t,o){const{data:n,setupState:a,ctx:s}=e;return Tl(a,t)?(a[t]=o,!0):n!==mt&&it(n,t)?(n[t]=o,!0):it(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:n,appContext:a,propsOptions:s,type:r}},l){let u,d;return!!(o[l]||e!==mt&&l[0]!=="$"&&it(e,l)||Tl(t,l)||(u=s[0])&&it(u,l)||it(n,l)||it(Wa,l)||it(a.config.globalProperties,l)||(d=r.__cssModules)&&d[l])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:it(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function sc(e){return He(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}let Sl=!0;function Kh(e){const t=ic(e),o=e.proxy,n=e.ctx;Sl=!1,t.beforeCreate&&rc(t.beforeCreate,e,"bc");const{data:a,computed:s,methods:r,watch:l,provide:u,inject:d,created:c,beforeMount:f,mounted:h,beforeUpdate:p,updated:v,activated:y,deactivated:T,beforeDestroy:k,beforeUnmount:$,destroyed:B,unmounted:w,render:M,renderTracked:H,renderTriggered:W,errorCaptured:D,serverPrefetch:I,expose:ee,inheritAttrs:K,components:V,directives:ne,filters:oe}=t;if(d&&Jh(d,n,null),r)for(const se in r){const F=r[se];ze(F)&&(n[se]=F.bind(o))}if(a){const se=a.call(o,o);vt(se)&&(e.data=Os(se))}if(Sl=!0,s)for(const se in s){const F=s[se],R=ze(F)?F.bind(o,o):ze(F.get)?F.get.bind(o,o):Un,ie=!ze(F)&&ze(F.set)?F.set.bind(o):Un,Te=nt({get:R,set:ie});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>Te.value,set:te=>Te.value=te})}if(l)for(const se in l)lc(l[se],n,o,se);if(u){const se=ze(u)?u.call(o):u;Reflect.ownKeys(se).forEach(F=>{Qs(F,se[F])})}c&&rc(c,e,"c");function re(se,F){He(F)?F.forEach(R=>se(R.bind(o))):F&&se(F.bind(o))}if(re(Uh,f),re(_t,h),re(nc,p),re(Bh,v),re(Dh,y),re(Ph,T),re(Vh,D),re(Wh,H),re(jh,W),re(ia,$),re(On,w),re(Hh,I),He(ee))if(ee.length){const se=e.exposed||(e.exposed={});ee.forEach(F=>{Object.defineProperty(se,F,{get:()=>o[F],set:R=>o[F]=R,enumerable:!0})})}else e.exposed||(e.exposed={});M&&e.render===Un&&(e.render=M),K!=null&&(e.inheritAttrs=K),V&&(e.components=V),ne&&(e.directives=ne),I&&Zu(e)}function Jh(e,t,o=Un){He(e)&&(e=kl(e));for(const n in e){const a=e[n];let s;vt(a)?"default"in a?s=no(a.from||n,a.default,!0):s=no(a.from||n):s=no(a),At(s)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[n]=s}}function rc(e,t,o){Mn(He(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,o)}function lc(e,t,o,n){let a=n.includes(".")?Sc(o,n):()=>o[n];if($t(e)){const s=t[e];ze(s)&&dt(a,s)}else if(ze(e))dt(a,e.bind(o));else if(vt(e))if(He(e))e.forEach(s=>lc(s,t,o,n));else{const s=ze(e.handler)?e.handler.bind(o):t[e.handler];ze(s)&&dt(a,s,e)}}function ic(e){const t=e.type,{mixins:o,extends:n}=t,{mixins:a,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let u;return l?u=l:!a.length&&!o&&!n?u=t:(u={},a.length&&a.forEach(d=>Gs(u,d,r,!0)),Gs(u,t,r)),vt(t)&&s.set(t,u),u}function Gs(e,t,o,n=!1){const{mixins:a,extends:s}=t;s&&Gs(e,s,o,!0),a&&a.forEach(r=>Gs(e,r,o,!0));for(const r in t)if(!(n&&r==="expose")){const l=Xh[r]||o&&o[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Xh={data:uc,props:cc,emits:cc,methods:Va,computed:Va,beforeCreate:sn,created:sn,beforeMount:sn,mounted:sn,beforeUpdate:sn,updated:sn,beforeDestroy:sn,beforeUnmount:sn,destroyed:sn,unmounted:sn,activated:sn,deactivated:sn,errorCaptured:sn,serverPrefetch:sn,components:Va,directives:Va,watch:em,provide:uc,inject:Zh};function uc(e,t){return t?e?function(){return Wt(ze(e)?e.call(this,this):e,ze(t)?t.call(this,this):t)}:t:e}function Zh(e,t){return Va(kl(e),kl(t))}function kl(e){if(He(e)){const t={};for(let o=0;o<e.length;o++)t[e[o]]=e[o];return t}return e}function sn(e,t){return e?[...new Set([].concat(e,t))]:t}function Va(e,t){return e?Wt(Object.create(null),e,t):t}function cc(e,t){return e?He(e)&&He(t)?[...new Set([...e,...t])]:Wt(Object.create(null),sc(e),sc(t??{})):t}function em(e,t){if(!e)return t;if(!t)return e;const o=Wt(Object.create(null),e);for(const n in t)o[n]=sn(e[n],t[n]);return o}function dc(){return{app:null,config:{isNativeTag:Zi,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 tm=0;function nm(e,t){return function(n,a=null){ze(n)||(n=Wt({},n)),a!=null&&!vt(a)&&(a=null);const s=dc(),r=new WeakSet,l=[];let u=!1;const d=s.app={_uid:tm++,_component:n,_props:a,_container:null,_context:s,_instance:null,version:Um,get config(){return s.config},set config(c){},use(c,...f){return r.has(c)||(c&&ze(c.install)?(r.add(c),c.install(d,...f)):ze(c)&&(r.add(c),c(d,...f))),d},mixin(c){return s.mixins.includes(c)||s.mixins.push(c),d},component(c,f){return f?(s.components[c]=f,d):s.components[c]},directive(c,f){return f?(s.directives[c]=f,d):s.directives[c]},mount(c,f,h){if(!u){const p=d._ceVNode||qe(n,a);return p.appContext=s,h===!0?h="svg":h===!1&&(h=void 0),e(p,c,h),u=!0,d._container=c,c.__vue_app__=d,Zs(p.component)}},onUnmount(c){l.push(c)},unmount(){u&&(Mn(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,f){return s.provides[c]=f,d},runWithContext(c){const f=Uo;Uo=d;try{return c()}finally{Uo=f}}};return d}}let Uo=null;function Qs(e,t){if(Zt){let o=Zt.provides;const n=Zt.parent&&Zt.parent.provides;n===o&&(o=Zt.provides=Object.create(n)),o[e]=t}}function no(e,t,o=!1){const n=So();if(n||Uo){let a=Uo?Uo._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return o&&ze(t)?t.call(n&&n.proxy):t}}function om(){return!!(So()||Uo)}const fc={},pc=()=>Object.create(fc),gc=e=>Object.getPrototypeOf(e)===fc;function am(e,t,o,n=!1){const a={},s=pc();e.propsDefaults=Object.create(null),hc(e,t,a,s);for(const r in e.propsOptions[0])r in a||(a[r]=void 0);o?e.props=n?a:gh(a):e.type.props?e.props=a:e.props=s,e.attrs=s}function sm(e,t,o,n){const{props:a,attrs:s,vnode:{patchFlag:r}}=e,l=Ze(a),[u]=e.propsOptions;let d=!1;if((n||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let f=0;f<c.length;f++){let h=c[f];if(Ys(e.emitsOptions,h))continue;const p=t[h];if(u)if(it(s,h))p!==s[h]&&(s[h]=p,d=!0);else{const v=Sn(h);a[v]=Cl(u,l,v,p,e,!1)}else p!==s[h]&&(s[h]=p,d=!0)}}}else{hc(e,t,a,s)&&(d=!0);let c;for(const f in l)(!t||!it(t,f)&&((c=vo(f))===f||!it(t,c)))&&(u?o&&(o[f]!==void 0||o[c]!==void 0)&&(a[f]=Cl(u,l,f,void 0,e,!0)):delete a[f]);if(s!==l)for(const f in s)(!t||!it(t,f))&&(delete s[f],d=!0)}d&&Jn(e.attrs,"set","")}function hc(e,t,o,n){const[a,s]=e.propsOptions;let r=!1,l;if(t)for(let u in t){if(Ia(u))continue;const d=t[u];let c;a&&it(a,c=Sn(u))?!s||!s.includes(c)?o[c]=d:(l||(l={}))[c]=d:Ys(e.emitsOptions,u)||(!(u in n)||d!==n[u])&&(n[u]=d,r=!0)}if(s){const u=Ze(o),d=l||mt;for(let c=0;c<s.length;c++){const f=s[c];o[f]=Cl(a,u,f,d[f],e,!it(d,f))}}return r}function Cl(e,t,o,n,a,s){const r=e[o];if(r!=null){const l=it(r,"default");if(l&&n===void 0){const u=r.default;if(r.type!==Function&&!r.skipFactory&&ze(u)){const{propsDefaults:d}=a;if(o in d)n=d[o];else{const c=Ya(a);n=d[o]=u.call(null,t),c()}}else n=u;a.ce&&a.ce._setProp(o,n)}r[0]&&(s&&!l?n=!1:r[1]&&(n===""||n===vo(o))&&(n=!0))}return n}const rm=new WeakMap;function mc(e,t,o=!1){const n=o?rm:t.propsCache,a=n.get(e);if(a)return a;const s=e.props,r={},l=[];let u=!1;if(!ze(e)){const c=f=>{u=!0;const[h,p]=mc(f,t,!0);Wt(r,h),p&&l.push(...p)};!o&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!u)return vt(e)&&n.set(e,ea),ea;if(He(s))for(let c=0;c<s.length;c++){const f=Sn(s[c]);vc(f)&&(r[f]=mt)}else if(s)for(const c in s){const f=Sn(c);if(vc(f)){const h=s[c],p=r[f]=He(h)||ze(h)?{type:h}:Wt({},h),v=p.type;let y=!1,T=!0;if(He(v))for(let k=0;k<v.length;++k){const $=v[k],B=ze($)&&$.name;if(B==="Boolean"){y=!0;break}else B==="String"&&(T=!1)}else y=ze(v)&&v.name==="Boolean";p[0]=y,p[1]=T,(y||it(p,"default"))&&l.push(f)}}const d=[r,l];return vt(e)&&n.set(e,d),d}function vc(e){return e[0]!=="$"&&!Ia(e)}const El=e=>e==="_"||e==="_ctx"||e==="$stable",Ll=e=>He(e)?e.map(Wn):[Wn(e)],lm=(e,t,o)=>{if(t._n)return t;const n=pt((...a)=>Ll(t(...a)),o);return n._c=!1,n},_c=(e,t,o)=>{const n=e._ctx;for(const a in e){if(El(a))continue;const s=e[a];if(ze(s))t[a]=lm(a,s,n);else if(s!=null){const r=Ll(s);t[a]=()=>r}}},yc=(e,t)=>{const o=Ll(t);e.slots.default=()=>o},bc=(e,t,o)=>{for(const n in t)(o||!El(n))&&(e[n]=t[n])},im=(e,t,o)=>{const n=e.slots=pc();if(e.vnode.shapeFlag&32){const a=t._;a?(bc(n,t,o),o&&au(n,"_",a,!0)):_c(t,n)}else t&&yc(e,t)},um=(e,t,o)=>{const{vnode:n,slots:a}=e;let s=!0,r=mt;if(n.shapeFlag&32){const l=t._;l?o&&l===1?s=!1:bc(a,t,o):(s=!t.$stable,_c(t,a)),r=t}else t&&(yc(e,t),r={default:1});if(s)for(const l in a)!El(l)&&r[l]==null&&delete a[l]},rn=Sm;function cm(e){return dm(e)}function dm(e,t){const o=Es();o.__VUE__=!0;const{insert:n,remove:a,patchProp:s,createElement:r,createText:l,createComment:u,setText:d,setElementText:c,parentNode:f,nextSibling:h,setScopeId:p=Un,insertStaticContent:v}=e,y=(E,L,N,J=null,de=null,he=null,S=void 0,_=null,A=!!L.dynamicChildren)=>{if(E===L)return;E&&!Ho(E,L)&&(J=P(E),te(E,de,he,!0),E=null),L.patchFlag===-2&&(A=!1,L.dynamicChildren=null);const{type:j,ref:me,shapeFlag:ue}=L;switch(j){case za:T(E,L,N,J);break;case Xt:k(E,L,N,J);break;case Il:E==null&&$(L,N,J,S);break;case Oe:V(E,L,N,J,de,he,S,_,A);break;default:ue&1?M(E,L,N,J,de,he,S,_,A):ue&6?ne(E,L,N,J,de,he,S,_,A):(ue&64||ue&128)&&j.process(E,L,N,J,de,he,S,_,A,O)}me!=null&&de?Ha(me,E&&E.ref,he,L||E,!L):me==null&&E&&E.ref!=null&&Ha(E.ref,null,he,E,!0)},T=(E,L,N,J)=>{if(E==null)n(L.el=l(L.children),N,J);else{const de=L.el=E.el;L.children!==E.children&&d(de,L.children)}},k=(E,L,N,J)=>{E==null?n(L.el=u(L.children||""),N,J):L.el=E.el},$=(E,L,N,J)=>{[E.el,E.anchor]=v(E.children,L,N,J,E.el,E.anchor)},B=({el:E,anchor:L},N,J)=>{let de;for(;E&&E!==L;)de=h(E),n(E,N,J),E=de;n(L,N,J)},w=({el:E,anchor:L})=>{let N;for(;E&&E!==L;)N=h(E),a(E),E=N;a(L)},M=(E,L,N,J,de,he,S,_,A)=>{L.type==="svg"?S="svg":L.type==="math"&&(S="mathml"),E==null?H(L,N,J,de,he,S,_,A):I(E,L,de,he,S,_,A)},H=(E,L,N,J,de,he,S,_)=>{let A,j;const{props:me,shapeFlag:ue,transition:z,dirs:ae}=E;if(A=E.el=r(E.type,he,me&&me.is,me),ue&8?c(A,E.children):ue&16&&D(E.children,A,null,J,de,$l(E,he),S,_),ae&&Fo(E,null,J,"created"),W(A,E,E.scopeId,S,J),me){for(const Pe in me)Pe!=="value"&&!Ia(Pe)&&s(A,Pe,null,me[Pe],he,J);"value"in me&&s(A,"value",null,me.value,he),(j=me.onVnodeBeforeMount)&&Vn(j,J,E)}ae&&Fo(E,null,J,"beforeMount");const Me=fm(de,z);Me&&z.beforeEnter(A),n(A,L,N),((j=me&&me.onVnodeMounted)||Me||ae)&&rn(()=>{j&&Vn(j,J,E),Me&&z.enter(A),ae&&Fo(E,null,J,"mounted")},de)},W=(E,L,N,J,de)=>{if(N&&p(E,N),J)for(let he=0;he<J.length;he++)p(E,J[he]);if(de){let he=de.subTree;if(L===he||Lc(he.type)&&(he.ssContent===L||he.ssFallback===L)){const S=de.vnode;W(E,S,S.scopeId,S.slotScopeIds,de.parent)}}},D=(E,L,N,J,de,he,S,_,A=0)=>{for(let j=A;j<E.length;j++){const me=E[j]=_?To(E[j]):Wn(E[j]);y(null,me,L,N,J,de,he,S,_)}},I=(E,L,N,J,de,he,S)=>{const _=L.el=E.el;let{patchFlag:A,dynamicChildren:j,dirs:me}=L;A|=E.patchFlag&16;const ue=E.props||mt,z=L.props||mt;let ae;if(N&&Bo(N,!1),(ae=z.onVnodeBeforeUpdate)&&Vn(ae,N,L,E),me&&Fo(L,E,N,"beforeUpdate"),N&&Bo(N,!0),(ue.innerHTML&&z.innerHTML==null||ue.textContent&&z.textContent==null)&&c(_,""),j?ee(E.dynamicChildren,j,_,N,J,$l(L,de),he):S||F(E,L,_,null,N,J,$l(L,de),he,!1),A>0){if(A&16)K(_,ue,z,N,de);else if(A&2&&ue.class!==z.class&&s(_,"class",null,z.class,de),A&4&&s(_,"style",ue.style,z.style,de),A&8){const Me=L.dynamicProps;for(let Pe=0;Pe<Me.length;Pe++){const je=Me[Pe],st=ue[je],tt=z[je];(tt!==st||je==="value")&&s(_,je,st,tt,de,N)}}A&1&&E.children!==L.children&&c(_,L.children)}else!S&&j==null&&K(_,ue,z,N,de);((ae=z.onVnodeUpdated)||me)&&rn(()=>{ae&&Vn(ae,N,L,E),me&&Fo(L,E,N,"updated")},J)},ee=(E,L,N,J,de,he,S)=>{for(let _=0;_<L.length;_++){const A=E[_],j=L[_],me=A.el&&(A.type===Oe||!Ho(A,j)||A.shapeFlag&198)?f(A.el):N;y(A,j,me,null,J,de,he,S,!0)}},K=(E,L,N,J,de)=>{if(L!==N){if(L!==mt)for(const he in L)!Ia(he)&&!(he in N)&&s(E,he,L[he],null,de,J);for(const he in N){if(Ia(he))continue;const S=N[he],_=L[he];S!==_&&he!=="value"&&s(E,he,_,S,de,J)}"value"in N&&s(E,"value",L.value,N.value,de)}},V=(E,L,N,J,de,he,S,_,A)=>{const j=L.el=E?E.el:l(""),me=L.anchor=E?E.anchor:l("");let{patchFlag:ue,dynamicChildren:z,slotScopeIds:ae}=L;ae&&(_=_?_.concat(ae):ae),E==null?(n(j,N,J),n(me,N,J),D(L.children||[],N,me,de,he,S,_,A)):ue>0&&ue&64&&z&&E.dynamicChildren?(ee(E.dynamicChildren,z,N,de,he,S,_),(L.key!=null||de&&L===de.subTree)&&Al(E,L,!0)):F(E,L,N,me,de,he,S,_,A)},ne=(E,L,N,J,de,he,S,_,A)=>{L.slotScopeIds=_,E==null?L.shapeFlag&512?de.ctx.activate(L,N,J,S,A):oe(L,N,J,de,he,S,A):X(E,L,A)},oe=(E,L,N,J,de,he,S)=>{const _=E.component=Im(E,J,de);if(zs(E)&&(_.ctx.renderer=O),Mm(_,!1,S),_.asyncDep){if(de&&de.registerDep(_,re,S),!E.el){const A=_.subTree=qe(Xt);k(null,A,L,N),E.placeholder=A.el}}else re(_,E,L,N,de,he,S)},X=(E,L,N)=>{const J=L.component=E.component;if(xm(E,L,N))if(J.asyncDep&&!J.asyncResolved){se(J,L,N);return}else J.next=L,J.update();else L.el=E.el,J.vnode=L},re=(E,L,N,J,de,he,S)=>{const _=()=>{if(E.isMounted){let{next:ue,bu:z,u:ae,parent:Me,vnode:Pe}=E;{const ke=wc(E);if(ke){ue&&(ue.el=Pe.el,se(E,ue,S)),ke.asyncDep.then(()=>{E.isUnmounted||_()});return}}let je=ue,st;Bo(E,!1),ue?(ue.el=Pe.el,se(E,ue,S)):ue=Pe,z&&ks(z),(st=ue.props&&ue.props.onVnodeBeforeUpdate)&&Vn(st,Me,ue,Pe),Bo(E,!0);const tt=Cc(E),Ie=E.subTree;E.subTree=tt,y(Ie,tt,f(Ie.el),P(Ie),E,de,he),ue.el=tt.el,je===null&&Tm(E,tt.el),ae&&rn(ae,de),(st=ue.props&&ue.props.onVnodeUpdated)&&rn(()=>Vn(st,Me,ue,Pe),de)}else{let ue;const{el:z,props:ae}=L,{bm:Me,m:Pe,parent:je,root:st,type:tt}=E,Ie=la(L);Bo(E,!1),Me&&ks(Me),!Ie&&(ue=ae&&ae.onVnodeBeforeMount)&&Vn(ue,je,L),Bo(E,!0);{st.ce&&st.ce._def.shadowRoot!==!1&&st.ce._injectChildStyle(tt);const ke=E.subTree=Cc(E);y(null,ke,N,J,E,de,he),L.el=ke.el}if(Pe&&rn(Pe,de),!Ie&&(ue=ae&&ae.onVnodeMounted)){const ke=L;rn(()=>Vn(ue,je,ke),de)}(L.shapeFlag&256||je&&la(je.vnode)&&je.vnode.shapeFlag&256)&&E.a&&rn(E.a,de),E.isMounted=!0,L=N=J=null}};E.scope.on();const A=E.effect=new du(_);E.scope.off();const j=E.update=A.run.bind(A),me=E.job=A.runIfDirty.bind(A);me.i=E,me.id=E.uid,A.scheduler=()=>_l(me),Bo(E,!0),j()},se=(E,L,N)=>{L.component=E;const J=E.vnode.props;E.vnode=L,E.next=null,sm(E,L.props,J,N),um(E,L.children,N),Bn(),Nu(E),Hn()},F=(E,L,N,J,de,he,S,_,A=!1)=>{const j=E&&E.children,me=E?E.shapeFlag:0,ue=L.children,{patchFlag:z,shapeFlag:ae}=L;if(z>0){if(z&128){ie(j,ue,N,J,de,he,S,_,A);return}else if(z&256){R(j,ue,N,J,de,he,S,_,A);return}}ae&8?(me&16&&pe(j,de,he),ue!==j&&c(N,ue)):me&16?ae&16?ie(j,ue,N,J,de,he,S,_,A):pe(j,de,he,!0):(me&8&&c(N,""),ae&16&&D(ue,N,J,de,he,S,_,A))},R=(E,L,N,J,de,he,S,_,A)=>{E=E||ea,L=L||ea;const j=E.length,me=L.length,ue=Math.min(j,me);let z;for(z=0;z<ue;z++){const ae=L[z]=A?To(L[z]):Wn(L[z]);y(E[z],ae,N,null,de,he,S,_,A)}j>me?pe(E,de,he,!0,!1,ue):D(L,N,J,de,he,S,_,A,ue)},ie=(E,L,N,J,de,he,S,_,A)=>{let j=0;const me=L.length;let ue=E.length-1,z=me-1;for(;j<=ue&&j<=z;){const ae=E[j],Me=L[j]=A?To(L[j]):Wn(L[j]);if(Ho(ae,Me))y(ae,Me,N,null,de,he,S,_,A);else break;j++}for(;j<=ue&&j<=z;){const ae=E[ue],Me=L[z]=A?To(L[z]):Wn(L[z]);if(Ho(ae,Me))y(ae,Me,N,null,de,he,S,_,A);else break;ue--,z--}if(j>ue){if(j<=z){const ae=z+1,Me=ae<me?L[ae].el:J;for(;j<=z;)y(null,L[j]=A?To(L[j]):Wn(L[j]),N,Me,de,he,S,_,A),j++}}else if(j>z)for(;j<=ue;)te(E[j],de,he,!0),j++;else{const ae=j,Me=j,Pe=new Map;for(j=Me;j<=z;j++){const Tt=L[j]=A?To(L[j]):Wn(L[j]);Tt.key!=null&&Pe.set(Tt.key,j)}let je,st=0;const tt=z-Me+1;let Ie=!1,ke=0;const Ee=new Array(tt);for(j=0;j<tt;j++)Ee[j]=0;for(j=ae;j<=ue;j++){const Tt=E[j];if(st>=tt){te(Tt,de,he,!0);continue}let dn;if(Tt.key!=null)dn=Pe.get(Tt.key);else for(je=Me;je<=z;je++)if(Ee[je-Me]===0&&Ho(Tt,L[je])){dn=je;break}dn===void 0?te(Tt,de,he,!0):(Ee[dn-Me]=j+1,dn>=ke?ke=dn:Ie=!0,y(Tt,L[dn],N,null,de,he,S,_,A),st++)}const ft=Ie?pm(Ee):ea;for(je=ft.length-1,j=tt-1;j>=0;j--){const Tt=Me+j,dn=L[Tt],Jo=L[Tt+1],Ca=Tt+1<me?Jo.el||Jo.placeholder:J;Ee[j]===0?y(null,dn,N,Ca,de,he,S,_,A):Ie&&(je<0||j!==ft[je]?Te(dn,N,Ca,2):je--)}}},Te=(E,L,N,J,de=null)=>{const{el:he,type:S,transition:_,children:A,shapeFlag:j}=E;if(j&6){Te(E.component.subTree,L,N,J);return}if(j&128){E.suspense.move(L,N,J);return}if(j&64){S.move(E,L,N,O);return}if(S===Oe){n(he,L,N);for(let ue=0;ue<A.length;ue++)Te(A[ue],L,N,J);n(E.anchor,L,N);return}if(S===Il){B(E,L,N);return}if(J!==2&&j&1&&_)if(J===0)_.beforeEnter(he),n(he,L,N),rn(()=>_.enter(he),de);else{const{leave:ue,delayLeave:z,afterLeave:ae}=_,Me=()=>{E.ctx.isUnmounted?a(he):n(he,L,N)},Pe=()=>{he._isLeaving&&he[eo](!0),ue(he,()=>{Me(),ae&&ae()})};z?z(he,Me,Pe):Pe()}else n(he,L,N)},te=(E,L,N,J=!1,de=!1)=>{const{type:he,props:S,ref:_,children:A,dynamicChildren:j,shapeFlag:me,patchFlag:ue,dirs:z,cacheIndex:ae}=E;if(ue===-2&&(de=!1),_!=null&&(Bn(),Ha(_,null,N,E,!0),Hn()),ae!=null&&(L.renderCache[ae]=void 0),me&256){L.ctx.deactivate(E);return}const Me=me&1&&z,Pe=!la(E);let je;if(Pe&&(je=S&&S.onVnodeBeforeUnmount)&&Vn(je,L,E),me&6)xe(E.component,N,J);else{if(me&128){E.suspense.unmount(N,J);return}Me&&Fo(E,null,L,"beforeUnmount"),me&64?E.type.remove(E,L,N,O,J):j&&!j.hasOnce&&(he!==Oe||ue>0&&ue&64)?pe(j,L,N,!1,!0):(he===Oe&&ue&384||!de&&me&16)&&pe(A,L,N),J&&le(E)}(Pe&&(je=S&&S.onVnodeUnmounted)||Me)&&rn(()=>{je&&Vn(je,L,E),Me&&Fo(E,null,L,"unmounted")},N)},le=E=>{const{type:L,el:N,anchor:J,transition:de}=E;if(L===Oe){ve(N,J);return}if(L===Il){w(E);return}const he=()=>{a(N),de&&!de.persisted&&de.afterLeave&&de.afterLeave()};if(E.shapeFlag&1&&de&&!de.persisted){const{leave:S,delayLeave:_}=de,A=()=>S(N,he);_?_(E.el,he,A):A()}else he()},ve=(E,L)=>{let N;for(;E!==L;)N=h(E),a(E),E=N;a(L)},xe=(E,L,N)=>{const{bum:J,scope:de,job:he,subTree:S,um:_,m:A,a:j}=E;xc(A),xc(j),J&&ks(J),de.stop(),he&&(he.flags|=8,te(S,E,L,N)),_&&rn(_,L),rn(()=>{E.isUnmounted=!0},L)},pe=(E,L,N,J=!1,de=!1,he=0)=>{for(let S=he;S<E.length;S++)te(E[S],L,N,J,de)},P=E=>{if(E.shapeFlag&6)return P(E.component.subTree);if(E.shapeFlag&128)return E.suspense.next();const L=h(E.anchor||E.el),N=L&&L[Uu];return N?h(N):L};let q=!1;const Z=(E,L,N)=>{E==null?L._vnode&&te(L._vnode,null,null,!0):y(L._vnode||null,E,L,null,null,null,N),L._vnode=E,q||(q=!0,Nu(),Du(),q=!1)},O={p:y,um:te,m:Te,r:le,mt:oe,mc:D,pc:F,pbc:ee,n:P,o:e};return{render:Z,hydrate:void 0,createApp:nm(Z)}}function $l({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function Bo({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function fm(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Al(e,t,o=!1){const n=e.children,a=t.children;if(He(n)&&He(a))for(let s=0;s<n.length;s++){const r=n[s];let l=a[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=a[s]=To(a[s]),l.el=r.el),!o&&l.patchFlag!==-2&&Al(r,l)),l.type===za&&l.patchFlag!==-1&&(l.el=r.el),l.type===Xt&&!l.el&&(l.el=r.el)}}function pm(e){const t=e.slice(),o=[0];let n,a,s,r,l;const u=e.length;for(n=0;n<u;n++){const d=e[n];if(d!==0){if(a=o[o.length-1],e[a]<d){t[n]=a,o.push(n);continue}for(s=0,r=o.length-1;s<r;)l=s+r>>1,e[o[l]]<d?s=l+1:r=l;d<e[o[s]]&&(s>0&&(t[n]=o[s-1]),o[s]=n)}}for(s=o.length,r=o[s-1];s-- >0;)o[s]=r,r=t[r];return o}function wc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:wc(t)}function xc(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const gm=Symbol.for("v-scx"),hm=()=>no(gm);function dt(e,t,o){return Tc(e,t,o)}function Tc(e,t,o=mt){const{immediate:n,deep:a,flush:s,once:r}=o,l=Wt({},o),u=t&&n||!t&&s!=="post";let d;if(Ka){if(s==="sync"){const p=hm();d=p.__watcherHandles||(p.__watcherHandles=[])}else if(!u){const p=()=>{};return p.stop=Un,p.resume=Un,p.pause=Un,p}}const c=Zt;l.call=(p,v,y)=>Mn(p,c,v,y);let f=!1;s==="post"?l.scheduler=p=>{rn(p,c&&c.suspense)}:s!=="sync"&&(f=!0,l.scheduler=(p,v)=>{v?p():_l(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const h=Sh(e,t,l);return Ka&&(d?d.push(h):u&&h()),h}function mm(e,t,o){const n=this.proxy,a=$t(e)?e.includes(".")?Sc(n,e):()=>n[e]:e.bind(n,n);let s;ze(t)?s=t:(s=t.handler,o=t);const r=Ya(this),l=Tc(a,s.bind(n),o);return r(),l}function Sc(e,t){const o=t.split(".");return()=>{let n=e;for(let a=0;a<o.length&&n;a++)n=n[o[a]];return n}}const vm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Sn(t)}Modifiers`]||e[`${vo(t)}Modifiers`];function _m(e,t,...o){if(e.isUnmounted)return;const n=e.vnode.props||mt;let a=o;const s=t.startsWith("update:"),r=s&&vm(n,t.slice(7));r&&(r.trim&&(a=o.map(c=>$t(c)?c.trim():c)),r.number&&(a=o.map(Cs)));let l,u=n[l=tl(t)]||n[l=tl(Sn(t))];!u&&s&&(u=n[l=tl(vo(t))]),u&&Mn(u,e,6,a);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Mn(d,e,6,a)}}const ym=new WeakMap;function kc(e,t,o=!1){const n=o?ym:t.emitsCache,a=n.get(e);if(a!==void 0)return a;const s=e.emits;let r={},l=!1;if(!ze(e)){const u=d=>{const c=kc(d,t,!0);c&&(l=!0,Wt(r,c))};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!s&&!l?(vt(e)&&n.set(e,null),null):(He(s)?s.forEach(u=>r[u]=null):Wt(r,s),vt(e)&&n.set(e,r),r)}function Ys(e,t){return!e||!xs(t)?!1:(t=t.slice(2).replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,vo(t))||it(e,t))}function P$(){}function Cc(e){const{type:t,vnode:o,proxy:n,withProxy:a,propsOptions:[s],slots:r,attrs:l,emit:u,render:d,renderCache:c,props:f,data:h,setupState:p,ctx:v,inheritAttrs:y}=e,T=Bs(e);let k,$;try{if(o.shapeFlag&4){const w=a||n,M=w;k=Wn(d.call(M,w,c,f,p,h,v)),$=l}else{const w=t;k=Wn(w.length>1?w(f,{attrs:l,slots:r,emit:u}):w(f,null)),$=t.props?l:bm(l)}}catch(w){qa.length=0,Fs(w,e,1),k=qe(Xt)}let B=k;if($&&y!==!1){const w=Object.keys($),{shapeFlag:M}=B;w.length&&M&7&&(s&&w.some(Xr)&&($=wm($,s)),B=xo(B,$,!1,!0))}return o.dirs&&(B=xo(B,null,!1,!0),B.dirs=B.dirs?B.dirs.concat(o.dirs):o.dirs),o.transition&&Ba(B,o.transition),k=B,Bs(T),k}const bm=e=>{let t;for(const o in e)(o==="class"||o==="style"||xs(o))&&((t||(t={}))[o]=e[o]);return t},wm=(e,t)=>{const o={};for(const n in e)(!Xr(n)||!(n.slice(9)in t))&&(o[n]=e[n]);return o};function xm(e,t,o){const{props:n,children:a,component:s}=e,{props:r,children:l,patchFlag:u}=t,d=s.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&u>=0){if(u&1024)return!0;if(u&16)return n?Ec(n,r,d):!!r;if(u&8){const c=t.dynamicProps;for(let f=0;f<c.length;f++){const h=c[f];if(r[h]!==n[h]&&!Ys(d,h))return!0}}}else return(a||l)&&(!l||!l.$stable)?!0:n===r?!1:n?r?Ec(n,r,d):!0:!!r;return!1}function Ec(e,t,o){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let a=0;a<n.length;a++){const s=n[a];if(t[s]!==e[s]&&!Ys(o,s))return!0}return!1}function Tm({vnode:e,parent:t},o){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=o,t=t.parent;else break}}const Lc=e=>e.__isSuspense;function Sm(e,t){t&&t.pendingBranch?He(e)?t.effects.push(...e):t.effects.push(e):Ih(e)}const Oe=Symbol.for("v-fgt"),za=Symbol.for("v-txt"),Xt=Symbol.for("v-cmt"),Il=Symbol.for("v-stc"),qa=[];let yn=null;function x(e=!1){qa.push(yn=e?null:[])}function km(){qa.pop(),yn=qa[qa.length-1]||null}let Ga=1;function Ks(e,t=!1){Ga+=e,e<0&&yn&&t&&(yn.hasOnce=!0)}function $c(e){return e.dynamicChildren=Ga>0?yn||ea:null,km(),Ga>0&&yn&&yn.push(e),e}function C(e,t,o,n,a,s){return $c(i(e,t,o,n,a,s,!0))}function yt(e,t,o,n,a){return $c(qe(e,t,o,n,a,!0))}function Qa(e){return e?e.__v_isVNode===!0:!1}function Ho(e,t){return e.type===t.type&&e.key===t.key}const Ac=({key:e})=>e??null,Js=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?$t(e)||At(e)||ze(e)?{i:Gt,r:e,k:t,f:!!o}:e:null);function i(e,t=null,o=null,n=0,a=null,s=e===Oe?0:1,r=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ac(t),ref:t&&Js(t),scopeId:Fu,slotScopeIds:null,children:o,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:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Gt};return l?(Ml(u,o),s&128&&e.normalize(u)):o&&(u.shapeFlag|=$t(o)?8:16),Ga>0&&!r&&yn&&(u.patchFlag>0||s&6)&&u.patchFlag!==32&&yn.push(u),u}const qe=Cm;function Cm(e,t=null,o=null,n=0,a=null,s=!1){if((!e||e===Gh)&&(e=Xt),Qa(e)){const l=xo(e,t,!0);return o&&Ml(l,o),Ga>0&&!s&&yn&&(l.shapeFlag&6?yn[yn.indexOf(e)]=l:yn.push(l)),l.patchFlag=-2,l}if(Fm(e)&&(e=e.__vccOpts),t){t=Em(t);let{class:l,style:u}=t;l&&!$t(l)&&(t.class=Ce(l)),vt(u)&&(hl(u)&&!He(u)&&(u=Wt({},u)),t.style=ct(u))}const r=$t(e)?1:Lc(e)?128:Bu(e)?64:vt(e)?4:ze(e)?2:0;return i(e,t,o,n,a,r,s,!0)}function Em(e){return e?hl(e)||gc(e)?Wt({},e):e:null}function xo(e,t,o=!1,n=!1){const{props:a,ref:s,patchFlag:r,children:l,transition:u}=e,d=t?Lm(a||{},t):a,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ac(d),ref:t&&t.ref?o&&s?He(s)?s.concat(Js(t)):[s,Js(t)]:Js(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Oe?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xo(e.ssContent),ssFallback:e.ssFallback&&xo(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&n&&Ba(c,u.clone(c)),c}function Ve(e=" ",t=0){return qe(za,null,e,t)}function fe(e="",t=!1){return t?(x(),yt(Xt,null,e)):qe(Xt,null,e)}function Wn(e){return e==null||typeof e=="boolean"?qe(Xt):He(e)?qe(Oe,null,e.slice()):Qa(e)?To(e):qe(za,null,String(e))}function To(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:xo(e)}function Ml(e,t){let o=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(He(t))o=16;else if(typeof t=="object")if(n&65){const a=t.default;a&&(a._c&&(a._d=!1),Ml(e,a()),a._c&&(a._d=!0));return}else{o=32;const a=t._;!a&&!gc(t)?t._ctx=Gt:a===3&&Gt&&(Gt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ze(t)?(t={default:t,_ctx:Gt},o=32):(t=String(t),n&64?(o=16,t=[Ve(t)]):o=8);e.children=t,e.shapeFlag|=o}function Lm(...e){const t={};for(let o=0;o<e.length;o++){const n=e[o];for(const a in n)if(a==="class")t.class!==n.class&&(t.class=Ce([t.class,n.class]));else if(a==="style")t.style=ct([t.style,n.style]);else if(xs(a)){const s=t[a],r=n[a];r&&s!==r&&!(He(s)&&s.includes(r))&&(t[a]=s?[].concat(s,r):r)}else a!==""&&(t[a]=n[a])}return t}function Vn(e,t,o,n=null){Mn(e,t,7,[o,n])}const $m=dc();let Am=0;function Im(e,t,o){const n=e.type,a=(t?t.appContext:e.appContext)||$m,s={uid:Am++,vnode:e,type:n,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new uu(!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:mc(n,a),emitsOptions:kc(n,a),emit:null,emitted:null,propsDefaults:mt,inheritAttrs:n.inheritAttrs,ctx:mt,data:mt,props:mt,attrs:mt,slots:mt,refs:mt,setupState:mt,setupContext:null,suspense:o,suspenseId:o?o.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=_m.bind(null,s),e.ce&&e.ce(s),s}let Zt=null;const So=()=>Zt||Gt;let Xs,Ol;{const e=Es(),t=(o,n)=>{let a;return(a=e[o])||(a=e[o]=[]),a.push(n),s=>{a.length>1?a.forEach(r=>r(s)):a[0](s)}};Xs=t("__VUE_INSTANCE_SETTERS__",o=>Zt=o),Ol=t("__VUE_SSR_SETTERS__",o=>Ka=o)}const Ya=e=>{const t=Zt;return Xs(e),e.scope.on(),()=>{e.scope.off(),Xs(t)}},Ic=()=>{Zt&&Zt.scope.off(),Xs(null)};function Mc(e){return e.vnode.shapeFlag&4}let Ka=!1;function Mm(e,t=!1,o=!1){t&&Ol(t);const{props:n,children:a}=e.vnode,s=Mc(e);am(e,n,s,t),im(e,a,o||t);const r=s?Om(e,t):void 0;return t&&Ol(!1),r}function Om(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Yh);const{setup:n}=o;if(n){Bn();const a=e.setupContext=n.length>1?Nm(e):null,s=Ya(e),r=aa(n,e,0,[e.props,a]),l=tu(r);if(Hn(),s(),(l||e.sp)&&!la(e)&&Zu(e),l){if(r.then(Ic,Ic),t)return r.then(u=>{Oc(e,u)}).catch(u=>{Fs(u,e,0)});e.asyncDep=r}else Oc(e,r)}else Rc(e)}function Oc(e,t,o){ze(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:vt(t)&&(e.setupState=Iu(t)),Rc(e)}function Rc(e,t,o){const n=e.type;e.render||(e.render=n.render||Un);{const a=Ya(e);Bn();try{Kh(e)}finally{Hn(),a()}}}const Rm={get(e,t){return Jt(e,"get",""),e[t]}};function Nm(e){const t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,Rm),slots:e.slots,emit:e.emit,expose:t}}function Zs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Iu(ml(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in Wa)return Wa[o](e)},has(t,o){return o in t||o in Wa}})):e.proxy}const Dm=/(?:^|[-_])\w/g,Pm=e=>e.replace(Dm,t=>t.toUpperCase()).replace(/[-_]/g,"");function Nc(e,t=!0){return ze(e)?e.displayName||e.name:e.name||t&&e.__name}function Dc(e,t,o=!1){let n=Nc(t);if(!n&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(n=a[1])}if(!n&&e&&e.parent){const a=s=>{for(const r in s)if(s[r]===t)return r};n=a(e.components||e.parent.type.components)||a(e.appContext.components)}return n?Pm(n):o?"App":"Anonymous"}function Fm(e){return ze(e)&&"__vccOpts"in e}const nt=(e,t)=>xh(e,t,Ka);function bt(e,t,o){const n=(s,r,l)=>{Ks(-1);try{return qe(s,r,l)}finally{Ks(1)}},a=arguments.length;return a===2?vt(t)&&!He(t)?Qa(t)?n(e,null,[t]):n(e,t):n(e,null,t):(a>3?o=Array.prototype.slice.call(arguments,2):a===3&&Qa(o)&&(o=[o]),n(e,t,o))}const Um="3.5.21";/**
* @vue/runtime-dom v3.5.21
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Rl;const Pc=typeof window<"u"&&window.trustedTypes;if(Pc)try{Rl=Pc.createPolicy("vue",{createHTML:e=>e})}catch{}const Fc=Rl?e=>Rl.createHTML(e):e=>e,Bm="http://www.w3.org/2000/svg",Hm="http://www.w3.org/1998/Math/MathML",oo=typeof document<"u"?document:null,Uc=oo&&oo.createElement("template"),jm={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,n)=>{const a=t==="svg"?oo.createElementNS(Bm,e):t==="mathml"?oo.createElementNS(Hm,e):o?oo.createElement(e,{is:o}):oo.createElement(e);return e==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:e=>oo.createTextNode(e),createComment:e=>oo.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>oo.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,n,a,s){const r=o?o.previousSibling:t.lastChild;if(a&&(a===s||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),o),!(a===s||!(a=a.nextSibling)););else{Uc.innerHTML=Fc(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Uc.content;if(n==="svg"||n==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,o)}return[r?r.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}},ko="transition",Ja="animation",Xa=Symbol("_vtc"),Bc={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},Wm=Wt({},Gu,Bc),Nl=(e=>(e.displayName="Transition",e.props=Wm,e))((e,{slots:t})=>bt(Nh,Vm(e),t)),jo=(e,t=[])=>{He(e)?e.forEach(o=>o(...t)):e&&e(...t)},Hc=e=>e?He(e)?e.some(t=>t.length>1):e.length>1:!1;function Vm(e){const t={};for(const V in e)V in Bc||(t[V]=e[V]);if(e.css===!1)return t;const{name:o="v",type:n,duration:a,enterFromClass:s=`${o}-enter-from`,enterActiveClass:r=`${o}-enter-active`,enterToClass:l=`${o}-enter-to`,appearFromClass:u=s,appearActiveClass:d=r,appearToClass:c=l,leaveFromClass:f=`${o}-leave-from`,leaveActiveClass:h=`${o}-leave-active`,leaveToClass:p=`${o}-leave-to`}=e,v=zm(a),y=v&&v[0],T=v&&v[1],{onBeforeEnter:k,onEnter:$,onEnterCancelled:B,onLeave:w,onLeaveCancelled:M,onBeforeAppear:H=k,onAppear:W=$,onAppearCancelled:D=B}=t,I=(V,ne,oe,X)=>{V._enterCancelled=X,Wo(V,ne?c:l),Wo(V,ne?d:r),oe&&oe()},ee=(V,ne)=>{V._isLeaving=!1,Wo(V,f),Wo(V,p),Wo(V,h),ne&&ne()},K=V=>(ne,oe)=>{const X=V?W:$,re=()=>I(ne,V,oe);jo(X,[ne,re]),jc(()=>{Wo(ne,V?u:s),ao(ne,V?c:l),Hc(X)||Wc(ne,n,y,re)})};return Wt(t,{onBeforeEnter(V){jo(k,[V]),ao(V,s),ao(V,r)},onBeforeAppear(V){jo(H,[V]),ao(V,u),ao(V,d)},onEnter:K(!1),onAppear:K(!0),onLeave(V,ne){V._isLeaving=!0;const oe=()=>ee(V,ne);ao(V,f),V._enterCancelled?(ao(V,h),qc()):(qc(),ao(V,h)),jc(()=>{V._isLeaving&&(Wo(V,f),ao(V,p),Hc(w)||Wc(V,n,T,oe))}),jo(w,[V,oe])},onEnterCancelled(V){I(V,!1,void 0,!0),jo(B,[V])},onAppearCancelled(V){I(V,!0,void 0,!0),jo(D,[V])},onLeaveCancelled(V){ee(V),jo(M,[V])}})}function zm(e){if(e==null)return null;if(vt(e))return[Dl(e.enter),Dl(e.leave)];{const t=Dl(e);return[t,t]}}function Dl(e){return Hg(e)}function ao(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[Xa]||(e[Xa]=new Set)).add(t)}function Wo(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const o=e[Xa];o&&(o.delete(t),o.size||(e[Xa]=void 0))}function jc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let qm=0;function Wc(e,t,o,n){const a=e._endId=++qm,s=()=>{a===e._endId&&n()};if(o!=null)return setTimeout(s,o);const{type:r,timeout:l,propCount:u}=Gm(e,t);if(!r)return n();const d=r+"end";let c=0;const f=()=>{e.removeEventListener(d,h),s()},h=p=>{p.target===e&&++c>=u&&f()};setTimeout(()=>{c<u&&f()},l+1),e.addEventListener(d,h)}function Gm(e,t){const o=window.getComputedStyle(e),n=v=>(o[v]||"").split(", "),a=n(`${ko}Delay`),s=n(`${ko}Duration`),r=Vc(a,s),l=n(`${Ja}Delay`),u=n(`${Ja}Duration`),d=Vc(l,u);let c=null,f=0,h=0;t===ko?r>0&&(c=ko,f=r,h=s.length):t===Ja?d>0&&(c=Ja,f=d,h=u.length):(f=Math.max(r,d),c=f>0?r>d?ko:Ja:null,h=c?c===ko?s.length:u.length:0);const p=c===ko&&/\b(?:transform|all)(?:,|$)/.test(n(`${ko}Property`).toString());return{type:c,timeout:f,propCount:h,hasTransform:p}}function Vc(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((o,n)=>zc(o)+zc(e[n])))}function zc(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function qc(){return document.body.offsetHeight}function Qm(e,t,o){const n=e[Xa];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}const er=Symbol("_vod"),Gc=Symbol("_vsh"),tr={name:"show",beforeMount(e,{value:t},{transition:o}){e[er]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):Za(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:n}){!t!=!o&&(n?t?(n.beforeEnter(e),Za(e,!0),n.enter(e)):n.leave(e,()=>{Za(e,!1)}):Za(e,t))},beforeUnmount(e,{value:t}){Za(e,t)}};function Za(e,t){e.style.display=t?e[er]:"none",e[Gc]=!t}const Ym=Symbol(""),Km=/(?:^|;)\s*display\s*:/;function Jm(e,t,o){const n=e.style,a=$t(o);let s=!1;if(o&&!a){if(t)if($t(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();o[l]==null&&nr(n,l,"")}else for(const r in t)o[r]==null&&nr(n,r,"");for(const r in o)r==="display"&&(s=!0),nr(n,r,o[r])}else if(a){if(t!==o){const r=n[Ym];r&&(o+=";"+r),n.cssText=o,s=Km.test(o)}}else t&&e.removeAttribute("style");er in e&&(e[er]=s?n.display:"",e[Gc]&&(n.display="none"))}const Qc=/\s*!important$/;function nr(e,t,o){if(He(o))o.forEach(n=>nr(e,t,n));else if(o==null&&(o=""),t.startsWith("--"))e.setProperty(t,o);else{const n=Xm(e,t);Qc.test(o)?e.setProperty(vo(n),o.replace(Qc,""),"important"):e[n]=o}}const Yc=["Webkit","Moz","ms"],Pl={};function Xm(e,t){const o=Pl[t];if(o)return o;let n=Sn(t);if(n!=="filter"&&n in e)return Pl[t]=n;n=Ss(n);for(let a=0;a<Yc.length;a++){const s=Yc[a]+n;if(s in e)return Pl[t]=s}return t}const Kc="http://www.w3.org/1999/xlink";function Jc(e,t,o,n,a,s=qg(t)){n&&t.startsWith("xlink:")?o==null?e.removeAttributeNS(Kc,t.slice(6,t.length)):e.setAttributeNS(Kc,t,o):o==null||s&&!ru(o)?e.removeAttribute(t):e.setAttribute(t,s?"":An(o)?String(o):o)}function Xc(e,t,o,n,a){if(t==="innerHTML"||t==="textContent"){o!=null&&(e[t]=t==="innerHTML"?Fc(o):o);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,u=o==null?e.type==="checkbox"?"on":"":String(o);(l!==u||!("_value"in e))&&(e.value=u),o==null&&e.removeAttribute(t),e._value=o;return}let r=!1;if(o===""||o==null){const l=typeof e[t];l==="boolean"?o=ru(o):o==null&&l==="string"?(o="",r=!0):l==="number"&&(o=0,r=!0)}try{e[t]=o}catch{}r&&e.removeAttribute(a||t)}function so(e,t,o,n){e.addEventListener(t,o,n)}function Zm(e,t,o,n){e.removeEventListener(t,o,n)}const Zc=Symbol("_vei");function e1(e,t,o,n,a=null){const s=e[Zc]||(e[Zc]={}),r=s[t];if(n&&r)r.value=n;else{const[l,u]=t1(t);if(n){const d=s[t]=a1(n,a);so(e,l,d,u)}else r&&(Zm(e,l,r,u),s[t]=void 0)}}const ed=/(?:Once|Passive|Capture)$/;function t1(e){let t;if(ed.test(e)){t={};let n;for(;n=e.match(ed);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):vo(e.slice(2)),t]}let Fl=0;const n1=Promise.resolve(),o1=()=>Fl||(n1.then(()=>Fl=0),Fl=Date.now());function a1(e,t){const o=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=o.attached)return;Mn(s1(n,o.value),t,5,[n])};return o.value=e,o.attached=o1(),o}function s1(e,t){if(He(t)){const o=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{o.call(e),e._stopped=!0},t.map(n=>a=>!a._stopped&&n&&n(a))}else return t}const td=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,r1=(e,t,o,n,a,s)=>{const r=a==="svg";t==="class"?Qm(e,n,r):t==="style"?Jm(e,o,n):xs(t)?Xr(t)||e1(e,t,o,n,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):l1(e,t,n,r))?(Xc(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jc(e,t,n,r,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!$t(n))?Xc(e,Sn(t),n,s,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Jc(e,t,n,r))};function l1(e,t,o,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&td(t)&&ze(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||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 td(t)&&$t(o)?!1:t in e}const Co=e=>{const t=e.props["onUpdate:modelValue"]||!1;return He(t)?o=>ks(t,o):t};function i1(e){e.target.composing=!0}function nd(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const En=Symbol("_assign"),$e={created(e,{modifiers:{lazy:t,trim:o,number:n}},a){e[En]=Co(a);const s=n||a.props&&a.props.type==="number";so(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;o&&(l=l.trim()),s&&(l=Cs(l)),e[En](l)}),o&&so(e,"change",()=>{e.value=e.value.trim()}),t||(so(e,"compositionstart",i1),so(e,"compositionend",nd),so(e,"change",nd))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:n,trim:a,number:s}},r){if(e[En]=Co(r),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?Cs(e.value):e.value,u=t??"";l!==u&&(document.activeElement===e&&e.type!=="range"&&(n&&t===o||a&&e.value.trim()===u)||(e.value=u))}},Vt={deep:!0,created(e,t,o){e[En]=Co(o),so(e,"change",()=>{const n=e._modelValue,a=ua(e),s=e.checked,r=e[En];if(He(n)){const l=nl(n,a),u=l!==-1;if(s&&!u)r(n.concat(a));else if(!s&&u){const d=[...n];d.splice(l,1),r(d)}}else if(na(n)){const l=new Set(n);s?l.add(a):l.delete(a),r(l)}else r(sd(e,s))})},mounted:od,beforeUpdate(e,t,o){e[En]=Co(o),od(e,t,o)}};function od(e,{value:t,oldValue:o},n){e._modelValue=t;let a;if(He(t))a=nl(t,n.props.value)>-1;else if(na(t))a=t.has(n.props.value);else{if(t===o)return;a=No(t,sd(e,!0))}e.checked!==a&&(e.checked=a)}const ro={created(e,{value:t},o){e.checked=No(t,o.props.value),e[En]=Co(o),so(e,"change",()=>{e[En](ua(e))})},beforeUpdate(e,{value:t,oldValue:o},n){e[En]=Co(n),t!==o&&(e.checked=No(t,n.props.value))}},ln={deep:!0,created(e,{value:t,modifiers:{number:o}},n){const a=na(t);so(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>o?Cs(ua(r)):ua(r));e[En](e.multiple?a?new Set(s):s:s[0]),e._assigning=!0,Qe(()=>{e._assigning=!1})}),e[En]=Co(n)},mounted(e,{value:t}){ad(e,t)},beforeUpdate(e,t,o){e[En]=Co(o)},updated(e,{value:t}){e._assigning||ad(e,t)}};function ad(e,t){const o=e.multiple,n=He(t);if(!(o&&!n&&!na(t))){for(let a=0,s=e.options.length;a<s;a++){const r=e.options[a],l=ua(r);if(o)if(n){const u=typeof l;u==="string"||u==="number"?r.selected=t.some(d=>String(d)===String(l)):r.selected=nl(t,l)>-1}else r.selected=t.has(l);else if(No(ua(r),t)){e.selectedIndex!==a&&(e.selectedIndex=a);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ua(e){return"_value"in e?e._value:e.value}function sd(e,t){const o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}const rd={created(e,t,o){or(e,t,o,null,"created")},mounted(e,t,o){or(e,t,o,null,"mounted")},beforeUpdate(e,t,o,n){or(e,t,o,n,"beforeUpdate")},updated(e,t,o,n){or(e,t,o,n,"updated")}};function u1(e,t){switch(e){case"SELECT":return ln;case"TEXTAREA":return $e;default:switch(t){case"checkbox":return Vt;case"radio":return ro;default:return $e}}}function or(e,t,o,n,a){const r=u1(e.tagName,o.props&&o.props.type)[a];r&&r(e,t,o,n)}const c1=["ctrl","shift","alt","meta"],d1={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)=>c1.some(o=>e[`${o}Key`]&&!t.includes(o))},ot=(e,t)=>{const o=e._withMods||(e._withMods={}),n=t.join(".");return o[n]||(o[n]=((a,...s)=>{for(let r=0;r<t.length;r++){const l=d1[t[r]];if(l&&l(a,t))return}return e(a,...s)}))},f1={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},en=(e,t)=>{const o=e._withKeys||(e._withKeys={}),n=t.join(".");return o[n]||(o[n]=(a=>{if(!("key"in a))return;const s=vo(a.key);if(t.some(r=>r===s||f1[r]===s))return e(a)}))},p1=Wt({patchProp:r1},jm);let ld;function id(){return ld||(ld=cm(p1))}const ud=((...e)=>{id().render(...e)}),g1=((...e)=>{const t=id().createApp(...e),{mount:o}=t;return t.mount=n=>{const a=m1(n);if(!a)return;const s=t._component;!ze(s)&&!s.render&&!s.template&&(s.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const r=o(a,!1,h1(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),r},t});function h1(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function m1(e){return $t(e)?document.querySelector(e):e}/*!
* shared v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function v1(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const ar=typeof window<"u",Eo=(e,t=!1)=>t?Symbol.for(e):Symbol(e),_1=(e,t,o)=>y1({l:e,k:t,s:o}),y1=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Nt=e=>typeof e=="number"&&isFinite(e),b1=e=>Ul(e)==="[object Date]",ca=e=>Ul(e)==="[object RegExp]",sr=e=>Je(e)&&Object.keys(e).length===0,Ht=Object.assign,w1=Object.create,gt=(e=null)=>w1(e);let cd;const Vo=()=>cd||(cd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:gt());function dd(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function fd(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function x1(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(n,a,s)=>`${a}="${fd(s)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(n,a,s)=>`${a}='${fd(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(n=>{e=e.replace(n,"$1javascript&#58;")}),e}const T1=Object.prototype.hasOwnProperty;function Rn(e,t){return T1.call(e,t)}const It=Array.isArray,Ct=e=>typeof e=="function",Re=e=>typeof e=="string",at=e=>typeof e=="boolean",lt=e=>e!==null&&typeof e=="object",S1=e=>lt(e)&&Ct(e.then)&&Ct(e.catch),pd=Object.prototype.toString,Ul=e=>pd.call(e),Je=e=>Ul(e)==="[object Object]",k1=e=>e==null?"":It(e)||Je(e)&&e.toString===pd?JSON.stringify(e,null,2):String(e);function Bl(e,t=""){return e.reduce((o,n,a)=>a===0?o+n:o+t+n,"")}const rr=e=>!lt(e)||It(e);function lr(e,t){if(rr(e)||rr(t))throw new Error("Invalid value");const o=[{src:e,des:t}];for(;o.length;){const{src:n,des:a}=o.pop();Object.keys(n).forEach(s=>{s!=="__proto__"&&(lt(n[s])&&!lt(a[s])&&(a[s]=Array.isArray(n[s])?[]:gt()),rr(a[s])||rr(n[s])?a[s]=n[s]:o.push({src:n[s],des:a[s]}))})}}/*!
* message-compiler v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function C1(e,t,o){return{line:e,column:t,offset:o}}function Hl(e,t,o){return{start:e,end:t}}const ut={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},E1=17;function ir(e,t,o={}){const{domain:n,messages:a,args:s}=o,r=e,l=new SyntaxError(String(r));return l.code=e,t&&(l.location=t),l.domain=n,l}function L1(e){throw e}const zn=" ",$1="\r",tn=`
`,A1="\u2028",I1="\u2029";function M1(e){const t=e;let o=0,n=1,a=1,s=0;const r=W=>t[W]===$1&&t[W+1]===tn,l=W=>t[W]===tn,u=W=>t[W]===I1,d=W=>t[W]===A1,c=W=>r(W)||l(W)||u(W)||d(W),f=()=>o,h=()=>n,p=()=>a,v=()=>s,y=W=>r(W)||u(W)||d(W)?tn:t[W],T=()=>y(o),k=()=>y(o+s);function $(){return s=0,c(o)&&(n++,a=0),r(o)&&o++,o++,a++,t[o]}function B(){return r(o+s)&&s++,s++,t[o+s]}function w(){o=0,n=1,a=1,s=0}function M(W=0){s=W}function H(){const W=o+s;for(;W!==o;)$();s=0}return{index:f,line:h,column:p,peekOffset:v,charAt:y,currentChar:T,currentPeek:k,next:$,peek:B,reset:w,resetPeek:M,skipToPeek:H}}const lo=void 0,O1=".",gd="'",R1="tokenizer";function N1(e,t={}){const o=t.location!==!1,n=M1(e),a=()=>n.index(),s=()=>C1(n.line(),n.column(),n.index()),r=s(),l=a(),u={currentType:13,offset:l,startLoc:r,endLoc:r,lastType:13,lastOffset:l,lastStartLoc:r,lastEndLoc:r,braceNest:0,inLinked:!1,text:""},d=()=>u,{onError:c}=t;function f(S,_,A,...j){const me=d();if(_.column+=A,_.offset+=A,c){const ue=o?Hl(me.startLoc,_):null,z=ir(S,ue,{domain:R1,args:j});c(z)}}function h(S,_,A){S.endLoc=s(),S.currentType=_;const j={type:_};return o&&(j.loc=Hl(S.startLoc,S.endLoc)),A!=null&&(j.value=A),j}const p=S=>h(S,13);function v(S,_){return S.currentChar()===_?(S.next(),_):(f(ut.EXPECTED_TOKEN,s(),0,_),"")}function y(S){let _="";for(;S.currentPeek()===zn||S.currentPeek()===tn;)_+=S.currentPeek(),S.peek();return _}function T(S){const _=y(S);return S.skipToPeek(),_}function k(S){if(S===lo)return!1;const _=S.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_===95}function $(S){if(S===lo)return!1;const _=S.charCodeAt(0);return _>=48&&_<=57}function B(S,_){const{currentType:A}=_;if(A!==2)return!1;y(S);const j=k(S.currentPeek());return S.resetPeek(),j}function w(S,_){const{currentType:A}=_;if(A!==2)return!1;y(S);const j=S.currentPeek()==="-"?S.peek():S.currentPeek(),me=$(j);return S.resetPeek(),me}function M(S,_){const{currentType:A}=_;if(A!==2)return!1;y(S);const j=S.currentPeek()===gd;return S.resetPeek(),j}function H(S,_){const{currentType:A}=_;if(A!==7)return!1;y(S);const j=S.currentPeek()===".";return S.resetPeek(),j}function W(S,_){const{currentType:A}=_;if(A!==8)return!1;y(S);const j=k(S.currentPeek());return S.resetPeek(),j}function D(S,_){const{currentType:A}=_;if(!(A===7||A===11))return!1;y(S);const j=S.currentPeek()===":";return S.resetPeek(),j}function I(S,_){const{currentType:A}=_;if(A!==9)return!1;const j=()=>{const ue=S.currentPeek();return ue==="{"?k(S.peek()):ue==="@"||ue==="|"||ue===":"||ue==="."||ue===zn||!ue?!1:ue===tn?(S.peek(),j()):K(S,!1)},me=j();return S.resetPeek(),me}function ee(S){y(S);const _=S.currentPeek()==="|";return S.resetPeek(),_}function K(S,_=!0){const A=(me=!1,ue="")=>{const z=S.currentPeek();return z==="{"||z==="@"||!z?me:z==="|"?!(ue===zn||ue===tn):z===zn?(S.peek(),A(!0,zn)):z===tn?(S.peek(),A(!0,tn)):!0},j=A();return _&&S.resetPeek(),j}function V(S,_){const A=S.currentChar();return A===lo?lo:_(A)?(S.next(),A):null}function ne(S){const _=S.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36}function oe(S){return V(S,ne)}function X(S){const _=S.charCodeAt(0);return _>=97&&_<=122||_>=65&&_<=90||_>=48&&_<=57||_===95||_===36||_===45}function re(S){return V(S,X)}function se(S){const _=S.charCodeAt(0);return _>=48&&_<=57}function F(S){return V(S,se)}function R(S){const _=S.charCodeAt(0);return _>=48&&_<=57||_>=65&&_<=70||_>=97&&_<=102}function ie(S){return V(S,R)}function Te(S){let _="",A="";for(;_=F(S);)A+=_;return A}function te(S){let _="";for(;;){const A=S.currentChar();if(A==="{"||A==="}"||A==="@"||A==="|"||!A)break;if(A===zn||A===tn)if(K(S))_+=A,S.next();else{if(ee(S))break;_+=A,S.next()}else _+=A,S.next()}return _}function le(S){T(S);let _="",A="";for(;_=re(S);)A+=_;const j=S.currentChar();if(j&&j!=="}"&&j!==lo&&j!==zn&&j!==tn&&j!==" "){const me=O(S);return f(ut.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,A+me),A+me}return S.currentChar()===lo&&f(ut.UNTERMINATED_CLOSING_BRACE,s(),0),A}function ve(S){T(S);let _="";return S.currentChar()==="-"?(S.next(),_+=`-${Te(S)}`):_+=Te(S),S.currentChar()===lo&&f(ut.UNTERMINATED_CLOSING_BRACE,s(),0),_}function xe(S){return S!==gd&&S!==tn}function pe(S){T(S),v(S,"'");let _="",A="";for(;_=V(S,xe);)_==="\\"?A+=P(S):A+=_;const j=S.currentChar();return j===tn||j===lo?(f(ut.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),j===tn&&(S.next(),v(S,"'")),A):(v(S,"'"),A)}function P(S){const _=S.currentChar();switch(_){case"\\":case"'":return S.next(),`\\${_}`;case"u":return q(S,_,4);case"U":return q(S,_,6);default:return f(ut.UNKNOWN_ESCAPE_SEQUENCE,s(),0,_),""}}function q(S,_,A){v(S,_);let j="";for(let me=0;me<A;me++){const ue=ie(S);if(!ue){f(ut.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${_}${j}${S.currentChar()}`);break}j+=ue}return`\\${_}${j}`}function Z(S){return S!=="{"&&S!=="}"&&S!==zn&&S!==tn}function O(S){T(S);let _="",A="";for(;_=V(S,Z);)A+=_;return A}function Q(S){let _="",A="";for(;_=oe(S);)A+=_;return A}function E(S){const _=A=>{const j=S.currentChar();return j==="{"||j==="@"||j==="|"||j==="("||j===")"||!j||j===zn?A:(A+=j,S.next(),_(A))};return _("")}function L(S){T(S);const _=v(S,"|");return T(S),_}function N(S,_){let A=null;switch(S.currentChar()){case"{":return _.braceNest>=1&&f(ut.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),S.next(),A=h(_,2,"{"),T(S),_.braceNest++,A;case"}":return _.braceNest>0&&_.currentType===2&&f(ut.EMPTY_PLACEHOLDER,s(),0),S.next(),A=h(_,3,"}"),_.braceNest--,_.braceNest>0&&T(S),_.inLinked&&_.braceNest===0&&(_.inLinked=!1),A;case"@":return _.braceNest>0&&f(ut.UNTERMINATED_CLOSING_BRACE,s(),0),A=J(S,_)||p(_),_.braceNest=0,A;default:{let me=!0,ue=!0,z=!0;if(ee(S))return _.braceNest>0&&f(ut.UNTERMINATED_CLOSING_BRACE,s(),0),A=h(_,1,L(S)),_.braceNest=0,_.inLinked=!1,A;if(_.braceNest>0&&(_.currentType===4||_.currentType===5||_.currentType===6))return f(ut.UNTERMINATED_CLOSING_BRACE,s(),0),_.braceNest=0,de(S,_);if(me=B(S,_))return A=h(_,4,le(S)),T(S),A;if(ue=w(S,_))return A=h(_,5,ve(S)),T(S),A;if(z=M(S,_))return A=h(_,6,pe(S)),T(S),A;if(!me&&!ue&&!z)return A=h(_,12,O(S)),f(ut.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,A.value),T(S),A;break}}return A}function J(S,_){const{currentType:A}=_;let j=null;const me=S.currentChar();switch((A===7||A===8||A===11||A===9)&&(me===tn||me===zn)&&f(ut.INVALID_LINKED_FORMAT,s(),0),me){case"@":return S.next(),j=h(_,7,"@"),_.inLinked=!0,j;case".":return T(S),S.next(),h(_,8,".");case":":return T(S),S.next(),h(_,9,":");default:return ee(S)?(j=h(_,1,L(S)),_.braceNest=0,_.inLinked=!1,j):H(S,_)||D(S,_)?(T(S),J(S,_)):W(S,_)?(T(S),h(_,11,Q(S))):I(S,_)?(T(S),me==="{"?N(S,_)||j:h(_,10,E(S))):(A===7&&f(ut.INVALID_LINKED_FORMAT,s(),0),_.braceNest=0,_.inLinked=!1,de(S,_))}}function de(S,_){let A={type:13};if(_.braceNest>0)return N(S,_)||p(_);if(_.inLinked)return J(S,_)||p(_);switch(S.currentChar()){case"{":return N(S,_)||p(_);case"}":return f(ut.UNBALANCED_CLOSING_BRACE,s(),0),S.next(),h(_,3,"}");case"@":return J(S,_)||p(_);default:{if(ee(S))return A=h(_,1,L(S)),_.braceNest=0,_.inLinked=!1,A;if(K(S))return h(_,0,te(S));break}}return A}function he(){const{currentType:S,offset:_,startLoc:A,endLoc:j}=u;return u.lastType=S,u.lastOffset=_,u.lastStartLoc=A,u.lastEndLoc=j,u.offset=a(),u.startLoc=s(),n.currentChar()===lo?h(u,13):de(n,u)}return{nextToken:he,currentOffset:a,currentPosition:s,context:d}}const D1="parser",P1=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function F1(e,t,o){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const n=parseInt(t||o,16);return n<=55295||n>=57344?String.fromCodePoint(n):"�"}}}function U1(e={}){const t=e.location!==!1,{onError:o}=e;function n(k,$,B,w,...M){const H=k.currentPosition();if(H.offset+=w,H.column+=w,o){const W=t?Hl(B,H):null,D=ir($,W,{domain:D1,args:M});o(D)}}function a(k,$,B){const w={type:k};return t&&(w.start=$,w.end=$,w.loc={start:B,end:B}),w}function s(k,$,B,w){t&&(k.end=$,k.loc&&(k.loc.end=B))}function r(k,$){const B=k.context(),w=a(3,B.offset,B.startLoc);return w.value=$,s(w,k.currentOffset(),k.currentPosition()),w}function l(k,$){const B=k.context(),{lastOffset:w,lastStartLoc:M}=B,H=a(5,w,M);return H.index=parseInt($,10),k.nextToken(),s(H,k.currentOffset(),k.currentPosition()),H}function u(k,$){const B=k.context(),{lastOffset:w,lastStartLoc:M}=B,H=a(4,w,M);return H.key=$,k.nextToken(),s(H,k.currentOffset(),k.currentPosition()),H}function d(k,$){const B=k.context(),{lastOffset:w,lastStartLoc:M}=B,H=a(9,w,M);return H.value=$.replace(P1,F1),k.nextToken(),s(H,k.currentOffset(),k.currentPosition()),H}function c(k){const $=k.nextToken(),B=k.context(),{lastOffset:w,lastStartLoc:M}=B,H=a(8,w,M);return $.type!==11?(n(k,ut.UNEXPECTED_EMPTY_LINKED_MODIFIER,B.lastStartLoc,0),H.value="",s(H,w,M),{nextConsumeToken:$,node:H}):($.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,B.lastStartLoc,0,qn($)),H.value=$.value||"",s(H,k.currentOffset(),k.currentPosition()),{node:H})}function f(k,$){const B=k.context(),w=a(7,B.offset,B.startLoc);return w.value=$,s(w,k.currentOffset(),k.currentPosition()),w}function h(k){const $=k.context(),B=a(6,$.offset,$.startLoc);let w=k.nextToken();if(w.type===8){const M=c(k);B.modifier=M.node,w=M.nextConsumeToken||k.nextToken()}switch(w.type!==9&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(w)),w=k.nextToken(),w.type===2&&(w=k.nextToken()),w.type){case 10:w.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(w)),B.key=f(k,w.value||"");break;case 4:w.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(w)),B.key=u(k,w.value||"");break;case 5:w.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(w)),B.key=l(k,w.value||"");break;case 6:w.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(w)),B.key=d(k,w.value||"");break;default:{n(k,ut.UNEXPECTED_EMPTY_LINKED_KEY,$.lastStartLoc,0);const M=k.context(),H=a(7,M.offset,M.startLoc);return H.value="",s(H,M.offset,M.startLoc),B.key=H,s(B,M.offset,M.startLoc),{nextConsumeToken:w,node:B}}}return s(B,k.currentOffset(),k.currentPosition()),{node:B}}function p(k){const $=k.context(),B=$.currentType===1?k.currentOffset():$.offset,w=$.currentType===1?$.endLoc:$.startLoc,M=a(2,B,w);M.items=[];let H=null;do{const I=H||k.nextToken();switch(H=null,I.type){case 0:I.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(I)),M.items.push(r(k,I.value||""));break;case 5:I.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(I)),M.items.push(l(k,I.value||""));break;case 4:I.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(I)),M.items.push(u(k,I.value||""));break;case 6:I.value==null&&n(k,ut.UNEXPECTED_LEXICAL_ANALYSIS,$.lastStartLoc,0,qn(I)),M.items.push(d(k,I.value||""));break;case 7:{const ee=h(k);M.items.push(ee.node),H=ee.nextConsumeToken||null;break}}}while($.currentType!==13&&$.currentType!==1);const W=$.currentType===1?$.lastOffset:k.currentOffset(),D=$.currentType===1?$.lastEndLoc:k.currentPosition();return s(M,W,D),M}function v(k,$,B,w){const M=k.context();let H=w.items.length===0;const W=a(1,$,B);W.cases=[],W.cases.push(w);do{const D=p(k);H||(H=D.items.length===0),W.cases.push(D)}while(M.currentType!==13);return H&&n(k,ut.MUST_HAVE_MESSAGES_IN_PLURAL,B,0),s(W,k.currentOffset(),k.currentPosition()),W}function y(k){const $=k.context(),{offset:B,startLoc:w}=$,M=p(k);return $.currentType===13?M:v(k,B,w,M)}function T(k){const $=N1(k,Ht({},e)),B=$.context(),w=a(0,B.offset,B.startLoc);return t&&w.loc&&(w.loc.source=k),w.body=y($),e.onCacheKey&&(w.cacheKey=e.onCacheKey(k)),B.currentType!==13&&n($,ut.UNEXPECTED_LEXICAL_ANALYSIS,B.lastStartLoc,0,k[B.offset]||""),s(w,$.currentOffset(),$.currentPosition()),w}return{parse:T}}function qn(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 B1(e,t={}){const o={ast:e,helpers:new Set};return{context:()=>o,helper:s=>(o.helpers.add(s),s)}}function hd(e,t){for(let o=0;o<e.length;o++)jl(e[o],t)}function jl(e,t){switch(e.type){case 1:hd(e.cases,t),t.helper("plural");break;case 2:hd(e.items,t);break;case 6:{jl(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 H1(e,t={}){const o=B1(e);o.helper("normalize"),e.body&&jl(e.body,o);const n=o.context();e.helpers=Array.from(n.helpers)}function j1(e){const t=e.body;return t.type===2?md(t):t.cases.forEach(o=>md(o)),e}function md(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 o=0;o<e.items.length;o++){const n=e.items[o];if(!(n.type===3||n.type===9)||n.value==null)break;t.push(n.value)}if(t.length===e.items.length){e.static=Bl(t);for(let o=0;o<e.items.length;o++){const n=e.items[o];(n.type===3||n.type===9)&&delete n.value}}}}function da(e){switch(e.t=e.type,e.type){case 0:{const t=e;da(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,o=t.cases;for(let n=0;n<o.length;n++)da(o[n]);t.c=o,delete t.cases;break}case 2:{const t=e,o=t.items;for(let n=0;n<o.length;n++)da(o[n]);t.i=o,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;da(t.key),t.k=t.key,delete t.key,t.modifier&&(da(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 W1(e,t){const{filename:o,breakLineCode:n,needIndent:a}=t,s=t.location!==!1,r={filename:o,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:n,needIndent:a,indentLevel:0};s&&e.loc&&(r.source=e.loc.source);const l=()=>r;function u(y,T){r.code+=y}function d(y,T=!0){const k=T?n:"";u(a?k+" ".repeat(y):k)}function c(y=!0){const T=++r.indentLevel;y&&d(T)}function f(y=!0){const T=--r.indentLevel;y&&d(T)}function h(){d(r.indentLevel)}return{context:l,push:u,indent:c,deindent:f,newline:h,helper:y=>`_${y}`,needIndent:()=>r.needIndent}}function V1(e,t){const{helper:o}=e;e.push(`${o("linked")}(`),fa(e,t.key),t.modifier?(e.push(", "),fa(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function z1(e,t){const{helper:o,needIndent:n}=e;e.push(`${o("normalize")}([`),e.indent(n());const a=t.items.length;for(let s=0;s<a&&(fa(e,t.items[s]),s!==a-1);s++)e.push(", ");e.deindent(n()),e.push("])")}function q1(e,t){const{helper:o,needIndent:n}=e;if(t.cases.length>1){e.push(`${o("plural")}([`),e.indent(n());const a=t.cases.length;for(let s=0;s<a&&(fa(e,t.cases[s]),s!==a-1);s++)e.push(", ");e.deindent(n()),e.push("])")}}function G1(e,t){t.body?fa(e,t.body):e.push("null")}function fa(e,t){const{helper:o}=e;switch(t.type){case 0:G1(e,t);break;case 1:q1(e,t);break;case 2:z1(e,t);break;case 6:V1(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(`${o("interpolate")}(${o("list")}(${t.index}))`,t);break;case 4:e.push(`${o("interpolate")}(${o("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 Q1=(e,t={})=>{const o=Re(t.mode)?t.mode:"normal",n=Re(t.filename)?t.filename:"message.intl";t.sourceMap;const a=t.breakLineCode!=null?t.breakLineCode:o==="arrow"?";":`
`,s=t.needIndent?t.needIndent:o!=="arrow",r=e.helpers||[],l=W1(e,{filename:n,breakLineCode:a,needIndent:s});l.push(o==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),r.length>0&&(l.push(`const { ${Bl(r.map(c=>`${c}: _${c}`),", ")} } = ctx`),l.newline()),l.push("return "),fa(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:u,map:d}=l.context();return{ast:e,code:u,map:d?d.toJSON():void 0}};function Y1(e,t={}){const o=Ht({},t),n=!!o.jit,a=!!o.minify,s=o.optimize==null?!0:o.optimize,l=U1(o).parse(e);return n?(s&&j1(l),a&&da(l),{ast:l,code:""}):(H1(l,o),Q1(l,o))}/*!
* core-base v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/function K1(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vo().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vo().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Gn(e){return lt(e)&&Wl(e)===0&&(Rn(e,"b")||Rn(e,"body"))}const vd=["b","body"];function J1(e){return Lo(e,vd)}const _d=["c","cases"];function X1(e){return Lo(e,_d,[])}const yd=["s","static"];function Z1(e){return Lo(e,yd)}const bd=["i","items"];function ev(e){return Lo(e,bd,[])}const wd=["t","type"];function Wl(e){return Lo(e,wd)}const xd=["v","value"];function ur(e,t){const o=Lo(e,xd);if(o!=null)return o;throw es(t)}const Td=["m","modifier"];function tv(e){return Lo(e,Td)}const Sd=["k","key"];function nv(e){const t=Lo(e,Sd);if(t)return t;throw es(6)}function Lo(e,t,o){for(let n=0;n<t.length;n++){const a=t[n];if(Rn(e,a)&&e[a]!=null)return e[a]}return o}const kd=[...vd,..._d,...yd,...bd,...Sd,...Td,...xd,...wd];function es(e){return new Error(`unhandled node type: ${e}`)}function Vl(e){return o=>ov(o,e)}function ov(e,t){const o=J1(t);if(o==null)throw es(0);if(Wl(o)===1){const s=X1(o);return e.plural(s.reduce((r,l)=>[...r,Cd(e,l)],[]))}else return Cd(e,o)}function Cd(e,t){const o=Z1(t);if(o!=null)return e.type==="text"?o:e.normalize([o]);{const n=ev(t).reduce((a,s)=>[...a,zl(e,s)],[]);return e.normalize(n)}}function zl(e,t){const o=Wl(t);switch(o){case 3:return ur(t,o);case 9:return ur(t,o);case 4:{const n=t;if(Rn(n,"k")&&n.k)return e.interpolate(e.named(n.k));if(Rn(n,"key")&&n.key)return e.interpolate(e.named(n.key));throw es(o)}case 5:{const n=t;if(Rn(n,"i")&&Nt(n.i))return e.interpolate(e.list(n.i));if(Rn(n,"index")&&Nt(n.index))return e.interpolate(e.list(n.index));throw es(o)}case 6:{const n=t,a=tv(n),s=nv(n);return e.linked(zl(e,s),a?zl(e,a):void 0,e.type)}case 7:return ur(t,o);case 8:return ur(t,o);default:throw new Error(`unhandled node on format message part: ${o}`)}}const av=e=>e;let cr=gt();function sv(e,t={}){let o=!1;const n=t.onError||L1;return t.onError=a=>{o=!0,n(a)},{...Y1(e,t),detectError:o}}function rv(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Re(e)){at(t.warnHtmlMessage)&&t.warnHtmlMessage;const n=(t.onCacheKey||av)(e),a=cr[n];if(a)return a;const{ast:s,detectError:r}=sv(e,{...t,location:!1,jit:!0}),l=Vl(s);return r?l:cr[n]=l}else{const o=e.cacheKey;if(o){const n=cr[o];return n||(cr[o]=Vl(e))}else return Vl(e)}}let ts=null;function lv(e){ts=e}function iv(e,t,o){ts&&ts.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:o})}const uv=cv("function:translate");function cv(e){return t=>ts&&ts.emit(e,t)}const io={INVALID_ARGUMENT:E1,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},dv=24;function uo(e){return ir(e,null,void 0)}function ql(e,t){return t.locale!=null?Ed(t.locale):Ed(e.locale)}let Gl;function Ed(e){if(Re(e))return e;if(Ct(e)){if(e.resolvedOnce&&Gl!=null)return Gl;if(e.constructor.name==="Function"){const t=e();if(S1(t))throw uo(io.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Gl=t}else throw uo(io.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw uo(io.NOT_SUPPORT_LOCALE_TYPE)}function fv(e,t,o){return[...new Set([o,...It(t)?t:lt(t)?Object.keys(t):Re(t)?[t]:[o]])]}function Ld(e,t,o){const n=Re(o)?o:ns,a=e;a.__localeChainCache||(a.__localeChainCache=new Map);let s=a.__localeChainCache.get(n);if(!s){s=[];let r=[o];for(;It(r);)r=$d(s,r,t);const l=It(t)||!Je(t)?t:t.default?t.default:null;r=Re(l)?[l]:l,It(r)&&$d(s,r,!1),a.__localeChainCache.set(n,s)}return s}function $d(e,t,o){let n=!0;for(let a=0;a<t.length&&at(n);a++){const s=t[a];Re(s)&&(n=pv(e,t[a],o))}return n}function pv(e,t,o){let n;const a=t.split("-");do{const s=a.join("-");n=gv(e,s,o),a.splice(-1,1)}while(a.length&&n===!0);return n}function gv(e,t,o){let n=!1;if(!e.includes(t)&&(n=!0,t)){n=t[t.length-1]!=="!";const a=t.replace(/!/g,"");e.push(a),(It(o)||Je(o))&&o[a]&&(n=o[a])}return n}const $o=[];$o[0]={w:[0],i:[3,0],"[":[4],o:[7]},$o[1]={w:[1],".":[2],"[":[4],o:[7]},$o[2]={w:[2],i:[3,0],0:[3,0]},$o[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},$o[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},$o[5]={"'":[4,0],o:8,l:[5,0]},$o[6]={'"':[4,0],o:8,l:[6,0]};const hv=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function mv(e){return hv.test(e)}function vv(e){const t=e.charCodeAt(0),o=e.charCodeAt(e.length-1);return t===o&&(t===34||t===39)?e.slice(1,-1):e}function _v(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 yv(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:mv(t)?vv(t):"*"+t}function bv(e){const t=[];let o=-1,n=0,a=0,s,r,l,u,d,c,f;const h=[];h[0]=()=>{r===void 0?r=l:r+=l},h[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},h[2]=()=>{h[0](),a++},h[3]=()=>{if(a>0)a--,n=4,h[0]();else{if(a=0,r===void 0||(r=yv(r),r===!1))return!1;h[1]()}};function p(){const v=e[o+1];if(n===5&&v==="'"||n===6&&v==='"')return o++,l="\\"+v,h[0](),!0}for(;n!==null;)if(o++,s=e[o],!(s==="\\"&&p())){if(u=_v(s),f=$o[n],d=f[u]||f.l||8,d===8||(n=d[0],d[1]!==void 0&&(c=h[d[1]],c&&(l=s,c()===!1))))return;if(n===7)return t}}const Ad=new Map;function wv(e,t){return lt(e)?e[t]:null}function xv(e,t){if(!lt(e))return null;let o=Ad.get(t);if(o||(o=bv(t),o&&Ad.set(t,o)),!o)return null;const n=o.length;let a=e,s=0;for(;s<n;){const r=o[s];if(kd.includes(r)&&Gn(a))return null;const l=a[r];if(l===void 0||Ct(a))return null;a=l,s++}return a}const Tv="11.1.12",dr=-1,ns="en-US",Id="",Md=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function Sv(){return{upper:(e,t)=>t==="text"&&Re(e)?e.toUpperCase():t==="vnode"&&lt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Re(e)?e.toLowerCase():t==="vnode"&&lt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Re(e)?Md(e):t==="vnode"&&lt(e)&&"__v_isVNode"in e?Md(e.children):e}}let Od;function kv(e){Od=e}let Rd;function Cv(e){Rd=e}let Nd;function Ev(e){Nd=e}let Dd=null;const Lv=e=>{Dd=e},$v=()=>Dd;let Pd=null;const Fd=e=>{Pd=e},Av=()=>Pd;let Ud=0;function Iv(e={}){const t=Ct(e.onWarn)?e.onWarn:v1,o=Re(e.version)?e.version:Tv,n=Re(e.locale)||Ct(e.locale)?e.locale:ns,a=Ct(n)?ns:n,s=It(e.fallbackLocale)||Je(e.fallbackLocale)||Re(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a,r=Je(e.messages)?e.messages:Ql(a),l=Je(e.datetimeFormats)?e.datetimeFormats:Ql(a),u=Je(e.numberFormats)?e.numberFormats:Ql(a),d=Ht(gt(),e.modifiers,Sv()),c=e.pluralRules||gt(),f=Ct(e.missing)?e.missing:null,h=at(e.missingWarn)||ca(e.missingWarn)?e.missingWarn:!0,p=at(e.fallbackWarn)||ca(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,y=!!e.unresolving,T=Ct(e.postTranslation)?e.postTranslation:null,k=Je(e.processor)?e.processor:null,$=at(e.warnHtmlMessage)?e.warnHtmlMessage:!0,B=!!e.escapeParameter,w=Ct(e.messageCompiler)?e.messageCompiler:Od,M=Ct(e.messageResolver)?e.messageResolver:Rd||wv,H=Ct(e.localeFallbacker)?e.localeFallbacker:Nd||fv,W=lt(e.fallbackContext)?e.fallbackContext:void 0,D=e,I=lt(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,ee=lt(D.__numberFormatters)?D.__numberFormatters:new Map,K=lt(D.__meta)?D.__meta:{};Ud++;const V={version:o,cid:Ud,locale:n,fallbackLocale:s,messages:r,modifiers:d,pluralRules:c,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:v,unresolving:y,postTranslation:T,processor:k,warnHtmlMessage:$,escapeParameter:B,messageCompiler:w,messageResolver:M,localeFallbacker:H,fallbackContext:W,onWarn:t,__meta:K};return V.datetimeFormats=l,V.numberFormats=u,V.__datetimeFormatters=I,V.__numberFormatters=ee,__INTLIFY_PROD_DEVTOOLS__&&iv(V,o,K),V}const Ql=e=>({[e]:gt()});function Yl(e,t,o,n,a){const{missing:s,onWarn:r}=e;if(s!==null){const l=s(e,o,t,a);return Re(l)?l:t}else return t}function os(e,t,o){const n=e;n.__localeChainCache=new Map,e.localeFallbacker(e,o,t)}function Mv(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function Ov(e,t){const o=t.indexOf(e);if(o===-1)return!1;for(let n=o+1;n<t.length;n++)if(Mv(e,t[n]))return!0;return!1}function Bd(e,...t){const{datetimeFormats:o,unresolving:n,fallbackLocale:a,onWarn:s,localeFallbacker:r}=e,{__datetimeFormatters:l}=e,[u,d,c,f]=Kl(...t),h=at(c.missingWarn)?c.missingWarn:e.missingWarn;at(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=ql(e,c),y=r(e,a,v);if(!Re(u)||u==="")return new Intl.DateTimeFormat(v,f).format(d);let T={},k,$=null;const B="datetime format";for(let H=0;H<y.length&&(k=y[H],T=o[k]||{},$=T[u],!Je($));H++)Yl(e,u,k,h,B);if(!Je($)||!Re(k))return n?dr:u;let w=`${k}__${u}`;sr(f)||(w=`${w}__${JSON.stringify(f)}`);let M=l.get(w);return M||(M=new Intl.DateTimeFormat(k,Ht({},$,f)),l.set(w,M)),p?M.formatToParts(d):M.format(d)}const Hd=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Kl(...e){const[t,o,n,a]=e,s=gt();let r=gt(),l;if(Re(t)){const u=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw uo(io.INVALID_ISO_DATE_ARGUMENT);const d=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();l=new Date(d);try{l.toISOString()}catch{throw uo(io.INVALID_ISO_DATE_ARGUMENT)}}else if(b1(t)){if(isNaN(t.getTime()))throw uo(io.INVALID_DATE_ARGUMENT);l=t}else if(Nt(t))l=t;else throw uo(io.INVALID_ARGUMENT);return Re(o)?s.key=o:Je(o)&&Object.keys(o).forEach(u=>{Hd.includes(u)?r[u]=o[u]:s[u]=o[u]}),Re(n)?s.locale=n:Je(n)&&(r=n),Je(a)&&(r=a),[s.key||"",l,s,r]}function jd(e,t,o){const n=e;for(const a in o){const s=`${t}__${a}`;n.__datetimeFormatters.has(s)&&n.__datetimeFormatters.delete(s)}}function Wd(e,...t){const{numberFormats:o,unresolving:n,fallbackLocale:a,onWarn:s,localeFallbacker:r}=e,{__numberFormatters:l}=e,[u,d,c,f]=Jl(...t),h=at(c.missingWarn)?c.missingWarn:e.missingWarn;at(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn;const p=!!c.part,v=ql(e,c),y=r(e,a,v);if(!Re(u)||u==="")return new Intl.NumberFormat(v,f).format(d);let T={},k,$=null;const B="number format";for(let H=0;H<y.length&&(k=y[H],T=o[k]||{},$=T[u],!Je($));H++)Yl(e,u,k,h,B);if(!Je($)||!Re(k))return n?dr:u;let w=`${k}__${u}`;sr(f)||(w=`${w}__${JSON.stringify(f)}`);let M=l.get(w);return M||(M=new Intl.NumberFormat(k,Ht({},$,f)),l.set(w,M)),p?M.formatToParts(d):M.format(d)}const Vd=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Jl(...e){const[t,o,n,a]=e,s=gt();let r=gt();if(!Nt(t))throw uo(io.INVALID_ARGUMENT);const l=t;return Re(o)?s.key=o:Je(o)&&Object.keys(o).forEach(u=>{Vd.includes(u)?r[u]=o[u]:s[u]=o[u]}),Re(n)?s.locale=n:Je(n)&&(r=n),Je(a)&&(r=a),[s.key||"",l,s,r]}function zd(e,t,o){const n=e;for(const a in o){const s=`${t}__${a}`;n.__numberFormatters.has(s)&&n.__numberFormatters.delete(s)}}const Rv=e=>e,Nv=e=>"",Dv="text",Pv=e=>e.length===0?"":Bl(e),Fv=k1;function qd(e,t){return e=Math.abs(e),t===2?e?e>1?1:0:1:e?Math.min(e,2):0}function Uv(e){const t=Nt(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(Nt(e.named.count)||Nt(e.named.n))?Nt(e.named.count)?e.named.count:Nt(e.named.n)?e.named.n:t:t}function Bv(e,t){t.count||(t.count=e),t.n||(t.n=e)}function Hv(e={}){const t=e.locale,o=Uv(e),n=lt(e.pluralRules)&&Re(t)&&Ct(e.pluralRules[t])?e.pluralRules[t]:qd,a=lt(e.pluralRules)&&Re(t)&&Ct(e.pluralRules[t])?qd:void 0,s=k=>k[n(o,k.length,a)],r=e.list||[],l=k=>r[k],u=e.named||gt();Nt(e.pluralIndex)&&Bv(o,u);const d=k=>u[k];function c(k,$){const B=Ct(e.messages)?e.messages(k,!!$):lt(e.messages)?e.messages[k]:!1;return B||(e.parent?e.parent.message(k):Nv)}const f=k=>e.modifiers?e.modifiers[k]:Rv,h=Je(e.processor)&&Ct(e.processor.normalize)?e.processor.normalize:Pv,p=Je(e.processor)&&Ct(e.processor.interpolate)?e.processor.interpolate:Fv,v=Je(e.processor)&&Re(e.processor.type)?e.processor.type:Dv,T={list:l,named:d,plural:s,linked:(k,...$)=>{const[B,w]=$;let M="text",H="";$.length===1?lt(B)?(H=B.modifier||H,M=B.type||M):Re(B)&&(H=B||H):$.length===2&&(Re(B)&&(H=B||H),Re(w)&&(M=w||M));const W=c(k,!0)(T),D=M==="vnode"&&It(W)&&H?W[0]:W;return H?f(H)(D,M):D},message:c,type:v,interpolate:p,normalize:h,values:Ht(gt(),r,u)};return T}const Gd=()=>"",Ln=e=>Ct(e);function Qd(e,...t){const{fallbackFormat:o,postTranslation:n,unresolving:a,messageCompiler:s,fallbackLocale:r,messages:l}=e,[u,d]=Xl(...t),c=at(d.missingWarn)?d.missingWarn:e.missingWarn,f=at(d.fallbackWarn)?d.fallbackWarn:e.fallbackWarn,h=at(d.escapeParameter)?d.escapeParameter:e.escapeParameter,p=!!d.resolvedMessage,v=Re(d.default)||at(d.default)?at(d.default)?s?u:()=>u:d.default:o?s?u:()=>u:null,y=o||v!=null&&(Re(v)||Ct(v)),T=ql(e,d);h&&jv(d);let[k,$,B]=p?[u,T,l[T]||gt()]:Yd(e,u,T,r,f,c),w=k,M=u;if(!p&&!(Re(w)||Gn(w)||Ln(w))&&y&&(w=v,M=w),!p&&(!(Re(w)||Gn(w)||Ln(w))||!Re($)))return a?dr:u;let H=!1;const W=()=>{H=!0},D=Ln(w)?w:Kd(e,u,$,w,M,W);if(H)return w;const I=zv(e,$,B,d),ee=Hv(I),K=Wv(e,D,ee);let V=n?n(K,u):K;if(h&&Re(V)&&(V=x1(V)),__INTLIFY_PROD_DEVTOOLS__){const ne={timestamp:Date.now(),key:Re(u)?u:Ln(w)?w.key:"",locale:$||(Ln(w)?w.locale:""),format:Re(w)?w:Ln(w)?w.source:"",message:V};ne.meta=Ht({},e.__meta,$v()||{}),uv(ne)}return V}function jv(e){It(e.list)?e.list=e.list.map(t=>Re(t)?dd(t):t):lt(e.named)&&Object.keys(e.named).forEach(t=>{Re(e.named[t])&&(e.named[t]=dd(e.named[t]))})}function Yd(e,t,o,n,a,s){const{messages:r,onWarn:l,messageResolver:u,localeFallbacker:d}=e,c=d(e,n,o);let f=gt(),h,p=null;const v="translate";for(let y=0;y<c.length&&(h=c[y],f=r[h]||gt(),(p=u(f,t))===null&&(p=f[t]),!(Re(p)||Gn(p)||Ln(p)));y++)if(!Ov(h,c)){const T=Yl(e,t,h,s,v);T!==t&&(p=T)}return[p,h,f]}function Kd(e,t,o,n,a,s){const{messageCompiler:r,warnHtmlMessage:l}=e;if(Ln(n)){const d=n;return d.locale=d.locale||o,d.key=d.key||t,d}if(r==null){const d=(()=>n);return d.locale=o,d.key=t,d}const u=r(n,Vv(e,o,a,n,l,s));return u.locale=o,u.key=t,u.source=n,u}function Wv(e,t,o){return t(o)}function Xl(...e){const[t,o,n]=e,a=gt();if(!Re(t)&&!Nt(t)&&!Ln(t)&&!Gn(t))throw uo(io.INVALID_ARGUMENT);const s=Nt(t)?String(t):(Ln(t),t);return Nt(o)?a.plural=o:Re(o)?a.default=o:Je(o)&&!sr(o)?a.named=o:It(o)&&(a.list=o),Nt(n)?a.plural=n:Re(n)?a.default=n:Je(n)&&Ht(a,n),[s,a]}function Vv(e,t,o,n,a,s){return{locale:t,key:o,warnHtmlMessage:a,onError:r=>{throw s&&s(r),r},onCacheKey:r=>_1(t,o,r)}}function zv(e,t,o,n){const{modifiers:a,pluralRules:s,messageResolver:r,fallbackLocale:l,fallbackWarn:u,missingWarn:d,fallbackContext:c}=e,h={locale:t,modifiers:a,pluralRules:s,messages:(p,v)=>{let y=r(o,p);if(y==null&&(c||v)){const[,,T]=Yd(c||e,p,t,l,u,d);y=r(T,p)}if(Re(y)||Gn(y)){let T=!1;const $=Kd(e,p,t,y,p,()=>{T=!0});return T?Gd:$}else return Ln(y)?y:Gd}};return e.processor&&(h.processor=e.processor),n.list&&(h.list=n.list),n.named&&(h.named=n.named),Nt(n.plural)&&(h.pluralIndex=n.plural),h}K1();/*!
* vue-i18n v11.1.12
* (c) 2025 kazuya kawaguchi
* Released under the MIT License.
*/const qv="11.1.12";function Gv(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Vo().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Vo().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Vo().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Vo().__INTLIFY_PROD_DEVTOOLS__=!1)}const gn={UNEXPECTED_RETURN_TYPE:dv,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 bn(e,...t){return ir(e,null,void 0)}const Zl=Eo("__translateVNode"),ei=Eo("__datetimeParts"),ti=Eo("__numberParts"),Jd=Eo("__setPluralRules"),Xd=Eo("__injectWithOption"),ni=Eo("__dispose");function as(e){if(!lt(e)||Gn(e))return e;for(const t in e)if(Rn(e,t))if(!t.includes("."))lt(e[t])&&as(e[t]);else{const o=t.split("."),n=o.length-1;let a=e,s=!1;for(let r=0;r<n;r++){if(o[r]==="__proto__")throw new Error(`unsafe key: ${o[r]}`);if(o[r]in a||(a[o[r]]=gt()),!lt(a[o[r]])){s=!0;break}a=a[o[r]]}if(s||(Gn(a)?kd.includes(o[n])||delete e[t]:(a[o[n]]=e[t],delete e[t])),!Gn(a)){const r=a[o[n]];lt(r)&&as(r)}}return e}function oi(e,t){const{messages:o,__i18n:n,messageResolver:a,flatJson:s}=t,r=Je(o)?o:It(n)?gt():{[e]:gt()};if(It(n)&&n.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:d}=l;u?(r[u]=r[u]||gt(),lr(d,r[u])):lr(d,r)}else Re(l)&&lr(JSON.parse(l),r)}),a==null&&s)for(const l in r)Rn(r,l)&&as(r[l]);return r}function Zd(e){return e.type}function ef(e,t,o){let n=lt(t.messages)?t.messages:gt();"__i18nGlobal"in o&&(n=oi(e.locale.value,{messages:n,__i18n:o.__i18nGlobal}));const a=Object.keys(n);a.length&&a.forEach(s=>{e.mergeLocaleMessage(s,n[s])});{if(lt(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(lt(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function tf(e){return qe(za,null,e,0)}const nf="__INTLIFY_META__",of=()=>[],Qv=()=>!1;let af=0;function sf(e){return((t,o,n,a)=>e(o,n,So()||void 0,a))}const Yv=()=>{const e=So();let t=null;return e&&(t=Zd(e)[nf])?{[nf]:t}:null};function ai(e={}){const{__root:t,__injectWithOption:o}=e,n=t===void 0,a=e.flatJson,s=ar?b:hh;let r=at(e.inheritLocale)?e.inheritLocale:!0;const l=s(t&&r?t.locale.value:Re(e.locale)?e.locale:ns),u=s(t&&r?t.fallbackLocale.value:Re(e.fallbackLocale)||It(e.fallbackLocale)||Je(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),d=s(oi(l.value,e)),c=s(Je(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),f=s(Je(e.numberFormats)?e.numberFormats:{[l.value]:{}});let h=t?t.missingWarn:at(e.missingWarn)||ca(e.missingWarn)?e.missingWarn:!0,p=t?t.fallbackWarn:at(e.fallbackWarn)||ca(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:at(e.fallbackRoot)?e.fallbackRoot:!0,y=!!e.fallbackFormat,T=Ct(e.missing)?e.missing:null,k=Ct(e.missing)?sf(e.missing):null,$=Ct(e.postTranslation)?e.postTranslation:null,B=t?t.warnHtmlMessage:at(e.warnHtmlMessage)?e.warnHtmlMessage:!0,w=!!e.escapeParameter;const M=t?t.modifiers:Je(e.modifiers)?e.modifiers:{};let H=e.pluralRules||t&&t.pluralRules,W;W=(()=>{n&&Fd(null);const z={version:qv,locale:l.value,fallbackLocale:u.value,messages:d.value,modifiers:M,pluralRules:H,missing:k===null?void 0:k,missingWarn:h,fallbackWarn:p,fallbackFormat:y,unresolving:!0,postTranslation:$===null?void 0:$,warnHtmlMessage:B,escapeParameter:w,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};z.datetimeFormats=c.value,z.numberFormats=f.value,z.__datetimeFormatters=Je(W)?W.__datetimeFormatters:void 0,z.__numberFormatters=Je(W)?W.__numberFormatters:void 0;const ae=Iv(z);return n&&Fd(ae),ae})(),os(W,l.value,u.value);function I(){return[l.value,u.value,d.value,c.value,f.value]}const ee=nt({get:()=>l.value,set:z=>{W.locale=z,l.value=z}}),K=nt({get:()=>u.value,set:z=>{W.fallbackLocale=z,u.value=z,os(W,l.value,z)}}),V=nt(()=>d.value),ne=nt(()=>c.value),oe=nt(()=>f.value);function X(){return Ct($)?$:null}function re(z){$=z,W.postTranslation=z}function se(){return T}function F(z){z!==null&&(k=sf(z)),T=z,W.missing=k}const R=(z,ae,Me,Pe,je,st)=>{I();let tt;try{__INTLIFY_PROD_DEVTOOLS__,n||(W.fallbackContext=t?Av():void 0),tt=z(W)}finally{__INTLIFY_PROD_DEVTOOLS__,n||(W.fallbackContext=void 0)}if(Me!=="translate exists"&&Nt(tt)&&tt===dr||Me==="translate exists"&&!tt){const[Ie,ke]=ae();return t&&v?Pe(t):je(Ie)}else{if(st(tt))return tt;throw bn(gn.UNEXPECTED_RETURN_TYPE)}};function ie(...z){return R(ae=>Reflect.apply(Qd,null,[ae,...z]),()=>Xl(...z),"translate",ae=>Reflect.apply(ae.t,ae,[...z]),ae=>ae,ae=>Re(ae))}function Te(...z){const[ae,Me,Pe]=z;if(Pe&&!lt(Pe))throw bn(gn.INVALID_ARGUMENT);return ie(ae,Me,Ht({resolvedMessage:!0},Pe||{}))}function te(...z){return R(ae=>Reflect.apply(Bd,null,[ae,...z]),()=>Kl(...z),"datetime format",ae=>Reflect.apply(ae.d,ae,[...z]),()=>Id,ae=>Re(ae)||It(ae))}function le(...z){return R(ae=>Reflect.apply(Wd,null,[ae,...z]),()=>Jl(...z),"number format",ae=>Reflect.apply(ae.n,ae,[...z]),()=>Id,ae=>Re(ae)||It(ae))}function ve(z){return z.map(ae=>Re(ae)||Nt(ae)||at(ae)?tf(String(ae)):ae)}const pe={normalize:ve,interpolate:z=>z,type:"vnode"};function P(...z){return R(ae=>{let Me;const Pe=ae;try{Pe.processor=pe,Me=Reflect.apply(Qd,null,[Pe,...z])}finally{Pe.processor=null}return Me},()=>Xl(...z),"translate",ae=>ae[Zl](...z),ae=>[tf(ae)],ae=>It(ae))}function q(...z){return R(ae=>Reflect.apply(Wd,null,[ae,...z]),()=>Jl(...z),"number format",ae=>ae[ti](...z),of,ae=>Re(ae)||It(ae))}function Z(...z){return R(ae=>Reflect.apply(Bd,null,[ae,...z]),()=>Kl(...z),"datetime format",ae=>ae[ei](...z),of,ae=>Re(ae)||It(ae))}function O(z){H=z,W.pluralRules=H}function Q(z,ae){return R(()=>{if(!z)return!1;const Me=Re(ae)?ae:l.value,Pe=N(Me),je=W.messageResolver(Pe,z);return Gn(je)||Ln(je)||Re(je)},()=>[z],"translate exists",Me=>Reflect.apply(Me.te,Me,[z,ae]),Qv,Me=>at(Me))}function E(z){let ae=null;const Me=Ld(W,u.value,l.value);for(let Pe=0;Pe<Me.length;Pe++){const je=d.value[Me[Pe]]||{},st=W.messageResolver(je,z);if(st!=null){ae=st;break}}return ae}function L(z){const ae=E(z);return ae??(t?t.tm(z)||{}:{})}function N(z){return d.value[z]||{}}function J(z,ae){if(a){const Me={[z]:ae};for(const Pe in Me)Rn(Me,Pe)&&as(Me[Pe]);ae=Me[z]}d.value[z]=ae,W.messages=d.value}function de(z,ae){d.value[z]=d.value[z]||{};const Me={[z]:ae};if(a)for(const Pe in Me)Rn(Me,Pe)&&as(Me[Pe]);ae=Me[z],lr(ae,d.value[z]),W.messages=d.value}function he(z){return c.value[z]||{}}function S(z,ae){c.value[z]=ae,W.datetimeFormats=c.value,jd(W,z,ae)}function _(z,ae){c.value[z]=Ht(c.value[z]||{},ae),W.datetimeFormats=c.value,jd(W,z,ae)}function A(z){return f.value[z]||{}}function j(z,ae){f.value[z]=ae,W.numberFormats=f.value,zd(W,z,ae)}function me(z,ae){f.value[z]=Ht(f.value[z]||{},ae),W.numberFormats=f.value,zd(W,z,ae)}af++,t&&ar&&(dt(t.locale,z=>{r&&(l.value=z,W.locale=z,os(W,l.value,u.value))}),dt(t.fallbackLocale,z=>{r&&(u.value=z,W.fallbackLocale=z,os(W,l.value,u.value))}));const ue={id:af,locale:ee,fallbackLocale:K,get inheritLocale(){return r},set inheritLocale(z){r=z,z&&t&&(l.value=t.locale.value,u.value=t.fallbackLocale.value,os(W,l.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:V,get modifiers(){return M},get pluralRules(){return H||{}},get isGlobal(){return n},get missingWarn(){return h},set missingWarn(z){h=z,W.missingWarn=h},get fallbackWarn(){return p},set fallbackWarn(z){p=z,W.fallbackWarn=p},get fallbackRoot(){return v},set fallbackRoot(z){v=z},get fallbackFormat(){return y},set fallbackFormat(z){y=z,W.fallbackFormat=y},get warnHtmlMessage(){return B},set warnHtmlMessage(z){B=z,W.warnHtmlMessage=z},get escapeParameter(){return w},set escapeParameter(z){w=z,W.escapeParameter=z},t:ie,getLocaleMessage:N,setLocaleMessage:J,mergeLocaleMessage:de,getPostTranslationHandler:X,setPostTranslationHandler:re,getMissingHandler:se,setMissingHandler:F,[Jd]:O};return ue.datetimeFormats=ne,ue.numberFormats=oe,ue.rt=Te,ue.te=Q,ue.tm=L,ue.d=te,ue.n=le,ue.getDateTimeFormat=he,ue.setDateTimeFormat=S,ue.mergeDateTimeFormat=_,ue.getNumberFormat=A,ue.setNumberFormat=j,ue.mergeNumberFormat=me,ue[Xd]=o,ue[Zl]=P,ue[ei]=Z,ue[ti]=q,ue}function Kv(e){const t=Re(e.locale)?e.locale:ns,o=Re(e.fallbackLocale)||It(e.fallbackLocale)||Je(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,n=Ct(e.missing)?e.missing:void 0,a=at(e.silentTranslationWarn)||ca(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=at(e.silentFallbackWarn)||ca(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,r=at(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,u=Je(e.modifiers)?e.modifiers:{},d=e.pluralizationRules,c=Ct(e.postTranslation)?e.postTranslation:void 0,f=Re(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,p=at(e.sync)?e.sync:!0;let v=e.messages;if(Je(e.sharedMessages)){const M=e.sharedMessages;v=Object.keys(M).reduce((W,D)=>{const I=W[D]||(W[D]={});return Ht(I,M[D]),W},v||{})}const{__i18n:y,__root:T,__injectWithOption:k}=e,$=e.datetimeFormats,B=e.numberFormats,w=e.flatJson;return{locale:t,fallbackLocale:o,messages:v,flatJson:w,datetimeFormats:$,numberFormats:B,missing:n,missingWarn:a,fallbackWarn:s,fallbackRoot:r,fallbackFormat:l,modifiers:u,pluralRules:d,postTranslation:c,warnHtmlMessage:f,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:p,__i18n:y,__root:T,__injectWithOption:k}}function si(e={}){const t=ai(Kv(e)),{__extender:o}=e,n={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 at(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(a){t.missingWarn=at(a)?!a:a},get silentFallbackWarn(){return at(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(a){t.fallbackWarn=at(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 n.__extender=o,n}function Jv(e,t,o){return{beforeCreate(){const n=So();if(!n)throw bn(gn.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=rf(e,s);else{s.__injectWithOption=!0,s.__extender=o.__vueI18nExtend,this.$i18n=si(s);const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=rf(e,a);else{this.$i18n=si({__i18n:a.__i18n,__injectWithOption:!0,__extender:o.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&ef(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),o.__setInstance(n,this.$i18n)},mounted(){},unmounted(){const n=So();if(!n)throw bn(gn.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),o.__deleteInstance(n),delete this.$i18n}}}function rf(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[Jd](t.pluralizationRules||e.pluralizationRules);const o=oi(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(o).forEach(n=>e.mergeLocaleMessage(n,o[n])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}const ri={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Xv({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((n,a)=>[...n,...a.type===Oe?a.children:[a]],[]):t.reduce((o,n)=>{const a=e[n];return a&&(o[n]=a()),o},gt())}function lf(){return Oe}const uf=pn({name:"i18n-t",props:Ht({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Nt(e)||!isNaN(e)}},ri),setup(e,t){const{slots:o,attrs:n}=t,a=e.i18n||ht({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(o).filter(f=>f[0]!=="_"),r=gt();e.locale&&(r.locale=e.locale),e.plural!==void 0&&(r.plural=Re(e.plural)?+e.plural:e.plural);const l=Xv(t,s),u=a[Zl](e.keypath,l,r),d=Ht(gt(),n),c=Re(e.tag)||lt(e.tag)?e.tag:lf();return bt(c,d,u)}}});function Zv(e){return It(e)&&!Re(e[0])}function cf(e,t,o,n){const{slots:a,attrs:s}=t;return()=>{const r={part:!0};let l=gt();e.locale&&(r.locale=e.locale),Re(e.format)?r.key=e.format:lt(e.format)&&(Re(e.format.key)&&(r.key=e.format.key),l=Object.keys(e.format).reduce((h,p)=>o.includes(p)?Ht(gt(),h,{[p]:e.format[p]}):h,gt()));const u=n(e.value,r,l);let d=[r.key];It(u)?d=u.map((h,p)=>{const v=a[h.type],y=v?v({[h.type]:h.value,index:p,parts:u}):[h.value];return Zv(y)&&(y[0].key=`${h.type}-${p}`),y}):Re(u)&&(d=[u]);const c=Ht(gt(),s),f=Re(e.tag)||lt(e.tag)?e.tag:lf();return bt(f,c,d)}}const df=pn({name:"i18n-n",props:Ht({value:{type:Number,required:!0},format:{type:[String,Object]}},ri),setup(e,t){const o=e.i18n||ht({useScope:e.scope,__useComponent:!0});return cf(e,t,Vd,(...n)=>o[ti](...n))}});function e0(e,t){const o=e;if(e.mode==="composition")return o.__getInstance(t)||e.global;{const n=o.__getInstance(t);return n!=null?n.__composer:e.global.__composer}}function t0(e){const t=r=>{const{instance:l,value:u}=r;if(!l||!l.$)throw bn(gn.UNEXPECTED_ERROR);const d=e0(e,l.$),c=ff(u);return[Reflect.apply(d.t,d,[...pf(c)]),d]};return{created:(r,l)=>{const[u,d]=t(l);ar&&e.global===d&&(r.__i18nWatcher=dt(d.locale,()=>{l.instance&&l.instance.$forceUpdate()})),r.__composer=d,r.textContent=u},unmounted:r=>{ar&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:l})=>{if(r.__composer){const u=r.__composer,d=ff(l);r.textContent=Reflect.apply(u.t,u,[...pf(d)])}},getSSRProps:r=>{const[l]=t(r);return{textContent:l}}}}function ff(e){if(Re(e))return{path:e};if(Je(e)){if(!("path"in e))throw bn(gn.REQUIRED_VALUE,"path");return e}else throw bn(gn.INVALID_VALUE)}function pf(e){const{path:t,locale:o,args:n,choice:a,plural:s}=e,r={},l=n||{};return Re(o)&&(r.locale=o),Nt(a)&&(r.plural=a),Nt(s)&&(r.plural=s),[t,l,r]}function n0(e,t,...o){const n=Je(o[0])?o[0]:{};(at(n.globalInstall)?n.globalInstall:!0)&&([uf.name,"I18nT"].forEach(s=>e.component(s,uf)),[df.name,"I18nN"].forEach(s=>e.component(s,df)),[hf.name,"I18nD"].forEach(s=>e.component(s,hf))),e.directive("t",t0(t))}const o0=Eo("global-vue-i18n");function a0(e={}){const t=__VUE_I18N_LEGACY_API__&&at(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,o=at(e.globalInjection)?e.globalInjection:!0,n=new Map,[a,s]=s0(e,t),r=Eo("");function l(f){return n.get(f)||null}function u(f,h){n.set(f,h)}function d(f){n.delete(f)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(f,...h){if(f.__VUE_I18N_SYMBOL__=r,f.provide(f.__VUE_I18N_SYMBOL__,c),Je(h[0])){const y=h[0];c.__composerExtend=y.__composerExtend,c.__vueI18nExtend=y.__vueI18nExtend}let p=null;!t&&o&&(p=p0(f,c.global)),__VUE_I18N_FULL_INSTALL__&&n0(f,c,...h),__VUE_I18N_LEGACY_API__&&t&&f.mixin(Jv(s,s.__composer,c));const v=f.unmount;f.unmount=()=>{p&&p(),c.dispose(),v()}},get global(){return s},dispose(){a.stop()},__instances:n,__getInstance:l,__setInstance:u,__deleteInstance:d};return c}function ht(e={}){const t=So();if(t==null)throw bn(gn.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw bn(gn.NOT_INSTALLED);const o=r0(t),n=i0(o),a=Zd(t),s=l0(e,a);if(s==="global")return ef(n,e,a),n;if(s==="parent"){let u=u0(o,t,e.__useComponent);return u==null&&(u=n),u}const r=o;let l=r.__getInstance(t);if(l==null){const u=Ht({},e);"__i18n"in a&&(u.__i18n=a.__i18n),n&&(u.__root=n),l=ai(u),r.__composerExtend&&(l[ni]=r.__composerExtend(l)),d0(r,t,l),r.__setInstance(t,l)}return l}function s0(e,t){const o=al(),n=__VUE_I18N_LEGACY_API__&&t?o.run(()=>si(e)):o.run(()=>ai(e));if(n==null)throw bn(gn.UNEXPECTED_ERROR);return[o,n]}function r0(e){const t=no(e.isCE?o0:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw bn(e.isCE?gn.NOT_INSTALLED_WITH_PROVIDE:gn.UNEXPECTED_ERROR);return t}function l0(e,t){return sr(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function i0(e){return e.mode==="composition"?e.global:e.global.__composer}function u0(e,t,o=!1){let n=null;const a=t.root;let s=c0(t,o);for(;s!=null;){const r=e;if(e.mode==="composition")n=r.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=r.__getInstance(s);l!=null&&(n=l.__composer,o&&n&&!n[Xd]&&(n=null))}if(n!=null||a===s)break;s=s.parent}return n}function c0(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function d0(e,t,o){_t(()=>{},t),On(()=>{const n=o;e.__deleteInstance(t);const a=n[ni];a&&(a(),delete n[ni])},t)}const f0=["locale","fallbackLocale","availableLocales"],gf=["t","rt","d","n","tm","te"];function p0(e,t){const o=Object.create(null);return f0.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s)throw bn(gn.UNEXPECTED_ERROR);const r=At(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(o,a,r)}),e.config.globalProperties.$i18n=o,gf.forEach(a=>{const s=Object.getOwnPropertyDescriptor(t,a);if(!s||!s.value)throw bn(gn.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${a}`,s)}),()=>{delete e.config.globalProperties.$i18n,gf.forEach(a=>{delete e.config.globalProperties[`$${a}`]})}}const hf=pn({name:"i18n-d",props:Ht({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},ri),setup(e,t){const o=e.i18n||ht({useScope:e.scope,__useComponent:!0});return cf(e,t,Hd,(...n)=>o[ei](...n))}});if(Gv(),kv(rv),Cv(xv),Ev(Ld),__INTLIFY_PROD_DEVTOOLS__){const e=Vo();e.__INTLIFY__=!0,lv(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const wt=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o},g0={class:"weilin_prompt_ui_window-title"},h0=["title"],wn=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 o=e,{t:n}=ht(),a=t,s=b({x:0,y:0}),r=b({width:600,height:400});dt(()=>o.position,H=>{H&&(s.value={...H},window.parent.postMessage({type:`weilin_prompt_ui_window_change_${o.name}_position`},"*"))},{immediate:!0,deep:!0}),dt(()=>o.size,H=>{H&&(r.value={...H},window.parent.postMessage({type:`weilin_prompt_ui_window_change_${o.name}_size`},"*"))},{immediate:!0,deep:!0});const l=()=>{window.parent.postMessage({type:`weilin_prompt_ui_window_change_${o.name}_scroll`},"*")};_t(()=>{var H;if(o.position){const W=window.innerWidth,D=window.innerHeight,I=100;let ee=o.position.x,K=o.position.y;ee=Math.max(I-(((H=o.size)==null?void 0:H.width)||r.value.width),ee),ee=Math.min(ee,W-100),K=Math.max(50,K),K=Math.min(K,D-100),s.value={x:ee,y:K}}o.size&&(r.value={...o.size})});const u=b(!1),d=b({x:0,y:0}),c=H=>{u.value=!0,d.value={x:H.clientX-s.value.x,y:H.clientY-s.value.y},document.addEventListener("mousemove",f),document.addEventListener("mouseup",h)},f=H=>{if(u.value){const W=window.innerWidth,D=window.innerHeight,I=100;let ee=H.clientX-d.value.x,K=H.clientY-d.value.y;ee=Math.max(I-r.value.width,ee),ee=Math.min(ee,W-100),K=Math.max(50,K),K=Math.min(K,D-100);const V={x:ee,y:K};s.value=V,a("update:position",V)}},h=()=>{u.value=!1,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",h)},p=b(!1),v=b({x:0,y:0}),y=b({width:0,height:0}),T=H=>{p.value=!0,v.value={x:H.clientX,y:H.clientY},y.value={...r.value},document.addEventListener("mousemove",k),document.addEventListener("mouseup",$)},k=H=>{if(p.value){const W=H.clientX-v.value.x,D=H.clientY-v.value.y,I={width:Math.max(200,y.value.width+W),height:Math.max(200,y.value.height+D)};r.value=I,a("update:size",I)}},$=()=>{p.value=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",$)},B=()=>{a("active")},w=()=>{a("close")},M=H=>{B(),c(H)};return(H,W)=>(x(),yt(zu,{to:"#weilin_comfyui_tools_prompt_ui_div"},[i("div",{class:"weilin_prompt_ui_draggable-window",style:ct({left:`${s.value.x}px`,top:`${s.value.y}px`,width:`${r.value.width}px`,height:`${r.value.height}px`,zIndex:e.zIndex}),onMousedown:B},[i("div",{class:"weilin_prompt_ui_window-header",onMousedown:ot(M,["stop"])},[i("div",g0,m(e.title),1),i("button",{class:"weilin_prompt_ui_close-btn",onClick:w},"×")],32),i("div",{class:"weilin_prompt_ui_window-content",onScroll:l},[ja(H.$slots,"default",{},void 0,!0)],32),i("div",{class:"weilin_prompt_ui_resize-handle",title:g(n)("common.windowSize"),onMousedown:ot(T,["stop"])},null,40,h0)],36)]))}},[["__scopeId","data-v-90f3c2ae"]]),co="v0.0.61",m0={promptBox:{placeholder:"请输入文本...",delete:"删除",newline:"换行",tab:"制表符",windowTitle:"WeiLin提示词UI窗口 "+co,windowTitleGlobal:"WeiLin全局提示词UI窗口 "+co,translate:"翻译",translatePlaceholder:"请输入要翻译的文本,回车即可",weight:"权重",weightPlaceholder:"请输入权重",addBracket:"添加括号",removeLayer:"减去括号",oneClickTranslate:"一键翻译未翻译的词组",hiddenHint:"双击显示提示词",tagTips:"鼠标左键双击屏蔽Tag<br>鼠标左键单击Tag可以编辑<br>鼠标左键拖动可以拖动Tag",oneClickRandomTag:"一键随机Tag",randomTagSettings:"设置随机Tag规则",oneClickTranslate:"一键翻译Tag",modelWeight:"模型权重",textWeight:"文本权重",settings:{title:"设置",cancel:"取消",save:"保存",translator:"翻译设置",sourceLanguage:"源语言",targetLanguage:"目标语言",chinese_simplified:"简体中文",english:"英语",close:"关闭",auto_detect:"自动检测",setting_floating_ball:"悬浮球设置",setting_prompt_box:"提示词设置",enablePromptCommaShow:"显示提示词逗号",floatingBallCount:"悬浮球数量",floatingBallCountPlaceholder:"请输入悬浮球数量",floatingBallSize:"悬浮球宽度",floatingBallSizePlaceholder:"请输入悬浮球宽度",floatingBallHeight:"悬浮球高度",floatingBallHeightPlaceholder:"请输入悬浮球高度",enableFloatingBall:"启用悬浮球",enableCommaConversion:"启用逗号转换,全角逗号转为半角逗号",enablePeriodConversion:"启用句号转换,全角句号转为半角句号",enableBracketConversion:"启用括号转换,全角括号转为半角括号",enableAngleBracketConversion:"启用尖括号转换,全角尖括号转为半角尖括号",enableUnderscoreToBracket:"启用下划线转换,下划线转换为空格",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",baseModel:"基础模型",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描述不能为空",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:"移动到目标标签之后",editTag:"编辑标签",deleteTag:"删除标签",editGroupMode:"编辑模式",exitEditMode:"退出编辑模式",autoAddSearchTag:"搜索的Tag自动添加到提示词中",importTags:"批量导入Tag",share:"分享",delete:"删除",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:"文本权重",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:"选择已有分类",sureSelect:"确认选择",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标签"}},v0={promptBox:{placeholder:"Please enter text...",delete:"Delete",newline:"New Line",tab:"Tab",windowTitle:"WeiLin Prompt UI Window "+co,windowTitleGlobal:"WeiLin Global Prompt UI Window "+co,translate:"Translate",translatePlaceholder:"Please enter the text to be translated",weight:"Weight",weightPlaceholder:"Please enter the weight",addBracket:"Add Bracket",removeLayer:"Remove Bracket",oneClickTranslate:"One Click Translate Untranslated Phrases",hiddenHint:"Double-click to show",tagTips:"Double-click the left mouse button to mask the Tag<br>click the Tag to edit<br>and drag the Tag to drag",oneClickRandomTag:"one Click Random Tag",randomTagSettings:"setting Random Tag",oneClickTranslate:"one Click Translate Tag",modelWeight:"Model Weight",textWeight:"Text Weight",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",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:"Hidden Lora",showLora:"Show Lora",baseModel:"Base Model",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",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",editTag:"Edit Tag",deleteTag:"Delete Tag",editGroupMode:"Edit Group Mode",exitEditMode:"Exit Edit Mode",autoAddSearchTag:"Auto Add Search Tag With Prompt",importTags:"Import Tags",share:"Share",delete:"Delete",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:"Text Encoder 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",sureSelect:"Confirm the selection",pleaseAddGroupName:"Please fill in the name of the first-level classification",pleaseAddSubGroupName:"Please fill in the name of the secondary classification",pleaseFullRequest:"Please fill in the information of the first-level and second-level classifications completely",successImport:"Import successful",importFail:"Import failed",dumpOnlySQL:"Only export the SQL of the Tag",settingOutputName:"Set the name of the export file",sureYes:"Sure",cancel:"Cancel",edit:"Edit",delete:"Delete",add:"Add Tag",pleaseMainCebUuid:"The original UUID of the first-level division is only required for incremental updates and cannot be modified",pleaseSubGroupUuid:"The secondary division of the original UUID is only required for incremental updates and cannot be modified",pleaseSubGroup:"Secondary classification name",pleaseMainCeb:"First-level classification name",translater:"Description",tips1:"Usage Tutorial:",tips1text:"Bilibili video tutorial",tips2:"Tag Cloud Warehouse:",tips2text:"GitHub repository",tips3:"Online batch editing:",tips3text:"Online editor",selectTitle:"Select Category",selectedCategories:"Selected Categories",clearAll:"Clear All",primaryCategories:"Primary Categories",subCategories:"Sub Categories",noSelectedCategories:"No categories selected",selectCategory:"Select this category",selectSubcategory:"Select this subcategory",sureSelect:"Confirm Selection"},randomUtils:{title:"Random Tag Rules Settings",generalSettings:"General Settings",totalTags:"Random Tag Total Number (If the rule range exceeds the total quantity, the maximum range is calculated by the total quantity)",rules:"Rules",addRule:"Add Rule",rule:"Rule",range:"Range",tagType:"Tag Type",category:"Tag Category",specificTags:"Specific Tags",selectCategory:"Select Category",addTagPlaceholder:"Enter tag and press Enter",addTag:"Add Tag",testRandom:"Test Random",generatedTags:"Generated Tags",selectTagGroup:"Select Tag Group",ruleTemplates:"Rule Templates",saveAsTemplate:"Save as Template",selectTemplate:"Select Template",applyTemplate:"Apply Template",templateNamePlaceholder:"Enter template name",templateNameRequired:"Template name is required",templateSaved:"Template saved",templateApplied:"Template applied",errorSavingTemplates:"Error saving templates",save:"Save",cancel:"Cancel",editTemplate:"Edit Name",deleteTemplate:"Delete",confirmDeleteTemplate:"Are you sure you want to delete this template?",templateDeleted:"Template deleted",templateUpdated:"Template name updated",errorUpdatingTemplate:"Update template failed",errorLoadingTemplate:"Load template failed",errorDeletingTemplate:"Delete template failed",pleaseChooseTemplate:"Please choose a template",errorApplyingTemplate:"Apply template failed",errorSavingTemplate:"Save template failed",newTemplate:"New Template",rulesReminder:"Reminder: The range of the first rule must start at 1! If the range exceeds the total number of random, it will simply display all not random!"},danbooruManager:{title:"Danbooru Manager",controle:"Controle",translatePlaceholder:"Please enter the tag to be translated",searchPlaceholder:"Input need search danbooru tag",pageShow:"Display per page:",pageLimit:"article",hot:"hot",aliases:"aliases",sureBatchDelete:"Batch deletion confirmation",sureBatchDeleteTips1:"You are sure you want to delete the selected one",sureBatchDeleteTips2:"A label? This operation is irrevocable.",sureDelete:"Confirm deletion",import:"Import in Danbooru format",importBatchTitle:"Batch import Danbooru data",importTitle:"Danbooru Import data display",add:"Add Danbooru Tag",edit:"Edit Danbooru Tag"}};/*!
* pinia v3.0.3
* (c) 2025 Eduardo San Martin Morote
* @license MIT
*/let mf;const fr=e=>mf=e,vf=Symbol();function li(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var ss;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(ss||(ss={}));function _0(){const e=al(!0),t=e.run(()=>b({}));let o=[],n=[];const a=ml({install(s){fr(a),a._a=s,s.provide(vf,a),s.config.globalProperties.$pinia=a,n.forEach(r=>o.push(r)),n=[]},use(s){return this._a?o.push(s):n.push(s),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return a}const _f=()=>{};function yf(e,t,o,n=_f){e.push(t);const a=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),n())};return!o&&cu()&&Qg(a),a}function pa(e,...t){e.slice().forEach(o=>{o(...t)})}const y0=e=>e(),bf=Symbol(),ii=Symbol();function ui(e,t){e instanceof Map&&t instanceof Map?t.forEach((o,n)=>e.set(n,o)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const n=t[o],a=e[o];li(a)&&li(n)&&e.hasOwnProperty(o)&&!At(n)&&!yo(n)?e[o]=ui(a,n):e[o]=n}return e}const b0=Symbol();function w0(e){return!li(e)||!Object.prototype.hasOwnProperty.call(e,b0)}const{assign:Ao}=Object;function x0(e){return!!(At(e)&&e.effect)}function T0(e,t,o,n){const{state:a,actions:s,getters:r}=t,l=o.state.value[e];let u;function d(){l||(o.state.value[e]=a?a():{});const c=_h(o.state.value[e]);return Ao(c,s,Object.keys(r||{}).reduce((f,h)=>(f[h]=ml(nt(()=>{fr(o);const p=o._s.get(e);return r[h].call(p,p)})),f),{}))}return u=wf(e,d,t,o,n,!0),u}function wf(e,t,o={},n,a,s){let r;const l=Ao({actions:{}},o),u={deep:!0};let d,c,f=[],h=[],p;const v=n.state.value[e];!s&&!v&&(n.state.value[e]={}),b({});let y;function T(D){let I;d=c=!1,typeof D=="function"?(D(n.state.value[e]),I={type:ss.patchFunction,storeId:e,events:p}):(ui(n.state.value[e],D),I={type:ss.patchObject,payload:D,storeId:e,events:p});const ee=y=Symbol();Qe().then(()=>{y===ee&&(d=!0)}),c=!0,pa(f,I,n.state.value[e])}const k=s?function(){const{state:I}=o,ee=I?I():{};this.$patch(K=>{Ao(K,ee)})}:_f;function $(){r.stop(),f=[],h=[],n._s.delete(e)}const B=(D,I="")=>{if(bf in D)return D[ii]=I,D;const ee=function(){fr(n);const K=Array.from(arguments),V=[],ne=[];function oe(se){V.push(se)}function X(se){ne.push(se)}pa(h,{args:K,name:ee[ii],store:M,after:oe,onError:X});let re;try{re=D.apply(this&&this.$id===e?this:M,K)}catch(se){throw pa(ne,se),se}return re instanceof Promise?re.then(se=>(pa(V,se),se)).catch(se=>(pa(ne,se),Promise.reject(se))):(pa(V,re),re)};return ee[bf]=!0,ee[ii]=I,ee},w={_p:n,$id:e,$onAction:yf.bind(null,h),$patch:T,$reset:k,$subscribe(D,I={}){const ee=yf(f,D,I.detached,()=>K()),K=r.run(()=>dt(()=>n.state.value[e],V=>{(I.flush==="sync"?c:d)&&D({storeId:e,type:ss.direct,events:p},V)},Ao({},u,I)));return ee},$dispose:$},M=Os(w);n._s.set(e,M);const W=(n._a&&n._a.runWithContext||y0)(()=>n._e.run(()=>(r=al()).run(()=>t({action:B}))));for(const D in W){const I=W[D];if(At(I)&&!x0(I)||yo(I))s||(v&&w0(I)&&(At(I)?I.value=v[D]:ui(I,v[D])),n.state.value[e][D]=I);else if(typeof I=="function"){const ee=B(I,D);W[D]=ee,l.actions[D]=I}}return Ao(M,W),Ao(Ze(M),W),Object.defineProperty(M,"$state",{get:()=>n.state.value[e],set:D=>{T(I=>{Ao(I,D)})}}),n._p.forEach(D=>{Ao(M,r.run(()=>D({store:M,app:n._a,pinia:n,options:l})))}),v&&s&&o.hydrate&&o.hydrate(M.$state,v),d=!0,c=!0,M}/*! #__NO_SIDE_EFFECTS__ */function S0(e,t,o){let n;const a=typeof t=="function";n=a?o:t;function s(r,l){const u=om();return r=r||(u?no(vf,null):null),r&&fr(r),r=mf,r._s.has(e)||(a?wf(e,t,n,r):T0(e,n,r)),r._s.get(e)}return s.$id=e,s}const pr=S0("tag",()=>{const e=b([]),t=b({user_lang:"zh_CN"}),o=b(0);return{categories:e,setCategories:r=>{e.value=r},userSetting:t,setUserSetting:r=>{t.value=r},isFirstLoading:o,setisFirstLoading:r=>{o.value=r}}});function xf(e,t){return function(){return e.apply(t,arguments)}}const{toString:k0}=Object.prototype,{getPrototypeOf:ci}=Object,{iterator:gr,toStringTag:Tf}=Symbol,hr=(e=>t=>{const o=k0.call(t);return e[o]||(e[o]=o.slice(8,-1).toLowerCase())})(Object.create(null)),Nn=e=>(e=e.toLowerCase(),t=>hr(t)===e),mr=e=>t=>typeof t===e,{isArray:ga}=Array,rs=mr("undefined");function ls(e){return e!==null&&!rs(e)&&e.constructor!==null&&!rs(e.constructor)&&hn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sf=Nn("ArrayBuffer");function C0(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sf(e.buffer),t}const E0=mr("string"),hn=mr("function"),kf=mr("number"),is=e=>e!==null&&typeof e=="object",L0=e=>e===!0||e===!1,vr=e=>{if(hr(e)!=="object")return!1;const t=ci(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tf in e)&&!(gr in e)},$0=e=>{if(!is(e)||ls(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},A0=Nn("Date"),I0=Nn("File"),M0=Nn("Blob"),O0=Nn("FileList"),R0=e=>is(e)&&hn(e.pipe),N0=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||hn(e.append)&&((t=hr(e))==="formdata"||t==="object"&&hn(e.toString)&&e.toString()==="[object FormData]"))},D0=Nn("URLSearchParams"),[P0,F0,U0,B0]=["ReadableStream","Request","Response","Headers"].map(Nn),H0=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function us(e,t,{allOwnKeys:o=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),ga(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{if(ls(e))return;const s=o?Object.getOwnPropertyNames(e):Object.keys(e),r=s.length;let l;for(n=0;n<r;n++)l=s[n],t.call(null,e[l],l,e)}}function Cf(e,t){if(ls(e))return null;t=t.toLowerCase();const o=Object.keys(e);let n=o.length,a;for(;n-- >0;)if(a=o[n],t===a.toLowerCase())return a;return null}const zo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ef=e=>!rs(e)&&e!==zo;function di(){const{caseless:e}=Ef(this)&&this||{},t={},o=(n,a)=>{const s=e&&Cf(t,a)||a;vr(t[s])&&vr(n)?t[s]=di(t[s],n):vr(n)?t[s]=di({},n):ga(n)?t[s]=n.slice():t[s]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&us(arguments[n],o);return t}const j0=(e,t,o,{allOwnKeys:n}={})=>(us(t,(a,s)=>{o&&hn(a)?e[s]=xf(a,o):e[s]=a},{allOwnKeys:n}),e),W0=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),V0=(e,t,o,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),o&&Object.assign(e.prototype,o)},z0=(e,t,o,n)=>{let a,s,r;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),s=a.length;s-- >0;)r=a[s],(!n||n(r,e,t))&&!l[r]&&(t[r]=e[r],l[r]=!0);e=o!==!1&&ci(e)}while(e&&(!o||o(e,t))&&e!==Object.prototype);return t},q0=(e,t,o)=>{e=String(e),(o===void 0||o>e.length)&&(o=e.length),o-=t.length;const n=e.indexOf(t,o);return n!==-1&&n===o},G0=e=>{if(!e)return null;if(ga(e))return e;let t=e.length;if(!kf(t))return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},Q0=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ci(Uint8Array)),Y0=(e,t)=>{const n=(e&&e[gr]).call(e);let a;for(;(a=n.next())&&!a.done;){const s=a.value;t.call(e,s[0],s[1])}},K0=(e,t)=>{let o;const n=[];for(;(o=e.exec(t))!==null;)n.push(o);return n},J0=Nn("HTMLFormElement"),X0=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(o,n,a){return n.toUpperCase()+a}),Lf=(({hasOwnProperty:e})=>(t,o)=>e.call(t,o))(Object.prototype),Z0=Nn("RegExp"),$f=(e,t)=>{const o=Object.getOwnPropertyDescriptors(e),n={};us(o,(a,s)=>{let r;(r=t(a,s,e))!==!1&&(n[s]=r||a)}),Object.defineProperties(e,n)},e2=e=>{$f(e,(t,o)=>{if(hn(e)&&["arguments","caller","callee"].indexOf(o)!==-1)return!1;const n=e[o];if(hn(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+o+"'")})}})},t2=(e,t)=>{const o={},n=a=>{a.forEach(s=>{o[s]=!0})};return ga(e)?n(e):n(String(e).split(t)),o},n2=()=>{},o2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function a2(e){return!!(e&&hn(e.append)&&e[Tf]==="FormData"&&e[gr])}const s2=e=>{const t=new Array(10),o=(n,a)=>{if(is(n)){if(t.indexOf(n)>=0)return;if(ls(n))return n;if(!("toJSON"in n)){t[a]=n;const s=ga(n)?[]:{};return us(n,(r,l)=>{const u=o(r,a+1);!rs(u)&&(s[l]=u)}),t[a]=void 0,s}}return n};return o(e,0)},r2=Nn("AsyncFunction"),l2=e=>e&&(is(e)||hn(e))&&hn(e.then)&&hn(e.catch),Af=((e,t)=>e?setImmediate:t?((o,n)=>(zo.addEventListener("message",({source:a,data:s})=>{a===zo&&s===o&&n.length&&n.shift()()},!1),a=>{n.push(a),zo.postMessage(o,"*")}))(`axios@${Math.random()}`,[]):o=>setTimeout(o))(typeof setImmediate=="function",hn(zo.postMessage)),i2=typeof queueMicrotask<"u"?queueMicrotask.bind(zo):typeof process<"u"&&process.nextTick||Af,be={isArray:ga,isArrayBuffer:Sf,isBuffer:ls,isFormData:N0,isArrayBufferView:C0,isString:E0,isNumber:kf,isBoolean:L0,isObject:is,isPlainObject:vr,isEmptyObject:$0,isReadableStream:P0,isRequest:F0,isResponse:U0,isHeaders:B0,isUndefined:rs,isDate:A0,isFile:I0,isBlob:M0,isRegExp:Z0,isFunction:hn,isStream:R0,isURLSearchParams:D0,isTypedArray:Q0,isFileList:O0,forEach:us,merge:di,extend:j0,trim:H0,stripBOM:W0,inherits:V0,toFlatObject:z0,kindOf:hr,kindOfTest:Nn,endsWith:q0,toArray:G0,forEachEntry:Y0,matchAll:K0,isHTMLForm:J0,hasOwnProperty:Lf,hasOwnProp:Lf,reduceDescriptors:$f,freezeMethods:e2,toObjectSet:t2,toCamelCase:X0,noop:n2,toFiniteNumber:o2,findKey:Cf,global:zo,isContextDefined:Ef,isSpecCompliantForm:a2,toJSONObject:s2,isAsyncFn:r2,isThenable:l2,setImmediate:Af,asap:i2,isIterable:e=>e!=null&&hn(e[gr])};function Ge(e,t,o,n,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),o&&(this.config=o),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}be.inherits(Ge,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:be.toJSONObject(this.config),code:this.code,status:this.status}}});const If=Ge.prototype,Mf={};["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=>{Mf[e]={value:e}}),Object.defineProperties(Ge,Mf),Object.defineProperty(If,"isAxiosError",{value:!0}),Ge.from=(e,t,o,n,a,s)=>{const r=Object.create(If);return be.toFlatObject(e,r,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),Ge.call(r,e.message,t,o,n,a),r.cause=e,r.name=e.name,s&&Object.assign(r,s),r};const u2=null;function fi(e){return be.isPlainObject(e)||be.isArray(e)}function Of(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function Rf(e,t,o){return e?e.concat(t).map(function(a,s){return a=Of(a),!o&&s?"["+a+"]":a}).join(o?".":""):t}function c2(e){return be.isArray(e)&&!e.some(fi)}const d2=be.toFlatObject(be,{},null,function(t){return/^is[A-Z]/.test(t)});function _r(e,t,o){if(!be.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,o=be.toFlatObject(o,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,T){return!be.isUndefined(T[y])});const n=o.metaTokens,a=o.visitor||c,s=o.dots,r=o.indexes,u=(o.Blob||typeof Blob<"u"&&Blob)&&be.isSpecCompliantForm(t);if(!be.isFunction(a))throw new TypeError("visitor must be a function");function d(v){if(v===null)return"";if(be.isDate(v))return v.toISOString();if(be.isBoolean(v))return v.toString();if(!u&&be.isBlob(v))throw new Ge("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(v)||be.isTypedArray(v)?u&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,y,T){let k=v;if(v&&!T&&typeof v=="object"){if(be.endsWith(y,"{}"))y=n?y:y.slice(0,-2),v=JSON.stringify(v);else if(be.isArray(v)&&c2(v)||(be.isFileList(v)||be.endsWith(y,"[]"))&&(k=be.toArray(v)))return y=Of(y),k.forEach(function(B,w){!(be.isUndefined(B)||B===null)&&t.append(r===!0?Rf([y],w,s):r===null?y:y+"[]",d(B))}),!1}return fi(v)?!0:(t.append(Rf(T,y,s),d(v)),!1)}const f=[],h=Object.assign(d2,{defaultVisitor:c,convertValue:d,isVisitable:fi});function p(v,y){if(!be.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(v),be.forEach(v,function(k,$){(!(be.isUndefined(k)||k===null)&&a.call(t,k,be.isString($)?$.trim():$,y,h))===!0&&p(k,y?y.concat($):[$])}),f.pop()}}if(!be.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Nf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function pi(e,t){this._pairs=[],e&&_r(e,this,t)}const Df=pi.prototype;Df.append=function(t,o){this._pairs.push([t,o])},Df.toString=function(t){const o=t?function(n){return t.call(this,n,Nf)}:Nf;return this._pairs.map(function(a){return o(a[0])+"="+o(a[1])},"").join("&")};function f2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Pf(e,t,o){if(!t)return e;const n=o&&o.encode||f2;be.isFunction(o)&&(o={serialize:o});const a=o&&o.serialize;let s;if(a?s=a(t,o):s=be.isURLSearchParams(t)?t.toString():new pi(t,o).toString(n),s){const r=e.indexOf("#");r!==-1&&(e=e.slice(0,r)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Ff{constructor(){this.handlers=[]}use(t,o,n){return this.handlers.push({fulfilled:t,rejected:o,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){be.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Uf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},p2={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pi,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},gi=typeof window<"u"&&typeof document<"u",hi=typeof navigator=="object"&&navigator||void 0,g2=gi&&(!hi||["ReactNative","NativeScript","NS"].indexOf(hi.product)<0),h2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",m2=gi&&window.location.href||"http://localhost",nn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:gi,hasStandardBrowserEnv:g2,hasStandardBrowserWebWorkerEnv:h2,navigator:hi,origin:m2},Symbol.toStringTag,{value:"Module"})),...p2};function v2(e,t){return _r(e,new nn.classes.URLSearchParams,{visitor:function(o,n,a,s){return nn.isNode&&be.isBuffer(o)?(this.append(n,o.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function _2(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function y2(e){const t={},o=Object.keys(e);let n;const a=o.length;let s;for(n=0;n<a;n++)s=o[n],t[s]=e[s];return t}function Bf(e){function t(o,n,a,s){let r=o[s++];if(r==="__proto__")return!0;const l=Number.isFinite(+r),u=s>=o.length;return r=!r&&be.isArray(a)?a.length:r,u?(be.hasOwnProp(a,r)?a[r]=[a[r],n]:a[r]=n,!l):((!a[r]||!be.isObject(a[r]))&&(a[r]=[]),t(o,n,a[r],s)&&be.isArray(a[r])&&(a[r]=y2(a[r])),!l)}if(be.isFormData(e)&&be.isFunction(e.entries)){const o={};return be.forEachEntry(e,(n,a)=>{t(_2(n),a,o,0)}),o}return null}function b2(e,t,o){if(be.isString(e))try{return(t||JSON.parse)(e),be.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(o||JSON.stringify)(e)}const cs={transitional:Uf,adapter:["xhr","http","fetch"],transformRequest:[function(t,o){const n=o.getContentType()||"",a=n.indexOf("application/json")>-1,s=be.isObject(t);if(s&&be.isHTMLForm(t)&&(t=new FormData(t)),be.isFormData(t))return a?JSON.stringify(Bf(t)):t;if(be.isArrayBuffer(t)||be.isBuffer(t)||be.isStream(t)||be.isFile(t)||be.isBlob(t)||be.isReadableStream(t))return t;if(be.isArrayBufferView(t))return t.buffer;if(be.isURLSearchParams(t))return o.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return v2(t,this.formSerializer).toString();if((l=be.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return _r(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return s||a?(o.setContentType("application/json",!1),b2(t)):t}],transformResponse:[function(t){const o=this.transitional||cs.transitional,n=o&&o.forcedJSONParsing,a=this.responseType==="json";if(be.isResponse(t)||be.isReadableStream(t))return t;if(t&&be.isString(t)&&(n&&!this.responseType||a)){const r=!(o&&o.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(r)throw l.name==="SyntaxError"?Ge.from(l,Ge.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData: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}}};be.forEach(["delete","get","head","post","put","patch"],e=>{cs.headers[e]={}});const w2=be.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"]),x2=e=>{const t={};let o,n,a;return e&&e.split(`
`).forEach(function(r){a=r.indexOf(":"),o=r.substring(0,a).trim().toLowerCase(),n=r.substring(a+1).trim(),!(!o||t[o]&&w2[o])&&(o==="set-cookie"?t[o]?t[o].push(n):t[o]=[n]:t[o]=t[o]?t[o]+", "+n:n)}),t},Hf=Symbol("internals");function ds(e){return e&&String(e).trim().toLowerCase()}function yr(e){return e===!1||e==null?e:be.isArray(e)?e.map(yr):String(e)}function T2(e){const t=Object.create(null),o=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=o.exec(e);)t[n[1]]=n[2];return t}const S2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function mi(e,t,o,n,a){if(be.isFunction(n))return n.call(this,t,o);if(a&&(t=o),!!be.isString(t)){if(be.isString(n))return t.indexOf(n)!==-1;if(be.isRegExp(n))return n.test(t)}}function k2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,o,n)=>o.toUpperCase()+n)}function C2(e,t){const o=be.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+o,{value:function(a,s,r){return this[n].call(this,t,a,s,r)},configurable:!0})})}let mn=class{constructor(t){t&&this.set(t)}set(t,o,n){const a=this;function s(l,u,d){const c=ds(u);if(!c)throw new Error("header name must be a non-empty string");const f=be.findKey(a,c);(!f||a[f]===void 0||d===!0||d===void 0&&a[f]!==!1)&&(a[f||u]=yr(l))}const r=(l,u)=>be.forEach(l,(d,c)=>s(d,c,u));if(be.isPlainObject(t)||t instanceof this.constructor)r(t,o);else if(be.isString(t)&&(t=t.trim())&&!S2(t))r(x2(t),o);else if(be.isObject(t)&&be.isIterable(t)){let l={},u,d;for(const c of t){if(!be.isArray(c))throw TypeError("Object iterator must return a key-value pair");l[d=c[0]]=(u=l[d])?be.isArray(u)?[...u,c[1]]:[u,c[1]]:c[1]}r(l,o)}else t!=null&&s(o,t,n);return this}get(t,o){if(t=ds(t),t){const n=be.findKey(this,t);if(n){const a=this[n];if(!o)return a;if(o===!0)return T2(a);if(be.isFunction(o))return o.call(this,a,n);if(be.isRegExp(o))return o.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,o){if(t=ds(t),t){const n=be.findKey(this,t);return!!(n&&this[n]!==void 0&&(!o||mi(this,this[n],n,o)))}return!1}delete(t,o){const n=this;let a=!1;function s(r){if(r=ds(r),r){const l=be.findKey(n,r);l&&(!o||mi(n,n[l],l,o))&&(delete n[l],a=!0)}}return be.isArray(t)?t.forEach(s):s(t),a}clear(t){const o=Object.keys(this);let n=o.length,a=!1;for(;n--;){const s=o[n];(!t||mi(this,this[s],s,t,!0))&&(delete this[s],a=!0)}return a}normalize(t){const o=this,n={};return be.forEach(this,(a,s)=>{const r=be.findKey(n,s);if(r){o[r]=yr(a),delete o[s];return}const l=t?k2(s):String(s).trim();l!==s&&delete o[s],o[l]=yr(a),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const o=Object.create(null);return be.forEach(this,(n,a)=>{n!=null&&n!==!1&&(o[a]=t&&be.isArray(n)?n.join(", "):n)}),o}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,o])=>t+": "+o).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...o){const n=new this(t);return o.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[Hf]=this[Hf]={accessors:{}}).accessors,a=this.prototype;function s(r){const l=ds(r);n[l]||(C2(a,r),n[l]=!0)}return be.isArray(t)?t.forEach(s):s(t),this}};mn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),be.reduceDescriptors(mn.prototype,({value:e},t)=>{let o=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[o]=n}}}),be.freezeMethods(mn);function vi(e,t){const o=this||cs,n=t||o,a=mn.from(n.headers);let s=n.data;return be.forEach(e,function(l){s=l.call(o,s,a.normalize(),t?t.status:void 0)}),a.normalize(),s}function jf(e){return!!(e&&e.__CANCEL__)}function ha(e,t,o){Ge.call(this,e??"canceled",Ge.ERR_CANCELED,t,o),this.name="CanceledError"}be.inherits(ha,Ge,{__CANCEL__:!0});function Wf(e,t,o){const n=o.config.validateStatus;!o.status||!n||n(o.status)?e(o):t(new Ge("Request failed with status code "+o.status,[Ge.ERR_BAD_REQUEST,Ge.ERR_BAD_RESPONSE][Math.floor(o.status/100)-4],o.config,o.request,o))}function E2(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function L2(e,t){e=e||10;const o=new Array(e),n=new Array(e);let a=0,s=0,r;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),c=n[s];r||(r=d),o[a]=u,n[a]=d;let f=s,h=0;for(;f!==a;)h+=o[f++],f=f%e;if(a=(a+1)%e,a===s&&(s=(s+1)%e),d-r<t)return;const p=c&&d-c;return p?Math.round(h*1e3/p):void 0}}function $2(e,t){let o=0,n=1e3/t,a,s;const r=(d,c=Date.now())=>{o=c,a=null,s&&(clearTimeout(s),s=null),e(...d)};return[(...d)=>{const c=Date.now(),f=c-o;f>=n?r(d,c):(a=d,s||(s=setTimeout(()=>{s=null,r(a)},n-f)))},()=>a&&r(a)]}const br=(e,t,o=3)=>{let n=0;const a=L2(50,250);return $2(s=>{const r=s.loaded,l=s.lengthComputable?s.total:void 0,u=r-n,d=a(u),c=r<=l;n=r;const f={loaded:r,total:l,progress:l?r/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&c?(l-r)/d:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},o)},Vf=(e,t)=>{const o=e!=null;return[n=>t[0]({lengthComputable:o,total:e,loaded:n}),t[1]]},zf=e=>(...t)=>be.asap(()=>e(...t)),A2=nn.hasStandardBrowserEnv?((e,t)=>o=>(o=new URL(o,nn.origin),e.protocol===o.protocol&&e.host===o.host&&(t||e.port===o.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,I2=nn.hasStandardBrowserEnv?{write(e,t,o,n,a,s){const r=[e+"="+encodeURIComponent(t)];be.isNumber(o)&&r.push("expires="+new Date(o).toGMTString()),be.isString(n)&&r.push("path="+n),be.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 M2(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function O2(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function qf(e,t,o){let n=!M2(t);return e&&(n||o==!1)?O2(e,t):t}const Gf=e=>e instanceof mn?{...e}:e;function qo(e,t){t=t||{};const o={};function n(d,c,f,h){return be.isPlainObject(d)&&be.isPlainObject(c)?be.merge.call({caseless:h},d,c):be.isPlainObject(c)?be.merge({},c):be.isArray(c)?c.slice():c}function a(d,c,f,h){if(be.isUndefined(c)){if(!be.isUndefined(d))return n(void 0,d,f,h)}else return n(d,c,f,h)}function s(d,c){if(!be.isUndefined(c))return n(void 0,c)}function r(d,c){if(be.isUndefined(c)){if(!be.isUndefined(d))return n(void 0,d)}else return n(void 0,c)}function l(d,c,f){if(f in t)return n(d,c);if(f in e)return n(void 0,d)}const u={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:l,headers:(d,c,f)=>a(Gf(d),Gf(c),f,!0)};return be.forEach(Object.keys({...e,...t}),function(c){const f=u[c]||a,h=f(e[c],t[c],c);be.isUndefined(h)&&f!==l||(o[c]=h)}),o}const Qf=e=>{const t=qo({},e);let{data:o,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:s,headers:r,auth:l}=t;t.headers=r=mn.from(r),t.url=Pf(qf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&r.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(be.isFormData(o)){if(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv)r.setContentType(void 0);else if((u=r.getContentType())!==!1){const[d,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];r.setContentType([d||"multipart/form-data",...c].join("; "))}}if(nn.hasStandardBrowserEnv&&(n&&be.isFunction(n)&&(n=n(t)),n||n!==!1&&A2(t.url))){const d=a&&s&&I2.read(s);d&&r.set(a,d)}return t},R2=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(o,n){const a=Qf(e);let s=a.data;const r=mn.from(a.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=a,c,f,h,p,v;function y(){p&&p(),v&&v(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let T=new XMLHttpRequest;T.open(a.method.toUpperCase(),a.url,!0),T.timeout=a.timeout;function k(){if(!T)return;const B=mn.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),M={data:!l||l==="text"||l==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:B,config:e,request:T};Wf(function(W){o(W),y()},function(W){n(W),y()},M),T=null}"onloadend"in T?T.onloadend=k:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(k)},T.onabort=function(){T&&(n(new Ge("Request aborted",Ge.ECONNABORTED,e,T)),T=null)},T.onerror=function(){n(new Ge("Network Error",Ge.ERR_NETWORK,e,T)),T=null},T.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const M=a.transitional||Uf;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),n(new Ge(w,M.clarifyTimeoutError?Ge.ETIMEDOUT:Ge.ECONNABORTED,e,T)),T=null},s===void 0&&r.setContentType(null),"setRequestHeader"in T&&be.forEach(r.toJSON(),function(w,M){T.setRequestHeader(M,w)}),be.isUndefined(a.withCredentials)||(T.withCredentials=!!a.withCredentials),l&&l!=="json"&&(T.responseType=a.responseType),d&&([h,v]=br(d,!0),T.addEventListener("progress",h)),u&&T.upload&&([f,p]=br(u),T.upload.addEventListener("progress",f),T.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(c=B=>{T&&(n(!B||B.type?new ha(null,e,T):B),T.abort(),T=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const $=E2(a.url);if($&&nn.protocols.indexOf($)===-1){n(new Ge("Unsupported protocol "+$+":",Ge.ERR_BAD_REQUEST,e));return}T.send(s||null)})},N2=(e,t)=>{const{length:o}=e=e?e.filter(Boolean):[];if(t||o){let n=new AbortController,a;const s=function(d){if(!a){a=!0,l();const c=d instanceof Error?d:this.reason;n.abort(c instanceof Ge?c:new ha(c instanceof Error?c.message:c))}};let r=t&&setTimeout(()=>{r=null,s(new Ge(`timeout ${t} of ms exceeded`,Ge.ETIMEDOUT))},t);const l=()=>{e&&(r&&clearTimeout(r),r=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:u}=n;return u.unsubscribe=()=>be.asap(l),u}},D2=function*(e,t){let o=e.byteLength;if(o<t){yield e;return}let n=0,a;for(;n<o;)a=n+t,yield e.slice(n,a),n=a},P2=async function*(e,t){for await(const o of F2(e))yield*D2(o,t)},F2=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:o,value:n}=await t.read();if(o)break;yield n}}finally{await t.cancel()}},Yf=(e,t,o,n)=>{const a=P2(e,t);let s=0,r,l=u=>{r||(r=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:d,value:c}=await a.next();if(d){l(),u.close();return}let f=c.byteLength;if(o){let h=s+=f;o(h)}u.enqueue(new Uint8Array(c))}catch(d){throw l(d),d}},cancel(u){return l(u),a.return()}},{highWaterMark:2})},wr=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Kf=wr&&typeof ReadableStream=="function",U2=wr&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Jf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},B2=Kf&&Jf(()=>{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}),Xf=64*1024,_i=Kf&&Jf(()=>be.isReadableStream(new Response("").body)),xr={stream:_i&&(e=>e.body)};wr&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!xr[t]&&(xr[t]=be.isFunction(e[t])?o=>o[t]():(o,n)=>{throw new Ge(`Response type '${t}' is not supported`,Ge.ERR_NOT_SUPPORT,n)})})})(new Response);const H2=async e=>{if(e==null)return 0;if(be.isBlob(e))return e.size;if(be.isSpecCompliantForm(e))return(await new Request(nn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(be.isArrayBufferView(e)||be.isArrayBuffer(e))return e.byteLength;if(be.isURLSearchParams(e)&&(e=e+""),be.isString(e))return(await U2(e)).byteLength},j2=async(e,t)=>{const o=be.toFiniteNumber(e.getContentLength());return o??H2(t)},yi={http:u2,xhr:R2,fetch:wr&&(async e=>{let{url:t,method:o,data:n,signal:a,cancelToken:s,timeout:r,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Qf(e);d=d?(d+"").toLowerCase():"text";let p=N2([a,s&&s.toAbortSignal()],r),v;const y=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let T;try{if(u&&B2&&o!=="get"&&o!=="head"&&(T=await j2(c,n))!==0){let M=new Request(t,{method:"POST",body:n,duplex:"half"}),H;if(be.isFormData(n)&&(H=M.headers.get("content-type"))&&c.setContentType(H),M.body){const[W,D]=Vf(T,br(zf(u)));n=Yf(M.body,Xf,W,D)}}be.isString(f)||(f=f?"include":"omit");const k="credentials"in Request.prototype;v=new Request(t,{...h,signal:p,method:o.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:k?f:void 0});let $=await fetch(v,h);const B=_i&&(d==="stream"||d==="response");if(_i&&(l||B&&y)){const M={};["status","statusText","headers"].forEach(I=>{M[I]=$[I]});const H=be.toFiniteNumber($.headers.get("content-length")),[W,D]=l&&Vf(H,br(zf(l),!0))||[];$=new Response(Yf($.body,Xf,W,()=>{D&&D(),y&&y()}),M)}d=d||"text";let w=await xr[be.findKey(xr,d)||"text"]($,e);return!B&&y&&y(),await new Promise((M,H)=>{Wf(M,H,{data:w,headers:mn.from($.headers),status:$.status,statusText:$.statusText,config:e,request:v})})}catch(k){throw y&&y(),k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new Ge("Network Error",Ge.ERR_NETWORK,e,v),{cause:k.cause||k}):Ge.from(k,k&&k.code,e,v)}})};be.forEach(yi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Zf=e=>`- ${e}`,W2=e=>be.isFunction(e)||e===null||e===!1,ep={getAdapter:e=>{e=be.isArray(e)?e:[e];const{length:t}=e;let o,n;const a={};for(let s=0;s<t;s++){o=e[s];let r;if(n=o,!W2(o)&&(n=yi[(r=String(o)).toLowerCase()],n===void 0))throw new Ge(`Unknown adapter '${r}'`);if(n)break;a[r||"#"+s]=n}if(!n){const s=Object.entries(a).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let r=t?s.length>1?`since :
`+s.map(Zf).join(`
`):" "+Zf(s[0]):"as no adapter specified";throw new Ge("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n},adapters:yi};function bi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ha(null,e)}function tp(e){return bi(e),e.headers=mn.from(e.headers),e.data=vi.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ep.getAdapter(e.adapter||cs.adapter)(e).then(function(n){return bi(e),n.data=vi.call(e,e.transformResponse,n),n.headers=mn.from(n.headers),n},function(n){return jf(n)||(bi(e),n&&n.response&&(n.response.data=vi.call(e,e.transformResponse,n.response),n.response.headers=mn.from(n.response.headers))),Promise.reject(n)})}const np="1.11.0",Tr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tr[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const op={};Tr.transitional=function(t,o,n){function a(s,r){return"[Axios v"+np+"] Transitional option '"+s+"'"+r+(n?". "+n:"")}return(s,r,l)=>{if(t===!1)throw new Ge(a(r," has been removed"+(o?" in "+o:"")),Ge.ERR_DEPRECATED);return o&&!op[r]&&(op[r]=!0,console.warn(a(r," has been deprecated since v"+o+" and will be removed in the near future"))),t?t(s,r,l):!0}},Tr.spelling=function(t){return(o,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function V2(e,t,o){if(typeof e!="object")throw new Ge("options must be an object",Ge.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const s=n[a],r=t[s];if(r){const l=e[s],u=l===void 0||r(l,s,e);if(u!==!0)throw new Ge("option "+s+" must be "+u,Ge.ERR_BAD_OPTION_VALUE);continue}if(o!==!0)throw new Ge("Unknown option "+s,Ge.ERR_BAD_OPTION)}}const Sr={assertOptions:V2,validators:Tr},Qn=Sr.validators;let Go=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ff,response:new Ff}}async request(t,o){try{return await this._request(t,o)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const s=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
`+s):n.stack=s}catch{}}throw n}}_request(t,o){typeof t=="string"?(o=o||{},o.url=t):o=t||{},o=qo(this.defaults,o);const{transitional:n,paramsSerializer:a,headers:s}=o;n!==void 0&&Sr.assertOptions(n,{silentJSONParsing:Qn.transitional(Qn.boolean),forcedJSONParsing:Qn.transitional(Qn.boolean),clarifyTimeoutError:Qn.transitional(Qn.boolean)},!1),a!=null&&(be.isFunction(a)?o.paramsSerializer={serialize:a}:Sr.assertOptions(a,{encode:Qn.function,serialize:Qn.function},!0)),o.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?o.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:o.allowAbsoluteUrls=!0),Sr.assertOptions(o,{baseUrl:Qn.spelling("baseURL"),withXsrfToken:Qn.spelling("withXSRFToken")},!0),o.method=(o.method||this.defaults.method||"get").toLowerCase();let r=s&&be.merge(s.common,s[o.method]);s&&be.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),o.headers=mn.concat(r,s);const l=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(o)===!1||(u=u&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let c,f=0,h;if(!u){const v=[tp.bind(this),void 0];for(v.unshift(...l),v.push(...d),h=v.length,c=Promise.resolve(o);f<h;)c=c.then(v[f++],v[f++]);return c}h=l.length;let p=o;for(f=0;f<h;){const v=l[f++],y=l[f++];try{p=v(p)}catch(T){y.call(this,T);break}}try{c=tp.call(this,p)}catch(v){return Promise.reject(v)}for(f=0,h=d.length;f<h;)c=c.then(d[f++],d[f++]);return c}getUri(t){t=qo(this.defaults,t);const o=qf(t.baseURL,t.url,t.allowAbsoluteUrls);return Pf(o,t.params,t.paramsSerializer)}};be.forEach(["delete","get","head","options"],function(t){Go.prototype[t]=function(o,n){return this.request(qo(n||{},{method:t,url:o,data:(n||{}).data}))}}),be.forEach(["post","put","patch"],function(t){function o(n){return function(s,r,l){return this.request(qo(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:r}))}}Go.prototype[t]=o(),Go.prototype[t+"Form"]=o(!0)});let z2=class Dg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let o;this.promise=new Promise(function(s){o=s});const n=this;this.promise.then(a=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](a);n._listeners=null}),this.promise.then=a=>{let s;const r=new Promise(l=>{n.subscribe(l),s=l}).then(a);return r.cancel=function(){n.unsubscribe(s)},r},t(function(s,r,l){n.reason||(n.reason=new ha(s,r,l),o(n.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 o=this._listeners.indexOf(t);o!==-1&&this._listeners.splice(o,1)}toAbortSignal(){const t=new AbortController,o=n=>{t.abort(n)};return this.subscribe(o),t.signal.unsubscribe=()=>this.unsubscribe(o),t.signal}static source(){let t;return{token:new Dg(function(a){t=a}),cancel:t}}};function q2(e){return function(o){return e.apply(null,o)}}function G2(e){return be.isObject(e)&&e.isAxiosError===!0}const wi={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(wi).forEach(([e,t])=>{wi[t]=e});function ap(e){const t=new Go(e),o=xf(Go.prototype.request,t);return be.extend(o,Go.prototype,t,{allOwnKeys:!0}),be.extend(o,t,null,{allOwnKeys:!0}),o.create=function(a){return ap(qo(e,a))},o}const Rt=ap(cs);Rt.Axios=Go,Rt.CanceledError=ha,Rt.CancelToken=z2,Rt.isCancel=jf,Rt.VERSION=np,Rt.toFormData=_r,Rt.AxiosError=Ge,Rt.Cancel=Rt.CanceledError,Rt.all=function(t){return Promise.all(t)},Rt.spread=q2,Rt.isAxiosError=G2,Rt.mergeConfig=qo,Rt.AxiosHeaders=mn,Rt.formToJSON=e=>Bf(be.isHTMLForm(e)?new FormData(e):e),Rt.getAdapter=ep.getAdapter,Rt.HttpStatusCode=wi,Rt.default=Rt;const{Axios:K$,AxiosError:J$,CanceledError:X$,isCancel:Z$,CancelToken:eA,VERSION:tA,all:nA,Cancel:oA,isAxiosError:aA,spread:sA,toFormData:rA,AxiosHeaders:lA,HttpStatusCode:iA,formToJSON:uA,getAdapter:cA,mergeConfig:dA}=Rt,Ae=Rt.create({baseURL:"/weilin/prompt_ui/api",timeout:3e4,headers:{"Content-Type":"application/json"}});Ae.interceptors.request.use(e=>e,e=>Promise.reject(e)),Ae.interceptors.response.use(e=>e.data,e=>Promise.reject(e));const kr={getUserSetting:async()=>await Ae({url:"/user_init/get_settings",method:"get"}),setUserLanguage:async e=>await Ae({url:"/user_init/set_user_lang",method:"post",data:{user_lang:e}}),startPanel:async()=>await Ae({url:"/panel/start",method:"post"})},sp=()=>pr(),fs=a0({legacy:!1,locale:"zh_CN",fallbackLocale:"zh_CN",messages:{zh_CN:m0,en_US:v0}}),Q2=()=>{const e=sp();kr.getUserSetting().then(t=>{var n;e.setUserSetting(t.data);const o=((n=e.userSetting)==null?void 0:n.user_lang)||"zh_CN";fs.global.locale.value=o})},Y2=e=>{fs.global.locale.value=e,sp().setUserSetting({user_lang:e})},K2=()=>{Q2()},J2={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=b(!1);return _t(()=>{t.value=!0}),{style:e,visible:t}}},X2={class:"text"};function Z2(e,t,o,n,a,s){return we((x(),C("div",{class:"pop-message",style:ct(n.style[o.type])},[i("i",{class:Ce(["icon",[n.style[o.type].icon]])},null,2),i("span",X2,m(o.str),1)],4)),[[tr,n.visible]])}const e_=wt(J2,[["render",Z2],["__scopeId","data-v-7ee59bf2"]]),xi=document.createElement("div");document.body.appendChild(xi);let Ti=null;const Y=({str:e,type:t,name:o=""})=>{let n=fs.global.t(e);o.length>0&&(n=fs.global.t(e,{name:o}));const a=qe(e_,{str:n,type:t});ud(a,xi),Ti&&clearTimeout(Ti),Ti=setTimeout(()=>{ud(null,xi)},2e3)},t_={class:"language-selector-content"},n_=["onClick"],o_={class:"lang-name"},a_=wt({__name:"LanguageSwitcher",emits:["close"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(null),s=pr(),r=nt(()=>s.userSetting.user_lang),l=[{code:"zh_CN",name:"简体中文"},{code:"en_US",name:"English"}],u=o,d=h=>{c(h),u("close",{})},c=h=>{kr.setUserLanguage(h).then(p=>{Y2(h),window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*"),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.setLanguageSuccess"})}).catch(p=>{Y({type:"warn",str:"message.setLanguageFailed"})})};return t({setPosition:h=>{if(!a.value)return;const p=a.value;p.style.position="fixed",p.style.top=`${h.bottom}px`}}),(h,p)=>(x(),C("div",{class:"language-selector",ref_key:"selectorRef",ref:a},[i("div",t_,[(x(),C(Oe,null,We(l,(v,y)=>i("div",{style:ct({"margin-top":y===0?"0":"2px"}),key:v.code,class:Ce(["language-option",{active:r.value===v.code}]),onClick:T=>d(v.code)},[i("span",o_,m(v.name),1)],14,n_)),64))])],512))}},[["__scopeId","data-v-b77d604b"]]),fo="weilin_prompt_ui_",ps=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 o=e,n=t,a=()=>{n("update:modelValue",!1)},s=()=>{o.closeOnClickOverlay&&a()};return(r,l)=>(x(),yt(zu,{to:"#weilin_comfyui_tools_prompt_ui_div"},[qe(Nl,{name:`${fo}dialog-fade`},{default:pt(()=>[e.modelValue?(x(),C("div",{key:0,class:Ce(`${fo}dialog-overlay`),onClick:s},[qe(Nl,{name:`${fo}dialog-slide`},{default:pt(()=>[i("div",{style:ct({width:e.width}),class:Ce(`${fo}dialog`),onClick:l[0]||(l[0]=ot(()=>{},["stop"]))},[i("div",{class:Ce(`${fo}dialog-header`)},[i("h3",{class:Ce(`${fo}dialog-title`)},m(e.title),3),i("button",{class:Ce(`${fo}dialog-close`),onClick:a},[...l[1]||(l[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:Ce(`${fo}dialog-content`)},[ja(r.$slots,"default")],2),r.$slots.footer?(x(),C("div",{key:0,class:Ce(`${fo}dialog-footer`)},[ja(r.$slots,"footer")],2)):fe("",!0)],6)]),_:3},8,["name"])],2)):fe("",!0)]),_:3},8,["name"])]))}},[["__scopeId","data-v-c8884323"]]),$n={getTranslateLocal:async e=>await Ae({url:"/prompt/local/translate",method:"post",data:{phrase:e}}),getTranslatePackagesState:async()=>await Ae({url:"/translate/get/packages/state",method:"post",data:{}}),getTranslateSetting:async()=>await Ae({url:"/translate/get/setting",method:"post",data:{}}),applyTranslateSetting:async e=>await Ae({url:"/translate/apply_setting",method:"post",data:{setting:e}}),installTranslatePackage:async()=>await Ae({url:"/translate/install/translaterpackage",method:"post",timeout:0,data:{}}),getTranslateBuktSetting:async()=>await Ae({url:"/translate/get/tran_setting",method:"post",data:{}}),saveTranslateSetting:async(e,t,o)=>await Ae({url:"/translate/save_tran/setting",method:"post",data:{service:e,source_lang:t,target_lang:o}}),translaterText:async e=>await Ae({url:"/translate/tran/text",method:"post",timeout:0,data:{text:e}}),translaterInputText:async e=>await Ae({url:"/translate/tran/input",method:"post",timeout:0,data:{text:e}})},Si={getAutocomplete:async e=>await Ae({url:"/prompt/fast/autocomplete",method:"post",data:{query:e}}),getAutocompleteLimit:async()=>await Ae({url:"/get/setting/get_auto_limit_setting",method:"post"}),updateAutocompleteLimit:async e=>await Ae({url:"/update/setting/update_auto_limit_setting",method:"post",data:{limit:e}})},gs={updateOpenAiSetting:async e=>await Ae({url:"/prompt/openai/update_settings",method:"post",data:e}),addOpenAiSetting:async e=>await Ae({url:"/prompt/openai/add_setting",method:"post",data:e}),deleteOpenAiSetting:async e=>await Ae({url:"/prompt/openai/delete_setting",method:"post",data:e}),setOpenAiSelect:async e=>await Ae({url:"/prompt/openai/set_select",method:"post",data:e}),getOpenAiSetting:async()=>await Ae({url:"/prompt/openai/get_settings",method:"get"})},s_=["alibaba","baidu","bing","deepl","youdao","qqtransmart","sogou","niutrans","mymemory","modernmt","volcengine","iciba","iflytek","google","lingvanex","yandex","itranslate","systran","argos","apertium","reverso","cloudtranslation","translatecom","tilde","caiyun","qqfanyi","translateme","papago","mirai","iflyrec","hujiang","yeekit","languagewire","elia","judic","mglip","utibet"],rp=[{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"}],r_={class:"settings-content"},l_={class:"settings-sidebar"},i_={class:"settings-main"},u_={key:0},c_={class:"setting-select"},d_={value:"network"},f_={value:"translater"},p_={class:"translator-settings"},g_={key:0,class:"group-box"},h_={class:"group-title"},m_={class:"note-top"},v_={class:"setting-item"},__={value:"auto"},y_={value:"chinese_simplified"},b_={value:"english"},w_={class:"setting-item"},x_={value:"chinese_simplified"},T_={value:"english"},S_={key:1,class:"group-box"},k_={class:"group-title"},C_={class:"note-top"},E_={class:"translater-innstall-status"},L_={class:"translater-install-label"},$_={key:0,class:"translater-install-label"},A_={key:1,class:"translater-install-control"},I_=["disabled"],M_={key:0,class:"translater-setting-box"},O_={class:"setting-small-titile"},R_={class:"setting-item"},N_=["index","value"],D_={class:"language-selectors"},P_={class:"setting-item"},F_=["index","value"],U_={class:"setting-item"},B_=["index","value"],H_={key:1,class:"tranlater-text-box"},j_={class:"setting-small-titile"},W_={class:"setting-item"},V_=["placeholder"],z_={class:"setting-item"},q_=["placeholder"],G_={key:1},Q_={class:"floating-ball-settings"},Y_={class:"setting-item"},K_=["placeholder"],J_={class:"setting-item"},X_=["placeholder"],Z_={class:"setting-item"},ey=["placeholder"],ty={key:2},ny={class:"floating-ball-settings",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"15px"}},oy={class:"settings-column"},ay={class:"setting-item"},sy={class:"setting-item"},ry=["placeholder"],ly={class:"setting-item"},iy=["placeholder"],uy={class:"setting-item"},cy=["placeholder"],dy={class:"settings-column"},fy={class:"setting-item"},py={value:"default"},gy={value:"custom"},hy={key:0,class:"setting-item"},my={key:0,class:"skin-preview"},vy=["src"],_y={class:"setting-item",style:{"grid-column":"span 2"}},yy={value:"gradient"},by={value:"transparent"},wy={key:0,class:"setting-item",style:{"grid-column":"span 2"}},xy={style:{display:"flex",gap:"10px","align-items":"center"}},Ty={class:"setting-item",style:{"grid-column":"span 2"}},Sy={key:3},ky={class:"floating-ball-settings"},Cy={class:"setting-item"},Ey={class:"setting-item"},Ly={class:"setting-item"},$y={class:"setting-item"},Ay={class:"setting-item"},Iy={key:4},My={class:"openai-settings"},Oy={class:"setting-item"},Ry=["value"],Ny={class:"config-list"},Dy={class:"config-header"},Py={class:"config-actions"},Fy=["onClick"],Uy=["onClick"],By={key:0,class:"config-form"},Hy={class:"form-group"},jy=["placeholder"],Wy={class:"form-group"},Vy=["placeholder"],zy={class:"form-group"},qy=["placeholder"],Gy={class:"form-actions"},Qy=["onClick"],Yy={key:1,class:"config-details"},Ky={key:0,class:"config-form"},Jy={class:"form-group"},Xy=["placeholder"],Zy={class:"form-group"},e3=["placeholder"],t3={class:"form-group"},n3=["placeholder"],o3={class:"form-actions"},a3={key:5},s3={class:"sponsor-me-settings"},r3={key:6},l3={class:"start-panel-settings"},lp=wt({__name:"setting_dialog",setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b("translator"),s=b("baidu"),r=b(""),l=b(localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english"),u=b(localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified"),d=b(localStorage.getItem("weilin_prompt_ui_floatingBallCount")||1),c=b(localStorage.getItem("weilin_prompt_ui_floatingBallSize")||66),f=b(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||c.value),h=b(localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true"),p=b(localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default"),v=b(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),y=b(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),T=b(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),k=b(localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc"),$=b(localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50),B=b(localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true"),w=b(localStorage.getItem("weilin_prompt_ui_period_conversion")==="true"),M=b(localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true"),H=b(localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true"),W=b(localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"),D=b(""),I=b(""),ee=b(""),K=b(0),V=b([]),ne=b(!1),oe=b({api_key:"",base_url:"https://api.openai.com/v1",model:""}),X=b(!1),re=b(-1),se=b(""),F=b(!1),R=b(!1),ie=b(""),Te=b(""),te=b(25),le=b(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),ve=b(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),xe=Ie=>{a.value=Ie,Ie=="setting_auto_complete_limit"&&st()},pe=()=>{localStorage.setItem("weilin_prompt_ui_sourceLanguage",l.value),localStorage.setItem("weilin_prompt_ui_targetLanguage",u.value),window.parent.postMessage({type:"weilin_prompt_ui_translate_setting"},"*"),Y({type:"success",str:"message.saveSuccess"})},P=Ie=>{const ke=Ie.target.files[0];if(ke){const Ee=new FileReader;Ee.onload=ft=>{v.value=ft.target.result,localStorage.setItem("weilin_prompt_ui_customSkinUrl",ft.target.result)},Ee.readAsDataURL(ke)}},q=()=>{T.value="#6a11cb",k.value="#2575fc"},Z=()=>{if(d.value<1||c.value<5||f.value<5){Y({type:"warn",str:"message.error"});return}localStorage.setItem("weilin_prompt_ui_floatingBallEnabled",h.value),localStorage.setItem("weilin_prompt_ui_floatingBallCount",d.value),localStorage.setItem("weilin_prompt_ui_floatingBallSize",c.value),localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",f.value),localStorage.setItem("weilin_prompt_ui_ballSkinType",p.value),localStorage.setItem("weilin_prompt_ui_bgType",y.value),localStorage.setItem("weilin_prompt_ui_gradientColor1",T.value),localStorage.setItem("weilin_prompt_ui_gradientColor2",k.value),localStorage.setItem("weilin_prompt_ui_ballBorderRadius",$.value),localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",f.value),window.parent.postMessage({type:"weilin_prompt_ui_floating_ball_setting"},"*"),Y({type:"success",str:"message.saveSuccess"})},O=()=>{localStorage.setItem("weilin_prompt_ui_comma_conversion",B.value),localStorage.setItem("weilin_prompt_ui_period_conversion",w.value),localStorage.setItem("weilin_prompt_ui_bracket_conversion",M.value),localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion",H.value),localStorage.setItem("weilin_prompt_ui_underscore_to_bracket",W.value),Y({type:"success",str:"message.saveSuccess"})},Q=()=>{kr.getUserSetting().then(Ie=>{V.value=Ie.data.openai_settings,K.value=Ie.data.select_openai})},E=()=>{oe.value={api_key:"",base_url:"https://api.openai.com/v1",model:""},X.value=!1,ne.value=!0},L=Ie=>{gs.deleteOpenAiSetting({index:Ie}).then(ke=>{Q(),Y({type:"success",str:"message.deleteSuccess"})}).catch(ke=>{Y({type:"warn",str:"message.networkError"})})},N=Ie=>{re.value===Ie?re.value=-1:(oe.value={...V.value[Ie]},re.value=Ie)},J=Ie=>{gs.updateOpenAiSetting({index:Ie,...oe.value}).then(ke=>{Q(),re.value=-1,Y({type:"success",str:"message.saveSuccess"})}).catch(ke=>{Y({type:"warn",str:"message.networkError"})})},de=()=>{gs.addOpenAiSetting({...oe.value}).then(Ie=>{Q(),ne.value=!1,re.value=-1,Y({type:"success",str:"message.saveSuccess"})}).catch(Ie=>{Y({type:"warn",str:"message.networkError"})})},he=()=>{ne.value=!1,re.value=-1},S=()=>{gs.setOpenAiSelect({index:K.value}).then(Ie=>{Y({type:"success",str:"message.saveSuccess"})}).catch(Ie=>{Y({type:"warn",str:"message.networkError"})})},_=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},A=()=>{kr.startPanel().then(Ie=>{Y({type:"success",str:"message.startPanelSuccess"})}).catch(Ie=>{Y({type:"warn",str:"message.startPanelFailed"})})},j=()=>{$n.getTranslatePackagesState().then(Ie=>{Ie.info=="ok"?R.value=!0:R.value=!1}).catch(Ie=>{Y({type:"warn",str:"message.getTranslaterFail"})})},me=()=>{$n.getTranslateSetting().then(Ie=>{localStorage.setItem("weilin_prompt_ui_translater_setting",Ie.data),se.value=Ie.data}).catch(Ie=>{Y({type:"warn",str:"message.getTranslaterFail"})})},ue=()=>{$n.applyTranslateSetting(se.value).then(Ie=>{Ie.info=="ok"?(localStorage.setItem("weilin_prompt_ui_translater_setting",se.value),Y({type:"success",str:"message.applyTranslaterSuccess"})):Y({type:"warn",str:"message.applyToTranslaterFail"})}).catch(Ie=>{Y({type:"warn",str:"message.applyTranslaterFail"})})},z=()=>{$n.getTranslateBuktSetting().then(Ie=>{D.value=Ie.data.translate_service,I.value=Ie.data.translate_source_lang,ee.value=Ie.data.translate_target_lang}).catch(Ie=>{Y({type:"warn",str:"message.getTranslaterFail"})})},ae=()=>{$n.saveTranslateSetting(D.value,I.value,ee.value).then(Ie=>{Ie.info=="ok"?Y({type:"success",str:"message.saveSuccess"}):Y({type:"warn",str:"message.saveFailed"})}).catch(Ie=>{Y({type:"warn",str:"message.saveFailed"})})},Me=()=>{$n.translaterInputText(ie.value).then(Ie=>{Te.value=Ie.text}).catch(Ie=>{Y({type:"warn",str:"message.translaterTestFail"})})},Pe=b(null),je=()=>{F.value=!0,$n.installTranslatePackage().then(Ie=>{F.value=!1,R.value=!0,Y({type:"success",str:"message.tranlaterPackageInstallSuccess"})}).catch(Ie=>{F.value=!1,Y({type:"warn",str:"message.tranlaterPackageInstallFail"})})},st=async()=>{await Si.getAutocompleteLimit().then(Ie=>{te.value=Ie.data}).catch(Ie=>{console.error(Ie),Y({type:"warn",str:"message.networkError"})})},tt=async()=>{await Si.updateAutocompleteLimit(te.value).then(Ie=>{Y({type:"success",str:"message.saveSuccess"}),localStorage.setItem("weilin_prompt_ui_auto_box_width",le.value),localStorage.setItem("weilin_prompt_ui_auto_box_height",ve.value)}).catch(Ie=>{console.error(Ie),Y({type:"warn",str:"message.networkError"})})};return _t(()=>{z(),j(),me(),Q()}),On(()=>{Pe.value&&clearInterval(Pe.value)}),t({open:()=>{a.value="translator",s.value="baidu",r.value="",l.value=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",u.value=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified",d.value=localStorage.getItem("weilin_prompt_ui_floatingBallCount")||1,c.value=localStorage.getItem("weilin_prompt_ui_floatingBallSize")||5,h.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true",B.value=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",w.value=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",M.value=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",H.value=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true",W.value=localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true",n.value=!0}}),(Ie,ke)=>(x(),yt(ps,{modelValue:n.value,"onUpdate:modelValue":ke[39]||(ke[39]=Ee=>n.value=Ee),title:g(o)("promptBox.settings.title")},{footer:pt(()=>[i("button",{onClick:ke[38]||(ke[38]=Ee=>n.value=!1)},m(g(o)("promptBox.settings.close")),1)]),default:pt(()=>[i("div",r_,[i("div",l_,[i("ul",null,[i("li",{class:Ce({active:a.value==="translator"}),onClick:ke[0]||(ke[0]=Ee=>xe("translator"))},m(g(o)("promptBox.settings.translator")),3),i("li",{class:Ce({active:a.value==="setting_auto_complete_limit"}),onClick:ke[1]||(ke[1]=Ee=>xe("setting_auto_complete_limit"))},m(g(o)("promptBox.settings.setting_auto_complete_limit")),3),i("li",{class:Ce({active:a.value==="setting_floating_ball"}),onClick:ke[2]||(ke[2]=Ee=>xe("setting_floating_ball"))},m(g(o)("promptBox.settings.setting_floating_ball")),3),i("li",{class:Ce({active:a.value==="setting_prompt_box"}),onClick:ke[3]||(ke[3]=Ee=>xe("setting_prompt_box"))},m(g(o)("promptBox.settings.setting_prompt_box")),3),i("li",{class:Ce({active:a.value==="setting_openai_box"}),onClick:ke[4]||(ke[4]=Ee=>xe("setting_openai_box"))},m(g(o)("promptBox.settings.setting_openai_box")),3),i("li",{class:Ce({active:a.value==="setting_sponsor_me"}),onClick:ke[5]||(ke[5]=Ee=>xe("setting_sponsor_me"))},m(g(o)("promptBox.settings.setting_sponsor_me")),3)])]),i("div",i_,[a.value==="translator"?(x(),C("div",u_,[i("h3",null,m(g(o)("promptBox.settings.translator")),1),i("div",c_,[i("label",null,m(g(o)("promptBox.settings.selectTranslater")),1),we(i("select",{style:{"margin-left":"10px"},"onUpdate:modelValue":ke[6]||(ke[6]=Ee=>se.value=Ee)},[i("option",d_,m(g(o)("promptBox.settings.selectOptionNetworkTranslater")),1),i("option",f_,m(g(o)("promptBox.settings.selectOptionPythonTranslater")),1),ke[40]||(ke[40]=i("option",{value:"openai"},"OpenAI API 翻译",-1))],512),[[ln,se.value]]),i("button",{class:"install-button",onClick:ue},m(g(o)("promptBox.settings.apply")),1)]),i("div",p_,[se.value=="network"?(x(),C("div",g_,[i("div",h_,m(g(o)("promptBox.settings.selectOptionNetworkTranslaterTitle")),1),i("div",m_,m(g(o)("promptBox.settings.selectOptionNetworkTranslaterInfo"))+":https://github.com/xnx3/translate",1),i("div",v_,[i("label",null,m(g(o)("promptBox.settings.sourceLanguage")),1),we(i("select",{"onUpdate:modelValue":ke[7]||(ke[7]=Ee=>l.value=Ee)},[i("option",__,m(g(o)("promptBox.settings.auto_detect")),1),i("option",y_,m(g(o)("promptBox.settings.chinese_simplified")),1),i("option",b_,m(g(o)("promptBox.settings.english")),1)],512),[[ln,l.value]])]),i("div",w_,[i("label",null,m(g(o)("promptBox.settings.targetLanguage")),1),we(i("select",{"onUpdate:modelValue":ke[8]||(ke[8]=Ee=>u.value=Ee),class:"common-select"},[i("option",x_,m(g(o)("promptBox.settings.chinese_simplified")),1),i("option",T_,m(g(o)("promptBox.settings.english")),1)],512),[[ln,u.value]])]),i("button",{class:"save-button",onClick:pe},m(g(o)("promptBox.settings.save")),1)])):fe("",!0),se.value=="translater"?(x(),C("div",S_,[i("div",k_,m(g(o)("promptBox.settings.selectOptionPythonTranslaterTitle")),1),i("div",C_,m(g(o)("promptBox.settings.selectOptionPythonTranslaterInfo"))+":https://github.com/UlionTse/translators",1),i("div",E_,[i("div",L_,m(g(o)("promptBox.settings.nowTranlaterPackageState"))+" "+m(R.value?g(o)("promptBox.settings.tranlaterPackageStateTrue"):g(o)("promptBox.settings.tranlaterPackageStateFlase")),1),F.value?(x(),C("div",$_,m(g(o)("promptBox.settings.installTranslaterPackageInfo")),1)):fe("",!0),R.value?fe("",!0):(x(),C("div",A_,[i("button",{disabled:F.value,class:"install-button",onClick:je},m(F.value?g(o)("promptBox.settings.installed"):g(o)("promptBox.settings.install")),9,I_)]))]),R.value?(x(),C("div",M_,[i("div",O_,m(g(o)("promptBox.settings.translaterSetting")),1),i("div",R_,[i("label",null,m(g(o)("promptBox.settings.chooseTranslaterSetting")),1),we(i("select",{"onUpdate:modelValue":ke[9]||(ke[9]=Ee=>D.value=Ee)},[(x(!0),C(Oe,null,We(g(s_),(Ee,ft)=>(x(),C("option",{index:ft,key:"tran-item_"+ft,value:Ee},m(g(o)("translaterService."+Ee)),9,N_))),128))],512),[[ln,D.value]])]),i("div",D_,[i("div",P_,[i("label",null,m(g(o)("promptBox.settings.translaterLangSourceSetting")),1),we(i("select",{"onUpdate:modelValue":ke[10]||(ke[10]=Ee=>I.value=Ee)},[(x(!0),C(Oe,null,We(g(rp),(Ee,ft)=>(x(),C("option",{index:ft,key:"lan-item_"+ft,value:Ee.translator},m(g(o)("translaterLanguage."+Ee.language)),9,F_))),128))],512),[[ln,I.value]])]),i("div",U_,[i("label",null,m(g(o)("promptBox.settings.translaterLangTargeSetting")),1),we(i("select",{"onUpdate:modelValue":ke[11]||(ke[11]=Ee=>ee.value=Ee)},[(x(!0),C(Oe,null,We(g(rp),(Ee,ft)=>(x(),C("option",{index:ft,key:"lan-mu-item_"+ft,value:Ee.translator},m(g(o)("translaterLanguage."+Ee.language)),9,B_))),128))],512),[[ln,ee.value]])])]),i("button",{class:"install-button",onClick:ae},m(g(o)("promptBox.settings.saveTranslaterSetting")),1)])):fe("",!0),R.value?(x(),C("div",H_,[i("div",j_,m(g(o)("promptBox.settings.testTranslaterTitle")),1),i("div",W_,[i("label",null,m(g(o)("promptBox.settings.inputTestTranslater")),1),we(i("input",{type:"text","onUpdate:modelValue":ke[12]||(ke[12]=Ee=>ie.value=Ee),placeholder:g(o)("promptBox.settings.inputTestTranslaterPlaceholder")},null,8,V_),[[$e,ie.value]])]),i("div",z_,[i("label",null,m(g(o)("promptBox.settings.outPutTestTranslater")),1),we(i("input",{type:"text","onUpdate:modelValue":ke[13]||(ke[13]=Ee=>Te.value=Ee),readonly:"",placeholder:g(o)("promptBox.settings.outPutTestTranslaterPlaceholder")},null,8,q_),[[$e,Te.value]])]),i("button",{class:"install-button",onClick:Me},m(g(o)("promptBox.settings.testingTranslater")),1)])):fe("",!0)])):fe("",!0)])])):fe("",!0),a.value==="setting_auto_complete_limit"?(x(),C("div",G_,[i("h3",null,m(g(o)("promptBox.settings.setting_auto_complete_limit")),1),i("div",Q_,[i("div",Y_,[i("label",null,m(g(o)("promptBox.settings.show_auto_limit")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[14]||(ke[14]=Ee=>te.value=Ee),min:"1",max:"99999999",style:{width:"100px"},placeholder:g(o)("promptBox.settings.showAutoLimitPlaceholder")},null,8,K_),[[$e,te.value,void 0,{number:!0}]])]),i("div",J_,[i("label",null,m(g(o)("promptBox.settings.settingAutoCompleteWidth")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[15]||(ke[15]=Ee=>le.value=Ee),min:"5",style:{width:"100px"},placeholder:g(o)("promptBox.settings.settingAutoCompleteWidthPlaceholder")},null,8,X_),[[$e,le.value,void 0,{number:!0}]])]),i("div",Z_,[i("label",null,m(g(o)("promptBox.settings.settingAutoCompleteHeight")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[16]||(ke[16]=Ee=>ve.value=Ee),min:"5",style:{width:"100px"},placeholder:g(o)("promptBox.settings.settingAutoCompleteHeightPlaceholder")},null,8,ey),[[$e,ve.value,void 0,{number:!0}]])]),i("button",{class:"save-button",onClick:tt},m(g(o)("promptBox.settings.save")),1)])])):fe("",!0),a.value==="setting_floating_ball"?(x(),C("div",ty,[i("h3",null,m(g(o)("promptBox.settings.setting_floating_ball")),1),i("div",ny,[i("div",oy,[i("div",ay,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ke[17]||(ke[17]=Ee=>h.value=Ee)},null,512),[[Vt,h.value]]),Ve(" "+m(g(o)("promptBox.settings.enableFloatingBall")),1)])]),i("div",sy,[i("label",null,m(g(o)("promptBox.settings.floatingBallCount")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[18]||(ke[18]=Ee=>d.value=Ee),min:"1",max:"100",placeholder:g(o)("promptBox.settings.floatingBallCountPlaceholder")},null,8,ry),[[$e,d.value,void 0,{number:!0}]])]),i("div",ly,[i("label",null,m(g(o)("promptBox.settings.floatingBallSize")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[19]||(ke[19]=Ee=>c.value=Ee),min:"5",max:"999999",placeholder:g(o)("promptBox.settings.floatingBallSizePlaceholder")},null,8,iy),[[$e,c.value,void 0,{number:!0}]])]),i("div",uy,[i("label",null,m(g(o)("promptBox.settings.floatingBallHeight")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[20]||(ke[20]=Ee=>f.value=Ee),min:"5",max:"999999",placeholder:g(o)("promptBox.settings.floatingBallHeightPlaceholder")},null,8,cy),[[$e,f.value,void 0,{number:!0}]])])]),i("div",dy,[i("div",fy,[i("label",null,m(g(o)("promptBox.settings.skinSetting")),1),we(i("select",{"onUpdate:modelValue":ke[21]||(ke[21]=Ee=>p.value=Ee)},[i("option",py,m(g(o)("promptBox.settings.defaultSkin")),1),i("option",gy,m(g(o)("promptBox.settings.customSkin")),1)],512),[[ln,p.value]])]),p.value==="custom"?(x(),C("div",hy,[i("label",null,m(g(o)("promptBox.settings.uploadSkin")),1),i("input",{type:"file",accept:"image/*",onChange:P,ref:"skinUploader"},null,544),v.value?(x(),C("div",my,[i("img",{src:v.value,alt:"Custom Skin Preview"},null,8,vy)])):fe("",!0)])):fe("",!0)]),i("div",_y,[i("label",null,m(g(o)("promptBox.settings.bgSetting")),1),we(i("select",{"onUpdate:modelValue":ke[22]||(ke[22]=Ee=>y.value=Ee)},[i("option",yy,m(g(o)("promptBox.settings.gradientBg")),1),i("option",by,m(g(o)("promptBox.settings.transparentBg")),1)],512),[[ln,y.value]])]),y.value==="gradient"?(x(),C("div",wy,[i("label",null,m(g(o)("promptBox.settings.gradientColor")),1),i("div",xy,[we(i("input",{type:"color","onUpdate:modelValue":ke[23]||(ke[23]=Ee=>T.value=Ee)},null,512),[[$e,T.value]]),we(i("input",{type:"color","onUpdate:modelValue":ke[24]||(ke[24]=Ee=>k.value=Ee)},null,512),[[$e,k.value]]),i("button",{onClick:q,style:{"margin-left":"10px",width:"200px"}},m(g(o)("promptBox.settings.resetToDefault")),1)])])):fe("",!0),i("div",Ty,[i("label",null,m(g(o)("promptBox.settings.borderRadius")),1),we(i("input",{type:"number","onUpdate:modelValue":ke[25]||(ke[25]=Ee=>$.value=Ee),min:"0",max:"50"},null,512),[[$e,$.value,void 0,{number:!0}]])]),i("button",{class:"save-button",style:{"grid-column":"span 2"},onClick:Z},m(g(o)("promptBox.settings.save")),1)])])):fe("",!0),a.value==="setting_prompt_box"?(x(),C("div",Sy,[i("h3",null,m(g(o)("promptBox.settings.setting_prompt_box")),1),i("div",ky,[i("div",Cy,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ke[26]||(ke[26]=Ee=>B.value=Ee)},null,512),[[Vt,B.value]]),Ve(" "+m(g(o)("promptBox.settings.enableCommaConversion")),1)])]),i("div",Ey,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ke[27]||(ke[27]=Ee=>w.value=Ee)},null,512),[[Vt,w.value]]),Ve(" "+m(g(o)("promptBox.settings.enablePeriodConversion")),1)])]),i("div",Ly,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ke[28]||(ke[28]=Ee=>M.value=Ee)},null,512),[[Vt,M.value]]),Ve(" "+m(g(o)("promptBox.settings.enableBracketConversion")),1)])]),i("div",$y,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ke[29]||(ke[29]=Ee=>H.value=Ee)},null,512),[[Vt,H.value]]),Ve(" "+m(g(o)("promptBox.settings.enableAngleBracketConversion")),1)])]),i("div",Ay,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ke[30]||(ke[30]=Ee=>W.value=Ee)},null,512),[[Vt,W.value]]),Ve(" "+m(g(o)("promptBox.settings.enableUnderscoreToBracket")),1)])]),i("button",{class:"save-button",onClick:O},m(g(o)("promptBox.settings.save")),1)])])):fe("",!0),a.value==="setting_openai_box"?(x(),C("div",Iy,[i("h3",null,m(g(o)("promptBox.settings.openaiSettings")),1),i("div",My,[i("div",Oy,[i("label",null,m(g(o)("promptBox.settings.selectedOpenaiConfig")),1),we(i("select",{"onUpdate:modelValue":ke[31]||(ke[31]=Ee=>K.value=Ee),onChange:S},[(x(!0),C(Oe,null,We(V.value,(Ee,ft)=>(x(),C("option",{key:ft,value:ft},m(Ee.model)+" ("+m(Ee.base_url)+") ",9,Ry))),128))],544),[[ln,K.value]])]),i("div",Ny,[(x(!0),C(Oe,null,We(V.value,(Ee,ft)=>(x(),C("div",{key:ft,class:"config-item"},[i("div",Dy,[i("span",null,m(Ee.model),1),i("div",Py,[i("button",{onClick:Tt=>N(ft)},m(re.value===ft?g(o)("promptBox.settings.cancel"):g(o)("promptBox.settings.edit")),9,Fy),i("button",{onClick:Tt=>L(ft)},m(g(o)("promptBox.settings.delete")),9,Uy)])]),re.value===ft?(x(),C("div",By,[i("div",Hy,[i("label",null,m(g(o)("promptBox.settings.openai_api_key"))+":",1),we(i("input",{type:"text","onUpdate:modelValue":ke[32]||(ke[32]=Tt=>oe.value.api_key=Tt),placeholder:g(o)("promptBox.settings.openai_api_key_placeholder")},null,8,jy),[[$e,oe.value.api_key]])]),i("div",Wy,[i("label",null,m(g(o)("promptBox.settings.openai_base_url"))+":",1),we(i("input",{type:"text","onUpdate:modelValue":ke[33]||(ke[33]=Tt=>oe.value.base_url=Tt),placeholder:g(o)("promptBox.settings.openai_base_url_placeholder")},null,8,Vy),[[$e,oe.value.base_url]])]),i("div",zy,[i("label",null,m(g(o)("promptBox.settings.openai_model"))+":",1),we(i("input",{type:"text","onUpdate:modelValue":ke[34]||(ke[34]=Tt=>oe.value.model=Tt),placeholder:g(o)("promptBox.settings.openai_model_placeholder")},null,8,qy),[[$e,oe.value.model]])]),i("div",Gy,[i("button",{onClick:Tt=>J(ft)},m(g(o)("promptBox.settings.save")),9,Qy)])])):(x(),C("div",Yy,[i("div",null,m(g(o)("promptBox.settings.openai_api_key"))+": "+m(Ee.api_key?"******":g(o)("promptBox.settings.not_set")),1),i("div",null,m(g(o)("promptBox.settings.openai_base_url"))+": "+m(Ee.base_url),1)]))]))),128))]),ne.value?(x(),C("div",Ky,[i("div",Jy,[i("label",null,m(g(o)("promptBox.settings.openai_api_key"))+":",1),we(i("input",{type:"text","onUpdate:modelValue":ke[35]||(ke[35]=Ee=>oe.value.api_key=Ee),placeholder:g(o)("promptBox.settings.openai_api_key_placeholder")},null,8,Xy),[[$e,oe.value.api_key]])]),i("div",Zy,[i("label",null,m(g(o)("promptBox.settings.openai_base_url"))+":",1),we(i("input",{type:"text","onUpdate:modelValue":ke[36]||(ke[36]=Ee=>oe.value.base_url=Ee),placeholder:g(o)("promptBox.settings.openai_base_url_placeholder")},null,8,e3),[[$e,oe.value.base_url]])]),i("div",t3,[i("label",null,m(g(o)("promptBox.settings.openai_model"))+":",1),we(i("input",{type:"text","onUpdate:modelValue":ke[37]||(ke[37]=Ee=>oe.value.model=Ee),placeholder:g(o)("promptBox.settings.openai_model_placeholder")},null,8,n3),[[$e,oe.value.model]])]),i("div",o3,[i("button",{onClick:he},m(g(o)("promptBox.settings.cancel")),1),i("button",{onClick:de},m(g(o)("promptBox.settings.save")),1)])])):fe("",!0),ne.value?fe("",!0):(x(),C("button",{key:1,class:"add-button",onClick:E},m(g(o)("promptBox.settings.addNewConfig")),1))])])):fe("",!0),a.value==="setting_sponsor_me"?(x(),C("div",a3,[i("h3",null,m(g(o)("promptBox.settings.setting_sponsor_me")),1),i("div",s3,[i("h1",null,m(g(o)("promptBox.settings.sponsorMeTip")),1),i("h2",null,m(g(o)("promptBox.settings.sponsorMeLink")),1),i("button",{class:"sponsor-me-button",onClick:_},m(g(o)("promptBox.settings.sponsorMe")),1)])])):fe("",!0),a.value==="setting_start_panel"?(x(),C("div",r3,[i("h3",null,m(g(o)("promptBox.settings.setting_start_panel")),1),i("div",l3,[i("h4",null,m(g(o)("promptBox.settings.startPanelTip")),1),i("button",{class:"start-panel-button",onClick:A},m(g(o)("promptBox.settings.startPanel")),1)])])):fe("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-a8cc11d7"]]),i3=["title"],u3={class:"switch-icon"},c3={key:0,class:"moon",viewBox:"0 0 24 24"},d3={key:1,class:"sun",viewBox:"0 0 24 24"},f3="weilin_tools_",p3=wt({__name:"ThemeSwitch",setup(e){const{t}=ht(),o=`${f3}theme`,n=b(localStorage.getItem(o)==="dark"),a=()=>{n.value=!n.value;const s=document.getElementById("weilin_comfyui_tools_prompt_ui_div");s&&s.setAttribute("data-theme",n.value?"dark":"light"),localStorage.setItem(o,n.value?"dark":"light")};return(s,r)=>(x(),C("button",{class:"theme-switch",onClick:a,title:g(t)("theme.toggle")},[i("div",u3,[n.value?(x(),C("svg",c3,[...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)])])):(x(),C("svg",d3,[...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)])]))]),ja(s.$slots,"default",{isDark:n.value},void 0,!0)],8,i3))}},[["__scopeId","data-v-e8b2125f"]]),vn="weilin_tools_",Mt={getTagsList:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/get_group_tags",method:"get",params:{...e,lang:t}})},addPrimaryCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/add_new_f_group",method:"post",data:{...e,lang:t}})},editPrimaryCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/edit_f_group",method:"post",data:{...e,lang:t}})},deletePrimaryCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/delete_f_group",method:"post",data:{...e,lang:t}})},addSubCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/add_new_s_group",method:"post",data:{...e,lang:t}})},editSubCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/edit_s_group",method:"post",data:{...e,lang:t}})},deleteSubCategory:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/delete_s_group",method:"post",data:{...e,lang:t}})},addNewTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/new_tags",method:"post",data:{...e,lang:t}})},editTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/edit_tags",method:"post",data:{...e,lang:t}})},deleteTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/delete_tags",method:"post",data:{...e,lang:t}})},batchDeleteTags:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/batch_delete_tags",method:"post",data:{...e,lang:t}})},moveTag:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/move_tag",method:"post",data:{...e,lang:t}})},getTagsGroupList:async()=>await Ae({url:"/prompt/get_groups_list",method:"post"}),runSQLToServer:async e=>await Ae({url:"/prompt/run_sql_text",method:"post",timeout:0,data:{sql:e}}),moveMainGroup:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/move_group",method:"post",data:{...e,lang:t}})},moveSubGroup:async e=>{const t=localStorage.getItem(`${vn}userLocale`)||"zh_CN";return await Ae({url:"/prompt/move_subgroup",method:"post",data:{...e,lang:t}})},getTagMainGroup:async()=>await Ae({url:"/prompt/get_tag_groups",method:"post"}),getTagSubGroup:async e=>await Ae({url:"/prompt/get_tag_subgroups",method:"post",data:{p_uuid:e}}),getTagList:async e=>await Ae({url:"/prompt/get_tag_tags",method:"post",data:{g_uuid:e}}),searchTag:async e=>await Ae({url:"/prompt/search_tags",method:"post",data:{keyword:e}})};/**
* uuidv7: A JavaScript implementation of UUID version 7
*
* Copyright 2021-2024 LiosK
*
* @license Apache-2.0
* @packageDocumentation
*/const Cr="0123456789abcdef";class Qo{constructor(t){this.bytes=t}static ofInner(t){if(t.length!==16)throw new TypeError("not 128-bit length");return new Qo(t)}static fromFieldsV7(t,o,n,a){if(!Number.isInteger(t)||!Number.isInteger(o)||!Number.isInteger(n)||!Number.isInteger(a)||t<0||o<0||n<0||a<0||t>0xffffffffffff||o>4095||n>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|o>>>8,s[7]=o,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new Qo(s)}static parse(t){var o,n,a,s;let r;switch(t.length){case 32:r=(o=/^[0-9a-f]{32}$/i.exec(t))===null||o===void 0?void 0:o[0];break;case 36:r=(n=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/i.exec(t))===null||n===void 0?void 0:n.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 l=new Uint8Array(16);for(let u=0;u<16;u+=4){const d=parseInt(r.substring(2*u,2*u+8),16);l[u+0]=d>>>24,l[u+1]=d>>>16,l[u+2]=d>>>8,l[u+3]=d}return new Qo(l)}else throw new SyntaxError("could not parse UUID string")}toString(){let t="";for(let o=0;o<this.bytes.length;o++)t+=Cr.charAt(this.bytes[o]>>>4),t+=Cr.charAt(this.bytes[o]&15),(o===3||o===5||o===7||o===9)&&(t+="-");return t}toHex(){let t="";for(let o=0;o<this.bytes.length;o++)t+=Cr.charAt(this.bytes[o]>>>4),t+=Cr.charAt(this.bytes[o]&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(o=>o===0)?"NIL":"VAR_0";if(t<=11)return"VAR_10";if(t<=13)return"VAR_110";if(t<=15)return this.bytes.every(o=>o===255)?"MAX":"VAR_RESERVED";throw new Error("unreachable")}getVersion(){return this.getVariant()==="VAR_10"?this.bytes[6]>>>4:void 0}clone(){return new Qo(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(let o=0;o<16;o++){const n=this.bytes[o]-t.bytes[o];if(n!==0)return Math.sign(n)}return 0}}class g3{constructor(t){this.timestamp=0,this.counter=0,this.random=t??h3()}generate(){return this.generateOrResetCore(Date.now(),1e4)}generateOrAbort(){return this.generateOrAbortCore(Date.now(),1e4)}generateOrResetCore(t,o){let n=this.generateOrAbortCore(t,o);return n===void 0&&(this.timestamp=0,n=this.generateOrAbortCore(t,o)),n}generateOrAbortCore(t,o){if(!Number.isInteger(t)||t<1||t>0xffffffffffff)throw new RangeError("`unixTsMs` must be a 48-bit positive integer");if(o<0||o>0xffffffffffff)throw new RangeError("`rollbackAllowance` out of reasonable range");if(t>this.timestamp)this.timestamp=t,this.resetCounter();else if(t+o>=this.timestamp)this.counter++,this.counter>4398046511103&&(this.timestamp++,this.resetCounter());else return;return Qo.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,Qo.ofInner(t)}}const h3=()=>{if(typeof crypto<"u"&&typeof crypto.getRandomValues<"u")return new m3;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 m3{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 ip;const Yo=()=>v3().toString(),v3=()=>(ip||(ip=new g3)).generate(),_3={class:"tag-manager"},y3={class:"category-tabs"},b3={class:"tabs-wrapper primary-tabs"},w3={class:"tabs-scroll"},x3=["onClick"],T3={class:"tab-text"},S3={key:0,class:"tabs-wrapper group-tabs"},k3={class:"tabs-scroll"},C3=["onClick"],E3={class:"tab-text"},L3=wt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=o,s=b([]),r=b(null),l=b(null),u=b([]),d=b(!1),c=b(!1),f=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},h=async()=>{try{const $=await Mt.getTagsGroupList();if(s.value=$.info,l.value){const B=s.value.flatMap(w=>w.groups).find(w=>w.p_uuid===l.value.p_uuid);B?l.value=B:l.value=null}if(r.value){const B=s.value.find(w=>w.p_uuid===r.value.p_uuid);B?r.value=B:r.value=null}}catch($){console.error("获取标签列表失败:",$)}},p=$=>{if(!$||$==="transparent")return"var(--primary-text)";let B,w,M,H=1;if($.startsWith("rgba")){const D=$.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);D&&([,B,w,M,H]=D.map(Number))}else if($.startsWith("rgb")){const D=$.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);D&&([,B,w,M]=D.map(Number))}return H<.5?"var(--primary-text)":(B*299+w*587+M*114)/1e3>128?"#000000":"#ffffff"};_t(()=>{window.addEventListener("message",T)}),ia(()=>{window.removeEventListener("message",T)});const v=$=>{r.value=$,l.value=null,d.value=!1,u.value=[]},y=$=>{l.value=$,d.value=!1,u.value=[]},T=$=>{$.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&h()},k=()=>{if(l.value==null||r.value==null){Y({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{group:r.value,sub:l.value}),c.value=!1};return t({open:()=>{f(),c.value=!0}}),($,B)=>(x(),yt(ps,{modelValue:c.value,"onUpdate:modelValue":B[1]||(B[1]=w=>c.value=w),title:g(n)("importDialog.selectTitle")},{footer:pt(()=>[i("button",{onClick:B[0]||(B[0]=w=>c.value=!1)},m(g(n)("promptBox.settings.close")),1),i("button",{onClick:k},m(g(n)("importDialog.sureSelect")),1)]),default:pt(()=>[i("div",_3,[i("div",y3,[i("div",b3,[i("div",w3,[(x(!0),C(Oe,null,We(s.value,(w,M)=>{var H,W,D;return x(),C("div",{key:"Tabss-"+M,class:Ce(["tab-item",{active:((H=r.value)==null?void 0:H.name)===w.name}]),style:ct({backgroundColor:((W=r.value)==null?void 0:W.name)===w.name?"var(--primary-color)":w.color,color:((D=r.value)==null?void 0:D.name)===w.name?"#ffffff":p(w.color)}),onClick:I=>v(w)},[i("span",T3,m(w.name),1)],14,x3)}),128))])]),r.value?(x(),C("div",S3,[i("div",k3,[(x(!0),C(Oe,null,We(r.value.groups,(w,M)=>{var H,W,D;return x(),C("div",{key:"TabsSw-"+M,class:Ce(["tab-item",{active:((H=l.value)==null?void 0:H.name)===w.name}]),style:ct({backgroundColor:((W=l.value)==null?void 0:W.name)===w.name?"var(--primary-color)":w.color,color:((D=l.value)==null?void 0:D.name)===w.name?"#ffffff":p(w.color)}),onClick:I=>y(w)},[i("span",E3,m(w.name),1)],14,C3)}),128))])])):fe("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-6031c9d4"]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function up(e){return typeof e>"u"||e===null}function $3(e){return typeof e=="object"&&e!==null}function A3(e){return Array.isArray(e)?e:up(e)?[]:[e]}function I3(e,t){var o,n,a,s;if(t)for(s=Object.keys(t),o=0,n=s.length;o<n;o+=1)a=s[o],e[a]=t[a];return e}function M3(e,t){var o="",n;for(n=0;n<t;n+=1)o+=e;return o}function O3(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var R3=up,N3=$3,D3=A3,P3=M3,F3=O3,U3=I3,jt={isNothing:R3,isObject:N3,toArray:D3,repeat:P3,isNegativeZero:F3,extend:U3};function cp(e,t){var o="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(o+='in "'+e.mark.name+'" '),o+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(o+=`
`+e.mark.snippet),n+" "+o):n}function hs(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=cp(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}hs.prototype=Object.create(Error.prototype),hs.prototype.constructor=hs,hs.prototype.toString=function(t){return this.name+": "+cp(this,t)};var un=hs;function ki(e,t,o,n,a){var s="",r="",l=Math.floor(a/2)-1;return n-t>l&&(s=" ... ",t=n-l+s.length),o-n>l&&(r=" ...",o=n+l-r.length),{str:s+e.slice(t,o).replace(/\t/g,"→")+r,pos:n-t+s.length}}function Ci(e,t){return jt.repeat(" ",t-e.length)+e}function B3(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 o=/\r?\n|\r|\0/g,n=[0],a=[],s,r=-1;s=o.exec(e.buffer);)a.push(s.index),n.push(s.index+s[0].length),e.position<=s.index&&r<0&&(r=n.length-2);r<0&&(r=n.length-1);var l="",u,d,c=Math.min(e.line+t.linesAfter,a.length).toString().length,f=t.maxLength-(t.indent+c+3);for(u=1;u<=t.linesBefore&&!(r-u<0);u++)d=ki(e.buffer,n[r-u],a[r-u],e.position-(n[r]-n[r-u]),f),l=jt.repeat(" ",t.indent)+Ci((e.line-u+1).toString(),c)+" | "+d.str+`
`+l;for(d=ki(e.buffer,n[r],a[r],e.position,f),l+=jt.repeat(" ",t.indent)+Ci((e.line+1).toString(),c)+" | "+d.str+`
`,l+=jt.repeat("-",t.indent+c+3+d.pos)+`^
`,u=1;u<=t.linesAfter&&!(r+u>=a.length);u++)d=ki(e.buffer,n[r+u],a[r+u],e.position-(n[r]-n[r+u]),f),l+=jt.repeat(" ",t.indent)+Ci((e.line+u+1).toString(),c)+" | "+d.str+`
`;return l.replace(/\n$/,"")}var H3=B3,j3=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],W3=["scalar","sequence","mapping"];function V3(e){var t={};return e!==null&&Object.keys(e).forEach(function(o){e[o].forEach(function(n){t[String(n)]=o})}),t}function z3(e,t){if(t=t||{},Object.keys(t).forEach(function(o){if(j3.indexOf(o)===-1)throw new un('Unknown option "'+o+'" 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(o){return o},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=V3(t.styleAliases||null),W3.indexOf(this.kind)===-1)throw new un('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Qt=z3;function dp(e,t){var o=[];return e[t].forEach(function(n){var a=o.length;o.forEach(function(s,r){s.tag===n.tag&&s.kind===n.kind&&s.multi===n.multi&&(a=r)}),o[a]=n}),o}function q3(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,o;function n(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,o=arguments.length;t<o;t+=1)arguments[t].forEach(n);return e}function Ei(e){return this.extend(e)}Ei.prototype.extend=function(t){var o=[],n=[];if(t instanceof Qt)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(o=o.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new un("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(s){if(!(s instanceof Qt))throw new un("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new un("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 un("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(s){if(!(s instanceof Qt))throw new un("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var a=Object.create(Ei.prototype);return a.implicit=(this.implicit||[]).concat(o),a.explicit=(this.explicit||[]).concat(n),a.compiledImplicit=dp(a,"implicit"),a.compiledExplicit=dp(a,"explicit"),a.compiledTypeMap=q3(a.compiledImplicit,a.compiledExplicit),a};var fp=Ei,pp=new Qt("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),gp=new Qt("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),hp=new Qt("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),mp=new fp({explicit:[pp,gp,hp]});function G3(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function Q3(){return null}function Y3(e){return e===null}var vp=new Qt("tag:yaml.org,2002:null",{kind:"scalar",resolve:G3,construct:Q3,predicate:Y3,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function K3(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 J3(e){return e==="true"||e==="True"||e==="TRUE"}function X3(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var _p=new Qt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:K3,construct:J3,predicate:X3,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 Z3(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function eb(e){return 48<=e&&e<=55}function tb(e){return 48<=e&&e<=57}function nb(e){if(e===null)return!1;var t=e.length,o=0,n=!1,a;if(!t)return!1;if(a=e[o],(a==="-"||a==="+")&&(a=e[++o]),a==="0"){if(o+1===t)return!0;if(a=e[++o],a==="b"){for(o++;o<t;o++)if(a=e[o],a!=="_"){if(a!=="0"&&a!=="1")return!1;n=!0}return n&&a!=="_"}if(a==="x"){for(o++;o<t;o++)if(a=e[o],a!=="_"){if(!Z3(e.charCodeAt(o)))return!1;n=!0}return n&&a!=="_"}if(a==="o"){for(o++;o<t;o++)if(a=e[o],a!=="_"){if(!eb(e.charCodeAt(o)))return!1;n=!0}return n&&a!=="_"}}if(a==="_")return!1;for(;o<t;o++)if(a=e[o],a!=="_"){if(!tb(e.charCodeAt(o)))return!1;n=!0}return!(!n||a==="_")}function ob(e){var t=e,o=1,n;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),n=t[0],(n==="-"||n==="+")&&(n==="-"&&(o=-1),t=t.slice(1),n=t[0]),t==="0")return 0;if(n==="0"){if(t[1]==="b")return o*parseInt(t.slice(2),2);if(t[1]==="x")return o*parseInt(t.slice(2),16);if(t[1]==="o")return o*parseInt(t.slice(2),8)}return o*parseInt(t,10)}function ab(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!jt.isNegativeZero(e)}var yp=new Qt("tag:yaml.org,2002:int",{kind:"scalar",resolve:nb,construct:ob,predicate:ab,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"]}}),sb=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function rb(e){return!(e===null||!sb.test(e)||e[e.length-1]==="_")}function lb(e){var t,o;return t=e.replace(/_/g,"").toLowerCase(),o=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?o===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:o*parseFloat(t,10)}var ib=/^[-+]?[0-9]+e/;function ub(e,t){var o;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(jt.isNegativeZero(e))return"-0.0";return o=e.toString(10),ib.test(o)?o.replace("e",".e"):o}function cb(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||jt.isNegativeZero(e))}var bp=new Qt("tag:yaml.org,2002:float",{kind:"scalar",resolve:rb,construct:lb,predicate:cb,represent:ub,defaultStyle:"lowercase"}),wp=mp.extend({implicit:[vp,_p,yp,bp]}),xp=wp,Tp=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sp=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 db(e){return e===null?!1:Tp.exec(e)!==null||Sp.exec(e)!==null}function fb(e){var t,o,n,a,s,r,l,u=0,d=null,c,f,h;if(t=Tp.exec(e),t===null&&(t=Sp.exec(e)),t===null)throw new Error("Date resolve error");if(o=+t[1],n=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(o,n,a));if(s=+t[4],r=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(c=+t[10],f=+(t[11]||0),d=(c*60+f)*6e4,t[9]==="-"&&(d=-d)),h=new Date(Date.UTC(o,n,a,s,r,l,u)),d&&h.setTime(h.getTime()-d),h}function pb(e){return e.toISOString()}var kp=new Qt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:db,construct:fb,instanceOf:Date,represent:pb});function gb(e){return e==="<<"||e===null}var Cp=new Qt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:gb}),Li=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
\r`;function hb(e){if(e===null)return!1;var t,o,n=0,a=e.length,s=Li;for(o=0;o<a;o++)if(t=s.indexOf(e.charAt(o)),!(t>64)){if(t<0)return!1;n+=6}return n%8===0}function mb(e){var t,o,n=e.replace(/[\r\n=]/g,""),a=n.length,s=Li,r=0,l=[];for(t=0;t<a;t++)t%4===0&&t&&(l.push(r>>16&255),l.push(r>>8&255),l.push(r&255)),r=r<<6|s.indexOf(n.charAt(t));return o=a%4*6,o===0?(l.push(r>>16&255),l.push(r>>8&255),l.push(r&255)):o===18?(l.push(r>>10&255),l.push(r>>2&255)):o===12&&l.push(r>>4&255),new Uint8Array(l)}function vb(e){var t="",o=0,n,a,s=e.length,r=Li;for(n=0;n<s;n++)n%3===0&&n&&(t+=r[o>>18&63],t+=r[o>>12&63],t+=r[o>>6&63],t+=r[o&63]),o=(o<<8)+e[n];return a=s%3,a===0?(t+=r[o>>18&63],t+=r[o>>12&63],t+=r[o>>6&63],t+=r[o&63]):a===2?(t+=r[o>>10&63],t+=r[o>>4&63],t+=r[o<<2&63],t+=r[64]):a===1&&(t+=r[o>>2&63],t+=r[o<<4&63],t+=r[64],t+=r[64]),t}function _b(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ep=new Qt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:hb,construct:mb,predicate:_b,represent:vb}),yb=Object.prototype.hasOwnProperty,bb=Object.prototype.toString;function wb(e){if(e===null)return!0;var t=[],o,n,a,s,r,l=e;for(o=0,n=l.length;o<n;o+=1){if(a=l[o],r=!1,bb.call(a)!=="[object Object]")return!1;for(s in a)if(yb.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 xb(e){return e!==null?e:[]}var Lp=new Qt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wb,construct:xb}),Tb=Object.prototype.toString;function Sb(e){if(e===null)return!0;var t,o,n,a,s,r=e;for(s=new Array(r.length),t=0,o=r.length;t<o;t+=1){if(n=r[t],Tb.call(n)!=="[object Object]"||(a=Object.keys(n),a.length!==1))return!1;s[t]=[a[0],n[a[0]]]}return!0}function kb(e){if(e===null)return[];var t,o,n,a,s,r=e;for(s=new Array(r.length),t=0,o=r.length;t<o;t+=1)n=r[t],a=Object.keys(n),s[t]=[a[0],n[a[0]]];return s}var $p=new Qt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Sb,construct:kb}),Cb=Object.prototype.hasOwnProperty;function Eb(e){if(e===null)return!0;var t,o=e;for(t in o)if(Cb.call(o,t)&&o[t]!==null)return!1;return!0}function Lb(e){return e!==null?e:{}}var Ap=new Qt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Eb,construct:Lb}),$i=xp.extend({implicit:[kp,Cp],explicit:[Ep,Lp,$p,Ap]}),Io=Object.prototype.hasOwnProperty,Er=1,Ip=2,Mp=3,Lr=4,Ai=1,$b=2,Op=3,Ab=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ib=/[\x85\u2028\u2029]/,Mb=/[,\[\]\{\}]/,Rp=/^(?:!|!!|![a-z\-]+!)$/i,Np=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Dp(e){return Object.prototype.toString.call(e)}function Yn(e){return e===10||e===13}function Ko(e){return e===9||e===32}function _n(e){return e===9||e===32||e===10||e===13}function ma(e){return e===44||e===91||e===93||e===123||e===125}function Ob(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Rb(e){return e===120?2:e===117?4:e===85?8:0}function Nb(e){return 48<=e&&e<=57?e-48:-1}function Pp(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 Db(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Fp=new Array(256),Up=new Array(256),va=0;va<256;va++)Fp[va]=Pp(va)?1:0,Up[va]=Pp(va);function Pb(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$i,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 Bp(e,t){var o={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return o.snippet=H3(o),new un(t,o)}function Ue(e,t){throw Bp(e,t)}function $r(e,t){e.onWarning&&e.onWarning.call(null,Bp(e,t))}var Hp={YAML:function(t,o,n){var a,s,r;t.version!==null&&Ue(t,"duplication of %YAML directive"),n.length!==1&&Ue(t,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),a===null&&Ue(t,"ill-formed argument of the YAML directive"),s=parseInt(a[1],10),r=parseInt(a[2],10),s!==1&&Ue(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=r<2,r!==1&&r!==2&&$r(t,"unsupported YAML version of the document")},TAG:function(t,o,n){var a,s;n.length!==2&&Ue(t,"TAG directive accepts exactly two arguments"),a=n[0],s=n[1],Rp.test(a)||Ue(t,"ill-formed tag handle (first argument) of the TAG directive"),Io.call(t.tagMap,a)&&Ue(t,'there is a previously declared suffix for "'+a+'" tag handle'),Np.test(s)||Ue(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Ue(t,"tag prefix is malformed: "+s)}t.tagMap[a]=s}};function Mo(e,t,o,n){var a,s,r,l;if(t<o){if(l=e.input.slice(t,o),n)for(a=0,s=l.length;a<s;a+=1)r=l.charCodeAt(a),r===9||32<=r&&r<=1114111||Ue(e,"expected valid JSON character");else Ab.test(l)&&Ue(e,"the stream contains non-printable characters");e.result+=l}}function jp(e,t,o,n){var a,s,r,l;for(jt.isObject(o)||Ue(e,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(o),r=0,l=a.length;r<l;r+=1)s=a[r],Io.call(t,s)||(t[s]=o[s],n[s]=!0)}function _a(e,t,o,n,a,s,r,l,u){var d,c;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),d=0,c=a.length;d<c;d+=1)Array.isArray(a[d])&&Ue(e,"nested arrays are not supported inside keys"),typeof a=="object"&&Dp(a[d])==="[object Object]"&&(a[d]="[object Object]");if(typeof a=="object"&&Dp(a)==="[object Object]"&&(a="[object Object]"),a=String(a),t===null&&(t={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(d=0,c=s.length;d<c;d+=1)jp(e,t,s[d],o);else jp(e,t,s,o);else!e.json&&!Io.call(o,a)&&Io.call(t,a)&&(e.line=r||e.line,e.lineStart=l||e.lineStart,e.position=u||e.position,Ue(e,"duplicated mapping key")),a==="__proto__"?Object.defineProperty(t,a,{configurable:!0,enumerable:!0,writable:!0,value:s}):t[a]=s,delete o[a];return t}function Ii(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++):Ue(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Dt(e,t,o){for(var n=0,a=e.input.charCodeAt(e.position);a!==0;){for(;Ko(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(Yn(a))for(Ii(e),a=e.input.charCodeAt(e.position),n++,e.lineIndent=0;a===32;)e.lineIndent++,a=e.input.charCodeAt(++e.position);else break}return o!==-1&&n!==0&&e.lineIndent<o&&$r(e,"deficient indentation"),n}function Ar(e){var t=e.position,o;return o=e.input.charCodeAt(t),!!((o===45||o===46)&&o===e.input.charCodeAt(t+1)&&o===e.input.charCodeAt(t+2)&&(t+=3,o=e.input.charCodeAt(t),o===0||_n(o)))}function Mi(e,t){t===1?e.result+=" ":t>1&&(e.result+=jt.repeat(`
`,t-1))}function Fb(e,t,o){var n,a,s,r,l,u,d,c,f=e.kind,h=e.result,p;if(p=e.input.charCodeAt(e.position),_n(p)||ma(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(a=e.input.charCodeAt(e.position+1),_n(a)||o&&ma(a)))return!1;for(e.kind="scalar",e.result="",s=r=e.position,l=!1;p!==0;){if(p===58){if(a=e.input.charCodeAt(e.position+1),_n(a)||o&&ma(a))break}else if(p===35){if(n=e.input.charCodeAt(e.position-1),_n(n))break}else{if(e.position===e.lineStart&&Ar(e)||o&&ma(p))break;if(Yn(p))if(u=e.line,d=e.lineStart,c=e.lineIndent,Dt(e,!1,-1),e.lineIndent>=t){l=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=r,e.line=u,e.lineStart=d,e.lineIndent=c;break}}l&&(Mo(e,s,r,!1),Mi(e,e.line-u),s=r=e.position,l=!1),Ko(p)||(r=e.position+1),p=e.input.charCodeAt(++e.position)}return Mo(e,s,r,!1),e.result?!0:(e.kind=f,e.result=h,!1)}function Ub(e,t){var o,n,a;if(o=e.input.charCodeAt(e.position),o!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=a=e.position;(o=e.input.charCodeAt(e.position))!==0;)if(o===39)if(Mo(e,n,e.position,!0),o=e.input.charCodeAt(++e.position),o===39)n=e.position,e.position++,a=e.position;else return!0;else Yn(o)?(Mo(e,n,a,!0),Mi(e,Dt(e,!1,t)),n=a=e.position):e.position===e.lineStart&&Ar(e)?Ue(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);Ue(e,"unexpected end of the stream within a single quoted scalar")}function Bb(e,t){var o,n,a,s,r,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,o=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Mo(e,o,e.position,!0),e.position++,!0;if(l===92){if(Mo(e,o,e.position,!0),l=e.input.charCodeAt(++e.position),Yn(l))Dt(e,!1,t);else if(l<256&&Fp[l])e.result+=Up[l],e.position++;else if((r=Rb(l))>0){for(a=r,s=0;a>0;a--)l=e.input.charCodeAt(++e.position),(r=Ob(l))>=0?s=(s<<4)+r:Ue(e,"expected hexadecimal character");e.result+=Db(s),e.position++}else Ue(e,"unknown escape sequence");o=n=e.position}else Yn(l)?(Mo(e,o,n,!0),Mi(e,Dt(e,!1,t)),o=n=e.position):e.position===e.lineStart&&Ar(e)?Ue(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}Ue(e,"unexpected end of the stream within a double quoted scalar")}function Hb(e,t){var o=!0,n,a,s,r=e.tag,l,u=e.anchor,d,c,f,h,p,v=Object.create(null),y,T,k,$;if($=e.input.charCodeAt(e.position),$===91)c=93,p=!1,l=[];else if($===123)c=125,p=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),$=e.input.charCodeAt(++e.position);$!==0;){if(Dt(e,!0,t),$=e.input.charCodeAt(e.position),$===c)return e.position++,e.tag=r,e.anchor=u,e.kind=p?"mapping":"sequence",e.result=l,!0;o?$===44&&Ue(e,"expected the node content, but found ','"):Ue(e,"missed comma between flow collection entries"),T=y=k=null,f=h=!1,$===63&&(d=e.input.charCodeAt(e.position+1),_n(d)&&(f=h=!0,e.position++,Dt(e,!0,t))),n=e.line,a=e.lineStart,s=e.position,ya(e,t,Er,!1,!0),T=e.tag,y=e.result,Dt(e,!0,t),$=e.input.charCodeAt(e.position),(h||e.line===n)&&$===58&&(f=!0,$=e.input.charCodeAt(++e.position),Dt(e,!0,t),ya(e,t,Er,!1,!0),k=e.result),p?_a(e,l,v,T,y,k,n,a,s):f?l.push(_a(e,null,v,T,y,k,n,a,s)):l.push(y),Dt(e,!0,t),$=e.input.charCodeAt(e.position),$===44?(o=!0,$=e.input.charCodeAt(++e.position)):o=!1}Ue(e,"unexpected end of the stream within a flow collection")}function jb(e,t){var o,n,a=Ai,s=!1,r=!1,l=t,u=0,d=!1,c,f;if(f=e.input.charCodeAt(e.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)Ai===a?a=f===43?Op:$b:Ue(e,"repeat of a chomping mode identifier");else if((c=Nb(f))>=0)c===0?Ue(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):r?Ue(e,"repeat of an indentation width identifier"):(l=t+c-1,r=!0);else break;if(Ko(f)){do f=e.input.charCodeAt(++e.position);while(Ko(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!Yn(f)&&f!==0)}for(;f!==0;){for(Ii(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!r||e.lineIndent<l)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!r&&e.lineIndent>l&&(l=e.lineIndent),Yn(f)){u++;continue}if(e.lineIndent<l){a===Op?e.result+=jt.repeat(`
`,s?1+u:u):a===Ai&&s&&(e.result+=`
`);break}for(n?Ko(f)?(d=!0,e.result+=jt.repeat(`
`,s?1+u:u)):d?(d=!1,e.result+=jt.repeat(`
`,u+1)):u===0?s&&(e.result+=" "):e.result+=jt.repeat(`
`,u):e.result+=jt.repeat(`
`,s?1+u:u),s=!0,r=!0,u=0,o=e.position;!Yn(f)&&f!==0;)f=e.input.charCodeAt(++e.position);Mo(e,o,e.position,!1)}return!0}function Wp(e,t){var o,n=e.tag,a=e.anchor,s=[],r,l=!1,u;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),u=e.input.charCodeAt(e.position);u!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ue(e,"tab characters must not be used in indentation")),!(u!==45||(r=e.input.charCodeAt(e.position+1),!_n(r))));){if(l=!0,e.position++,Dt(e,!0,-1)&&e.lineIndent<=t){s.push(null),u=e.input.charCodeAt(e.position);continue}if(o=e.line,ya(e,t,Mp,!1,!0),s.push(e.result),Dt(e,!0,-1),u=e.input.charCodeAt(e.position),(e.line===o||e.lineIndent>t)&&u!==0)Ue(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=n,e.anchor=a,e.kind="sequence",e.result=s,!0):!1}function Wb(e,t,o){var n,a,s,r,l,u,d=e.tag,c=e.anchor,f={},h=Object.create(null),p=null,v=null,y=null,T=!1,k=!1,$;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),$=e.input.charCodeAt(e.position);$!==0;){if(!T&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ue(e,"tab characters must not be used in indentation")),n=e.input.charCodeAt(e.position+1),s=e.line,($===63||$===58)&&_n(n))$===63?(T&&(_a(e,f,h,p,v,null,r,l,u),p=v=y=null),k=!0,T=!0,a=!0):T?(T=!1,a=!0):Ue(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,$=n;else{if(r=e.line,l=e.lineStart,u=e.position,!ya(e,o,Ip,!1,!0))break;if(e.line===s){for($=e.input.charCodeAt(e.position);Ko($);)$=e.input.charCodeAt(++e.position);if($===58)$=e.input.charCodeAt(++e.position),_n($)||Ue(e,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(_a(e,f,h,p,v,null,r,l,u),p=v=y=null),k=!0,T=!1,a=!1,p=e.tag,v=e.result;else if(k)Ue(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=c,!0}else if(k)Ue(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=c,!0}if((e.line===s||e.lineIndent>t)&&(T&&(r=e.line,l=e.lineStart,u=e.position),ya(e,t,Lr,!0,a)&&(T?v=e.result:y=e.result),T||(_a(e,f,h,p,v,y,r,l,u),p=v=y=null),Dt(e,!0,-1),$=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&$!==0)Ue(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return T&&_a(e,f,h,p,v,null,r,l,u),k&&(e.tag=d,e.anchor=c,e.kind="mapping",e.result=f),k}function Vb(e){var t,o=!1,n=!1,a,s,r;if(r=e.input.charCodeAt(e.position),r!==33)return!1;if(e.tag!==null&&Ue(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),r===60?(o=!0,r=e.input.charCodeAt(++e.position)):r===33?(n=!0,a="!!",r=e.input.charCodeAt(++e.position)):a="!",t=e.position,o){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)):Ue(e,"unexpected end of the stream within a verbatim tag")}else{for(;r!==0&&!_n(r);)r===33&&(n?Ue(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(t-1,e.position+1),Rp.test(a)||Ue(e,"named tag handle cannot contain such characters"),n=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Mb.test(s)&&Ue(e,"tag suffix cannot contain flow indicator characters")}s&&!Np.test(s)&&Ue(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Ue(e,"tag name is malformed: "+s)}return o?e.tag=s:Io.call(e.tagMap,a)?e.tag=e.tagMap[a]+s:a==="!"?e.tag="!"+s:a==="!!"?e.tag="tag:yaml.org,2002:"+s:Ue(e,'undeclared tag handle "'+a+'"'),!0}function zb(e){var t,o;if(o=e.input.charCodeAt(e.position),o!==38)return!1;for(e.anchor!==null&&Ue(e,"duplication of an anchor property"),o=e.input.charCodeAt(++e.position),t=e.position;o!==0&&!_n(o)&&!ma(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&Ue(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function qb(e){var t,o,n;if(n=e.input.charCodeAt(e.position),n!==42)return!1;for(n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!_n(n)&&!ma(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ue(e,"name of an alias node must contain at least one character"),o=e.input.slice(t,e.position),Io.call(e.anchorMap,o)||Ue(e,'unidentified alias "'+o+'"'),e.result=e.anchorMap[o],Dt(e,!0,-1),!0}function ya(e,t,o,n,a){var s,r,l,u=1,d=!1,c=!1,f,h,p,v,y,T;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=r=l=Lr===o||Mp===o,n&&Dt(e,!0,-1)&&(d=!0,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)),u===1)for(;Vb(e)||zb(e);)Dt(e,!0,-1)?(d=!0,l=s,e.lineIndent>t?u=1:e.lineIndent===t?u=0:e.lineIndent<t&&(u=-1)):l=!1;if(l&&(l=d||a),(u===1||Lr===o)&&(Er===o||Ip===o?y=t:y=t+1,T=e.position-e.lineStart,u===1?l&&(Wp(e,T)||Wb(e,T,y))||Hb(e,y)?c=!0:(r&&jb(e,y)||Ub(e,y)||Bb(e,y)?c=!0:qb(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&Ue(e,"alias node should not have any properties")):Fb(e,y,Er===o)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):u===0&&(c=l&&Wp(e,T))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ue(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,h=e.implicitTypes.length;f<h;f+=1)if(v=e.implicitTypes[f],v.resolve(e.result)){e.result=v.construct(e.result),e.tag=v.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Io.call(e.typeMap[e.kind||"fallback"],e.tag))v=e.typeMap[e.kind||"fallback"][e.tag];else for(v=null,p=e.typeMap.multi[e.kind||"fallback"],f=0,h=p.length;f<h;f+=1)if(e.tag.slice(0,p[f].tag.length)===p[f].tag){v=p[f];break}v||Ue(e,"unknown tag !<"+e.tag+">"),e.result!==null&&v.kind!==e.kind&&Ue(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result,e.tag)?(e.result=v.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ue(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}function Gb(e){var t=e.position,o,n,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&&(Dt(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){for(s=!0,r=e.input.charCodeAt(++e.position),o=e.position;r!==0&&!_n(r);)r=e.input.charCodeAt(++e.position);for(n=e.input.slice(o,e.position),a=[],n.length<1&&Ue(e,"directive name must not be less than one character in length");r!==0;){for(;Ko(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!Yn(r));break}if(Yn(r))break;for(o=e.position;r!==0&&!_n(r);)r=e.input.charCodeAt(++e.position);a.push(e.input.slice(o,e.position))}r!==0&&Ii(e),Io.call(Hp,n)?Hp[n](e,n,a):$r(e,'unknown document directive "'+n+'"')}if(Dt(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,Dt(e,!0,-1)):s&&Ue(e,"directives end mark is expected"),ya(e,e.lineIndent-1,Lr,!1,!0),Dt(e,!0,-1),e.checkLineBreaks&&Ib.test(e.input.slice(t,e.position))&&$r(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Ar(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Dt(e,!0,-1));return}if(e.position<e.length-1)Ue(e,"end of the stream or a document separator is expected");else return}function Vp(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 o=new Pb(e,t),n=e.indexOf("\0");for(n!==-1&&(o.position=n,Ue(o,"null byte is not allowed in input")),o.input+="\0";o.input.charCodeAt(o.position)===32;)o.lineIndent+=1,o.position+=1;for(;o.position<o.length-1;)Gb(o);return o.documents}function Qb(e,t,o){t!==null&&typeof t=="object"&&typeof o>"u"&&(o=t,t=null);var n=Vp(e,o);if(typeof t!="function")return n;for(var a=0,s=n.length;a<s;a+=1)t(n[a])}function Yb(e,t){var o=Vp(e,t);if(o.length!==0){if(o.length===1)return o[0];throw new un("expected a single document in the stream, but found more")}}var Kb=Qb,Jb=Yb,zp={loadAll:Kb,load:Jb},qp=Object.prototype.toString,Gp=Object.prototype.hasOwnProperty,Oi=65279,Xb=9,ms=10,Zb=13,e4=32,t4=33,n4=34,Ri=35,o4=37,a4=38,s4=39,r4=42,Qp=44,l4=45,Ir=58,i4=61,u4=62,c4=63,d4=64,Yp=91,Kp=93,f4=96,Jp=123,p4=124,Xp=125,on={};on[0]="\\0",on[7]="\\a",on[8]="\\b",on[9]="\\t",on[10]="\\n",on[11]="\\v",on[12]="\\f",on[13]="\\r",on[27]="\\e",on[34]='\\"',on[92]="\\\\",on[133]="\\N",on[160]="\\_",on[8232]="\\L",on[8233]="\\P";var g4=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],h4=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function m4(e,t){var o,n,a,s,r,l,u;if(t===null)return{};for(o={},n=Object.keys(t),a=0,s=n.length;a<s;a+=1)r=n[a],l=String(t[r]),r.slice(0,2)==="!!"&&(r="tag:yaml.org,2002:"+r.slice(2)),u=e.compiledTypeMap.fallback[r],u&&Gp.call(u.styleAliases,l)&&(l=u.styleAliases[l]),o[r]=l;return o}function v4(e){var t,o,n;if(t=e.toString(16).toUpperCase(),e<=255)o="x",n=2;else if(e<=65535)o="u",n=4;else if(e<=4294967295)o="U",n=8;else throw new un("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+o+jt.repeat("0",n-t.length)+t}var _4=1,vs=2;function y4(e){this.schema=e.schema||$i,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=jt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=m4(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==='"'?vs:_4,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 Zp(e,t){for(var o=jt.repeat(" ",t),n=0,a=-1,s="",r,l=e.length;n<l;)a=e.indexOf(`
`,n),a===-1?(r=e.slice(n),n=l):(r=e.slice(n,a+1),n=a+1),r.length&&r!==`
`&&(s+=o),s+=r;return s}function Ni(e,t){return`
`+jt.repeat(" ",e.indent*t)}function b4(e,t){var o,n,a;for(o=0,n=e.implicitTypes.length;o<n;o+=1)if(a=e.implicitTypes[o],a.resolve(t))return!0;return!1}function Mr(e){return e===e4||e===Xb}function _s(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Oi||65536<=e&&e<=1114111}function eg(e){return _s(e)&&e!==Oi&&e!==Zb&&e!==ms}function tg(e,t,o){var n=eg(e),a=n&&!Mr(e);return(o?n:n&&e!==Qp&&e!==Yp&&e!==Kp&&e!==Jp&&e!==Xp)&&e!==Ri&&!(t===Ir&&!a)||eg(t)&&!Mr(t)&&e===Ri||t===Ir&&a}function w4(e){return _s(e)&&e!==Oi&&!Mr(e)&&e!==l4&&e!==c4&&e!==Ir&&e!==Qp&&e!==Yp&&e!==Kp&&e!==Jp&&e!==Xp&&e!==Ri&&e!==a4&&e!==r4&&e!==t4&&e!==p4&&e!==i4&&e!==u4&&e!==s4&&e!==n4&&e!==o4&&e!==d4&&e!==f4}function x4(e){return!Mr(e)&&e!==Ir}function ys(e,t){var o=e.charCodeAt(t),n;return o>=55296&&o<=56319&&t+1<e.length&&(n=e.charCodeAt(t+1),n>=56320&&n<=57343)?(o-55296)*1024+n-56320+65536:o}function ng(e){var t=/^\n* /;return t.test(e)}var og=1,Di=2,ag=3,sg=4,ba=5;function T4(e,t,o,n,a,s,r,l){var u,d=0,c=null,f=!1,h=!1,p=n!==-1,v=-1,y=w4(ys(e,0))&&x4(ys(e,e.length-1));if(t||r)for(u=0;u<e.length;d>=65536?u+=2:u++){if(d=ys(e,u),!_s(d))return ba;y=y&&tg(d,c,l),c=d}else{for(u=0;u<e.length;d>=65536?u+=2:u++){if(d=ys(e,u),d===ms)f=!0,p&&(h=h||u-v-1>n&&e[v+1]!==" ",v=u);else if(!_s(d))return ba;y=y&&tg(d,c,l),c=d}h=h||p&&u-v-1>n&&e[v+1]!==" "}return!f&&!h?y&&!r&&!a(e)?og:s===vs?ba:Di:o>9&&ng(e)?ba:r?s===vs?ba:Di:h?sg:ag}function S4(e,t,o,n,a){e.dump=(function(){if(t.length===0)return e.quotingType===vs?'""':"''";if(!e.noCompatMode&&(g4.indexOf(t)!==-1||h4.test(t)))return e.quotingType===vs?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,o),r=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),l=n||e.flowLevel>-1&&o>=e.flowLevel;function u(d){return b4(e,d)}switch(T4(t,l,e.indent,r,u,e.quotingType,e.forceQuotes&&!n,a)){case og:return t;case Di:return"'"+t.replace(/'/g,"''")+"'";case ag:return"|"+rg(t,e.indent)+lg(Zp(t,s));case sg:return">"+rg(t,e.indent)+lg(Zp(k4(t,r),s));case ba:return'"'+C4(t)+'"';default:throw new un("impossible error: invalid scalar style")}})()}function rg(e,t){var o=ng(e)?String(t):"",n=e[e.length-1]===`
`,a=n&&(e[e.length-2]===`
`||e===`
`),s=a?"+":n?"":"-";return o+s+`
`}function lg(e){return e[e.length-1]===`
`?e.slice(0,-1):e}function k4(e,t){for(var o=/(\n+)([^\n]*)/g,n=(function(){var d=e.indexOf(`
`);return d=d!==-1?d:e.length,o.lastIndex=d,ig(e.slice(0,d),t)})(),a=e[0]===`
`||e[0]===" ",s,r;r=o.exec(e);){var l=r[1],u=r[2];s=u[0]===" ",n+=l+(!a&&!s&&u!==""?`
`:"")+ig(u,t),a=s}return n}function ig(e,t){if(e===""||e[0]===" ")return e;for(var o=/ [^ ]/g,n,a=0,s,r=0,l=0,u="";n=o.exec(e);)l=n.index,l-a>t&&(s=r>a?r:l,u+=`
`+e.slice(a,s),a=s+1),r=l;return u+=`
`,e.length-a>t&&r>a?u+=e.slice(a,r)+`
`+e.slice(r+1):u+=e.slice(a),u.slice(1)}function C4(e){for(var t="",o=0,n,a=0;a<e.length;o>=65536?a+=2:a++)o=ys(e,a),n=on[o],!n&&_s(o)?(t+=e[a],o>=65536&&(t+=e[a+1])):t+=n||v4(o);return t}function E4(e,t,o){var n="",a=e.tag,s,r,l;for(s=0,r=o.length;s<r;s+=1)l=o[s],e.replacer&&(l=e.replacer.call(o,String(s),l)),(po(e,t,l,!1,!1)||typeof l>"u"&&po(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=a,e.dump="["+n+"]"}function ug(e,t,o,n){var a="",s=e.tag,r,l,u;for(r=0,l=o.length;r<l;r+=1)u=o[r],e.replacer&&(u=e.replacer.call(o,String(r),u)),(po(e,t+1,u,!0,!0,!1,!0)||typeof u>"u"&&po(e,t+1,null,!0,!0,!1,!0))&&((!n||a!=="")&&(a+=Ni(e,t)),e.dump&&ms===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}function L4(e,t,o){var n="",a=e.tag,s=Object.keys(o),r,l,u,d,c;for(r=0,l=s.length;r<l;r+=1)c="",n!==""&&(c+=", "),e.condenseFlow&&(c+='"'),u=s[r],d=o[u],e.replacer&&(d=e.replacer.call(o,u,d)),po(e,t,u,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),po(e,t,d,!1,!1)&&(c+=e.dump,n+=c));e.tag=a,e.dump="{"+n+"}"}function $4(e,t,o,n){var a="",s=e.tag,r=Object.keys(o),l,u,d,c,f,h;if(e.sortKeys===!0)r.sort();else if(typeof e.sortKeys=="function")r.sort(e.sortKeys);else if(e.sortKeys)throw new un("sortKeys must be a boolean or a function");for(l=0,u=r.length;l<u;l+=1)h="",(!n||a!=="")&&(h+=Ni(e,t)),d=r[l],c=o[d],e.replacer&&(c=e.replacer.call(o,d,c)),po(e,t+1,d,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&ms===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,f&&(h+=Ni(e,t)),po(e,t+1,c,!0,f)&&(e.dump&&ms===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,a+=h));e.tag=s,e.dump=a||"{}"}function cg(e,t,o){var n,a,s,r,l,u;for(a=o?e.explicitTypes:e.implicitTypes,s=0,r=a.length;s<r;s+=1)if(l=a[s],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(o?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(u=e.styleMap[l.tag]||l.defaultStyle,qp.call(l.represent)==="[object Function]")n=l.represent(t,u);else if(Gp.call(l.represent,u))n=l.represent[u](t,u);else throw new un("!<"+l.tag+'> tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function po(e,t,o,n,a,s,r){e.tag=null,e.dump=o,cg(e,o,!1)||cg(e,o,!0);var l=qp.call(e.dump),u=n,d;n&&(n=e.flowLevel<0||e.flowLevel>t);var c=l==="[object Object]"||l==="[object Array]",f,h;if(c&&(f=e.duplicates.indexOf(o),h=f!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&t>0)&&(a=!1),h&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(c&&h&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?($4(e,t,e.dump,a),h&&(e.dump="&ref_"+f+e.dump)):(L4(e,t,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!r&&t>0?ug(e,t-1,e.dump,a):ug(e,t,e.dump,a),h&&(e.dump="&ref_"+f+e.dump)):(E4(e,t,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&S4(e,e.dump,t,s,u);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new un("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(d=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?d="!"+d:d.slice(0,18)==="tag:yaml.org,2002:"?d="!!"+d.slice(18):d="!<"+d+">",e.dump=d+" "+e.dump)}return!0}function A4(e,t){var o=[],n=[],a,s;for(Pi(e,o,n),a=0,s=n.length;a<s;a+=1)t.duplicates.push(o[n[a]]);t.usedDuplicates=new Array(s)}function Pi(e,t,o){var n,a,s;if(e!==null&&typeof e=="object")if(a=t.indexOf(e),a!==-1)o.indexOf(a)===-1&&o.push(a);else if(t.push(e),Array.isArray(e))for(a=0,s=e.length;a<s;a+=1)Pi(e[a],t,o);else for(n=Object.keys(e),a=0,s=n.length;a<s;a+=1)Pi(e[n[a]],t,o)}function I4(e,t){t=t||{};var o=new y4(t);o.noRefs||A4(e,o);var n=e;return o.replacer&&(n=o.replacer.call({"":n},"",n)),po(o,0,n,!0,!0)?o.dump+`
`:""}var M4=I4,O4={dump:M4};function Fi(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 R4=Qt,N4=fp,D4=mp,P4=wp,F4=xp,U4=$i,B4=zp.load,H4=zp.loadAll,j4=O4.dump,W4=un,V4={binary:Ep,float:bp,map:hp,null:vp,pairs:$p,set:Ap,timestamp:kp,bool:_p,int:yp,merge:Cp,omap:Lp,seq:gp,str:pp},z4=Fi("safeLoad","load"),q4=Fi("safeLoadAll","loadAll"),G4=Fi("safeDump","dump"),dg={Type:R4,Schema:N4,FAILSAFE_SCHEMA:D4,JSON_SCHEMA:P4,CORE_SCHEMA:F4,DEFAULT_SCHEMA:U4,load:B4,loadAll:H4,dump:j4,YAMLException:W4,types:V4,safeLoad:z4,safeLoadAll:q4,safeDump:G4};const Q4={key:0,class:"loading-overlay"},Y4={class:"settings-content"},K4={class:"info-links"},J4={class:"info-link-item"},X4={class:"info-link-label"},Z4={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"},ew={class:"info-link-item"},tw={class:"info-link-label"},nw={href:"https://github.com/weilin9999/WeiLin-Comfyui-Tools-Prompt",target:"_blank",class:"info-link"},ow={class:"info-link-item"},aw={class:"info-link-label"},sw={href:"https://weilin9999.github.io/WeiLin-Share-Prompt-Web/#/",target:"_blank",class:"info-link"},rw={style:{"margin-bottom":"16px"}},lw=["placeholder"],iw={style:{"margin-bottom":"16px"}},uw=["placeholder"],cw=["placeholder"],dw={style:{"margin-bottom":"16px"}},fw=["placeholder"],pw=["placeholder"],gw={style:{"margin-bottom":"16px"}},hw=["placeholder"],mw={class:"data-container"},vw={key:0},_w={key:0},yw={class:"tag-group-container"},bw={style:{display:"flex","align-items":"center"}},ww={key:0},xw=["placeholder"],Tw=["onClick"],Sw=["onClick"],kw=["onClick"],Cw=wt({__name:"import_tag",setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b(""),s=b(""),r=b(""),l=b(""),u=b(""),d=b(""),c=b(""),f=b(""),h=b(""),p=b([]),v=b(-1),y=b(""),T=b(""),k=b(null),$=b(null),B=b(null),w=b(!1),M=b(""),H=b(null);function W(){if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}H.value.click()}function D(){a.value="",s.value="",r.value="",l.value="",u.value="",d.value="",c.value="",f.value="",h.value="",p.value=[],v.value=-1,y.value="",T.value="",w.value=!1}function I(L){const N=L.target.files[0];if(N){const J=new FileReader;J.onload=de=>{const S=de.target.result.split(`
`).filter(A=>A.trim());let _=0;S.forEach(A=>{const[j,me]=A.split(",");if(j&&me){const ue=j.trim().replace(/'/g,"''"),z=me.trim().replace(/'/g,"''"),ae=Yo();_=_+1;const Me=parseInt(new Date().getTime()/1e3)+_,Pe=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${ue}', '${z}', 'rgba(255, 123, 2, .4)', ${Me}, '${h.value}', '${ae}');`;p.value.push(Pe)}})},J.readAsText(N)}L.target.value=""}function ee(L){const N=L.target.files[0];if(N){const J=new FileReader;J.onload=de=>{try{const he=JSON.parse(de.target.result);let S=0;Object.entries(he).forEach(([_,A])=>{const j=_.replace(/'/g,"''"),me=A.replace(/'/g,"''"),ue=Yo();S=S+1;const z=parseInt(new Date().getTime()/1e3)+S,ae=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${j}', '${me}', 'rgba(255, 123, 2, .4)', ${z}, '${h.value}', '${ue}');`;p.value.push(ae)})}catch{Y({type:"warn",str:"message.jsonErrorMesg"})}},J.readAsText(N)}L.target.value=""}function K(L){const N=L.target.files[0];if(N){const J=new FileReader;J.onload=de=>{try{const he=dg.load(de.target.result);let S=0;Object.entries(he).forEach(([_,A])=>{const j=_.replace(/'/g,"''"),me=String(A).replace(/'/g,"''"),ue=Yo();S=S+1;const z=parseInt(new Date().getTime()/1e3)+S,ae=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${j}', '${me}', 'rgba(255, 123, 2, .4)', ${z}, '${h.value}', '${ue}');`;p.value.push(ae)})}catch{Y({type:"warn",str:"message.yamlErrorMesg"})}},J.readAsText(N)}L.target.value=""}function V(L){D();const N=L.target.files[0];if(N){const J=new FileReader;J.onload=de=>{de.target.result.split(";").filter(_=>_.trim()).forEach(_=>{if((_.includes("tag_groups")||_.includes("tag_subgroups"))&&_.includes("p_uuid"))if(_.includes("g_uuid")){u.value=_+";";const j=_.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);j&&(h.value=j[1]);const me=_.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);me&&(c.value=me[1].replace(/''/g,"'"))}else{l.value=_+";";const j=_.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);j&&(f.value=j[1]);const me=_.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);me&&(d.value=me[1].replace(/''/g,"'"))}else _.includes("tag_tags")&&p.value.push(_+";")})},J.readAsText(N)}L.target.value=""}function ne(){if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}B.value.click()}function oe(){if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}$.value.click()}function X(){k.value.click()}function re(){const L=[l.value,u.value,...p.value].join(`
`),N=new Blob([L],{type:"text/sql"}),J=document.createElement("a");if(J.href=URL.createObjectURL(N),M.value.length<=0){const de=parseInt(new Date().getTime()/1e3);J.download="export_"+de+".sql"}else J.download=M.value+".sql";J.click()}const se=()=>{const L=[...p.value].join(`
`),N=new Blob([L],{type:"text/sql"}),J=document.createElement("a");if(J.href=URL.createObjectURL(N),M.value.length<=0){const de=parseInt(new Date().getTime()/1e3);J.download="export_tags_"+de+".sql"}else J.download=M.value+".sql";J.click()};function F(L){const N=L.match(/VALUES\s*\([^']*'([^']+)'/),J=L.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:N?N[1].replace(/''/g,"'"):"",desc:J?J[1].replace(/''/g,"'"):""}}function R(L){p.value.splice(L,1)}function ie(L){const N=p.value[L],J=F(N);y.value=J.text,T.value=J.desc,v.value=L}function Te(L){const N=y.value.replace(/'/g,"''"),J=T.value.replace(/'/g,"''");p.value[L]=p.value[L].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${N}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${J}'`),v.value=-1}function te(){v.value=-1}function le(){if(!h.value){Y({type:"warn",str:"message.pleaseAddSub"});return}const L=a.value.replace(/'/g,"''"),N=s.value.replace(/'/g,"''"),J=Yo(),de=parseInt(new Date().getTime()/1e3);r.value=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${L}', '${N}', 'rgba(255, 123, 2, .4)', ${de}, '${h.value}', '${J}');`,p.value.push(r.value)}function ve(){if(d.value.length<=0){Y({type:"warn",str:"importDialog.pleaseAddGroupName"});return}const L=d.value.replace(/'/g,"''");f.value.length<=0&&(f.value=Yo());const N=parseInt(new Date().getTime()/1e3);l.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${L}', 'rgba(255, 123, 2, .4)', ${N}, '${f.value}');`}function xe(){if(c.value.length<=0){Y({type:"warn",str:"importDialog.pleaseAddSubGroupName"});return}if(!f.value){Y({type:"warn",str:"message.pleaseAddMainCeb"});return}const L=c.value.replace(/'/g,"''");h.value.length<=0&&(h.value=Yo());const N=parseInt(new Date().getTime()/1e3);u.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${L}', 'rgba(255, 123, 2, .4)', ${N}, '${f.value}', '${h.value}');`}const pe=b(null),P=()=>{pe.value.open()},q=L=>{w.value=!0,d.value=L.group.name,c.value=L.sub.name,f.value=L.group.p_uuid,h.value=L.sub.g_uuid;const N=L.group.name.replace(/'/g,"''"),J=L.sub.name.replace(/'/g,"''");l.value=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${N}', '${L.group.color}', ${L.group.create_time}, '${L.group.p_uuid}');`,u.value=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${J}', '${L.sub.color}', ${L.sub.create_time}, '${L.group.p_uuid}', '${L.sub.g_uuid}');`},Z=b(!1),O=async L=>{Z.value=!0;try{await Mt.runSQLToServer(L).then(N=>{if(N.code!=200){Y({type:"warn",str:N.message});return}else Q(),Y({type:"success",str:"importDialog.successImport"})}).catch(N=>{console.error(N),Y({type:"warn",str:"importDialog.importFail"})})}catch(N){console.error(N),Y({type:"warn",str:"importDialog.importFail"})}finally{Z.value=!1}},Q=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},E=async()=>{if(w.value){if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}const L=[...p.value];await O(L)}else{if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}const L=[l.value,u.value,...p.value];await O(L)}};return dt(l,(L,N)=>{var he,S;if(!L||L===N)return;const J=(he=L.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:he[1],de=(S=N==null?void 0:N.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:S[1];J&&de&&u.value&&(u.value=u.value.replace(new RegExp(`'${de}'`,"g"),`'${J}'`))}),dt(u,(L,N)=>{var he,S;if(!L||L===N)return;const J=(he=L.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:he[1],de=(S=N==null?void 0:N.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:S[1];J&&de&&p.value.length>0&&(p.value=p.value.map(_=>_.replace(new RegExp(`'${de}'`,"g"),`'${J}'`)))}),t({open:()=>{n.value=!0}}),(L,N)=>(x(),C(Oe,null,[Z.value?(x(),C("div",Q4,[...N[11]||(N[11]=[i("div",{class:"loading-spinner"},null,-1)])])):fe("",!0),qe(ps,{modelValue:n.value,"onUpdate:modelValue":N[10]||(N[10]=J=>n.value=J),title:g(o)("importDialog.title")},{footer:pt(()=>[i("button",{onClick:N[9]||(N[9]=J=>n.value=!1)},m(g(o)("promptBox.settings.close")),1),i("button",{onClick:E},m(g(o)("importDialog.sure")),1)]),default:pt(()=>[i("div",Y4,[i("div",K4,[i("div",J4,[i("span",X4,m(g(o)("importDialog.tips1")),1),i("a",Z4,m(g(o)("importDialog.tips1text")),1)]),i("div",ew,[i("span",tw,m(g(o)("importDialog.tips2")),1),i("a",nw,m(g(o)("importDialog.tips2text")),1)]),i("div",ow,[i("span",aw,m(g(o)("importDialog.tips3")),1),i("a",sw,m(g(o)("importDialog.tips3text")),1)])]),i("div",rw,[i("button",{onClick:D,class:"upload-btn"},m(g(o)("importDialog.cleanAll")),1),i("button",{style:{"margin-left":"10px"},onClick:X,class:"upload-btn"},m(g(o)("importDialog.uploadSQL")),1),i("button",{style:{"margin-left":"10px"},onClick:P},m(g(o)("importDialog.selectGroup")),1),i("button",{style:{"margin-left":"10px"},onClick:re},m(g(o)("importDialog.dumpSQL")),1),i("button",{style:{"margin-left":"10px"},onClick:se},m(g(o)("importDialog.dumpOnlySQL")),1),we(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":N[0]||(N[0]=J=>M.value=J),placeholder:g(o)("importDialog.settingOutputName")},null,8,lw),[[$e,M.value]]),i("input",{type:"file",ref_key:"fileInput",ref:k,onChange:V,accept:".sql",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"jsonFileInput",ref:$,onChange:ee,accept:".json",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"txtFileInput",ref:B,onChange:I,accept:".txt",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"yamlFileInput",ref:H,onChange:K,accept:".yaml,.yml",style:{display:"none"}},null,544)]),i("div",iw,[we(i("input",{"onUpdate:modelValue":N[1]||(N[1]=J=>d.value=J),placeholder:g(o)("importDialog.pleaseMainCeb")},null,8,uw),[[$e,d.value]]),i("button",{onClick:ve},m(g(o)("importDialog.setMainCeb")),1),we(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":N[2]||(N[2]=J=>f.value=J),placeholder:g(o)("importDialog.pleaseMainCebUuid")},null,8,cw),[[$e,f.value]])]),i("div",dw,[we(i("input",{"onUpdate:modelValue":N[3]||(N[3]=J=>c.value=J),placeholder:g(o)("importDialog.pleaseSubGroup")},null,8,fw),[[$e,c.value]]),i("button",{onClick:xe},m(g(o)("importDialog.setSubCeb")),1),we(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":N[4]||(N[4]=J=>h.value=J),placeholder:g(o)("importDialog.pleaseSubGroupUuid")},null,8,pw),[[$e,h.value]])]),i("div",gw,[we(i("input",{"onUpdate:modelValue":N[5]||(N[5]=J=>a.value=J),placeholder:"Tag"},null,512),[[$e,a.value]]),we(i("input",{"onUpdate:modelValue":N[6]||(N[6]=J=>s.value=J),placeholder:g(o)("importDialog.translater")},null,8,hw),[[$e,s.value]]),i("button",{onClick:le},m(g(o)("importDialog.add")),1),i("button",{style:{"margin-left":"10px"},onClick:oe,class:"upload-btn"},m(g(o)("importDialog.fromJSONImput")),1),i("button",{style:{"margin-left":"10px"},onClick:ne,class:"upload-btn"},m(g(o)("importDialog.fromTxtInput")),1),i("button",{style:{"margin-left":"10px"},onClick:W,class:"upload-btn"},m(g(o)("importDialog.fromYmalInput")),1)]),i("div",mw,[l.value?(x(),C("div",vw,[i("h3",null,m(F(l.value).text),1),u.value?(x(),C("div",_w,[i("h4",null,m(F(u.value).text),1),i("div",yw,[(x(!0),C(Oe,null,We(p.value,(J,de)=>(x(),C("div",{key:de,style:{display:"flex","flex-direction":"column","align-items":"center"}},[i("p",null,m(F(J).text)+" - "+m(F(J).desc),1),i("div",bw,[v.value===de?(x(),C("div",ww,[we(i("input",{"onUpdate:modelValue":N[7]||(N[7]=he=>y.value=he),placeholder:"Tag"},null,512),[[$e,y.value]]),we(i("input",{"onUpdate:modelValue":N[8]||(N[8]=he=>T.value=he),placeholder:g(o)("importDialog.translater")},null,8,xw),[[$e,T.value]]),i("button",{onClick:he=>Te(de)},m(g(o)("importDialog.sureYes")),9,Tw),i("button",{style:{"margin-left":"10px"},onClick:te},m(g(o)("importDialog.cancel")),1)])):(x(),C("button",{key:1,onClick:he=>ie(de)},m(g(o)("importDialog.edit")),9,Sw)),i("button",{style:{"margin-left":"10px"},onClick:he=>R(de)},m(g(o)("importDialog.delete")),9,kw)])]))),128))])])):fe("",!0)])):fe("",!0)])])]),_:1},8,["modelValue","title"]),qe(L3,{ref_key:"tagGroupSelectDialogItem",ref:pe,onSureSelect:q},null,512)],64))}},[["__scopeId","data-v-98758c86"]]),Ew={class:"tag-manager"},Lw={class:"toolbar"},$w={class:"toolbar-top"},Aw={class:"search-container"},Iw=["placeholder"],Mw={key:0,class:"no-results"},Ow=["onClick"],Rw={class:"result-content"},Nw={class:"result-text"},Dw={class:"result-path"},Pw={class:"toolbar-bottom"},Fw={class:"group-edit-mode"},Uw={class:"category-tabs"},Bw={class:"tabs-wrapper primary-tabs"},Hw={class:"tabs-scroll"},jw=["onClick","onMouseenter","onMouseleave"],Ww={class:"tab-text"},Vw={key:0,class:"tab-actions"},zw=["onClick","title"],qw=["onClick","title"],Gw=["onClick","title"],Qw=["onClick","title"],Yw={class:"group-edit-mode"},Kw={key:0,class:"tabs-wrapper group-tabs"},Jw={class:"tabs-scroll"},Xw=["onClick","onMouseenter","onMouseleave"],Zw={class:"tab-text"},e5={key:0,class:"tab-actions"},t5=["onClick","title"],n5=["onClick","title"],o5=["onClick","title"],a5={class:"group-edit-mode"},s5={class:"tags-content"},r5={class:"tags-header"},l5={class:"tags-title"},i5={class:"tags-actions"},u5=["disabled"],c5=["disabled"],d5=["disabled"],f5=["disabled"],p5=["disabled"],g5={key:0,class:"tags-grid"},h5=["onClick"],m5={class:"tag-actions"},v5=["onClick","title"],_5=["onClick","title"],y5=["onClick","title"],b5={class:"tag-desc"},w5=["value"],x5={key:0,class:"weilin-tools-dialog-overlay"},T5={class:"weilin-tools-dialog-header"},S5={class:"weilin-tools-dialog-body"},k5={key:0,class:"form-group"},C5=["placeholder"],E5={key:1,class:"form-group"},L5=["placeholder"],$5={class:"form-group"},A5={class:"color-picker"},I5={class:"color-controls"},M5={class:"alpha-control"},O5={class:"alpha-value"},R5={class:"weilin-tools-dialog-footer"},N5={key:1,class:"weilin-tools-dialog-overlay"},D5={class:"weilin-tools-dialog-header"},P5={class:"weilin-tools-dialog-body"},F5={class:"form-group"},U5=["placeholder"],B5={class:"form-group"},H5=["placeholder"],j5={class:"form-group"},W5={class:"color-picker"},V5={class:"color-controls"},z5={class:"alpha-control"},q5={class:"alpha-value"},G5={class:"weilin-tools-dialog-footer"},Q5={key:2,class:"weilin-tools-dialog-overlay"},Y5={class:"weilin-tools-dialog-header"},K5={class:"weilin-tools-dialog-body"},J5={class:"confirm-message"},X5={class:"weilin-tools-dialog-footer"},Z5={key:3,class:"weilin-tools-dialog-overlay"},e8={class:"weilin-tools-dialog-content"},t8={class:"weilin-tools-dialog-header"},n8={class:"weilin-tools-dialog-body"},o8={class:"form-group"},a8=["value"],s8={class:"form-group"},r8={class:"radio-group"},l8={class:"weilin-tools-dialog-footer"},i8={key:4,class:"weilin-tools-dialog-overlay"},u8={class:"weilin-tools-dialog-content"},c8={class:"weilin-tools-dialog-header"},d8={class:"weilin-tools-dialog-body"},f8={class:"form-group"},p8=["value"],g8={class:"form-group"},h8={class:"radio-group"},m8={class:"weilin-tools-dialog-footer"},v8={key:5,class:"weilin-tools-dialog-overlay"},_8={class:"weilin-tools-dialog-header"},y8={class:"weilin-tools-dialog-body"},b8={class:"config-section"},w8={class:"form-group"},x8={class:"width-control"},T8={class:"radio-label"},S8={class:"radio-label"},k8={class:"form-group"},C8={class:"form-group"},E8={class:"config-section"},L8={class:"form-group"},$8={class:"width-control"},A8={class:"radio-label"},I8={class:"radio-label"},M8={class:"form-group"},O8={class:"form-group"},R8={class:"weilin-tools-dialog-footer"},fg=wt({__name:"tag_index",props:{tagManager:{type:String,default:"prompt"}},setup(e){pr();const{t}=ht(),o=b([]),n=b(null),a=b([]),s=b([]),r=b(null),l=b(!1),u=b(!1),d=b(!1),c=b(!1),f=b("primary"),h=b([]),p=b(!1),v=b(!1),y=b("None"),T=b("None"),k=b(0),$=b(0),B=b(null),w=b(0),M=b(!1),H=b(null),W=b("before"),D=b(null),I=b("before"),ee=b(null),K=b(null),V=b(!1),ne=b(!1),oe=b(!1),X=b({primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}}),re={primaryTab:{width:"fit-content",height:34,fontSize:10},groupTab:{width:"fit-content",height:34,fontSize:10}},se=e,F=b({name:"",color:"rgba(255, 123, 2, .4)",id_index:"",groups:[]}),R=b({name:"",id_index:"",color:"rgba(255, 123, 2, .4)",tags:[]}),ie=b({text:"",desc:"",id_index:"",color:"rgba(255, 123, 2, .4)"}),Te=ge=>{const ce=ge.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(ce){const[,ye,Ke,Lt,Tn]=ce,Yt=`#${((1<<24)+(parseInt(ye)<<16)+(parseInt(Ke)<<8)+parseInt(Lt)).toString(16).slice(1)}`,Ft=Tn?Math.round(parseFloat(Tn)*100):100;return{hex:Yt,alpha:Ft}}return{hex:"#FFFFFF",alpha:100}},te=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},le=async()=>{try{await Mt.getTagMainGroup().then(ge=>{o.value=ge}).catch(ge=>{console.error(ge),Y({type:"warn",str:"message.networkError"})}),n.value&&await ve(n.value.p_uuid),r.value&&await xe(r.value.g_uuid)}catch(ge){console.error("Tag管理器列表失败:",ge)}},ve=async ge=>{try{await Mt.getTagSubGroup(ge).then(ce=>{a.value=ce}).catch(ce=>{console.error(ce),Y({type:"warn",str:"message.networkError"})})}catch(ce){console.error("二级分类列表失败:",ce)}},xe=async ge=>{try{await Mt.getTagList(ge).then(ce=>{s.value=ce}).catch(ce=>{console.error(ce),Y({type:"warn",str:"message.networkError"})})}catch(ce){console.error("Tag列表失败:",ce)}};_t(()=>{Pn(),window.addEventListener("click",ws),window.addEventListener("resize",Pn),window.addEventListener("message",Vr),window.addEventListener("keydown",zr),Kr(),te()}),ia(()=>{window.removeEventListener("click",ws),window.removeEventListener("resize",Pn),window.removeEventListener("message",Vr),window.removeEventListener("keydown",zr)});const pe=async ge=>{n.value=ge,r.value=null,p.value=!1,h.value=[],await ve(ge.p_uuid)},P=async ge=>{r.value=ge,p.value=!1,h.value=[],await xe(ge.g_uuid)},q=ge=>{f.value=ge,d.value=!1,S.value=Te("rgba(255, 123, 2, .4)"),ge==="primary"?F.value={name:"",color:"rgba(255, 123, 2, .4)",groups:[]}:R.value={name:"",color:"rgba(255, 123, 2, .4)",tags:[]},l.value=!0},Z=ge=>{d.value=!0,f.value="primary",F.value={...ge},S.value=Te(ge.color),l.value=!0},O=ge=>{d.value=!0,f.value="group",R.value={...ge},S.value=Te(ge.color),l.value=!0},Q=()=>{if(f.value==="primary"){if(!F.value.name){Y({type:"warn",str:"tagManager.categoryNameRequired"});return}d.value?o.value.findIndex(ce=>ce.id_index===F.value.id_index)!==-1&&Mt.editPrimaryCategory({id_index:F.value.id_index,name:F.value.name,color:F.value.color}).then(ce=>{ce.code===200?(te(),Y({type:"success",str:"message.editSuccess"})):ce.code===201?Y({type:"error",str:"message.editNameExist"}):Y({type:"error",str:"message.editFailed"})}).catch(ce=>{Y({type:"warn",str:"message.networkError"})}):Mt.addPrimaryCategory({name:F.value.name,color:F.value.color}).then(ge=>{ge.code===200?(te(),Y({type:"success",str:"message.addSuccess"})):ge.code===201?Y({type:"error",str:"message.editNameExist"}):Y({type:"error",str:"message.addFailed"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})})}else{if(!R.value.name){Y({type:"warn",str:"tagManager.groupNameRequired"});return}d.value?Mt.editSubCategory({id_index:R.value.id_index,name:R.value.name,color:R.value.color}).then(ge=>{ge.code===200?(te(),Y({type:"success",str:"message.editSuccess"})):ge.code===201?Y({type:"error",str:"message.editNameExist"}):Y({type:"error",str:"message.editFailed"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})}):Mt.addSubCategory({name:R.value.name,color:R.value.color,key:n.value.id_index,p_uuid:n.value.p_uuid}).then(ge=>{ge.code===200?(te(),Y({type:"success",str:"message.addSuccess"})):ge.code===201?Y({type:"error",str:"message.editNameExist"}):Y({type:"error",str:"message.editFailed"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})})}L()},E=()=>d.value?f.value==="primary"?t("tagManager.editPrimaryCategory"):t("tagManager.editSubCategory"):f.value==="primary"?t("tagManager.addPrimaryCategory"):t("tagManager.addSubCategory"),L=()=>{l.value=!1,F.value={id:"",name:"",parentId:null,subCategories:[],backgroundColor:"transparent"},S.value={hex:"#FFFFFF",alpha:0}},N=()=>{r.value&&(c.value=!1,ie.value={id:"",text:"",desc:"",categoryId:r.value.id,g_uuid:r.value.g_uuid,backgroundColor:R.value.color},S.value=Te(R.value.color),u.value=!0)},J=ge=>{c.value=!0,ie.value={...ge},S.value=Te(ge.color),u.value=!0},de=()=>{if(!ie.value.text||!ie.value.desc){Y({type:"warn",str:"tagManager.textRequired"});return}c.value&&r.value?Mt.editTags({id_index:ie.value.id_index,text:ie.value.text,desc:ie.value.desc,color:ie.value.color}).then(ge=>{te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.editSuccess"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})}):r.value&&Mt.addNewTags({id_index:r.value.id_index,g_uuid:r.value.g_uuid,text:ie.value.text,desc:ie.value.desc,color:ie.value.color?ie.value.color:"rgba(255, 123, 2, .4)"}).then(ge=>{te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.addSuccess"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})}),he()},he=()=>{u.value=!1,ie.value={text:"",desc:"",color:"rgba(255, 123, 2, .4)"},c.value=!1},S=b({hex:"#FFFFFF",alpha:100}),_=nt(()=>j(S.value.hex,S.value.alpha)),A=()=>{const ge=j(S.value.hex,S.value.alpha);l.value?f.value==="primary"?F.value.color=ge:R.value.color=ge:u.value&&(ie.value.color=ge)},j=(ge,ce)=>{const ye=parseInt(ge.slice(1,3),16),Ke=parseInt(ge.slice(3,5),16),Lt=parseInt(ge.slice(5,7),16);return`rgba(${ye}, ${Ke}, ${Lt}, ${ce/100})`},me=b(""),ue=b([]),z=b(!1),ae=async()=>{z.value=me.value.trim().length>0;const ge=me.value.trim().toLowerCase();if(!ge){ue.value=[];return}ue.value=[],await Mt.searchTag(ge).then(ce=>{ue.value=ce}).catch(ce=>{Y({type:"warn",str:"message.networkError"})})};dt(me,()=>{ae()});const Me=async ge=>{const ce=o.value.find(ye=>ye.p_uuid===ge.p_uuid);ce&&await pe(ce).then(async()=>{await Qe(async()=>{const ye=a.value.find(Ke=>Ke.g_uuid===ge.g_uuid);ye&&await P(ye).then(async()=>{await Qe(()=>{w.value==1&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:ge.text},"*"),B.value=ge.id_index,setTimeout(()=>{const Ke=document.querySelector(".tag-wrapper.highlight");Ke&&Ke.scrollIntoView({behavior:"smooth",block:"center"})},100),setTimeout(()=>{B.value=null},5e3)})})})}),me.value=""},Pe=ge=>{if(!ge||ge==="transparent")return"var(--primary-text)";let ce,ye,Ke,Lt=1;if(ge.startsWith("rgba")){const Yt=ge.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);Yt&&([,ce,ye,Ke,Lt]=Yt.map(Number))}else if(ge.startsWith("rgb")){const Yt=ge.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);Yt&&([,ce,ye,Ke]=Yt.map(Number))}return Lt<.5?"var(--primary-text)":(ce*299+ye*587+Ke*114)/1e3>128?"#000000":"#ffffff"},je=ge=>{se.tagManager==="prompt"&&window.postMessage({type:"weilin_prompt_ui_insertTag",tagText:ge.text},"*")},st=b(!1),tt=b(""),Ie=b(null),ke=nt(()=>{if(!Ie.value)return"";switch(tt.value){case"category":return t("tagManager.deletePrimaryCategoryConfirm",{name:Ie.value.name});case"group":return t("tagManager.deleteGroupConfirm",{name:Ie.value.name});case"tag":return t("tagManager.deleteTagConfirm",{name:Ie.value.text});case"deleteSelected":return t("tagManager.confirmDeleteSelected");default:return""}}),Ee=ge=>{tt.value="category",Ie.value=ge,st.value=!0},ft=ge=>{tt.value="group",Ie.value=ge,st.value=!0},Tt=ge=>{tt.value="tag",Ie.value=ge,st.value=!0},dn=async()=>{try{switch(tt.value){case"category":Mt.deletePrimaryCategory({p_uuid:Ie.value.p_uuid}).then(ge=>{te(),Y({type:"success",str:"message.deleteSuccess"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})});break;case"group":Mt.deleteSubCategory({g_uuid:Ie.value.g_uuid}).then(ge=>{te(),Y({type:"success",str:"message.deleteSuccess"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})});break;case"tag":Mt.deleteTags({id_index:Ie.value.id_index}).then(ge=>{te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.deleteSuccess"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Mt.batchDeleteTags({id_indexs:h.value}).then(ge=>{te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.deleteSuccess"})}).catch(ge=>{Y({type:"warn",str:"message.networkError"})});break}La()}catch(ge){console.error("删除失败:",ge)}},Jo=async ge=>{const ce=`INSERT OR REPLACE INTO "tag_groups" ("name", "color", "create_time", "p_uuid") VALUES ('${ge.name.replace(/'/g,"''")}', '${ge.color}', ${ge.create_time}, '${ge.p_uuid}');`;try{await Mt.getTagSubGroup(ge.p_uuid).then(ye=>{const Ke=ye,Lt=[];Ke.forEach(async G=>{const U=`INSERT OR REPLACE INTO "tag_subgroups" ("name", "color", "create_time", "p_uuid", "g_uuid") VALUES ('${G.name.replace(/'/g,"''")}', '${G.color}', ${G.create_time}, '${G.p_uuid}', '${G.g_uuid}');`;Lt.push(U);try{await Mt.getTagList(G.g_uuid).then(_e=>{_e.forEach(Fe=>{const Se=`INSERT OR REPLACE INTO "tag_tags" ("text", "desc", "color", "create_time", "g_uuid", "t_uuid") VALUES ('${Fe.text.replace(/'/g,"''")}', '${Fe.desc.replace(/'/g,"''")}', '${Fe.color}', ${Fe.create_time}, '${Fe.g_uuid}', '${Yo()}');`;Lt.push(Se)})}).catch(_e=>{console.error(_e),Y({type:"warn",str:"message.networkError"})})}catch(_e){console.error("Tag列表失败:",_e),Y({type:"warn",str:"message.shareTagError"})}});const Tn=[ce,...Lt].join(`
`),Yt=new Blob([Tn],{type:"text/sql"}),Ft=document.createElement("a");Ft.href=URL.createObjectURL(Yt),Ft.download=`${ge.name}_export_${Date.now()}.sql`,Ft.click(),Y({type:"success",str:"tagManager.outputSuccess"})}).catch(ye=>{console.error(ye),Y({type:"warn",str:"message.networkError"})})}catch(ye){console.error("二级分类列表失败:",ye),Y({type:"warn",str:"message.shareGroupError"})}},Ca=ge=>{D.value=ge.id_index,M.value=!0},qi=async()=>{try{Mt.moveTag({id_index:D.value,reference_id_index:H.value,position:W.value}).then(ge=>{te(),M.value=!1,Y({type:"success",str:t("message.moveSuccess")})}).catch(ge=>{Y({type:"error",str:t("message.moveFailed")})})}catch(ge){console.error("移动标签失败:",ge),Y({type:"error",str:t("message.moveFailed")})}},bs=b([]),Xo=b(1),Ur=(ge,ce)=>{Xo.value=ce,ce===1?(bs.value=o.value,ee.value=ge.id_index,v.value=!0):(bs.value=a.value,ee.value=ge.id_index,v.value=!0)},Ea=async()=>{if(Xo.value===1)try{Mt.moveMainGroup({id_index:ee.value,reference_id_index:K.value,position:I.value}).then(ge=>{te(),v.value=!1,Y({type:"success",str:t("message.moveSuccess")})}).catch(ge=>{Y({type:"error",str:t("message.moveFailed")})})}catch(ge){console.error("移动标签失败:",ge),Y({type:"error",str:t("message.moveFailed")})}else try{Mt.moveSubGroup({id_index:ee.value,reference_id_index:K.value,position:I.value}).then(ge=>{te(),v.value=!1,Y({type:"success",str:t("message.moveSuccess")})}).catch(ge=>{Y({type:"error",str:t("message.moveFailed")})})}catch(ge){console.error("移动标签失败:",ge),Y({type:"error",str:t("message.moveFailed")})}},Gi=()=>{p.value=!0,V.value=!0},Qi=()=>{p.value=!1,V.value=!1,h.value=[]},Ro=()=>{h.value.length!==0&&(tt.value="deleteSelected",Ie.value={},st.value=!0)},Br=()=>{p.value=!0,ne.value=!0},Hr=()=>{p.value=!1,ne.value=!1,h.value=[]},jr=()=>{if(h.value.length===0){Y({type:"warn",str:"tagManager.noTagsSelected"});return}const ge=r.value.tags.filter(Lt=>h.value.includes(Lt.id_index)),ce={};ge.forEach(Lt=>{ce[Lt.text]=Lt.desc});const ye=new Blob([dg.dump(ce)],{type:"text/yaml"}),Ke=document.createElement("a");Ke.href=URL.createObjectURL(ye),Ke.download=`selected_tags_export_${Date.now()}.yaml`,Ke.click(),Y({type:"success",str:"tagManager.outputSuccess"}),Hr()},La=()=>{st.value=!1,tt.value="",Ie.value=null},Yi=async()=>{try{await te()}catch(ge){console.error("刷新标签列表失败:",ge)}},$a=b(),Wr=b({}),Pn=()=>{if($a.value){const ge=$a.value.getBoundingClientRect();Wr.value={position:"fixed",top:`${ge.bottom}px`,left:`${ge.left}px`,width:`${ge.width}px`,zIndex:1e3}}},Vr=ge=>{ge.data.type==="weilin_prompt_ui_window_change_tagManager_position"||ge.data.type==="weilin_prompt_ui_window_change_tagManager_size"||ge.data.type==="weilin_prompt_ui_window_change_tagManager_scroll"||ge.data.type==="weilin_prompt_ui_window_change_promptBox_position"||ge.data.type==="weilin_prompt_ui_window_change_promptBox_size"||ge.data.type==="weilin_prompt_ui_window_change_promptBox_scroll"?Pn():ge.data.type==="weilin_prompt_ui_window_change_click_outside"||ge.data.type==="weilin_prompt_ui_tag_manager_refresh"&&le()},ws=ge=>{z.value&&!$a.value.contains(ge.target)&&(z.value=!1)},zr=ge=>{ge.key==="Escape"&&(z.value=!1)},qr=ge=>{$.value==1&&(y.value="TabID-"+ge)},Gr=ge=>{y.value="None"},Qr=ge=>{k.value==1&&(T.value="TabID-"+ge)},ho=ge=>{T.value="None"},Yr=b(),Ki=()=>{Yr.value.open()},Kr=()=>{const ge=JSON.parse(JSON.stringify(re));try{const ce=localStorage.getItem("weilin_tag_manager_tab_size_config");if(ce){const ye=JSON.parse(ce);X.value={...ge,...ye}}else X.value={...ge}}catch(ce){console.error("读取标签尺寸配置失败:",ce),X.value={...ge}}},Kn=()=>{try{localStorage.setItem("weilin_tag_manager_tab_size_config",JSON.stringify(X.value)),Y({type:"success",str:"tagManager.tabSizeConfigSaved"}),oe.value=!1}catch(ge){console.error("保存标签尺寸配置失败:",ge),Y({type:"error",str:"tagManager.tabSizeConfigSaveFailed"})}},Ji=()=>{oe.value=!0},Jr=()=>{oe.value=!1,Kr()},Xi=()=>{const ge=JSON.parse(JSON.stringify(re));X.value={...ge}};return(ge,ce)=>(x(),C("div",Ew,[i("div",Lw,[i("div",$w,[i("button",{class:"refresh-btn",onClick:Yi},[...ce[40]||(ce[40]=[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",Aw,[we(i("input",{type:"text","onUpdate:modelValue":ce[0]||(ce[0]=ye=>me.value=ye),placeholder:g(t)("tagManager.searchPlaceholder"),class:"search-input",ref_key:"searchInput",ref:$a,onInput:ce[1]||(ce[1]=ye=>z.value=me.value.trim().length>0)},null,40,Iw),[[$e,me.value]]),z.value?(x(),C("div",{key:0,class:"search-results",style:ct(Wr.value)},[ue.value.length===0?(x(),C("div",Mw,m(g(t)("tagManager.noResults")),1)):(x(!0),C(Oe,{key:1},We(ue.value,(ye,Ke)=>(x(),C("div",{key:`${Ke}-search_item`,class:"search-result-item",onClick:Lt=>Me(ye)},[i("div",Rw,[i("span",Nw,m(ye.name||ye.text),1),i("span",Dw,m(ye.where),1)])],8,Ow))),128))],4)):fe("",!0)]),i("button",{class:"import-btn",onClick:Ki},m(g(t)("tagManager.importTags")),1)]),i("div",Pw,[i("div",Fw,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ce[2]||(ce[2]=ye=>w.value=ye),"true-value":1,"false-value":0},null,512),[[Vt,w.value]]),Ve(" "+m(g(t)("tagManager.autoAddSearchTag")),1)])]),i("button",{class:"tab-size-btn",onClick:Ji},m(g(t)("tagManager.modifyTabSize")),1)])]),i("div",Uw,[i("div",Bw,[i("div",Hw,[(x(!0),C(Oe,null,We(o.value,(ye,Ke)=>{var Lt,Tn,Yt;return x(),C("div",{key:"Tabss-"+Ke,class:Ce(["tab-item",{active:((Lt=n.value)==null?void 0:Lt.name)===ye.name}]),style:ct({backgroundColor:((Tn=n.value)==null?void 0:Tn.name)===ye.name?"var(--primary-color)":ye.color,color:((Yt=n.value)==null?void 0:Yt.name)===ye.name?"#ffffff":Pe(ye.color),width:X.value.primaryTab.width==="fit-content"?"fit-content":X.value.primaryTab.width+"px",height:X.value.primaryTab.height+"px",fontSize:X.value.primaryTab.fontSize+"px"}),onClick:Ft=>pe(ye),onMouseenter:Ft=>qr(Ke),onMouseleave:Ft=>Gr()},[i("span",Ww,m(ye.name),1),y.value=="TabID-"+Ke?(x(),C("div",Vw,[i("button",{class:"action-btn move",onClick:ot(Ft=>Ur(ye,1),["stop"]),title:g(t)("tagManager.moveGroup")},[...ce[41]||(ce[41]=[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,zw),i("button",{class:"action-btn edit",onClick:ot(Ft=>Z(ye),["stop"]),title:g(t)("tagManager.edit")},[...ce[42]||(ce[42]=[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,qw),i("button",{class:"action-btn share",onClick:ot(Ft=>Jo(ye),["stop"]),title:g(t)("tagManager.share")},[...ce[43]||(ce[43]=[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,Gw),i("button",{class:"action-btn delete",onClick:ot(Ft=>Ee(ye),["stop"]),title:g(t)("tagManager.delete")},[...ce[44]||(ce[44]=[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,Qw)])):fe("",!0)],46,jw)}),128)),i("button",{class:"add-tab",onClick:ce[3]||(ce[3]=ye=>q("primary"))},[ce[45]||(ce[45]=i("span",{class:"plus-icon"},"+",-1)),Ve(" "+m(g(t)("tagManager.addPrimaryCategory")),1)]),i("div",Yw,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ce[4]||(ce[4]=ye=>$.value=ye),"true-value":1,"false-value":0},null,512),[[Vt,$.value]]),Ve(" "+m($.value==1?g(t)("tagManager.exitEditMode"):g(t)("tagManager.editGroupMode")),1)])])])]),n.value?(x(),C("div",Kw,[i("div",Jw,[(x(!0),C(Oe,null,We(a.value,(ye,Ke)=>{var Lt,Tn,Yt;return x(),C("div",{key:"TabsSw-"+Ke,class:Ce(["tab-item",{active:((Lt=r.value)==null?void 0:Lt.name)===ye.name}]),style:ct({backgroundColor:((Tn=r.value)==null?void 0:Tn.name)===ye.name?"var(--primary-color)":ye.color,color:((Yt=r.value)==null?void 0:Yt.name)===ye.name?"#ffffff":Pe(ye.color),width:X.value.groupTab.width==="fit-content"?"fit-content":X.value.groupTab.width+"px",height:X.value.groupTab.height+"px",fontSize:X.value.groupTab.fontSize+"px"}),onClick:Ft=>P(ye),onMouseenter:Ft=>Qr(Ke),onMouseleave:Ft=>ho()},[i("span",Zw,m(ye.name),1),T.value=="TabID-"+Ke?(x(),C("div",e5,[i("button",{class:"action-btn move",onClick:ot(Ft=>Ur(ye,2),["stop"]),title:g(t)("tagManager.moveGroup")},[...ce[46]||(ce[46]=[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,t5),i("button",{class:"action-btn edit",onClick:ot(Ft=>O(ye),["stop"]),title:g(t)("tagManager.edit")},[...ce[47]||(ce[47]=[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,n5),i("button",{class:"action-btn delete",onClick:ot(Ft=>ft(ye),["stop"]),title:g(t)("tagManager.delete")},[...ce[48]||(ce[48]=[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,o5)])):fe("",!0)],46,Xw)}),128)),n.value?(x(),C("button",{key:0,class:"add-tab",onClick:ce[5]||(ce[5]=ye=>q("group"))},[ce[49]||(ce[49]=i("span",{class:"plus-icon"},"+",-1)),Ve(" "+m(g(t)("tagManager.addGroup")),1)])):fe("",!0),i("div",a5,[i("label",null,[we(i("input",{type:"checkbox","onUpdate:modelValue":ce[6]||(ce[6]=ye=>k.value=ye),"true-value":1,"false-value":0},null,512),[[Vt,k.value]]),Ve(" "+m(k.value==1?g(t)("tagManager.exitEditMode"):g(t)("tagManager.editGroupMode")),1)])])])])):fe("",!0)]),i("div",s5,[i("div",r5,[i("div",l5,m(r.value?r.value.name:g(t)("tagManager.selectCategory")),1),i("div",i5,[i("button",{class:"add-btn",onClick:N,disabled:!r.value},[ce[50]||(ce[50]=i("span",{class:"plus-icon"},"+",-1)),Ve(" "+m(g(t)("tagManager.addTag")),1)],8,u5),ne.value?(x(),C("button",{key:0,class:"share-selected-btn",onClick:jr,disabled:!h.value.length},m(g(t)("tagManager.shareSelected")),9,c5)):(x(),C("button",{key:1,class:"share-btn",onClick:Br,disabled:!r.value},m(g(t)("tagManager.batchShare")),9,d5)),ne.value?(x(),C("button",{key:2,class:"cancel-delete-btn",onClick:Hr},m(g(t)("tagManager.cancelShare")),1)):fe("",!0),V.value?(x(),C("button",{key:3,class:"delete-btn",onClick:Ro,disabled:!h.value.length},m(g(t)("tagManager.deleteSelected")),9,f5)):(x(),C("button",{key:4,class:"delete-action-btn",onClick:Gi,disabled:!r.value},m(g(t)("tagManager.hasDeleteAction")),9,p5)),V.value?(x(),C("button",{key:5,class:"cancel-delete-btn",onClick:Qi},m(g(t)("tagManager.cancelDelete")),1)):fe("",!0)])]),r.value?(x(),C("div",g5,[(x(!0),C(Oe,null,We(s.value,ye=>(x(),C("div",{key:"tag-grid-"+ye.id_index,class:Ce(B.value===ye.id_index?"tag-wrapper highlight":"tag-wrapper")},[i("div",{class:"tag-content",onClick:Ke=>je(ye)},[i("div",{class:"tag-main",style:ct({backgroundColor:ye.color||"transparent"})},[Ve(m(ye.desc)+" ",1),i("div",m5,[i("button",{class:"action-btn move",onClick:ot(Ke=>Ca(ye),["stop"]),title:g(t)("tagManager.moveTag")},[...ce[51]||(ce[51]=[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,v5),i("button",{class:"action-btn edit",onClick:ot(Ke=>J(ye),["stop"]),title:g(t)("tagManager.editTag")},[...ce[52]||(ce[52]=[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,_5),i("button",{class:"action-btn delete",onClick:ot(Ke=>Tt(ye),["stop"]),title:g(t)("tagManager.deleteTag")},[...ce[53]||(ce[53]=[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,y5)])],4),i("div",b5,m(ye.text),1)],8,h5),p.value?we((x(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":ce[7]||(ce[7]=Ke=>h.value=Ke),value:ye.id_index,class:"tag-checkbox"},null,8,w5)),[[Vt,h.value]]):fe("",!0)],2))),128))])):fe("",!0)]),l.value?(x(),C("div",x5,[i("div",{class:"weilin-tools-dialog-content",onMousedown:ce[12]||(ce[12]=ot(()=>{},["stop"]))},[i("div",T5,[i("h2",null,m(E()),1),i("button",{class:"close-btn",onClick:L},"×")]),i("div",S5,[f.value=="primary"?(x(),C("div",k5,[i("label",null,m(g(t)("tagManager.categoryName")),1),we(i("input",{type:"text","onUpdate:modelValue":ce[8]||(ce[8]=ye=>F.value.name=ye),placeholder:g(t)("tagManager.categoryNamePlaceholder"),onKeyup:en(Q,["enter"])},null,40,C5),[[$e,F.value.name]])])):fe("",!0),f.value=="group"?(x(),C("div",E5,[i("label",null,m(g(t)("tagManager.groupName")),1),we(i("input",{type:"text","onUpdate:modelValue":ce[9]||(ce[9]=ye=>R.value.name=ye),placeholder:g(t)("tagManager.groupNamePlaceholder"),onKeyup:en(Q,["enter"])},null,40,L5),[[$e,R.value.name]])])):fe("",!0),i("div",$5,[i("label",null,m(g(t)("tagManager.backgroundColor")),1),i("div",A5,[i("div",{class:"color-preview",style:ct({backgroundColor:_.value})},null,4),i("div",I5,[we(i("input",{type:"color","onUpdate:modelValue":ce[10]||(ce[10]=ye=>S.value.hex=ye),onInput:A,class:"color-input"},null,544),[[$e,S.value.hex]]),i("div",M5,[we(i("input",{type:"range","onUpdate:modelValue":ce[11]||(ce[11]=ye=>S.value.alpha=ye),min:"0",max:"100",onInput:A,class:"alpha-slider"},null,544),[[$e,S.value.alpha,void 0,{number:!0}]]),i("span",O5,m(S.value.alpha)+"%",1)])])])])]),i("div",R5,[i("button",{class:"cancel-btn",onClick:L},m(g(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Q},m(g(t)("common.confirm")),1)])],32)])):fe("",!0),u.value?(x(),C("div",N5,[i("div",{class:"weilin-tools-dialog-content",onMousedown:ce[17]||(ce[17]=ot(()=>{},["stop"]))},[i("div",D5,[i("h2",null,m(c.value?g(t)("tagManager.editTag"):g(t)("tagManager.addTag")),1),i("button",{class:"close-btn",onClick:he},"×")]),i("div",P5,[i("div",F5,[i("label",null,m(g(t)("tagManager.text")),1),we(i("input",{type:"text","onUpdate:modelValue":ce[13]||(ce[13]=ye=>ie.value.desc=ye),placeholder:g(t)("tagManager.textPlaceholder")},null,8,U5),[[$e,ie.value.desc]])]),i("div",B5,[i("label",null,m(g(t)("tagManager.description")),1),we(i("textarea",{"onUpdate:modelValue":ce[14]||(ce[14]=ye=>ie.value.text=ye),placeholder:g(t)("tagManager.descriptionPlaceholder"),rows:"4"}," ",8,H5),[[$e,ie.value.text]])]),i("div",j5,[i("label",null,m(g(t)("tagManager.backgroundColor")),1),i("div",W5,[i("div",{class:"color-preview",style:ct({backgroundColor:_.value})},null,4),i("div",V5,[we(i("input",{type:"color","onUpdate:modelValue":ce[15]||(ce[15]=ye=>S.value.hex=ye),onInput:A,class:"color-input"},null,544),[[$e,S.value.hex]]),i("div",z5,[we(i("input",{type:"range","onUpdate:modelValue":ce[16]||(ce[16]=ye=>S.value.alpha=ye),min:"0",max:"100",onInput:A,class:"alpha-slider"},null,544),[[$e,S.value.alpha,void 0,{number:!0}]]),i("span",q5,m(S.value.alpha)+"%",1)])])])])]),i("div",G5,[i("button",{class:"cancel-btn",onClick:he},m(g(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:de},m(g(t)("common.confirm")),1)])],32)])):fe("",!0),st.value?(x(),C("div",Q5,[i("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:ce[18]||(ce[18]=ot(()=>{},["stop"]))},[i("div",Y5,[i("h2",null,m(g(t)("common.confirmDelete")),1),i("button",{class:"close-btn",onClick:La},"×")]),i("div",K5,[i("p",J5,m(ke.value),1)]),i("div",X5,[i("button",{class:"cancel-btn",onClick:La},m(g(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:dn},m(g(t)("common.delete")),1)])],32)])):fe("",!0),M.value?(x(),C("div",Z5,[i("div",e8,[i("div",t8,[i("h2",null,m(g(t)("tagManager.moveTag")),1),i("button",{class:"close-btn",onClick:ce[19]||(ce[19]=ye=>M.value=!1)},"×")]),i("div",n8,[i("div",o8,[i("label",null,m(g(t)("tagManager.targetTag")),1),we(i("select",{"onUpdate:modelValue":ce[20]||(ce[20]=ye=>H.value=ye),class:"form-select"},[(x(!0),C(Oe,null,We(s.value,ye=>(x(),C("option",{key:ye.id_index,value:ye.id_index},m(ye.desc+" --> "+ye.text),9,a8))),128))],512),[[ln,H.value]])]),i("div",s8,[i("label",null,m(g(t)("tagManager.movePosition")),1),i("div",r8,[i("label",null,[we(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ce[21]||(ce[21]=ye=>W.value=ye),value:"before"},null,512),[[ro,W.value]]),Ve(" "+m(g(t)("tagManager.moveBefore")),1)]),i("label",null,[we(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ce[22]||(ce[22]=ye=>W.value=ye),value:"after"},null,512),[[ro,W.value]]),Ve(" "+m(g(t)("tagManager.moveAfter")),1)])])])]),i("div",l8,[i("button",{class:"cancel-btn",onClick:ce[23]||(ce[23]=ye=>M.value=!1)},m(g(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:qi},m(g(t)("common.confirm")),1)])])])):fe("",!0),v.value?(x(),C("div",i8,[i("div",u8,[i("div",c8,[i("h2",null,m(g(t)("tagManager.moveGroup")),1),i("button",{class:"close-btn",onClick:ce[24]||(ce[24]=ye=>v.value=!1)},"×")]),i("div",d8,[i("div",f8,[i("label",null,m(g(t)("tagManager.targetGroup")),1),we(i("select",{"onUpdate:modelValue":ce[25]||(ce[25]=ye=>K.value=ye),class:"form-select"},[(x(!0),C(Oe,null,We(bs.value,(ye,Ke)=>(x(),C("option",{key:"group_move_id"+Ke,value:ye.id_index},m(ye.name),9,p8))),128))],512),[[ln,K.value]])]),i("div",g8,[i("label",null,m(g(t)("tagManager.movePosition")),1),i("div",h8,[i("label",null,[we(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ce[26]||(ce[26]=ye=>I.value=ye),value:"before"},null,512),[[ro,I.value]]),Ve(" "+m(g(t)("tagManager.moveGroupBefore")),1)]),i("label",null,[we(i("input",{class:"radio-input",type:"radio","onUpdate:modelValue":ce[27]||(ce[27]=ye=>I.value=ye),value:"after"},null,512),[[ro,I.value]]),Ve(" "+m(g(t)("tagManager.moveGroupAfter")),1)])])])]),i("div",m8,[i("button",{class:"cancel-btn",onClick:ce[28]||(ce[28]=ye=>v.value=!1)},m(g(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Ea},m(g(t)("common.confirm")),1)])])])):fe("",!0),oe.value?(x(),C("div",v8,[i("div",{class:"weilin-tools-dialog-content tab-size-weilin-tools-dialog",onMousedown:ce[39]||(ce[39]=ot(()=>{},["stop"]))},[i("div",_8,[i("h2",null,m(g(t)("tagManager.tabSizeConfig")),1),i("button",{class:"close-btn",onClick:Jr},"×")]),i("div",y8,[i("div",b8,[i("h3",null,m(g(t)("tagManager.primaryTabConfig")),1),i("div",w8,[i("label",null,m(g(t)("tagManager.tabWidth")),1),i("div",x8,[i("label",T8,[we(i("input",{type:"radio","onUpdate:modelValue":ce[29]||(ce[29]=ye=>X.value.primaryTab.width=ye),value:"fit-content"},null,512),[[ro,X.value.primaryTab.width]]),Ve(" "+m(g(t)("tagManager.fitContent")),1)]),i("label",S8,[we(i("input",{type:"radio","onUpdate:modelValue":ce[30]||(ce[30]=ye=>X.value.primaryTab.width=ye),value:"custom"},null,512),[[ro,X.value.primaryTab.width]]),Ve(" "+m(g(t)("tagManager.customWidth")),1)]),X.value.primaryTab.width!=="fit-content"?we((x(),C("input",{key:0,type:"number","onUpdate:modelValue":ce[31]||(ce[31]=ye=>X.value.primaryTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[$e,X.value.primaryTab.width,void 0,{number:!0}]]):fe("",!0)])]),i("div",k8,[i("label",null,m(g(t)("tagManager.tabHeight"))+" ("+m(X.value.primaryTab.height)+"px)",1),we(i("input",{type:"range","onUpdate:modelValue":ce[32]||(ce[32]=ye=>X.value.primaryTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[$e,X.value.primaryTab.height,void 0,{number:!0}]])]),i("div",C8,[i("label",null,m(g(t)("tagManager.fontSize"))+" ("+m(X.value.primaryTab.fontSize)+"px)",1),we(i("input",{type:"range","onUpdate:modelValue":ce[33]||(ce[33]=ye=>X.value.primaryTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[$e,X.value.primaryTab.fontSize,void 0,{number:!0}]])])]),i("div",E8,[i("h3",null,m(g(t)("tagManager.groupTabConfig")),1),i("div",L8,[i("label",null,m(g(t)("tagManager.tabWidth")),1),i("div",$8,[i("label",A8,[we(i("input",{type:"radio","onUpdate:modelValue":ce[34]||(ce[34]=ye=>X.value.groupTab.width=ye),value:"fit-content"},null,512),[[ro,X.value.groupTab.width]]),Ve(" "+m(g(t)("tagManager.fitContent")),1)]),i("label",I8,[we(i("input",{type:"radio","onUpdate:modelValue":ce[35]||(ce[35]=ye=>X.value.groupTab.width=ye),value:"custom"},null,512),[[ro,X.value.groupTab.width]]),Ve(" "+m(g(t)("tagManager.customWidth")),1)]),X.value.groupTab.width!=="fit-content"?we((x(),C("input",{key:0,type:"number","onUpdate:modelValue":ce[36]||(ce[36]=ye=>X.value.groupTab.width=ye),min:"50",max:"300",class:"number-input"},null,512)),[[$e,X.value.groupTab.width,void 0,{number:!0}]]):fe("",!0)])]),i("div",M8,[i("label",null,m(g(t)("tagManager.tabHeight"))+" ("+m(X.value.groupTab.height)+"px)",1),we(i("input",{type:"range","onUpdate:modelValue":ce[37]||(ce[37]=ye=>X.value.groupTab.height=ye),min:"20",max:"60",class:"range-input"},null,512),[[$e,X.value.groupTab.height,void 0,{number:!0}]])]),i("div",O8,[i("label",null,m(g(t)("tagManager.fontSize"))+" ("+m(X.value.groupTab.fontSize)+"px)",1),we(i("input",{type:"range","onUpdate:modelValue":ce[38]||(ce[38]=ye=>X.value.groupTab.fontSize=ye),min:"8",max:"20",class:"range-input"},null,512),[[$e,X.value.groupTab.fontSize,void 0,{number:!0}]])])])]),i("div",R8,[i("button",{class:"reset-btn",onClick:Xi},m(g(t)("tagManager.resetDefault")),1),i("button",{class:"cancel-btn",onClick:Jr},m(g(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:Kn},m(g(t)("common.confirm")),1)])],32)])):fe("",!0),qe(Cw,{ref_key:"importTagDialogItem",ref:Yr},null,512)]))}},[["__scopeId","data-v-3c1d9d00"]]),Or=100,pg=b(""),go=b({}),Be={setActiveWindow(e){pg.value!==e&&(pg.value=e,Object.keys(go.value).forEach(t=>{go.value[t]=Or}),go.value[e]=Or+10)},getZIndex(e){return go.value[e]||(go.value[e]=Or),go.value[e]},registerWindow(e){go.value[e]||(go.value[e]=Or)},unregisterWindow(e){delete go.value[e]}},xn={getLoraList:async e=>await Ae({url:"/get_lora_list",method:"get",params:e}),getAllLoraList:async e=>await Ae({url:"/get_lora_load_all",method:"get",params:e}),getAllLoraStatus:async e=>await Ae({url:"/get_lora_load_status",method:"get",params:e}),getLoraDetail:async e=>await Ae({url:"/lorainfo/api/loras/info",method:"get",params:e}),getLoraRefresh:async e=>await Ae({url:"/lorainfo/api/loras/info/refresh",method:"get",params:e}),postUplaodImg:async(e,t,o)=>{const n=new FormData;return n.append("image",e),n.append("path",t),n.append("fileName",o),await Ae({url:"/lorainfo/api/loras/set/img",method:"post",data:n,headers:{"Content-Type":"multipart/form-data"}})},postLoraSave:async(e,t)=>{const o=new FormData;return o.append("json",JSON.stringify(t)),await Ae({url:"/lorainfo/api/loras/info?file="+e,method:"post",data:o,headers:{"Content-Type":"multipart/form-data"}})},postLoraDelet:async(e,t)=>await Ae({url:"/lorainfo/api/delete/loras/info/filed?file="+e,method:"post",data:{json:t}}),getLoraFolderList:async()=>await Ae({url:"/get_lora_folder_list",method:"post"}),getLoraRangeList:async e=>await Ae({url:"/get_lora_list_by_range",method:"post",data:{range:e}}),searchLoraGetFolderList:async e=>await Ae({url:"/get_lora_list_by_search",method:"post",data:{search:e}})},N8=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+)\.)+([A-Za-z0-9-~\/])+$/,gg=pn({name:"JsonString",props:{jsonValue:{type:String,required:!0}},setup(e){const t=b(!0),o=b(!1),n=b(null),a=b(null);_t(()=>{n.value&&a.value&&n.value.offsetHeight>a.value.offsetHeight&&(o.value=!0)});const s=()=>{t.value=!t.value};return()=>{const r=e.jsonValue,l=N8.test(r);let u;!t.value&&o.value?u=bt("span",{class:{"jv-ellipsis":!0},onClick:s},"..."):l?u=bt("span",{class:{"jv-item":!0,"jv-string":!0},ref:n},[bt("span",null,'"'),bt("a",{href:r,target:"_blank",class:"jv-link"},r),bt("span",null,'"')]):u=bt("span",{class:{"jv-item":!0,"jv-string":!0},ref:n},`"${r}"`);const d=[];return o.value&&d.push(bt("span",{class:{"jv-toggle":!0,open:t.value},onClick:s})),d.push(bt("span",{class:{"jv-holder-node":!0},ref:a})),d.push(u),bt("span",{},d)}}}),D8={class:Ce(["jv-item","jv-undefined"])},P8=pn({__name:"json-undefined",props:{jsonValue:{type:null,default:void 0}},setup(e){const t=e,o=nt(()=>t.jsonValue===null?"null":"undefined");return(n,a)=>(x(),C("span",D8,m(o.value),1))}}),F8=pn({__name:"json-number",props:{jsonValue:{type:Number,required:!0}},setup(e){const t=e,o=nt(()=>Number.isInteger(t.jsonValue));return(n,a)=>(x(),C("span",{class:Ce(["jv-item","jv-number",o.value?"jv-number-integer":"jv-number-float"])},m(e.jsonValue.toString()),3))}}),U8={class:Ce(["jv-item","jv-boolean"])},B8=pn({__name:"json-boolean",props:{jsonValue:{type:Boolean,required:!0}},setup(e){return(t,o)=>(x(),C("span",U8,m(e.jsonValue.toString()),1))}}),H8=pn({name:"JsonObject",props:{jsonValue:{type:Object,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},expand:Boolean,sort:Boolean,previewMode:Boolean},emits:["update:expand"],setup(e,{emit:t}){const o=b({});let n=null;const a=u=>{setTimeout(()=>{o.value=u},0)};dt(()=>e.jsonValue,u=>{a(u)},{immediate:!0,deep:!0});const s=nt(()=>{if(!e.sort)return o.value;const u=Object.keys(o.value).sort(),d={};return u.forEach(c=>{d[c]=o.value[c]}),d}),r=()=>{if(n)try{n.dispatchEvent(new Event("resized"))}catch{const u=document.createEvent("Event");u.initEvent("resized",!0,!1),n.dispatchEvent(u)}},l=()=>{t("update:expand",!e.expand),r()};return()=>{const u=[];if(u.push(bt("span",{class:["jv-item","jv-object"]},"{")),e.expand){for(const d in s.value)if(s.value.hasOwnProperty(d)){const c=s.value[d];u.push(bt(Ui,{key:d,sort:e.sort,keyName:d,depth:e.depth+1,value:c,previewMode:e.previewMode}))}}return!e.expand&&Object.keys(o.value).length>0&&u.push(bt("span",{class:"jv-ellipsis",onClick:l,title:`click to reveal object content (keys: ${Object.keys(s.value).join(", ")})`},"...")),u.push(bt("span",{class:["jv-item","jv-object"]},"}")),bt("span",{ref:d=>{n=d}},u)}}}),j8=pn({name:"JsonArray",props:{jsonValue:{type:Array,required:!0},keyName:{type:String,default:""},depth:{type:Number,default:0},sort:Boolean,expand:Boolean,previewMode:Boolean},emits:["update:expand"],setup(e,{emit:t}){const o=b([]);let n=null;const a=(r,l=0)=>{l===0&&(o.value=[]),setTimeout(()=>{r&&r.length>l&&(o.value.push(r[l]),a(r,l+1))},0)};dt(()=>e.jsonValue,r=>{a(r)},{immediate:!0,deep:!0});const s=()=>{if(t("update:expand",!e.expand),n)try{n.dispatchEvent(new Event("resized"))}catch{const r=document.createEvent("Event");r.initEvent("resized",!0,!1),n.dispatchEvent(r)}};return()=>{const r=[];return!e.previewMode&&!e.keyName&&r.push(bt("span",{class:{"jv-toggle":!0,open:!!e.expand},onClick:s})),r.push(bt("span",{class:["jv-item","jv-array"]},"[")),e.expand&&o.value.forEach((l,u)=>{r.push(bt(Ui,{key:u,sort:e.sort,depth:e.depth+1,value:l,previewMode:e.previewMode}))}),!e.expand&&o.value.length>0&&r.push(bt("span",{class:"jv-ellipsis",onClick:s,title:`click to reveal ${o.value.length} hidden items`},"...")),r.push(bt("span",{class:["jv-item","jv-array"]},"]")),bt("span",{ref:l=>{n=l}},r)}}}),W8=["title"],V8=pn({__name:"json-function",props:{jsonValue:{type:Function,required:!0}},setup(e){return(t,o)=>(x(),C("span",{class:Ce(["jv-item","jv-function"]),title:e.jsonValue.toString()}," <function> ",8,W8))}}),z8={class:Ce(["jv-item","jv-string"])},q8=pn({__name:"json-date",props:{jsonValue:{type:Date,required:!0}},setup(e){const t=e,o=no("timeformat",a=>a.toLocaleString()),n=nt(()=>o(t.jsonValue));return(a,s)=>(x(),C("span",z8,' "'+m(n.value)+'" ',1))}}),G8={class:Ce(["jv-item","jv-regexp"])},Q8=pn({__name:"json-regexp",props:{jsonValue:{type:RegExp,required:!0}},setup(e){return(t,o)=>(x(),C("span",G8,m(e.jsonValue.toString()),1))}}),Ui=pn({name:"JsonBox",props:{value:{type:[Object,Array,String,Number,Boolean,Function,Date],default:null},keyName:{type:String,default:""},sort:Boolean,depth:{type:Number,default:0},previewMode:Boolean},setup(e){const t=no("expandDepth",1/0),o=no("keyClick",()=>{}),n=b(!0);let a=null;_t(()=>{n.value=e.previewMode||e.depth<t});const s=()=>{if(n.value=!n.value,a)try{a.dispatchEvent(new Event("resized"))}catch{const r=document.createEvent("Event");r.initEvent("resized",!0,!1),a.dispatchEvent(r)}};return()=>{const r=[];let l;e.value===null||e.value===void 0?l=P8:Array.isArray(e.value)?l=j8:e.value instanceof Date?l=q8:e.value instanceof RegExp?l=Q8:typeof e.value=="object"?l=H8:typeof e.value=="number"?l=F8:typeof e.value=="string"?l=gg:typeof e.value=="boolean"?l=B8:typeof e.value=="function"?l=V8:l=gg;const u=e.value&&(Array.isArray(e.value)||typeof e.value=="object"&&!(e.value instanceof Date)&&!(e.value instanceof RegExp));return!e.previewMode&&u&&!(e.value instanceof RegExp)&&r.push(bt("span",{class:{"jv-toggle":!0,open:!!n.value},onClick:s})),e.keyName&&r.push(bt("span",{class:"jv-key",onClick:()=>{o&&o(e.keyName)}},`${e.keyName}:`)),r.push(bt(l,{class:"jv-push",jsonValue:e.value,keyName:e.keyName,sort:e.sort,depth:e.depth,expand:n.value,previewMode:e.previewMode,"onUpdate:expand":d=>{n.value=d}})),bt("div",{class:{"jv-node":!0,"jv-key-node":!!e.keyName&&!u,toggle:!e.previewMode&&u},ref:d=>{a=d}},r)}}});function Y8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bi={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var K8=Bi.exports,hg;function J8(){return hg||(hg=1,(function(e,t){(function(o,n){e.exports=n()})(K8,function(){return(function(){var o={686:(function(s,r,l){l.d(r,{default:function(){return Te}});var u=l(279),d=l.n(u),c=l(370),f=l.n(c),h=l(817),p=l.n(h);function v(te){try{return document.execCommand(te)}catch{return!1}}var y=function(te){var le=p()(te);return v("cut"),le},T=y;function k(te){var le=document.documentElement.getAttribute("dir")==="rtl",ve=document.createElement("textarea");ve.style.fontSize="12pt",ve.style.border="0",ve.style.padding="0",ve.style.margin="0",ve.style.position="absolute",ve.style[le?"right":"left"]="-9999px";var xe=window.pageYOffset||document.documentElement.scrollTop;return ve.style.top="".concat(xe,"px"),ve.setAttribute("readonly",""),ve.value=te,ve}var $=function(te,le){var ve=k(te);le.container.appendChild(ve);var xe=p()(ve);return v("copy"),ve.remove(),xe},B=function(te){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},ve="";return typeof te=="string"?ve=$(te,le):te instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(te==null?void 0:te.type)?ve=$(te.value,le):(ve=p()(te),v("copy")),ve},w=B;function M(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(le){return typeof le}:M=function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},M(te)}var H=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=te.action,ve=le===void 0?"copy":le,xe=te.container,pe=te.target,P=te.text;if(ve!=="copy"&&ve!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(pe!==void 0)if(pe&&M(pe)==="object"&&pe.nodeType===1){if(ve==="copy"&&pe.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(ve==="cut"&&(pe.hasAttribute("readonly")||pe.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(P)return w(P,{container:xe});if(pe)return ve==="cut"?T(pe):w(pe,{container:xe})},W=H;function D(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(le){return typeof le}:D=function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},D(te)}function I(te,le){if(!(te instanceof le))throw new TypeError("Cannot call a class as a function")}function ee(te,le){for(var ve=0;ve<le.length;ve++){var xe=le[ve];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(te,xe.key,xe)}}function K(te,le,ve){return le&&ee(te.prototype,le),ve&&ee(te,ve),te}function V(te,le){if(typeof le!="function"&&le!==null)throw new TypeError("Super expression must either be null or a function");te.prototype=Object.create(le&&le.prototype,{constructor:{value:te,writable:!0,configurable:!0}}),le&&ne(te,le)}function ne(te,le){return ne=Object.setPrototypeOf||function(ve,xe){return ve.__proto__=xe,ve},ne(te,le)}function oe(te){var le=se();return function(){var ve=F(te),xe;if(le){var pe=F(this).constructor;xe=Reflect.construct(ve,arguments,pe)}else xe=ve.apply(this,arguments);return X(this,xe)}}function X(te,le){return le&&(D(le)==="object"||typeof le=="function")?le:re(te)}function re(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te}function se(){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 F(te){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(le){return le.__proto__||Object.getPrototypeOf(le)},F(te)}function R(te,le){var ve="data-clipboard-".concat(te);if(le.hasAttribute(ve))return le.getAttribute(ve)}var ie=(function(te){V(ve,te);var le=oe(ve);function ve(xe,pe){var P;return I(this,ve),P=le.call(this),P.resolveOptions(pe),P.listenClick(xe),P}return K(ve,[{key:"resolveOptions",value:function(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof xe.action=="function"?xe.action:this.defaultAction,this.target=typeof xe.target=="function"?xe.target:this.defaultTarget,this.text=typeof xe.text=="function"?xe.text:this.defaultText,this.container=D(xe.container)==="object"?xe.container:document.body}},{key:"listenClick",value:function(xe){var pe=this;this.listener=f()(xe,"click",function(P){return pe.onClick(P)})}},{key:"onClick",value:function(xe){var pe=xe.delegateTarget||xe.currentTarget,P=this.action(pe)||"copy",q=W({action:P,container:this.container,target:this.target(pe),text:this.text(pe)});this.emit(q?"success":"error",{action:P,text:q,trigger:pe,clearSelection:function(){pe&&pe.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(xe){return R("action",xe)}},{key:"defaultTarget",value:function(xe){var pe=R("target",xe);if(pe)return document.querySelector(pe)}},{key:"defaultText",value:function(xe){return R("text",xe)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(xe){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(xe,pe)}},{key:"cut",value:function(xe){return T(xe)}},{key:"isSupported",value:function(){var xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],pe=typeof xe=="string"?[xe]:xe,P=!!document.queryCommandSupported;return pe.forEach(function(q){P=P&&!!document.queryCommandSupported(q)}),P}}]),ve})(d()),Te=ie}),828:(function(s){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function u(d,c){for(;d&&d.nodeType!==r;){if(typeof d.matches=="function"&&d.matches(c))return d;d=d.parentNode}}s.exports=u}),438:(function(s,r,l){var u=l(828);function d(h,p,v,y,T){var k=f.apply(this,arguments);return h.addEventListener(v,k,T),{destroy:function(){h.removeEventListener(v,k,T)}}}function c(h,p,v,y,T){return typeof h.addEventListener=="function"?d.apply(null,arguments):typeof v=="function"?d.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(k){return d(k,p,v,y,T)}))}function f(h,p,v,y){return function(T){T.delegateTarget=u(T.target,p),T.delegateTarget&&y.call(h,T)}}s.exports=c}),879:(function(s,r){r.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},r.nodeList=function(l){var u=Object.prototype.toString.call(l);return l!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in l&&(l.length===0||r.node(l[0]))},r.string=function(l){return typeof l=="string"||l instanceof String},r.fn=function(l){var u=Object.prototype.toString.call(l);return u==="[object Function]"}}),370:(function(s,r,l){var u=l(879),d=l(438);function c(v,y,T){if(!v&&!y&&!T)throw new Error("Missing required arguments");if(!u.string(y))throw new TypeError("Second argument must be a String");if(!u.fn(T))throw new TypeError("Third argument must be a Function");if(u.node(v))return f(v,y,T);if(u.nodeList(v))return h(v,y,T);if(u.string(v))return p(v,y,T);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(v,y,T){return v.addEventListener(y,T),{destroy:function(){v.removeEventListener(y,T)}}}function h(v,y,T){return Array.prototype.forEach.call(v,function(k){k.addEventListener(y,T)}),{destroy:function(){Array.prototype.forEach.call(v,function(k){k.removeEventListener(y,T)})}}}function p(v,y,T){return d(document.body,v,y,T)}s.exports=c}),817:(function(s){function r(l){var u;if(l.nodeName==="SELECT")l.focus(),u=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var d=l.hasAttribute("readonly");d||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),d||l.removeAttribute("readonly"),u=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(l),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}s.exports=r}),279:(function(s){function r(){}r.prototype={on:function(l,u,d){var c=this.e||(this.e={});return(c[l]||(c[l]=[])).push({fn:u,ctx:d}),this},once:function(l,u,d){var c=this;function f(){c.off(l,f),u.apply(d,arguments)}return f._=u,this.on(l,f,d)},emit:function(l){var u=[].slice.call(arguments,1),d=((this.e||(this.e={}))[l]||[]).slice(),c=0,f=d.length;for(c;c<f;c++)d[c].fn.apply(d[c].ctx,u);return this},off:function(l,u){var d=this.e||(this.e={}),c=d[l],f=[];if(c&&u)for(var h=0,p=c.length;h<p;h++)c[h].fn!==u&&c[h].fn._!==u&&f.push(c[h]);return f.length?d[l]=f:delete d[l],this}},s.exports=r,s.exports.TinyEmitter=r})},n={};function a(s){if(n[s])return n[s].exports;var r=n[s]={exports:{}};return o[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 l in r)a.o(r,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:r[l]})}})(),(function(){a.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)}})(),a(686)})().default})})(Bi)),Bi.exports}var X8=J8();const Z8=Y8(X8),e7=function(e,t){let o=Date.now(),n;return(...a)=>{Date.now()-o<t&&n&&clearTimeout(n),n=setTimeout(()=>{e(...a)},t),o=Date.now()}},t7=pn({name:"JsonViewer",components:{JsonBox:Ui},props:{value:{type:[Object,Array,String,Number,Boolean,Function],required:!0},expanded:{type:Boolean,default:!1},expandDepth:{type:Number,default:1},copyable:{type:[Boolean,Object],default:!1},sort:{type:Boolean,default:!1},boxed:{type:Boolean,default:!1},theme:{type:String,default:"light"},timeformat:{type:Function,default:e=>e.toLocaleString()},previewMode:{type:Boolean,default:!1},parse:{type:Boolean,default:!1}},emits:["onKeyClick","copied"],setup(e,{emit:t}){const o=b(!1),n=b(!1),a=b(e.expanded),s=b(null),r=b(null);Qs("expandDepth",e.expandDepth),Qs("timeformat",e.timeformat),Qs("keyClick",v=>{t("onKeyClick",v)});const l=nt(()=>"jv-container jv-"+e.theme+(e.boxed?" boxed":"")),u=nt(()=>{if(typeof e.copyable=="boolean"&&!e.copyable)return{copyText:"copy",copiedText:"copied!",timeout:2e3,align:"right"};const v=e.copyable;return{copyText:v.copyText||"copy",copiedText:v.copiedText||"copied!",timeout:v.timeout||2e3,align:v.align||"right"}}),d=nt(()=>{if(!e.parse||typeof e.value!="string")return e.value;try{return JSON.parse(e.value)}catch{return e.value}}),c=()=>{f()},f=e7(()=>{Qe(()=>{r.value&&(r.value.$el.clientHeight>=250?n.value=!0:n.value=!1)})},200),h=v=>{o.value||(o.value=!0,setTimeout(()=>{o.value=!1},u.value.timeout),t("copied",v))},p=()=>{a.value=!a.value};return dt(()=>e.value,()=>{c()}),_t(()=>{e.boxed&&r.value&&(c(),r.value.$el.addEventListener("resized",c,!0)),e.copyable&&s.value&&new Z8(s.value,{text:()=>JSON.stringify(d.value,null,2)}).on("success",h)}),{clip:s,jsonBox:r,copied:o,expandableCode:n,expandCode:a,jvClass:l,copyText:u,parseValue:d,toggleExpandCode:p}}}),n7=(e,t)=>{const o=e.__vccOpts||e;for(const[n,a]of t)o[n]=a;return o};function o7(e,t,o,n,a,s){const r=qh("json-box");return x(),C("div",{class:Ce(e.jvClass)},[e.copyable?(x(),C("div",{key:0,class:Ce(`jv-tooltip ${e.copyText.align||"right"}`)},[i("span",{ref:"clip",class:Ce(["jv-button",{copied:e.copied}])},[ja(e.$slots,"copy",{copied:e.copied},()=>[Ve(m(e.copied?e.copyText.copiedText:e.copyText.copyText),1)])],2)],2)):fe("",!0),i("div",{class:Ce(["jv-code",{open:e.expandCode,boxed:e.boxed}])},[qe(r,{ref:"jsonBox",value:e.parseValue,sort:e.sort,"preview-mode":e.previewMode},null,8,["value","sort","preview-mode"])],2),e.expandableCode&&e.boxed?(x(),C("div",{key:1,class:"jv-more",onClick:t[0]||(t[0]=(...l)=>e.toggleExpandCode&&e.toggleExpandCode(...l))},[i("span",{class:Ce(["jv-toggle",{open:!!e.expandCode}])},null,2)])):fe("",!0)],2)}const a7=n7(t7,[["render",o7]]),s7={class:"lora-raw__content"},mg="weilin_tools_",r7=wt({__name:"lora_raw",emits:["close","update"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b({}),s=b(!1),r={loraRaw:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},u=b((()=>{try{const p=localStorage.getItem(`${mg}loraRawState`);if(p){const v=JSON.parse(p),y={...r};return v.loraRaw&&(y.loraRaw={...r.loraRaw,...v.loraRaw}),y}}catch(p){console.error("Error loading window states:",p)}return{...r}})());dt(u,p=>{try{localStorage.setItem(`${mg}loraRawState`,JSON.stringify(p))}catch(v){console.error("Error saving window states:",v)}},{deep:!0}),_t(()=>{Be.registerWindow("loraRaw")}),On(()=>{Be.unregisterWindow("loraRaw")});const d=p=>{s.value=!1},c=(p,v)=>{u.value[p]&&(u.value[p].position={...v})},f=(p,v)=>{u.value[p]&&(u.value[p].size={...v})};return t({open:p=>{s.value=!0,Be.setActiveWindow("loraRaw"),a.value=p}}),(p,v)=>s.value?(x(),yt(wn,{key:0,title:g(n)("lora.rawTitle"),position:u.value.loraRaw.position,size:u.value.loraRaw.size,"z-index":g(Be).getZIndex("loraRaw"),"onUpdate:position":v[0]||(v[0]=y=>c("loraRaw",y)),"onUpdate:size":v[1]||(v[1]=y=>f("loraRaw",y)),onActive:v[2]||(v[2]=y=>g(Be).setActiveWindow("loraRaw")),onClose:v[3]||(v[3]=y=>d())},{default:pt(()=>[i("div",s7,[qe(g(a7),{value:a.value,copyable:"",sort:"",theme:"dark"},null,8,["value"])])]),_:1},8,["title","position","size","z-index"])):fe("",!0)}},[["__scopeId","data-v-4c910f08"]]),l7={key:0,class:"lora-detail__loading"},i7={class:"lora-detail__body"},u7={class:"lora-detail__tags"},c7=["title"],d7=["title"],f7={class:"lora-detail__table"},p7={class:"label"},g7={colspan:"2"},h7={colspan:"3"},m7={class:"label"},v7={colspan:"2",class:"hash"},_7={class:"label"},y7={colspan:"2"},b7=["href"],w7={key:1,class:"not-found"},x7=["title"],T7={class:"label"},S7=["title"],k7={key:1,class:"text"},C7={class:"actions"},E7={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},L7={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},$7={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"},A7={class:"label"},I7={colspan:"2"},M7={class:"label"},O7={colspan:"2"},R7={class:"label"},N7=["title"],D7=["onUpdate:modelValue","type","onKeyup"],P7={key:1,class:"text"},F7={class:"actions"},U7=["onClick","title"],B7={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},H7={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},j7={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"},W7={class:"label"},V7=["onUpdate:modelValue"],z7={key:1},q7=["onUpdate:modelValue","type","onKeyup"],G7={key:1,class:"text"},Q7={class:"actions"},Y7=["onClick","title"],K7={class:"svg-icon",viewBox:"0 0 24 24",width:"16",height:"16"},J7={key:0,d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},X7={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"},Z7=["onClick","title"],e6={class:"field-management"},t6=["title"],n6={key:0},o6={class:"label"},a6=["title"],s6={key:0,class:"word-selection"},r6={colspan:"2"},l6={class:"word-list"},i6=["onClick"],u6={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},c6={key:1},d6={key:0,class:"lora-detail__images"},f6={class:"image-wrapper"},p6=["onClick"],g6=["src"],h6={class:"image-info"},m6={key:0,class:"info-item"},v6=["href"],_6={key:1,class:"info-item"},y6={key:2,class:"info-item"},b6={key:3,class:"info-item"},w6={key:4,class:"info-item"},x6={key:5,class:"info-item"},T6={key:6,class:"info-item"},S6={key:7,class:"info-item"},vg="weilin_tools_",Rr=wt({__name:"lora_detail",emits:["close","update"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b({}),r=b(!1),l=b(),u=b({}),d={loraDetail:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},f=b((()=>{try{const P=localStorage.getItem(`${vg}loraDetailState`);if(P){const q=JSON.parse(P),Z={...d};return q.loraDetail&&(Z.loraDetail={...d.loraDetail,...q.loraDetail}),Z}}catch(P){console.error("Error loading window states:",P)}return{...d}})());dt(f,P=>{try{localStorage.setItem(`${vg}loraDetailState`,JSON.stringify(P))}catch(q){console.error("Error saving window states:",q)}},{deep:!0}),_t(()=>{Be.registerWindow("loraDetail")}),On(()=>{Be.unregisterWindow("loraDetail")});const h=P=>{r.value=!1},p=(P,q)=>{f.value[P]&&(f.value[P].position={...q})},v=(P,q)=>{f.value[P]&&(f.value[P].size={...q})};t({open:P=>{r.value=!0,Be.setActiveWindow("loraDetail"),a.value=!0,s.value=P,Qe(()=>{I()})}});const T=b(""),k=b(),$=P=>{k.value.open(P)},B=b({}),w=b({}),M=b([]),H=[{key:"strengthMin",label:n("lora.strengthMin"),tip:n("lora.strengthMinTip"),type:"number"},{key:"strengthMax",label:n("lora.strengthMax"),tip:n("lora.strengthMaxTip"),type:"number"},{key:"strWeight",label:n("lora.strWeight"),tip:n("lora.strWeightTip"),type:"number"},{key:"loraWorks",label:n("lora.promptWords"),tip:n("lora.promptWordsTip")}],W=()=>{const P=`custom_${Date.now()}`;s.value.user_diy_fileds||(s.value.user_diy_fileds={}),u.value[P]={label:"新字段",type:"text"},s.value.user_diy_fileds[P]={label:"新字段",value:""},w.value[P]="",F(P)},D=async P=>{var q,Z;delete u.value[P],delete w.value[P],(Z=(q=s.value)==null?void 0:q.user_diy_fileds)!=null&&Z[P]&&delete s.value.user_diy_fileds[P],await Qe(async()=>{await Te(P)})},I=()=>{T.value=s.value.name,s.value={},M.value=[],w.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},xn.getLoraDetail({file:T.value,refresh:!1,light:!1}).then(P=>{s.value=P.data,Qe(function(){var q,Z,O,Q,E,L;s.value.name=s.value.name||((Z=(q=s.value.raw)===null||q===void 0?void 0:q.metadata)===null||Z===void 0?void 0:Z.ss_output_name===void 0?Z["modelspec.title"]:Z.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(O=s.value.strengthMin)!==null&&O!==void 0?O:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(Q=s.value.strengthMax)!==null&&Q!==void 0?Q:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(E=s.value.userNote)!==null&&E!==void 0?E:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(L=s.value.loraWorks)!==null&&L!==void 0?L:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1})}).catch(P=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},ee=P=>{let Z=new URL(P).pathname.split("/").pop();return Z=Z.split("?")[0],decodeURIComponent(Z)},K=async P=>{try{const q=await fetch(P),Z=ee(P),O=await q.blob();xn.postUplaodImg(O,s.value.file,Z).then(Q=>{Y({type:"success",str:"message.saveSuccess"})}).catch(Q=>{Y({type:"warn",str:"message.unknownError"})})}catch{Y({type:"warn",str:"message.unknownError"})}},V=nt(()=>{var P;return(P=s.value.links)==null?void 0:P.find(q=>q.includes("civitai.com/models"))}),ne=nt(()=>{var P,q;return((q=(P=s.value.raw)==null?void 0:P.civitai)==null?void 0:q.error)==="Model not found"}),oe=nt(()=>s.value.trainedWords||[]),X=async()=>{var q;const P=((q=l.value)==null?void 0:q.scrollTop)||0;a.value=!0,xn.getLoraRefresh({file:T.value}).then(Z=>{s.value=Z.data,Qe(function(){var O,Q,E,L,N,J;s.value.name=s.value.name||((Q=(O=s.value.raw)===null||O===void 0?void 0:O.metadata)===null||Q===void 0?void 0:Q.ss_output_name===void 0?Q["modelspec.title"]:Q.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(E=s.value.strengthMin)!==null&&E!==void 0?E:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(L=s.value.strengthMax)!==null&&L!==void 0?L:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(N=s.value.userNote)!==null&&N!==void 0?N:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(J=s.value.loraWorks)!==null&&J!==void 0?J:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1}),Qe(function(){a.value=!1}),l.value&&(l.value.scrollTop=P),Y({type:"success",str:"message.dataLoaded"})}).catch(Z=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},re=P=>{B.value[P]?F(P):se(P)},se=P=>{var q,Z;B.value[P]=!0,P in u.value?w.value[P]=((Z=(q=s.value.user_diy_fileds)==null?void 0:q[P])==null?void 0:Z.value)||"":w.value[P]=s.value[P],Qe(()=>{P==="name"&&nameInput.value&&nameInput.value.focus()})},F=P=>{P in u.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[P]={label:u.value[P].label,value:w.value[P]}):s.value[P]=w.value[P],ie(s.value),B.value[P]=!1},R=P=>{B.value[P]=!1,w.value[P]=s.value[P]},ie=P=>{var Z;const q=((Z=l.value)==null?void 0:Z.scrollTop)||0;a.value=!0,xn.postLoraSave(T.value,P).then(O=>{s.value=O.data,Qe(function(){var Q,E,L,N,J,de;s.value.name=s.value.name||((E=(Q=s.value.raw)===null||Q===void 0?void 0:Q.metadata)===null||E===void 0?void 0:E.ss_output_name===void 0?E["modelspec.title"]:E.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(L=s.value.strengthMin)!==null&&L!==void 0?L:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(N=s.value.strengthMax)!==null&&N!==void 0?N:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(J=s.value.userNote)!==null&&J!==void 0?J:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(de=s.value.loraWorks)!==null&&de!==void 0?de:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1,Qe(function(){l.value&&(l.value.scrollTop=q)})}),Y({type:"success",str:"message.saveSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},Te=async P=>{var Z;const q=((Z=l.value)==null?void 0:Z.scrollTop)||0;a.value=!0,await xn.postLoraDelet(T.value,P).then(O=>{s.value=O.data,Qe(function(){var Q,E,L,N,J,de;s.value.name=s.value.name||((E=(Q=s.value.raw)===null||Q===void 0?void 0:Q.metadata)===null||E===void 0?void 0:E.ss_output_name===void 0?E["modelspec.title"]:E.ss_output_name)||"",w.value.nameValue=s.value.name,s.value.strengthMin=(L=s.value.strengthMin)!==null&&L!==void 0?L:"",w.value.minValue=s.value.strengthMin,s.value.strengthMax=(N=s.value.strengthMax)!==null&&N!==void 0?N:"",w.value.maxValue=s.value.strengthMax,s.value.userNote=(J=s.value.userNote)!==null&&J!==void 0?J:"",w.value.notesValue=s.value.userNote,s.value.loraWorks=(de=s.value.loraWorks)!==null&&de!==void 0?de:"",w.value.loraWorksValue=s.value.loraWorks,s.value.user_diy_fileds&&(u.value=s.value.user_diy_fileds),a.value=!1,Qe(function(){l.value&&(l.value.scrollTop=q)})}),Y({type:"success",str:"message.deleteSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},te=P=>{const q=M.value.indexOf(P);q===-1?M.value.push(P):M.value.splice(q,1)},le=P=>M.value.includes(P),ve=async()=>{M.value.length&&navigator.clipboard.writeText(M.value).then(P=>{Y({type:"success",str:"message.copySuccess"})},P=>{Y({type:"warn",str:"message.copyFailed"})})};b(!1),b(!1),nt(()=>a.value?n("common.loading"):n("common.ready"));const xe=b(!0),pe=()=>{xe.value=!xe.value};return(P,q)=>(x(),C(Oe,null,[r.value?(x(),yt(wn,{key:0,title:g(n)("lora.title"),position:f.value.loraDetail.position,size:f.value.loraDetail.size,"z-index":g(Be).getZIndex("loraDetail"),"onUpdate:position":q[5]||(q[5]=Z=>p("loraDetail",Z)),"onUpdate:size":q[6]||(q[6]=Z=>v("loraDetail",Z)),onActive:q[7]||(q[7]=Z=>g(Be).setActiveWindow("loraDetail")),onClose:q[8]||(q[8]=Z=>h())},{default:pt(()=>{var Z;return[i("div",{class:"lora-detail__content",ref_key:"loraContent",ref:l},[a.value?(x(),C("div",l7,[...q[9]||(q[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)])])):fe("",!0),i("div",i7,[q[24]||(q[24]=i("div",{class:"lora-detail__title"},"Lora 信息",-1)),i("ul",u7,[s.value.type?(x(),C("li",{key:0,class:Ce(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:g(n)("lora.type")},m(s.value.type),11,c7)):fe("",!0),s.value.baseModel?(x(),C("li",{key:1,class:Ce(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:g(n)("lora.baseModel")},m(s.value.baseModel),11,d7)):fe("",!0)]),i("table",f7,[i("tbody",null,[i("tr",null,[i("td",p7,m(g(n)("lora.file")),1),i("td",g7,m(s.value.file),1),i("td",h7,[i("button",{class:"fetch-btn",onClick:q[0]||(q[0]=O=>$(s.value.raw.metadata))},m(g(n)("lora.seeLoraRaw")),1)])]),i("tr",null,[i("td",m7,m(g(n)("lora.hash")),1),i("td",v7,m(s.value.sha256),1)]),i("tr",null,[i("td",_7,m(g(n)("lora.civitai")),1),i("td",y7,[V.value?(x(),C(Oe,{key:0},[i("a",{href:V.value,target:"_blank",class:"civitai-link"},[q[10]||(q[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,m(g(n)("lora.viewOnCivitai")),1)],8,b7),i("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:X},m(g(n)("lora.getCivitData")),1)],64)):ne.value?(x(),C("div",w7,[i("i",null,m(g(n)("lora.modelNotFound")),1),(x(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:g(n)("lora.modelNotFoundTip")},[...q[11]||(q[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,x7))])):(x(),C("button",{key:2,class:"fetch-btn",onClick:X},m(g(n)("lora.fetchFromCivitai")),1))])]),i("tr",{class:Ce({"is-editing":B.value.name})},[i("td",T7,[Ve(m(g(n)("lora.name"))+" ",1),(x(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:g(n)("lora.nameTip")},[...q[12]||(q[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,S7))]),i("td",null,[B.value.name?we((x(),C("input",{key:0,"onUpdate:modelValue":q[1]||(q[1]=O=>w.value.name=O),type:"text",onKeyup:[q[2]||(q[2]=en(O=>F("name"),["enter"])),q[3]||(q[3]=en(O=>R("name"),["esc"]))],ref:"nameInput"},null,544)),[[$e,w.value.name]]):(x(),C("span",k7,m(s.value.name),1))]),i("td",C7,[i("button",{class:"edit-btn",onClick:q[4]||(q[4]=O=>re("name"))},[(x(),C("svg",E7,[B.value.name?(x(),C("path",L7)):(x(),C("path",$7))]))])])],2),i("tr",null,[i("td",A7,m(g(n)("lora.baseModel")),1),i("td",I7,m(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),i("tr",null,[i("td",M7,m(g(n)("lora.skipClip")),1),i("td",O7,m((P._t=(P._s=s.value.raw)===null||P._s===void 0?void 0:P._s.metadata)===null||P._t===void 0?void 0:P._t.ss_clip_skip),1)]),(x(),C(Oe,null,We(H,O=>i("tr",{key:O.key,class:Ce({"is-editing":B.value[O.key]})},[i("td",R7,[Ve(m(O.label)+" ",1),O.tip?(x(),C("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:O.tip},[...q[13]||(q[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,N7)):fe("",!0)]),i("td",null,[B.value[O.key]?we((x(),C("input",{key:0,"onUpdate:modelValue":Q=>w.value[O.key]=Q,type:O.type||"text",onKeyup:[en(Q=>F(O.key),["enter"]),en(Q=>R(O.key),["esc"])]},null,40,D7)),[[rd,w.value[O.key]]]):(x(),C("span",P7,m(s.value[O.key]),1))]),i("td",F7,[i("button",{class:"edit-btn",onClick:Q=>re(O.key),title:g(n)("promptBox.settings.edit")},[(x(),C("svg",B7,[B.value[O.key]?(x(),C("path",H7)):(x(),C("path",j7))]))],8,U7)])],2)),64)),(x(!0),C(Oe,null,We(u.value,(O,Q)=>{var E;return x(),C("tr",{key:Q,class:Ce({"is-editing":B.value[Q]})},[i("td",W7,[B.value[Q]?we((x(),C("input",{key:0,"onUpdate:modelValue":L=>O.label=L,type:"text"},null,8,V7)),[[$e,O.label]]):(x(),C("span",z7,m(O.label),1))]),i("td",null,[B.value[Q]?we((x(),C("input",{key:0,"onUpdate:modelValue":L=>w.value[Q]=L,type:O.type||"text",onKeyup:[en(L=>F(Q),["enter"]),en(L=>R(Q),["esc"])]},null,40,q7)),[[rd,w.value[Q]]]):(x(),C("span",G7,m(s.value.user_diy_fileds?(E=s.value.user_diy_fileds[Q])==null?void 0:E.value:""),1))]),i("td",Q7,[i("button",{class:"edit-btn",onClick:L=>re(Q),title:g(n)("promptBox.settings.edit")},[(x(),C("svg",K7,[B.value[Q]?(x(),C("path",J7)):(x(),C("path",X7))]))],8,Y7),i("button",{style:{"margin-left":"5px",color:"#f87171"},onClick:L=>D(Q),class:"edit-btn",title:g(n)("promptBox.settings.delete")},m(g(n)("promptBox.settings.delete")),9,Z7)])],2)}),128)),i("div",e6,[i("button",{onClick:W,class:"add-btn",title:g(n)("lora.addDiyFiled")},m(g(n)("lora.addDiyFiled")),9,t6)]),oe.value.length?(x(),C("tr",n6,[i("td",o6,[Ve(m(g(n)("lora.trainedWords"))+" ",1),(x(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:g(n)("lora.trainedWordsTip")},[...q[14]||(q[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,a6)),M.value.length?(x(),C("div",s6,[Ve(m(g(n)("lora.selectedWords",{count:M.value.length}))+" ",1),i("button",{class:"copy-btn",onClick:ve},m(g(n)("common.copy")),1)])):fe("",!0)]),i("td",r6,[i("ul",l6,[(x(!0),C(Oe,null,We(xe.value?oe.value.slice(0,10):oe.value,(O,Q)=>(x(),C("li",{key:"words-"+Q,class:Ce(["word-item",{"is-selected":le(O.word),"is-hidden":xe.value&&Q>=10}]),onClick:E=>te(O.word)},[i("span",null,m(O.word),1),O.civitai?(x(),C("svg",u6,[...q[15]||(q[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)])])):fe("",!0),O.count!=null?(x(),C("small",c6,m(O.count),1)):fe("",!0)],10,i6))),128)),oe.value.length>10?(x(),C("li",{key:0,class:"toggle-btn",onClick:pe},m(xe.value?g(n)("common.showMore"):g(n)("common.showLess")),1)):fe("",!0)])])])):fe("",!0)])]),(Z=s.value.images)!=null&&Z.length?(x(),C("ul",d6,[(x(!0),C(Oe,null,We(s.value.images,(O,Q)=>(x(),C("li",{key:Q,class:"lora-detail__image-item"},[i("figure",null,[i("div",f6,[i("div",{class:"image-action",onClick:E=>K(O.url)}," 设置为Lora封面 ",8,p6),i("img",{src:O.url},null,8,g6)]),i("figcaption",h6,[O.civitaiUrl?(x(),C("span",m6,[i("a",{href:O.civitaiUrl,target:"_blank",class:"civitai-link"},[...q[16]||(q[16]=[Ve(" C站 civitai ",-1),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,v6)])):fe("",!0),O.seed?(x(),C("span",_6,[q[17]||(q[17]=i("label",null,"种子 seed",-1)),Ve(" "+m(O.seed),1)])):fe("",!0),O.steps?(x(),C("span",y6,[q[18]||(q[18]=i("label",null,"步数 steps",-1)),Ve(" "+m(O.steps),1)])):fe("",!0),O.cfg?(x(),C("span",b6,[q[19]||(q[19]=i("label",null,"引导系数 cfg",-1)),Ve(" "+m(O.cfg),1)])):fe("",!0),O.sampler?(x(),C("span",w6,[q[20]||(q[20]=i("label",null,"采样器 sampler",-1)),Ve(" "+m(O.sampler),1)])):fe("",!0),O.model?(x(),C("span",x6,[q[21]||(q[21]=i("label",null,"基础模型 model",-1)),Ve(" "+m(O.model),1)])):fe("",!0),O.positive?(x(),C("span",T6,[q[22]||(q[22]=i("label",null,"正向提示词 positive",-1)),Ve(" "+m(O.positive),1)])):fe("",!0),O.negative?(x(),C("span",S6,[q[23]||(q[23]=i("label",null,"反向提示词 negative",-1)),Ve(" "+m(O.negative),1)])):fe("",!0)])])]))),128))])):fe("",!0)])],512)]}),_:1},8,["title","position","size","z-index"])):fe("",!0),qe(r7,{ref_key:"loraRawRef",ref:k},null,512)],64))}},[["__scopeId","data-v-3a570568"]]),k6={key:0,class:"lora-detail__loading"},C6={class:"lora-detail__body"},E6={class:"lora-detail__tags"},L6=["title"],$6=["title"],A6={class:"lora-detail__table"},I6={class:"label"},M6={colspan:"2"},O6={class:"label"},R6={colspan:"2",class:"hash"},N6={class:"label"},D6={colspan:"2"},P6=["href"],F6={key:1,class:"not-found"},U6=["title"],B6={class:"label"},H6=["title"],j6={key:1,class:"text"},W6={class:"label"},V6={colspan:"2"},z6={class:"label"},q6={colspan:"2"},G6={class:"label"},Q6=["title"],Y6={class:"text"},K6={class:"actions"},J6=["onClick","title"],X6={class:"label"},Z6=["onUpdate:modelValue"],ex={key:1},tx={class:"text"},nx={class:"actions"},ox=["onClick","title"],ax={key:0},sx={class:"label"},rx=["title"],lx={key:0,class:"word-selection"},ix={colspan:"2"},ux={class:"word-list"},cx=["onClick"],dx={key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"civitai-icon"},fx={key:1},px={key:0,class:"lora-detail__images",style:{display:"grid","grid-template-columns":"repeat(2, 1fr)",gap:"12px"}},gx={class:"image-wrapper",style:{height:"200px"}},hx=["src"],Hi=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:o}){const{t:n}=ht(),a=b(!1),s=b({}),r=b(),l=b({}),u=e,d=b(""),c=o,f=()=>{c("cardLeave")},h=()=>{c("cardenter")},p=b({}),v=b({}),y=b([]),T=[{key:"strengthMin",label:n("lora.strengthMin"),tip:n("lora.strengthMinTip"),type:"number"},{key:"strengthMax",label:n("lora.strengthMax"),tip:n("lora.strengthMaxTip"),type:"number"},{key:"strWeight",label:n("lora.strWeight"),tip:n("lora.strWeightTip"),type:"number"},{key:"loraWorks",label:n("lora.promptWords"),tip:n("lora.promptWordsTip")}];_t(()=>{k()});const k=()=>{d.value=u.fileNmae,s.value={},y.value=[],v.value={name:!1,nameValue:"",min:!1,minValue:"",max:!1,maxValue:"",notes:!1,notesValue:"",loraWorks:!1,loraWorksValue:""},xn.getLoraDetail({file:d.value,refresh:!1,light:!1}).then(re=>{s.value=re.data,Qe(function(){var se,F,R,ie,Te,te;s.value.name=s.value.name||((F=(se=s.value.raw)===null||se===void 0?void 0:se.metadata)===null||F===void 0?void 0:F.ss_output_name===void 0?F["modelspec.title"]:F.ss_output_name)||"",v.value.nameValue=s.value.name,s.value.strengthMin=(R=s.value.strengthMin)!==null&&R!==void 0?R:"",v.value.minValue=s.value.strengthMin,s.value.strengthMax=(ie=s.value.strengthMax)!==null&&ie!==void 0?ie:"",v.value.maxValue=s.value.strengthMax,s.value.userNote=(Te=s.value.userNote)!==null&&Te!==void 0?Te:"",v.value.notesValue=s.value.userNote,s.value.loraWorks=(te=s.value.loraWorks)!==null&&te!==void 0?te:"",v.value.loraWorksValue=s.value.loraWorks,l.value=s.value.user_diy_fileds,a.value=!1})}).catch(re=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},$=re=>{navigator.clipboard.writeText(re).then(()=>{Y({type:"success",str:"已复制到剪贴板"})}).catch(se=>{Y({type:"error",str:"复制失败"})})},B=nt(()=>{var re;return(re=s.value.links)==null?void 0:re.find(se=>se.includes("civitai.com/models"))}),w=nt(()=>{var re,se;return((se=(re=s.value.raw)==null?void 0:re.civitai)==null?void 0:se.error)==="Model not found"}),M=nt(()=>s.value.trainedWords||[]),H=async()=>{var se;const re=((se=r.value)==null?void 0:se.scrollTop)||0;a.value=!0,xn.getLoraRefresh({file:d.value}).then(F=>{s.value=F.data,Qe(function(){var R,ie,Te,te,le;s.value.name=s.value.name||((ie=(R=s.value.raw)===null||R===void 0?void 0:R.metadata)===null||ie===void 0?void 0:ie.ss_output_name===void 0?ie["modelspec.title"]:ie.ss_output_name)||"",v.value.nameValue=s.value.name,s.value.strengthMin=(Te=s.value.strengthMin)!==null&&Te!==void 0?Te:"",v.value.minValue=s.value.strengthMin,s.value.strengthMax=(te=s.value.strengthMax)!==null&&te!==void 0?te:"",v.value.maxValue=s.value.strengthMax,s.value.userNote=(le=s.value.userNote)!==null&&le!==void 0?le:"",v.value.notesValue=s.value.userNote,a.value=!1}),Qe(function(){a.value=!1}),r.value&&(r.value.scrollTop=re),Y({type:"success",str:"message.dataLoaded"})}).catch(F=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},W=re=>{re in l.value?(s.value.user_diy_fileds||(s.value.user_diy_fileds={}),s.value.user_diy_fileds[re]={label:l.value[re].label,value:v.value[re]}):s.value[re]=v.value[re],I(s.value),p.value[re]=!1},D=re=>{p.value[re]=!1,v.value[re]=s.value[re]},I=re=>{var F;const se=((F=r.value)==null?void 0:F.scrollTop)||0;a.value=!0,xn.postLoraSave(d.value,re).then(R=>{s.value=R.data,Qe(function(){var ie,Te,te,le,ve;s.value.name=s.value.name||((Te=(ie=s.value.raw)===null||ie===void 0?void 0:ie.metadata)===null||Te===void 0?void 0:Te.ss_output_name===void 0?Te["modelspec.title"]:Te.ss_output_name)||"",v.value.nameValue=s.value.name,s.value.strengthMin=(te=s.value.strengthMin)!==null&&te!==void 0?te:"",v.value.minValue=s.value.strengthMin,s.value.strengthMax=(le=s.value.strengthMax)!==null&&le!==void 0?le:"",v.value.maxValue=s.value.strengthMax,s.value.userNote=(ve=s.value.userNote)!==null&&ve!==void 0?ve:"",v.value.notesValue=s.value.userNote,a.value=!1,Qe(function(){r.value&&(r.value.scrollTop=se)})}),Y({type:"success",str:"message.saveSuccess"})}).catch(R=>{Y({type:"warn",str:"message.networkError"}),a.value=!1})},ee=re=>{const se=y.value.indexOf(re);se===-1?y.value.push(re):y.value.splice(se,1)},K=re=>y.value.includes(re),V=async()=>{y.value.length&&navigator.clipboard.writeText(y.value).then(re=>{Y({type:"success",str:"message.copySuccess"})},re=>{Y({type:"warn",str:"message.copyFailed"})})},ne=b(!0),oe=()=>{ne.value=!ne.value};return t({refresh:()=>{k()}}),(re,se)=>{var F;return x(),C("div",{class:"lora_catd_content",style:ct(["left: "+e.paddingLeft+"px;top: "+e.paddingTop+"px;",{"font-size":"0.55em"}]),onMouseenter:h,onMouseleave:f},[i("div",{class:"close-button",onClick:f,title:"关闭"},[...se[3]||(se[3]=[i("span",null,"×",-1)])]),i("div",{class:"lora-detail__content",ref_key:"loraContent",ref:r},[a.value?(x(),C("div",k6,[...se[4]||(se[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)])])):fe("",!0),i("div",C6,[se[13]||(se[13]=i("div",{class:"lora-detail__title"},"Lora 信息",-1)),i("ul",E6,[s.value.type?(x(),C("li",{key:0,class:Ce(["lora-detail__tag",`-type-${s.value.type.toLowerCase()}`]),title:g(n)("lora.type")},m(s.value.type),11,L6)):fe("",!0),s.value.baseModel?(x(),C("li",{key:1,class:Ce(["lora-detail__tag",`-basemodel-${s.value.baseModel.toLowerCase()}`]),title:g(n)("lora.baseModel")},m(s.value.baseModel),11,$6)):fe("",!0)]),i("table",A6,[i("tbody",null,[i("tr",null,[i("td",I6,m(g(n)("lora.file")),1),i("td",M6,m(s.value.file),1)]),i("tr",null,[i("td",O6,m(g(n)("lora.hash")),1),i("td",R6,m(s.value.sha256),1)]),i("tr",null,[i("td",N6,m(g(n)("lora.civitai")),1),i("td",D6,[B.value?(x(),C(Oe,{key:0},[i("a",{href:B.value,target:"_blank",class:"civitai-link"},[se[5]||(se[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,m(g(n)("lora.viewOnCivitai")),1)],8,P6),i("button",{style:{"margin-left":"10px"},class:"refresh-btn",onClick:H},m(g(n)("lora.getCivitData")),1)],64)):w.value?(x(),C("div",F6,[i("i",null,m(g(n)("lora.modelNotFound")),1),(x(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:g(n)("lora.modelNotFoundTip")},[...se[6]||(se[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,U6))])):(x(),C("button",{key:2,class:"fetch-btn",onClick:H},m(g(n)("lora.fetchFromCivitai")),1))])]),i("tr",{class:Ce({"is-editing":p.value.name})},[i("td",B6,[Ve(m(g(n)("lora.name"))+" ",1),(x(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:g(n)("lora.nameTip")},[...se[7]||(se[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,H6))]),i("td",null,[p.value.name?we((x(),C("input",{key:0,"onUpdate:modelValue":se[0]||(se[0]=R=>v.value.name=R),type:"text",onKeyup:[se[1]||(se[1]=en(R=>W("name"),["enter"])),se[2]||(se[2]=en(R=>D("name"),["esc"]))],ref:"nameInput"},null,544)),[[$e,v.value.name]]):(x(),C("span",j6,m(s.value.name),1))])],2),i("tr",null,[i("td",W6,m(g(n)("lora.baseModel")),1),i("td",V6,m(!s.value.baseModelFile&&!s.value.baseModelFile?"":(s.value.baseModel||"")+(s.value.baseModelFile?`
(${s.value.baseModelFile})`:"")),1)]),i("tr",null,[i("td",z6,m(g(n)("lora.skipClip")),1),i("td",q6,m((re._t=(re._s=s.value.raw)===null||re._s===void 0?void 0:re._s.metadata)===null||re._t===void 0?void 0:re._t.ss_clip_skip),1)]),(x(),C(Oe,null,We(T,R=>i("tr",{key:R.key,class:Ce({"is-editing":p.value[R.key]})},[i("td",G6,[Ve(m(R.label)+" ",1),R.tip?(x(),C("svg",{key:0,viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:R.tip},[...se[8]||(se[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,Q6)):fe("",!0)]),i("td",null,[i("span",Y6,m(s.value[R.key]),1)]),i("td",K6,[i("button",{class:"copy-btn",onClick:ie=>$(s.value[R.key]),title:g(n)("lora.copy")},[se[9]||(se[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)),Ve(" "+m(g(n)("lora.copy")),1)],8,J6)])],2)),64)),(x(!0),C(Oe,null,We(l.value,(R,ie)=>{var Te;return x(),C("tr",{key:ie,class:Ce({"is-editing":p.value[ie]})},[i("td",X6,[p.value[ie]?we((x(),C("input",{key:0,"onUpdate:modelValue":te=>R.label=te,type:"text"},null,8,Z6)),[[$e,R.label]]):(x(),C("span",ex,m(R.label),1))]),i("td",null,[i("span",tx,m(s.value.user_diy_fileds?(Te=s.value.user_diy_fileds[ie])==null?void 0:Te.value:""),1)]),i("td",nx,[i("button",{class:"copy-btn",onClick:te=>{var le;return $((le=s.value.user_diy_fileds[ie])==null?void 0:le.value)},title:g(n)("lora.copy")},[se[10]||(se[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)),Ve(" "+m(g(n)("lora.copy")),1)],8,ox)])],2)}),128)),M.value.length?(x(),C("tr",ax,[i("td",sx,[Ve(m(g(n)("lora.trainedWords"))+" ",1),(x(),C("svg",{viewBox:"0 0 24 24",width:"16",height:"16",class:"help-icon",title:g(n)("lora.trainedWordsTip")},[...se[11]||(se[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,rx)),y.value.length?(x(),C("div",lx,[Ve(m(g(n)("lora.selectedWords",{count:y.value.length}))+" ",1),i("button",{class:"copy-btn",onClick:V},m(g(n)("common.copy")),1)])):fe("",!0)]),i("td",ix,[i("ul",ux,[(x(!0),C(Oe,null,We(ne.value?M.value.slice(0,10):M.value,(R,ie)=>(x(),C("li",{key:"words-"+ie,class:Ce(["word-item",{"is-selected":K(R.word),"is-hidden":ne.value&&ie>=10}]),onClick:Te=>ee(R.word)},[i("span",null,m(R.word),1),R.civitai?(x(),C("svg",dx,[...se[12]||(se[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)])])):fe("",!0),R.count!=null?(x(),C("small",fx,m(R.count),1)):fe("",!0)],10,cx))),128)),M.value.length>10?(x(),C("li",{key:0,class:"toggle-btn",onClick:oe},m(ne.value?g(n)("common.showMore"):g(n)("common.showLess")),1)):fe("",!0)])])])):fe("",!0)])]),(F=s.value.images)!=null&&F.length?(x(),C("ul",px,[(x(!0),C(Oe,null,We(s.value.images,(R,ie)=>(x(),C("li",{key:ie,class:"lora-detail__image-item"},[i("div",gx,[i("img",{src:R.url,style:{width:"100%",height:"100%","object-fit":"contain"}},null,8,hx)])]))),128))])):fe("",!0)])],512)],36)}}},[["__scopeId","data-v-d4b68239"]]),mx={class:"header-actions"},vx=["title"],_x=["onMouseover"],yx={class:"lora-info"},bx={class:"lora-header"},wx=["title"],xx={class:"lora-actions"},Tx=["onClick","title"],Sx=["onClick","title"],kx={class:"lora-weights"},Cx={class:"weight-item"},Ex=["onUpdate:modelValue"],Lx={class:"weight-item"},$x=["onUpdate:modelValue"],Ax={class:"lora-footer"},Ix=["onClick","title"],Mx={viewBox:"0 0 24 24",width:"14",height:"14"},Ox={key:0,d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},Rx={key:1,d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},Oo="weilin_prompt_ui_",Nx=wt({__name:"lora_stack",props:{isOpen:{type:Boolean,default:!1},selectedLoras:{type:Array,default:[]}},emits:["close","update:selectedLoras"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b(""),r=b(100),l=b(0),u=b(),d=b(!1),c=b(!1),f=b(),h=e,p=o,v=(D,I)=>{if(c.value=!0,s.value===D&&a.value)return;const K=I.currentTarget.getBoundingClientRect();let ne={left:K.left-450-10,top:K.top};ne.left<10&&(ne.left=K.right+10),ne.top=Math.max(10,Math.min(ne.top,window.innerHeight-310)),r.value=ne.left,l.value=ne.top,a.value=!0,s.value=D,Qe(()=>{f.value.refresh()})},y=()=>{c.value=!1,setTimeout(()=>{!d.value&&!c.value&&(a.value=!1,s.value="",d.value=!1)},200)},T=()=>{d.value=!0,c.value=!0},k=()=>{a.value=!1,s.value="",d.value=!1},$=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora"},"*")},B=D=>{D.hidden=!D.hidden,p("update:selectedLoras",h.selectedLoras)},w=D=>{console.log(h.selectedLoras),h.selectedLoras&&!h.selectedLoras.find(I=>I.name===D.name)&&(h.selectedLoras.push({name:D.name,weight:1,text_encoder_weight:1,...D}),p("update:selectedLoras",h.selectedLoras))},M=D=>{const I=h.selectedLoras.findIndex(ee=>ee.name===D.name);I>-1&&(h.selectedLoras.splice(I,1),p("update:selectedLoras",h.selectedLoras))},H=b(),W=D=>{H.value.open({name:D.lora})};return window.addEventListener("message",D=>{D.data.type==="weilin_prompt_ui_selectLora"&&w(D.data.lora)}),t({addLora:w,removeLora:M}),(D,I)=>(x(),C("div",{class:Ce(`${Oo}lora-stack`),style:ct([{width:e.isOpen?"300px":"0"},{paddingRight:e.isOpen?"16px":"0"}])},[i("div",{class:Ce(`${Oo}lora-content`)},[i("div",{class:Ce(`${Oo}lora-header`)},[i("h3",{class:Ce(`${Oo}lora-title`)},m(g(n)("controls.loraStack")),3),i("div",mx,[i("button",{class:Ce(`${Oo}add-btn`),onClick:$,title:g(n)("controls.addLora")},[...I[1]||(I[1]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)])],10,vx),i("button",{class:Ce(`${Oo}close-btn`),onClick:I[0]||(I[0]=ee=>D.$emit("close"))},[...I[2]||(I[2]=[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:Ce(`${Oo}lora-body`)},[i("div",{class:Ce(`${Oo}lora-list`)},[(x(!0),C(Oe,null,We(e.selectedLoras,ee=>(x(),C("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:u,key:ee.name,class:Ce(["lora-item",{"hidden-lora":ee.hidden}]),onMouseover:K=>v(ee.lora,K),onMouseleave:y},[i("div",yx,[i("div",bx,[i("span",{class:"lora-name",title:ee.name},m(ee.name),9,wx),i("div",xx,[i("button",{class:"look-on-btn",onClick:K=>W(ee),title:g(n)("controls.lookOnLora")},[...I[3]||(I[3]=[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,Tx),i("button",{class:"remove-btn",onClick:K=>M(ee),title:g(n)("controls.removeLora")},[...I[4]||(I[4]=[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,Sx)])]),i("div",kx,[i("div",Cx,[i("label",null,m(g(n)("loraManager.modelWeight")),1),we(i("input",{type:"number","onUpdate:modelValue":K=>ee.weight=K,class:"lora-weight",step:"0.1"},null,8,Ex),[[$e,ee.weight]])]),i("div",Lx,[i("label",null,m(g(n)("loraManager.textEncoderWeight")),1),we(i("input",{type:"number","onUpdate:modelValue":K=>ee.text_encoder_weight=K,class:"lora-weight",step:"0.1"},null,8,$x),[[$e,ee.text_encoder_weight]])])]),i("div",Ax,[i("button",{class:"hide-btn",onClick:K=>B(ee),title:ee.hidden?g(n)("lora.showLora"):g(n)("lora.hideLora")},[(x(),C("svg",Mx,[ee.hidden?(x(),C("path",Rx)):(x(),C("path",Ox))])),Ve(" "+m(ee.hidden?g(n)("lora.showLora"):g(n)("lora.hideLora")),1)],8,Ix)])])],42,_x))),128))],2)],2)],2),qe(Rr,{ref_key:"loraDetailLoraStackRef",ref:H},null,512),a.value?(x(),yt(Hi,{key:0,ref_key:"loraCardItem",ref:f,fileNmae:s.value,paddingLeft:r.value,paddingTop:l.value,onCardLeave:k,onCardenter:T},null,8,["fileNmae","paddingLeft","paddingTop"])):fe("",!0)],6))}},[["__scopeId","data-v-477c3bce"]]);function _g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nr={exports:{}},Dx=Nr.exports,yg;function Px(){return yg||(yg=1,(function(e){if(typeof t=="object"&&typeof t.version=="string")throw new Error("translate.js 已经加载过一次了,当前是重复加载,避免你的翻译出现异常,已帮你拦截此次加载。本信息只是给你一个提示,你可以检查一下你的项目中是否出现了重复引入 translate.js ,当然,这个异常并不会影响到你的具体使用,它已经自动帮你处理拦截了这个异常,只不过提示出来是让你知道,你的代码里出现了重复引入的情况。");var t={version:"3.18.0.20250816",useVersion:"v2",setUseVersion2:function(){t.useVersion="v2",console.log("提示:自 v2.10 之后的版本默认就是使用V2版本(当前版本为:"+t.version+"), translate.setUseVersion2() 可以不用再加这一行了。当然加了也无所谓,只是加了跟不加是完全一样的。")},translate:null,includedLanguages:"zh-CN,zh-TW,en",resourcesUrl:"//res.zvo.cn/translate",selectLanguageTag:{documentId:"translate",show:!0,languages:"",alreadyRender:!1,selectOnChange:function(n){var a=n.target.value;t.changeLanguage(a)},refreshRender:function(){let n=document.getElementById(t.selectLanguageTag.documentId+"SelectLanguage");n&&n.parentNode.removeChild(n),t.selectLanguageTag.alreadyRender=!1,t.selectLanguageTag.render()},customUI:function(n){var a=function(c){t.selectLanguageTag.selectOnChange(c)},s=document.createElement("select");s.id=t.selectLanguageTag.documentId+"SelectLanguage",s.className=t.selectLanguageTag.documentId+"SelectLanguage";for(var r=t.language.getCurrent(),l=0;l<n.length;l++){var u=document.createElement("option");if(u.setAttribute("value",n[l].id),t.selectLanguageTag.languages.length>0){var d=(","+t.selectLanguageTag.languages+",").toLowerCase();if(d.indexOf(","+n[l].id.toLowerCase()+",")<0)continue}r!=null&&typeof r<"u"&&r.length>0?r==n[l].id&&u.setAttribute("selected","selected"):n[l].id==t.language.getLocal()&&u.setAttribute("selected","selected"),u.appendChild(document.createTextNode(n[l].name)),s.appendChild(u)}window.addEventListener?s.addEventListener("change",a,!1):s.attachEvent("onchange",a),document.getElementById(t.selectLanguageTag.documentId).appendChild(s)},render:function(){if(!t.selectLanguageTag.alreadyRender&&(t.selectLanguageTag.alreadyRender=!0,!!t.selectLanguageTag.show)){if(document.getElementById(t.selectLanguageTag.documentId)==null){var n=document.getElementsByTagName("body");if(n.length==0){console.log("body tag not find, translate.selectLanguageTag.render() is not show Select Language");return}var a=n[0],s=document.createElement("div");s.id=t.selectLanguageTag.documentId,a.appendChild(s)}else if(document.getElementById(t.selectLanguageTag.documentId+"SelectLanguage")!=null)return;typeof t.request.api.language=="string"&&t.request.api.language.length>0?t.request.post(t.request.api.language,{},function(r){if(r.result==0){console.log("load language list error : "+r.info);return}t.selectLanguageTag.customUI(r.list)},null):typeof t.request.api.language=="object"&&t.selectLanguageTag.customUI(t.request.api.language)}}},localLanguage:"zh-CN",googleTranslateElementInit:function(){var n="";document.getElementById("translate")!=null&&(n="translate"),t.translate=new google.translate.TranslateElement({pageLanguage:"zh-CN",includedLanguages:t.selectLanguageTag.languages,layout:0},n)},execute_v1:function(){console.log("=====ERROR======"),console.log("The v1 version has been discontinued since 2022. Please use the latest V3 version and refer to: http://translate.zvo.cn/41162.html")},setCookie:function(n,a){var s=n+"="+escape(a);document.cookie=s},getCookie:function(n){for(var a=document.cookie,s=a.split("; "),r=0;r<s.length;r++){var l=s[r].split("=");if(l[0]==n)return unescape(l[1])}return""},currentLanguage:function(){var n=t.getCookie("googtrans");return n.length>0?n.substr(n.lastIndexOf("/")+1,n.length-1):t.localLanguage},changeLanguage:function(n){var a=",en,de,hi,lt,hr,lv,ht,hu,zh-CN,hy,uk,mg,id,ur,mk,ml,mn,af,mr,uz,ms,el,mt,is,it,my,es,et,eu,ar,pt-PT,ja,ne,az,fa,ro,nl,en-GB,no,be,fi,ru,bg,fr,bs,sd,se,si,sk,sl,ga,sn,so,gd,ca,sq,sr,kk,st,km,kn,sv,ko,sw,gl,zh-TW,pt-BR,co,ta,gu,ky,cs,pa,te,tg,th,la,cy,pl,da,tr,";if(a.indexOf(","+n+",")>-1){console.log("您使用的是v1版本的切换语种方式,v1已在2021年就以废弃,请更换为v2,参考文档: http://translate.zvo.cn/41549.html"),t.check();var s="/"+t.localLanguage+"/"+n,r=document.location.host.split(".");if(r.length>2){var l=r[r.length-2]+"."+r[r.length-1];document.cookie="googtrans=;expires="+new Date(1)+";domain="+l+";path=/",document.cookie="googtrans="+s+";domain="+l+";path=/"}t.setCookie("googtrans",""+s),t.refreshCurrentPage();return}if(t.useVersion="v2",t.to!=null&&t.to.length>0&&t.to!=t.language.getLocal())var u=!0;t.to=n,t.storage.set("to",n);try{window.self!==window.top&&typeof window.parent.translate=="object"&&typeof window.parent.translate.version=="string"&&window.parent.translate.language.getCurrent()!=n&&window.parent.translate.changeLanguage(n)}catch(d){console.log(d)}if(u)location.reload();else{t.execute();const d=document.querySelectorAll("iframe");for(let c=0;c<d.length;c++){const h=d[c].contentWindow;try{typeof h.translate=="object"&&typeof h.translate.version=="string"&&h.translate.to!=n&&(h.translate.to=n,h.translate.storage.set("to",n),h.translate.execute())}catch(p){console.log(p)}}}t.listener.use==!0&&t.listener.isStart==!1&&typeof t.listener.start<"u"&&t.listener.start()},check:function(){window.location.protocol=="file:"&&console.log(`\r
---WARNING----\r
translate.js 主动翻译组件自检异常,当前协议是file协议,翻译组件要在正常的线上http、https协议下才能正常使用翻译功能\r
------------`)},to:"",autoDiscriminateLocalLanguage:!1,documents:[],inProgressNodes:[],ignore:{tag:["style","script","link","pre","code"],class:["ignore","translateSelectLanguage"],id:[],isIgnore:function(n){if(n==null||typeof n>"u")return!1;for(var a=n,s=100;s-- >0;){if(a==null||typeof a>"u")return!1;var r=t.element.getNodeName(a).toLowerCase();if(r.length>0){if(r=="body"||r=="html"||r=="#document")return!1;if(t.ignore.tag.indexOf(r)>-1)return!0}if(a.className!=null){var l=a.className;if(l==null||typeof l!="string")continue;l=l.trim().split(" ");for(var u=0;u<l.length;u++)if(l[u]!=null&&l[u].trim().length>0&&t.ignore.class.indexOf(l[u])>-1)return!0}if(a.id!=null&&typeof a.id<"u"&&t.ignore.id.indexOf(a.id)>-1)return!0;a=a.parentNode}return!1},text:[],textRegex:[],setTextRegexs:function(n){if(!Array.isArray(n))throw new Error("参数必须为数组");for(let a=0;a<n.length;a++)if(!(n[a]instanceof RegExp))throw new Error("第"+a+"项不是RegExp对象");this.textRegex=this.textRegex.concat(n)}},refreshCurrentPage:function(){location.reload()},nomenclature:{data:new Array,old_Data:[],set:function(n){alert("请将 translate.nomenclature.set 更换为 append,具体使用可参考: https://github.com/xnx3/translate ")},append:function(n,a,s){typeof t.nomenclature.data[n]>"u"&&(t.nomenclature.data[n]=new Array),typeof t.nomenclature.data[n][a]>"u"&&(t.nomenclature.data[n][a]=new Array);for(var r=s.split(`
`),l=0;l<r.length;l++){var u=r[l].trim();if(!(u.length<1)){var d=u.split("=");if(d.length==2){var c=d[0].trim(),f=d[1].trim();c.length==0||f.length==0||(t.nomenclature.data[n][a][c]=f)}}}t.nomenclature.data[n][a]=t.util.objSort(t.nomenclature.data[n][a])},get:function(){return t.nomenclature.data},dispose:function(n){if(n==null||n.length==0||typeof t.nomenclature.data[t.language.getLocal()]>"u"||typeof t.nomenclature.data[t.language.getLocal()][t.to]>"u")return n;for(var a in t.nomenclature.data[t.language.getLocal()][t.to])if(t.nomenclature.data[t.language.getLocal()][t.to].hasOwnProperty(a)){var s=t.nomenclature.data[t.language.getLocal()][t.to][a];if(typeof s!="function"){var r=n.indexOf(a);if(r>-1)if(t.language.getLocal()=="english"){var l="";if(r!=0){l=n.substr(r-1,1);var u=t.language.getCharLanguage(l);if(u=="english"||u=="romance")continue}var d="";if(r+a.length!=n.length){d=n.substr(r+a.length,1);var u=t.language.getCharLanguage(d);if(u=="english"||u=="romance")continue}n=n.replace(new RegExp(l+a+d,"g"),l+s+d)}else n=n.replace(new RegExp(a,"g"),s)}}return n}},office:{export:function(){if(t.language.getLocal()==t.language.getCurrent()){alert("本地语种跟要翻译的语种一致,无需导出");return}var n="";for(var a in t.nodeQueue)if(t.nodeQueue.hasOwnProperty(a)){t.nodeQueue[a];for(var s in t.nodeQueue[a].list)if(t.nodeQueue[a].list.hasOwnProperty(s)&&!(typeof s!="string"||s.length<1))for(var r in t.nodeQueue[a].list[s])t.nodeQueue[a].list[s].hasOwnProperty(r)&&(n=n+`
`+t.nodeQueue[a].list[s][r].original+"="+t.storage.get("hash_"+t.language.getCurrent()+"_"+r))}n.length>0?(n="translate.office.append('"+t.language.getCurrent()+"',`"+n+"\n`);",t.util.loadMsgJs(),msg.popups({text:'<textarea id="msgPopupsTextarea" style="width:100%; height:100%; color: black; padding: 8px;">loaing...</textarea>',width:"750px",height:"600px",padding:"1px"}),document.getElementById("msgPopupsTextarea").value=n):msg.alert("无有效内容!")},showPanel:function(){let n=document.createElement("div");n.setAttribute("id","translate_export"),n.setAttribute("class","ignore");let a=document.createElement("button");a.onclick=function(){t.office.export()},a.innerHTML="导出配置信息",a.setAttribute("style","margin-left: 72px; margin-top: 30px; margin-bottom: 20px; font-size: 25px; background-color: blue; padding: 15px; padding-top: 3px; padding-bottom: 3px; border-radius: 3px;"),n.appendChild(a);let s=document.createElement("div");s.innerHTML='1. 首先将当前语种切换为你要翻译的语种<br/>2. 点击导出按钮,将翻译的配置信息导出<br/>3. 将导出的配置信息粘贴到代码中,即可完成<br/><a href="asd" target="_black" style="color: aliceblue;">点此进行查阅详细使用说明</a>',s.setAttribute("style","font-size: 14px; padding: 12px;"),n.appendChild(s),n.setAttribute("style","background-color: black; color: #fff; width: 320px; height: 206px; position: fixed; bottom: 50px; right: 50px;"),document.body.appendChild(n),t.util.loadMsgJs()},append:function(n,a){for(var s=a.split(`
`),r=0;r<s.length;r++){var l=s[r].trim();if(!(l.length<1)){var u=l.split("=");if(u.length==2){var d=u[0],c=u[1];d.length==0||c.length==0||t.storage.set("hash_"+n+"_"+t.util.hash(d),c)}}}},fullExtract:{set:async function(n,a,s,r){if(typeof t.storage.IndexedDB>"u"){console.log("ERROR: translate.storage.IndexedDB not find");return}var l=await t.storage.IndexedDB.get("hash_"+n);typeof l>"u"&&l==null&&(l={originalText:a}),l[s]=r,await t.storage.IndexedDB.set("hash_"+n,l)},export:async function(n){if(typeof t.storage.IndexedDB>"u"){console.log("ERROR: translate.storage.IndexedDB not find");return}if(typeof n!="string"){console.log('error : to param not find, example: "english"');return}var a="translate.office.append('",s=await t.storage.IndexedDB.list("hash_*");for(var r in s)if(s.hasOwnProperty(r)){var l=s[r].value.originalText.replace(/\n/g,"\\n").replace(/\t/g,"\\t");a=a+`
`+l+"="+s[r].value.english.replace(/\n/g,"\\n").replace(/\t/g,"\\t")}a=a+"\n`);";const u=new Blob([a],{type:"text/plain"}),d=URL.createObjectURL(u),c=document.createElement("a");c.href=d,c.download=n+".txt",c.click(),URL.revokeObjectURL(d)},isUse:!1}},setAutoDiscriminateLocalLanguage:function(){t.autoDiscriminateLocalLanguage=!0},nodeQueue:{},setDocuments:function(n){n==null||typeof n>"u"||(typeof n.length>"u"?t.documents[0]=n:t.documents=n,t.nodeQueue={})},getDocuments:function(){if(t.documents!=null&&typeof t.documents<"u"&&t.documents.length>0)return t.documents;var n=new Array;return n[0]=document.documentElement,n},listener:{isStart:!1,use:!1,start:function(){t.listener.use=!0,t.temp_linstenerStartInterval=setInterval(function(){if(document.readyState=="complete"){if(clearInterval(t.temp_linstenerStartInterval),t.language.getCurrent()==t.language.getLocal()&&!t.language.translateLocal)return;t.listener.addListener()}},300)},ignoreNode:[],translateExecuteNodeIgnoreExpireTime:1e3,addIgnore:function(n,a,s){let r="";typeof n=="string"?r=n:r=o.uuid(n),t.listener.ignoreNode[r]={addtime:Date.now()+a,text:s}},refreshIgnoreNode:function(){var n=Date.now();for(const a in t.listener.ignoreNode)t.listener.ignoreNode[a].addtime<n&&delete t.listener.ignoreNode[a]},addListener:function(){if(t.listener.isStart==!0){console.log("translate.listener.start() 已经启动了,无需再重复启动监听,增加浏览器负担");return}t.listener.isStart=!0,t.listener.config={attributes:!0,childList:!0,subtree:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0},t.listener.callback=function(r,l){var u=[];for(let v of r){let y=[];v.type==="childList"?v.addedNodes.length>0?y=v.addedNodes:v.removedNodes.length>0:v.type==="attributes"||v.type==="characterData"&&(y=[v.target]);for(let T of y){for(var d=!1,c=0;c<u.length;c++)if(u[c].isSameNode(T)){d=!0;break}if(d)break;u.push.apply(u,[T])}}if(u.length>0){var f=[];for(let v of u){for(var h=!1,p=0;p<t.inProgressNodes.length;p++)if(t.inProgressNodes[p].node.isSameNode(v)){h=!0;break}if(h)continue;let y=o.uuid(v);typeof t.listener.ignoreNode[y]<"u"&&t.listener.ignoreNode[y].addtime>Date.now()&&typeof v.nodeValue=="string"&&v.nodeValue==t.listener.ignoreNode[y].text||f.push(v)}if(f.length<1)return;t.execute(f)}},t.listener.observer=new MutationObserver(t.listener.callback);for(var n=t.getDocuments(),a=0;a<n.length;a++){var s=n[a];s!=null&&t.listener.observer.observe(s,t.listener.config)}},renderTaskFinish:function(n){},execute:{renderStartByApi:[],renderStartByApiRun:function(n,a,s){for(var r=0;r<t.listener.execute.renderStartByApi.length;r++)try{t.listener.execute.renderStartByApi[r](n,a,s)}catch(l){console.log(l)}},renderFinishByApi:[],renderFinishByApiRun:function(n,a,s){for(var r=0;r<t.listener.execute.renderFinishByApi.length;r++)try{t.listener.execute.renderFinishByApi[r](n,a,s)}catch(l){console.log(l)}}}},renderTask:class{constructor(){this.taskQueue=[],this.nodes=[]}add(n,a,s,r){var l=t.element.nodeAnalyse.get(n,r),u=t.util.hash(l.text);typeof this.nodes[u]>"u"&&(this.nodes[u]=new Array),this.nodes[u].push(n);var d=this.taskQueue[u];(d==null||typeof d>"u")&&(d=new Array);var c=new Array;a.substr(0,1)==" "&&s.substr(0,1)!=" "&&(s=" "+s),a.substr(a.length-1,1)===" "&&s.substr(0,1)!=" "&&(s=s+" "),c.originalText=a,c.resultText=s,c.attribute=r,d.push(c),this.taskQueue[u]=d}execute(){for(var n in this.taskQueue)if(this.taskQueue.hasOwnProperty(n)){var a=this.taskQueue[n];typeof a!="function"&&(a.sort((f,h)=>h.originalText.length-f.originalText.length),this.taskQueue[n]=a)}t.listener.refreshIgnoreNode();for(var n in this.nodes)if(this.nodes.hasOwnProperty(n))for(var a=this.taskQueue[n],s=0;s<this.nodes[n].length;s++)for(var r=0;r<a.length;r++){var l=a[r];if(typeof a!="function"){var u=this.nodes[n][r];setTimeout(function(p){for(var v=0;v<t.inProgressNodes.length;v++)if(t.inProgressNodes[v].node.isSameNode(p)){t.inProgressNodes[v].number=t.inProgressNodes[v].number-1,t.inProgressNodes[v].number<1&&t.inProgressNodes.splice(v,1);break}},50,u);var d=t.element.nodeAnalyse.set(this.nodes[n][r],l.originalText,l.resultText,l.attribute);t.listener.addIgnore(this.nodes[n][r],t.listener.translateExecuteNodeIgnoreExpireTime,d.resultText)}}if(typeof this.taskQueue<"u"&&Object.keys(this.taskQueue).length>0){var c=this;setTimeout(function(){for(var f in c.nodes)if(c.nodes.hasOwnProperty(f)){for(var h in c.nodes[f])if(c.nodes[f].hasOwnProperty(h)){var p=t.element.nodeAnalyse.get(c.nodes[f][h]),v=o.uuid(p.node);v.length!=0&&(t.nodeHistory[v]={},t.nodeHistory[v].node=p.node,t.whole.isWhole(p.node)?t.nodeHistory[v].translateText=c.taskQueue[f][h].resultText:t.nodeHistory[v].translateText=p.text)}}t.listener.renderTaskFinish(c)},50)}}},state:0,waitingExecute:{use:!0,queue:[],add:function(n){t.waitingExecute.queue.push(n);let a=setInterval(function(){if(t.state==0){clearInterval(a);var s=t.waitingExecute.get();t.execute(s)}},500)},get:function(){return t.waitingExecute.queue.length>0?t.waitingExecute.queue.shift():(console.log("警告, translate.waitingExecute.get 出现异常,quque已空,但还往外取。"),null)},isAllExecuteFinish:function(n,a,s){t.listener.execute.renderFinishByApiRun(n,a,s);for(var r in t.translateRequest[n])if(t.translateRequest[n].hasOwnProperty(r)){for(var l=0;l<t.translateRequest[n][r].length;l++)if(t.translateRequest[n][r][l].executeFinish==0)return}t.lifecycle.execute.renderFinish_Trigger(n,s),t.state=0,t.executeNumber++}},executeNumber:0,lifecycle:{execute:{start:[],start_Trigger:function(n,a){for(var s=0;s<t.lifecycle.execute.start.length;s++)try{t.lifecycle.execute.start[s](n,a)}catch(r){console.log(r)}},start_old:[],startRun:function(n,a,s){for(var r=0;r<t.listener.execute.renderStartByApi.length;r++)try{t.listener.execute.renderStartByApi[r](n,a,s)}catch(l){console.log(l)}},scanNodesFinsh:[],translateNetworkBefore:[],translateNetworkBefore_Trigger:function(n,a,s,r){for(var l=0;l<t.lifecycle.execute.translateNetworkBefore.length;l++)try{t.lifecycle.execute.translateNetworkBefore[l](n,a,s,r)}catch(u){console.log(u)}},translateNetworkAfter:[],renderFinish:[function(n,a){typeof t.visual<"u"&&t.visual.adjustTranslationSpacesByNodequeueUuid(n)}],renderFinish_Trigger:function(n,a){for(var s=0;s<t.lifecycle.execute.renderFinish.length;s++)try{t.lifecycle.execute.renderFinish[s](n,a)}catch(r){console.log(r)}}}},execute:function(n){if(t.waitingExecute.use&&t.state!=0){console.log("当前翻译还未完结,新的翻译任务已加入等待翻译队列中,待翻译结束后便会执行当前翻译任务。"),t.waitingExecute.add(n);return}t.state=1,typeof n<"u"&&(t.useVersion="v2"),t.useVersion=="v1"&&(console.log("提示:https://github.com/xnx3/translate 在 v2.5 版本之后,由于谷歌翻译调整,免费翻译通道不再支持,所以v1版本的翻译接口不再被支持,v1全线下架。考虑到v1已不能使用,当前已自动切换到v2版本。如果您使用中发现什么异常,请针对v2版本进行适配。"),t.useVersion="v2");try{t.init()}catch{}var a=t.util.uuid();if(t.to==null||t.to==""){var s=t.storage.get("to");s!=null&&typeof s<"u"&&s.length>0&&(t.to=s)}try{t.selectLanguageTag.render()}catch(he){console.log(he)}if(t.to==null||typeof t.to>"u"||t.to.length==0)if(t.autoDiscriminateLocalLanguage)t.executeByLocalLanguage();else{t.state=0;return}if(t.to==t.language.getLocal()&&!t.language.translateLocal){t.state=0;return}t.lifecycle.execute.start_Trigger(a,t.to),t.images.execute();var r;typeof n<"u"&&n!=null?typeof n.length>"u"?(r=new Array,r[0]=n):r=n:r=t.getDocuments(),r.length>500&&(console.log("------tip------"),console.log("translate.execute( docs ) 传入的docs.length 过大,超过500,这很不正常,当前 docs.length : "+r.length+" ,如果你感觉真的没问题,请联系作者 http://translate.zvo.cn/43006.html 说明情况,根据你的情况进行分析。 当前只取前500个元素进行翻译"));try{for(var l in t.element.tagAttribute)if(t.element.tagAttribute.hasOwnProperty(l)&&t.element.tagAttribute[l]instanceof Array){var u=t.element.tagAttribute[l];t.element.tagAttribute[l]={attribute:u,condition:function(he){return!0}}}}catch(he){console.log(he)}for(var d=0;d<r.length&d<500;d++){var c=r[d];t.element.whileNodes(a,c)}if(t.language.translateLanguagesRange.length>0)for(var f in t.nodeQueue[a].list)t.nodeQueue[a].list.hasOwnProperty(f)&&t.language.translateLanguagesRange.indexOf(f)<0&&delete t.nodeQueue[a].list[f];typeof t.nodeQueue[a]>"u"&&(t.nodeQueue[a]=new Array,t.nodeQueue[a].list=[],console.log("--- translate.js warn tip 警告!! ---"),console.log("您使用translate.js时可能放的位置不对,不要吧 translate.js 放在网页最顶部,这样当 translate.js 进行执行,也就是 translate.execute() 执行时,因为网页是从上往下加载,它放在网页最顶部,那么它执行时网页后面的内容都还没加载出来,这个是不会获取到网页任何内容的,也就是它是不起任何作用的"));for(var f in t.nodeQueue[a].list)if(t.nodeQueue[a].list.hasOwnProperty(f)){for(var h in t.nodeQueue[a].list[f])if(t.nodeQueue[a].list[f].hasOwnProperty(h)&&typeof t.nodeQueue[a].list[f][h]!="function"&&!(typeof t.nodeQueue[a].list[f][h].nodes>"u"||typeof t.nodeQueue[a].list[f][h].nodes.length>"u")){for(var p=t.nodeQueue[a].list[f][h].nodes.length-1;p>-1;p--){var v=t.element.nodeAnalyse.get(t.nodeQueue[a].list[f][h].nodes[p].node),y=o.uuid(v.node);typeof t.nodeHistory[y]<"u"&&t.nodeHistory[y].translateText==v.text&&t.nodeQueue[a].list[f][h].nodes.splice(p,1)}t.nodeQueue[a].list[f][h].nodes.length==0&&delete t.nodeQueue[a].list[f][h]}Object.keys(t.nodeQueue[a].list[f]).length==0&&delete t.nodeQueue[a].list[f]}var T={},k={},$={},B=[];for(var f in t.nodeQueue[a].list){if(!t.nodeQueue[a].list.hasOwnProperty(f)||f==null||typeof f>"u"||f.length==0||f=="undefined")continue;T[f]=[],k[f]=[];let S=new t.renderTask;$[f]=[];for(var h in t.nodeQueue[a].list[f])if(t.nodeQueue[a].list[f].hasOwnProperty(h)&&typeof t.nodeQueue[a].list[f][h]!="function"){var w=t.nodeQueue[a].list[f][h].original,M=t.nodeQueue[a].list[f][h].translateText,H=w==M?h:t.util.hash(M);t.nodeQueue[a].list[f][h].cacheHash=H;var W=t.storage.get("hash_"+t.to+"_"+H);if(W!=null&&W.length>0){for(var D=0;D<t.nodeQueue[a].list[f][h].nodes.length;D++){for(var I=t.nodeQueue[a].list[f][h].nodes[D].node,ee=!1,K=0;K<t.inProgressNodes.length;K++)t.inProgressNodes[K].node.isSameNode(I)&&(t.inProgressNodes[K].number++,ee=!0);ee||t.inProgressNodes.push({node:I,number:1});var V=t.nodeQueue[a].list[f][h].nodes[D].beforeText+W+t.nodeQueue[a].list[f][h].nodes[D].afterText;S.add(t.nodeQueue[a].list[f][h].nodes[D].node,w,V,t.nodeQueue[a].list[f][h].nodes[D].attribute);for(var ne=-1,d=0;d<$[f].length;d++)if(t.nodeQueue[a].list[f][h].nodes[D].node.isSameNode($[f][d].node)){ne=d;break}for(var oe=-1,d=0;d<B.length;d++)if(t.nodeQueue[a].list[f][h].nodes[D].node.isSameNode(B[d].node)){oe=d;break}ne==-1&&(ne=$[f].length,$[f][ne]={},$[f][ne].node=t.nodeQueue[a].list[f][h].nodes[D].node,$[f][ne].array=[]),oe==-1&&(oe=B.length,B[oe]={},B[oe].node=t.nodeQueue[a].list[f][h].nodes[D].node,B[oe].array=[]);var X=$[f][ne].array.length;$[f][ne].array[X]=V;var re=B[oe].array.length;B[oe].array[re]=V}continue}T[f].push(M),k[f].push(h)}S.execute()}if(typeof t.request.api.translate!="string"||t.request.api.translate==null||t.request.api.translate.length<1){t.state=0,t.lifecycle.execute.renderFinish_Trigger(a,t.to),t.executeNumber++;return}for(var f in $)if($.hasOwnProperty(f)){for(var se=Object.keys(t.nodeQueue[a].list[f]),F=se.length,d=0;d<$[f].length;d++){for(var R=0;R<B.length;R++)if($[f][d].node.isSameNode(B[R].node)){$[f][d].array=B[R].array;break}$[f][d].array.sort(function(_,A){return A.length-_.length});for(var ie=t.element.nodeAnalyse.get($[f][d].node),Te=ie.text,te=0;te<$[f][d].array.length;te++)$[f][d].array[te]<1||(Te=Te.replace(new RegExp(t.util.regExp.pattern($[f][d].array[te]),"g"),t.util.regExp.resultText(`
`)));for(var le=Te.split(`
`),ve=0;ve<le.length;ve++)le[ve]<1||t.addNodeToQueue(a,ie.node,le[ve])}var xe=Object.keys(t.nodeQueue[a].list[f]),pe=xe.length;if(F-pe!=0)for(var P=0;P<xe.length;P++){var q=xe[P];if(se.indexOf(q)==-1){var Z=t.nodeQueue[a].list[f][q],H=Z.original==Z.translateText?q:t.util.hash(Z.translateText);t.nodeQueue[a].list[f][q].cacheHash=H,T[f].push(Z.translateText),k[f].push(q)}}}var O=[];for(var f in t.nodeQueue[a].list)t.nodeQueue[a].list.hasOwnProperty(f)&&(typeof T[f]>"u"||T[f].length<1||f!=t.to&&O.push(f));if(O.length==0){t.lifecycle.execute.renderFinish_Trigger(a,t.to),t.state=0,t.executeNumber++;return}for(var f in k)if(k.hasOwnProperty(f)&&!(typeof k[f]>"u")&&!(k[f].length<1))for(var Q=0;Q<k[f].length;Q++){var E=k[f][Q];if(typeof t.nodeQueue[a].list[f][E].nodes>"u"||typeof t.nodeQueue[a].list[f][E].nodes.length>"u"){console.log("translate.nodeQueue['"+a+"']['list']['"+f+"']['"+E+"'].nodes.length is null ,理论上不应该存在,进行异常报出,但不影响使用,已容错。");continue}for(var L=0;L<t.nodeQueue[a].list[f][E].nodes.length;L++){for(var I=t.nodeQueue[a].list[f][E].nodes[L].node,ee=!1,K=0;K<t.inProgressNodes.length;K++)t.inProgressNodes[K].node.isSameNode(I)&&(t.inProgressNodes[K].number++,ee=!0);ee||t.inProgressNodes.push({node:I,number:1})}}t.state=20;for(var N in O)if(O.hasOwnProperty(N)){var f=O[N];if(typeof f=="string"){if(typeof T[f]>"u"||T[f].length<1){console.log("异常,理论上不应该存在, lang:"+f+", translateTextArray:"),console.log(T),console.log("你无需担心,这个只是个提示,它并不影响你翻译的正常进行,只是个异常提示而已,它会自动容错处理的,不会影响翻译的使用。"),t.state=0,t.executeNumber++;return}(typeof t.translateRequest[a]>"u"||t.translateRequest[a]==null)&&(t.translateRequest[a]={}),t.translateRequest[a][f]={},t.translateRequest[a][f].executeFinish=0,t.translateRequest[a][f].addtime=Math.floor(Date.now()/1e3),t.listener.execute.renderStartByApiRun(a,f,t.to),t.lifecycle.execute.translateNetworkBefore_Trigger(a,f,t.to,T[f]);var J=t.request.api.translate,de={from:f,to:t.to,text:encodeURIComponent(JSON.stringify(T[f]))};t.request.post(J,de,function(S){if(S.result==0){typeof t.translateRequest[a]=="object"&&typeof t.translateRequest[a][S.from]=="object"?(t.translateRequest[a][S.from].result=2,t.translateRequest[a][S.from].executeFinish=1,t.translateRequest[a][S.from].stoptime=Math.floor(Date.now()/1e3)):console.log("WARINNG!!! translate.translateRequest[uuid][data.from] is not object");var _="";typeof S.from<"u"&&S.from!=null&&(_=S.from);var A="";typeof S.to<"u"&&S.to!=null?A=S.to:A=t.to,t.waitingExecute.isAllExecuteFinish(a,_,A),console.log("=======ERROR START======="),console.log(T[S.from]),console.log("response : "+S.info),console.log("=======ERROR END =======");return}if(typeof t.nodeQueue[a]>"u"){console.log("提示:你很可能多次引入了 translate.js 所以造成了翻译本身的数据错乱,这只是个提示,它还是会给你正常翻译的,但是你最好不要重复引入太多次 translate.js ,正常情况下只需要引入一次 translate.js 就可以了。太多的话很可能会导致你页面卡顿");return}let j=new t.renderTask;for(var me=0;me<k[S.from].length;me++){var ue=S.from,z=S.text[me];if(z!=null){z.toLowerCase().indexOf(T[S.from][me].toLowerCase())>-1&&(z=T[S.from][me]);var ae=k[S.from][me],Me=t.nodeQueue[a].list[ue][ae].cacheHash,Pe="";try{Pe=t.nodeQueue[a].list[ue][ae].original}catch(st){console.log("uuid:"+a+", originalWord:"+Pe+", lang:"+ue+", hash:"+ae+", text:"+z+", queue:"+t.nodeQueue[a]),console.log(st);continue}for(var je=0;je<t.nodeQueue[a].list[ue][ae].nodes.length;je++)j.add(t.nodeQueue[a].list[ue][ae].nodes[je].node,Pe,t.nodeQueue[a].list[ue][ae].nodes[je].beforeText+z+t.nodeQueue[a].list[ue][ae].nodes[je].afterText,t.nodeQueue[a].list[ue][ae].nodes[je].attribute);t.storage.set("hash_"+S.to+"_"+Me,z),t.office.fullExtract.isUse&&t.office.fullExtract.set(ae,Pe,S.to,z)}}j.execute(),t.translateRequest[a][ue].result=1,t.translateRequest[a][ue].executeFinish=1,t.translateRequest[a][ue].stoptime=Math.floor(Date.now()/1e3),setTimeout(function(){t.waitingExecute.isAllExecuteFinish(a,S.from,S.to)},10)},function(S){t.translateRequest[a][S.data.from].executeFinish=1,t.translateRequest[a][S.data.from].stoptime=Math.floor(Date.now()/1e3),t.translateRequest[a][S.data.from].result=3,t.waitingExecute.isAllExecuteFinish(a,S.data.from,t.to)})}}},translateRequest:{},nodeHistory:{},element:{tagAttribute:{},nodeAnalyse:{get:function(n,a){return t.element.nodeAnalyse.analyse(n,"","",a)},set:function(n,a,s,r){return t.element.nodeAnalyse.analyse(n,a,s,r)},analyse:function(n,a,s,r){var l=new Array;l.node=n,l.text="";var u=t.element.getNodeName(n);if(r!=null&&typeof r=="string"&&r.length>0){var d;if(u=="INPUT"&&r.toLowerCase()=="value"?d=n.value:d=n[r],l.text=d,typeof a<"u"&&a.length>0){if(typeof d<"u"){var c=t.util.textReplace(d,a,s,t.to);u=="INPUT"&&r.toLowerCase()=="value"?n.value=c:n[r]=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}var f=n.getAttribute(r);if(f!=null&&typeof f<"u"){var c=t.util.textReplace(f,a,s,t.to);n.setAttribute(r,c),c.indexOf(s)>-1?l.resultText=c:l.resultText=""}}return l}if(u=="#text"&&typeof n.parentNode<"u"){var h=t.element.getNodeName(n.parentNode);h=="TEXTAREA"&&(u="TEXTAREA",n=n.parentNode)}if(u=="INPUT"||u=="TEXTAREA"){if(n.attributes==null||typeof n.attributes>"u")return l.text="",l;if(u=="INPUT"&&typeof n.attributes.type<"u"&&typeof n.attributes.type.nodeValue!=null&&(n.attributes.type.nodeValue.toLowerCase()=="button"||n.attributes.type.nodeValue.toLowerCase()=="submit")){var p=n.attributes.value;if(p!=null&&typeof p<"u"&&typeof p.nodeValue<"u"&&p.nodeValue.length>0){if(typeof a<"u"&&a.length>0){var c=t.util.textReplace(p.nodeValue,a,s,t.to);p.nodeValue=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=p.nodeValue,l.node=p,l}}if(typeof n.attributes.placeholder<"u"){if(typeof a<"u"&&a.length>0){var c=t.util.textReplace(n.attributes.placeholder.nodeValue,a,s,t.to);n.attributes.placeholder.nodeValue=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=n.attributes.placeholder.nodeValue,l.node=n.attributes.placeholder,l}return l.text="",l}if(u=="META"){if(typeof n.name<"u"&&n.name!=null){var v=n.name.toLowerCase(),y=n.getAttribute("property"),T="";if(typeof y<"u"&&y!=null&&y.length>0&&(T=y.toLowerCase()),v=="keywords"||v=="description"||v=="sharetitle"||T=="og:title"||T=="og:description"||T=="og:site_name"||T=="og:novel:latest_chapter_name"){if(typeof a<"u"&&a!=null&&a.length>0){var c=t.util.textReplace(n.content,a,s,t.to);n.content=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=n.content,l}}return l.text="",l}if(u=="IMG"){if(typeof n.alt>"u"||n.alt==null)return l.text="",l;if(typeof a<"u"&&a.length>0){var c=t.util.textReplace(n.alt,a,s,t.to);n.alt=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}return l.text=n.alt,l}if(n.nodeValue==null||typeof n.nodeValue>"u")l.text="";else if(n.nodeValue.trim().length==0)l.text="";else{if(typeof a<"u"&&a!=null&&a.length>0){var c=t.util.textReplace(n.nodeValue,a,s,t.to);n.nodeValue=c,c.indexOf(s)>-1?l.resultText=c:l.resultText=""}l.text=n.nodeValue}return l}},getNodeName:function(n){return n==null||typeof n>"u"||n.nodeName==null||typeof n.nodeName>"u"?"":(n.nodeName,typeof n.nodeName=="string"?n.nodeName:typeof n.tagName=="string"&&n.tagName.length>0?n.tagName:(console.log("warn : get nodeName is null, this node ignore translate. node : "),console.log(n),""))},whileNodes:function(n,a){if(!(a==null||typeof a>"u")){(typeof t.nodeQueue[n]>"u"||t.nodeQueue[n]==null)&&(t.nodeQueue[n]=new Array,t.nodeQueue[n].expireTime=Date.now()+120*1e3,t.nodeQueue[n].list=new Array),typeof a=="object"&&typeof a.title=="string"&&a.title.length>0&&(t.ignore.isIgnore(a)||t.addNodeToQueue(n,a,a.title,"title"));var s=t.element.getNodeName(a).toLowerCase();if(typeof t.element.tagAttribute[s]<"u"){for(var r in t.element.tagAttribute[s].attribute)if(t.element.tagAttribute[s].attribute.hasOwnProperty(r)&&!(typeof t.element.tagAttribute[s].condition<"u"&&!t.element.tagAttribute[s].condition(a))){var l=t.element.tagAttribute[s].attribute[r];if(s=="input"&&l.toLowerCase()=="value")u=a.value;else{var u=a.getAttribute(l);if((typeof u>"u"||u==null)&&(u=a[l]),typeof u>"u"||u==null)continue}t.ignore.isIgnore(a)||t.addNodeToQueue(n,a,u,l)}}var d=a.childNodes;if(!(d==null||typeof d>"u"))if(d.length>0)for(var c=0;c<d.length;c++)t.element.whileNodes(n,d[c]);else t.element.findNode(n,a)}},findNode:function(n,a){if(!(a==null||typeof a>"u")&&a.parentNode!=null){var s=t.element.getNodeName(a.parentNode);if(s!=""&&!(t.ignore.tag.indexOf(s.toLowerCase())>-1)&&!t.ignore.isIgnore(a)){var r=t.element.nodeAnalyse.get(a);r.text.length>0&&t.addNodeToQueue(n,r.node,r.text)}}}},addNodeToQueue:function(n,a,s,r){if(!(a==null||s==null||s.length==0)){var l=t.element.getNodeName(a);if(l.toLowerCase()!="#comment"){if(t.util.hash(s),t.util.findTag(s)){if(a.parentNode==null)return;var u=t.element.getNodeName(a.parentNode);if(u=="SCRIPT"||u=="STYLE")return}var d=new Array;d.push(s);for(var c=0;c<t.ignore.textRegex.length;c++)for(var f=t.ignore.textRegex[c],h=0;h<d.length;h++){var s=d[h],p=s.match(f)||[];t.ignore.text=t.ignore.text.concat(p)}for(var v=0;v<t.ignore.text.length;v++)t.ignore.text[v].trim().length!=0&&(d=t.addNodeToQueueTextAnalysis(n,a,d,r,t.ignore.text[v],t.ignore.text[v]));if(typeof t.temp_nomenclature>"u"&&(t.temp_nomenclature=new Array),typeof t.temp_nomenclature[t.language.getLocal()]>"u"&&(y=new Array),typeof t.nomenclature.data[t.language.getLocal()]<"u"&&typeof t.nomenclature.data[t.language.getLocal()][t.to]<"u"){var y;for(var T in t.nomenclature.data[t.language.getLocal()][t.to])if(t.nomenclature.data[t.language.getLocal()][t.to].hasOwnProperty(T)){var k=t.nomenclature.data[t.language.getLocal()][t.to][T];d=t.addNodeToQueueTextAnalysis(n,a,d,r,T,k),typeof y<"u"&&y.push(T)}typeof t.temp_nomenclature[t.language.getLocal()]>"u"&&(t.temp_nomenclature[t.language.getLocal()]=y)}for(var h=0;h<d.length;h++)d[h].trim().length!=0&&(t.ignore.text.indexOf(d[h].trim())>-1||typeof t.temp_nomenclature[t.language.getLocal()]<"u"&&t.temp_nomenclature[t.language.getLocal()].indexOf(d[h].trim())>-1||t.addNodeToQueueAnalysis(n,a,d[h],r))}}},addNodeToQueueTextAnalysis:function(n,a,s,r,l,u){for(var d=new Array,c=0;c<s.length;c++){var f=s[c];if(f.trim()!=u.trim()){var h=f.indexOf(l);if(h>-1){if(l!=u){var p=h-u.length;p<0&&(p=0);var v=h+u.length;v>f.length&&(v=f.length);var y=f.substring(p,v);if(y.indexOf(u)>-1)continue}l!=u&&t.element.nodeAnalyse.set(a,l,u,r);for(var T=f.split(l),k=0;k<T.length;k++){var $=T[k];$.trim().length!=0&&(s.push($),d.push(f))}}}}if(d.length>0)for(var B=0;B<d.length;B++){let w=s.indexOf(d[B]);w>-1&&s.splice(w,1)}return s},addNodeToQueueAnalysis:function(n,a,s,r){var l=t.language.recognition(s),u=l.languageArray;typeof u[t.to]<"u"&&delete u[t.to];var d=t.whole.isWhole(a);if(d){var c=l.languageName;t.addNodeQueueItem(n,a,s,r,c,"","")}else for(var c in u)if(u.hasOwnProperty(c)){for(var f=0;f<u[c].list.length;f++)if(!(typeof u[c].list[f]>"u"||typeof u[c].list[f].text>"u")){var h=u[c].list[f].text,p=u[c].list[f].beforeText,v=u[c].list[f].afterText;t.addNodeQueueItem(n,a,h,r,c,p,v)}}},addNodeQueueItem:function(n,a,s,r,l,u,d){(t.nodeQueue[n].list[l]==null||typeof t.nodeQueue[n].list[l]>"u")&&(t.nodeQueue[n].list[l]=new Array);var c=t.util.hash(s);(t.nodeQueue[n].list[l][c]==null||typeof t.nodeQueue[n].list[l][c]>"u")&&(t.nodeQueue[n].list[l][c]=new Array,t.nodeQueue[n].list[l][c].nodes=new Array,t.nodeQueue[n].list[l][c].original=s,t.nodeQueue[n].list[l][c].translateText=s);var f=!1;if(typeof a.isSameNode<"u"){for(var h=0;h<t.nodeQueue[n].list[l][c].nodes.length;h++)if(a.isSameNode(t.nodeQueue[n].list[l][c].nodes[h].node)){f=!0;continue}}if(!f){var p=t.nodeQueue[n].list[l][c].nodes.length;t.nodeQueue[n].list[l][c].nodes[p]=new Array,t.nodeQueue[n].list[l][c].nodes[p].node=a,t.nodeQueue[n].list[l][c].nodes[p].attribute=r,t.nodeQueue[n].list[l][c].nodes[p].beforeText=u,t.nodeQueue[n].list[l][c].nodes[p].afterText=d}},whole:{isEnableAll:!1,enableAll:function(){t.whole.isEnableAll=!0},class:[],tag:[],id:[],executeTip:function(){t.whole.class.length==0&&t.whole.tag.length==0&&t.whole.id.length==0||console.log("您开启了 translate.whole 此次行为避开了浏览器端的文本语种自动识别,而是暴力的直接对某个元素的整个文本进行翻译,很可能会产生非常大的翻译量,请谨慎!有关每日翻译字符的说明,可参考: http://translate.zvo.cn/42557.html "),t.whole.tag.indexOf("html")>-1&&console.log("自检发现您设置了 translate.whole.tag 其中有 html ,这个是不生效的,最大只允许设置到 body ")},isWhole:function(n){if(t.whole.isEnableAll)return!0;if(t.whole.class.length==0&&t.whole.tag.length==0&&t.whole.id.length==0&&t.whole.isEnableAll==!1||n==null||typeof n>"u")return!1;for(var a=n,s=100;s-- >0;){if(a==null||typeof a>"u")return!1;var r=t.element.getNodeName(a).toLowerCase();if(r.length>0){if(r=="html"||r=="#document")return!1;if(t.whole.tag.indexOf(r)>-1)return!0}if(a.className!=null){var l=a.className;if(l==null||typeof l!="string")continue;l=l.trim().split(" ");for(var u=0;u<l.length;u++)if(l[u]!=null&&l[u].trim().length>0&&t.whole.class.indexOf(l[u])>-1)return!0}if(a.id!=null&&typeof a.id<"u"&&t.whole.id.indexOf(a.id)>-1)return!0;a=a.parentElement}return!1}},language:{englishVarietys:["french","italian","deutsch","portuguese"],local:"",translateLocal:!1,translateLanguagesRange:[],setLocal:function(n){t.useVersion="v2",t.language.local=n},getLocal:function(){return(t.language.local==null||t.language.local.length<1)&&t.language.autoRecognitionLocalLanguage(),t.language.local},getCurrent:function(){var n=t.storage.get("to");return n!=null&&typeof n<"u"&&n.length>0?n:t.language.getLocal()},setDefaultTo:function(n){var a=t.storage.get("to");a!=null&&typeof a<"u"&&a.length>0||(t.storage.set("to",n),t.to=n)},clearCacheLanguage:function(){typeof t.language.setUrlParamControl_use<"u"&&t.language.setUrlParamControl_use&&(console.log("使用提示:"),console.log("translate.language.setUrlParamControl(...) 的作用是 可以通过URL传一个语种,来指定当前页面以什么语种显示。 参考文档: http://translate.zvo.cn/4075.html"),console.log("translate.language.clearCacheLanguage() 是清除历史翻译语种缓存,也就是清除之前指定翻译为什么语种。 参考文档:http://translate.zvo.cn/4080.html"),console.log("如果你执行了 translate.language.setUrlParamControl(...) 那么是要根据url传参来切换语种的,但是后面又出现了 translate.language.clearCacheLanguage() 它会阻止 translate.language.setUrlParamControl(...) 它的设置,即使有url传递翻译为什么语言,也会因为 translate.language.clearCacheLanguage() 给清除掉,使URL传参的语种不起任何作用。")),t.to="",t.storage.set("to","")},setUrlParamControl:function(n){t.language.setUrlParamControl_use=!0,(typeof n>"u"||n.length<1)&&(n="language");var a=t.util.getUrlParam(n);typeof a>"u"||a==""||a=="null"||a=="undefined"||(t.storage.set("to",a),t.to=a)},getTranslateAreaText:function(){var n="",a=document.createElement("div");if(t.documents!=null&&typeof t.documents<"u"&&t.documents.length>0)for(var s=0;s<t.documents.length;s++){var r=t.documents[s];typeof r<"u"&&r!=null&&typeof r.innerText<"u"&&r.innerText!=null&&r.innerText.length>0&&a.appendChild(r.cloneNode(!0))}else typeof document.head<"u"&&a.appendChild(document.head.cloneNode(!0)),typeof document.body<"u"&&a.appendChild(document.body.cloneNode(!0));for(var l=0;l<t.ignore.tag.length;l++)for(var u=t.ignore.tag[l],d=a.querySelectorAll(u),c=Array.prototype.slice.call(d),f=0;f<c.length;f++){var h=c[f];h.parentNode&&h.parentNode.removeChild(h)}if(n=a.innerText,n==null||typeof n>"u"||n.length<1){t.language.local="chinese_simplified";return}return n=n.replace(/\s/g,""),n},autoRecognitionLocalLanguage:function(){if(t.language.local!=null&&t.language.local.length>2)return t.language.local;var n=t.language.getTranslateAreaText();t.language.local="chinese_simplified";var a=t.language.recognition(n);return t.language.local=a.languageName,t.language.local},get:function(n){for(var a=new Array,s=new Array,r=[],l=[],u=0;u<n.length;u++){var d=n.charAt(u),c=t.language.getCharLanguage(d);c==""&&(c="unidentification");var f=t.language.analyse(c,s,r,l,d);s=f.langStrs,typeof r.language<"u"&&(l.language=r.language,l.charstr=r.charstr,l.storage_language=r.storage_language),r.language=f.storage_language,r.charstr=d,r.storage_language=f.storage_language,a.push(c)}return typeof s.unidentification<"u"&&delete s.unidentification,typeof s.specialCharacter<"u"&&delete s.specialCharacter,typeof s.number<"u"&&delete s.number,s},recognitionAlgorithm:function(n,a,s,r){if(typeof s.english<"u"&&typeof s.romance<"u"&&a.languageName=="english"&&s.romance/s.english>.008&&(typeof t.language.local<"u"&&t.language.local.length>1&&t.language.englishVarietys.indexOf(t.language.local)>-1&&(a.languageName=t.language.local),a.languageName=="english")){var l=t.language.romanceSentenceAnaly(n);l.length==0?console.log("语种识别异常,应该是 法语、西班牙语、葡萄牙语、意大利语 中的一种才是,除非是除了这四种语种之外的别的 罗曼语族 中的语种,当前已将 "+n+"识别为英语。 你可以联系我们求助 https://translate.zvo.cn/4030.html"):a.languageName=l}if(typeof s.japanese<"u"&&a.languageName!="japanese"&&s.japanese/r>.08&&(a.languageName="japanese"),(typeof s.chinese_simplified<"u"||typeof s.chinese_traditional<"u")&&typeof s.english<"u"&&a.languageName=="english"){var u=0;typeof s.chinese_simplified<"u"&&(u=u+s.chinese_simplified),typeof s.chinese_traditional<"u"&&(u=u+s.chinese_traditional),u/s.english>.05&&(a.languageName="chinese_simplified")}return typeof s.chinese_simplified<"u"&&typeof s.chinese_traditional<"u"&&a.languageName=="chinese_simplified"&&s.chinese_traditional/s.chinese_simplified>.03&&(a.languageName="chinese_traditional"),a},recognition:function(n){var a=t.language.get(n),s=[],r=[],l=0;for(var u in a)if(a.hasOwnProperty(u)&&typeof a[u]=="object"){for(var d=0,c=0;c<a[u].length;c++)d=d+a[u][c].text.length;l=l+d,s[u]=d,r[u]=d}var f="",h=0;for(var p in s)s.hasOwnProperty(p)&&s[p]>h&&(f=p,h=s[p]);var v={};for(var p in a)a.hasOwnProperty(p)&&(v[p]={},v[p].number=r[p],v[p].list=a[p]);var y={languageName:f,languageArray:v};return t.language.recognitionAlgorithm(n,y,s,l)},getCharLanguage:function(n){if(n==null||typeof n>"u")return"";if(this.russian(n))return"russian";if(this.english(n))return"english";if(this.romance(n))return"romance";if(this.specialCharacter(n))return"specialCharacter";if(this.number(n))return"number";var a=this.chinese(n);return a=="simplified"?"chinese_simplified":a=="traditional"?"chinese_traditional":this.japanese(n)?"japanese":this.korean(n)?"korean":this.greek(n)?"greek":this.thai(n)?"thai":this.arabic(n)?"arabic":this.romanian(n)?"romanian":this.hebrew(n)?"hebrew":""},analyse:function(n,a,s,r,l){typeof a[n]>"u"&&(a[n]=new Array);var u=0;typeof s.storage_language>"u"||(t.language.connector(l)&&(n=s.storage_language),s.storage_language==n?u=a[n].length-1:u=a[n].length),typeof a[n][u]>"u"&&(a[n][u]=new Array,a[n][u].beforeText="",a[n][u].afterText="",a[n][u].text=""),a[n][u].text=a[n][u].text+l,t.language.wordBlankConnector(t.language.getLocal())==!1&&t.language.wordBlankConnector(t.to)&&s.storage_language!=null&&typeof s.storage_language<"u"&&s.storage_language.length>0&&s.storage_language!="specialCharacter"&&(t.language.wordBlankConnector(s.storage_language)==!1&&t.language.wordBlankConnector(n)?a[s.storage_language][a[s.storage_language].length-1].afterText=" ":s.storage_language=="english"&&n!="english"&&(a[n][u].beforeText=" "));var d=new Array;return d.langStrs=a,d.storage_language=n,d},connector:function(n){return!!(/.*[\u0020\u00A0\u202F\u205F\u3000]+.*$/.test(n)||/.*[\u0030-\u0039]+.*$/.test(n)||/.*[\u0021\u0022\u0023\u0024\u0025\u0026\u0027\u002C\u002D\u002E\u003A\u003B\u003F\u0040]+.*$/.test(n)||/.*[\u3002\uFF1F\uFF01\uFF0C\u3001\uFF1B\uFF1A\u300C\u300D\u300E\u300F\u2018\u2019\u201C\u201D\uFF08\uFF09\u3014\u3015\u3010\u3011\u2014\u2026\u2013\uFF0E\u300A\u300B\u3008\u3009\u00b7]+.*$/.test(n))},wordBlankConnector:function(n){if(n==null||typeof n>"u")return!0;switch(n.trim().toLowerCase()){case"chinese_simplified":return!1;case"chinese_traditional":return!1;case"korean":return!1;case"japanese":return!1}return!0},chinese_traditional_dict:"皚藹礙愛翺襖奧壩罷擺敗頒辦絆幫綁鎊謗剝飽寶報鮑輩貝鋇狽備憊繃筆畢斃閉邊編貶變辯辮鼈癟瀕濱賓擯餅撥缽鉑駁蔔補參蠶殘慚慘燦蒼艙倉滄廁側冊測層詫攙摻蟬饞讒纏鏟産闡顫場嘗長償腸廠暢鈔車徹塵陳襯撐稱懲誠騁癡遲馳恥齒熾沖蟲寵疇躊籌綢醜櫥廚鋤雛礎儲觸處傳瘡闖創錘純綽辭詞賜聰蔥囪從叢湊竄錯達帶貸擔單鄲撣膽憚誕彈當擋黨蕩檔搗島禱導盜燈鄧敵滌遞締點墊電澱釣調諜疊釘頂錠訂東動棟凍鬥犢獨讀賭鍍鍛斷緞兌隊對噸頓鈍奪鵝額訛惡餓兒爾餌貳發罰閥琺礬釩煩範販飯訪紡飛廢費紛墳奮憤糞豐楓鋒風瘋馮縫諷鳳膚輻撫輔賦複負訃婦縛該鈣蓋幹趕稈贛岡剛鋼綱崗臯鎬擱鴿閣鉻個給龔宮鞏貢鈎溝構購夠蠱顧剮關觀館慣貫廣規矽歸龜閨軌詭櫃貴劊輥滾鍋國過駭韓漢閡鶴賀橫轟鴻紅後壺護滬戶嘩華畫劃話懷壞歡環還緩換喚瘓煥渙黃謊揮輝毀賄穢會燴彙諱誨繪葷渾夥獲貨禍擊機積饑譏雞績緝極輯級擠幾薊劑濟計記際繼紀夾莢頰賈鉀價駕殲監堅箋間艱緘繭檢堿鹼揀撿簡儉減薦檻鑒踐賤見鍵艦劍餞漸濺澗漿蔣槳獎講醬膠澆驕嬌攪鉸矯僥腳餃繳絞轎較稭階節莖驚經頸靜鏡徑痙競淨糾廄舊駒舉據鋸懼劇鵑絹傑潔結誡屆緊錦僅謹進晉燼盡勁荊覺決訣絕鈞軍駿開凱顆殼課墾懇摳庫褲誇塊儈寬礦曠況虧巋窺饋潰擴闊蠟臘萊來賴藍欄攔籃闌蘭瀾讕攬覽懶纜爛濫撈勞澇樂鐳壘類淚籬離裏鯉禮麗厲勵礫曆瀝隸倆聯蓮連鐮憐漣簾斂臉鏈戀煉練糧涼兩輛諒療遼鐐獵臨鄰鱗凜賃齡鈴淩靈嶺領餾劉龍聾嚨籠壟攏隴樓婁摟簍蘆盧顱廬爐擄鹵虜魯賂祿錄陸驢呂鋁侶屢縷慮濾綠巒攣孿灤亂掄輪倫侖淪綸論蘿羅邏鑼籮騾駱絡媽瑪碼螞馬罵嗎買麥賣邁脈瞞饅蠻滿謾貓錨鉚貿麽黴沒鎂門悶們錳夢謎彌覓綿緬廟滅憫閩鳴銘謬謀畝鈉納難撓腦惱鬧餒膩攆撚釀鳥聶齧鑷鎳檸獰甯擰濘鈕紐膿濃農瘧諾歐鷗毆嘔漚盤龐國愛賠噴鵬騙飄頻貧蘋憑評潑頗撲鋪樸譜臍齊騎豈啓氣棄訖牽扡釺鉛遷簽謙錢鉗潛淺譴塹槍嗆牆薔強搶鍬橋喬僑翹竅竊欽親輕氫傾頃請慶瓊窮趨區軀驅齲顴權勸卻鵲讓饒擾繞熱韌認紉榮絨軟銳閏潤灑薩鰓賽傘喪騷掃澀殺紗篩曬閃陝贍繕傷賞燒紹賒攝懾設紳審嬸腎滲聲繩勝聖師獅濕詩屍時蝕實識駛勢釋飾視試壽獸樞輸書贖屬術樹豎數帥雙誰稅順說碩爍絲飼聳慫頌訟誦擻蘇訴肅雖綏歲孫損筍縮瑣鎖獺撻擡攤貪癱灘壇譚談歎湯燙濤縧騰謄銻題體屜條貼鐵廳聽烴銅統頭圖塗團頹蛻脫鴕馱駝橢窪襪彎灣頑萬網韋違圍爲濰維葦偉僞緯謂衛溫聞紋穩問甕撾蝸渦窩嗚鎢烏誣無蕪吳塢霧務誤錫犧襲習銑戲細蝦轄峽俠狹廈鍁鮮纖鹹賢銜閑顯險現獻縣餡羨憲線廂鑲鄉詳響項蕭銷曉嘯蠍協挾攜脅諧寫瀉謝鋅釁興洶鏽繡虛噓須許緒續軒懸選癬絢學勳詢尋馴訓訊遜壓鴉鴨啞亞訝閹煙鹽嚴顔閻豔厭硯彥諺驗鴦楊揚瘍陽癢養樣瑤搖堯遙窯謠藥爺頁業葉醫銥頤遺儀彜蟻藝億憶義詣議誼譯異繹蔭陰銀飲櫻嬰鷹應纓瑩螢營熒蠅穎喲擁傭癰踴詠湧優憂郵鈾猶遊誘輿魚漁娛與嶼語籲禦獄譽預馭鴛淵轅園員圓緣遠願約躍鑰嶽粵悅閱雲鄖勻隕運蘊醞暈韻雜災載攢暫贊贓髒鑿棗竈責擇則澤賊贈紮劄軋鍘閘詐齋債氈盞斬輾嶄棧戰綻張漲帳賬脹趙蟄轍鍺這貞針偵診鎮陣掙睜猙幀鄭證織職執紙摯擲幟質鍾終種腫衆謅軸皺晝驟豬諸誅燭矚囑貯鑄築駐專磚轉賺樁莊裝妝壯狀錐贅墜綴諄濁茲資漬蹤綜總縱鄒詛組鑽緻鐘麼為隻兇準啟闆裡靂餘鍊",chinese:function(n){return/.*[\u4e00-\u9fa5]+.*$/.test(n)?this.chinese_traditional_dict.indexOf(n)>-1?"traditional":"simplified":""},japanese:function(n){return!!/.*[\u3040-\u309F\u30A0-\u30FF]+.*$/.test(n)},korean:function(n){return!!/.*[\uAC00-\uD7AF]+.*$/.test(n)},russian:function(n){return!!/^[А-Яа-яЁё]$/.test(n)},thai:function(n){return!!/^[\u0E01-\u0E59]$/.test(n)},arabic:function(n){return/^[\u0600-\u06FF\u0750-\u077F]$/.test(n)},romanian:function(n){return/^[\u00C0-\u00FF\u0100-\u017F\u0218-\u021B]$/.test(n)},greek:function(n){return!!/^[\u0391-\u03A9\u03B1-\u03C9]$/.test(n)},hebrew:function(n){return/^[\u0590-\u05FF]$/.test(n)},number:function(n){return!!/.*[\u0030-\u0039]+.*$/.test(n)},english:function(n){return/.*[\u0041-\u005a]+.*$/.test(n)?!0:!!/.*[\u0061-\u007a]+.*$/.test(n)},romance_dict:["é","è","ê","à","ç","œ","ñ","á","ó","ò","ì","ã","õ"],romance:function(n){return this.romance_dict.indexOf(n)>-1},romanceSentenceAnaly:function(n){const a={french:{score:0,chars:["é","è","ê","à","ç","œ"]},spanish:{score:0,chars:["ñ","á","ó"],pairs:["ll"]},italian:{score:0,chars:["ò","ì"],pairs:["cc","ss"]},portuguese:{score:0,chars:["ã","õ"]}};for(let l=0;l<n.length;l++){const u=n[l].toLowerCase();if(Object.keys(a).forEach(d=>{a[d].chars.includes(u)&&(a[d].score+=1)}),l<n.length-1){const d=n.slice(l,l+2).toLowerCase();Object.keys(a).forEach(c=>{const f=a[c].pairs;f&&f.includes(d)&&(a[c].score+=2)})}}let s="",r=-1;return Object.keys(a).forEach(l=>{a[l].score>r&&(r=a[l].score,s=l)}),s||""},specialCharacter:function(n){return!!(/.*[\u2460-\u24E9]+.*$/.test(n)||/.*[\u2500-\u25FF]+.*$/.test(n)||/.*[\u3200-\u33FF]+.*$/.test(n)||/.*[\uFF00-\uFF5E]+.*$/.test(n)||/.*[\u2000-\u22FF]+.*$/.test(n)||/.*[\u3001-\u3036]+.*$/.test(n)||/.*[\u0020-\u002F]+.*$/.test(n)||/.*[\u003B\u003B\u003C\u003D\u003E\u003F\u005B\u005C\u005D\u005E\u005F\u0060\u007B\u007C\u007D\u007E]+.*$/.test(n)||/.*[\u0009\u000a\u0020\u00A0\u1680\u180E\u202F\u205F\u3000\uFEFF]+.*$/.test(n)||/.*[\u2000-\u200B]+.*$/.test(n)||/.*[\u2C60-\u2C77]+.*$/.test(n))},textTranslateReplace:function(n,a,s,r){return t.util.textReplace(n,a,s,r)}},executeByLocalLanguage:function(){var n=t.util.browserDefaultLanguage();if(typeof n<"u"&&n.length>0){t.changeLanguage(n);return}typeof t.request.api.ip!="string"||t.request.api.ip==null||t.request.api.ip.length<1||t.request.post(t.request.api.ip,{},function(a){a.result==0?(console.log("==== ERROR 获取当前用户所在区域异常 ===="),console.log(a.info),console.log("==== ERROR END ====")):(t.storage.set("to",a.language),t.to=a.language,t.selectLanguageTag,t.execute())},null)},util:{textReplace:function(n,a,s,r){if(n==a)return s;let l=0,u=30;for(;n.indexOf(a,l)>-1&&u-- >0;){let d=""+s,c=""+a;if(t.language.wordBlankConnector(r)){let h=n.indexOf(a,l);if(h+1<n.length){let p=n.charAt(h+a.length);/。/.test(p)?(d=d+". ",c=a+"。"):/,/.test(p)?(d=d+", ",c=a+","):/:/.test(p)?(d=d+": ",c=a+":"):[" ",`
`," ","]","|","_","-","/"].indexOf(p)!==-1||d.length>0&&d.charAt(d.length-1)==" "||(d=d+" ")}if(h>0){let p=n.charAt(h-1);/。/.test(p)?(d=". "+d,c="。"+c):/,/.test(p)?(d=", "+d,c=","+c):/:/.test(p)?(d=": "+d,c=":"+c):[" ",`
`," ","[","|","_","-","/"].indexOf(p)!==-1||d.length>0&&d.charAt(0)==" "||(d=" "+d)}}let f=t.util.replaceFromIndex(n,l,c,d);f.replaceEndIndex<1?console.log("while中已经 indexOf发现了,但是实际没有替换,出现异常了!理论上这是不应该出现的。 text:"+n+" , translateOriginal:"+a):(l=f.replaceEndIndex,n=f.text)}return n},replaceFromIndex:function(n,a,s,r){const l=n.slice(0,a),u=n.slice(a),d=u.indexOf(s);if(d>-1){const c=u.replace(s,r);return{text:l+c,replaceEndIndex:a+d+r.length}}else return{text:l+replacedAfter,replaceEndIndex:0}},uuid:function(){var n=new Date().getTime();window.performance&&typeof window.performance.now=="function"&&(n+=performance.now());var a="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/[xy]/g,function(s){var r=(n+Math.random()*16)%16|0;return n=Math.floor(n/16),(s=="x"?r:r&3|8).toString(16)});return a},findTag:function(n){var a=/<[^>]+>/g;return a.test(n)},arrayFindMaxNumber:function(n){for(var a={},s=[],r=0,l=0,u=n.length;l<u;l++)a[n[l]]?a[n[l]]++:a[n[l]]=1,a[n[l]]>r&&(r=a[n[l]]);for(var d in a)a.hasOwnProperty(d)&&a[d]===r&&s.push(d);return s},hash:function(n){if(n==null||typeof n>"u")return n;var a=0,s,r;if(n.length===0)return a;for(s=0;s<n.length;s++)r=n.charCodeAt(s),a=(a<<5)-a+r,a|=0;return a+""},charReplace:function(n){return n==null?"":(n=n.trim(),n=n.replace(/\t|\n|\v|\r|\f/g,""),n)},regExp:{pattern:function(n){return n=n.replace(/\\/g,"\\\\"),n=n.replace(/\"/g,'\\"'),n=n.replace(/\?/g,"\\?"),n=n.replace(/\$/g,"\\$"),n=n.replace(/\(/g,"\\("),n=n.replace(/\)/g,"\\)"),n=n.replace(/\|/g,"\\|"),n=n.replace(/\+/g,"\\+"),n=n.replace(/\*/g,"\\*"),n=n.replace(/\[/g,"\\["),n=n.replace(/\]/g,"\\]"),n=n.replace(/\^/g,"\\^"),n=n.replace(/\{/g,"\\{"),n=n.replace(/\}/g,"\\}"),n},resultText:function(n){return n}},getUrlParam:function(n){var a=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),s=window.location.search.substr(1).match(a);return s!=null?unescape(s[2]):""},synchronizesLoadJs:function(n){var a=null;if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch{a=new ActiveXObject("Microsoft.XMLHTTP")}else window.XMLHttpRequest&&(a=new XMLHttpRequest);if(a.open("GET",n,!1),a.send(null),a.readyState==4)if(a.status>=200&&a.status<300||a.status==0||a.status==304){var s=document.getElementsByTagName("HTML")[0],r=document.createElement("script");r.language="javascript",r.type="text/javascript";try{r.appendChild(document.createTextNode(a.responseText))}catch{r.text=a.responseText}return s.appendChild(r),!0}else return!1;else return!1},loadMsgJs:function(){typeof msg<"u"||t.util.synchronizesLoadJs("https://res.zvo.cn/msg/msg.js")},objSort:function(n){var a=Array.from(Object.keys(n));a.sort(function(l,u){return u.length-l.length});var s=new Array;for(var r of a)s[r]=n[r];return s},versionStringToInt:function(n){var a=n.split("."),s=0;return s=parseInt(a[0])*1e3*1e3+s,s=parseInt(a[1])*1e3+s,s=parseInt(a[2])+s,s},split:function(n,a,s){let r=a,l=[];if(JSON.stringify(n).length<=a)l.push(n);else{let u=JSON.stringify(n).trim().substring(1,JSON.stringify(n).length-1);if(JSON.stringify(n).length-a<=2){a=a-4;let d=u.substring(0,u.lastIndexOf('","')+1),c=u.substring(u.lastIndexOf('","')+2);l.push(JSON.parse("["+d+"]")),l.push(JSON.parse("["+c+"]"))}else{a=a-2;let d=0;for(;d-u.length<0;){let c="";d+a-u.length>=0?c=u.substring(d):c=u.substring(d,d+a);let f=c.length,h=1;c.endsWith('"')?c.endsWith('","')?f-=2:c.startsWith('"')||(f=c.lastIndexOf('","')+1):c.endsWith('",')?f-=1:(f=c.lastIndexOf('","')+1,f<=0&&(c.startsWith('"')?f=c.length-1:f=c.length-2,c.endsWith('"')||(h=0)));let p="";f-c.length>0||f-0==0?(p=c,f=f+p.length):p=c.substring(0,f),!p.startsWith('"')&&!p.startsWith(',"')&&(p='"'+p),p.endsWith('"')||(p=p+'"'),d+=f+h,p="["+p+"]";try{l.push(JSON.parse(p))}catch{d=d-(f+h)+1}}}}return s&&s>0&&(l=t.util._splitMaxSize(l,r,s)),l},_splitMaxSize:function(n,a,s){let r=[],l=[];if(n.forEach(function(u,d){if(u=l.concat(u),u.length>s){let f=u.slice(0,s),h=u.slice(s),p=1;for(;JSON.stringify(f).length>a&&(f=u.slice(0,s-p),h=u.slice(s-p),p++,!(p>=u.length+1)););r.push(f),l.length=0,l=h}else{let f=u,h=[],p=1;for(;JSON.stringify(f).length>a&&(f=u.slice(0,s-p),h=u.slice(s-p),p++,!(p>=u.length+1)););r.push(f),l.length=0,l=h}}),l.length>0){let u=[];u.push(l);let d=t.util._splitMaxSize(u,a,s);r=r.concat(d)}return r},browserLanguage:{zh:"chinese_simplified","zh-CN":"chinese_simplified","zh-TW":"chinese_traditional","zh-HK":"chinese_traditional",co:"corsican",gn:"guarani",rw:"kinyarwanda",ha:"hausa",no:"norwegian",nl:"dutch",yo:"yoruba",en:"english","en-US":"english",kok:"gongen",la:"latin",ne:"nepali",fr:"french",cs:"czech",haw:"hawaiian",ka:"georgian",ru:"russian",fa:"persian",bho:"bhojpuri",hi:"hindi",be:"belarusian",sw:"swahili",is:"icelandic",yi:"yiddish",tw:"twi",ga:"irish",gu:"gujarati",km:"khmer",sk:"slovak",he:"hebrew",kn:"kannada",hu:"hungarian",ta:"tamil",ar:"arabic",bn:"bengali",az:"azerbaijani",sm:"samoan",af:"afrikaans",id:"indonesian",da:"danish",sn:"shona",bm:"bambara",lt:"lithuanian",vi:"vietnamese",mt:"maltese",tk:"turkmen",as:"assamese",ca:"catalan",si:"singapore",ceb:"cebuano",gd:"scottish-gaelic",sa:"sanskrit",pl:"polish",gl:"galician",lv:"latvian",uk:"ukrainian",tt:"tatar",cy:"welsh",ja:"japanese",fil:"filipino",ay:"aymara",lo:"lao",te:"telugu",ro:"romanian",ht:"haitian_creole",doi:"dogrid",sv:"swedish",mai:"maithili",th:"thai",hy:"armenian",my:"burmese",ps:"pashto",hmn:"hmong",dv:"dhivehi",lb:"luxembourgish",sd:"sindhi",ku:"kurdish",tr:"turkish",mk:"macedonian",bg:"bulgarian",ms:"malay",lg:"luganda",mr:"marathi",et:"estonian",ml:"malayalam",de:"deutsch",sl:"slovene",ur:"urdu",pt:"portuguese",ig:"igbo",ckb:"kurdish_sorani",om:"oromo",el:"greek",es:"spanish",fy:"frisian",so:"somali",am:"amharic",ny:"nyanja",pa:"punjabi",eu:"basque",it:"italian",sq:"albanian",ko:"korean",tg:"tajik",fi:"finnish",ky:"kyrgyz",ee:"ewe",hr:"croatian",kri:"creole",qu:"quechua",bs:"bosnian",mi:"maori"},browserDefaultLanguage:function(){var n=navigator.language||navigator.userLanguage;if(typeof n=="string"&&n.length>0){var a=t.util.browserLanguage[n];if(typeof a>"u")console.log("browser default language : "+n+", translate.js current translate channel not support this language ");else return a}return""},urlSplitByText:function(n){const a=/(https?:\/\/[\w\-._~:\/?#[\]@!$&'()*+;=%]+(?=[\s\u4e00-\u9fa5,。;,!?]|$))/gi,s=n.split(a);let r={};for(let l=0;l<s.length;l++)l%2===0?s[l]!==""&&(r[s[l]]="0"):r[s[l]]="1";return r},getElementPosition:function(n){const a=n.getBoundingClientRect(),s=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,l=a.left+s,u=a.top+r,d=a.right-a.left,c=a.bottom-a.top,f=l+d,h=u+c;return{startX:l,startY:u,endX:f,endY:h,width:d,height:c}}},service:{name:"translate.service",use:function(n){if(typeof t.enterprise<"u"&&t.enterprise.isUse==!0){console.log("您已启用了企业级翻译通道 translate.enterprise.use(); (文档:https://translate.zvo.cn/4087.html) , 所以您设置的 translate.service.use('"+n+"'); (文档:https://translate.zvo.cn/4081.html) 将失效不起作用,有企业级翻译通道全部接管。");return}if(typeof n=="string"&&(t.service.name=n,n!="translate.service")){if(t.whole.enableAll(),n.toLowerCase()=="giteeai"){t.request.api.host=["https://giteeai.zvo.cn/","https://deutsch.enterprise.api.translate.zvo.cn:1000/","https://api.translate.zvo.cn:1000/"];return}if(n.toLowerCase()=="siliconflow"){t.request.api.host=["https://siliconflow.zvo.cn/","https://america.api.translate.zvo.cn:1414/","https://deutsch.enterprise.api.translate.zvo.cn:1414/"];return}}},edge:{api:{auth:"https://edge.microsoft.com/translate/auth",translate:"https://api.cognitive.microsofttranslator.com/translate?from={from}&to={to}&api-version=3.0&includeSentenceLength=true"},language:{json:[{id:"ukrainian",name:"Україна",serviceId:"uk"},{id:"norwegian",name:"Norge",serviceId:"no"},{id:"welsh",name:"Iaith Weleg",serviceId:"cy"},{id:"dutch",name:"nederlands",serviceId:"nl"},{id:"japanese",name:"日本語",serviceId:"ja"},{id:"filipino",name:"Pilipino",serviceId:"fil"},{id:"english",name:"English",serviceId:"en"},{id:"lao",name:"ກະຣຸນາ",serviceId:"lo"},{id:"telugu",name:"తెలుగుName",serviceId:"te"},{id:"romanian",name:"Română",serviceId:"ro"},{id:"nepali",name:"नेपालीName",serviceId:"ne"},{id:"french",name:"Français",serviceId:"fr"},{id:"haitian_creole",name:"Kreyòl ayisyen",serviceId:"ht"},{id:"czech",name:"český",serviceId:"cs"},{id:"swedish",name:"Svenska",serviceId:"sv"},{id:"russian",name:"Русский язык",serviceId:"ru"},{id:"malagasy",name:"Malagasy",serviceId:"mg"},{id:"burmese",name:"ဗာရမ်",serviceId:"my"},{id:"pashto",name:"پښتوName",serviceId:"ps"},{id:"thai",name:"คนไทย",serviceId:"th"},{id:"armenian",name:"Արմենյան",serviceId:"hy"},{id:"chinese_simplified",name:"简体中文",serviceId:"zh-CHS"},{id:"persian",name:"Persian",serviceId:"fa"},{id:"chinese_traditional",name:"繁體中文",serviceId:"zh-CHT"},{id:"kurdish",name:"Kurdî",serviceId:"ku"},{id:"turkish",name:"Türkçe",serviceId:"tr"},{id:"hindi",name:"हिन्दी",serviceId:"hi"},{id:"bulgarian",name:"български",serviceId:"bg"},{id:"malay",name:"Malay",serviceId:"ms"},{id:"swahili",name:"Kiswahili",serviceId:"sw"},{id:"oriya",name:"ଓଡିଆ",serviceId:"or"},{id:"icelandic",name:"ÍslandName",serviceId:"is"},{id:"irish",name:"Íris",serviceId:"ga"},{id:"khmer",name:"ភាសា​ខ្មែរName",serviceId:"km"},{id:"gujarati",name:"ગુજરાતી",serviceId:"gu"},{id:"slovak",name:"Slovenská",serviceId:"sk"},{id:"kannada",name:"ಕನ್ನಡ್Name",serviceId:"kn"},{id:"hebrew",name:"היברית",serviceId:"he"},{id:"hungarian",name:"magyar",serviceId:"hu"},{id:"marathi",name:"मराठीName",serviceId:"mr"},{id:"tamil",name:"தாமில்",serviceId:"ta"},{id:"estonian",name:"eesti keel",serviceId:"et"},{id:"malayalam",name:"മലമാലം",serviceId:"ml"},{id:"inuktitut",name:"ᐃᓄᒃᑎᑐᑦ",serviceId:"iu"},{id:"arabic",name:"بالعربية",serviceId:"ar"},{id:"deutsch",name:"Deutsch",serviceId:"de"},{id:"slovene",name:"slovenščina",serviceId:"sl"},{id:"bengali",name:"বেঙ্গালী",serviceId:"bn"},{id:"urdu",name:"اوردو",serviceId:"ur"},{id:"azerbaijani",name:"azerbaijani",serviceId:"az"},{id:"portuguese",name:"português",serviceId:"pt"},{id:"samoan",name:"lifiava",serviceId:"sm"},{id:"afrikaans",name:"afrikaans",serviceId:"af"},{id:"tongan",name:"汤加语",serviceId:"to"},{id:"greek",name:"ελληνικά",serviceId:"el"},{id:"indonesian",name:"IndonesiaName",serviceId:"id"},{id:"spanish",name:"Español",serviceId:"es"},{id:"danish",name:"dansk",serviceId:"da"},{id:"amharic",name:"amharic",serviceId:"am"},{id:"punjabi",name:"ਪੰਜਾਬੀName",serviceId:"pa"},{id:"albanian",name:"albanian",serviceId:"sq"},{id:"lithuanian",name:"Lietuva",serviceId:"lt"},{id:"italian",name:"italiano",serviceId:"it"},{id:"vietnamese",name:"Tiếng Việt",serviceId:"vi"},{id:"korean",name:"한국어",serviceId:"ko"},{id:"maltese",name:"Malti",serviceId:"mt"},{id:"finnish",name:"suomi",serviceId:"fi"},{id:"catalan",name:"català",serviceId:"ca"},{id:"croatian",name:"hrvatski",serviceId:"hr"},{id:"bosnian",name:"bosnian",serviceId:"bs-Latn"},{id:"polish",name:"Polski",serviceId:"pl"},{id:"latvian",name:"latviešu",serviceId:"lv"},{id:"maori",name:"Maori",serviceId:"mi"}],getMap:function(){if(typeof t.service.edge.language.map>"u"){t.service.edge.language.map=new Array;for(var n=0;n<t.service.edge.language.json.length;n++){var a=t.service.edge.language.json[n];t.service.edge.language.map[a.id]=a.serviceId}}return t.service.edge.language.map}},translate:function(n,a,s,r){var l=JSON.parse(decodeURIComponent(a.text));let u=t.util.split(l,4e4,900);t.request.send(t.service.edge.api.auth,{},{},function(d){var c={from:a.from+"",to:a.to,text:a.text},f=a.from;f!="auto"&&(f=="romance"?f="fr":f=t.service.edge.language.getMap()[a.from]);for(var h=t.service.edge.language.getMap()[a.to],p=t.service.edge.api.translate.replace("{from}",f).replace("{to}",h),v=0;v<u.length;v++){for(var y=[],T=0;T<u[v].length;T++)y.push({Text:u[v][T]});t.request.send(p,JSON.stringify(y),c,function(k){var $={};$.info="SUCCESS",$.result=1,$.from=a.from,$.to=a.to,$.text=[];for(var B=0;B<k.length;B++)$.text.push(k[B].translations[0].text);if(u.length>1){for(var w=-1,M=0;M<u.length;M++)if(u[M].length-$.text.length==0){w=M;break}w<0&&(console.log("------ERROR--------"),console.log("翻译内容过多,进行拆分,但拆分判断出现异常,currentIndex:-1 请联系 http://translate.zvo.cn/43006.html 说明"));for(var H=0;H<w;H++)for(var W=u[H].length,D=0;D<W;D++)$.text.unshift(null);for(var I=u.length-1;I>w;I--)for(var ee=u[I].length,D=0;D<ee;D++)$.text.push(null)}s($)},"post",!0,{Authorization:"Bearer "+d,"Content-Type":"application/json"},r,!0)}},"get",!0,{"content-type":"application/x-www-form-urlencoded"},function(d){console.log("---------error--------"),console.log("edge translate service error, http code : "+d.status+", response text : "+d.responseText)},!0)}}},request:{api:{host:["https://api.translate.zvo.cn/","https://america.api.translate.zvo.cn/"],language:"language.json",translate:"translate.json",ip:"ip.json",connectTest:"connectTest.json",init:"init.json"},appendParams:{},appendHeaders:{},response:function(n){},speedDetectionControl:{hostMasterNodeCutTime:2e3,hostQueue:[],hostQueueIndex:-1,disableTime:1e6,setCurrentHost:function(n){t.storage.set("speedDetectionControl_hostQueue",""),t.request.api.host=n,t.request.speedDetectionControl.checkHostQueue=new Array,t.request.speedDetectionControl.checkResponseSpeed_Storage(n,0)},getHostQueue:function(){if(t.request.speedDetectionControl.hostQueue.length==0){var n=t.storage.get("speedDetectionControl_hostQueue");if(n==null||typeof n>"u"||n==""){typeof t.request.api.host=="string"&&(t.request.api.host=[""+t.request.api.host]),t.request.speedDetectionControl.hostQueue=[];for(var a=0;a<t.request.api.host.length;a++){var s=t.request.api.host[a];t.request.speedDetectionControl.hostQueue[a]={host:s,time:0}}}else t.request.speedDetectionControl.hostQueue=JSON.parse(n);var r=t.storage.get("speedDetectionControl_lasttime");(r==null||typeof r>"u")&&(r=0);var l=6e4;new Date().getTime()-r>l&&t.request.speedDetectionControl.checkResponseSpeed()}return t.request.speedDetectionControl.hostQueue},checkResponseSpeed_Storage:function(n,a){t.request.speedDetectionControl.checkHostQueue.push({host:n,time:a}),t.request.speedDetectionControl.checkHostQueue.sort((s,r)=>s.time-r.time),t.storage.set("speedDetectionControl_hostQueue",JSON.stringify(t.request.speedDetectionControl.checkHostQueue)),t.storage.set("speedDetectionControl_lasttime",new Date().getTime()),t.request.speedDetectionControl.hostQueue=t.request.speedDetectionControl.checkHostQueue},checkResponseSpeed:function(){var n={"content-type":"application/x-www-form-urlencoded"};if(!(typeof t.request.api.connectTest!="string"||t.request.api.connectTest==null||t.request.api.connectTest.length<1)){t.request.speedDetectionControl.checkHostQueue=[],t.request.speedDetectionControl.checkHostQueueMap=[],typeof t.request.api.host=="string"&&(t.request.api.host=[""+t.request.api.host]);for(var a=0;a<t.request.api.host.length;a++){var s=t.request.api.host[a];t.request.speedDetectionControl.checkHostQueueMap[s]={start:new Date().getTime()};try{t.request.send(s+t.request.api.connectTest,{host:s},{host:s},function(r){var l=r.info,u=t.request.speedDetectionControl.checkHostQueueMap[l],d=new Date().getTime()-u.start;t.request.api.host[0]==l&&(d=d-t.request.speedDetectionControl.hostMasterNodeCutTime,d<0&&(d=0)),t.request.speedDetectionControl.checkResponseSpeed_Storage(l,d)},"post",!0,n,function(r){var l=r.requestURL.replace(t.request.api.connectTest,"");t.request.speedDetectionControl.checkResponseSpeed_Storage(l,t.request.speedDetectionControl.disableTime)},!1)}catch(r){console.log(r)}}}},getHostQueueIndex:function(){if(t.request.speedDetectionControl.hostQueueIndex<0){var n=t.storage.get("speedDetectionControl_hostQueueIndex");typeof n>"u"||n==null?(t.request.speedDetectionControl.hostQueueIndex=0,t.storage.set("speedDetectionControl_hostQueueIndex",0)):t.request.speedDetectionControl.hostQueueIndex=n}return t.request.speedDetectionControl.hostQueueIndex},getHost:function(){var n=t.request.speedDetectionControl.getHostQueue(),a=t.request.speedDetectionControl.getHostQueueIndex();return n.length>a||(console.log("异常,下标越界了!index:"+a),a=n.length-1),n[a].host}},getUrl:function(n){var a=t.request.speedDetectionControl.getHost(),s=a+n+"?v="+t.version;return s},post:function(n,a,s,r){var l={"content-type":"application/x-www-form-urlencoded"};if(!(typeof a>"u")){if(typeof t.enterprise<"u"&&t.enterprise.automaticAdaptationService(),t.request.getUrl(n),t.service.name=="client.edge"){if(n==t.request.api.translate){t.service.edge.translate(n,a,s,r);return}if(n==t.request.api.language){var u={};u.info="SUCCESS",u.result=1,u.list=t.service.edge.language.json,s(u);return}}this.send(n,a,a,s,"post",!0,l,r,!0)}},send:function(n,a,s,r,l,u,d,c,f){var h="";if((a==null||typeof a>"u")&&(a={}),typeof a=="string")h=a;else{a.browserDefaultLanguage=t.util.browserDefaultLanguage();for(var p in t.request.appendParams)t.request.appendParams.hasOwnProperty(p)&&(a[p]=t.request.appendParams[p]);typeof t.enterprise<"u"&&typeof t.enterprise.key<"u"&&typeof t.enterprise.key=="string"&&t.enterprise.key.length>0&&(a.key=t.enterprise.key);for(var v in a)a.hasOwnProperty(v)&&(h.length>0&&(h=h+"&"),h=h+v+"="+a[v])}n.indexOf("https://")==0||n.indexOf("http://")==0||(n=t.request.getUrl(n));var y=null;try{y=new XMLHttpRequest}catch{y=new ActiveXObject("Microsoft.XMLHTTP")}if(y.data=s,y.open(l,n,u),d!=null)for(var v in d)d.hasOwnProperty(v)&&y.setRequestHeader(v,d[v]);for(var T in t.request.appendHeaders)t.request.appendHeaders.hasOwnProperty(T)&&y.setRequestHeader(T,t.request.appendHeaders[T]);return t.service.name=="translate.service"&&y.setRequestHeader("currentpage",window.location.href+""),y.send(h),y.onreadystatechange=function(){if(y.readyState==4)if(t.request.response(y),y.status==200){var k=null;if(!(typeof y.responseText>"u"||y.responseText==null)){if(y.responseText.indexOf("{")>-1&&y.responseText.indexOf("}")>-1)try{k=JSON.parse(y.responseText)}catch($){console.log($)}}k==null?r(y.responseText):r(k)}else f&&(n.indexOf(t.request.api.connectTest)>-1||(t.service.name=="translate.service"&&console.log(`----- translate.js 提示 -----
翻译服务响应异常,解决这种情况可以有两种方案:
【方案一】:使用采用最新版本 3.16.0及更高版本,js引用文件为 https://cdn.staticfile.net/translate.js/3.16.0/translate.js 并且使用 client.edge 模式 (增加一行设置代码就好,可参考 https://translate.zvo.cn/4081.html ),这样就不会再出现这种情况了,而且这个方案也是完全免费的。
【方案二】:采用企业级稳定翻译通道 ,但是这个相比于 方案一 来说,是有一定的收费的,大概一年600,这个就是专门为了高速及高稳定准备的,而相比于这个方案二,方案一则是全免费的。 因为方案二我们是部署了两个集群,而每个集群又下分了数个网络节点,包含中国大陆、香港、美国、欧洲、 等多个州,充分保障稳定、高效,同样也产生了不少成本,所以才需要付费。更多信息说明可以参考: http://translate.zvo.cn/4087.html
【方案三】:私有部署你自己的翻译通道,并且启用内存级翻译缓存,毫秒级响应,但是需要依赖一台1核2G服务器,是最推荐的方式。具体参考:https://translate.zvo.cn/391129.html
-------------`),console.log("------- translate.js service api response error --------"),console.log(" http code : "+y.status),console.log(" response : "+y.response),console.log(" request url : "+n),console.log(" request data : "+JSON.stringify(a)),console.log(" request method : "+l),console.log("---------------------- end ----------------------"))),y.requestURL=n,c!=null&&c(y)},y},translateText:function(n,a){var s=new Array,r=t.language.getLocal(),l=t.language.getCurrent();if(typeof n=="string")s[0]=n;else{var u=Object.prototype.toString.call(n);if(u=="[object Array]")s=n;else if(u=="[object Object]")typeof n.texts>"u"&&console.log("translate.request.translateText 传入的值类型异常,因为你没有传入 obj.texts 要翻译的具体文本! 请查阅文档: https://translate.zvo.cn/4077.html"),typeof n.texts=="string"?s=[n.texts]:s=n.texts,typeof n.from=="string"&&n.from.length>0&&(r=n.from),typeof n.to=="string"&&n.to.length>0&&(l=n.to);else{console.log("translate.request.translateText 传入的值类型错误,请查阅文档: https://translate.zvo.cn/4077.html");return}}for(var d=new Array,c=[],f={},h=0;h<s.length;h++){var p=t.util.hash(s[h]),v=t.storage.get("hash_"+l+"_"+p);v!=null&&v.length>0?d[h]=v:(d[h]="",c.push(s[h]),f[p]=h)}if(c.length==0){var T={from:r,to:l,text:d,result:1};a(T);return}if(!(typeof t.request.api.translate!="string"||t.request.api.translate==null||t.request.api.translate.length<1)){var y=t.request.api.translate,T={from:r,to:l,text:encodeURIComponent(JSON.stringify(c))};t.request.post(y,T,function(k){k.result==0&&(console.log("=======ERROR START======="),console.log("from : "+k.from),console.log("to : "+k.to),console.log("translate text array : "+s),console.log("response : "+k.info),console.log("=======ERROR END ======="));for(var $=0;$<k.text.length;$++){var B=t.util.hash(c[$]);t.storage.set("hash_"+l+"_"+B,k.text[$]),t.office.fullExtract.isUse&&t.office.fullExtract.set(B,c[$],T.to,k.text[$]),d[f[B]]=k.text[$]}k.text=d,a(k)},null)}},listener:{minIntervalTime:800,lasttime:0,executetime:0,delayExecuteTime:200,addExecute:function(){var n=Date.now();t.request.listener.lasttime==0?(t.request.listener.executetime=n,t.request.listener.lasttime=1):t.request.listener.executetime>1||(n<t.request.listener.lasttime+t.request.listener.minIntervalTime?t.request.listener.executetime=t.request.listener.lasttime+t.request.listener.minIntervalTime:t.request.listener.executetime=n)},trigger:function(n){return!0},start:function(){if(typeof t.request.listener.isStart<"u")return;if(t.request.listener.isStart=!0,setInterval(function(){var l=Date.now();if(t.request.listener.executetime>1&&l>t.request.listener.executetime+t.request.listener.delayExecuteTime){t.request.listener.executetime=0,t.request.listener.lasttime=l;try{t.execute()}catch(u){console.log(u)}}},100),typeof PerformanceObserver>"u"){console.log("因浏览器版本较低, translate.request.listener.start() 中 PerformanceObserver 对象不存在,浏览器不支持,所以 translate.request.listener.start() 未生效。");return}const n=new PerformanceObserver(l=>{for(var u=!1,d=0;d<l.getEntries().length;d++){var c=l.getEntries()[d];if(c.initiatorType==="fetch"||c.initiatorType==="xmlhttprequest"){var f=c.name;typeof t.request.api.host=="string"&&(t.request.api.host=[t.request.api.host]);for(var h=!1,p=0;p<t.request.api.host.length;p++)if(f.indexOf(t.request.api.host[p])>-1){h=!0;break}if(typeof t.service.edge<"u"&&f.indexOf(t.service.edge.api.auth)>-1&&(h=!0),f.indexOf(".microsofttranslator.com/translate")>-1&&(h=!0),h||!t.request.listener.trigger())continue;u=!0;break}}u&&t.request.listener.addExecute()});var a=PerformanceObserver.supportedEntryTypes;if(a){for(var s=!1,r=0;r<a.length;r++)if(a[r]==="resource"){s=!0;break}if(s)try{n.observe({entryTypes:["resource"]});return}catch{console.log("PerformanceObserver entryTypes 失败,尝试 type 参数")}}try{n.observe({type:"resource",buffered:!0}),console.log("使用 PerformanceObserver type")}catch{console.log("当前浏览器不支持 PerformanceObserver 的任何参数, translate.request.listener.start() 未启动")}}}},storage:{IndexedDB:{db:null,initDB:function(){const n=this;return new Promise((a,s)=>{const r="translate.js",l="kvStore",d=indexedDB.open(r,1);d.onupgradeneeded=function(c){const f=c.target.result;f.objectStoreNames.contains(l)||f.createObjectStore(l,{keyPath:"key"})},d.onsuccess=function(c){n.db=c.target.result,a()},d.onerror=function(c){s("IndexedDB 打开失败")}})},set:async function(n,a){return this.db||await this.initDB(),new Promise((s,r)=>{const u=this.db.transaction("kvStore","readwrite").objectStore("kvStore"),d={key:n,value:a},c=u.put(d);c.onsuccess=()=>s(),c.onerror=()=>r("写入失败")})},get:async function(n){return this.db||await this.initDB(),new Promise((a,s)=>{const u=this.db.transaction("kvStore","readonly").objectStore("kvStore").get(n);u.onsuccess=()=>{const d=u.result;a(d?d.value:void 0)},u.onerror=()=>s("读取失败")})},list:async function(n=""){return this.db||await this.initDB(),new Promise((a,s)=>{const u=this.db.transaction("kvStore","readonly").objectStore("kvStore").openCursor(),d=[],c="^"+n.replace(/\*/g,".*")+"$",f=new RegExp(c);u.onsuccess=h=>{const p=h.target.result;p?(f.test(p.key)&&d.push({key:p.key,value:p.value.value}),p.continue()):a(d)},u.onerror=()=>s("游标读取失败")})}},set:function(n,a){localStorage.setItem(n,a)},get:function(n){return localStorage.getItem(n)}},images:{queues:[],add:function(n){for(var a in n)n.hasOwnProperty(a)&&(t.images.queues[a]=n[a])},execute:function(){if(!(Object.keys(t.images.queues).length<1)){for(var n=document.getElementsByTagName("img"),a=0;a<n.length;a++){var s=n[a];if(!(typeof s.src>"u"||s.src==null||s.src.length==0)){var r=s.getAttribute("src");for(var l in t.images.queues){var u=l,d=t.images.queues[l];u==r&&(d=d.replace(new RegExp("{language}","g"),t.to),s.src=d)}}}for(var c=document.getElementsByTagName("*"),a=0;a<c.length;a++){var f=c[a],h=window.getComputedStyle(f,null),p=h.backgroundImage;if(p!="none"){var v=t.images.gainCssBackgroundUrl(p);if(typeof t.images.queues[v]<"u"){var d=t.images.queues[v];d=d.replace(new RegExp("{language}","g"),t.to),f.style.backgroundImage='url("'+d+'")'}}}}},gainCssBackgroundUrl:function(n){var a=n.indexOf('"'),s=n.lastIndexOf('"');if(a!=-1&&s!=-1){var r=n.substring(a+1,s);return r}return n}},reset:function(){var n=t.language.getCurrent(),a="";for(var s in t.nodeQueue)t.nodeQueue.hasOwnProperty(s)&&(a=s);if(a==""){console.log("提示,你当前还未执行过翻译,所以你无需执行 translate.reset(); 进行还原。");return}for(var r in t.nodeQueue[a].list)if(t.nodeQueue[a].list.hasOwnProperty(r)){for(var l in t.nodeQueue[a].list[r])if(t.nodeQueue[a].list[r].hasOwnProperty(l)){var u=t.nodeQueue[a].list[r][l];for(var d in u.nodes)if(u.nodes.hasOwnProperty(d)){var c=t.storage.get("hash_"+n+"_"+l);if(!(typeof c>"u")&&c!=null&&c.length!=0&&!(typeof u.nodes[d].node>"u")){var f=typeof u.nodes[d].node.attribute>"u"?null:u.nodes[d].node.attribute,h=t.element.nodeAnalyse.analyse(u.nodes[d].node,"","",f);t.element.nodeAnalyse.analyse(u.nodes[d].node,h.text,u.original,f)}}}}t.storage.set("to",""),t.to=null,t.selectLanguageTag.render()},selectionTranslate:{selectionX:0,selectionY:0,callTranslate:function(n){let a=window.getSelection();if(a.anchorOffset==a.focusOffset)return;let s=window.getSelection().toString();if(typeof t.request.api.translate!="string"||t.request.api.translate==null||t.request.api.translate.length<1){console.log("已设置了不使用 translate 翻译接口,翻译请求被阻止");return}var r=t.request.api.translate,l={from:t.language.getLocal(),to:t.to,text:encodeURIComponent(JSON.stringify([s]))};t.request.post(r,l,function(u){if(u.result==0)return;let d=document.querySelector("#translateTooltip");d.innerText=u.text[0],d.style.top=selectionY+20+"px",d.style.left=selectionX+50+"px",d.style.display=""},null)},start:function(){let n=document.createElement("span");n.innerText="",n.setAttribute("id","translateTooltip"),n.setAttribute("style","background-color:black;color:#fff;text-align:center;border-radius:6px;padding:5px;position:absolute;z-index:999;top:150%;left:50%; "),document.body.appendChild(n),document.addEventListener("mousedown",a=>{selectionX=a.pageX,selectionY=a.pageY},!1),document.addEventListener("mouseup",t.selectionTranslate.callTranslate,!1),document.addEventListener("click",a=>{document.querySelector("#translateTooltip").style.display="none"},!1)}},enterprise:{isUse:!1,use:function(){if(t.enterprise.isUse=!0,t.request.speedDetectionControl.hostMasterNodeCutTime=300,t.request.api.host=["https://america-enterprise-api-translate.zvo.cn/","https://beijing.enterprise.api.translate.zvo.cn/","https://deutsch.enterprise.api.translate.zvo.cn/","https://america.api.translate.zvo.cn:666/","https://api.translate.zvo.cn:666/","https://api.translate.zvo.cn:888/"],t.service.name=="client.edge"){t.service.name="translate.service",console.log("您已启用了企业级翻译通道 translate.enterprise.use(); (文档:https://translate.zvo.cn/4087.html) , 所以您设置的 translate.service.use('client.edge'); (文档:https://translate.zvo.cn/4081.html) 将失效不起作用,有企业级翻译通道全部接管。");return}},automaticAdaptationService:function(){if(t.enterprise.isUse){var n=t.request.speedDetectionControl.getHostQueue();n.length>0&&n[0].time+1>t.request.speedDetectionControl.disableTime&&(t.service.name="client.edge")}},key:""},init:function(){if(!(typeof t.init_execute<"u")&&(t.init_execute="已进行",!(typeof t.request.api.init!="string"||t.request.api.init==null||t.request.api.init.length<1)))try{t.request.send(t.request.api.init,{},{},function(n){if(n.result==0){console.log("translate.js init 初始化异常:"+n.info);return}else if(n.result==1){var a=t.util.versionStringToInt(n.version),s=t.util.versionStringToInt(t.version.replace("v",""));a>s&&console.log("Tip : translate.js find new version : "+n.version)}},"post",!0,null,function(n){},!1)}catch{}},progress:{style:`
/* CSS部分 */
/* 灰色水平加载动画 */
.translate_api_in_progress {
position: relative;
overflow: hidden; /* 隐藏超出部分的动画 */
}
/* 蒙版层 */
.translate_api_in_progress::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 1); /* 半透明白色遮罩 */
z-index: 2;
}
/* 水平加载条动画 */
.translate_api_in_progress::before {
content: '';
position: absolute;
top: 50%;
left: 0;
width: 100%;
height:100%; /* 细线高度 */
background: linear-gradient(
90deg,
transparent 0%,
#e8e8e8 25%, /* 浅灰色 */
#d0d0d0 50%, /* 中灰色 */
#e8e8e8 75%, /* 浅灰色 */
transparent 100%
);
background-size: 200% 100%;
animation: translate_api_in_progress_horizontal-loader 3.5s linear infinite;
z-index: 3;
transform: translateY(-50%);
}
@keyframes translate_api_in_progress_horizontal-loader {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
`,api:{isTip:!0,setUITip:function(n){t.progress.api.isTip=n},removeChildClass:function(n,a){var s=n.childNodes;if(!(s==null||typeof s>"u")){if(s.length>0)for(var r=0;r<s.length;r++)t.progress.api.removeChildClass(s[r],a+1)}a!=1&&(typeof n>"u"||typeof n.className=="string"&&(n.className.indexOf("translate_api_in_progress")<-1||(n.className=n.className.replace(/translate_api_in_progress/g,""))))},startUITip:function(){const n=document.createElement("style");n.textContent=t.progress.style,document.head.appendChild(n),t.progress.api.isTip&&(t.listener.execute.renderStartByApi.push(function(a,s,r){for(var l in t.nodeQueue[a].list[s])if(t.nodeQueue[a].list[s].hasOwnProperty(l)){for(var u in t.nodeQueue[a].list[s][l].nodes)if(t.nodeQueue[a].list[s][l].nodes.hasOwnProperty(u)){var d=t.nodeQueue[a].list[s][l].nodes[u].node;if(!(typeof d>"u"||typeof d.parentNode>"u")){var c=d.parentNode;if(c!=null){var f=d.parentNode;if(!(f!=null&&typeof f.className<"u"&&f.className!=null&&c.className.indexOf("translate_api_in_progress")>-1))if(t.progress.api.removeChildClass(c,1),typeof c.className>"u"||c.className==null||c.className=="")c.className=" translate_api_in_progress";else{if(c.className.indexOf("translate_api_in_progress")>-1)continue;c.className=c.className+" translate_api_in_progress"}}}}}}),t.listener.execute.renderFinishByApi.push(function(a,s,r){for(var l in t.nodeQueue[a].list[s])if(t.nodeQueue[a].list[s].hasOwnProperty(l)){for(var u in t.nodeQueue[a].list[s][l].nodes)if(t.nodeQueue[a].list[s][l].nodes.hasOwnProperty(u)){var d=t.nodeQueue[a].list[s][l].nodes[u].node,c=d.parentNode;if(c!=null){var f=c.className;typeof f>"u"||f==null||f==""||f.indexOf("translate_api_in_progress")<-1||(c.className=f.replace(/translate_api_in_progress/g,""))}}}}))}}},js:{transString:function(n,a,s,r){let l;try{l=JSON.parse(n)}catch(u){r(u);return}t.js.transObject(l,a,s,r)},transObject:function(n,a,s,r){let l=t.js.find(n);var u=new Array;for(const c in l)u.push(c);var d={from:"auto",to:a,texts:u};t.request.translateText(d,function(c){if(typeof c.result>"u"||c.result==0){r("network connect failure");return}if(c.result==0){r(c.info);return}const f=c.text;f&&f.length===u.length?u.forEach((h,p)=>{const v=f[p],y=l[h];y&&y.length>0&&y.forEach(T=>{t.js.setValueByPath(n,T,v)})}):console.error("翻译结果长度不匹配或为空"),s(n)})},setValueByPath:function(n,a,s){const r=a.replace(/\[(\d+)\]/g,".$1").split(".");let l=n;for(let u=0;u<r.length-1;u++)l=l[r[u]];l[r[r.length-1]]=s},find:function(n,a=""){let s={};if(typeof n=="object"&&n!==null)if(Array.isArray(n))n.forEach((r,l)=>{const u=a?`${a}[${l}]`:`[${l}]`,d=t.js.find(r,u);for(const[c,f]of Object.entries(d))s[c]||(s[c]=[]),s[c]=s[c].concat(f)});else for(const r in n){const l=a?`${a}.${r}`:r;if(typeof n[r]=="object"&&n[r]!==null){const u=t.js.find(n[r],l);for(const[d,c]of Object.entries(u))s[d]||(s[d]=[]),s[d]=s[d].concat(c)}else typeof n[r]=="string"&&(typeof s[n[r]]>"u"&&(s[n[r]]=[]),s[n[r]].push(l))}else typeof n=="string"&&(typeof s[n]>"u"&&(s[n]=[]),s[n].push(a));return s}},network:{originalOpen:XMLHttpRequest.prototype.open,originalSend:XMLHttpRequest.prototype.send,setRequestHeaderOriginal:XMLHttpRequest.prototype.setRequestHeader,rules:[{url:/https:\/\/www\.guanleiming\.com\/a\/b\/.html/,methods:["GET","POST"],params:["a","b1"]}],getRuleMatch:function(n,a){for(let s=0;s<t.network.rules.length;s++){const r=t.network.rules[s];if(typeof r.url>"u"&&r.url==""){console.log("WARINNG : translate.network.rule find url is null:"),console.log(r);continue}if(!(!r.url.test(n)||!r.methods.includes(a.toUpperCase())))return r}return null},use:function(){XMLHttpRequest.prototype.open=function(...n){return t.network.hookOpen.apply(this,n)},XMLHttpRequest.prototype.send=function(...n){return t.network.hookSend.apply(this,n)},XMLHttpRequest.prototype.setRequestHeader=function(...n){return t.network.setRequestHeader.apply(this,n)},t.network.fetch.use()},_translateText(n){return t.language.getLocal()==t.language.getCurrent()||typeof n=="string"&&n.length>0&&t.language.recognition(n).languageName==t.language.getLocal()?new Promise((a,s)=>{const r={from:"auto",to:t.language.getLocal(),text:[n]};a(r)}):new Promise((a,s)=>{const r={from:"auto",to:t.language.getLocal(),texts:[n]};t.request.translateText(r,function(l){l.result===1?a(l):s(l)})})},setRequestHeader:function(n,a){return this._requestContext&&(this._requestContext.headers=this._requestContext.headers||{},this._requestContext.headers[n]=a),t.network.setRequestHeaderOriginal.call(this,n,a)},RequestHandler:{async handleGet(n,a){typeof a.params>"u"&&typeof a.params.length>"u"&&a.params.length<1&&(console.log("WARINNG: rule not find params , rule : "),console.log(a),a.params=[]);try{const l=new URL(n,window.location.origin),u=l.searchParams;for(var s=0;s<a.params.length;s++){var r=a.params[s];if(u.has(r)){const d=u.get(r),c=await t.network._translateText(d);typeof c>"u"?console.log("WARINNG: translateResultData is undefined"):typeof c.result>"u"?console.log("WARINNG: translateResultData.result is undefined"):c.result!=1?console.log("WARINNG: translateResultData.result failure : "+c.info):u.set(r,decodeURIComponent(c.text[0]))}}return l.toString()}catch(l){return console.warn("GET处理失败:",l),n}},async handleForm(n,a){try{const s=new URLSearchParams(n),r={...s};for(const l of a.params)if(s.has(l)){const u=s.get(l),d=await t.network._translateText(u);r[l]=d}return new URLSearchParams(r).toString()}catch(s){return console.warn("表单处理失败:",s),n}},async handleJson(n,a){try{const r={...JSON.parse(n)};for(const l of a.params)if(r.hasOwnProperty(l)){const u=r[l];r[l]=await t.network._translateText(u)}return JSON.stringify(r)}catch(s){return console.warn("JSON处理失败:",s),n}}},_requestContext:null,hookOpen(n,a,s,r,l){return this._requestContext={method:n.toUpperCase(),originalUrl:a,async:s,user:r,password:l,matchedRule:t.network.getRuleMatch(a,n)},t.network.originalOpen.call(this,n,a,s,r,l)},hookSend(n){const a=this._requestContext;if(!a||!a.matchedRule)return t.network.originalSend.call(this,n);const s=async()=>{let r=n;const l=a.method;try{const d=await t.network.RequestHandler.handleGet(a.originalUrl,a.matchedRule);if(t.network.originalOpen.call(this,l,d,a.async,a.user,a.password),a.headers)for(const c in a.headers)t.network.setRequestHeaderOriginal.call(this,c,a.headers[c]);if(l==="POST"&&typeof n<"u"&&n!=null&&n.length<2e3){var u=!1;if(n.trim().indexOf("[")==0||n.trim().indexOf("{")==0)try{r=await t.network.RequestHandler.handleJson(n,a.matchedRule),u=!0}catch{u=!1}if(!u)try{r=await t.network.RequestHandler.handleForm(n,a.matchedRule)}catch{}}}catch(d){console.warn("请求处理异常:",d)}t.network.originalSend.call(this,r)};a.async!==!1?s.call(this):(console.warn("同步请求不支持翻译拦截"),t.network.originalSend.call(this,n))},fetch:{originalFetch:window.fetch,use:function(){const n=this;window.fetch=function(...a){return n.hookFetch.apply(n,a)}},hookFetch:async function(n,a){const s=new Request(n,a),r=s.url,l=s.method,u=t.network.getRuleMatch(r,l);if(!u)return this.originalFetch.call(window,s);const d={method:l,url:r,headers:{},rule:u,isModified:!1};s.headers.forEach((f,h)=>{d.headers[h]=f}),this._requestContext=d;try{const f=await t.network.RequestHandler.handleGet(r,u);if(l==="GET"){const h=new Request(f,{method:l,headers:new Headers(d.headers),mode:s.mode,credentials:s.credentials,cache:s.cache,redirect:s.redirect,referrer:s.referrer,referrerPolicy:s.referrerPolicy});return this.originalFetch.call(window,h)}if(l==="POST"){let h=null;s.body&&(h=await s.clone().text());const p=s.headers.get("Content-Type");let v=h;if(typeof h<"u"&&h!=null&&h.length<2e3){var c=!1;if(h.trim().indexOf("[")==0||h.trim().indexOf("{")==0)try{v=await t.network.RequestHandler.handleJson(h,u),c=!0}catch{c=!1}if(!c)try{v=await t.network.RequestHandler.handleForm(h,u)}catch{}}const y=new Request(f,{method:l,headers:new Headers(d.headers),body:v,mode:s.mode,credentials:s.credentials,cache:s.cache,redirect:s.redirect,referrer:s.referrer,referrerPolicy:s.referrerPolicy});return this.originalFetch.call(window,y)}return this.originalFetch.call(window,s)}catch(f){return console.warn("fetch 请求处理异常:",f),this.originalFetch.call(window,s)}},_requestContext:null}},visual:{getRects:function(n){return n.map(a=>{if(!a)return null;let s;if(a.nodeType===Node.TEXT_NODE){const r=document.createRange();r.selectNodeContents(a);const l=r.getClientRects();s=l.length>0?l[0]:null}else a.nodeType===Node.ELEMENT_NODE&&(s=a.getBoundingClientRect());return s?{node:a,left:s.left,top:s.top,right:s.right,bottom:s.bottom,width:s.width,height:s.height}:null})},coordinateSort:function(n){return n.filter(s=>s!==null).sort((s,r)=>Math.abs(s.top-r.top)<5?s.left-r.left:s.top-r.top)},afterAdjacent:function(n){var a=t.visual.coordinateSort(n);const s=[];return t.visual.groupRectsByLine(a).forEach(l=>{for(let u=0;u<l.length;u++)for(let d=u+1;d<l.length;d++){const c=l[u],f=l[d];if(!t.visual.areHorizontallyAdjacent(c,f))break;s.push({before:c,after:f})}}),s},groupRectsByLine:function(n){const a=[];let s=[];return n.forEach(r=>{if(s.length===0)s.push(r);else{const l=s[s.length-1];Math.abs(r.top-l.top)<5?s.push(r):(a.push(s),s=[r])}}),s.length>0&&a.push(s),a},areHorizontallyAdjacent:function(n,a){const s=Math.min(n.bottom,a.bottom)-Math.max(n.top,a.top),r=a.left-n.right;return s>0&&Math.abs(r)<1},afterAddSpace:function(n){const a=[];return n.forEach(s=>{const{before:r,after:l}=s,u=r.node,d=l.node,c=window.getComputedStyle(u.nodeType===Node.TEXT_NODE?u.parentElement:u),f=window.getComputedStyle(d.nodeType===Node.TEXT_NODE?d.parentElement:d),h=parseFloat(c.marginRight)>0||parseFloat(c.paddingRight)>0,p=parseFloat(f.marginLeft)>0||parseFloat(f.paddingLeft)>0;!h&&!p&&typeof u.textContent=="string"&&typeof d.textContent=="string"&&(/\s$/.test(u.textContent)||/^\s/.test(d.textContent)||a.push(u))}),a},adjustTranslationSpaces:function(n){if(!t.language.wordBlankConnector(t.to))return;const a=t.visual.getRects(n),s=t.visual.afterAdjacent(a);t.visual.afterAddSpace(s).forEach(l=>{if(l.nodeType===Node.TEXT_NODE)l.textContent=l.textContent+" ";else if(l.nodeType===Node.ELEMENT_NODE){const u=l.lastChild;u&&u.nodeType===Node.TEXT_NODE&&(u.textContent=u.textContent+" ")}})},adjustTranslationSpacesByNodequeueUuid:function(n){var a=[];for(var s in t.nodeQueue[n].list)if(t.nodeQueue[n].list.hasOwnProperty(s)&&!(s.length<1)){for(var r in t.nodeQueue[n].list[s])if(t.nodeQueue[n].list[s].hasOwnProperty(r)){for(var l in t.nodeQueue[n].list[s][r].nodes)if(t.nodeQueue[n].list[s][r].nodes.hasOwnProperty(l)){var u=t.nodeQueue[n].list[s][r].nodes[l].node;a.push(u)}}}t.visual.adjustTranslationSpaces(a)},adjustTranslationSpacesByLastNodequeueUuid:function(a){var a="";for(var s in t.nodeQueue){a=s;break}typeof a=="string"&&a.length>1&&t.visual.adjustTranslationSpacesByNodequeueUuid(a)},hideText:{style:`
/* 文本隐藏核心样式 - 仅隐藏文本内容 */
html.translatejs-text-hidden p, html.translatejs-text-hidden div,
html.translatejs-text-hidden h1, html.translatejs-text-hidden h2, html.translatejs-text-hidden h3,
html.translatejs-text-hidden h4, html.translatejs-text-hidden h5, html.translatejs-text-hidden h6,
html.translatejs-text-hidden span, html.translatejs-text-hidden a, html.translatejs-text-hidden b,
html.translatejs-text-hidden strong, html.translatejs-text-hidden i, html.translatejs-text-hidden em,
html.translatejs-text-hidden mark,
html.translatejs-text-hidden blockquote, html.translatejs-text-hidden ul, html.translatejs-text-hidden ol,
html.translatejs-text-hidden li, html.translatejs-text-hidden table, html.translatejs-text-hidden th,
html.translatejs-text-hidden td, html.translatejs-text-hidden label, html.translatejs-text-hidden button,
html.translatejs-text-hidden input, html.translatejs-text-hidden select, html.translatejs-text-hidden textarea {
color: transparent !important;
text-shadow: none !important;
}
/* 隐藏占位符文字 */
html.translatejs-text-hidden ::placeholder {
color: transparent !important;
}
/* 确保媒体元素不受影响 */
img, video, iframe, canvas, svg,
object, embed, picture, source {
color: initial !important;
}
/* 忽略隐藏的元素保持可见 */
.ignore-hidden {
color: inherit !important;
}
`,hide:function(){const n=document.createElement("style");n.textContent=t.visual.hideText.style,document.head.appendChild(n),document.documentElement.classList.add("translatejs-text-hidden")},show:function(){document.documentElement.classList.remove("translatejs-text-hidden")}},webPageLoadTranslateBeforeHiddenText:function(){typeof document.body>"u"||document.body==null||console.log("错误警告: translate.visual.webPageLoadTranslateBeforeHiddenText() 要在 head 标签中触发才能达到最好的效果!"),t.language.local==""&&console.log("错误警告:在使用 translate.visual.webPageLoadTranslateBeforeHiddenText() 之前,请先手动设置你的本地语种,参考: http://translate.zvo.cn/4066.html 如果你不设置,则不管你是否有切换语言,网页打开后都会先短暂的不显示文字"),(t.language.local==""||t.language.local!=t.language.getCurrent())&&(t.visual.hideText.hide(),t.lifecycle.execute.renderFinish.push(function(n,a){t.visual.hideText.show()}))}}},o={index:function(n){var a=n.parentElement;if(a==null)return"";var s;if(typeof n.tagName>"u")s=a.childNodes;else{s=[];for(var r=a.childNodes,l=0;l<r.length;l++)r[l].tagName===n.tagName&&s.push(r[l])}var u=Array.prototype.indexOf.call(s,n);return n.nodeName+""+(u+1)},uuid:function(n){for(var a="",s=n;s!=null;){var r=o.index(s);r!=""&&(a!=""&&(a="_"+a),a=r+a),s=s.parentElement}return a}};console.log(`------ translate.js ------
Two lines of js html automatic translation, page without change, no language configuration file, no API Key, SEO friendly! Open warehouse : https://github.com/xnx3/translate
两行js实现html全自动翻译。 无需改动页面、无语言配置文件、无API Key、对SEO友好!完全开源,代码仓库:https://gitee.com/mail_osc/translate`),(function(n,a){e.exports?e.exports=a():n.translate=a()})(Dx,function(){return t})})(Nr)),Nr.exports}var Fx=Px();const wa=_g(Fx),Dn={getHistory:async()=>await Ae({url:"/prompt/history/get_history",method:"get"}),saveHistory:async e=>await Ae({url:"/prompt/history/add_history",method:"post",data:e}),deleteHistory:async e=>await Ae({url:"/prompt/history/delete_history",method:"post",data:{id_index:e}}),batchDeleteHistory:async e=>await Ae({url:"/prompt/history/batch_delete_history",method:"post",data:{id_index:e}}),getFavorite:async()=>await Ae({url:"/prompt/collect_history/get_collect_history",method:"get"}),addFavorite:async e=>await Ae({url:"/prompt/collect_history/add_collect_history",method:"post",data:e}),editFavorite:async e=>await Ae({url:"/prompt/collect_history/edit_collect_history",method:"post",data:e}),deleteFavorite:async e=>await Ae({url:"/prompt/collect_history/delete_collect_history",method:"post",data:{id_index:e}}),batchDeleteFavorite:async e=>await Ae({url:"/prompt/collect_history/batch_delete_collect_history",method:"post",data:{id_indices:e}})},Ux={class:"lora-manager-top-bar"},Bx=["placeholder"],Hx=["title"],jx=["title"],Wx={class:"checkbox-container"},Vx=["onClick"],zx=["onClick"],qx={key:0,class:"loading-indicator"},Gx={key:1,class:"empty-list"},Qx=["onClick","onMouseover"],Yx=["src","alt","title"],Kx={key:0,class:"loading-more"},Jx={key:1,class:"no-more-data"},Pt="weilin_prompt_ui_",bg=wt({__name:"lora_index",props:{loraManager:{type:String,default:"look"}},setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b(!1),s=b(!1),r=b(!1),l=b("all"),u=b(""),d=b(null),c=b(""),f=b(null),h=b(!1),p=b(""),v=b(100),y=b(0),T=b(),k=b(!1),$=b(!1),B=b(),w=b(localStorage.getItem("weilin_prompt_ui_showHoverInfo")),M=b(localStorage.getItem("weilin_prompt_ui_clickAddTag"));(w.value===null||w.value===void 0||w.value==="")&&(localStorage.setItem("weilin_prompt_ui_showHoverInfo",!0),w.value=!0),(M.value===null||M.value===void 0||M.value==="")&&(localStorage.setItem("weilin_prompt_ui_clickAddTag",!1),M.value=!1);const H=e;dt(w,_=>{localStorage.setItem("weilin_prompt_ui_showHoverInfo",_)}),dt(M,_=>{localStorage.setItem("weilin_prompt_ui_clickAddTag",_)});const W=b(1),D=b(50),I=nt(()=>{if(l.value==="all"){const _=X.value;if(_){const A=Object.values(_);return Math.ceil(A.length/D.value)}}else{const _=X.value[u.value];if(_){const A=Object.values(_);return Math.ceil(A.length/D.value)}return 1}}),ee=()=>{k.value=!0,$.value=!0},K=(_,A)=>{if(!w.value||w.value=="false"||($.value=!0,p.value===_&&h.value))return;const me=A.currentTarget.getBoundingClientRect(),ue=window.innerHeight,z=450;let ae={left:me.left+(me.width-z)/2,top:me.top+me.height+10};ae.top+310>ue&&(ae.top=me.top-310),ae.left=Math.max(10,Math.min(ae.left,window.innerWidth-z-10)),ae.top=Math.max(10,Math.min(ae.top,ue-310)),v.value=ae.left,y.value=ae.top,h.value=!0,p.value=_,Qe(()=>{B.value.refresh()})},V=()=>{$.value=!1,setTimeout(()=>{!k.value&&!$.value&&(h.value=!1,p.value="",k.value=!1)},200)},ne=()=>{h.value=!1,p.value="",k.value=!1},oe=b([]),X=b([]),re=b(""),se=b(0),F=(_,A)=>{se.value=_,re.value=A},R=async()=>{try{const _=await xn.getLoraFolderList();oe.value=_.data}catch(_){console.error("Failed to get folder list:",_),Y({type:"error",str:"message.loadFailed"})}},ie=()=>{if(!f.value||s.value||r.value)return;const _=f.value;_.scrollHeight-_.scrollTop-_.clientHeight<100&&J()},Te=b(!1);let te=null;const le=()=>{te&&clearTimeout(te),te=setTimeout(()=>{c.value.length>0?(Te.value=!0,P()):(Te.value=!1,N())},300)},ve=_=>{var A;return(A=_.local_info)!=null&&A.name&&_.local_info.name!==""&&_.local_info.name.length>0?_.local_info.name:_.name},xe=b(),pe=_=>{H.loraManager==="addLora"?he(_):H.loraManager==="prompt_inner"&&M.value?S(_):xe.value.open(_)},P=async()=>{try{const _=await xn.searchLoraGetFolderList(c.value);if(X.value=_.data,X.value.length>0){W.value=1;const A=Object.values(X.value),j=(W.value-1)*50,me=j+50,ue=A.slice(j,me);Q(ue)}}catch(_){console.error("Failed to get folder list:",_),Y({type:"error",str:"message.loadFailed"})}},q=b([]),Z=_=>{if(_==="all"){q.value=[],l.value=_,u.value="/",X.value=oe.value[_];const A=X.value;if(A){r.value=!1,W.value=1;const j=Object.values(A),me=(W.value-1)*50,ue=me+50,z=j.slice(me,ue);Q(z)}}else{q.value=[],l.value=_,u.value="/",X.value=oe.value[_];const A=X.value["/"];if(A){r.value=!1,W.value=1;const j=Object.values(A),me=(W.value-1)*50,ue=me+50,z=j.slice(me,ue);Q(z)}}},O=_=>{if(_!=u.value){u.value=_,q.value=[];const A=X.value[u.value];if(A){r.value=!1,W.value=1;const j=Object.values(A),me=(W.value-1)*50,ue=me+50,z=j.slice(me,ue);Q(z)}}},Q=async _=>{const A=await xn.getLoraRangeList(_);W.value===1?q.value=A.data.loras:q.value=q.value.concat(A.data.loras)},E=async()=>{if(d.value!=null){Y({type:"warn",str:"message.isLoading"});return}try{Y({type:"success",str:"message.isLoadingPleaseWait"}),await xn.getAllLoraList(),d.value=setInterval(async()=>{await L()},1e3)}catch(_){console.error("Failed to get all lora list:",_),Y({type:"error",str:"message.loadFailed"})}},L=async()=>{try{const _=await xn.getAllLoraStatus();_.data.isLoading===!1?(clearInterval(d.value),d.value=null,Y({type:"success",str:"message.loaddingSuccess"}),await N()):Y({type:"warn",str:"message.loaddingPrc",name:_.data.progress})}catch(_){console.error("Failed to get lora status:",_),clearInterval(d.value),d.value=null,Y({type:"error",str:"message.loadFailed"})}},N=async()=>{if(!n.value){n.value=!0,W.value=1,r.value=!1,s.value=!1;try{await R(),Qe(()=>{Z("all")})}catch(_){console.error("Failed to refresh lora list:",_)}finally{n.value=!1}}},J=async()=>{if(W.value>=I.value){r.value=!0;return}s.value=!0;try{if(W.value++,Te.value){if(X.value=res.data,X.value.length>0){const _=Object.values(X.value),A=(W.value-1)*50,j=A+50,me=_.slice(A,j);Q(me)}}else if(l.value==="all"){X.value=oe.value[l.value];const _=X.value;if(_){const A=Object.values(_),j=(W.value-1)*50,me=j+50,ue=A.slice(j,me);Q(ue)}}else{const _=X.value[u.value];if(_){const A=Object.values(_),j=(W.value-1)*50,me=j+50,ue=A.slice(j,me);Q(ue)}}}finally{s.value=!1}},de=()=>{W.value=1,r.value=!1,s.value=!1};dt([l,u,c],()=>{de()}),_t(()=>{N()});const he=_=>{var A,j,me,ue,z,ae,Me,Pe,je;se.value===0?window.postMessage({type:"weilin_prompt_ui_selectLora",lora:{name:_.model_name,display_name:ve(_),lora:_.name,weight:(A=_.local_info)!=null&&A.strengthMin?_.local_info.strengthMin:.5,text_encoder_weight:(j=_.local_info)!=null&&j.strWeight?_.local_info.strWeight:.5,loraWorks:(me=_.local_info)!=null&&me.loraWorks?_.local_info.loraWorks:""}},"*"):se.value===1?window.postMessage({type:"weilin_prompt_ui_selectLora_stack_"+re.value,lora:{name:_.model_name,display_name:ve(_),lora:_.name,weight:(ue=_.local_info)!=null&&ue.strengthMin?_.local_info.strengthMin:.5,text_encoder_weight:(z=_.local_info)!=null&&z.strWeight?_.local_info.strWeight:.5,loraWorks:(ae=_.local_info)!=null&&ae.loraWorks?_.local_info.loraWorks:""}},"*"):se.value===2&&window.postMessage({type:"weilin_prompt_ui_selectLora_stack_node_"+re.value,lora:{name:_.model_name,display_name:ve(_),lora:_.name,weight:(Me=_.local_info)!=null&&Me.strengthMin?_.local_info.strengthMin:.5,text_encoder_weight:(Pe=_.local_info)!=null&&Pe.strWeight?_.local_info.strWeight:.5,loraWorks:(je=_.local_info)!=null&&je.loraWorks?_.local_info.loraWorks:""}},"*")},S=_=>{var A,j,me;window.postMessage({type:"weilin_prompt_ui_addLoraTag_inner",lora:{tag:`<wlr:${_.model_name}:${(A=_.local_info)!=null&&A.strengthMin?_.local_info.strengthMin:.5}:${(j=_.local_info)!=null&&j.strWeight?_.local_info.strWeight:.5}>`,loraWorks:(me=_.local_info)!=null&&me.loraWorks?_.local_info.loraWorks:""}},"*")};return t({openSetSeed:F}),(_,A)=>(x(),C("div",{class:Ce(`${Pt}lora-manager`)},[i("div",Ux,[we(i("input",{"onUpdate:modelValue":A[0]||(A[0]=j=>c.value=j),class:Ce(`${Pt}search-input`),placeholder:g(o)("loraManager.searchPlaceholder"),onInput:le},null,42,Bx),[[$e,c.value]]),i("button",{class:Ce(`${Pt}refresh-btn`),onClick:N,title:g(o)("loraManager.refresh")},[(x(),C("svg",{class:Ce([`${Pt}refresh-icon`,{"is-rotating":n.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},[...A[3]||(A[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,Hx),i("button",{style:{"margin-left":"10px"},class:Ce(`${Pt}refresh-btn`),onClick:E,title:g(o)("loraManager.cacheAll")},[(x(),C("svg",{class:Ce([`${Pt}refresh-icon`,{"is-rotating":n.value}]),viewBox:"0 0 24 24",width:"20",height:"20"},[...A[4]||(A[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,jx),i("div",Wx,[i("label",{class:Ce(`${Pt}checkbox-label`)},[we(i("input",{type:"checkbox","onUpdate:modelValue":A[1]||(A[1]=j=>w.value=j),class:Ce(`${Pt}checkbox`)},null,2),[[Vt,w.value]]),A[5]||(A[5]=i("span",null,"悬浮信息",-1))],2),e.loraManager=="prompt_inner"?(x(),C("label",{key:0,class:Ce(`${Pt}checkbox-label`)},[we(i("input",{type:"checkbox","onUpdate:modelValue":A[2]||(A[2]=j=>M.value=j),class:Ce(`${Pt}checkbox`)},null,2),[[Vt,M.value]]),A[6]||(A[6]=i("span",null,"点击添加Tag",-1))],2)):fe("",!0)])]),Te.value?fe("",!0):(x(),C("div",{key:0,class:Ce(`${Pt}category-nav`)},[(x(!0),C(Oe,null,We(Object.keys(oe.value),j=>(x(),C("button",{key:j,class:Ce([`${Pt}category-btn`,{active:l.value===j}]),onClick:me=>Z(j)},m(j==="/"?g(o)("loraManager.root"):j=="all"?g(o)("loraManager.all"):j),11,Vx))),128))],2)),l.value!="all"&&!Te.value?(x(),C("div",{key:1,class:Ce(`${Pt}subcategory-nav`)},[(x(!0),C(Oe,null,We(Object.keys(X.value),j=>(x(),C("button",{key:j,class:Ce([`${Pt}category-btn`,{active:u.value===j}]),onClick:me=>O(j)},m(j==="/"?g(o)("loraManager.root"):j=="all"?g(o)("loraManager.all"):j),11,zx))),128))],2)):fe("",!0),i("div",{class:Ce(`${Pt}lora-list-container`),ref_key:"scrollContainer",ref:f,onScroll:ie},[a.value&&!s.value?(x(),C("div",qx,m(g(o)("loraManager.loading")),1)):q.value.length===0?(x(),C("div",Gx,m(g(o)("loraManager.noResults")),1)):fe("",!0),i("div",{class:Ce(`${Pt}lora-list`),style:{display:"grid","grid-template-columns":"repeat(auto-fill, minmax(150px, 1fr))",gap:"12px"}},[(x(!0),C(Oe,null,We(q.value,j=>(x(),C("div",{key:j.file_path,class:Ce(`${Pt}lora-card`),ref_for:!0,ref_key:"loraCardRef",ref:T,onClick:me=>pe(j),onMouseover:me=>K(j.name,me),onMouseleave:V,style:{display:"flex","flex-direction":"column","min-height":"200px",cursor:"pointer"}},[i("div",{class:Ce(`${Pt}lora-preview`),style:{flex:"1",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden",width:"100%"}},[j.preview?(x(),C("img",{key:0,src:j.preview,alt:j.model_name,title:j.model_name,loading:"lazy",style:{width:"100%",height:"100%","object-fit":"contain","min-height":"150px"}},null,8,Yx)):(x(),C("div",{key:1,class:Ce(`${Pt}no-preview`),style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","min-height":"150px"}},[...A[7]||(A[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:Ce(`${Pt}lora-name`),style:{padding:"8px","text-align":"center","word-break":"break-word","white-space":"normal",display:"-webkit-box","-webkit-line-clamp":"2","-webkit-box-orient":"vertical",overflow:"hidden","min-height":"40px","max-height":"40px","line-height":"1.2","text-overflow":"ellipsis"}},m(ve(j)),3)],42,Qx))),128))],2),i("div",null,[s.value?(x(),C("div",Kx,m(g(o)("loraManager.loadingMore")),1)):fe("",!0),!s.value&&r.value?(x(),C("div",Jx,m(g(o)("loraManager.noMoreData")),1)):fe("",!0)])],34),qe(Rr,{ref_key:"loraDetailRef",ref:xe},null,512),h.value?(x(),yt(Hi,{key:2,ref_key:"loraCardItem",ref:B,fileNmae:p.value,paddingLeft:v.value,paddingTop:y.value,onCardLeave:ne,onCardenter:ee},null,8,["fileNmae","paddingLeft","paddingTop"])):fe("",!0)],2))}},[["__scopeId","data-v-2f0b875e"]]),Xx={class:"tag-manager"},Zx={class:"selected-categories-container"},e9={class:"selected-categories-header"},t9={class:"selected-categories-content"},n9={key:0,class:"selected-category-section"},o9={class:"section-title"},a9={class:"selected-items"},s9={class:"category-name"},r9=["onClick"],l9={key:1,class:"selected-category-section"},i9={class:"section-title"},u9={class:"selected-items"},c9={class:"category-name"},d9={class:"subcategory-name"},f9=["onClick"],p9={key:2,class:"no-selected"},g9={class:"category-tabs"},h9={class:"tabs-wrapper primary-tabs"},m9={class:"tabs-scroll"},v9=["onClick"],_9={class:"tab-text"},y9=["onClick","title"],b9={key:0,class:"tabs-wrapper group-tabs"},w9={class:"tabs-scroll"},x9=["onClick"],T9={class:"tab-text"},S9=["onClick","disabled","title"],k9=wt({__name:"tag_group_select",emits:["sureSelect"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=o,s=b([]),r=b(null),l=b(null),u=b([]),d=b(!1),c=b([]),f=b(!1),h=b(0),p=nt(()=>c.value.filter(ne=>!ne.sub)),v=nt(()=>c.value.filter(ne=>ne.sub)),y=ne=>c.value.findIndex(oe=>oe.group.p_uuid===ne.group.p_uuid&&!oe.sub),T=ne=>c.value.findIndex(oe=>oe.group.p_uuid===ne.group.p_uuid&&oe.sub&&oe.sub.g_uuid===ne.sub.g_uuid),k=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh_select"},"*")},$=async()=>{try{const ne=await Mt.getTagsGroupList();if(s.value=ne.info,l.value){const oe=s.value.flatMap(X=>X.groups).find(X=>X.p_uuid===l.value.p_uuid);oe?l.value=oe:l.value=null}if(r.value){const oe=s.value.find(X=>X.p_uuid===r.value.p_uuid);oe?r.value=oe:r.value=null}}catch(ne){console.error("获取标签列表失败:",ne)}},B=ne=>{if(!ne||ne==="transparent")return"var(--primary-text)";let oe,X,re,se=1;if(ne.startsWith("rgba")){const R=ne.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);R&&([,oe,X,re,se]=R.map(Number))}else if(ne.startsWith("rgb")){const R=ne.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);R&&([,oe,X,re]=R.map(Number))}return se<.5?"var(--primary-text)":(oe*299+X*587+re*114)/1e3>128?"#000000":"#ffffff"};_t(()=>{window.addEventListener("message",K)}),ia(()=>{window.removeEventListener("message",K)});const w=ne=>{r.value=ne,l.value=null,d.value=!1,u.value=[]},M=ne=>{H(r.value)||(l.value=ne,d.value=!1,u.value=[])},H=ne=>ne?c.value.some(oe=>oe.group.p_uuid===ne.p_uuid&&!oe.sub):!1,W=ne=>{const oe=c.value.findIndex(X=>X.group.p_uuid===ne.p_uuid&&!X.sub);oe!==-1?c.value.splice(oe,1):(c.value=c.value.filter(X=>X.group.p_uuid!==ne.p_uuid),c.value.push({group:{p_uuid:ne.p_uuid,name:ne.name},sub:null}))},D=(ne,oe)=>{if(H(ne))return;const X=c.value.findIndex(re=>re.group.p_uuid===ne.p_uuid&&re.sub&&re.sub.g_uuid===oe.g_uuid);if(X!==-1)c.value.splice(X,1);else{const re=c.value.findIndex(se=>se.group.p_uuid===ne.p_uuid&&!se.sub);re!==-1&&c.value.splice(re,1),c.value.push({group:{p_uuid:ne.p_uuid,name:ne.name},sub:oe?{g_uuid:oe.g_uuid,name:oe.name}:null})}},I=ne=>{c.value.splice(ne,1)},ee=()=>{c.value=[]},K=ne=>{ne.data.type==="weilin_prompt_ui_tag_manager_refresh_select"&&$()},V=()=>{if(c.value.length===0){Y({type:"warn",str:"message.pleaseSelectGroup"});return}a("sureSelect",{data:c.value,index:h.value}),f.value=!1};return t({open:(ne,oe)=>{k(),h.value=ne,c.value=oe,f.value=!0}}),(ne,oe)=>(x(),yt(ps,{modelValue:f.value,"onUpdate:modelValue":oe[1]||(oe[1]=X=>f.value=X),title:g(n)("importDialog.selectTitle")},{footer:pt(()=>[i("button",{onClick:oe[0]||(oe[0]=X=>f.value=!1)},m(g(n)("promptBox.settings.close")),1),i("button",{onClick:V},m(g(n)("importDialog.sureSelect")),1)]),default:pt(()=>[i("div",Xx,[i("div",Zx,[i("div",e9,[i("span",null,m(g(n)("importDialog.selectedCategories")),1),c.value.length>0?(x(),C("button",{key:0,class:"clear-all-btn",onClick:ee},m(g(n)("importDialog.clearAll")),1)):fe("",!0)]),i("div",t9,[p.value.length>0?(x(),C("div",n9,[i("div",o9,m(g(n)("importDialog.primaryCategories")),1),i("div",a9,[(x(!0),C(Oe,null,We(p.value,(X,re)=>(x(),C("div",{key:"primary-"+re,class:"selected-item"},[i("span",s9,m(X.group.name),1),i("button",{class:"remove-selected-btn",onClick:se=>I(y(X))},"×",8,r9)]))),128))])])):fe("",!0),v.value.length>0?(x(),C("div",l9,[i("div",i9,m(g(n)("importDialog.subCategories")),1),i("div",u9,[(x(!0),C(Oe,null,We(v.value,(X,re)=>(x(),C("div",{key:"sub-"+re,class:"selected-item"},[i("span",c9,m(X.group.name),1),oe[2]||(oe[2]=i("span",{class:"separator"},">",-1)),i("span",d9,m(X.sub.name),1),i("button",{class:"remove-selected-btn",onClick:se=>I(T(X))},"×",8,f9)]))),128))])])):fe("",!0),c.value.length===0?(x(),C("div",p9,m(g(n)("importDialog.noSelectedCategories")),1)):fe("",!0)])]),i("div",g9,[i("div",h9,[i("div",m9,[(x(!0),C(Oe,null,We(s.value,(X,re)=>{var se,F,R;return x(),C("div",{key:"Tabss-"+re,class:Ce(["tab-item",{active:((se=r.value)==null?void 0:se.p_uuid)===X.p_uuid}]),style:ct({backgroundColor:((F=r.value)==null?void 0:F.p_uuid)===X.p_uuid?"var(--weilin-prompt-ui-primary-bg)":X.color,color:((R=r.value)==null?void 0:R.p_uuid)===X.p_uuid?"var(--weilin-prompt-ui-primary-text)":B(X.color)}),onClick:ie=>w(X)},[i("span",_9,m(X.name),1),i("button",{class:"select-tab-btn",onClick:ot(ie=>W(X),["stop"]),title:g(n)("importDialog.selectCategory")},[...oe[3]||(oe[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,y9)],14,v9)}),128))])]),r.value?(x(),C("div",b9,[i("div",w9,[(x(!0),C(Oe,null,We(r.value.groups,(X,re)=>{var se,F,R;return x(),C("div",{key:"TabsSw-"+re,class:Ce(["tab-item",{active:((se=l.value)==null?void 0:se.g_uuid)===X.g_uuid,disabled:H(r.value)}]),style:ct({backgroundColor:((F=l.value)==null?void 0:F.g_uuid)===X.g_uuid?"var(--weilin-prompt-ui-primary-bg)":X.color,color:((R=l.value)==null?void 0:R.g_uuid)===X.g_uuid?"var(--weilin-prompt-ui-primary-text)":B(X.color),opacity:H(r.value)?"0.5":"1",cursor:H(r.value)?"not-allowed":"pointer"}),onClick:ie=>H(r.value)?null:M(X)},[i("span",T9,m(X.name),1),H(r.value)?fe("",!0):(x(),C("button",{key:0,class:"select-tab-btn",onClick:ot(ie=>D(r.value,X),["stop"]),disabled:H(r.value),title:g(n)("importDialog.selectSubcategory")},[...oe[4]||(oe[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,S9))],14,x9)}),128))])])):fe("",!0)])])]),_:1},8,["modelValue","title"]))}},[["__scopeId","data-v-7c9863cd"]]),cn={getTemplateList:async()=>await Ae({url:"/random_template/get_template_list",method:"post"}),getTemplateData:async e=>await Ae({url:"/random_template/get_template_data",method:"post",data:{name:e}}),saveTemplateData:async e=>await Ae({url:"/random_template/save_template",method:"post",data:{data:e}}),updateTemplateData:async(e,t)=>await Ae({url:"/random_template/update_template",method:"post",data:{name:e,data:t}}),deleteTemplateData:async e=>await Ae({url:"/random_template/delete_template",method:"post",data:{name:e}}),getRandomTemplateApple:async()=>await Ae({url:"/get/setting/get_random_template_setting",method:"post"}),updateRandomTemplateApple:async e=>await Ae({url:"/update/setting/update_random_template_setting",method:"post",data:{path:e}}),goRandomTemplate:async()=>await Ae({url:"/random_template/go_random_template",method:"post"}),goRandomTemplatePath:async e=>await Ae({url:"/random_template/go_random_template_path",method:"post",data:{name:e}})},C9={class:"random-rule-container"},E9={class:"settings-section template-section"},L9={class:"section-header"},$9={class:"template-controls"},A9={class:"template-select-group"},I9={class:"template-select-with-apply"},M9={value:""},O9=["value"],R9=["disabled"],N9={class:"template-bottom-buttons"},D9=["disabled"],P9=["disabled"],F9={key:0,class:"template-name-input"},U9=["placeholder"],B9={class:"template-actions"},H9={key:0},j9={class:"settings-section"},W9={class:"section-header"},V9={class:"rules-reminder"},z9={class:"rules-list"},q9={class:"rule-header"},G9=["onClick"],Q9={class:"rule-content"},Y9={class:"form-group"},K9={class:"range-inputs"},J9=["onUpdate:modelValue"],X9=["onUpdate:modelValue"],Z9={class:"form-group"},eT=["onUpdate:modelValue"],tT={value:"category"},nT={value:"specific"},oT={key:0,class:"form-group"},aT={class:"selected-categories-container"},sT={class:"selected-categories-header"},rT={class:"selected-categories-content"},lT={key:0,class:"selected-category-section"},iT={class:"section-title"},uT={class:"selected-items"},cT={class:"category-name"},dT={key:1,class:"selected-category-section"},fT={class:"section-title"},pT={class:"selected-items"},gT={class:"category-name"},hT={class:"subcategory-name"},mT={key:2,class:"no-selected"},vT=["onClick"],_T={key:1,class:"form-group"},yT={class:"tags-input-container"},bT=["onClick"],wT=["onUpdate:modelValue","onKeydown","placeholder"],xT=["onClick"],TT={class:"actions-section"},ST=["disabled"],wg="weilin_tools_",kT=wt({__name:"random_setting",emits:["close","update","generateRandomTags"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b(null),r=b(!1),l=b(""),u=b(""),d={randomRuleSetting:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},c={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:""}]},f=b({});async function h(){try{l.value=="prompt_global"?await cn.getRandomTemplateApple().then(async Z=>{Z.data==""?f.value=c:await cn.getTemplateData(Z.data).then(async O=>{X.value=Z.data,f.value=O.data,r.value=!0}).catch(O=>{console.error("加载模板失败:",O),Y({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(Z=>{console.error(Z),Y({type:"warn",str:"message.networkError"})}):u.value==""?f.value=c:await cn.getTemplateData(u.value).then(async Z=>{X.value=u.value,f.value=Z.data,r.value=!0}).catch(Z=>{console.error("加载模板失败:",Z),Y({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(Z){Y({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",Z)}}function p(){try{const Z=JSON.parse(JSON.stringify(f.value));Z.rules&&Z.rules.forEach(O=>{delete O.tagInput}),cn.updateTemplateData(X.value,Z).then(async O=>{await cn.getTemplateData(O.path_name).then(async Q=>{f.value=Q.data,Y({type:"success",str:"randomUtils.templateSaved"})}).catch(Q=>{console.error("加载模板失败:",Q),Y({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}).catch(O=>{console.error("更新模板失败:",O),Y({type:"warn",str:"randomUtils.errorSavingTemplate"})})}catch(Z){console.error("Error saving random tag settings:",Z),Y({type:"warn",str:"randomUtils.errorSavingSettings"})}}function v(){f.value.rules.push({range:{min:f.value.rules.length>0?f.value.rules[f.value.rules.length-1].range.max+1:1,max:f.value.rules.length>0?f.value.rules[f.value.rules.length-1].range.max+3:3},type:"category",categoryId:1,specificTags:[],tagGroupList:[],tagInput:""})}function y(Z){f.value.rules.splice(Z,1)}function T(Z){Z.tagInput&&Z.tagInput.trim()&&(Z.specificTags.push(Z.tagInput.trim()),Z.tagInput="")}function k(Z,O){Z.specificTags.splice(O,1)}function $(){}const w=b((()=>{try{const Z=localStorage.getItem(`${wg}randomRuleSettingState`);if(Z){const O=JSON.parse(Z),Q={...d};return O.randomRuleSetting&&(Q.randomRuleSetting={...d.randomRuleSetting,...O.randomRuleSetting}),Q}}catch(Z){console.error("Error loading window states:",Z)}return{...d}})());dt(w,Z=>{try{localStorage.setItem(`${wg}randomRuleSettingState`,JSON.stringify(Z))}catch(O){console.error("Error saving window states:",O)}},{deep:!0});const M=Z=>{a.value=!1},H=(Z,O)=>{w.value[Z]&&(w.value[Z].position={...O})},W=(Z,O)=>{w.value[Z]&&(w.value[Z].size={...O})},D=Z=>{a.value=!0,l.value=Z,Be.registerWindow("randomRuleSetting"),Qe(()=>{Be.setActiveWindow("randomRuleSetting"),Z=="prompt_global"?R(1):P()})},I=(Z,O)=>{s.value.open(Z,O)},ee=()=>void 0,K=Z=>!Z||!Array.isArray(Z)||Z.length<=0?[]:Z.filter(O=>!O.sub),V=Z=>!Z||!Array.isArray(Z)||Z.length<=0?[]:Z.filter(O=>O.sub),ne=Z=>{Z&&Z.data&&Array.isArray(Z.data)?f.value.rules[Z.index].tagGroupList=Z.data:f.value.rules[Z.index].tagGroupList=[]},oe=b([]),X=b(""),re=b(""),se=b(!1),F=b(!1);async function R(Z=0){try{await cn.getTemplateList().then(O=>{oe.value=O.data,Z==1&&h()}).catch(O=>{console.error(O),Y({type:"warn",str:"message.networkError"})})}catch(O){Y({type:"warn",str:"message.networkError"}),console.error("RandomTemplate获取列表失败:",O)}}function ie(){se.value=!0,re.value=""}function Te(){se.value=!1,re.value=""}function te(){if(!X.value){Y.warm(n("randomUtils.pleaseChooseTemplate"));return}l.value=="prompt_global"?cn.updateRandomTemplateApple(X.value).then(Z=>{Y({type:"success",str:"randomUtils.templateApplied"})}).catch(Z=>{console.error("获取模板失败:",Z),Y({type:"warn",str:"randomUtils.errorApplyingTemplate"})}):(window.postMessage({type:"weilin_prompt_ui_prompt_inner_update_node_tag_template_id",data:X.value},"*"),Y({type:"success",str:"randomUtils.templateApplied"}))}function le(){X.value&&cn.deleteTemplateData(X.value).then(()=>{Y({type:"success",str:"randomUtils.templateDeleted"}),R(),X.value=""}).catch(Z=>{console.error("删除模板失败:",Z),Y({type:"warn",str:"randomUtils.errorDeletingTemplate"})})}function ve(){if(!X.value)return;const Z=oe.value.find(O=>O.path_name===X.value);Z&&(se.value=!0,re.value=Z.file_name,F.value=!0)}function xe(){if(!re.value.trim()){Y({type:"warn",str:"randomUtils.templateNameRequired"});return}if(f.value.file_name=re.value.trim(),F.value){const Z=oe.value.find(O=>O.path_name===X.value);if(Z){Z.file_name=re.value.trim();const O=JSON.parse(JSON.stringify(f.value));O.rules&&O.rules.forEach(Q=>{delete Q.tagInput}),cn.updateTemplateData(Z.path_name,O).then(async Q=>{Y({type:"success",str:"randomUtils.templateSaved"}),await R().then(async()=>{await cn.getTemplateData(Q.path_name).then(async E=>{X.value=Q.path_name,f.value=E.data,Y({type:"success",str:"randomUtils.templateSaved"})}).catch(E=>{console.error("加载模板失败:",E),Y({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(Q=>{console.error("保存模板失败:",Q),Y({type:"warn",str:"randomUtils.errorSavingTemplate"})})}}else{f.value=c,f.value.file_name=re.value.trim();const Z=JSON.parse(JSON.stringify(f.value));Z.rules&&Z.rules.forEach(O=>{delete O.tagInput}),cn.saveTemplateData(Z).then(async O=>{await R().then(async()=>{await cn.getTemplateData(O.path_name).then(async Q=>{X.value=O.path_name,f.value=Q.data,Y({type:"success",str:"randomUtils.templateSaved"})}).catch(Q=>{console.error("加载模板失败:",Q),Y({type:"warn",str:"randomUtils.errorLoadingTemplate"})})})}).catch(O=>{console.error("保存模板失败:",O),Y({type:"warn",str:"randomUtils.errorSavingTemplate"})})}se.value=!1,re.value="",F.value=!1}const pe=async Z=>{if(Z.target.value!="")try{await cn.getTemplateData(Z.target.value).then(async O=>{X.value=O.path_name,f.value=O.data,r.value=!0}).catch(O=>{console.error("加载模板失败:",O),Y({type:"warn",str:"randomUtils.errorLoadingTemplate"})})}catch(O){Y({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",O)}},P=()=>{window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id"},"*")},q=Z=>{Z.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response"&&(u.value=Z.data.data,R(1))};return _t(()=>{window.addEventListener("message",q)}),On(()=>{Be.unregisterWindow("randomRuleSetting"),window.removeEventListener("message",q)}),t({open:D,getRandomTags:ee}),(Z,O)=>(x(),C(Oe,null,[a.value?(x(),yt(wn,{key:0,title:g(n)("randomUtils.title"),position:w.value.randomRuleSetting.position,size:w.value.randomRuleSetting.size,"z-index":g(Be).getZIndex("randomRuleSetting"),"onUpdate:position":O[2]||(O[2]=Q=>H("randomRuleSetting",Q)),"onUpdate:size":O[3]||(O[3]=Q=>W("randomRuleSetting",Q)),onActive:O[4]||(O[4]=Q=>g(Be).setActiveWindow("randomRuleSetting")),onClose:O[5]||(O[5]=Q=>M())},{default:pt(()=>[i("div",C9,[i("div",E9,[i("div",L9,[i("h3",null,m(g(n)("randomUtils.ruleTemplates")),1)]),i("div",$9,[i("div",A9,[i("div",I9,[we(i("select",{"onUpdate:modelValue":O[0]||(O[0]=Q=>X.value=Q),onChange:pe,class:"form-select template-select"},[i("option",M9,m(g(n)("randomUtils.selectTemplate")),1),(x(!0),C(Oe,null,We(oe.value,(Q,E)=>(x(),C("option",{key:E,value:Q.path_name},m(Q.file_name),9,O9))),128))],544),[[ln,X.value]]),i("button",{class:"apply-template-btn",onClick:te,disabled:!X.value},m(g(n)("randomUtils.applyTemplate")),9,R9)]),i("div",N9,[i("button",{class:"new-template-btn",onClick:ie},m(g(n)("randomUtils.newTemplate")),1),i("button",{class:"edit-template-btn",onClick:ve,disabled:!X.value},m(g(n)("randomUtils.editTemplate")),9,D9),i("button",{class:"delete-template-btn",onClick:le,disabled:!X.value},m(g(n)("randomUtils.deleteTemplate")),9,P9)])]),se.value?(x(),C("div",F9,[we(i("input",{type:"text","onUpdate:modelValue":O[1]||(O[1]=Q=>re.value=Q),class:"form-input",placeholder:g(n)("randomUtils.templateNamePlaceholder")},null,8,U9),[[$e,re.value]]),i("div",B9,[i("button",{class:"save-template-btn",onClick:xe},m(g(n)("randomUtils.save")),1),i("button",{class:"cancel-template-btn",onClick:Te},m(g(n)("randomUtils.cancel")),1)])])):fe("",!0)])]),X.value&&r.value?(x(),C("div",H9,[i("div",j9,[i("div",W9,[i("h3",null,m(g(n)("randomUtils.rules")),1),i("button",{class:"add-rule-btn",onClick:v},[O[6]||(O[6]=i("span",null,"+",-1)),Ve(" "+m(g(n)("randomUtils.addRule")),1)])]),i("div",V9,[i("p",null,m(g(n)("randomUtils.rulesReminder")),1)]),i("div",z9,[(x(!0),C(Oe,null,We(f.value.rules,(Q,E)=>(x(),C("div",{key:E,class:"rule-item"},[i("div",q9,[i("h4",null,m(g(n)("randomUtils.rule"))+" #"+m(E+1),1),i("button",{class:"delete-rule-btn",onClick:L=>y(E)},"×",8,G9)]),i("div",Q9,[i("div",Y9,[i("label",null,m(g(n)("randomUtils.range")),1),i("div",K9,[we(i("input",{type:"number","onUpdate:modelValue":L=>Q.range.min=L,min:"1",class:"form-input range-input"},null,8,J9),[[$e,Q.range.min,void 0,{number:!0}]]),O[7]||(O[7]=i("span",null,"-",-1)),we(i("input",{type:"number","onUpdate:modelValue":L=>Q.range.max=L,min:"1",class:"form-input range-input"},null,8,X9),[[$e,Q.range.max,void 0,{number:!0}]])])]),i("div",Z9,[i("label",null,m(g(n)("randomUtils.tagType")),1),we(i("select",{"onUpdate:modelValue":L=>Q.type=L,class:"form-select"},[i("option",tT,m(g(n)("randomUtils.category")),1),i("option",nT,m(g(n)("randomUtils.specificTags")),1)],8,eT),[[ln,Q.type]])]),Q.type==="category"?(x(),C("div",oT,[i("div",aT,[i("div",sT,[i("span",null,m(g(n)("importDialog.selectedCategories")),1)]),i("div",rT,[K(Q.tagGroupList).length>0?(x(),C("div",lT,[i("div",iT,m(g(n)("importDialog.primaryCategories")),1),i("div",uT,[(x(!0),C(Oe,null,We(K(Q.tagGroupList),(L,N)=>(x(),C("div",{key:"primary-"+N,class:"selected-item"},[i("span",cT,m(L.group.name),1)]))),128))])])):fe("",!0),V(Q.tagGroupList).length>0?(x(),C("div",dT,[i("div",fT,m(g(n)("importDialog.subCategories")),1),i("div",pT,[(x(!0),C(Oe,null,We(V(Q.tagGroupList),(L,N)=>(x(),C("div",{key:"sub-"+N,class:"selected-item"},[i("span",gT,m(L.group.name),1),O[8]||(O[8]=i("span",{class:"separator"},">",-1)),i("span",hT,m(L.sub.name),1)]))),128))])])):fe("",!0),!Q.tagGroupList||Q.tagGroupList.length===0?(x(),C("div",mT,m(g(n)("importDialog.noSelectedCategories")),1)):fe("",!0)])]),i("button",{class:"add-tag-btn",onClick:L=>I(E,Q.tagGroupList)},m(g(n)("randomUtils.selectTagGroup")),9,vT)])):fe("",!0),Q.type==="specific"?(x(),C("div",_T,[i("label",null,m(g(n)("randomUtils.specificTags")),1),i("div",yT,[(x(!0),C(Oe,null,We(Q.specificTags,(L,N)=>(x(),C("div",{key:N,class:"tag-chip"},[Ve(m(L)+" ",1),i("button",{class:"remove-tag-btn",onClick:J=>k(Q,N)},"×",8,bT)]))),128)),we(i("input",{type:"text","onUpdate:modelValue":L=>Q.tagInput=L,onKeydown:en(ot(L=>T(Q),["prevent"]),["enter"]),class:"tag-input",placeholder:g(n)("randomUtils.addTagPlaceholder")},null,40,wT),[[$e,Q.tagInput]])]),i("button",{class:"add-tag-btn",onClick:L=>T(Q)},m(g(n)("randomUtils.addTag")),9,xT)])):fe("",!0)])]))),128))])])])):fe("",!0)]),i("div",TT,[i("button",{class:"save-btn",onClick:p,disabled:!X.value},m(g(n)("common.save")),9,ST)])]),_:1},8,["title","position","size","z-index"])):fe("",!0),qe(k9,{ref_key:"tagGroupSelectItem",ref:s,onSureSelect:ne},null,512)],64))}},[["__scopeId","data-v-61460fd3"]]);function xa(e){let t=e.length;for(;--t>=0;)e[t]=0}const CT=3,ET=258,xg=29,LT=256+1+xg,Tg=30,$T=512,AT=new Array((LT+2)*2);xa(AT);const IT=new Array(Tg*2);xa(IT);const MT=new Array($T);xa(MT);const OT=new Array(ET-CT+1);xa(OT);const RT=new Array(xg);xa(RT);const NT=new Array(Tg);xa(NT);try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{}const ji=new Uint8Array(256);for(let e=0;e<256;e++)ji[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ji[254]=ji[254]=1;const DT={class:"weilin_prompt_ui_prompt-box"},PT={class:"center-container"},FT={class:"action-item"},UT=["title"],BT={class:"action-text"},HT={class:"action-item"},jT={class:"action-text"},WT={class:"action-item"},VT=["title"],zT={class:"action-text"},qT={class:"action-item"},GT=["title"],QT={class:"action-text"},YT={class:"action-item"},KT=["title"],JT={class:"action-text"},XT={key:0,class:"action-item"},ZT=["title"],eS={class:"action-text"},tS={class:"action-item"},nS=["title"],oS={class:"action-text"},aS={class:"action-item"},sS=["title"],rS={class:"action-text"},lS={class:"action-item"},iS=["title"],uS={class:"action-text"},cS={class:"action-item"},dS=["title"],fS={class:"action-text"},pS={class:"action-item"},gS=["title"],hS={class:"action-text"},mS={class:"action-item"},vS=["title"],_S={class:"action-text"},yS={class:"action-item"},bS=["title"],wS={class:"action-text"},xS=["placeholder"],TS={class:"token-counter"},SS=["onClick"],kS={class:"tag"},CS={class:"desc"},ES={class:"prompt-input-translate-area"},LS=["placeholder"],$S=["title"],AS={style:{"margin-left":"5px"},class:"action-text"},IS=["title"],MS={class:"action-text"},OS=["title"],RS={class:"action-text"},NS={key:0,class:"tokens-container"},DS=["draggable","onDragstart","onDragover","onDrop","onDblclick"],PS={key:0,class:"newline-token"},FS=["title"],US=["onMouseenter","onMouseleave"],BS=["title"],HS=["title","onMouseenter","onMouseleave"],jS={style:{"margin-left":"5px"}},WS=["onMouseenter","onMouseleave"],VS=["onClick"],zS=["value","onInput","onBlur","onKeyup"],qS={key:4,class:"translation-result"},GS=["onClick","title"],QS={class:"translated-text"},YS=["title"],KS={key:1,class:"line-break"},JS={class:"tag-tips-content"},XS=["innerHTML"],ZS={key:0,class:"weight-control"},ek={class:"weight-label"},tk={key:1,class:"lora-weight-controls"},nk={class:"weight-control"},ok={class:"weight-label"},ak={class:"weight-control"},sk={class:"weight-label"},rk=["title"],lk={key:2,class:"bracket-btn-group"},ik={class:"bracket-btn-container"},uk={class:"vertical-btn-group"},ck=["title"],dk=["title"],fk={class:"bracket-btn-container"},pk={class:"vertical-btn-group"},gk=["title"],hk=["title"],mk={class:"bracket-btn-container"},vk={class:"vertical-btn-group"},_k=["title"],yk=["title"],bk={class:"tag-manager-section"},wk={class:"header-left"},xk={class:"section-title"},Tk={class:"header-right"},Sk={class:"lora-manager-container"},kk={class:"tag-manager-section"},Ck={class:"header-left"},Ek={class:"section-title"},Lk={class:"header-right"},$k={class:"tag-manager-container"},Ak="weilin_prompt_ui_",Ik=wt({__name:"prompt_index",props:{promptManager:{type:String,default:"prompt_global"},hasPromptLoraStack:{type:Boolean,default:!1}},setup(e,{expose:t}){const o=b(null),{t:n}=ht(),a=b(),s=b(),r=b({top:0,left:0}),l=b(0),u=e,d=b(null),c=b(""),f=b([]),h={},p=b(null),v=b(!1),y=b({top:"0px",left:"0px"}),T=b(!1),k=b(null),$=b(null),B=b(null),w=b([]),M=b(!1),H=b(!1),W=b([]),D=b(0),I=b(null),ee=b(localStorage.getItem("weilin_prompt_ui_auto_box_width")||450),K=b(localStorage.getItem("weilin_prompt_ui_auto_box_height")||350),V=b(""),ne=b(!1),oe=b({top:"0px",left:"0px"}),X=b(null),re=b(null),se=b(""),F=b(0),R=()=>(F.value++,`token_${F.value}_${Date.now()}`),ie=()=>{M.value=!M.value},Te=()=>{M.value=!1},te=()=>{k.value.open()},le=b(1),ve=()=>{if(p.value===null)return;let U=f.value[p.value].text;if(!O(U)){Y({type:"warn",str:"message.noFinishKuo"});return}const _e=Se=>Se.startsWith("(")&&Se.endsWith(")")&&!Se.slice(1,-1).includes("(")&&!Se.slice(1,-1).includes(")")&&!Se.slice(1,-1).includes("[")&&!Se.slice(1,-1).includes("]")&&!Se.slice(1,-1).includes("{")&&!Se.slice(1,-1).includes("}")&&!Se.slice(1,-1).includes("<")&&!Se.slice(1,-1).includes(">"),Le=Se=>{const De=/^([\(\[\{\<]*)(.*?)([\)\]\}\>]*)$/,Ne=Se.match(De);if(!Ne)return Se;const[,Et,rt,Ye]=Ne;if(/[\(\[\{\<].*[\)\]\}\>]/.test(rt))return Et+Le(rt)+Ye;const Ut=rt.replace(/:\d+(\.\d+)?$/,"");return le.value===1?Et+Ut+Ye:Et+Ut+":"+le.value+Ye};let Fe=U;if(/[\(\[\{\<\)\]\}\>]/.test(U))le.value===1&&_e(U)?Fe=U.slice(1,-1).replace(/:\d+(\.\d+)?$/,""):Fe=Le(U);else{const Se=U.replace(/:\d+(\.\d+)?$/,"");le.value===1?Fe=Se:Fe=`(${Se}:${le.value})`}f.value[p.value].text=Fe,Kn()},xe=b(.5),pe=b(.5);dt(p,G=>{var U;if(G!==null&&((U=f.value[G])!=null&&U.isLoraTag)){const Le=f.value[G].text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);Le&&(xe.value=parseFloat(Le[2]),pe.value=parseFloat(Le[3]))}});const P=()=>{var G;if(p.value!==null&&((G=f.value[p.value])!=null&&G.isLoraTag)){const U=f.value[p.value],_e=U.text.match(/<wlr:([^:]+):([^:]+):([^>]+)>/);if(_e){const Fe=`<wlr:${_e[1]}:${xe.value}:${pe.value}>`;U.text=Fe,Kn()}}},q=G=>{if(p.value===null)return;let _e=f.value[p.value].text;const Le={"(":")","[":"]","{":"}","<":">"}[G];_e=`${G}${_e}${Le}`,f.value[p.value].text=_e,j()},Z=G=>{if(p.value===null)return;let _e=f.value[p.value].text;const Le={"(":")","[":"]","{":"}","<":">"};_e.startsWith(G)&&_e.endsWith(Le[G])&&(_e=_e.slice(1,-1),f.value[p.value].text=_e,j())},O=G=>{const U=[],_e={"(":")","[":"]","{":"}","<":">"};for(let Le of G)if(_e[Le])U.push(Le);else if(Object.values(_e).includes(Le)&&(U.length===0||_e[U.pop()]!==Le))return!1;return U.length===0};nc(()=>{for(const G in h)delete h[G]}),b(!0),b(!1);const Q=G=>/[\p{L}]/u.test(G),E=G=>{const U=G.match(/([^:]+):[\d.]+/);return U?U[1]:G};let L=null;const N=async()=>{L&&clearTimeout(L),L=setTimeout(async()=>{if(!s.value)return;const G=s.value,U=G.selectionStart;await Qe();const _e=G.value.substring(0,U),Le=document.createElement("div");Le.style.position="absolute",Le.style.top="0",Le.style.left="0",Le.style.visibility="hidden",Le.style.whiteSpace="pre-wrap",Le.style.wordWrap="break-word",Le.style.width=window.getComputedStyle(G).width,Le.style.font=window.getComputedStyle(G).font,Le.style.padding=window.getComputedStyle(G).padding;const Fe=document.createTextNode(_e),Se=document.createElement("span");Se.textContent="|",Le.appendChild(Fe),Le.appendChild(Se),G.parentNode.appendChild(Le);const De=Se.getBoundingClientRect(),Ne=G.parentNode.getBoundingClientRect();let Et=De.top-Ne.top+De.height,rt=De.left-Ne.left;if(await Qe(),a.value){const Ye=a.value.offsetWidth,Ut=G.offsetWidth,fn=G.getBoundingClientRect().left-Ne.left;rt+Ye>fn+Ut&&(rt=fn+Ut-Ye),rt<fn&&(rt=fn),rt=Math.max(0,Math.min(rt,Ne.width-Ye))}G.parentNode.removeChild(Le),r.value={top:Et,left:rt},L=null},50)},J=b(null),de=G=>{if(!(G!=null&&G.target)||!s.value)return;const U=G.target.value,_e=G.target.selectionStart,Le=G.target.selectionEnd,Fe={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:">"}]},underscore:{enabled:localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true",pattern:/_/g,replace:" "}};let Se=U.substring(0,_e),De=U;Object.values(Fe).forEach(zt=>{zt.enabled&&(zt.pattern?(Se=Se.replace(zt.pattern,zt.replace),De=De.replace(zt.pattern,zt.replace)):zt.patterns&&zt.patterns.forEach(({pattern:et,replace:Xe})=>{Se=Se.replace(et,Xe),De=De.replace(et,Xe)}))}),c.value=De;const Ne=Se.length,Et=Le-_e,rt=Ne+Et;Qe(()=>{s.value&&(s.value.setSelectionRange(Ne,rt),s.value.focus())});const Ye=De.substring(0,Ne);let Ut=Ne;for(;Ut>0&&!/[,\s]/.test(Ye[Ut-1]);)Ut--;const fn=Ye.substring(Ut,Ne).trim();X.value&&clearTimeout(X.value),X.value=setTimeout(()=>{fn&&Pn(fn),me()},300),l.value=he(c.value)},he=G=>G?G.trim().split(/\s+/).length:0,S=async()=>{let G=localStorage.getItem("weilin_prompt_ui_comma_conversion")==="true",U=localStorage.getItem("weilin_prompt_ui_period_conversion")==="true",_e=localStorage.getItem("weilin_prompt_ui_bracket_conversion")==="true",Le=localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")==="true",Fe=localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true";localStorage.getItem("weilin_prompt_ui_comma_conversion")||(localStorage.setItem("weilin_prompt_ui_comma_conversion","true"),G=!0),localStorage.getItem("weilin_prompt_ui_period_conversion")||(localStorage.setItem("weilin_prompt_ui_period_conversion","true"),U=!0),localStorage.getItem("weilin_prompt_ui_bracket_conversion")||(localStorage.setItem("weilin_prompt_ui_bracket_conversion","true"),_e=!0),localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")||(localStorage.setItem("weilin_prompt_ui_angle_bracket_conversion","true"),Le=!0),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")||(localStorage.setItem("weilin_prompt_ui_underscore_to_bracket","false"),Fe=!1),G&&(c.value=c.value.replace(/,/g,",")),U&&(c.value=c.value.replace(/。/g,".")),_e&&(c.value=c.value.replace(/【/g,"[").replace(/】/g,"]").replace(/(/g,"(").replace(/)/g,")")),Le&&(c.value=c.value.replace(/《/g,"<").replace(/》/g,">")),Fe&&(c.value=c.value.replace(/_/g," "));const Se=c.value;let De=[];const Ne=f.value.map((et,Xe)=>({token:et,originalIndex:Xe,currentIndex:Xe})).filter(({token:et})=>et.isHidden);De=((et,Xe=0)=>{let St=[],kt=Xe,Ot="",Bt=[];for(;kt<et.length;){const Fn=et[kt];if(Fn===`
`){Ot.trim()&&(St.push(Ot.trim()),Ot=""),St.push(`
`),kt++;continue}Bt.length===0&&Fn===","?(Ot.trim()&&St.push(Ot.trim()),Ot=""):Ot+=Fn,kt++}return Ot.trim()&&(Bt.length===0?St.push(...Ot.split(",").filter(Boolean).map(Fn=>Fn.trim())):St.push(Ot.trim())),St})(Se);const rt=new Map;f.value.forEach((et,Xe)=>{et.id||(et.id=R()),rt.set(Xe,et)});const Ye=[];De.forEach(et=>{if(et===`
`)Ye.push({id:R(),text:`
`,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:""});else if(et.trim()){const Xe=et.trim(),St=/^<wlr:[^:]+:\d+(\.\d+)?:\d+(\.\d+)?>$/.test(Xe);let kt=!1;for(const[Ot,Bt]of rt)if(Bt.text===Xe&&!Bt.isHidden&&!Ye.includes(Bt)){St&&!Bt.isLoraTag&&(Bt.isLoraTag=!0),Ye.push(Bt),rt.delete(Ot),kt=!0;break}if(!kt){for(const[Ot,Bt]of rt)if(Bt.text===Xe&&!Ye.includes(Bt)){St&&!Bt.isLoraTag&&(Bt.isLoraTag=!0),Ye.push(Bt),rt.delete(Ot),kt=!0;break}}kt||Ye.push({id:R(),text:Xe,translate:"",isPunctuation:!1,isEditing:!1,isHidden:!1,color:"",isLoraTag:St})}});const Ut=new Set;Ne.forEach(({token:et,originalIndex:Xe})=>{if(Ut.has(et.id)||(Ut.add(et.id),Ye.some(Ot=>Ot.id===et.id)))return;let kt=Xe;for(;kt>Ye.length;)kt--;kt<0?Ye.push(et):Ye.splice(kt,0,et)}),f.value=Ye,c.value=f.value.length>0?f.value.reduce((et,Xe,St)=>{var Og,Rg;if(Xe.isHidden)return et;if(Xe.text===`
`){const mo=ye(St);return mo!==-1&&f.value[mo],et+Xe.text}if(et===""){let mo=St+1;for(;mo<f.value.length&&((Og=f.value[mo])!=null&&Og.isHidden);)mo++;const M$=mo>=f.value.length,Ng=mo<f.value.length?f.value[mo]:null,O$=M$||Ng&&Ng.text===`
`;return Xe.text+(O$?",":"")}let kt=St+1;for(;kt<f.value.length&&((Rg=f.value[kt])!=null&&Rg.isHidden);)kt++;const Ot=kt>=f.value.length,Bt=kt<f.value.length?f.value[kt]:null,Fn=Bt&&Bt.text===`
`||Ot,Mg=ye(St);return Mg!==-1&&f.value[Mg].text===`
`?et+Xe.text+(Fn?",":""):et+", "+Xe.text+(Fn?",":"")},""):"",re.value&&clearTimeout(re.value),re.value=setTimeout(()=>{j()},1e3),me();const fn=20;let zt=0;for(;zt<f.value.length;){const et=Math.min(zt+fn,f.value.length),Xe=[];for(let St=zt;St<et;St++)if(f.value[St].text.length>0&&!f.value[St].translate){let kt=f.value[St].text;const Ot=E(kt.trim());Xe.push($n.getTranslateLocal(Ot).then(Bt=>{const Fn=Bt;f.value[St].translate=Fn.translated.translate,f.value[St].color=Fn.translated.color}))}await Promise.all(Xe),zt=et}l.value=he(c.value)},_=async()=>{let U=0;for(;U<f.value.length;){const _e=Math.min(U+20,f.value.length),Le=[];for(let Fe=U;Fe<_e;Fe++){const Se=f.value[Fe];if(Se.translate&&/[a-zA-Z]/.test(Se.translate)){const De=Se.text,Ne=new Promise(Et=>{localStorage.getItem("weilin_prompt_ui_translater_setting")=="network"?wa.request.translateText(De,function(rt){if(rt.result>0){const Ye=rt.text.map(Ut=>Ut.replace(/[\[\]“”]/g,"")).join(", ");f.value[Fe].translate=Ye}Et()}):$n.translaterText(De).then(rt=>{rt.text.length>0&&(f.value[Fe].translate=rt.text),Et()})});Le.push(Ne)}}await Promise.all(Le),U=_e}},A=b(""),j=()=>{const G=c.value.replace(/[\s\t\n]+/g,"");if(w.value.length>0){if(G.length>0){const U=w.value.filter(Fe=>!Fe.hidden);let _e={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:w.value};U.length>0&&(_e.lora=U);const Le=JSON.stringify(_e);A.value!=Le&&(A.value=Le,Dn.saveHistory({tag:Le}))}}else if(A.value!=c.value){const U={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:""},_e=JSON.stringify(U);G.length>0&&Dn.saveHistory({tag:_e})}me()},me=()=>{if(w.value.length>0){A.value=c.value;const G=w.value.filter(Le=>!Le.hidden);let U={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:w.value};G.length>0&&(U.lora=G);const _e=JSON.stringify(U);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:_e},"*")}else{A.value=c.value;const G={prompt:c.value,lora:"",temp_prompt:f.value,temp_lora:""},U=JSON.stringify(G);window.postMessage({type:"weilin_prompt_ui_prompt_finish_prompt",data:U},"*")}},ue=(G,U)=>{ae.value&&(clearTimeout(ae.value),ae.value=null);const _e=U.target.getBoundingClientRect();y.value={top:`${_e.top-50}px`,left:`${_e.left+_e.width/2}px`},p.value=G;const Le=f.value[G].text;le.value=z(Le),oe.value={top:`${_e.bottom+window.scrollY+_e.height+10}px`,left:`${_e.left+_e.width/2}px`},f.value[G].isLoraTag||(ne.value=!0)},z=G=>{const U=[{open:"(",close:")"},{open:"[",close:"]"},{open:"{",close:"}"},{open:"<",close:">"}];for(const Le of U)if(G.startsWith(Le.open)&&G.endsWith(Le.close))return z(G.slice(1,-1));const _e=G.match(/:(\d+(\.\d+)?)$/);return _e?parseFloat(_e[1]):1},ae=b(null),Me=G=>{ae.value&&clearTimeout(ae.value),ae.value=setTimeout(()=>{v.value||je(),ae.value=null},100),ne.value=!1},Pe=()=>{v.value=!1,Me(p.value)},je=()=>{v.value||(p.value=null)},st=()=>{if(p.value!==null){const G=p.value;tt(G),p.value=null,v.value=!1}},tt=G=>{const U=c.value;let _e=f.value[G],Le=0,Fe=-1;for(let Se=0;Se<G;Se++){let De=U.indexOf(f.value[Se].text,Le);De!==-1&&(Le=De+f.value[Se].text.length)}if(_e.text===`
`||_e.text===" "){for(let Se=Le;Se<U.length;Se++)if(U[Se]===_e.text){Fe=Se;break}}else Fe=U.indexOf(_e.text,Le);if(Fe!==-1){const Se=_e.text===`
`?" ":"",De=U.substring(0,Fe)+Se+U.substring(Fe+_e.text.length);c.value=De}f.value.splice(G,1),c.value=f.value.length>0?f.value.reduce((Se,De,Ne)=>{var zt,et;if(De.isHidden)return Se;if(De.text===`
`){const Xe=ye(Ne);return Xe!==-1&&f.value[Xe],Se+De.text}if(Se===""){let Xe=Ne+1;for(;Xe<f.value.length&&((zt=f.value[Xe])!=null&&zt.isHidden);)Xe++;const St=Xe>=f.value.length,kt=Xe<f.value.length?f.value[Xe]:null,Ot=St||kt&&kt.text===`
`;return De.text+(Ot?",":"")}let Et=Ne+1;for(;Et<f.value.length&&((et=f.value[Et])!=null&&et.isHidden);)Et++;const rt=Et>=f.value.length,Ye=Et<f.value.length?f.value[Et]:null,Ut=Ye&&Ye.text===`
`||rt,fn=ye(Ne);return fn!==-1&&f.value[fn].text===`
`?Se+De.text+(Ut?",":""):Se+", "+De.text+(Ut?",":"")},""):"",j()},Ie=(G,U)=>{const _e=c.value;let Le=0,Fe=-1;for(let De=0;De<G;De++){let Ne=_e.indexOf(f.value[De].text,Le);Ne!==-1&&(Le=Ne+f.value[De].text.length)}const Se=f.value[G].text;if(Fe=_e.indexOf(Se,Le),Fe!==-1){const De=U.target.value,Ne=_e.substring(0,Fe)+De+_e.substring(Fe+Se.length);c.value=Ne,f.value[G]={...f.value[G],text:De},j()}},ke=G=>{f.value[G].isPunctuation||(f.value[G].isEditing=!0,setTimeout(()=>{const U=h[G];if(U){U.focus();const _e=U.value.length;U.setSelectionRange(_e,_e),Ee(U),U.addEventListener("input",()=>Ee(U)),j()}}))},Ee=G=>{const U=document.createElement("span");U.style.visibility="hidden",U.style.position="absolute",U.style.whiteSpace="pre";const _e=window.getComputedStyle(G);U.style.font=_e.font,U.style.fontSize=_e.fontSize,U.style.fontFamily=_e.fontFamily,U.style.padding=_e.padding,U.style.border=_e.border,U.textContent=G.value||G.placeholder||"",document.body.appendChild(U);const Le=U.offsetWidth;G.style.width=`${Math.max(Le+4,20)}px`,document.body.removeChild(U)},ft=G=>{f.value[G].isEditing=!1};dt(f,G=>{Kn()},{deep:!0}),dt(w,G=>{j()},{deep:!0});const Tt=()=>{T.value=!T.value,T.value&&Qe(()=>{var U;const G=$.value.getBoundingClientRect();(U=B.value)==null||U.setPosition(G)})},dn=()=>{T.value=!1},Jo=G=>{var U,_e;$.value&&!$.value.contains(G.target)&&B.value&&!B.value.$el.contains(G.target)&&dn(),(U=a.value)!=null&&U.contains&&((_e=s.value)!=null&&_e.contains)&&!a.value.contains(G.target)&&!s.value.contains(G.target)&&(H.value=!1)},Ca=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openTagManager_prompt"},"*")},qi=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openLoraManager"},"*")},bs=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openHistoryManager"},"*")},Xo=b(!0),Ur=()=>{Xo.value=!Xo.value},Ea=b(!1),Gi=()=>{Ea.value=!Ea.value};b(null);const Qi=()=>{const G=s.value;G&&(G.addEventListener("keyup",Ro),G.addEventListener("click",Ro),G.addEventListener("input",Ro))},Ro=()=>{H.value&&N()},Br=()=>{if(s.value){const G=s.value.style.height||`${s.value.offsetHeight}px`;localStorage.setItem("weilinPromptTextAreaHeight",G)}},Hr=()=>{const G=localStorage.getItem("weilinPromptTextAreaHeight");G&&s.value&&(s.value.style.height=G)};_t(()=>{document.addEventListener("click",Jo),window.addEventListener("message",jr),La(),Qi(),Qe(()=>{Hr()})}),ia(()=>{}),On(()=>{document.removeEventListener("click",Jo),J.value&&clearTimeout(J.value),window.removeEventListener("message",jr);const G=s.value;G&&(G.removeEventListener("keyup",Ro),G.removeEventListener("click",Ro),G.removeEventListener("input",Ro))});const jr=G=>{if(G.data.type==="weilin_prompt_ui_insertTag"){const U=c.value,_e=G.data.tagText;U===""?c.value=_e:(U.endsWith(" "),c.value=U+", "+_e+","),se.value=c.value,S()}else if(G.data.type==="weilin_prompt_ui_user_history_tag"){const U=G.data.tagText;A.value=U,Qr(U)}else if(G.data.type!=="weilin_prompt_ui_refresh_all_data"){if(G.data.type==="weilin_prompt_ui_translate_setting")La();else if(G.data.type==="weilin_prompt_ui_selectLora"){if(G.data.lora.loraWorks!=null&&G.data.lora.loraWorks.length>0){const U=c.value,_e=G.data.lora.loraWorks;U===""?c.value=_e:(U.endsWith(" "),c.value=U+", "+_e+","),se.value=c.value,S()}}else if(G.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response")Yt(G.data.data);else if(G.data.type==="weilin_prompt_ui_addLoraTag_inner")if(G.data.lora.loraWorks!=null&&G.data.lora.loraWorks.length>0){const U=c.value,_e=G.data.lora.tag+(G.data.lora.loraWorks===""?"":", "+G.data.lora.loraWorks);U===""?c.value=_e:(U.endsWith(" "),c.value=U+", "+_e+","),se.value=c.value,S()}else{const U=c.value,_e=G.data.lora.tag;U===""?c.value=_e:(U.endsWith(" "),c.value=U+", "+_e+","),se.value=c.value,S()}}},La=async()=>{const G=localStorage.getItem("weilin_prompt_ui_sourceLanguage")||"english",U=localStorage.getItem("weilin_prompt_ui_targetLanguage")||"chinese_simplified";localStorage.getItem("weilin_prompt_ui_sourceLanguage")||localStorage.setItem("weilin_prompt_ui_sourceLanguage",G),localStorage.getItem("weilin_prompt_ui_targetLanguage")||localStorage.setItem("weilin_prompt_ui_targetLanguage",U),G!=="auto"&&wa.language.setLocal(G),wa.language.setDefaultTo(U)},Yi=(G,U)=>{localStorage.getItem("weilin_prompt_ui_translater_setting")=="network"?wa.request.translateText(G,function(_e){if(_e.result>0){const Le=_e.text.map(Fe=>Fe.replace(/[\[\]“”]/g,"")).join(", ");U.translate=Le}}):$n.translaterText(G).then(_e=>{_e.text.length>0&&(U.translate=_e.text)})},$a=()=>{if(localStorage.getItem("weilin_prompt_ui_translater_setting")=="network"){var G={from:wa.language.recognition(V.value).languageName,to:"english",texts:[V.value]};wa.request.translateText(G,function(_e){if(_e.result>0){const Le=_e.text.map(Fe=>Fe.replace(/[\[\]“”]/g,"")).join(", ");f.value.push({text:Le,translate:V.value,isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),V.value="",Kn()}})}else $n.translaterInputText(V.value).then(U=>{U.text.length>0&&(f.value.push({text:U.text,translate:V.value,isPunctuation:!1,isEditing:!1,isHidden:!1,color:""}),V.value="",Kn())})},Wr=()=>{setTimeout(()=>{H.value||(se.value=c.value,S())},100)},Pn=G=>{let U=G.replace(/[\[\](){}]/g,"").trim();const Le=E(U).trim();if(!Le){H.value=!1;return}if(Le.length>20){H.value=!1;return}try{const Fe=Le.toLowerCase();Si.getAutocomplete(String(Fe)).then(async Se=>{W.value=Se.data,await N(),setTimeout(()=>{ee.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450,K.value=localStorage.getItem("weilin_prompt_ui_auto_box_height")||350,H.value=W.value.length>0,D.value=0},50)})}catch(Fe){console.error("Autocomplete error:",Fe),H.value=!1}},Vr=G=>{H.value&&(G.key==="ArrowDown"?(G.preventDefault(),D.value=Math.min(D.value+1,W.value.length-1),ws()):G.key==="ArrowUp"?(G.preventDefault(),D.value=Math.max(D.value-1,0),ws()):G.key==="Tab"||G.key==="Enter"?(G.preventDefault(),qr(D.value,null)):G.key==="Escape"&&(G.preventDefault(),Gr()))},ws=()=>{Qe(()=>{if(I.value&&a.value){const G=a.value,U=I.value,_e=G.getBoundingClientRect(),Le=U.getBoundingClientRect(),Fe=Le.top<_e.top,Se=Le.bottom>_e.bottom;Fe?G.scrollTop=G.scrollTop+(Le.top-_e.top):Se&&(G.scrollTop=G.scrollTop+(Le.bottom-_e.bottom))}})},zr=nt(()=>{if(!d.value)return{left:r.value.left};const G=d.value.offsetWidth;ee.value=localStorage.getItem("weilin_prompt_ui_auto_box_width")||450;const U=ee.value;let _e=r.value.left;return _e+U>G&&(_e=G-U),_e<0&&(_e=0),{left:_e}}),qr=(G,U)=>{if(U&&(U.preventDefault(),U.stopPropagation()),!W.value[G])return;H.value=!1;const _e=s.value.selectionStart,Le=s.value.selectionEnd,Fe=c.value;let Se=W.value[G].text;localStorage.getItem("weilin_prompt_ui_comma_conversion")!=="false"&&(Se=Se.replace(/,/g,",")),localStorage.getItem("weilin_prompt_ui_period_conversion")!=="false"&&(Se=Se.replace(/。/g,".")),localStorage.getItem("weilin_prompt_ui_bracket_conversion")!=="false"&&(Se=Se.replace(/【/g,"[").replace(/】/g,"]").replace(/(/g,"(").replace(/)/g,")")),localStorage.getItem("weilin_prompt_ui_angle_bracket_conversion")!=="false"&&(Se=Se.replace(/《/g,"<").replace(/》/g,">")),localStorage.getItem("weilin_prompt_ui_underscore_to_bracket")==="true"&&(Se=Se.replace(/_/g," "));let De=_e,Ne=Le;for(;De>0&&!/[,\s]/.test(Fe[De-1]);)De--;for(;!1;)Ne++;let Et=Fe.substring(0,De)+Se+Fe.substring(Ne);Fe[Ne]&&!/[\,\s]/.test(Fe[Ne])&&(Et=Fe.substring(0,De)+Se+", "+Fe.substring(Ne));const rt=Fe[Ne]&&!/[\,\s]/.test(Fe[Ne]),Ye=De+Se.length+(rt?2:0);c.value=Et,se.value=Et,S(),Qe(()=>{s.value&&(s.value.selectionStart=Ye,s.value.selectionEnd=Ye)})},Gr=()=>{H.value=!1},Qr=G=>{if(G.length>0)try{const U=JSON.parse(G);if(c.value=U.prompt,se.value=c.value,U.lora&&U.lora!=""&&(w.value=U.lora),U.temp_prompt&&U.temp_prompt!=""){const _e=U.temp_prompt;let Le=!1;_e.tokens&&_e.tokens.length>0&&_e.tokens!=""&&(f.value=_e.tokens,Le=!0),_e.lora&&_e.lora.length>0&&_e.lora!=""&&(w.value=_e.lora,Le=!0),!Le&&_e.length>0&&_e!=""&&(f.value=_e)}if(U.temp_lora&&U.temp_lora.length>0&&U.temp_lora!=""){const _e=U.temp_lora;w.value=_e}S()}catch{Y({type:"warn",str:"promptBox.settings.errorPrompt"})}},ho=b(null),Yr=(G,U)=>{ho.value=G,U.dataTransfer.effectAllowed="move"},Ki=(G,U)=>{if(U.preventDefault(),ho.value!==null&&ho.value!==G){const _e=f.value[ho.value],Le=[...f.value];Le.splice(ho.value,1),Le.splice(G,0,_e),f.value=Le,ho.value=G,Kn()}},Kr=(G,U)=>{U.preventDefault(),ho.value=null,Kn()},Kn=()=>{c.value=f.value.length>0?f.value.reduce((G,U,_e)=>{var Et,rt;if(U.isHidden)return G;if(U.text===`
`){const Ye=ye(_e);return Ye!==-1&&f.value[Ye],G+U.text}if(G===""){let Ye=_e+1;for(;Ye<f.value.length&&((Et=f.value[Ye])!=null&&Et.isHidden);)Ye++;const Ut=Ye>=f.value.length,fn=Ye<f.value.length?f.value[Ye]:null,zt=Ut||fn&&fn.text===`
`;return U.text+(zt?",":"")}let Le=_e+1;for(;Le<f.value.length&&((rt=f.value[Le])!=null&&rt.isHidden);)Le++;const Fe=Le>=f.value.length,Se=Le<f.value.length?f.value[Le]:null,De=Se&&Se.text===`
`||Fe,Ne=ye(_e);return Ne!==-1&&f.value[Ne].text===`
`?G+U.text+(De?",":""):G+", "+U.text+(De?",":"")},""):"",me()},Ji=()=>{window.parent.postMessage({type:"weilin_prompt_ui_openAiWindow"},"*")},Jr=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank")},Xi=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_cloud_window"},"*")},ge=()=>{window.parent.postMessage({type:"weilin_prompt_ui_open_danbooru_manager_window"},"*")},ce=()=>{window.open("https://afdian.com/a/weilin9999","_blank")},ye=G=>{for(let U=G-1;U>=0;U--)if(!f.value[U].isHidden)return U;return-1},Ke=G=>{if(G>=0&&G<f.value.length){if(f.value[G].text===`
`||f.value[G].text===" ")return;f.value[G].isHidden=!f.value[G].isHidden,f.value[G].isHidden?f.value[G].hiddenHint=n("promptBox.hiddenHint"):f.value[G].hiddenHint="",Kn()}},Lt=()=>{window.open("https://www.bilibili.com/list/288025756/?sid=4690314&spm_id_from=333.1387.0.0&oid=114342431298474&bvid=BV1txdfYxE7X","_blank")},Tn=async()=>{if(u.promptManager=="prompt_global")try{await cn.goRandomTemplate().then(G=>{G.code===200?(c.value=G.random_tags,Qe(()=>{S()})):Y({type:"warn",str:G.info})}).catch(G=>{console.error(G),Y({type:"warn",str:"message.networkError"})})}catch(G){Y({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",G)}else window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"},"*")},Yt=async G=>{try{await cn.goRandomTemplatePath(G).then(U=>{U.code===200?(c.value=U.random_tags,Qe(()=>{S()})):Y({type:"warn",str:U.info})}).catch(U=>{console.error(U),Y({type:"warn",str:"message.networkError"})})}catch(U){Y({type:"warn",str:"message.networkError"}),console.error("Error loading random tag settings:",U)}},Ft=()=>{o.value.open(u.promptManager)};return t({setPromptText:Qr}),(G,U)=>{var _e,Le,Fe;return x(),C(Oe,null,[i("div",DT,[u.promptManager==="prompt"?(x(),yt(Nx,{key:0,"is-open":M.value,"selected-loras":w.value,onClose:Te},null,8,["is-open","selected-loras"])):fe("",!0),i("div",{class:Ce(`${Ak}main-content`),style:ct({width:M.value?"calc(100% - 300px)":"100%"})},[i("div",PT,[i("div",FT,[i("button",{class:"language-switch-btn",onClick:ot(Tt,["stop"]),ref_key:"langBtnRef",ref:$,title:g(n)("controls.language")},[U[13]||(U[13]=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",BT,m(g(n)("controls.language")),1)],8,UT),qe(Nl,{name:"fade"},{default:pt(()=>[T.value?(x(),yt(a_,{key:0,ref_key:"languageSwitcherRef",ref:B,onClose:dn},null,512)):fe("",!0)]),_:1})]),i("div",HT,[qe(p3,{title:g(n)("controls.switchTheme")},{default:pt(({isDark:Se})=>[i("span",jT,m(g(n)(Se?"controls.darkMode":"controls.lightMode")),1)]),_:1},8,["title"])]),i("div",WT,[i("button",{class:"settings-btn",onClick:te,title:g(n)("controls.settings")},[U[14]||(U[14]=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",zT,m(g(n)("controls.settings")),1)],8,VT)]),i("div",qT,[i("button",{class:"tag-manager-btn",onClick:Ca,title:g(n)("controls.tagManager")},[U[15]||(U[15]=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",QT,m(g(n)("controls.tagManager")),1)],8,GT)]),i("div",YT,[i("button",{class:"tag-manager-btn",onClick:ge,title:g(n)("controls.danbooruManager")},[U[16]||(U[16]=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",JT,m(g(n)("controls.danbooruManager")),1)],8,KT)]),u.hasPromptLoraStack?(x(),C("div",XT,[i("button",{class:"tag-manager-btn",onClick:ie,title:g(n)("controls.loraStack")},[U[17]||(U[17]=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",eS,m(g(n)("controls.loraStack")),1)],8,ZT)])):fe("",!0),i("div",tS,[i("button",{class:"tag-manager-btn",onClick:qi,title:g(n)("controls.loraManager")},[U[18]||(U[18]=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",oS,m(g(n)("controls.loraManager")),1)],8,nS)]),i("div",aS,[i("button",{class:"tag-manager-btn",onClick:bs,title:g(n)("controls.history")},[U[19]||(U[19]=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",rS,m(g(n)("controls.history")),1)],8,sS)]),i("div",lS,[i("button",{class:"tag-manager-btn",onClick:Ji,title:g(n)("controls.aiChat")},[U[20]||(U[20]=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",uS,m(g(n)("controls.aiChat")),1)],8,iS)]),i("div",cS,[i("button",{class:"tag-manager-btn",onClick:Jr,title:g(n)("controls.github")},[U[21]||(U[21]=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",fS,m(g(n)("controls.github")),1)],8,dS)]),i("div",pS,[i("button",{class:"tag-manager-btn",onClick:Xi,title:g(n)("controls.shareCloudData")},[U[22]||(U[22]=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",hS,m(g(n)("controls.shareCloudData")),1)],8,gS)]),i("div",mS,[i("button",{class:"tag-manager-btn",onClick:Lt,title:g(n)("controls.tutorialVideo")},[U[23]||(U[23]=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",_S,m(g(n)("controls.tutorialVideo")),1)],8,vS)]),i("div",yS,[i("button",{class:"tag-manager-btn",onClick:ce,title:g(n)("controls.sponsor")},[U[24]||(U[24]=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",wS,m(g(n)("controls.sponsor")),1)],8,bS)]),qe(lp,{ref_key:"settingDialog",ref:k},null,512)]),i("div",{style:{position:"relative"},ref_key:"parentCneterBox",ref:d},[we(i("textarea",{"onUpdate:modelValue":U[0]||(U[0]=Se=>c.value=Se),class:"input-area",onInput:de,placeholder:g(n)("promptBox.placeholder"),onKeydown:Vr,onBlur:Wr,rows:"6",ref_key:"inputAreaRef",ref:s,onMouseup:Br,onResize:Br},null,40,xS),[[$e,c.value]]),i("div",TS,m(l.value)+" tokens ",1),i("div",{class:"autocomplete-container",ref_key:"autocompleteContainerRef",ref:a,style:ct({top:`${r.value.top}px`,left:`${zr.value.left}px`,display:H.value?"block":"none",width:`${ee.value}px`,maxHeight:`${K.value}px`})},[i("button",{class:"close-autocomplete-btn",onClick:ot(Gr,["stop"])},"×"),(x(!0),C(Oe,null,We(W.value,(Se,De)=>(x(),C("div",{key:De,class:Ce(["autocomplete-item",{selected:De===D.value}]),onClick:ot(Ne=>qr(De,Ne),["stop"]),ref_for:!0,ref:Ne=>{Ne&&De===D.value&&(I.value=Ne)}},[i("span",kS,m(Se.text),1),i("span",CS,m(Se.desc),1)],10,SS))),128))],4)],512),i("div",ES,[we(i("input",{type:"text","onUpdate:modelValue":U[1]||(U[1]=Se=>V.value=Se),class:"prompt-input-translate-area-textarea",onKeyup:U[2]||(U[2]=en(Se=>$a(),["enter"])),placeholder:g(n)("promptBox.translatePlaceholder")},null,40,LS),[[$e,V.value]]),i("button",{class:"translate-btn",onClick:_,title:g(n)("promptBox.oneClickTranslate")},[U[25]||(U[25]=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",AS,m(g(n)("promptBox.oneClickTranslate")),1)],8,$S),i("button",{class:"translate-btn random-tag-settings-btn",onClick:Ft,title:g(n)("promptBox.randomTagSettings")},[U[26]||(U[26]=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",MS,m(g(n)("promptBox.randomTagSettings")),1)],8,IS),i("button",{class:"translate-btn random-tag-btn",onClick:Tn,title:g(n)("promptBox.oneClickRandomTag")},[U[27]||(U[27]=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",RS,m(g(n)("promptBox.oneClickRandomTag")),1)],8,OS)]),f.value.length>0?(x(),C("div",NS,[(x(!0),C(Oe,null,We(f.value,(Se,De)=>(x(),C(Oe,{key:"tag-item-"+De},[i("div",{class:"token-item-box",draggable:!Se.isEditing,onDragstart:Ne=>Yr(De,Ne),onDragover:ot(Ne=>Ki(De,Ne),["prevent"]),onDrop:Ne=>Kr(De,Ne),onDblclick:Ne=>Ke(De),style:ct({backgroundColor:Se.color})},[Se.text===`
`?(x(),C("div",PS,[i("span",{class:"token-symbol",title:g(n)("promptBox.newline")},"↵",8,FS)])):Se.text===" "?(x(),C("div",{key:1,class:"token-item tab-token",onMouseenter:Ne=>ue(De,Ne),onMouseleave:Ne=>Me()},[i("span",{class:"token-symbol",title:g(n)("promptBox.tab")},"→",8,BS)],40,US)):Se.isLoraTag?(x(),C("div",{key:2,class:"lora-tag-icon",title:g(n)("promptBox.loraTag"),onMouseenter:Ne=>ue(De,Ne),onMouseleave:Ne=>Me()},[U[28]||(U[28]=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",jS,m(Se.text),1)],40,HS)):Se.text&&!Se.isLoraTag?(x(),C("div",{key:3,class:Ce(["token-item",{punctuation:Se.isPunctuation}]),onMouseenter:Ne=>ue(De,Ne),onMouseleave:Ne=>Me()},[!Se.isEditing||Se.isPunctuation?(x(),C("span",{key:0,onClick:Ne=>!Se.isPunctuation&&ke(De)},m(Se.text),9,VS)):Se.isPunctuation?fe("",!0):(x(),C("input",{key:1,value:Se.text,onInput:Ne=>Ie(De,Ne),onBlur:Ne=>ft(De),onKeyup:en(Ne=>ft(De),["enter"]),ref_for:!0,ref:Ne=>{Ne&&(h[De]=Ne)}},null,40,zS))],42,WS)):fe("",!0),Se.text!==`
`&&Se.text!==" "&&!Se.isLoraTag?(x(),C("div",qS,[Q(Se.text)?(x(),C("div",{key:0,onClick:Ne=>Yi(Se.text,Se),class:"translate-button",title:g(n)("promptBox.translate")},[...U[29]||(U[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)])],8,GS)):fe("",!0),i("span",QS,m(Se.translate?Se.translate:""),1)])):fe("",!0)],44,DS),Se.isHidden?(x(),C("span",{key:0,class:"hidden-hint",title:Se.hiddenHint},[...U[30]||(U[30]=[i("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor"},[i("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),i("circle",{cx:"12",cy:"12",r:"3"})],-1)])],8,YS)):fe("",!0),Se.text===`
`?(x(),C("div",KS)):fe("",!0)],64))),128))])):fe("",!0),ne.value?(x(),C("div",{key:1,class:"tag-tips-box",style:ct(oe.value)},[i("div",JS,[i("p",{innerHTML:g(n)("promptBox.tagTips")},null,8,XS)])],4)):fe("",!0),we(i("div",{class:"token-controls",style:ct(y.value),onMouseenter:U[12]||(U[12]=Se=>v.value=!0),onMouseleave:Pe},[(_e=f.value[p.value])!=null&&_e.isLoraTag?fe("",!0):(x(),C("div",ZS,[we(i("input",{type:"number","onUpdate:modelValue":U[3]||(U[3]=Se=>le.value=Se),step:"0.1",class:"weight-input",onChange:ve},null,544),[[$e,le.value]]),i("span",ek,m(g(n)("promptBox.weight")),1)])),(Le=f.value[p.value])!=null&&Le.isLoraTag?(x(),C("div",tk,[i("div",nk,[we(i("input",{type:"number","onUpdate:modelValue":U[4]||(U[4]=Se=>xe.value=Se),step:"0.1",class:"weight-input",onChange:P},null,544),[[$e,xe.value]]),i("span",ok,m(g(n)("promptBox.modelWeight")),1)]),i("div",ak,[we(i("input",{type:"number","onUpdate:modelValue":U[5]||(U[5]=Se=>pe.value=Se),step:"0.1",class:"weight-input",onChange:P},null,544),[[$e,pe.value]]),i("span",sk,m(g(n)("promptBox.textWeight")),1)])])):fe("",!0),i("button",{onClick:st,class:"delete-btn",title:g(n)("promptBox.delete")},[...U[31]||(U[31]=[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,rk),(Fe=f.value[p.value])!=null&&Fe.isLoraTag?fe("",!0):(x(),C("div",lk,[i("div",ik,[U[32]||(U[32]=i("div",{class:"bracket-btn"}," () ",-1)),i("div",uk,[i("button",{class:"vertical-btn",onClick:U[6]||(U[6]=Se=>q("(")),title:g(n)("promptBox.addBracket")}," + ",8,ck),i("button",{class:"vertical-btn",onClick:U[7]||(U[7]=Se=>Z("(")),title:g(n)("promptBox.removeLayer")}," - ",8,dk)])]),i("div",fk,[U[33]||(U[33]=i("div",{class:"bracket-btn"}," [] ",-1)),i("div",pk,[i("button",{class:"vertical-btn",onClick:U[8]||(U[8]=Se=>q("[")),title:g(n)("promptBox.addBracket")}," + ",8,gk),i("button",{class:"vertical-btn",onClick:U[9]||(U[9]=Se=>Z("[")),title:g(n)("promptBox.removeLayer")}," - ",8,hk)])]),i("div",mk,[U[34]||(U[34]=i("div",{class:"bracket-btn"}," {} ",-1)),i("div",vk,[i("button",{class:"vertical-btn",onClick:U[10]||(U[10]=Se=>q("{")),title:g(n)("promptBox.addBracket")}," + ",8,_k),i("button",{class:"vertical-btn",onClick:U[11]||(U[11]=Se=>Z("{")),title:g(n)("promptBox.removeLayer")}," - ",8,yk)])])]))],36),[[tr,p.value!==null&&f.value[p.value]]]),i("div",bk,[i("div",{class:"tag-manager-header",onClick:Gi},[i("div",wk,[U[35]||(U[35]=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",xk,m(g(n)("controls.loraManager")),1)]),i("div",Tk,[(x(),C("svg",{class:Ce(["collapse-icon",{"is-collapsed":!Ea.value}]),viewBox:"0 0 24 24"},[...U[36]||(U[36]=[i("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)])],2))])]),we(i("div",Sk,[qe(bg,{loraManager:"prompt_inner"})],512),[[tr,Ea.value]])]),i("div",kk,[i("div",{class:"tag-manager-header",onClick:Ur},[i("div",Ck,[U[37]||(U[37]=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",Ek,m(g(n)("controls.tagManager")),1)]),i("div",Lk,[(x(),C("svg",{class:Ce(["collapse-icon",{"is-collapsed":!Xo.value}]),viewBox:"0 0 24 24"},[...U[38]||(U[38]=[i("path",{d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"},null,-1)])],2))])]),we(i("div",$k,[qe(fg)],512),[[tr,Xo.value]])])],6)]),qe(kT,{ref_key:"randomSettingItem",ref:o},null,512)],64)}}},[["__scopeId","data-v-f03f7f43"]]),Mk={class:"container"},Ok={class:"tab-container"},Rk={key:0},Nk={class:"search-container"},Dk=["placeholder"],Pk=["title"],Fk=["title","disabled"],Uk=["title"],Bk={class:"history-list"},Hk={class:"action-buttons"},jk=["onClick","title"],Wk=["onClick","title"],Vk=["onClick","title"],zk=["value"],qk={key:1},Gk={class:"search-container"},Qk=["placeholder"],Yk=["title"],Kk=["title"],Jk=["title","disabled"],Xk=["title"],Zk={class:"history-list"},eC={key:0,class:"favor-name"},tC={class:"action-buttons"},nC=["onClick","title"],oC=["onClick","title"],aC=["onClick","title"],sC=["value"],rC={key:2,class:"weilin-tools-dialog-overlay"},lC={class:"weilin-tools-dialog-header"},iC={class:"weilin-tools-dialog-body"},uC={class:"form-group"},cC=["placeholder"],dC={class:"form-group"},fC=["placeholder"],pC={class:"form-group"},gC={class:"color-picker"},hC={class:"color-controls"},mC={class:"alpha-control"},vC={class:"alpha-value"},_C={class:"weilin-tools-dialog-footer"},yC={key:3,class:"weilin-tools-dialog-overlay"},bC={class:"weilin-tools-dialog-header"},wC={class:"weilin-tools-dialog-body"},xC={class:"confirm-message"},TC={class:"weilin-tools-dialog-footer"},SC=wt({__name:"history_index",setup(e){const{t}=ht(),o=b(""),n=b([]),a=b([]),s=b([]),r=b([]),l=b("history"),u=b([]),d=b(!1),c=b(!1),f=b(!1),h=b({hex:"rgba(255, 123, 2, .4)",alpha:100}),p=b({name:"",tag:"",color:"rgba(255, 123, 2, .4)"}),v=b(!1),y=b(0),T=O=>JSON.parse(O).prompt,k=O=>({hex:"#FFFFFF",alpha:0}),$=O=>{const{hex:Q,alpha:E}=k();h.value={hex:Q,alpha:E}},B=()=>{f.value=!1,p.value={id:"",name:"",tag:"",backgroundColor:"transparent"},$(),d.value=!0},w=O=>{const Q=O.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/);if(Q){const[,E,L,N,J]=Q,de=`#${((1<<24)+(parseInt(E)<<16)+(parseInt(L)<<8)+parseInt(N)).toString(16).slice(1)}`,he=J?Math.round(parseFloat(J)*100):100;return{hex:de,alpha:he}}return{hex:"#FF7B02",alpha:50}},M=O=>{f.value=!0,p.value={...O},h.value=w(O.color),d.value=!0},H=()=>{const O=se(h.value.hex,h.value.alpha);p.value.color=O},W=()=>{d.value=!1,p.value={name:"",tag:"",color:"rgba(255, 123, 2, .4)"},f.value=!1},D=b(""),I=b(null),ee=nt(()=>{if(!I.value)return"";switch(D.value){case"history":return t("history.deleteHistoryConfirm",{name:I.value.tag});case"favorite":return t("history.deleteFavoriteConfirm",{name:I.value.tag});case"deleteSelected":return t("history.confirmDeleteSelected");case"deleteSelectedFavorite":return t("history.confirmDeleteSelected");default:return""}}),K=O=>{D.value="history",I.value=O,c.value=!0},V=O=>{D.value="favorite",I.value=O,c.value=!0},ne=()=>{v.value=!1,y.value=0,D.value="deleteSelected",I.value=u.value,c.value=!0},oe=()=>{v.value=!1,y.value=0,D.value="deleteSelectedFavorite",I.value=u.value,c.value=!0},X=async()=>{try{switch(D.value){case"history":Dn.deleteHistory(I.value.id_index).then(O=>{ie(),Y({type:"success",str:"message.deleteSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"})});break;case"favorite":Dn.deleteFavorite(I.value.id_index).then(O=>{Te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.deleteSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"})});break;case"deleteSelected":Dn.batchDeleteHistory(u.value).then(O=>{ie(),Y({type:"success",str:"message.deleteSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"})});break;case"deleteSelectedFavorite":Dn.batchDeleteFavorite(I.value).then(O=>{Te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.deleteSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"})});break}F()}catch{Y({type:"warn",str:"message.networkError"})}},re=O=>{O.target.checked?l.value==="history"?u.value=n.value.map(Q=>Q.id_index):u.value=s.value.map(Q=>Q.id_index):u.value=[]},se=(O,Q)=>{const E=parseInt(O.slice(1,3),16),L=parseInt(O.slice(3,5),16),N=parseInt(O.slice(5,7),16);return`rgba(${E}, ${L}, ${N}, ${Q/100})`},F=()=>{c.value=!1,D.value="",I.value=null},R=()=>{if(!p.value.tag){Y({type:"warn",str:"history.dialog.tag_placeholder"});return}f.value?Dn.editFavorite({id_index:p.value.id_index,name:p.value.name,tag:p.value.tag,color:p.value.color}).then(O=>{Te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.editSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"})}):Dn.addFavorite({name:p.value.name,tag:p.value.tag,color:p.value.color}).then(O=>{Te(),window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Y({type:"success",str:"message.addSuccess"})}).catch(O=>{Y({type:"warn",str:"message.networkError"})}),W()},ie=()=>{Dn.getHistory({}).then(O=>{n.value=O.data,a.value=n.value}).catch(O=>{Y({type:"warn",str:"message.networkError"})})},Te=()=>{Dn.getFavorite().then(O=>{s.value=O.data,r.value=s.value}).catch(O=>{Y({type:"warn",str:"message.networkError"})})},te=()=>{a.value=n.value.filter(O=>O.tag.includes(o.value))},le=()=>{r.value=s.value.filter(O=>O.tag.includes(o.value))},ve=()=>{ie()},xe=()=>{Te()},pe=O=>{Dn.addFavorite({tag:O.tag}).then(Q=>{Q.code===200?(window.postMessage({type:"weilin_prompt_ui_refresh_all_data"},"*"),Te(),Y({type:"success",str:"message.addFavoriteSuccess"})):Y({type:"success",str:"message.addFavoriteIsExist"})}).catch(Q=>{Y({type:"warn",str:"message.networkError"})})},P=O=>{window.postMessage({type:"weilin_prompt_ui_user_history_tag",tagText:O.tag},"*")},q=()=>{u.value=[],v.value=!0},Z=()=>{u.value=[],v.value=!1,y.value=0};return _t(()=>{ie(),Te()}),(O,Q)=>(x(),C("div",Mk,[i("h1",null,m(l.value==="history"?g(t)("history.title"):g(t)("history.favorites")),1),i("div",Ok,[i("button",{class:Ce([{active:l.value==="history"},"tab-button"]),onClick:Q[0]||(Q[0]=E=>l.value="history")},m(g(t)("history.history")),3),i("button",{class:Ce([{active:l.value==="favorites"},"tab-button"]),onClick:Q[1]||(Q[1]=E=>l.value="favorites")},m(g(t)("history.favorites")),3)]),l.value==="history"?(x(),C("div",Rk,[i("div",Nk,[i("button",{class:"refresh-btn",onClick:ve},[...Q[14]||(Q[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)])]),we(i("input",{type:"text","onUpdate:modelValue":Q[2]||(Q[2]=E=>o.value=E),placeholder:g(t)("history.search_placeholder"),onInput:te,class:"search-input"},null,40,Dk),[[$e,o.value]]),v.value?we((x(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":Q[3]||(Q[3]=E=>y.value=E),value:1,class:"tag-checkbox",onChange:re},null,544)),[[Vt,y.value]]):fe("",!0),v.value?fe("",!0):(x(),C("button",{key:1,class:"bulk-delete-btn",onClick:q,title:g(t)("history.bulk_delete")},[...Q[15]||(Q[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,Pk)),v.value?(x(),C("button",{key:2,class:"bulk-delete-btn",onClick:ne,title:g(t)("history.sure_delete"),disabled:u.value.length===0},[...Q[16]||(Q[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,Fk)):fe("",!0),v.value?(x(),C("button",{key:3,class:"bulk-delete-btn",onClick:Z,title:g(t)("history.cancel_delete")},[...Q[17]||(Q[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,Uk)):fe("",!0)]),i("ul",Bk,[(x(!0),C(Oe,null,We(a.value,E=>(x(),C("li",{key:E.id_index,class:"history-item"},[i("span",null,m(T(E.tag)),1),i("div",Hk,[i("button",{onClick:L=>pe(E),class:"favorite-btn",title:g(t)("history.add_to_favorites")},[...Q[18]||(Q[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,jk),i("button",{onClick:L=>K(E),class:"delete-favorite-btn",title:g(t)("history.delete_history")},[...Q[19]||(Q[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,Wk),i("button",{onClick:L=>P(E),class:"use-btn",title:g(t)("history.use_item")},[...Q[20]||(Q[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,Vk),v.value?we((x(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":Q[4]||(Q[4]=L=>u.value=L),value:E.id_index,class:"tag-checkbox"},null,8,zk)),[[Vt,u.value]]):fe("",!0)])]))),128))])])):(x(),C("div",qk,[i("div",Gk,[i("button",{class:"refresh-btn",onClick:xe},[...Q[21]||(Q[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)])]),we(i("input",{type:"text","onUpdate:modelValue":Q[5]||(Q[5]=E=>o.value=E),placeholder:g(t)("history.search_placeholder"),onInput:le,class:"search-input"},null,40,Qk),[[$e,o.value]]),v.value?we((x(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":Q[6]||(Q[6]=E=>y.value=E),value:1,class:"tag-checkbox",onChange:re},null,544)),[[Vt,y.value]]):fe("",!0),i("button",{class:"add-his-btn",onClick:B,title:g(t)("history.add_new")},[...Q[22]||(Q[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,Yk),v.value?fe("",!0):(x(),C("button",{key:1,class:"bulk-delete-btn",onClick:q,title:g(t)("history.bulk_delete")},[...Q[23]||(Q[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,Kk)),v.value?(x(),C("button",{key:2,class:"bulk-delete-btn",onClick:oe,title:g(t)("history.sure_delete"),disabled:u.value.length===0},[...Q[24]||(Q[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,Jk)):fe("",!0),v.value?(x(),C("button",{key:3,class:"bulk-delete-btn",onClick:Z,title:g(t)("history.cancel_delete")},[...Q[25]||(Q[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,Xk)):fe("",!0)]),i("ul",Zk,[(x(!0),C(Oe,null,We(r.value,E=>(x(),C("li",{key:E.id_index,class:"history-item"},[i("div",{class:"favor-name-box",style:ct({backgroundColor:E.color||"transparent"})},[E.name.length>0?(x(),C("span",eC,m(E.name),1)):fe("",!0)],4),i("span",null,m(T(E.tag)),1),i("div",tC,[i("button",{onClick:L=>M(E),class:"delete-favorite-btn",title:g(t)("history.edit_favorite")},[...Q[26]||(Q[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,nC),i("button",{onClick:L=>V(E),class:"delete-favorite-btn",title:g(t)("history.delete_favorite")},[...Q[27]||(Q[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,oC),i("button",{onClick:L=>P(E),class:"use-btn",title:g(t)("history.use_favorite")},[...Q[28]||(Q[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,aC),v.value?we((x(),C("input",{key:0,type:"checkbox","onUpdate:modelValue":Q[7]||(Q[7]=L=>u.value=L),value:E.id_index,class:"tag-checkbox"},null,8,sC)),[[Vt,u.value]]):fe("",!0)])]))),128))])])),d.value?(x(),C("div",rC,[i("div",{class:"weilin-tools-dialog-content",onMousedown:Q[12]||(Q[12]=ot(()=>{},["stop"]))},[i("div",lC,[i("h2",null,m(f.value?g(t)("history.dialog.edit_tag"):g(t)("history.dialog.add_tag")),1),i("button",{class:"close-btn",onClick:W},"×")]),i("div",iC,[i("div",uC,[i("label",null,m(g(t)("history.dialog.name")),1),we(i("input",{type:"text","onUpdate:modelValue":Q[8]||(Q[8]=E=>p.value.name=E),placeholder:g(t)("history.dialog.name_placeholder")},null,8,cC),[[$e,p.value.name]])]),i("div",dC,[i("label",null,m(g(t)("history.dialog.tag")),1),we(i("textarea",{"onUpdate:modelValue":Q[9]||(Q[9]=E=>p.value.tag=E),placeholder:g(t)("history.dialog.tag_placeholder"),rows:"4"}," ",8,fC),[[$e,p.value.tag]])]),i("div",pC,[i("label",null,m(g(t)("history.dialog.background_color")),1),i("div",gC,[i("div",{class:"color-preview",style:ct({backgroundColor:O.previewColor})},null,4),i("div",hC,[we(i("input",{type:"color","onUpdate:modelValue":Q[10]||(Q[10]=E=>h.value.hex=E),onInput:H,class:"color-input"},null,544),[[$e,h.value.hex]]),i("div",mC,[we(i("input",{type:"range","onUpdate:modelValue":Q[11]||(Q[11]=E=>h.value.alpha=E),min:"0",max:"100",onInput:H,class:"alpha-slider"},null,544),[[$e,h.value.alpha,void 0,{number:!0}]]),i("span",vC,m(h.value.alpha)+"%",1)])])])])]),i("div",_C,[i("button",{class:"cancel-btn",onClick:W},m(g(t)("common.cancel")),1),i("button",{class:"confirm-btn",onClick:R},m(g(t)("common.confirm")),1)])],32)])):fe("",!0),c.value?(x(),C("div",yC,[i("div",{class:"weilin-tools-dialog-content confirm-weilin-tools-dialog",onMousedown:Q[13]||(Q[13]=ot(()=>{},["stop"]))},[i("div",bC,[i("h2",null,m(g(t)("common.confirmDelete")),1),i("button",{class:"close-btn",onClick:F},"×")]),i("div",wC,[i("p",xC,m(ee.value),1)]),i("div",TC,[i("button",{class:"cancel-btn",onClick:F},m(g(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:X},m(g(t)("common.delete")),1)])],32)])):fe("",!0)]))}},[["__scopeId","data-v-d9f9b5c3"]]),kC={key:0,class:"drop-zone"},CC={key:1,class:"preview-container"},EC=["srcdoc"],LC={class:"action-buttons"},Sg="weilin_tools_",$C=wt({__name:"tranToWeb",emits:["close","update"],setup(e,{expose:t,emit:o}){const{t:n}=ht(),a=b(!1),s=b(""),r=b(null),l={tranToWeb:{visible:!1,position:{x:150,y:150},size:{width:800,height:600}}},d=b((()=>{try{const D=localStorage.getItem(`${Sg}tranToWebState`);if(D){const I=JSON.parse(D),ee={...l};return I.tranToWeb&&(ee.tranToWeb={...l.tranToWeb,...I.tranToWeb}),ee}}catch(D){console.error("Error loading window states:",D)}return{...l}})());dt(d,D=>{try{localStorage.setItem(`${Sg}tranToWebState`,JSON.stringify(D))}catch(I){console.error("Error saving window states:",I)}},{deep:!0}),_t(()=>{Be.registerWindow("tranToWeb")}),On(()=>{Be.unregisterWindow("tranToWeb")});const c=D=>{a.value=!1},f=(D,I)=>{d.value[D]&&(d.value[D].position={...I})},h=(D,I)=>{d.value[D]&&(d.value[D].size={...I})},p=()=>{a.value=!0,Be.setActiveWindow("tranToWeb")},v=D=>{D.dataTransfer.dropEffect="copy"},y=D=>{const I=D.dataTransfer.files[0];I&&I.type.startsWith("image/")&&k(I)},T=D=>{const I=D.clipboardData.items;for(let ee=0;ee<I.length;ee++)if(I[ee].type.startsWith("image/")){const K=I[ee].getAsFile();k(K);break}},k=D=>{const I=new FileReader;I.onload=ee=>{const K=ee.target.result,V=btoa(K);r.value=V,$()},I.readAsDataURL(D)},$=()=>{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>
`},B=()=>{const D=new Blob([s.value],{type:"text/html"}),I=URL.createObjectURL(D),ee=document.createElement("a");ee.href=I,ee.download="image-to-html.html",document.body.appendChild(ee),ee.click(),document.body.removeChild(ee),URL.revokeObjectURL(I)},w=()=>{s.value="",r.value=null},M=b(null),H=()=>{s.value||M.value.click()},W=D=>{const I=D.target.files[0];I&&I.type.startsWith("image/")&&k(I)};return t({open:p}),(D,I)=>a.value?(x(),yt(wn,{key:0,title:g(n)("utils.tranToWeb"),position:d.value.tranToWeb.position,size:d.value.tranToWeb.size,"z-index":g(Be).getZIndex("tranToWeb"),"onUpdate:position":I[0]||(I[0]=ee=>f("tranToWeb",ee)),"onUpdate:size":I[1]||(I[1]=ee=>h("tranToWeb",ee)),onActive:I[2]||(I[2]=ee=>g(Be).setActiveWindow("tranToWeb")),onClose:I[3]||(I[3]=ee=>c())},{default:pt(()=>[i("div",{class:"utils_tran_web__content",onDragover:ot(v,["prevent"]),onDrop:ot(y,["prevent"]),onPaste:T,onClick:H},[s.value?(x(),C("div",CC,[i("iframe",{srcdoc:s.value,class:"html-preview"},null,8,EC),i("div",LC,[i("button",{onClick:B},m(g(n)("utils.downloadHtml")),1),i("button",{onClick:w},m(g(n)("utils.clear")),1)])])):(x(),C("div",kC,m(g(n)("utils.dropOrPasteImage")),1)),i("input",{type:"file",ref_key:"fileInput",ref:M,style:{display:"none"},accept:"image/*",onChange:W},null,544)],32)]),_:1},8,["title","position","size","z-index"])):fe("",!0)}},[["__scopeId","data-v-aaebcad3"]]),AC=["onMouseenter","onMouseleave","onMousedown","onMouseup"],IC=wt({__name:"FloatingBall",setup(e){const{t}=ht(),o=b(parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallCount"))||1),n=b(parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallSize"))||66),a=b(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||n.value),s=b(localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default"),r=b(localStorage.getItem("weilin_prompt_ui_customSkinUrl")||""),l=b(localStorage.getItem("weilin_prompt_ui_bgType")||"gradient"),u=b(localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb"),d=b(localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc"),c=b(localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50);o.value<1&&(o.value=1,localStorage.setItem("weilin_prompt_ui_floatingBallCount",o.value)),n.value<5&&(n.value=66,localStorage.setItem("weilin_prompt_ui_floatingBallSize",n.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",o.value),localStorage.getItem("weilin_prompt_ui_floatingBallSize")||localStorage.setItem("weilin_prompt_ui_floatingBallSize",n.value),localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize")||localStorage.setItem("weilin_prompt_ui_floatingBallHeightSize",n.value);const f=b([]),h=b([]),p=b([]),v=b([]),y=b(null),T=nt(()=>v.value.map(K=>{const V={...K};return s.value==="custom"&&r.value?(V.backgroundImage=`url(${r.value})`,V.backgroundSize="contain",V.backgroundRepeat="no-repeat",V.backgroundPosition="center",V.imageRendering="optimizeQuality"):l.value==="gradient"?V.background=`linear-gradient(135deg, ${u.value}, ${d.value})`:V.background="transparent",V.borderRadius=`${c.value}%`,V}));for(let K=0;K<o.value;K++){p.value[K]=!1,h.value[K]=!1;const V=window.innerWidth,ne=window.innerHeight,oe=n.value,X=a.value,re=10,se=Math.floor(V/(oe+re)),F=Math.floor(K/se);let ie=20+K%se*(oe+re),Te=ne-100-F*(X+re);ie=Math.max(0,ie),ie=Math.min(ie,V-oe),Te=Math.max(0,Te),Te=Math.min(Te,ne-X),f.value[K]={x:ie,y:Te,width:oe+"px",height:X+"px"},v.value[K]={left:`${f.value[K].x}px`,top:`${f.value[K].y}px`,width:`${oe}px`,height:`${X}px`}}const k=(K,V)=>{K.target.closest(".weilin_prompt_ui_floating-ball")&&(h.value[V]=!0,document.addEventListener("mousemove",oe=>$(oe,V)),document.addEventListener("mouseup",oe=>B(oe,V)))},$=(K,V)=>{if(h.value[V]){const ne=window.innerWidth,oe=window.innerHeight,X=n.value,re=a.value;let se=K.clientX-X/2,F=K.clientY-re/2;se=Math.max(0,se),se=Math.min(se,ne-X),F=Math.max(0,F),F=Math.min(F,oe-re),f.value[V]={x:se,y:F,width:X+"px",height:re+"px"},v.value[V]={left:`${f.value[V].x}px`,top:`${f.value[V].y}px`,width:`${X}px`,height:`${re}px`}}},B=(K,V)=>{h.value[V]=!1,document.removeEventListener("mousemove",ne=>$(ne,V)),document.removeEventListener("mouseup",ne=>B(ne,V))},w=()=>{},M=K=>{switch(K){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":W();break;case"item8":y.value.open();break}},H=b(),W=()=>{H.value.open()},D=K=>{if(K.data.type==="weilin_prompt_ui_floating_ball_setting"){o.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallCount"))||1,n.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallSize"))||66,a.value=parseInt(localStorage.getItem("weilin_prompt_ui_floatingBallHeightSize"))||n.value,s.value=localStorage.getItem("weilin_prompt_ui_ballSkinType")||"default",r.value=localStorage.getItem("weilin_prompt_ui_customSkinUrl")||"",l.value=localStorage.getItem("weilin_prompt_ui_bgType")||"gradient",u.value=localStorage.getItem("weilin_prompt_ui_gradientColor1")||"#6a11cb",d.value=localStorage.getItem("weilin_prompt_ui_gradientColor2")||"#2575fc",c.value=localStorage.getItem("weilin_prompt_ui_ballBorderRadius")||50,p.value=[],h.value=[],f.value=[],v.value=[];for(let V=0;V<o.value;V++){p.value[V]=!1,h.value[V]=!1;const ne=window.innerWidth,oe=window.innerHeight,X=n.value,re=a.value,se=10,F=Math.floor(ne/(X+se)),R=Math.floor(V/F);let Te=20+V%F*(X+se),te=oe-100-R*(re+se);Te=Math.max(0,Te),Te=Math.min(Te,ne-X),te=Math.max(0,te),te=Math.min(te,oe-re),f.value[V]={x:Te,y:te,width:X+"px",height:re+"px"},v.value[V]={left:`${f.value[V].x}px`,top:`${f.value[V].y}px`,width:`${X}px`,height:`${re}px`,...s.value==="custom"&&r.value?{backgroundImage:`url(${r.value})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}:l.value==="gradient"?{background:`linear-gradient(135deg, ${u.value}, ${d.value})`}:{background:"transparent"},borderRadius:`${c.value}%`}}}},I=K=>{p.value[K]=!0},ee=K=>{p.value[K]=!1};return _t(()=>{window.addEventListener("message",D)}),On(()=>{window.removeEventListener("message",D),document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",B)}),(K,V)=>(x(),C(Oe,null,[(x(!0),C(Oe,null,We(o.value,ne=>(x(),C("div",{class:"weilin_prompt_ui_floating-ball",style:ct(T.value[ne-1]),onMouseenter:oe=>I(ne-1),onMouseleave:oe=>ee(ne-1),onMousedown:oe=>k(oe,ne-1),onMouseup:oe=>B(oe,ne-1),key:"floating-ball-"+ne},[i("div",{class:"weilin_prompt_ui_ball-content",onClick:w},m(s.value==="default"?"WeiLin":""),1),p.value[ne-1]?(x(),C("div",{key:0,class:"weilin_prompt_ui_menu-container",onMousedown:V[8]||(V[8]=ot(()=>{},["stop"]))},[i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[0]||(V[0]=oe=>M("item1"))},m(g(t)("floatingBall.promptBox")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[1]||(V[1]=oe=>M("item2"))},m(g(t)("floatingBall.tagManager")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[2]||(V[2]=oe=>M("item3"))},m(g(t)("floatingBall.loraManager")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[3]||(V[3]=oe=>M("item4"))},m(g(t)("floatingBall.aiWindow")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[4]||(V[4]=oe=>M("item6"))},m(g(t)("floatingBall.openNodeListWindow")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[5]||(V[5]=oe=>M("item7"))},m(g(t)("floatingBall.tranToWeb")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[6]||(V[6]=oe=>M("item8"))},m(g(t)("floatingBall.openSetting")),1),i("div",{class:"weilin_prompt_ui_menu-item",onClick:V[7]||(V[7]=oe=>M("item5"))},m(g(t)("floatingBall.restoreWindow")),1)],32)):fe("",!0)],44,AC))),128)),qe($C,{ref_key:"tranToWebRef",ref:H},null,512),qe(lp,{ref_key:"settingDialog",ref:y},null,512)],64))}},[["__scopeId","data-v-c4edc822"]]),MC={class:"ai-chat-window"},OC={class:"history-sidebar"},RC={class:"history-list"},NC=["onClick"],DC={key:0},PC=["onKeyup","onBlur"],FC={class:"item-actions"},UC=["onClick"],BC=["onClick"],HC={class:"chat-main"},jC={class:"message-list"},WC={class:"message-content"},VC={key:0,class:"message assistant"},zC={class:"message-content"},qC={class:"input-area"},GC=["placeholder","onKeydown"],QC=["disabled"],YC=wt({__name:"ai_window",setup(e){const{t}=ht(),o=b([]),n=b(-1),a=b(""),s=b(!1),r=b({}),l=b(!1),u=b(""),d=M=>{var H;o.value[M]&&(l.value=!0,u.value=((H=o.value[M])==null?void 0:H.title)||`对话 ${M+1}`,n.value=M)},c=M=>{o.value[M]&&(u.value.trim()&&(o.value[M].title=u.value.trim(),k()),l.value=!1)},f=()=>{l.value=!1},h=()=>{gs.getOpenAiSetting().then(M=>{r.value=M.data}).catch(M=>{Y({type:"warn",str:"message.networkError"})})};_t(()=>{h()});const p=nt(()=>o.value[n.value]||{messages:[]}),v=M=>{n.value=M},y=()=>{s.value=!0;const M={title:`对话 ${o.value.length+1}`,messages:[],createdAt:new Date().toISOString()};return o.value.push(M),n.value=o.value.length-1,k(),s.value=!1,M},T=()=>{const M=localStorage.getItem("aiChatHistory");M&&(o.value=JSON.parse(M))},k=()=>{localStorage.setItem("aiChatHistory",JSON.stringify(o.value))};_t(()=>{h(),T()});const $=async()=>{if(!a.value.trim()||s.value)return;(o.value.length===0||n.value===-1)&&y();const M={role:"user",content:a.value,timestamp:new Date().toISOString()};p.value.messages.push(M),k(),a.value="";const H={role:"assistant",content:"",timestamp:new Date().toISOString()};p.value.messages.push(H),k(),s.value=!0;try{await w({messages:p.value.messages},W=>{const D=p.value.messages[p.value.messages.length-1];D.content+=W.content,k()},W=>{console.error("Error:",W);const D=p.value.messages[p.value.messages.length-1];D.content="抱歉,出错了,请稍后再试。",k()},()=>{s.value=!1,k()})}catch(W){console.error("Error:",W),s.value=!1;const D=p.value.messages[p.value.messages.length-1];D.content="请求失败,请检查网络连接。",k()}},B=M=>{o.value.splice(M,1),n.value===M&&(n.value=Math.max(0,M-1)),k()},w=async(M,H,W,D)=>{var I,ee;try{const K=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:M.messages,stream:!0})});if(!K.ok)throw new Error(`HTTP error! status: ${K.status}`);const V=K.body.getReader(),ne=new TextDecoder;let oe="";for(;;){const{done:X,value:re}=await V.read();if(X){D();break}oe+=ne.decode(re,{stream:!0});const se=oe.split(`
`);oe=se.pop();for(const F of se)if(F.trim()!==""){if(F==="data: [DONE]"){D();return}try{const R=F.replace(/^data: /,""),Te=((ee=(I=JSON.parse(R).choices[0])==null?void 0:I.delta)==null?void 0:ee.content)||"";Te&&H({content:Te})}catch{console.error("Failed to parse message:",F)}}}}catch(K){W(K)}};return(M,H)=>(x(),C("div",MC,[i("div",OC,[i("button",{class:"new-chat-btn",onClick:y},m(g(t)("aiWindow.newChat")),1),i("div",RC,[(x(!0),C(Oe,null,We(o.value,(W,D)=>(x(),C("div",{key:D,class:Ce(["history-item",{active:n.value===D}]),onClick:I=>v(D)},[!l.value||n.value!==D?(x(),C("span",DC,m((W==null?void 0:W.title)||g(t)("aiWindow.chatName")+` ${D+1}`),1)):we((x(),C("input",{key:1,"onUpdate:modelValue":H[0]||(H[0]=I=>u.value=I),onKeyup:[en(I=>c(D),["enter"]),en(f,["esc"])],onBlur:I=>c(D),class:"rename-input"},null,40,PC)),[[$e,u.value]]),i("div",FC,[i("button",{class:"rename-btn",onClick:ot(I=>d(D),["stop"])},"✎",8,UC),l.value?fe("",!0):(x(),C("button",{key:0,class:"delete-btn",onClick:ot(I=>B(D),["stop"])},"×",8,BC))])],10,NC))),128))])]),i("div",HC,[i("div",jC,[(x(!0),C(Oe,null,We(p.value.messages,(W,D)=>(x(),C("div",{key:D,class:Ce(["message",W.role])},[i("div",WC,[i("pre",null,m(W.content),1)])],2))),128)),s.value?(x(),C("div",VC,[i("div",zC,[i("pre",null,m(g(t)("aiWindow.thinking")),1)])])):fe("",!0)]),i("div",qC,[we(i("textarea",{class:"ai-chat-textarea","onUpdate:modelValue":H[1]||(H[1]=W=>a.value=W),placeholder:g(t)("aiWindow.inputMessage"),onKeydown:en(ot($,["exact","prevent"]),["enter"])},null,40,GC),[[$e,a.value]]),i("button",{class:"ai-chat-btn",onClick:$,disabled:s.value},m(g(t)("aiWindow.send")),9,QC)])])]))}},[["__scopeId","data-v-0cea2906"]]),KC={class:"lora-info"},JC={class:"lora-header"},XC=["title"],ZC={class:"lora-weights"},eE={class:"weight-item"},tE=["title"],nE={class:"weight-item"},oE={class:"center-box"},aE=["onClick"],Dr="weilin_prompt_ui_",sE=wt({__name:"index",setup(e){const{t}=ht(),o=b([]);window.addEventListener("message",a=>{a.data.type==="weilin_prompt_ui_update_node_list_info"&&(o.value=a.data.nodeList)});const n=a=>{window.postMessage({type:"weilin_prompt_ui_prompt_open_node_wit_seed",seed:a},"*")};return _t(()=>{window.postMessage({type:"weilin_prompt_ui_prompt_get_node_list_info"},"*")}),(a,s)=>(x(),C("div",{class:Ce(`${Dr}lora-stack`)},[i("div",{class:Ce(`${Dr}lora-content`)},[i("div",{class:Ce(`${Dr}lora-body`)},[i("div",{class:Ce(`${Dr}lora-list`)},[(x(!0),C(Oe,null,We(o.value,r=>(x(),C("div",{key:r.id,class:"lora-item"},[i("div",KC,[i("div",JC,[i("span",{class:"lora-name",title:r.title},"#"+m(r.id)+" - "+m(r.title),9,XC)]),i("div",ZC,[i("div",eE,[i("div",{class:"text-label",title:r.text},m(r.text),9,tE)]),i("div",nE,[i("div",oE,[i("button",{onClick:l=>n(r.seed),class:"open-button"},m(g(t)("nodeListWindow.openPromptUI")),9,aE)])])])])]))),128))],2)],2)],2)],2))}},[["__scopeId","data-v-0c15a742"]]),Wi={getTreeFromCloud:async e=>await Ae({url:"/cloud/get/tree",method:"post",data:{path:e}}),getLocalInstallPackage:async()=>await Ae({url:"/cloud/get/local/package",method:"post",data:{}}),installSelectPackage:async(e,t)=>await Ae({url:"/cloud/download/file",method:"post",timeout:0,data:{paths:t,path:e}})},rE={class:"cloud-manager"},lE={class:"toolbar"},iE={class:"current-path"},uE={class:"file-list"},cE={class:"file-info"},dE={class:"file-name"},fE={class:"file-type"},pE={class:"file-actions"},gE=["onClick"],hE={key:1,class:"install-container"},mE={key:0,class:"installed-badge"},vE=["onClick","disabled"],_E=wt({__name:"index",setup(e){const{t}=ht(),o=b([]),n=b("tags"),a=b("tags"),s=b([]),r=async y=>{try{const T=await Wi.getTreeFromCloud(y);o.value=T.data}catch(T){console.error("获取文件树失败:",T),Y({type:"warn",str:"message.networkError"})}},l=async()=>{try{const y=await Wi.getLocalInstallPackage();s.value=y.data||[]}catch(y){console.error("获取已安装包列表失败:",y),Y({type:"warn",str:"message.networkError"})}},u=y=>s.value.some(T=>T===y),d=async y=>{try{const T=o.value.find(k=>k.path===y);T&&(T.isInstalling=!0,await Wi.installSelectPackage(a.value,[y]).then(()=>{l(),Y({type:"success",str:"message.installPackageSuccess"})}))}catch(T){console.error("安装包失败:",T),Y({type:"warn",str:"message.installPackageFail"})}finally{const T=o.value.find(k=>k.path===y);T&&(T.isInstalling=!1)}},c=()=>{const y=n.value.split("/");y.length>1&&(n.value=y.slice(0,-1).join("/"),r(n.value))},f=()=>{r(n.value),l()},h=y=>{n.value=y,r(y)},p=()=>{a.value="tags",n.value="tags",r(n.value)},v=()=>{a.value="danbooru",n.value="danbooru",r(n.value)};return _t(()=>{r(n.value),l()}),(y,T)=>(x(),C("div",rE,[i("div",lE,[i("button",{class:"refresh-btn",onClick:f},[...T[0]||(T[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:p},[T[1]||(T[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,m(g(t)("cloudWindow.tagDatabase")),1)]),i("button",{class:"database-btn",onClick:v},[T[2]||(T[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,m(g(t)("cloudWindow.danbooruDatabase")),1)]),i("div",iE,[i("span",null,m(g(t)("cloudWindow.currentPath"))+": "+m(a.value=="tags"?g(t)("cloudWindow.tagDatabase"):g(t)("cloudWindow.danbooruDatabase")),1)])]),i("div",uE,[n.value!=="tags"&&n.value!=="danbooru"?(x(),C("button",{key:0,class:"back-btn",onClick:c},[T[3]||(T[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)),Ve(" "+m(g(t)("cloudWindow.back")),1)])):fe("",!0),(x(!0),C(Oe,null,We(o.value,k=>(x(),C("div",{key:k.path,class:"file-item"},[i("div",cE,[i("span",dE,m(k.name),1),i("span",fE,m(k.type=="dir"?"文件夹":k.type=="file"?"文件":"其它未知文件"),1)]),i("div",pE,[k.type==="dir"?(x(),C("button",{key:0,onClick:$=>h(k.path),class:"open-btn"},m(g(t)("cloudWindow.open")),9,gE)):k.type==="file"?(x(),C("div",hE,[u(k.path)?(x(),C("span",mE,m(g(t)("cloudWindow.installed")),1)):(x(),C("button",{key:1,onClick:$=>d(k.path),class:"install-btn",disabled:k.isInstalling},m(k.isInstalling?g(t)("cloudWindow.installing"):g(t)("cloudWindow.install")),9,vE))])):fe("",!0)])]))),128))])]))}},[["__scopeId","data-v-508c00b0"]]),yE={class:"header-actions"},bE=["title"],wE=["onMouseover"],xE={class:"lora-info"},TE={class:"lora-header"},SE=["title"],kE={class:"lora-actions"},CE=["onClick","title"],EE=["onClick","title"],LE={class:"lora-weights"},$E={class:"weight-item"},AE=["onUpdate:modelValue"],IE={class:"weight-item"},ME=["onUpdate:modelValue"],OE={class:"lora-footer"},RE=["onClick","title"],NE={viewBox:"0 0 24 24",width:"14",height:"14"},DE={key:0,d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"},PE={key:1,d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"},Ta="weilin_prompt_ui_",FE=wt({__name:"lora_stack",setup(e,{expose:t}){const{t:o}=ht(),n=b([]),a=b(""),s=b(!1),r=b(""),l=b(100),u=b(0),d=b(),c=b(!1),f=b(!1),h=b(),p=()=>{window.postMessage({type:"weilin_prompt_ui_openLoraManager_addLora_stack",seed:a.value},"*")},v=I=>{I.hidden=!I.hidden},y=(I,ee)=>{if(f.value=!0,r.value===I&&s.value)return;const V=ee.currentTarget.getBoundingClientRect();let oe={left:V.left-450-10,top:V.top};oe.left<10&&(oe.left=V.right+10),oe.top=Math.max(10,Math.min(oe.top,window.innerHeight-310)),l.value=oe.left,u.value=oe.top,s.value=!0,r.value=I,Qe(()=>{h.value.refresh()})},T=()=>{f.value=!1,setTimeout(()=>{!c.value&&!f.value&&(s.value=!1,r.value="",c.value=!1)},200)},k=()=>{c.value=!0,f.value=!0},$=()=>{s.value=!1,r.value="",c.value=!1},B=I=>{n.value.find(ee=>ee.name===I.name)||n.value.push({name:I.name,weight:1,text_encoder_weight:1,...I})},w=I=>{const ee=n.value.findIndex(K=>K.name===I.name);ee>-1&&n.value.splice(ee,1)},M=b(),H=I=>{M.value.open({name:I.lora})};window.addEventListener("message",I=>{I.data.type==="weilin_prompt_ui_selectLora_stack_"+a.value&&B(I.data.lora)});const W=(I,ee)=>{if(a.value=ee,I.length>0)try{const K=JSON.parse(I);if(K.lora&&K.lora!=""&&(n.value=K.lora),K.temp_lora&&K.temp_lora.length>0&&K.temp_lora!=""){const V=K.temp_lora;n.value=V}}catch{Y({type:"warn",str:"promptBox.settings.errorPrompt"})}};dt(n,I=>{D()},{deep:!0});const D=()=>{if(n.value.length>0){const I=n.value.filter(V=>!V.hidden);let ee={lora:"",temp_lora:n.value};I.length>0&&(ee.lora=I);const K=JSON.stringify(ee);window.postMessage({type:"weilin_prompt_ui_prompt_finish_lora_stack_"+a.value,data:K},"*")}else{const ee=JSON.stringify({lora:"",temp_lora:""});window.postMessage({type:"weilin_prompt_ui_prompt_finish_lora_stack_"+a.value,data:ee},"*")}};return t({initLoraStack:W}),(I,ee)=>(x(),C("div",{class:Ce(`${Ta}lora-stack`)},[i("div",{class:Ce(`${Ta}lora-content`)},[i("div",{class:Ce(`${Ta}lora-header`)},[i("div",yE,[i("button",{class:Ce(`${Ta}add-btn`),onClick:p,title:g(o)("controls.addLora")},[...ee[0]||(ee[0]=[i("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[i("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})],-1)])],10,bE)])],2),i("div",{class:Ce(`${Ta}lora-body`)},[i("div",{class:Ce(`${Ta}lora-list`)},[(x(!0),C(Oe,null,We(n.value,K=>(x(),C("div",{ref_for:!0,ref_key:"loraStackItemRef",ref:d,key:K.name,class:Ce(["lora-item",{"hidden-lora":K.hidden}]),onMouseover:V=>y(K.lora,V),onMouseleave:T},[i("div",xE,[i("div",TE,[i("span",{class:"lora-name",title:K.name},m(K.name),9,SE),i("div",kE,[i("button",{class:"look-on-btn",onClick:V=>H(K),title:g(o)("controls.lookOnLora")},[...ee[1]||(ee[1]=[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,CE),i("button",{class:"remove-btn",onClick:V=>w(K),title:g(o)("controls.removeLora")},[...ee[2]||(ee[2]=[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,EE)])]),i("div",LE,[i("div",$E,[i("label",null,m(g(o)("loraManager.modelWeight")),1),we(i("input",{type:"number","onUpdate:modelValue":V=>K.weight=V,class:"lora-weight",step:"0.1"},null,8,AE),[[$e,K.weight]])]),i("div",IE,[i("label",null,m(g(o)("loraManager.textEncoderWeight")),1),we(i("input",{type:"number","onUpdate:modelValue":V=>K.text_encoder_weight=V,class:"lora-weight",step:"0.1"},null,8,ME),[[$e,K.text_encoder_weight]])])]),i("div",OE,[i("button",{class:"hide-btn",onClick:V=>v(K),title:K.hidden?g(o)("lora.showLora"):g(o)("lora.hideLora")},[(x(),C("svg",NE,[K.hidden?(x(),C("path",PE)):(x(),C("path",DE))])),Ve(" "+m(K.hidden?g(o)("lora.showLora"):g(o)("lora.hideLora")),1)],8,RE)])])],42,wE))),128))],2)],2)],2),qe(Rr,{ref_key:"loraDetailLoraStackRef",ref:M},null,512),s.value?(x(),yt(Hi,{key:0,ref_key:"loraCardItem",ref:h,fileNmae:r.value,paddingLeft:l.value,paddingTop:u.value,onCardLeave:$,onCardenter:k},null,8,["fileNmae","paddingLeft","paddingTop"])):fe("",!0)],2))}},[["__scopeId","data-v-07a339ce"]]),Sa={searchDanbooru:async(e="",t=1,o=100)=>await Ae({url:"/danbooru/get_tags",method:"post",data:{search:e,page:t,limit:o}}),addDanbooruTag:async e=>await Ae({url:"/danbooru/add_tag",method:"post",data:e}),updateDanbooruTag:async e=>await Ae({url:"/danbooru/update_tag",method:"post",timeout:0,data:e}),deleteDanbooruTag:async e=>await Ae({url:"/danbooru/delete_tag",method:"post",timeout:0,data:{id:e}}),batchDeleteDanbooruTags:async e=>await Ae({url:"/danbooru/batch_delete_tag",method:"post",timeout:0,data:{values:e}}),runSQLToServer:async e=>await Ae({url:"/danbooru/run_sql_text",method:"post",timeout:0,data:{sql:e}})},UE={key:0,class:"loading-overlay"},BE={class:"settings-content"},HE={style:{"margin-bottom":"16px"}},jE=["placeholder"],WE={style:{"margin-bottom":"16px"}},VE=["placeholder"],zE=["placeholder"],qE=["placeholder"],GE={class:"data-container"},QE={key:0},YE={key:0},KE={class:"tag-group-container"},JE={key:0},XE={key:1},ZE={style:{display:"flex","align-items":"center"}},eL={key:0},tL=["placeholder"],nL=["placeholder"],oL=["placeholder"],aL=["placeholder"],sL=["onClick"],rL=["onClick"],lL=["onClick"],iL={key:1},uL={class:"tag-group-container"},cL={key:0},dL={key:1},fL={style:{display:"flex","align-items":"center"}},pL={key:0},gL=["placeholder"],hL=["placeholder"],mL=["placeholder"],vL=["placeholder"],_L=["onClick"],yL=["onClick"],bL=["onClick"],wL=wt({__name:"import_danbooru",setup(e,{expose:t}){const{t:o}=ht(),n=b(!1),a=b(""),s=b(""),r=b(""),l=b(""),u=b(""),d=b(""),c=b(""),f=b(""),h=b(""),p=b([]),v=b(-1),y=b(""),T=b(""),k=b(null);b(null);const $=b(null),B=b(!1),w=b(""),M=b(0),H=b(0);function W(){a.value="",s.value="",M.value=0,H.value=0,r.value="",l.value="",u.value="",d.value="",c.value="",f.value="",h.value="",p.value=[],v.value=-1,y.value="",T.value="",B.value=!1}function D(pe){W();const P=pe.target.files[0];if(P){const q=new FileReader;q.onload=Z=>{Z.target.result.split(";").filter(E=>E.trim()).forEach(E=>{if((E.includes("tag_groups")||E.includes("tag_subgroups"))&&E.includes("p_uuid"))if(E.includes("g_uuid")){u.value=E+";";const N=E.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);N&&(h.value=N[1]);const J=E.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);J&&(c.value=J[1].replace(/''/g,"'"))}else{l.value=E+";";const N=E.split("VALUES")[1].trim().match(/,\s*'([^']+)'\)$/);N&&(f.value=N[1]);const J=E.match(/VALUES\s*\([^'"]*['"]([^'"]+)['"]/);J&&(d.value=J[1].replace(/''/g,"'"))}else E.includes("tag_tags")&&p.value.push(E+";")})},q.readAsText(P)}pe.target.value=""}function I(pe){const P=pe.target.files[0];if(P){const q=new FileReader;q.onload=Z=>{Z.target.result.split(`
`).filter(E=>E.trim()).forEach(E=>{const L=E.split(",");if(L.length>=2){let N,J,de,he;L.length===2?(N=L[0].trim(),he=L[1].trim(),J=0,de=0):L.length>=3&&(N=L[0].trim(),J=parseInt(L[1].trim())||0,de=parseInt(L[2].trim())||0,he=L.slice(3).join(",").trim(),he=he.replace(/^"(.*)"$/,"$1"));const S=N.replace(/'/g,"''"),_=he.replace(/'/g,"''"),A=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${S}', '', '${_}', ${de}, ${J});`;p.value.push(A)}})},q.readAsText(P)}pe.target.value=""}function ee(){$.value.click()}function K(){let pe;p.value.length>0&&ne(p.value[0])?pe=[...p.value].join(`
`):pe=[l.value,u.value,...p.value].join(`
`);const P=new Blob([pe],{type:"text/sql"}),q=document.createElement("a");if(q.href=URL.createObjectURL(P),w.value.length<=0){const Z=parseInt(new Date().getTime()/1e3);q.download="export_"+Z+".sql"}else q.download=w.value+".sql";q.click()}function V(pe){const P=pe.match(/VALUES\s*\([^']*'([^']+)'/),q=pe.match(/VALUES\s*\([^']*'[^']*'\s*,\s*'([^']+)'/);return{text:P?P[1].replace(/''/g,"'"):"",desc:q?q[1].replace(/''/g,"'"):""}}function ne(pe){return pe.includes("danbooru_tag")}function oe(pe){const P=pe.match(/VALUES\s*\(\s*'([^']+)'\s*,\s*'([^']*)'\s*,\s*'([^']*)'\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/);return P?{tag:P[1].replace(/''/g,"'"),color_id:P[2],translate:P[3].replace(/''/g,"'"),hot:parseInt(P[4]),aliases:parseInt(P[5])}:{tag:"",color_id:"",translate:"",hot:0,aliases:0}}const X=b(0),re=b(0);function se(pe){const P=p.value[pe];if(ne(P)){const q=oe(P);y.value=q.tag,T.value=q.translate,X.value=q.hot,re.value=q.aliases}else{const q=V(P);y.value=q.text,T.value=q.desc}v.value=pe}function F(pe){const P=y.value.replace(/'/g,"''"),q=T.value.replace(/'/g,"''");if(ne(p.value[pe])){const Z=oe(p.value[pe]),O=parseInt(X.value)||0,Q=parseInt(re.value)||0;p.value[pe]=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${P}', '${Z.color_id}', '${q}', ${O}, ${Q});`}else p.value[pe]=p.value[pe].replace(/(VALUES\s*\([^']*')([^']+)'/,`$1${P}'`).replace(/(VALUES\s*\([^']*'[^']*'\s*,\s*')([^']+)'/,`$1${q}'`);v.value=-1}function R(){v.value=-1,y.value="",T.value="",X.value=0,re.value=0}function ie(pe){p.value.splice(pe,1)}function Te(){const pe=a.value.replace(/'/g,"''"),P=s.value.replace(/'/g,"''"),q=parseInt(M.value)||0,Z=parseInt(H.value)||0,O=`INSERT INTO "danbooru_tag" ("tag", "color_id", "translate", "hot", "aliases") VALUES ('${pe}', '', '${P}', ${q}, ${Z});`;p.value.push(O),a.value="",s.value="",M.value=0,H.value=0}const te=b(!1),le=async pe=>{te.value=!0;try{await Sa.runSQLToServer(pe).then(P=>{if(P.code!=200){Y({type:"warn",str:P.message});return}else ve(),Y({type:"success",str:"importDialog.successImport"})}).catch(P=>{console.error(P),Y({type:"warn",str:"importDialog.importFail"})})}catch(P){console.error(P),Y({type:"warn",str:"importDialog.importFail"})}finally{te.value=!1}},ve=()=>{window.postMessage({type:"weilin_prompt_ui_tag_manager_refresh"},"*")},xe=async()=>{if(p.value.length>0&&ne(p.value[0])){const pe=[...p.value];await le(pe)}else if(B.value){if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}const pe=[...p.value];await le(pe)}else{if(l.value.length<=0||u.value.length<=0){Y({type:"warn",str:"importDialog.pleaseFullRequest"});return}const pe=[l.value,u.value,...p.value];await le(pe)}};return dt(l,(pe,P)=>{var O,Q;if(!pe||pe===P)return;const q=(O=pe.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:O[1],Z=(Q=P==null?void 0:P.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Q[1];q&&Z&&u.value&&(u.value=u.value.replace(new RegExp(`'${Z}'`,"g"),`'${q}'`))}),dt(u,(pe,P)=>{var O,Q;if(!pe||pe===P)return;const q=(O=pe.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:O[1],Z=(Q=P==null?void 0:P.match(/'([^']+)'\s*\)\s*;?$/))==null?void 0:Q[1];q&&Z&&p.value.length>0&&(p.value=p.value.map(E=>E.replace(new RegExp(`'${Z}'`,"g"),`'${q}'`)))}),t({open:()=>{n.value=!0}}),(pe,P)=>(x(),C(Oe,null,[te.value?(x(),C("div",UE,[...P[19]||(P[19]=[i("div",{class:"loading-spinner"},null,-1)])])):fe("",!0),qe(ps,{modelValue:n.value,"onUpdate:modelValue":P[18]||(P[18]=q=>n.value=q),title:g(o)("danbooruManager.importBatchTitle")},{footer:pt(()=>[i("button",{onClick:P[17]||(P[17]=q=>n.value=!1)},m(g(o)("promptBox.settings.close")),1),i("button",{onClick:xe},m(g(o)("importDialog.sure")),1)]),default:pt(()=>[i("div",BE,[i("div",HE,[i("button",{onClick:W,class:"upload-btn"},m(g(o)("importDialog.cleanAll")),1),i("button",{style:{"margin-left":"10px"},onClick:K},m(g(o)("importDialog.dumpSQL")),1),we(i("input",{style:{width:"300px","margin-left":"10px"},"onUpdate:modelValue":P[0]||(P[0]=q=>w.value=q),placeholder:g(o)("importDialog.settingOutputName")},null,8,jE),[[$e,w.value]]),i("input",{type:"file",ref_key:"fileInput",ref:k,onChange:D,accept:".sql",style:{display:"none"}},null,544),i("input",{type:"file",ref_key:"danbooruTxtFileInput",ref:$,onChange:I,accept:".txt,.csv",style:{display:"none"}},null,544)]),i("div",WE,[we(i("input",{"onUpdate:modelValue":P[1]||(P[1]=q=>a.value=q),placeholder:"Tag"},null,512),[[$e,a.value]]),we(i("input",{"onUpdate:modelValue":P[2]||(P[2]=q=>s.value=q),placeholder:g(o)("importDialog.translater")},null,8,VE),[[$e,s.value]]),we(i("input",{"onUpdate:modelValue":P[3]||(P[3]=q=>M.value=q),placeholder:g(o)("danbooruManager.hot"),type:"number"},null,8,zE),[[$e,M.value]]),we(i("input",{"onUpdate:modelValue":P[4]||(P[4]=q=>H.value=q),placeholder:g(o)("danbooruManager.aliases"),type:"number"},null,8,qE),[[$e,H.value]]),i("button",{onClick:Te},m(g(o)("importDialog.add")),1),i("button",{style:{"margin-left":"10px"},onClick:ee,class:"upload-btn"},m(g(o)("danbooruManager.import")),1)]),i("div",GE,[l.value?(x(),C("div",QE,[i("h3",null,m(V(l.value).text),1),u.value?(x(),C("div",YE,[i("h4",null,m(V(u.value).text),1),i("div",KE,[(x(!0),C(Oe,null,We(p.value,(q,Z)=>(x(),C("div",{key:Z,style:{display:"flex","flex-direction":"column","align-items":"center"}},[ne(q)?(x(),C("p",JE,m(oe(q).tag)+" - "+m(oe(q).translate)+" ("+m(g(o)("danbooruManager.hot"))+": "+m(oe(q).hot)+", "+m(g(o)("danbooruManager.aliases"))+": "+m(oe(q).aliases)+")",1)):(x(),C("p",XE,m(V(q).text)+" - "+m(V(q).desc),1)),i("div",ZE,[v.value===Z?(x(),C("div",eL,[ne(q)?we((x(),C("input",{key:0,"onUpdate:modelValue":P[5]||(P[5]=O=>y.value=O),placeholder:"Tag"},null,512)),[[$e,y.value]]):we((x(),C("input",{key:1,"onUpdate:modelValue":P[6]||(P[6]=O=>y.value=O),placeholder:"Tag"},null,512)),[[$e,y.value]]),ne(q)?we((x(),C("input",{key:2,"onUpdate:modelValue":P[7]||(P[7]=O=>T.value=O),placeholder:g(o)("importDialog.translate")},null,8,tL)),[[$e,T.value]]):we((x(),C("input",{key:3,"onUpdate:modelValue":P[8]||(P[8]=O=>T.value=O),placeholder:g(o)("importDialog.translater")},null,8,nL)),[[$e,T.value]]),ne(q)?we((x(),C("input",{key:4,"onUpdate:modelValue":P[9]||(P[9]=O=>X.value=O),placeholder:g(o)("danbooruManager.hot"),type:"number"},null,8,oL)),[[$e,X.value]]):fe("",!0),ne(q)?we((x(),C("input",{key:5,"onUpdate:modelValue":P[10]||(P[10]=O=>re.value=O),placeholder:g(o)("danbooruManager.aliases"),type:"number"},null,8,aL)),[[$e,re.value]]):fe("",!0),i("button",{onClick:O=>F(Z)},m(g(o)("importDialog.sureYes")),9,sL),i("button",{style:{"margin-left":"10px"},onClick:R},m(g(o)("importDialog.cancel")),1)])):(x(),C("button",{key:1,onClick:O=>se(Z)},m(g(o)("importDialog.edit")),9,rL)),i("button",{style:{"margin-left":"10px"},onClick:O=>ie(Z)},m(g(o)("importDialog.delete")),9,lL)])]))),128))])])):fe("",!0)])):p.value.length>0?(x(),C("div",iL,[i("h3",null,m(g(o)("danbooruManager.importTitle")),1),i("div",uL,[(x(!0),C(Oe,null,We(p.value,(q,Z)=>(x(),C("div",{key:Z,style:{display:"flex","flex-direction":"column","align-items":"center"}},[ne(q)?(x(),C("p",cL,m(oe(q).tag)+" - "+m(oe(q).translate)+" (热度: "+m(oe(q).hot)+", 别名: "+m(oe(q).aliases)+")",1)):(x(),C("p",dL,m(V(q).text)+" - "+m(V(q).desc),1)),i("div",fL,[v.value===Z?(x(),C("div",pL,[ne(q)?we((x(),C("input",{key:0,"onUpdate:modelValue":P[11]||(P[11]=O=>y.value=O),placeholder:"Tag"},null,512)),[[$e,y.value]]):we((x(),C("input",{key:1,"onUpdate:modelValue":P[12]||(P[12]=O=>y.value=O),placeholder:"Tag"},null,512)),[[$e,y.value]]),ne(q)?we((x(),C("input",{key:2,"onUpdate:modelValue":P[13]||(P[13]=O=>T.value=O),placeholder:g(o)("importDialog.translater")},null,8,gL)),[[$e,T.value]]):we((x(),C("input",{key:3,"onUpdate:modelValue":P[14]||(P[14]=O=>T.value=O),placeholder:g(o)("importDialog.translater")},null,8,hL)),[[$e,T.value]]),ne(q)?we((x(),C("input",{key:4,"onUpdate:modelValue":P[15]||(P[15]=O=>X.value=O),placeholder:g(o)("danbooruManager.hot"),type:"number"},null,8,mL)),[[$e,X.value]]):fe("",!0),ne(q)?we((x(),C("input",{key:5,"onUpdate:modelValue":P[16]||(P[16]=O=>re.value=O),placeholder:g(o)("danbooruManager.aliases"),type:"number"},null,8,vL)),[[$e,re.value]]):fe("",!0),i("button",{onClick:O=>F(Z)},m(g(o)("importDialog.sureYes")),9,_L),i("button",{style:{"margin-left":"10px"},onClick:R},m(g(o)("importDialog.cancel")),1)])):(x(),C("button",{key:1,onClick:O=>se(Z)},m(g(o)("importDialog.edit")),9,yL)),i("button",{style:{"margin-left":"10px"},onClick:O=>ie(Z)},m(g(o)("importDialog.delete")),9,bL)])]))),128))])])):fe("",!0)])])]),_:1},8,["modelValue","title"])],64))}},[["__scopeId","data-v-4dfbaa15"]]),xL={class:"danbooru-manager"},TL={class:"title"},SL={class:"action-bar"},kL={class:"search-box"},CL=["placeholder"],EL=["disabled"],LL={class:"pagination"},$L=["disabled"],AL={class:"page-info"},IL=["disabled"],ML={class:"page-size-control"},OL={key:0,class:"tag-list"},RL={style:{"table-layout":"fixed",overflow:"auto"}},NL={class:"checkbox-column"},DL=["checked"],PL={class:"tag-column"},FL={class:"translate-column"},UL={class:"color-column"},BL={class:"hot-column"},HL={class:"aliases-column"},jL={class:"control-column"},WL=["value"],VL=["onClick"],zL=["onClick"],qL={key:1,class:"no-results"},GL={key:2,class:"weilin-tools-dialog"},QL={class:"weilin-tools-dialog-content"},YL={class:"form-group"},KL=["placeholder"],JL={class:"form-group"},XL=["placeholder"],ZL={class:"form-group"},e$=["value"],t$={class:"form-group"},n$={key:0,class:"form-group"},o$={class:"weilin-tools-dialog-actions"},a$={key:3,class:"weilin-tools-dialog"},s$={class:"weilin-tools-dialog-content"},r$={class:"weilin-tools-dialog-actions"},l$={key:4,class:"weilin-tools-dialog"},i$={class:"weilin-tools-dialog-content"},u$={class:"weilin-tools-dialog-actions"},c$={key:5,class:"overlay"},d$=wt({__name:"danbooru_manager",setup(e){const{t}=ht(),o=b(""),n=b([]),a=b(1),s=b(1),r=b(100),l=b(!1),u=b(!1),d=b(!1),c=b(!1),f=b(!1),h=b(null),p=b({tag:"",translate:"",color_id:0,hot:0,aliases:0}),v=[{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"}],y=F=>v[F]?v[F].color:v[0].color;let T=null;const k=()=>{T&&clearTimeout(T),T=setTimeout(()=>{a.value=1,$()},300)},$=async()=>{l.value=!0,K.value=[];try{const F=await Sa.searchDanbooru(o.value,a.value,r.value);F&&F.data?(n.value=F.data.data||[],s.value=F.data.total_pages||1):(n.value=[],s.value=1)}catch(F){console.error("搜索标签失败:",F),Y({type:"error",str:t("message.searchFailed")}),n.value=[]}finally{l.value=!1}},B=F=>{F<1||F>s.value||(a.value=F,$())},w=()=>{r.value<10&&(r.value=10),r.value>500&&(r.value=500),a.value=1,K.value=[],$()},M=()=>{f.value=!1,p.value={tag:"",translate:"",color_id:0,hot:0,aliases:0},u.value=!0},H=F=>{f.value=!0,h.value=F,p.value={id:F.id_index,tag:F.tag,translate:F.translate||"",color_id:F.color_id||0,hot:F.hot||0,aliases:F.aliases||0},u.value=!0},W=()=>{u.value=!1},D=async()=>{if(!p.value.tag){Y({type:"error",str:t("tagManager.textRequired")});return}try{if(f.value){const F=await Sa.updateDanbooruTag({id:p.value.id,update_data:{tag:p.value.tag,translate:p.value.translate,color_id:p.value.color_id,hot:p.value.hot,aliases:p.value.aliases}});F&&F.code===200?(Y({type:"success",str:t("message.editSuccess")}),$()):Y({type:"error",str:t("message.editFailed")})}else{const F=await Sa.addDanbooruTag({tag:p.value.tag,translate:p.value.translate,color_id:p.value.color_id,hot:p.value.hot,aliases:p.value.aliases});F&&F.code===200?(Y({type:"success",str:t("message.addSuccess")}),$()):Y({type:"error",str:t("message.addFailed")})}W()}catch(F){console.error("提交表单失败:",F),Y({type:"error",str:f.value?t("message.editFailed"):t("message.addFailed")})}},I=F=>{h.value=F,d.value=!0},ee=async()=>{if(!(!h.value||!h.value.id_index))try{const F=await Sa.deleteDanbooruTag(h.value.id_index);F&&F.code===200?(Y({type:"success",str:t("message.deleteSuccess")}),$()):Y({type:"error",str:t("message.deleteFailed")}),d.value=!1}catch(F){console.error("删除标签失败:",F),Y({type:"error",str:t("message.deleteFailed")})}},K=b([]),V=nt(()=>n.value.length>0&&K.value.length===n.value.length),ne=()=>{V.value?K.value=[]:K.value=n.value.map(F=>F.id_index)},oe=()=>{K.value.length!==0&&(c.value=!0)},X=async()=>{if(K.value.length!==0){try{const F=await Sa.batchDeleteDanbooruTags(K.value);F&&F.code===200?(Y({type:"success",str:`成功删除 ${K.value.length} 个标签`}),K.value=[],$()):Y({type:"error",str:"批量删除失败"})}catch(F){console.error("批量删除失败:",F),Y({type:"error",str:"批量删除失败"})}c.value=!1}},re=b(),se=()=>{re.value.open()};return _t(()=>{$()}),(F,R)=>{var ie;return x(),C("div",xL,[i("h2",TL,m(g(t)("danbooruManager.title")),1),i("div",SL,[i("div",kL,[we(i("input",{"onUpdate:modelValue":R[0]||(R[0]=Te=>o.value=Te),type:"text",placeholder:g(t)("danbooruManager.searchPlaceholder"),onInput:k},null,40,CL),[[$e,o.value]]),i("button",{class:"search-btn",onClick:$},m(g(t)("tagManager.search")),1)]),i("button",{class:"add-btn",onClick:M},m(g(t)("danbooruManager.add")),1),i("button",{class:"add-btn",onClick:se},m(g(t)("tagManager.importDanbooru")),1),i("button",{class:Ce(["batch-delete-btn",{disabled:K.value.length===0}]),disabled:K.value.length===0,onClick:oe},m(g(t)("tagManager.hasDeleteAction"))+" ("+m(K.value.length)+") ",11,EL)]),i("div",LL,[i("button",{disabled:a.value<=1,onClick:R[1]||(R[1]=Te=>B(a.value-1)),class:"page-btn"},m(g(t)("loraManager.prevPage")),9,$L),i("span",AL,m(a.value)+" / "+m(s.value),1),i("button",{disabled:a.value>=s.value,onClick:R[2]||(R[2]=Te=>B(a.value+1)),class:"page-btn"},m(g(t)("loraManager.nextPage")),9,IL),i("div",ML,[i("label",null,m(g(t)("danbooruManager.pageShow")),1),we(i("input",{"onUpdate:modelValue":R[3]||(R[3]=Te=>r.value=Te),type:"number",min:"10",max:"500",onChange:w,class:"page-size-input"},null,544),[[$e,r.value,void 0,{number:!0}]]),i("span",null,m(g(t)("danbooruManager.pageLimit")),1)])]),n.value.length>0?(x(),C("div",OL,[i("table",RL,[i("thead",null,[i("tr",null,[i("th",NL,[i("input",{type:"checkbox",checked:V.value,onChange:ne},null,40,DL)]),R[12]||(R[12]=i("th",{class:"id-column"},"ID",-1)),i("th",PL,m(g(t)("tagManager.description")),1),i("th",FL,m(g(t)("promptBox.translate")),1),i("th",UL,m(g(t)("tagManager.backgroundColor")),1),i("th",BL,m(g(t)("danbooruManager.hot")),1),i("th",HL,m(g(t)("danbooruManager.aliases")),1),i("th",jL,m(g(t)("danbooruManager.controle")),1)])]),i("tbody",null,[(x(!0),C(Oe,null,We(n.value,Te=>(x(),C("tr",{key:Te.id_index},[i("td",null,[we(i("input",{type:"checkbox",value:Te.id_index,"onUpdate:modelValue":R[4]||(R[4]=te=>K.value=te)},null,8,WL),[[Vt,K.value]])]),i("td",null,m(Te.id_index),1),i("td",null,m(Te.tag),1),i("td",null,m(Te.translate),1),i("td",null,[i("div",{class:"color-box",style:ct({backgroundColor:y(Te.color_id)})},null,4)]),i("td",null,m(Te.hot),1),i("td",null,m(Te.aliases),1),i("td",null,[i("button",{class:"edit-btn",onClick:te=>H(Te)},m(g(t)("common.edit")),9,VL),i("button",{style:{"margin-left":"10px"},class:"delete-btn",onClick:te=>I(Te)},m(g(t)("common.delete")),9,zL)])]))),128))])])])):(x(),C("div",qL,m(g(t)("tagManager.noResults")),1)),u.value?(x(),C("div",GL,[i("div",QL,[i("h3",null,m(f.value?g(t)("danbooruManager.edit"):g(t)("danbooruManager.add")),1),i("div",YL,[i("label",null,m(g(t)("tagManager.description")),1),we(i("input",{"onUpdate:modelValue":R[5]||(R[5]=Te=>p.value.tag=Te),type:"text",placeholder:g(t)("tagManager.descriptionPlaceholder")},null,8,KL),[[$e,p.value.tag]])]),i("div",JL,[i("label",null,m(g(t)("promptBox.translate")),1),we(i("input",{"onUpdate:modelValue":R[6]||(R[6]=Te=>p.value.translate=Te),type:"text",placeholder:g(t)("danbooruManager.translatePlaceholder")},null,8,XL),[[$e,p.value.translate]])]),i("div",ZL,[i("label",null,m(g(t)("tagManager.backgroundColor")),1),we(i("select",{"onUpdate:modelValue":R[7]||(R[7]=Te=>p.value.color_id=Te)},[(x(),C(Oe,null,We(v,(Te,te)=>i("option",{key:te,value:te},m(Te.name),9,e$)),64))],512),[[ln,p.value.color_id]]),i("div",{class:"color-preview",style:ct({backgroundColor:y(p.value.color_id)})},null,4)]),i("div",t$,[R[13]||(R[13]=i("label",null,"Hot",-1)),we(i("input",{"onUpdate:modelValue":R[8]||(R[8]=Te=>p.value.hot=Te),type:"number",min:"0"},null,512),[[$e,p.value.hot,void 0,{number:!0}]])]),f.value?fe("",!0):(x(),C("div",n$,[R[14]||(R[14]=i("label",null,"Aliases",-1)),we(i("input",{"onUpdate:modelValue":R[9]||(R[9]=Te=>p.value.aliases=Te),type:"number",min:"0"},null,512),[[$e,p.value.aliases,void 0,{number:!0}]])])),i("div",o$,[i("button",{onClick:W},m(g(t)("common.cancel")),1),i("button",{onClick:D},m(g(t)("common.save")),1)])])])):fe("",!0),d.value?(x(),C("div",a$,[i("div",s$,[i("h3",null,m(g(t)("common.confirmDelete")),1),i("p",null,m(g(t)("tagManager.deleteTagConfirm",{name:((ie=h.value)==null?void 0:ie.tag)||""})),1),i("div",r$,[i("button",{onClick:R[10]||(R[10]=Te=>d.value=!1)},m(g(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:ee},m(g(t)("common.delete")),1)])])])):fe("",!0),c.value?(x(),C("div",l$,[i("div",i$,[i("h3",null,m(g(t)("danbooruManager.sureBatchDelete")),1),i("p",null,m(g(t)("danbooruManager.sureBatchDeleteTips1"))+" "+m(K.value.length)+" "+m(g(t)("danbooruManager.sureBatchDeleteTips2")),1),i("div",u$,[i("button",{onClick:R[11]||(R[11]=Te=>c.value=!1)},m(g(t)("common.cancel")),1),i("button",{class:"delete-btn",onClick:X},m(g(t)("danbooruManager.sureDelete")),1)])])])):fe("",!0),u.value||d.value||c.value?(x(),C("div",c$)):fe("",!0),qe(wL,{ref_key:"importDanbooruDialog",ref:re},null,512)])}}},[["__scopeId","data-v-0c23bf70"]]),f$={id:"weilin_comfyui_tools_prompt_ui_div"},p$={key:10,class:"version-update-notification"},g$={class:"version-update-content"},ka="weilin_tools_",h$=wt({__name:"App",setup(e){pr();const t=b(localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true");localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")||(localStorage.setItem("weilin_prompt_ui_floatingBallEnabled","true"),t.value=!0);const{t:o}=ht(),n=b(""),a=b("look"),s=b("manager"),r=b("prompt_global"),l=b(!1),u=`${ka}theme`,d=b(localStorage.getItem(u)==="dark"),c=b(""),f=b(!1),h=b(""),p=b(null),v=`${ka}version_update_remind`,y=()=>{f.value=!1,p.value&&(clearTimeout(p.value),p.value=null)},T=()=>{window.open("https://github.com/weilin9999/WeiLin-Comfyui-Tools","_blank"),y()},k=()=>{localStorage.setItem(v,"false"),y()},$={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}}},B=()=>{try{const F=localStorage.getItem(`${ka}windowStates`);if(F){const R=JSON.parse(F),ie={...$};for(const Te in R)Te in ie&&(ie[Te]={...$[Te],...R[Te],visible:R[Te].is_default_close?!1:R[Te].visible});return ie}}catch(F){console.error("Error loading window states:",F)}return{...$}},w=b(B());dt(w,F=>{try{localStorage.setItem(`${ka}windowStates`,JSON.stringify(F))}catch(R){console.error("Error saving window states:",R)}},{deep:!0}),_t(()=>{Object.keys(w.value).forEach(F=>{Be.registerWindow(F)}),M(),window.addEventListener("message",re),se()});const M=()=>{let F=localStorage.getItem(u);F||(localStorage.setItem(u,"dark"),F="dark",d.value=!0),d.value=F==="dark";const R=document.getElementById("weilin_comfyui_tools_prompt_ui_div");R&&R.setAttribute("data-theme",d.value?"dark":"light")};On(()=>{Object.keys(w.value).forEach(F=>{Be.unregisterWindow(F)}),window.removeEventListener("message",re),p.value&&(clearTimeout(p.value),p.value=null)});const H=F=>{F==="prompt"&&(n.value=""),w.value[F].visible=!1},W=(F,R)=>{w.value[F]&&(w.value[F].position={...R})},D=(F,R)=>{w.value[F]&&(w.value[F].size={...R})},I=()=>{const F={loraDetail:{visible:!1,is_default_close:!1,position:{x:150,y:150},size:{width:800,height:600}}},R={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(`${ka}windowStates`,JSON.stringify(R)),localStorage.setItem(`${ka}loraDetailState`,JSON.stringify(F)),w.value=B()};(()=>{$n.getTranslateSetting().then(F=>{localStorage.setItem("weilin_prompt_ui_translater_setting",F.data)}).catch(F=>{message({type:"warn",str:"message.getTranslaterFail"})})})();const K=b(),V=b(),ne=b(),oe=b(),X=b(),re=F=>{F.data.type==="weilin_prompt_ui_openTagManager"?(s.value="manager",w.value.tag.visible=!0,Be.setActiveWindow("tag")):F.data.type==="weilin_prompt_ui_openTagManager_prompt"?(s.value="prompt",w.value.tag.visible=!0,Be.setActiveWindow("tag")):F.data.type==="weilin_prompt_ui_openPromptBox"?(n.value=F.data.id,r.value="prompt",w.value.prompt.visible=!0,l.value=!1,F.data.node==="WeiLinPromptUI"&&(l.value=!0),Qe(()=>{K.value.setPromptText(F.data.prompt)}),Be.setActiveWindow("prompt")):F.data.type==="weilin_prompt_ui_openLoraManager"?(a.value="look",w.value.lora.visible=!0,Be.setActiveWindow("lora")):F.data.type==="weilin_prompt_ui_openLoraManager_addLora"?(a.value="addLora",w.value.lora.visible=!0,Qe(()=>{ne.value.openSetSeed(0,"")}),Be.setActiveWindow("lora")):F.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack"?(a.value="addLora",w.value.lora.visible=!0,Qe(()=>{ne.value.openSetSeed(1,F.data.seed)}),Be.setActiveWindow("lora")):F.data.type==="weilin_prompt_ui_openLoraManager_addLora_stack_node"?(a.value="addLora",w.value.lora.visible=!0,Qe(()=>{ne.value.openSetSeed(2,F.data.seed)}),Be.setActiveWindow("lora")):F.data.type==="weilin_prompt_ui_openHistoryManager"?(w.value.history.visible=!0,Be.setActiveWindow("history")):F.data.type==="weilin_prompt_ui_openAiWindow"?(w.value.ai_window.visible=!0,Be.setActiveWindow("ai_window")):F.data.type==="weilin_prompt_ui_open_node_list_window"?(w.value.node_list_window.visible=!0,Be.setActiveWindow("node_list_window")):F.data.type==="weilin_prompt_ui_prompt_finish_prompt"?window.postMessage({type:"weilin_prompt_ui_prompt_update_prompt_"+n.value,data:F.data.data},"*"):F.data.type==="weilin_prompt_ui_open_global_prompt_box"?(r.value="prompt_global",n.value="global",w.value.prompt.visible=!0,l.value=!1,Qe(()=>{K.value.setPromptText(c.value)}),Be.setActiveWindow("prompt")):F.data.type==="weilin_prompt_ui_open_global_tag_manager"?(s.value="manager",w.value.tag.visible=!0,Be.setActiveWindow("tag")):F.data.type==="weilin_prompt_ui_open_global_lora_manager"?(a.value="look",w.value.lora.visible=!0,Be.setActiveWindow("lora")):F.data.type==="weilin_prompt_ui_prompt_update_prompt_global"?c.value=F.data.data:F.data.type==="weilin_prompt_ui_floating_ball_setting"?t.value=localStorage.getItem("weilin_prompt_ui_floatingBallEnabled")==="true":F.data.type==="weilin_prompt_ui_restore_window"?I():F.data.type==="weilin_prompt_ui_open_cloud_window"?(w.value.cloud_window.visible=!0,Be.setActiveWindow("cloud_window")):F.data.type==="weilin_prompt_ui_open_node_lora_stack_window"?(w.value.lora_stack_window.visible=!0,Qe(()=>{V.value.initLoraStack(F.data.prompt,F.data.seed)}),Be.setActiveWindow("lora_stack_window")):F.data.type==="weilin_prompt_ui_openLoraDetail"?oe.value.open({name:F.data.lora}):F.data.type==="weilin_prompt_ui_open_danbooru_manager_window"?(w.value.danbooru_manager_window.visible=!0,Be.setActiveWindow("danbooru_manager_window")):F.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id"?window.postMessage({type:"weilin_prompt_ui_get_template_"+n.value,data:F.data.data},"*"):F.data.type==="weilin_prompt_ui_get_template_response"?n.value===F.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_response",data:F.data.data},"*"):F.data.type==="weilin_prompt_ui_prompt_inner_update_node_tag_template_id"?window.postMessage({type:"weilin_prompt_ui_update_template_"+n.value,data:F.data.data},"*"):F.data.type==="weilin_prompt_ui_prompt_inner_get_node_tag_template_id_gorandom"?window.postMessage({type:"weilin_prompt_ui_get_template_go_random_"+n.value,data:F.data.data},"*"):F.data.type==="weilin_prompt_ui_get_template_go_random_response"&&n.value===F.data.id&&window.postMessage({type:"weilin_prompt_ui_prompt_inner_get_node_tag_template_id_go_random_response",data:F.data.data},"*")},se=async()=>{try{if(localStorage.getItem(v)==="false"){console.info("WeiLin-Comfyui-Tools 版本更新提醒已禁用");return}const R=await fetch("https://raw.githubusercontent.com/weilin9999/WeiLin-Comfyui-Tools/refs/heads/main/src/src/utils/version.js");if(!R.ok){console.error("获取版本信息失败:",R.status);return}const Te=(await R.text()).match(/export const version = "([^"]+)"/);if(Te&&Te[1]){const te=Te[1];console.info(`WeiLin-Comfyui-Tools GitHub版本: ${te}`),te!==co&&(h.value=`WeiLin-Comfyui-Tools 发现新版本 ${te},当前版本 ${co}`,f.value=!0,p.value&&clearTimeout(p.value),p.value=setTimeout(()=>{f.value=!1,p.value=null},1e4),console.info(`WeiLin-Comfyui-Tools 发现新版本 ${te},当前版本 ${co} GitHub链接:https://github.com/weilin9999/WeiLin-Comfyui-Tools`))}}catch(F){console.error("WeiLin-Comfyui-Tools 检查更新失败:",F)}};return(F,R)=>(x(),C("div",f$,[w.value.prompt.visible?(x(),yt(wn,{key:0,name:"promptBox",title:r.value==="prompt"?g(o)("promptBox.windowTitle"):g(o)("promptBox.windowTitleGlobal"),position:w.value.prompt.position,size:w.value.prompt.size,"z-index":g(Be).getZIndex("prompt"),"onUpdate:position":R[0]||(R[0]=ie=>W("prompt",ie)),"onUpdate:size":R[1]||(R[1]=ie=>D("prompt",ie)),onActive:R[2]||(R[2]=ie=>g(Be).setActiveWindow("prompt")),onClose:R[3]||(R[3]=ie=>H("prompt"))},{default:pt(()=>[qe(Ik,{promptManager:r.value,hasPromptLoraStack:l.value,ref_key:"promptBoxRef",ref:K},null,8,["promptManager","hasPromptLoraStack"])]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.tag.visible?(x(),yt(wn,{key:1,name:"tagManager",title:g(o)("tagManager.windowTitle"),position:w.value.tag.position,size:w.value.tag.size,"z-index":g(Be).getZIndex("tag"),"onUpdate:position":R[4]||(R[4]=ie=>W("tag",ie)),"onUpdate:size":R[5]||(R[5]=ie=>D("tag",ie)),onActive:R[6]||(R[6]=ie=>g(Be).setActiveWindow("tag")),onClose:R[7]||(R[7]=ie=>H("tag"))},{default:pt(()=>[qe(fg,{tagManager:s.value},null,8,["tagManager"])]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.lora.visible?(x(),yt(wn,{key:2,name:"loraManager",title:g(o)("loraManager.windowTitle"),position:w.value.lora.position,size:w.value.lora.size,"z-index":g(Be).getZIndex("lora"),"onUpdate:position":R[8]||(R[8]=ie=>W("lora",ie)),"onUpdate:size":R[9]||(R[9]=ie=>D("lora",ie)),onActive:R[10]||(R[10]=ie=>g(Be).setActiveWindow("lora")),onClose:R[11]||(R[11]=ie=>H("lora"))},{default:pt(()=>[qe(bg,{loraManager:a.value,ref_key:"loraManagerRef",ref:ne},null,8,["loraManager"])]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.history.visible?(x(),yt(wn,{key:3,name:"historyManager",title:g(o)("history.windowTitle"),position:w.value.history.position,size:w.value.history.size,"z-index":g(Be).getZIndex("history"),"onUpdate:position":R[12]||(R[12]=ie=>W("history",ie)),"onUpdate:size":R[13]||(R[13]=ie=>D("history",ie)),onActive:R[14]||(R[14]=ie=>g(Be).setActiveWindow("history")),onClose:R[15]||(R[15]=ie=>H("history"))},{default:pt(()=>[qe(SC)]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.ai_window.visible?(x(),yt(wn,{key:4,name:"aiWindow",title:g(o)("aiWindow.windowTitle"),position:w.value.ai_window.position,size:w.value.ai_window.size,"z-index":g(Be).getZIndex("ai_window"),"onUpdate:position":R[16]||(R[16]=ie=>W("ai_window",ie)),"onUpdate:size":R[17]||(R[17]=ie=>D("ai_window",ie)),onActive:R[18]||(R[18]=ie=>g(Be).setActiveWindow("ai_window")),onClose:R[19]||(R[19]=ie=>H("ai_window"))},{default:pt(()=>[qe(YC)]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.node_list_window.visible?(x(),yt(wn,{key:5,name:"nodeListWindow",title:g(o)("nodeListWindow.windowTitle"),position:w.value.node_list_window.position,size:w.value.node_list_window.size,"z-index":g(Be).getZIndex("node_list_window"),"onUpdate:position":R[20]||(R[20]=ie=>W("node_list_window",ie)),"onUpdate:size":R[21]||(R[21]=ie=>D("node_list_window",ie)),onActive:R[22]||(R[22]=ie=>g(Be).setActiveWindow("node_list_window")),onClose:R[23]||(R[23]=ie=>H("node_list_window"))},{default:pt(()=>[qe(sE)]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.cloud_window.visible?(x(),yt(wn,{key:6,name:"cloudWindow",title:g(o)("cloudWindow.windowTitle"),position:w.value.cloud_window.position,size:w.value.cloud_window.size,"z-index":g(Be).getZIndex("cloud_window"),"onUpdate:position":R[24]||(R[24]=ie=>W("cloud_window",ie)),"onUpdate:size":R[25]||(R[25]=ie=>D("cloud_window",ie)),onActive:R[26]||(R[26]=ie=>g(Be).setActiveWindow("cloud_window")),onClose:R[27]||(R[27]=ie=>H("cloud_window"))},{default:pt(()=>[qe(_E)]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.lora_stack_window.visible?(x(),yt(wn,{key:7,name:"loraStackWindow",title:g(o)("controls.loraStack"),position:w.value.lora_stack_window.position,size:w.value.lora_stack_window.size,"z-index":g(Be).getZIndex("lora_stack_window"),"onUpdate:position":R[28]||(R[28]=ie=>W("lora_stack_window",ie)),"onUpdate:size":R[29]||(R[29]=ie=>D("lora_stack_window",ie)),onActive:R[30]||(R[30]=ie=>g(Be).setActiveWindow("lora_stack_window")),onClose:R[31]||(R[31]=ie=>H("lora_stack_window"))},{default:pt(()=>[qe(FE,{ref_key:"loraStackRef",ref:V},null,512)]),_:1},8,["title","position","size","z-index"])):fe("",!0),w.value.danbooru_manager_window.visible?(x(),yt(wn,{key:8,name:"DanbooruManagerWindow",title:g(o)("controls.danbooruManager"),position:w.value.danbooru_manager_window.position,size:w.value.danbooru_manager_window.size,"z-index":g(Be).getZIndex("danbooru_manager_window"),"onUpdate:position":R[32]||(R[32]=ie=>W("danbooru_manager_window",ie)),"onUpdate:size":R[33]||(R[33]=ie=>D("danbooru_manager_window",ie)),onActive:R[34]||(R[34]=ie=>g(Be).setActiveWindow("danbooru_manager_window")),onClose:R[35]||(R[35]=ie=>H("danbooru_manager_window"))},{default:pt(()=>[qe(d$,{ref_key:"danbooruManagerRef",ref:X},null,512)]),_:1},8,["title","position","size","z-index"])):fe("",!0),t.value?(x(),yt(IC,{key:9})):fe("",!0),qe(Rr,{ref_key:"loraDetailLoraStackRef",ref:oe},null,512),f.value?(x(),C("div",p$,[i("div",g$,[i("span",null,m(h.value),1),i("div",{class:"version-update-actions"},[i("button",{class:"goto-github-btn",onClick:T},"前往GitHub"),i("button",{class:"no-remind-btn",onClick:k},"不再提醒"),i("button",{class:"close-version-update",onClick:y},"×")])])])):fe("",!0)]))}},[["__scopeId","data-v-a6646a15"]]);var Pr={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/var m$=Pr.exports,kg;function v$(){return kg||(kg=1,(function(e,t){(function(n,a){e.exports=a()})(m$,function(){return(function(){var o={686:(function(s,r,l){l.d(r,{default:function(){return Te}});var u=l(279),d=l.n(u),c=l(370),f=l.n(c),h=l(817),p=l.n(h);function v(te){try{return document.execCommand(te)}catch{return!1}}var y=function(le){var ve=p()(le);return v("cut"),ve},T=y;function k(te){var le=document.documentElement.getAttribute("dir")==="rtl",ve=document.createElement("textarea");ve.style.fontSize="12pt",ve.style.border="0",ve.style.padding="0",ve.style.margin="0",ve.style.position="absolute",ve.style[le?"right":"left"]="-9999px";var xe=window.pageYOffset||document.documentElement.scrollTop;return ve.style.top="".concat(xe,"px"),ve.setAttribute("readonly",""),ve.value=te,ve}var $=function(le,ve){var xe=k(le);ve.container.appendChild(xe);var pe=p()(xe);return v("copy"),xe.remove(),pe},B=function(le){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},xe="";return typeof le=="string"?xe=$(le,ve):le instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(le==null?void 0:le.type)?xe=$(le.value,ve):(xe=p()(le),v("copy")),xe},w=B;function M(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(ve){return typeof ve}:M=function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},M(te)}var H=function(){var le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ve=le.action,xe=ve===void 0?"copy":ve,pe=le.container,P=le.target,q=le.text;if(xe!=="copy"&&xe!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(P!==void 0)if(P&&M(P)==="object"&&P.nodeType===1){if(xe==="copy"&&P.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(xe==="cut"&&(P.hasAttribute("readonly")||P.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(q)return w(q,{container:pe});if(P)return xe==="cut"?T(P):w(P,{container:pe})},W=H;function D(te){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(ve){return typeof ve}:D=function(ve){return ve&&typeof Symbol=="function"&&ve.constructor===Symbol&&ve!==Symbol.prototype?"symbol":typeof ve},D(te)}function I(te,le){if(!(te instanceof le))throw new TypeError("Cannot call a class as a function")}function ee(te,le){for(var ve=0;ve<le.length;ve++){var xe=le[ve];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(te,xe.key,xe)}}function K(te,le,ve){return le&&ee(te.prototype,le),ve&&ee(te,ve),te}function V(te,le){if(typeof le!="function"&&le!==null)throw new TypeError("Super expression must either be null or a function");te.prototype=Object.create(le&&le.prototype,{constructor:{value:te,writable:!0,configurable:!0}}),le&&ne(te,le)}function ne(te,le){return ne=Object.setPrototypeOf||function(xe,pe){return xe.__proto__=pe,xe},ne(te,le)}function oe(te){var le=se();return function(){var xe=F(te),pe;if(le){var P=F(this).constructor;pe=Reflect.construct(xe,arguments,P)}else pe=xe.apply(this,arguments);return X(this,pe)}}function X(te,le){return le&&(D(le)==="object"||typeof le=="function")?le:re(te)}function re(te){if(te===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return te}function se(){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 F(te){return F=Object.setPrototypeOf?Object.getPrototypeOf:function(ve){return ve.__proto__||Object.getPrototypeOf(ve)},F(te)}function R(te,le){var ve="data-clipboard-".concat(te);if(le.hasAttribute(ve))return le.getAttribute(ve)}var ie=(function(te){V(ve,te);var le=oe(ve);function ve(xe,pe){var P;return I(this,ve),P=le.call(this),P.resolveOptions(pe),P.listenClick(xe),P}return K(ve,[{key:"resolveOptions",value:function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof pe.action=="function"?pe.action:this.defaultAction,this.target=typeof pe.target=="function"?pe.target:this.defaultTarget,this.text=typeof pe.text=="function"?pe.text:this.defaultText,this.container=D(pe.container)==="object"?pe.container:document.body}},{key:"listenClick",value:function(pe){var P=this;this.listener=f()(pe,"click",function(q){return P.onClick(q)})}},{key:"onClick",value:function(pe){var P=pe.delegateTarget||pe.currentTarget,q=this.action(P)||"copy",Z=W({action:q,container:this.container,target:this.target(P),text:this.text(P)});this.emit(Z?"success":"error",{action:q,text:Z,trigger:P,clearSelection:function(){P&&P.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(pe){return R("action",pe)}},{key:"defaultTarget",value:function(pe){var P=R("target",pe);if(P)return document.querySelector(P)}},{key:"defaultText",value:function(pe){return R("text",pe)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(pe){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return w(pe,P)}},{key:"cut",value:function(pe){return T(pe)}},{key:"isSupported",value:function(){var pe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],P=typeof pe=="string"?[pe]:pe,q=!!document.queryCommandSupported;return P.forEach(function(Z){q=q&&!!document.queryCommandSupported(Z)}),q}}]),ve})(d()),Te=ie}),828:(function(s){var r=9;if(typeof Element<"u"&&!Element.prototype.matches){var l=Element.prototype;l.matches=l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector}function u(d,c){for(;d&&d.nodeType!==r;){if(typeof d.matches=="function"&&d.matches(c))return d;d=d.parentNode}}s.exports=u}),438:(function(s,r,l){var u=l(828);function d(h,p,v,y,T){var k=f.apply(this,arguments);return h.addEventListener(v,k,T),{destroy:function(){h.removeEventListener(v,k,T)}}}function c(h,p,v,y,T){return typeof h.addEventListener=="function"?d.apply(null,arguments):typeof v=="function"?d.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(k){return d(k,p,v,y,T)}))}function f(h,p,v,y){return function(T){T.delegateTarget=u(T.target,p),T.delegateTarget&&y.call(h,T)}}s.exports=c}),879:(function(s,r){r.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},r.nodeList=function(l){var u=Object.prototype.toString.call(l);return l!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in l&&(l.length===0||r.node(l[0]))},r.string=function(l){return typeof l=="string"||l instanceof String},r.fn=function(l){var u=Object.prototype.toString.call(l);return u==="[object Function]"}}),370:(function(s,r,l){var u=l(879),d=l(438);function c(v,y,T){if(!v&&!y&&!T)throw new Error("Missing required arguments");if(!u.string(y))throw new TypeError("Second argument must be a String");if(!u.fn(T))throw new TypeError("Third argument must be a Function");if(u.node(v))return f(v,y,T);if(u.nodeList(v))return h(v,y,T);if(u.string(v))return p(v,y,T);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(v,y,T){return v.addEventListener(y,T),{destroy:function(){v.removeEventListener(y,T)}}}function h(v,y,T){return Array.prototype.forEach.call(v,function(k){k.addEventListener(y,T)}),{destroy:function(){Array.prototype.forEach.call(v,function(k){k.removeEventListener(y,T)})}}}function p(v,y,T){return d(document.body,v,y,T)}s.exports=c}),817:(function(s){function r(l){var u;if(l.nodeName==="SELECT")l.focus(),u=l.value;else if(l.nodeName==="INPUT"||l.nodeName==="TEXTAREA"){var d=l.hasAttribute("readonly");d||l.setAttribute("readonly",""),l.select(),l.setSelectionRange(0,l.value.length),d||l.removeAttribute("readonly"),u=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(l),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}s.exports=r}),279:(function(s){function r(){}r.prototype={on:function(l,u,d){var c=this.e||(this.e={});return(c[l]||(c[l]=[])).push({fn:u,ctx:d}),this},once:function(l,u,d){var c=this;function f(){c.off(l,f),u.apply(d,arguments)}return f._=u,this.on(l,f,d)},emit:function(l){var u=[].slice.call(arguments,1),d=((this.e||(this.e={}))[l]||[]).slice(),c=0,f=d.length;for(c;c<f;c++)d[c].fn.apply(d[c].ctx,u);return this},off:function(l,u){var d=this.e||(this.e={}),c=d[l],f=[];if(c&&u)for(var h=0,p=c.length;h<p;h++)c[h].fn!==u&&c[h].fn._!==u&&f.push(c[h]);return f.length?d[l]=f:delete d[l],this}},s.exports=r,s.exports.TinyEmitter=r})},n={};function a(s){if(n[s])return n[s].exports;var r=n[s]={exports:{}};return o[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 l in r)a.o(r,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:r[l]})}})(),(function(){a.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)}})(),a(686)})().default})})(Pr)),Pr.exports}var _$=v$();const y$=_g(_$),b$=e=>({toClipboard(t,o){return new Promise((n,a)=>{const s=document.createElement("button"),r=new y$(s,{text:()=>t,action:()=>"copy",container:o!==void 0?o:document.body});r.on("success",l=>{r.destroy(),n(l)}),r.on("error",l=>{r.destroy(),a(l)}),document.body.appendChild(s),s.click(),document.body.removeChild(s)})}}),w$=/"(?:_|\\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*:/,x$=/"(?: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*:/,T$=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function S$(e,t){if(e==="__proto__"||e==="constructor"&&t&&typeof t=="object"&&"prototype"in t){k$(e);return}return t}function k$(e){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`)}function C$(e,t={}){if(typeof e!="string")return e;if(e[0]==='"'&&e[e.length-1]==='"'&&e.indexOf("\\")===-1)return e.slice(1,-1);const o=e.trim();if(o.length<=9)switch(o.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!T$.test(e)){if(t.strict)throw new SyntaxError("[destr] Invalid JSON");return e}try{if(w$.test(e)||x$.test(e)){if(t.strict)throw new Error("[destr] Possible prototype pollution");return JSON.parse(e,S$)}return JSON.parse(e)}catch(n){if(t.strict)throw n;return e}}function E$(e,t){if(e==null)return;let o=e;for(let n=0;n<t.length;n++){if(o==null||o[t[n]]==null)return;o=o[t[n]]}return o}function Vi(e,t,o){if(o.length===0)return t;const n=o[0];return o.length>1&&(t=Vi(typeof e!="object"||e===null||!Object.prototype.hasOwnProperty.call(e,n)?Number.isInteger(Number(o[1]))?[]:{}:e[n],t,Array.prototype.slice.call(o,1))),Number.isInteger(Number(n))&&Array.isArray(e)?e.slice()[n]:Object.assign({},e,{[n]:t})}function Cg(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 o={};for(const n in e)o[n]=e[n];return delete o[t[0]],o}if(e[t[0]]==null){if(Number.isInteger(t[0])&&Array.isArray(e))return Array.prototype.concat.call([],e);const o={};for(const n in e)o[n]=e[n];return o}return Vi(e,Cg(e[t[0]],Array.prototype.slice.call(t,1)),[t[0]])}function Eg(e,t){return t.map(o=>o.split(".")).map(o=>[o,E$(e,o)]).filter(o=>o[1]!==void 0).reduce((o,n)=>Vi(o,n[1],n[0]),{})}function Lg(e,t){return t.map(o=>o.split(".")).reduce((o,n)=>Cg(o,n),e)}function $g(e,{storage:t,serializer:o,key:n,debug:a,pick:s,omit:r,beforeHydrate:l,afterHydrate:u},d,c=!0){try{c&&(l==null||l(d));const f=t.getItem(n);if(f){const h=o.deserialize(f),p=s?Eg(h,s):h,v=r?Lg(p,r):p;e.$patch(v)}c&&(u==null||u(d))}catch(f){a&&console.error("[pinia-plugin-persistedstate]",f)}}function Ag(e,{storage:t,serializer:o,key:n,debug:a,pick:s,omit:r}){try{const l=s?Eg(e,s):e,u=r?Lg(l,r):l,d=o.serialize(u);t.setItem(n,d)}catch(l){a&&console.error("[pinia-plugin-persistedstate]",l)}}function L$(e,t,o){const{pinia:n,store:a,options:{persist:s=o}}=e;if(!s)return;if(!(a.$id in n.state.value)){const u=n._s.get(a.$id.replace("__hot:",""));u&&Promise.resolve().then(()=>u.$persist());return}const l=(Array.isArray(s)?s:s===!0?[{}]:[s]).map(t);a.$hydrate=({runHooks:u=!0}={})=>{l.forEach(d=>{$g(a,d,e,u)})},a.$persist=()=>{l.forEach(u=>{Ag(a.$state,u)})},l.forEach(u=>{$g(a,u,e),a.$subscribe((d,c)=>Ag(c,u),{detached:!0})})}function $$(e={}){return function(t){L$(t,o=>({key:(e.key?e.key:n=>n)(o.key??t.store.$id),debug:o.debug??e.debug??!1,serializer:o.serializer??e.serializer??{serialize:n=>JSON.stringify(n),deserialize:n=>C$(n)},storage:o.storage??e.storage??window.localStorage,beforeHydrate:o.beforeHydrate,afterHydrate:o.afterHydrate,pick:o.pick,omit:o.omit}),e.auto??!1)}}var A$=$$();const{toClipboard:I$}=b$(),zi=document.createElement("div");zi.id="weilin_comfyui_tools_prompt_ui_div",document.querySelector("body").appendChild(zi);const Ig=_0();Ig.use(A$);const Fr=g1(h$);Fr.use(Ig),Fr.use(fs),K2(),Fr.config.globalProperties.$copyText=I$,Fr.mount(zi),console.log("WeiLin Prompt UI is running - version "+co),console.log("WeiLin 节点插件已运行 - 版本 "+co)}));
//# sourceMappingURL=main.entry.js.map