mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-03-05 13:29:49 +00:00
138 lines
592 KiB
JavaScript
138 lines
592 KiB
JavaScript
(function(nr){typeof define=="function"&&define.amd?define(nr):nr()})(function(){"use strict";var i3=Object.defineProperty;var o3=(nr,bt,Ai)=>bt in nr?i3(nr,bt,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):nr[bt]=Ai;var $b=(nr,bt,Ai)=>(o3(nr,typeof bt!="symbol"?bt+"":bt,Ai),Ai);function nr(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i<r.length;i++)n[r[i]]=!0;return t?i=>!!n[i.toLowerCase()]:i=>!!n[i]}function bt(e){if(et(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=zt(r)?jb(r):bt(r);if(i)for(const o in i)t[o]=i[o]}return t}else{if(zt(e))return e;if(Rt(e))return e}}const Ai=/;(?![^(]*\))/g,Bb=/:([^]+)/,Hb=/\/\*.*?\*\//gs;function jb(e){const t={};return e.replace(Hb,"").split(Ai).forEach(n=>{if(n){const r=n.split(Bb);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ze(e){let t="";if(zt(e))t=e;else if(et(e))for(let n=0;n<e.length;n++){const r=Ze(e[n]);r&&(t+=r+" ")}else if(Rt(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Ub=nr("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function cp(e){return!!e||e===""}function Wb(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=ps(e[r],t[r]);return n}function ps(e,t){if(e===t)return!0;let n=dp(e),r=dp(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=hs(e),r=hs(t),n||r)return e===t;if(n=et(e),r=et(t),n||r)return n&&r?Wb(e,t):!1;if(n=Rt(e),r=Rt(t),n||r){if(!n||!r)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const s in e){const l=e.hasOwnProperty(s),c=t.hasOwnProperty(s);if(l&&!c||!l&&c||!ps(e[s],t[s]))return!1}}return String(e)===String(t)}function Hu(e,t){return e.findIndex(n=>ps(n,t))}const ue=e=>zt(e)?e:e==null?"":et(e)||Rt(e)&&(e.toString===hp||!ht(e.toString))?JSON.stringify(e,fp,2):String(e),fp=(e,t)=>t&&t.__v_isRef?fp(e,t.value):lo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:uo(t)?{[`Set(${t.size})`]:[...t.values()]}:Rt(t)&&!et(t)&&!gp(t)?String(t):t,Dt={},ao=[],mr=()=>{},Kb=()=>!1,Vb=/^on[^a-z]/,Na=e=>Vb.test(e),ju=e=>e.startsWith("onUpdate:"),kn=Object.assign,Uu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qb=Object.prototype.hasOwnProperty,_t=(e,t)=>qb.call(e,t),et=Array.isArray,lo=e=>gs(e)==="[object Map]",uo=e=>gs(e)==="[object Set]",dp=e=>gs(e)==="[object Date]",ht=e=>typeof e=="function",zt=e=>typeof e=="string",hs=e=>typeof e=="symbol",Rt=e=>e!==null&&typeof e=="object",pp=e=>Rt(e)&&ht(e.then)&&ht(e.catch),hp=Object.prototype.toString,gs=e=>hp.call(e),zb=e=>gs(e).slice(8,-1),gp=e=>gs(e)==="[object Object]",Wu=e=>zt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ma=nr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Gb=/-(\w)/g,Ar=Fa(e=>e.replace(Gb,(t,n)=>n?n.toUpperCase():"")),Yb=/\B([A-Z])/g,co=Fa(e=>e.replace(Yb,"-$1").toLowerCase()),$a=Fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ku=Fa(e=>e?`on${$a(e)}`:""),ms=(e,t)=>!Object.is(e,t),Ba=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Ha=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},ja=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let mp;const Xb=()=>mp||(mp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Kn;class Jb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Kn,!t&&Kn&&(this.index=(Kn.scopes||(Kn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Kn;try{return Kn=this,t()}finally{Kn=n}}}on(){Kn=this}off(){Kn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.scopes)for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this._active=!1}}}function Zb(e,t=Kn){t&&t.active&&t.effects.push(e)}function vp(){return Kn}function Qb(e){Kn&&Kn.cleanups.push(e)}const Vu=e=>{const t=new Set(e);return t.w=0,t.n=0,t},yp=e=>(e.w&ai)>0,bp=e=>(e.n&ai)>0,eC=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=ai},tC=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const i=t[r];yp(i)&&!bp(i)?i.delete(e):t[n++]=i,i.w&=~ai,i.n&=~ai}t.length=n}},qu=new WeakMap;let vs=0,ai=1;const zu=30;let vr;const Ei=Symbol(""),Gu=Symbol("");class Yu{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,Zb(this,r)}run(){if(!this.active)return this.fn();let t=vr,n=li;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=vr,vr=this,li=!0,ai=1<<++vs,vs<=zu?eC(this):Cp(this),this.fn()}finally{vs<=zu&&tC(this),ai=1<<--vs,vr=this.parent,li=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){vr===this?this.deferStop=!0:this.active&&(Cp(this),this.onStop&&this.onStop(),this.active=!1)}}function Cp(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let li=!0;const _p=[];function fo(){_p.push(li),li=!1}function po(){const e=_p.pop();li=e===void 0?!0:e}function Pn(e,t,n){if(li&&vr){let r=qu.get(e);r||qu.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=Vu()),wp(i)}}function wp(e,t){let n=!1;vs<=zu?bp(e)||(e.n|=ai,n=!yp(e)):n=!e.has(vr),n&&(e.add(vr),vr.deps.push(e))}function Ur(e,t,n,r,i,o){const s=qu.get(e);if(!s)return;let l=[];if(t==="clear")l=[...s.values()];else if(n==="length"&&et(e)){const c=Number(r);s.forEach((d,h)=>{(h==="length"||h>=c)&&l.push(d)})}else switch(n!==void 0&&l.push(s.get(n)),t){case"add":et(e)?Wu(n)&&l.push(s.get("length")):(l.push(s.get(Ei)),lo(e)&&l.push(s.get(Gu)));break;case"delete":et(e)||(l.push(s.get(Ei)),lo(e)&&l.push(s.get(Gu)));break;case"set":lo(e)&&l.push(s.get(Ei));break}if(l.length===1)l[0]&&Xu(l[0]);else{const c=[];for(const d of l)d&&c.push(...d);Xu(Vu(c))}}function Xu(e,t){const n=et(e)?e:[...e];for(const r of n)r.computed&&Tp(r);for(const r of n)r.computed||Tp(r)}function Tp(e,t){(e!==vr||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const nC=nr("__proto__,__v_isRef,__isVue"),xp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(hs)),rC=Ju(),iC=Ju(!1,!0),oC=Ju(!0),kp=sC();function sC(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=kt(this);for(let o=0,s=this.length;o<s;o++)Pn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(kt)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){fo();const r=kt(this)[t].apply(this,n);return po(),r}}),e}function aC(e){const t=kt(this);return Pn(t,"has",e),t.hasOwnProperty(e)}function Ju(e=!1,t=!1){return function(r,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&o===(e?t?TC:Rp:t?Dp:Pp).get(r))return r;const s=et(r);if(!e){if(s&&_t(kp,i))return Reflect.get(kp,i,o);if(i==="hasOwnProperty")return aC}const l=Reflect.get(r,i,o);return(hs(i)?xp.has(i):nC(i))||(e||Pn(r,"get",i),t)?l:mn(l)?s&&Wu(i)?l:l.value:Rt(l)?e?ec(l):Dn(l):l}}const lC=Sp(),uC=Sp(!0);function Sp(e=!1){return function(n,r,i,o){let s=n[r];if(go(s)&&mn(s)&&!mn(i))return!1;if(!e&&(!Ga(i)&&!go(i)&&(s=kt(s),i=kt(i)),!et(n)&&mn(s)&&!mn(i)))return s.value=i,!0;const l=et(n)&&Wu(r)?Number(r)<n.length:_t(n,r),c=Reflect.set(n,r,i,o);return n===kt(o)&&(l?ms(i,s)&&Ur(n,"set",r,i):Ur(n,"add",r,i)),c}}function cC(e,t){const n=_t(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&n&&Ur(e,"delete",t,void 0),r}function fC(e,t){const n=Reflect.has(e,t);return(!hs(t)||!xp.has(t))&&Pn(e,"has",t),n}function dC(e){return Pn(e,"iterate",et(e)?"length":Ei),Reflect.ownKeys(e)}const Ap={get:rC,set:lC,deleteProperty:cC,has:fC,ownKeys:dC},pC={get:oC,set(e,t){return!0},deleteProperty(e,t){return!0}},hC=kn({},Ap,{get:iC,set:uC}),Zu=e=>e,Ua=e=>Reflect.getPrototypeOf(e);function Wa(e,t,n=!1,r=!1){e=e.__v_raw;const i=kt(e),o=kt(t);n||(t!==o&&Pn(i,"get",t),Pn(i,"get",o));const{has:s}=Ua(i),l=r?Zu:n?nc:ys;if(s.call(i,t))return l(e.get(t));if(s.call(i,o))return l(e.get(o));e!==i&&e.get(t)}function Ka(e,t=!1){const n=this.__v_raw,r=kt(n),i=kt(e);return t||(e!==i&&Pn(r,"has",e),Pn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Va(e,t=!1){return e=e.__v_raw,!t&&Pn(kt(e),"iterate",Ei),Reflect.get(e,"size",e)}function Ep(e){e=kt(e);const t=kt(this);return Ua(t).has.call(t,e)||(t.add(e),Ur(t,"add",e,e)),this}function Op(e,t){t=kt(t);const n=kt(this),{has:r,get:i}=Ua(n);let o=r.call(n,e);o||(e=kt(e),o=r.call(n,e));const s=i.call(n,e);return n.set(e,t),o?ms(t,s)&&Ur(n,"set",e,t):Ur(n,"add",e,t),this}function Lp(e){const t=kt(this),{has:n,get:r}=Ua(t);let i=n.call(t,e);i||(e=kt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&Ur(t,"delete",e,void 0),o}function Ip(){const e=kt(this),t=e.size!==0,n=e.clear();return t&&Ur(e,"clear",void 0,void 0),n}function qa(e,t){return function(r,i){const o=this,s=o.__v_raw,l=kt(s),c=t?Zu:e?nc:ys;return!e&&Pn(l,"iterate",Ei),s.forEach((d,h)=>r.call(i,c(d),c(h),o))}}function za(e,t,n){return function(...r){const i=this.__v_raw,o=kt(i),s=lo(o),l=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,d=i[e](...r),h=n?Zu:t?nc:ys;return!t&&Pn(o,"iterate",c?Gu:Ei),{next(){const{value:p,done:b}=d.next();return b?{value:p,done:b}:{value:l?[h(p[0]),h(p[1])]:h(p),done:b}},[Symbol.iterator](){return this}}}}function ui(e){return function(...t){return e==="delete"?!1:this}}function gC(){const e={get(o){return Wa(this,o)},get size(){return Va(this)},has:Ka,add:Ep,set:Op,delete:Lp,clear:Ip,forEach:qa(!1,!1)},t={get(o){return Wa(this,o,!1,!0)},get size(){return Va(this)},has:Ka,add:Ep,set:Op,delete:Lp,clear:Ip,forEach:qa(!1,!0)},n={get(o){return Wa(this,o,!0)},get size(){return Va(this,!0)},has(o){return Ka.call(this,o,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:qa(!0,!1)},r={get(o){return Wa(this,o,!0,!0)},get size(){return Va(this,!0)},has(o){return Ka.call(this,o,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:qa(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=za(o,!1,!1),n[o]=za(o,!0,!1),t[o]=za(o,!1,!0),r[o]=za(o,!0,!0)}),[e,n,t,r]}const[mC,vC,yC,bC]=gC();function Qu(e,t){const n=t?e?bC:yC:e?vC:mC;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const CC={get:Qu(!1,!1)},_C={get:Qu(!1,!0)},wC={get:Qu(!0,!1)},Pp=new WeakMap,Dp=new WeakMap,Rp=new WeakMap,TC=new WeakMap;function xC(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kC(e){return e.__v_skip||!Object.isExtensible(e)?0:xC(zb(e))}function Dn(e){return go(e)?e:tc(e,!1,Ap,CC,Pp)}function SC(e){return tc(e,!1,hC,_C,Dp)}function ec(e){return tc(e,!0,pC,wC,Rp)}function tc(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const s=kC(e);if(s===0)return e;const l=new Proxy(e,s===2?r:n);return i.set(e,l),l}function ho(e){return go(e)?ho(e.__v_raw):!!(e&&e.__v_isReactive)}function go(e){return!!(e&&e.__v_isReadonly)}function Ga(e){return!!(e&&e.__v_isShallow)}function Np(e){return ho(e)||go(e)}function kt(e){const t=e&&e.__v_raw;return t?kt(t):e}function Mp(e){return Ha(e,"__v_skip",!0),e}const ys=e=>Rt(e)?Dn(e):e,nc=e=>Rt(e)?ec(e):e;function Fp(e){li&&vr&&(e=kt(e),wp(e.dep||(e.dep=Vu())))}function $p(e,t){e=kt(e);const n=e.dep;n&&Xu(n)}function mn(e){return!!(e&&e.__v_isRef===!0)}function Et(e){return Bp(e,!1)}function AC(e){return Bp(e,!0)}function Bp(e,t){return mn(e)?e:new EC(e,t)}class EC{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:kt(t),this._value=n?t:ys(t)}get value(){return Fp(this),this._value}set value(t){const n=this.__v_isShallow||Ga(t)||go(t);t=n?t:kt(t),ms(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ys(t),$p(this))}}function Hp(e){return mn(e)?e.value:e}const OC={get:(e,t,n)=>Hp(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return mn(i)&&!mn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function jp(e){return ho(e)?e:new Proxy(e,OC)}var Up;class LC{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Up]=!1,this._dirty=!0,this.effect=new Yu(t,()=>{this._dirty||(this._dirty=!0,$p(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=kt(this);return Fp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Up="__v_isReadonly";function IC(e,t,n=!1){let r,i;const o=ht(e);return o?(r=e,i=mr):(r=e.get,i=e.set),new LC(r,i,o||!i,n)}function a3(e,...t){}function ci(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){Ya(o,t,n)}return i}function yr(e,t,n,r){if(ht(e)){const o=ci(e,t,n,r);return o&&pp(o)&&o.catch(s=>{Ya(s,t,n)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(yr(e[o],t,n,r));return i}function Ya(e,t,n,r=!0){const i=t?t.vnode:null;if(t){let o=t.parent;const s=t.proxy,l=n;for(;o;){const d=o.ec;if(d){for(let h=0;h<d.length;h++)if(d[h](e,s,l)===!1)return}o=o.parent}const c=t.appContext.config.errorHandler;if(c){ci(c,null,10,[e,s,l]);return}}PC(e,n,i,r)}function PC(e,t,n,r=!0){console.error(e)}let bs=!1,rc=!1;const vn=[];let Er=0;const mo=[];let Wr=null,Oi=0;const Wp=Promise.resolve();let ic=null;function Xa(e){const t=ic||Wp;return e?t.then(this?e.bind(this):e):t}function DC(e){let t=Er+1,n=vn.length;for(;t<n;){const r=t+n>>>1;Cs(vn[r])<e?t=r+1:n=r}return t}function oc(e){(!vn.length||!vn.includes(e,bs&&e.allowRecurse?Er+1:Er))&&(e.id==null?vn.push(e):vn.splice(DC(e.id),0,e),Kp())}function Kp(){!bs&&!rc&&(rc=!0,ic=Wp.then(zp))}function RC(e){const t=vn.indexOf(e);t>Er&&vn.splice(t,1)}function NC(e){et(e)?mo.push(...e):(!Wr||!Wr.includes(e,e.allowRecurse?Oi+1:Oi))&&mo.push(e),Kp()}function Vp(e,t=bs?Er+1:0){for(;t<vn.length;t++){const n=vn[t];n&&n.pre&&(vn.splice(t,1),t--,n())}}function qp(e){if(mo.length){const t=[...new Set(mo)];if(mo.length=0,Wr){Wr.push(...t);return}for(Wr=t,Wr.sort((n,r)=>Cs(n)-Cs(r)),Oi=0;Oi<Wr.length;Oi++)Wr[Oi]();Wr=null,Oi=0}}const Cs=e=>e.id==null?1/0:e.id,MC=(e,t)=>{const n=Cs(e)-Cs(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function zp(e){rc=!1,bs=!0,vn.sort(MC);const t=mr;try{for(Er=0;Er<vn.length;Er++){const n=vn[Er];n&&n.active!==!1&&ci(n,null,14)}}finally{Er=0,vn.length=0,qp(),bs=!1,ic=null,(vn.length||mo.length)&&zp()}}function FC(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Dt;let i=n;const o=t.startsWith("update:"),s=o&&t.slice(7);if(s&&s in r){const h=`${s==="modelValue"?"model":s}Modifiers`,{number:p,trim:b}=r[h]||Dt;b&&(i=n.map(y=>zt(y)?y.trim():y)),p&&(i=n.map(ja))}let l,c=r[l=Ku(t)]||r[l=Ku(Ar(t))];!c&&o&&(c=r[l=Ku(co(t))]),c&&yr(c,e,6,i);const d=r[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,yr(d,e,6,i)}}function Gp(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let s={},l=!1;if(!ht(e)){const c=d=>{const h=Gp(d,t,!0);h&&(l=!0,kn(s,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(Rt(e)&&r.set(e,null),null):(et(o)?o.forEach(c=>s[c]=null):kn(s,o),Rt(e)&&r.set(e,s),s)}function Ja(e,t){return!e||!Na(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,co(t))||_t(e,t))}let dn=null,Za=null;function Qa(e){const t=dn;return dn=e,Za=e&&e.type.__scopeId||null,t}function vo(e){Za=e}function yo(){Za=null}function sc(e,t=dn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&_h(-1);const o=Qa(t);let s;try{s=e(...i)}finally{Qa(o),r._d&&_h(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function l3(){}function ac(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[s],slots:l,attrs:c,emit:d,render:h,renderCache:p,data:b,setupState:y,ctx:w,inheritAttrs:T}=e;let O,I;const P=Qa(e);try{if(n.shapeFlag&4){const L=i||r;O=Or(h.call(L,L,p,o,y,b,w)),I=c}else{const L=t;O=Or(L.length>1?L(o,{attrs:c,slots:l,emit:d}):L(o,null)),I=t.props?c:$C(c)}}catch(L){xs.length=0,Ya(L,e,1),O=xe(fi)}let j=O;if(I&&T!==!1){const L=Object.keys(I),{shapeFlag:we}=j;L.length&&we&7&&(s&&L.some(ju)&&(I=BC(I,s)),j=Co(j,I))}return n.dirs&&(j=Co(j),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition&&(j.transition=n.transition),O=j,Qa(P),O}const $C=e=>{let t;for(const n in e)(n==="class"||n==="style"||Na(n))&&((t||(t={}))[n]=e[n]);return t},BC=(e,t)=>{const n={};for(const r in e)(!ju(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function HC(e,t,n){const{props:r,children:i,component:o}=e,{props:s,children:l,patchFlag:c}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Yp(r,s,d):!!s;if(c&8){const h=t.dynamicProps;for(let p=0;p<h.length;p++){const b=h[p];if(s[b]!==r[b]&&!Ja(d,b))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:r===s?!1:r?s?Yp(r,s,d):!0:!!s;return!1}function Yp(e,t,n){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;i<r.length;i++){const o=r[i];if(t[o]!==e[o]&&!Ja(n,o))return!0}return!1}function jC({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const UC=e=>e.__isSuspense;function WC(e,t){t&&t.pendingBranch?et(e)?t.effects.push(...e):t.effects.push(e):NC(e)}function Xp(e,t){if(Gt){let n=Gt.provides;const r=Gt.parent&&Gt.parent.provides;r===n&&(n=Gt.provides=Object.create(r)),n[e]=t}}function bo(e,t,n=!1){const r=Gt||dn;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&ht(t)?t.call(r.proxy):t}}const el={};function rr(e,t,n){return Jp(e,t,n)}function Jp(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:s}=Dt){const l=vp()===(Gt==null?void 0:Gt.scope)?Gt:null;let c,d=!1,h=!1;if(mn(e)?(c=()=>e.value,d=Ga(e)):ho(e)?(c=()=>e,r=!0):et(e)?(h=!0,d=e.some(j=>ho(j)||Ga(j)),c=()=>e.map(j=>{if(mn(j))return j.value;if(ho(j))return Li(j);if(ht(j))return ci(j,l,2)})):ht(e)?t?c=()=>ci(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return p&&p(),yr(e,l,3,[b])}:c=mr,t&&r){const j=c;c=()=>Li(j())}let p,b=j=>{p=I.onStop=()=>{ci(j,l,4)}},y;if(As)if(b=mr,t?n&&yr(t,l,3,[c(),h?[]:void 0,b]):c(),i==="sync"){const j=F_();y=j.__watcherHandles||(j.__watcherHandles=[])}else return mr;let w=h?new Array(e.length).fill(el):el;const T=()=>{if(I.active)if(t){const j=I.run();(r||d||(h?j.some((L,we)=>ms(L,w[we])):ms(j,w)))&&(p&&p(),yr(t,l,3,[j,w===el?void 0:h&&w[0]===el?[]:w,b]),w=j)}else I.run()};T.allowRecurse=!!t;let O;i==="sync"?O=T:i==="post"?O=()=>Nn(T,l&&l.suspense):(T.pre=!0,l&&(T.id=l.uid),O=()=>oc(T));const I=new Yu(c,O);t?n?T():w=I.run():i==="post"?Nn(I.run.bind(I),l&&l.suspense):I.run();const P=()=>{I.stop(),l&&l.scope&&Uu(l.scope.effects,I)};return y&&y.push(P),P}function KC(e,t,n){const r=this.proxy,i=zt(e)?e.includes(".")?Zp(r,e):()=>r[e]:e.bind(r,r);let o;ht(t)?o=t:(o=t.handler,n=t);const s=Gt;_o(this);const l=Jp(i,o.bind(r),n);return s?_o(s):Ri(),l}function Zp(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i<n.length&&r;i++)r=r[n[i]];return r}}function Li(e,t){if(!Rt(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),mn(e))Li(e.value,t);else if(et(e))for(let n=0;n<e.length;n++)Li(e[n],t);else if(uo(e)||lo(e))e.forEach(n=>{Li(n,t)});else if(gp(e))for(const n in e)Li(e[n],t);return e}function Rn(e){return ht(e)?{setup:e,name:e.name}:e}const _s=e=>!!e.type.__asyncLoader,Qp=e=>e.type.__isKeepAlive;function VC(e,t){eh(e,"a",t)}function qC(e,t){eh(e,"da",t)}function eh(e,t,n=Gt){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(tl(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Qp(i.parent.vnode)&&zC(r,t,n,i),i=i.parent}}function zC(e,t,n,r){const i=tl(t,e,r,!0);th(()=>{Uu(r[t],i)},n)}function tl(e,t,n=Gt,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;fo(),_o(n);const l=yr(t,n,e,s);return Ri(),po(),l});return r?i.unshift(o):i.push(o),o}}const Kr=e=>(t,n=Gt)=>(!As||e==="sp")&&tl(e,(...r)=>t(...r),n),GC=Kr("bm"),lc=Kr("m"),YC=Kr("bu"),XC=Kr("u"),JC=Kr("bum"),th=Kr("um"),ZC=Kr("sp"),QC=Kr("rtg"),e_=Kr("rtc");function t_(e,t=Gt){tl("ec",e,t)}function ye(e,t){const n=dn;if(n===null)return e;const r=ul(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[s,l,c,d=Dt]=t[o];s&&(ht(s)&&(s={mounted:s,updated:s}),s.deep&&Li(l),i.push({dir:s,instance:r,value:l,oldValue:void 0,arg:c,modifiers:d}))}return e}function Ii(e,t,n,r){const i=e.dirs,o=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];o&&(l.oldValue=o[s].value);let c=l.dir[r];c&&(fo(),yr(c,n,8,[e.el,l,e,t]),po())}}const uc="components",n_="directives";function st(e,t){return cc(uc,e,!0,t)||e}const nh=Symbol();function rh(e){return zt(e)?cc(uc,e,!1)||e:e||nh}function nl(e){return cc(n_,e)}function cc(e,t,n=!0,r=!1){const i=dn||Gt;if(i){const o=i.type;if(e===uc){const l=R_(o,!1);if(l&&(l===t||l===Ar(t)||l===$a(Ar(t))))return o}const s=ih(i[e]||o[e],t)||ih(i.appContext[e],t);return!s&&r?o:s}}function ih(e,t){return e&&(e[t]||e[Ar(t)]||e[$a(Ar(t))])}function ft(e,t,n,r){let i;const o=n&&n[r];if(et(e)||zt(e)){i=new Array(e.length);for(let s=0,l=e.length;s<l;s++)i[s]=t(e[s],s,void 0,o&&o[s])}else if(typeof e=="number"){i=new Array(e);for(let s=0;s<e;s++)i[s]=t(s+1,s,void 0,o&&o[s])}else if(Rt(e))if(e[Symbol.iterator])i=Array.from(e,(s,l)=>t(s,l,void 0,o&&o[l]));else{const s=Object.keys(e);i=new Array(s.length);for(let l=0,c=s.length;l<c;l++){const d=s[l];i[l]=t(e[d],d,l,o&&o[l])}}else i=[];return n&&(n[r]=i),i}function r_(e,t,n={},r,i){if(dn.isCE||dn.parent&&_s(dn.parent)&&dn.parent.isCE)return t!=="default"&&(n.name=t),xe("slot",n,r&&r());let o=e[t];o&&o._c&&(o._d=!1),E();const s=o&&oh(o(n)),l=Qe(Be,{key:n.key||s&&s.key||`_${t}`},s||(r?r():[]),s&&e._===1?64:-2);return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function oh(e){return e.some(t=>Th(t)?!(t.type===fi||t.type===Be&&!oh(t.children)):!0)?e:null}const fc=e=>e?Sh(e)?ul(e)||e.proxy:fc(e.parent):null,ws=kn(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=>fc(e.parent),$root:e=>fc(e.root),$emit:e=>e.emit,$options:e=>hc(e),$forceUpdate:e=>e.f||(e.f=()=>oc(e.update)),$nextTick:e=>e.n||(e.n=Xa.bind(e.proxy)),$watch:e=>KC.bind(e)}),dc=(e,t)=>e!==Dt&&!e.__isScriptSetup&&_t(e,t),i_={get({_:e},t){const{ctx:n,setupState:r,data:i,props:o,accessCache:s,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const y=s[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(dc(r,t))return s[t]=1,r[t];if(i!==Dt&&_t(i,t))return s[t]=2,i[t];if((d=e.propsOptions[0])&&_t(d,t))return s[t]=3,o[t];if(n!==Dt&&_t(n,t))return s[t]=4,n[t];pc&&(s[t]=0)}}const h=ws[t];let p,b;if(h)return t==="$attrs"&&Pn(e,"get",t),h(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==Dt&&_t(n,t))return s[t]=4,n[t];if(b=c.config.globalProperties,_t(b,t))return b[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return dc(i,t)?(i[t]=n,!0):r!==Dt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},s){let l;return!!n[s]||e!==Dt&&_t(e,s)||dc(t,s)||(l=o[0])&&_t(l,s)||_t(r,s)||_t(ws,s)||_t(i.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let pc=!0;function o_(e){const t=hc(e),n=e.proxy,r=e.ctx;pc=!1,t.beforeCreate&&sh(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:s,watch:l,provide:c,inject:d,created:h,beforeMount:p,mounted:b,beforeUpdate:y,updated:w,activated:T,deactivated:O,beforeDestroy:I,beforeUnmount:P,destroyed:j,unmounted:L,render:we,renderTracked:m,renderTriggered:ce,errorCaptured:D,serverPrefetch:S,expose:R,inheritAttrs:U,components:ee,directives:J,filters:be}=t;if(d&&s_(d,r,null,e.appContext.config.unwrapInjectedRef),s)for(const z in s){const ie=s[z];ht(ie)&&(r[z]=ie.bind(n))}if(i){const z=i.call(n,n);Rt(z)&&(e.data=Dn(z))}if(pc=!0,o)for(const z in o){const ie=o[z],fe=ht(ie)?ie.bind(n,n):ht(ie.get)?ie.get.bind(n,n):mr,rt=!ht(ie)&&ht(ie.set)?ie.set.bind(n):mr,Ve=tn({get:fe,set:rt});Object.defineProperty(r,z,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:ne=>Ve.value=ne})}if(l)for(const z in l)ah(l[z],r,n,z);if(c){const z=ht(c)?c.call(n):c;Reflect.ownKeys(z).forEach(ie=>{Xp(ie,z[ie])})}h&&sh(h,e,"c");function Ne(z,ie){et(ie)?ie.forEach(fe=>z(fe.bind(n))):ie&&z(ie.bind(n))}if(Ne(GC,p),Ne(lc,b),Ne(YC,y),Ne(XC,w),Ne(VC,T),Ne(qC,O),Ne(t_,D),Ne(e_,m),Ne(QC,ce),Ne(JC,P),Ne(th,L),Ne(ZC,S),et(R))if(R.length){const z=e.exposed||(e.exposed={});R.forEach(ie=>{Object.defineProperty(z,ie,{get:()=>n[ie],set:fe=>n[ie]=fe})})}else e.exposed||(e.exposed={});we&&e.render===mr&&(e.render=we),U!=null&&(e.inheritAttrs=U),ee&&(e.components=ee),J&&(e.directives=J)}function s_(e,t,n=mr,r=!1){et(e)&&(e=gc(e));for(const i in e){const o=e[i];let s;Rt(o)?"default"in o?s=bo(o.from||i,o.default,!0):s=bo(o.from||i):s=bo(o),mn(s)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:l=>s.value=l}):t[i]=s}}function sh(e,t,n){yr(et(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function ah(e,t,n,r){const i=r.includes(".")?Zp(n,r):()=>n[r];if(zt(e)){const o=t[e];ht(o)&&rr(i,o)}else if(ht(e))rr(i,e.bind(n));else if(Rt(e))if(et(e))e.forEach(o=>ah(o,t,n,r));else{const o=ht(e.handler)?e.handler.bind(n):t[e.handler];ht(o)&&rr(i,o,e)}}function hc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,l=o.get(t);let c;return l?c=l:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(d=>rl(c,d,s,!0)),rl(c,t,s)),Rt(t)&&o.set(t,c),c}function rl(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&rl(e,o,n,!0),i&&i.forEach(s=>rl(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const l=a_[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const a_={data:lh,props:Pi,emits:Pi,methods:Pi,computed:Pi,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:Pi,directives:Pi,watch:u_,provide:lh,inject:l_};function lh(e,t){return t?e?function(){return kn(ht(e)?e.call(this,this):e,ht(t)?t.call(this,this):t)}:t:e}function l_(e,t){return Pi(gc(e),gc(t))}function gc(e){if(et(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Sn(e,t){return e?[...new Set([].concat(e,t))]:t}function Pi(e,t){return e?kn(kn(Object.create(null),e),t):t}function u_(e,t){if(!e)return t;if(!t)return e;const n=kn(Object.create(null),e);for(const r in t)n[r]=Sn(e[r],t[r]);return n}function c_(e,t,n,r=!1){const i={},o={};Ha(o,sl,1),e.propsDefaults=Object.create(null),uh(e,t,i,o);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=r?i:SC(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function f_(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:s}}=e,l=kt(i),[c]=e.propsOptions;let d=!1;if((r||s>0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let p=0;p<h.length;p++){let b=h[p];if(Ja(e.emitsOptions,b))continue;const y=t[b];if(c)if(_t(o,b))y!==o[b]&&(o[b]=y,d=!0);else{const w=Ar(b);i[w]=mc(c,l,w,y,e,!1)}else y!==o[b]&&(o[b]=y,d=!0)}}}else{uh(e,t,i,o)&&(d=!0);let h;for(const p in l)(!t||!_t(t,p)&&((h=co(p))===p||!_t(t,h)))&&(c?n&&(n[p]!==void 0||n[h]!==void 0)&&(i[p]=mc(c,l,p,void 0,e,!0)):delete i[p]);if(o!==l)for(const p in o)(!t||!_t(t,p))&&(delete o[p],d=!0)}d&&Ur(e,"set","$attrs")}function uh(e,t,n,r){const[i,o]=e.propsOptions;let s=!1,l;if(t)for(let c in t){if(Ma(c))continue;const d=t[c];let h;i&&_t(i,h=Ar(c))?!o||!o.includes(h)?n[h]=d:(l||(l={}))[h]=d:Ja(e.emitsOptions,c)||(!(c in r)||d!==r[c])&&(r[c]=d,s=!0)}if(o){const c=kt(n),d=l||Dt;for(let h=0;h<o.length;h++){const p=o[h];n[p]=mc(i,c,p,d[p],e,!_t(d,p))}}return s}function mc(e,t,n,r,i,o){const s=e[n];if(s!=null){const l=_t(s,"default");if(l&&r===void 0){const c=s.default;if(s.type!==Function&&ht(c)){const{propsDefaults:d}=i;n in d?r=d[n]:(_o(i),r=d[n]=c.call(null,t),Ri())}else r=c}s[0]&&(o&&!l?r=!1:s[1]&&(r===""||r===co(n))&&(r=!0))}return r}function ch(e,t,n=!1){const r=t.propsCache,i=r.get(e);if(i)return i;const o=e.props,s={},l=[];let c=!1;if(!ht(e)){const h=p=>{c=!0;const[b,y]=ch(p,t,!0);kn(s,b),y&&l.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!o&&!c)return Rt(e)&&r.set(e,ao),ao;if(et(o))for(let h=0;h<o.length;h++){const p=Ar(o[h]);fh(p)&&(s[p]=Dt)}else if(o)for(const h in o){const p=Ar(h);if(fh(p)){const b=o[h],y=s[p]=et(b)||ht(b)?{type:b}:Object.assign({},b);if(y){const w=hh(Boolean,y.type),T=hh(String,y.type);y[0]=w>-1,y[1]=T<0||w<T,(w>-1||_t(y,"default"))&&l.push(p)}}}const d=[s,l];return Rt(e)&&r.set(e,d),d}function fh(e){return e[0]!=="$"}function dh(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function ph(e,t){return dh(e)===dh(t)}function hh(e,t){return et(t)?t.findIndex(n=>ph(n,e)):ht(t)&&ph(t,e)?0:-1}const gh=e=>e[0]==="_"||e==="$stable",vc=e=>et(e)?e.map(Or):[Or(e)],d_=(e,t,n)=>{if(t._n)return t;const r=sc((...i)=>vc(t(...i)),n);return r._c=!1,r},mh=(e,t,n)=>{const r=e._ctx;for(const i in e){if(gh(i))continue;const o=e[i];if(ht(o))t[i]=d_(i,o,r);else if(o!=null){const s=vc(o);t[i]=()=>s}}},vh=(e,t)=>{const n=vc(t);e.slots.default=()=>n},p_=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=kt(t),Ha(t,"_",n)):mh(t,e.slots={})}else e.slots={},t&&vh(e,t);Ha(e.slots,sl,1)},h_=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,s=Dt;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(kn(i,t),!n&&l===1&&delete i._):(o=!t.$stable,mh(t,i)),s=t}else t&&(vh(e,t),s={default:1});if(o)for(const l in i)!gh(l)&&!(l in s)&&delete i[l]};function yh(){return{app:null,config:{isNativeTag:Kb,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 g_=0;function m_(e,t){return function(r,i=null){ht(r)||(r=Object.assign({},r)),i!=null&&!Rt(i)&&(i=null);const o=yh(),s=new Set;let l=!1;const c=o.app={_uid:g_++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:$_,get config(){return o.config},set config(d){},use(d,...h){return s.has(d)||(d&&ht(d.install)?(s.add(d),d.install(c,...h)):ht(d)&&(s.add(d),d(c,...h))),c},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),c},component(d,h){return h?(o.components[d]=h,c):o.components[d]},directive(d,h){return h?(o.directives[d]=h,c):o.directives[d]},mount(d,h,p){if(!l){const b=xe(r,i);return b.appContext=o,h&&t?t(b,d):e(b,d,p),l=!0,c._container=d,d.__vue_app__=c,ul(b.component)||b.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(d,h){return o.provides[d]=h,c}};return c}}function yc(e,t,n,r,i=!1){if(et(e)){e.forEach((b,y)=>yc(b,t&&(et(t)?t[y]:t),n,r,i));return}if(_s(r)&&!i)return;const o=r.shapeFlag&4?ul(r.component)||r.component.proxy:r.el,s=i?null:o,{i:l,r:c}=e,d=t&&t.r,h=l.refs===Dt?l.refs={}:l.refs,p=l.setupState;if(d!=null&&d!==c&&(zt(d)?(h[d]=null,_t(p,d)&&(p[d]=null)):mn(d)&&(d.value=null)),ht(c))ci(c,l,12,[s,h]);else{const b=zt(c),y=mn(c);if(b||y){const w=()=>{if(e.f){const T=b?_t(p,c)?p[c]:h[c]:c.value;i?et(T)&&Uu(T,o):et(T)?T.includes(o)||T.push(o):b?(h[c]=[o],_t(p,c)&&(p[c]=h[c])):(c.value=[o],e.k&&(h[e.k]=c.value))}else b?(h[c]=s,_t(p,c)&&(p[c]=s)):y&&(c.value=s,e.k&&(h[e.k]=s))};s?(w.id=-1,Nn(w,n)):w()}}}const Nn=WC;function v_(e){return y_(e)}function y_(e,t){const n=Xb();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:s,createText:l,createComment:c,setText:d,setElementText:h,parentNode:p,nextSibling:b,setScopeId:y=mr,insertStaticContent:w}=e,T=(N,$,G,te=null,K=null,X=null,Ce=!1,de=null,ve=!!$.dynamicChildren)=>{if(N===$)return;N&&!Ss(N,$)&&(te=He(N),ne(N,K,X,!0),N=null),$.patchFlag===-2&&(ve=!1,$.dynamicChildren=null);const{type:se,ref:ke,shapeFlag:_e}=$;switch(se){case ol:O(N,$,G,te);break;case fi:I(N,$,G,te);break;case _c:N==null&&P($,G,te,Ce);break;case Be:ee(N,$,G,te,K,X,Ce,de,ve);break;default:_e&1?we(N,$,G,te,K,X,Ce,de,ve):_e&6?J(N,$,G,te,K,X,Ce,de,ve):(_e&64||_e&128)&&se.process(N,$,G,te,K,X,Ce,de,ve,Le)}ke!=null&&K&&yc(ke,N&&N.ref,X,$||N,!$)},O=(N,$,G,te)=>{if(N==null)r($.el=l($.children),G,te);else{const K=$.el=N.el;$.children!==N.children&&d(K,$.children)}},I=(N,$,G,te)=>{N==null?r($.el=c($.children||""),G,te):$.el=N.el},P=(N,$,G,te)=>{[N.el,N.anchor]=w(N.children,$,G,te,N.el,N.anchor)},j=({el:N,anchor:$},G,te)=>{let K;for(;N&&N!==$;)K=b(N),r(N,G,te),N=K;r($,G,te)},L=({el:N,anchor:$})=>{let G;for(;N&&N!==$;)G=b(N),i(N),N=G;i($)},we=(N,$,G,te,K,X,Ce,de,ve)=>{Ce=Ce||$.type==="svg",N==null?m($,G,te,K,X,Ce,de,ve):S(N,$,K,X,Ce,de,ve)},m=(N,$,G,te,K,X,Ce,de)=>{let ve,se;const{type:ke,props:_e,shapeFlag:Me,transition:Se,dirs:qe}=N;if(ve=N.el=s(N.type,X,_e&&_e.is,_e),Me&8?h(ve,N.children):Me&16&&D(N.children,ve,null,te,K,X&&ke!=="foreignObject",Ce,de),qe&&Ii(N,null,te,"created"),ce(ve,N,N.scopeId,Ce,te),_e){for(const lt in _e)lt!=="value"&&!Ma(lt)&&o(ve,lt,null,_e[lt],X,N.children,te,K,Oe);"value"in _e&&o(ve,"value",null,_e.value),(se=_e.onVnodeBeforeMount)&&Lr(se,te,N)}qe&&Ii(N,null,te,"beforeMount");const dt=(!K||K&&!K.pendingBranch)&&Se&&!Se.persisted;dt&&Se.beforeEnter(ve),r(ve,$,G),((se=_e&&_e.onVnodeMounted)||dt||qe)&&Nn(()=>{se&&Lr(se,te,N),dt&&Se.enter(ve),qe&&Ii(N,null,te,"mounted")},K)},ce=(N,$,G,te,K)=>{if(G&&y(N,G),te)for(let X=0;X<te.length;X++)y(N,te[X]);if(K){let X=K.subTree;if($===X){const Ce=K.vnode;ce(N,Ce,Ce.scopeId,Ce.slotScopeIds,K.parent)}}},D=(N,$,G,te,K,X,Ce,de,ve=0)=>{for(let se=ve;se<N.length;se++){const ke=N[se]=de?di(N[se]):Or(N[se]);T(null,ke,$,G,te,K,X,Ce,de)}},S=(N,$,G,te,K,X,Ce)=>{const de=$.el=N.el;let{patchFlag:ve,dynamicChildren:se,dirs:ke}=$;ve|=N.patchFlag&16;const _e=N.props||Dt,Me=$.props||Dt;let Se;G&&Di(G,!1),(Se=Me.onVnodeBeforeUpdate)&&Lr(Se,G,$,N),ke&&Ii($,N,G,"beforeUpdate"),G&&Di(G,!0);const qe=K&&$.type!=="foreignObject";if(se?R(N.dynamicChildren,se,de,G,te,qe,X):Ce||ie(N,$,de,null,G,te,qe,X,!1),ve>0){if(ve&16)U(de,$,_e,Me,G,te,K);else if(ve&2&&_e.class!==Me.class&&o(de,"class",null,Me.class,K),ve&4&&o(de,"style",_e.style,Me.style,K),ve&8){const dt=$.dynamicProps;for(let lt=0;lt<dt.length;lt++){const Ct=dt[lt],Ft=_e[Ct],an=Me[Ct];(an!==Ft||Ct==="value")&&o(de,Ct,Ft,an,K,N.children,G,te,Oe)}}ve&1&&N.children!==$.children&&h(de,$.children)}else!Ce&&se==null&&U(de,$,_e,Me,G,te,K);((Se=Me.onVnodeUpdated)||ke)&&Nn(()=>{Se&&Lr(Se,G,$,N),ke&&Ii($,N,G,"updated")},te)},R=(N,$,G,te,K,X,Ce)=>{for(let de=0;de<$.length;de++){const ve=N[de],se=$[de],ke=ve.el&&(ve.type===Be||!Ss(ve,se)||ve.shapeFlag&70)?p(ve.el):G;T(ve,se,ke,null,te,K,X,Ce,!0)}},U=(N,$,G,te,K,X,Ce)=>{if(G!==te){if(G!==Dt)for(const de in G)!Ma(de)&&!(de in te)&&o(N,de,G[de],null,Ce,$.children,K,X,Oe);for(const de in te){if(Ma(de))continue;const ve=te[de],se=G[de];ve!==se&&de!=="value"&&o(N,de,se,ve,Ce,$.children,K,X,Oe)}"value"in te&&o(N,"value",G.value,te.value)}},ee=(N,$,G,te,K,X,Ce,de,ve)=>{const se=$.el=N?N.el:l(""),ke=$.anchor=N?N.anchor:l("");let{patchFlag:_e,dynamicChildren:Me,slotScopeIds:Se}=$;Se&&(de=de?de.concat(Se):Se),N==null?(r(se,G,te),r(ke,G,te),D($.children,G,ke,K,X,Ce,de,ve)):_e>0&&_e&64&&Me&&N.dynamicChildren?(R(N.dynamicChildren,Me,G,K,X,Ce,de),($.key!=null||K&&$===K.subTree)&&bc(N,$,!0)):ie(N,$,G,ke,K,X,Ce,de,ve)},J=(N,$,G,te,K,X,Ce,de,ve)=>{$.slotScopeIds=de,N==null?$.shapeFlag&512?K.ctx.activate($,G,te,Ce,ve):be($,G,te,K,X,Ce,ve):je(N,$,ve)},be=(N,$,G,te,K,X,Ce)=>{const de=N.component=O_(N,te,K);if(Qp(N)&&(de.ctx.renderer=Le),L_(de),de.asyncDep){if(K&&K.registerDep(de,Ne),!N.el){const ve=de.subTree=xe(fi);I(null,ve,$,G)}return}Ne(de,N,$,G,K,X,Ce)},je=(N,$,G)=>{const te=$.component=N.component;if(HC(N,$,G))if(te.asyncDep&&!te.asyncResolved){z(te,$,G);return}else te.next=$,RC(te.update),te.update();else $.el=N.el,te.vnode=$},Ne=(N,$,G,te,K,X,Ce)=>{const de=()=>{if(N.isMounted){let{next:ke,bu:_e,u:Me,parent:Se,vnode:qe}=N,dt=ke,lt;Di(N,!1),ke?(ke.el=qe.el,z(N,ke,Ce)):ke=qe,_e&&Ba(_e),(lt=ke.props&&ke.props.onVnodeBeforeUpdate)&&Lr(lt,Se,ke,qe),Di(N,!0);const Ct=ac(N),Ft=N.subTree;N.subTree=Ct,T(Ft,Ct,p(Ft.el),He(Ft),N,K,X),ke.el=Ct.el,dt===null&&jC(N,Ct.el),Me&&Nn(Me,K),(lt=ke.props&&ke.props.onVnodeUpdated)&&Nn(()=>Lr(lt,Se,ke,qe),K)}else{let ke;const{el:_e,props:Me}=$,{bm:Se,m:qe,parent:dt}=N,lt=_s($);if(Di(N,!1),Se&&Ba(Se),!lt&&(ke=Me&&Me.onVnodeBeforeMount)&&Lr(ke,dt,$),Di(N,!0),_e&&mt){const Ct=()=>{N.subTree=ac(N),mt(_e,N.subTree,N,K,null)};lt?$.type.__asyncLoader().then(()=>!N.isUnmounted&&Ct()):Ct()}else{const Ct=N.subTree=ac(N);T(null,Ct,G,te,N,K,X),$.el=Ct.el}if(qe&&Nn(qe,K),!lt&&(ke=Me&&Me.onVnodeMounted)){const Ct=$;Nn(()=>Lr(ke,dt,Ct),K)}($.shapeFlag&256||dt&&_s(dt.vnode)&&dt.vnode.shapeFlag&256)&&N.a&&Nn(N.a,K),N.isMounted=!0,$=G=te=null}},ve=N.effect=new Yu(de,()=>oc(se),N.scope),se=N.update=()=>ve.run();se.id=N.uid,Di(N,!0),se()},z=(N,$,G)=>{$.component=N;const te=N.vnode.props;N.vnode=$,N.next=null,f_(N,$.props,te,G),h_(N,$.children,G),fo(),Vp(),po()},ie=(N,$,G,te,K,X,Ce,de,ve=!1)=>{const se=N&&N.children,ke=N?N.shapeFlag:0,_e=$.children,{patchFlag:Me,shapeFlag:Se}=$;if(Me>0){if(Me&128){rt(se,_e,G,te,K,X,Ce,de,ve);return}else if(Me&256){fe(se,_e,G,te,K,X,Ce,de,ve);return}}Se&8?(ke&16&&Oe(se,K,X),_e!==se&&h(G,_e)):ke&16?Se&16?rt(se,_e,G,te,K,X,Ce,de,ve):Oe(se,K,X,!0):(ke&8&&h(G,""),Se&16&&D(_e,G,te,K,X,Ce,de,ve))},fe=(N,$,G,te,K,X,Ce,de,ve)=>{N=N||ao,$=$||ao;const se=N.length,ke=$.length,_e=Math.min(se,ke);let Me;for(Me=0;Me<_e;Me++){const Se=$[Me]=ve?di($[Me]):Or($[Me]);T(N[Me],Se,G,null,K,X,Ce,de,ve)}se>ke?Oe(N,K,X,!0,!1,_e):D($,G,te,K,X,Ce,de,ve,_e)},rt=(N,$,G,te,K,X,Ce,de,ve)=>{let se=0;const ke=$.length;let _e=N.length-1,Me=ke-1;for(;se<=_e&&se<=Me;){const Se=N[se],qe=$[se]=ve?di($[se]):Or($[se]);if(Ss(Se,qe))T(Se,qe,G,null,K,X,Ce,de,ve);else break;se++}for(;se<=_e&&se<=Me;){const Se=N[_e],qe=$[Me]=ve?di($[Me]):Or($[Me]);if(Ss(Se,qe))T(Se,qe,G,null,K,X,Ce,de,ve);else break;_e--,Me--}if(se>_e){if(se<=Me){const Se=Me+1,qe=Se<ke?$[Se].el:te;for(;se<=Me;)T(null,$[se]=ve?di($[se]):Or($[se]),G,qe,K,X,Ce,de,ve),se++}}else if(se>Me)for(;se<=_e;)ne(N[se],K,X,!0),se++;else{const Se=se,qe=se,dt=new Map;for(se=qe;se<=Me;se++){const Re=$[se]=ve?di($[se]):Or($[se]);Re.key!=null&&dt.set(Re.key,se)}let lt,Ct=0;const Ft=Me-qe+1;let an=!1,Ht=0;const fn=new Array(Ft);for(se=0;se<Ft;se++)fn[se]=0;for(se=Se;se<=_e;se++){const Re=N[se];if(Ct>=Ft){ne(Re,K,X,!0);continue}let Fe;if(Re.key!=null)Fe=dt.get(Re.key);else for(lt=qe;lt<=Me;lt++)if(fn[lt-qe]===0&&Ss(Re,$[lt])){Fe=lt;break}Fe===void 0?ne(Re,K,X,!0):(fn[Fe-qe]=se+1,Fe>=Ht?Ht=Fe:an=!0,T(Re,$[Fe],G,null,K,X,Ce,de,ve),Ct++)}const Q=an?b_(fn):ao;for(lt=Q.length-1,se=Ft-1;se>=0;se--){const Re=qe+se,Fe=$[Re],ot=Re+1<ke?$[Re+1].el:te;fn[se]===0?T(null,Fe,G,ot,K,X,Ce,de,ve):an&&(lt<0||se!==Q[lt]?Ve(Fe,G,ot,2):lt--)}}},Ve=(N,$,G,te,K=null)=>{const{el:X,type:Ce,transition:de,children:ve,shapeFlag:se}=N;if(se&6){Ve(N.component.subTree,$,G,te);return}if(se&128){N.suspense.move($,G,te);return}if(se&64){Ce.move(N,$,G,Le);return}if(Ce===Be){r(X,$,G);for(let _e=0;_e<ve.length;_e++)Ve(ve[_e],$,G,te);r(N.anchor,$,G);return}if(Ce===_c){j(N,$,G);return}if(te!==2&&se&1&&de)if(te===0)de.beforeEnter(X),r(X,$,G),Nn(()=>de.enter(X),K);else{const{leave:_e,delayLeave:Me,afterLeave:Se}=de,qe=()=>r(X,$,G),dt=()=>{_e(X,()=>{qe(),Se&&Se()})};Me?Me(X,qe,dt):dt()}else r(X,$,G)},ne=(N,$,G,te=!1,K=!1)=>{const{type:X,props:Ce,ref:de,children:ve,dynamicChildren:se,shapeFlag:ke,patchFlag:_e,dirs:Me}=N;if(de!=null&&yc(de,null,G,N,!0),ke&256){$.ctx.deactivate(N);return}const Se=ke&1&&Me,qe=!_s(N);let dt;if(qe&&(dt=Ce&&Ce.onVnodeBeforeUnmount)&&Lr(dt,$,N),ke&6)Ae(N.component,G,te);else{if(ke&128){N.suspense.unmount(G,te);return}Se&&Ii(N,null,$,"beforeUnmount"),ke&64?N.type.remove(N,$,G,K,Le,te):se&&(X!==Be||_e>0&&_e&64)?Oe(se,$,G,!1,!0):(X===Be&&_e&384||!K&&ke&16)&&Oe(ve,$,G),te&&me(N)}(qe&&(dt=Ce&&Ce.onVnodeUnmounted)||Se)&&Nn(()=>{dt&&Lr(dt,$,N),Se&&Ii(N,null,$,"unmounted")},G)},me=N=>{const{type:$,el:G,anchor:te,transition:K}=N;if($===Be){Te(G,te);return}if($===_c){L(N);return}const X=()=>{i(G),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(N.shapeFlag&1&&K&&!K.persisted){const{leave:Ce,delayLeave:de}=K,ve=()=>Ce(G,X);de?de(N.el,X,ve):ve()}else X()},Te=(N,$)=>{let G;for(;N!==$;)G=b(N),i(N),N=G;i($)},Ae=(N,$,G)=>{const{bum:te,scope:K,update:X,subTree:Ce,um:de}=N;te&&Ba(te),K.stop(),X&&(X.active=!1,ne(Ce,N,$,G)),de&&Nn(de,$),Nn(()=>{N.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},Oe=(N,$,G,te=!1,K=!1,X=0)=>{for(let Ce=X;Ce<N.length;Ce++)ne(N[Ce],$,G,te,K)},He=N=>N.shapeFlag&6?He(N.component.subTree):N.shapeFlag&128?N.suspense.next():b(N.anchor||N.el),Xe=(N,$,G)=>{N==null?$._vnode&&ne($._vnode,null,null,!0):T($._vnode||null,N,$,null,null,null,G),Vp(),qp(),$._vnode=N},Le={p:T,um:ne,m:Ve,r:me,mt:be,mc:D,pc:ie,pbc:R,n:He,o:e};let it,mt;return t&&([it,mt]=t(Le)),{render:Xe,hydrate:it,createApp:m_(Xe,it)}}function Di({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function bc(e,t,n=!1){const r=e.children,i=t.children;if(et(r)&&et(i))for(let o=0;o<r.length;o++){const s=r[o];let l=i[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[o]=di(i[o]),l.el=s.el),n||bc(s,l)),l.type===ol&&(l.el=s.el)}}function b_(e){const t=e.slice(),n=[0];let r,i,o,s,l;const c=e.length;for(r=0;r<c;r++){const d=e[r];if(d!==0){if(i=n[n.length-1],e[i]<d){t[r]=i,n.push(r);continue}for(o=0,s=n.length-1;o<s;)l=o+s>>1,e[n[l]]<d?o=l+1:s=l;d<e[n[o]]&&(o>0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}const C_=e=>e.__isTeleport,Ts=e=>e&&(e.disabled||e.disabled===""),bh=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Cc=(e,t)=>{const n=e&&e.to;return zt(n)?t?t(n):null:n},__={__isTeleport:!0,process(e,t,n,r,i,o,s,l,c,d){const{mc:h,pc:p,pbc:b,o:{insert:y,querySelector:w,createText:T,createComment:O}}=d,I=Ts(t.props);let{shapeFlag:P,children:j,dynamicChildren:L}=t;if(e==null){const we=t.el=T(""),m=t.anchor=T("");y(we,n,r),y(m,n,r);const ce=t.target=Cc(t.props,w),D=t.targetAnchor=T("");ce&&(y(D,ce),s=s||bh(ce));const S=(R,U)=>{P&16&&h(j,R,U,i,o,s,l,c)};I?S(n,m):ce&&S(ce,D)}else{t.el=e.el;const we=t.anchor=e.anchor,m=t.target=e.target,ce=t.targetAnchor=e.targetAnchor,D=Ts(e.props),S=D?n:m,R=D?we:ce;if(s=s||bh(m),L?(b(e.dynamicChildren,L,S,i,o,s,l),bc(e,t,!0)):c||p(e,t,S,R,i,o,s,l,!1),I)D||il(t,n,we,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const U=t.target=Cc(t.props,w);U&&il(t,U,null,d,0)}else D&&il(t,m,ce,d,1)}Ch(t)},remove(e,t,n,r,{um:i,o:{remove:o}},s){const{shapeFlag:l,children:c,anchor:d,targetAnchor:h,target:p,props:b}=e;if(p&&o(h),(s||!Ts(b))&&(o(d),l&16))for(let y=0;y<c.length;y++){const w=c[y];i(w,t,n,!0,!!w.dynamicChildren)}},move:il,hydrate:w_};function il(e,t,n,{o:{insert:r},m:i},o=2){o===0&&r(e.targetAnchor,t,n);const{el:s,anchor:l,shapeFlag:c,children:d,props:h}=e,p=o===2;if(p&&r(s,t,n),(!p||Ts(h))&&c&16)for(let b=0;b<d.length;b++)i(d[b],t,n,2);p&&r(l,t,n)}function w_(e,t,n,r,i,o,{o:{nextSibling:s,parentNode:l,querySelector:c}},d){const h=t.target=Cc(t.props,c);if(h){const p=h._lpa||h.firstChild;if(t.shapeFlag&16)if(Ts(t.props))t.anchor=d(s(e),t,l(e),n,r,i,o),t.targetAnchor=p;else{t.anchor=s(e);let b=p;for(;b;)if(b=s(b),b&&b.nodeType===8&&b.data==="teleport anchor"){t.targetAnchor=b,h._lpa=t.targetAnchor&&s(t.targetAnchor);break}d(p,t,h,n,r,i,o)}Ch(t)}return t.anchor&&s(t.anchor)}const T_=__;function Ch(e){const t=e.ctx;if(t&&t.ut){let n=e.children[0].el;for(;n!==e.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",t.uid),n=n.nextSibling;t.ut()}}const Be=Symbol(void 0),ol=Symbol(void 0),fi=Symbol(void 0),_c=Symbol(void 0),xs=[];let br=null;function E(e=!1){xs.push(br=e?null:[])}function x_(){xs.pop(),br=xs[xs.length-1]||null}let ks=1;function _h(e){ks+=e}function wh(e){return e.dynamicChildren=ks>0?br||ao:null,x_(),ks>0&&br&&br.push(e),e}function B(e,t,n,r,i,o){return wh(x(e,t,n,r,i,o,!0))}function Qe(e,t,n,r,i){return wh(xe(e,t,n,r,i,!0))}function Th(e){return e?e.__v_isVNode===!0:!1}function Ss(e,t){return e.type===t.type&&e.key===t.key}const sl="__vInternal",xh=({key:e})=>e??null,al=({ref:e,ref_key:t,ref_for:n})=>e!=null?zt(e)||mn(e)||ht(e)?{i:dn,r:e,k:t,f:!!n}:e:null;function x(e,t=null,n=null,r=0,i=null,o=e===Be?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&xh(t),ref:t&&al(t),scopeId:Za,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:dn};return l?(wc(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=zt(n)?8:16),ks>0&&!s&&br&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&br.push(c),c}const xe=k_;function k_(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===nh)&&(e=fi),Th(e)){const l=Co(e,t,!0);return n&&wc(l,n),ks>0&&!o&&br&&(l.shapeFlag&6?br[br.indexOf(e)]=l:br.push(l)),l.patchFlag|=-2,l}if(N_(e)&&(e=e.__vccOpts),t){t=S_(t);let{class:l,style:c}=t;l&&!zt(l)&&(t.class=Ze(l)),Rt(c)&&(Np(c)&&!et(c)&&(c=kn({},c)),t.style=bt(c))}const s=zt(e)?1:UC(e)?128:C_(e)?64:Rt(e)?4:ht(e)?2:0;return x(e,t,n,r,i,s,o,!0)}function S_(e){return e?Np(e)||sl in e?kn({},e):e:null}function Co(e,t,n=!1){const{props:r,ref:i,patchFlag:o,children:s}=e,l=t?ll(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&xh(l),ref:t&&t.ref?n&&i?et(i)?i.concat(al(t)):[i,al(t)]:al(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Co(e.ssContent),ssFallback:e.ssFallback&&Co(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Xt(e=" ",t=0){return xe(ol,null,e,t)}function Pe(e="",t=!1){return t?(E(),Qe(fi,null,e)):xe(fi,null,e)}function Or(e){return e==null||typeof e=="boolean"?xe(fi):et(e)?xe(Be,null,e.slice()):typeof e=="object"?di(e):xe(ol,null,String(e))}function di(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Co(e)}function wc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(et(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),wc(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(sl in t)?t._ctx=dn:i===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ht(t)?(t={default:t,_ctx:dn},n=32):(t=String(t),r&64?(n=16,t=[Xt(t)]):n=8);e.children=t,e.shapeFlag|=n}function ll(...e){const t={};for(let n=0;n<e.length;n++){const r=e[n];for(const i in r)if(i==="class")t.class!==r.class&&(t.class=Ze([t.class,r.class]));else if(i==="style")t.style=bt([t.style,r.style]);else if(Na(i)){const o=t[i],s=r[i];s&&o!==s&&!(et(o)&&o.includes(s))&&(t[i]=o?[].concat(o,s):s)}else i!==""&&(t[i]=r[i])}return t}function Lr(e,t,n,r=null){yr(e,t,7,[n,r])}const A_=yh();let E_=0;function O_(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||A_,o={uid:E_++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new Jb(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ch(r,i),emitsOptions:Gp(r,i),emit:null,emitted:null,propsDefaults:Dt,inheritAttrs:r.inheritAttrs,ctx:Dt,data:Dt,props:Dt,attrs:Dt,slots:Dt,refs:Dt,setupState:Dt,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=FC.bind(null,o),e.ce&&e.ce(o),o}let Gt=null;const kh=()=>Gt||dn,_o=e=>{Gt=e,e.scope.on()},Ri=()=>{Gt&&Gt.scope.off(),Gt=null};function Sh(e){return e.vnode.shapeFlag&4}let As=!1;function L_(e,t=!1){As=t;const{props:n,children:r}=e.vnode,i=Sh(e);c_(e,n,i,t),p_(e,r);const o=i?I_(e,t):void 0;return As=!1,o}function I_(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Mp(new Proxy(e.ctx,i_));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?D_(e):null;_o(e),fo();const o=ci(r,e,0,[e.props,i]);if(po(),Ri(),pp(o)){if(o.then(Ri,Ri),t)return o.then(s=>{Ah(e,s,t)}).catch(s=>{Ya(s,e,0)});e.asyncDep=o}else Ah(e,o,t)}else Oh(e,t)}function Ah(e,t,n){ht(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=jp(t)),Oh(e,n)}let Eh;function Oh(e,t,n){const r=e.type;if(!e.render){if(!t&&Eh&&!r.render){const i=r.template||hc(e).template;if(i){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,d=kn(kn({isCustomElement:o,delimiters:l},s),c);r.render=Eh(i,d)}}e.render=r.render||mr}_o(e),fo(),o_(e),po(),Ri()}function P_(e){return new Proxy(e.attrs,{get(t,n){return Pn(e,"get","$attrs"),t[n]}})}function D_(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=P_(e))},slots:e.slots,emit:e.emit,expose:t}}function ul(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(jp(Mp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ws)return ws[n](e)},has(t,n){return n in t||n in ws}}))}function R_(e,t=!0){return ht(e)?e.displayName||e.name:e.name||t&&e.__name}function N_(e){return ht(e)&&"__vccOpts"in e}const tn=(e,t)=>IC(e,t,As),M_=Symbol(""),F_=()=>bo(M_),$_="3.2.47",B_="http://www.w3.org/2000/svg",Ni=typeof document<"u"?document:null,Lh=Ni&&Ni.createElement("template"),H_={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Ni.createElementNS(B_,e):Ni.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Ni.createTextNode(e),createComment:e=>Ni.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ni.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const s=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Lh.innerHTML=r?`<svg>${e}</svg>`:e;const l=Lh.content;if(r){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function j_(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function U_(e,t,n){const r=e.style,i=zt(n);if(n&&!i){if(t&&!zt(t))for(const o in t)n[o]==null&&Tc(r,o,"");for(const o in n)Tc(r,o,n[o])}else{const o=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=o)}}const Ih=/\s*!important$/;function Tc(e,t,n){if(et(n))n.forEach(r=>Tc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=W_(e,t);Ih.test(n)?e.setProperty(co(r),n.replace(Ih,""),"important"):e[r]=n}}const Ph=["Webkit","Moz","ms"],xc={};function W_(e,t){const n=xc[t];if(n)return n;let r=Ar(t);if(r!=="filter"&&r in e)return xc[t]=r;r=$a(r);for(let i=0;i<Ph.length;i++){const o=Ph[i]+r;if(o in e)return xc[t]=o}return t}const Dh="http://www.w3.org/1999/xlink";function K_(e,t,n,r,i){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Dh,t.slice(6,t.length)):e.setAttributeNS(Dh,t,n);else{const o=Ub(t);n==null||o&&!cp(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function V_(e,t,n,r,i,o,s){if(t==="innerHTML"||t==="textContent"){r&&s(r,i,o),e[t]=n??"";return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const c=n??"";(e.value!==c||e.tagName==="OPTION")&&(e.value=c),n==null&&e.removeAttribute(t);return}let l=!1;if(n===""||n==null){const c=typeof e[t];c==="boolean"?n=cp(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(t)}function pi(e,t,n,r){e.addEventListener(t,n,r)}function q_(e,t,n,r){e.removeEventListener(t,n,r)}function z_(e,t,n,r,i=null){const o=e._vei||(e._vei={}),s=o[t];if(r&&s)s.value=r;else{const[l,c]=G_(t);if(r){const d=o[t]=J_(r,i);pi(e,l,d,c)}else s&&(q_(e,l,s,c),o[t]=void 0)}}const Rh=/(?:Once|Passive|Capture)$/;function G_(e){let t;if(Rh.test(e)){t={};let r;for(;r=e.match(Rh);)e=e.slice(0,e.length-r[0].length),t[r[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):co(e.slice(2)),t]}let kc=0;const Y_=Promise.resolve(),X_=()=>kc||(Y_.then(()=>kc=0),kc=Date.now());function J_(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;yr(Z_(r,n.value),t,5,[r])};return n.value=e,n.attached=X_(),n}function Z_(e,t){if(et(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Nh=/^on[a-z]/,Q_=(e,t,n,r,i=!1,o,s,l,c)=>{t==="class"?j_(e,r,i):t==="style"?U_(e,n,r):Na(t)?ju(t)||z_(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):e1(e,t,r,i))?V_(e,t,r,o,s,l,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),K_(e,t,r,i))};function e1(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Nh.test(t)&&ht(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Nh.test(t)&&zt(n)?!1:t in e}const wo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return et(t)?n=>Ba(t,n):t};function t1(e){e.target.composing=!0}function Mh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ir={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=wo(i);const o=r||i.props&&i.props.type==="number";pi(e,t?"change":"input",s=>{if(s.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=ja(l)),e._assign(l)}),n&&pi(e,"change",()=>{e.value=e.value.trim()}),t||(pi(e,"compositionstart",t1),pi(e,"compositionend",Mh),pi(e,"change",Mh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},o){if(e._assign=wo(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&ja(e.value)===t))return;const s=t??"";e.value!==s&&(e.value=s)}},Fh={deep:!0,created(e,t,n){e._assign=wo(n),pi(e,"change",()=>{const r=e._modelValue,i=Os(e),o=e.checked,s=e._assign;if(et(r)){const l=Hu(r,i),c=l!==-1;if(o&&!c)s(r.concat(i));else if(!o&&c){const d=[...r];d.splice(l,1),s(d)}}else if(uo(r)){const l=new Set(r);o?l.add(i):l.delete(i),s(l)}else s(Hh(e,o))})},mounted:$h,beforeUpdate(e,t,n){e._assign=wo(n),$h(e,t,n)}};function $h(e,{value:t,oldValue:n},r){e._modelValue=t,et(t)?e.checked=Hu(t,r.props.value)>-1:uo(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=ps(t,Hh(e,!0)))}const Es={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=uo(t);pi(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?ja(Os(s)):Os(s));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=wo(r)},mounted(e,{value:t}){Bh(e,t)},beforeUpdate(e,t,n){e._assign=wo(n)},updated(e,{value:t}){Bh(e,t)}};function Bh(e,t){const n=e.multiple;if(!(n&&!et(t)&&!uo(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],s=Os(o);if(n)et(t)?o.selected=Hu(t,s)>-1:o.selected=t.has(s);else if(ps(Os(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Os(e){return"_value"in e?e._value:e.value}function Hh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const n1=["ctrl","shift","alt","meta"],r1={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)=>n1.some(n=>e[`${n}Key`]&&!t.includes(n))},gt=(e,t)=>(n,...r)=>{for(let i=0;i<t.length;i++){const o=r1[t[i]];if(o&&o(n,t))return}return e(n,...r)},Ot={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ls(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),Ls(e,!0),r.enter(e)):r.leave(e,()=>{Ls(e,!1)}):Ls(e,t))},beforeUnmount(e,{value:t}){Ls(e,t)}};function Ls(e,t){e.style.display=t?e._vod:"none"}const i1=kn({patchProp:Q_},H_);let jh;function o1(){return jh||(jh=v_(i1))}const s1=(...e)=>{const t=o1().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=a1(r);if(!i)return;const o=t._component;!ht(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const s=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function a1(e){return zt(e)?document.querySelector(e):e}/**!
|
||
* Sortable 1.15.0
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Uh(Object(n),!0).forEach(function(r){l1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cl=function(t){return typeof t}:cl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cl(e)}function l1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vr(){return Vr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vr.apply(this,arguments)}function u1(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function c1(e,t){if(e==null)return{};var n=u1(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var f1="1.15.0";function qr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var zr=qr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Is=qr(/Edge/i),Wh=qr(/firefox/i),Ps=qr(/safari/i)&&!qr(/chrome/i)&&!qr(/android/i),Kh=qr(/iP(ad|od|hone)/i),Vh=qr(/chrome/i)&&qr(/android/i),qh={capture:!1,passive:!1};function St(e,t,n){e.addEventListener(t,n,!zr&&qh)}function wt(e,t,n){e.removeEventListener(t,n,!zr&&qh)}function fl(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function d1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Pr(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&fl(e,t):fl(e,t))||r&&e===n)return e;if(e===n)break}while(e=d1(e))}return null}var zh=/\s+/g;function Vn(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(zh," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(zh," ")}}function tt(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function To(e,t){var n="";if(typeof e=="string")n=e;else do{var r=tt(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Gh(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function Dr(){var e=document.scrollingElement;return e||document.documentElement}function nn(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var o,s,l,c,d,h,p;if(e!==window&&e.parentNode&&e!==Dr()?(o=e.getBoundingClientRect(),s=o.top,l=o.left,c=o.bottom,d=o.right,h=o.height,p=o.width):(s=0,l=0,c=window.innerHeight,d=window.innerWidth,h=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!zr))do if(i&&i.getBoundingClientRect&&(tt(i,"transform")!=="none"||n&&tt(i,"position")!=="static")){var b=i.getBoundingClientRect();s-=b.top+parseInt(tt(i,"border-top-width")),l-=b.left+parseInt(tt(i,"border-left-width")),c=s+o.height,d=l+o.width;break}while(i=i.parentNode);if(r&&e!==window){var y=To(i||e),w=y&&y.a,T=y&&y.d;y&&(s/=T,l/=w,p/=w,h/=T,c=s+h,d=l+p)}return{top:s,left:l,bottom:c,right:d,width:p,height:h}}}function Yh(e,t,n){for(var r=hi(e,!0),i=nn(e)[t];r;){var o=nn(r)[n],s=void 0;if(n==="top"||n==="left"?s=i>=o:s=i<=o,!s)return r;if(r===Dr())break;r=hi(r,!1)}return!1}function xo(e,t,n,r){for(var i=0,o=0,s=e.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==nt.ghost&&(r||s[o]!==nt.dragged)&&Pr(s[o],n.draggable,e,!1)){if(i===t)return s[o];i++}o++}return null}function Sc(e,t){for(var n=e.lastElementChild;n&&(n===nt.ghost||tt(n,"display")==="none"||t&&!fl(n,t));)n=n.previousElementSibling;return n||null}function or(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==nt.clone&&(!t||fl(e,t))&&n++;return n}function Xh(e){var t=0,n=0,r=Dr();if(e)do{var i=To(e),o=i.a,s=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*s}while(e!==r&&(e=e.parentNode));return[t,n]}function p1(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n)}return-1}function hi(e,t){if(!e||!e.getBoundingClientRect)return Dr();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=tt(n);if(n.clientWidth<n.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return Dr();if(r||t)return n;r=!0}}while(n=n.parentNode);return Dr()}function h1(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Ac(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var Ds;function Jh(e,t){return function(){if(!Ds){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),Ds=setTimeout(function(){Ds=void 0},t)}}}function g1(){clearTimeout(Ds),Ds=void 0}function Zh(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Qh(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var qn="Sortable"+new Date().getTime();function m1(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(tt(i,"display")==="none"||i===nt.ghost)){e.push({target:i,rect:nn(i)});var o=Ir({},e[e.length-1].rect);if(i.thisAnimationDuration){var s=To(i,!0);s&&(o.top-=s.f,o.left-=s.e)}i.fromRect=o}})}},addAnimationState:function(r){e.push(r)},removeAnimationState:function(r){e.splice(p1(e,{target:r}),1)},animateAll:function(r){var i=this;if(!this.options.animation){clearTimeout(t),typeof r=="function"&&r();return}var o=!1,s=0;e.forEach(function(l){var c=0,d=l.target,h=d.fromRect,p=nn(d),b=d.prevFromRect,y=d.prevToRect,w=l.rect,T=To(d,!0);T&&(p.top-=T.f,p.left-=T.e),d.toRect=p,d.thisAnimationDuration&&Ac(b,p)&&!Ac(h,p)&&(w.top-p.top)/(w.left-p.left)===(h.top-p.top)/(h.left-p.left)&&(c=y1(w,b,y,i.options)),Ac(p,h)||(d.prevFromRect=h,d.prevToRect=p,c||(c=i.options.animation),i.animate(d,w,p,c)),c&&(o=!0,s=Math.max(s,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(t),o?t=setTimeout(function(){typeof r=="function"&&r()},s):typeof r=="function"&&r(),e=[]},animate:function(r,i,o,s){if(s){tt(r,"transition",""),tt(r,"transform","");var l=To(this.el),c=l&&l.a,d=l&&l.d,h=(i.left-o.left)/(c||1),p=(i.top-o.top)/(d||1);r.animatingX=!!h,r.animatingY=!!p,tt(r,"transform","translate3d("+h+"px,"+p+"px,0)"),this.forRepaintDummy=v1(r),tt(r,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),tt(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){tt(r,"transition",""),tt(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},s)}}}}function v1(e){return e.offsetWidth}function y1(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}var ko=[],Ec={initializeByDefault:!0},Rs={mount:function(t){for(var n in Ec)Ec.hasOwnProperty(n)&&!(n in t)&&(t[n]=Ec[n]);ko.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),ko.push(t)},pluginEvent:function(t,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var o=t+"Global";ko.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][o]&&n[s.pluginName][o](Ir({sortable:n},r)),n.options[s.pluginName]&&n[s.pluginName][t]&&n[s.pluginName][t](Ir({sortable:n},r)))})},initializePlugins:function(t,n,r,i){ko.forEach(function(l){var c=l.pluginName;if(!(!t.options[c]&&!l.initializeByDefault)){var d=new l(t,n,t.options);d.sortable=t,d.options=t.options,t[c]=d,Vr(r,d.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,n){var r={};return ko.forEach(function(i){typeof i.eventProperties=="function"&&Vr(r,i.eventProperties.call(n[i.pluginName],t))}),r},modifyOption:function(t,n,r){var i;return ko.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[n]=="function"&&(i=o.optionListeners[n].call(t[o.pluginName],r))}),i}};function b1(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,o=e.cloneEl,s=e.toEl,l=e.fromEl,c=e.oldIndex,d=e.newIndex,h=e.oldDraggableIndex,p=e.newDraggableIndex,b=e.originalEvent,y=e.putSortable,w=e.extraEventProperties;if(t=t||n&&n[qn],!!t){var T,O=t.options,I="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!zr&&!Is?T=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(T=document.createEvent("Event"),T.initEvent(r,!0,!0)),T.to=s||n,T.from=l||n,T.item=i||n,T.clone=o,T.oldIndex=c,T.newIndex=d,T.oldDraggableIndex=h,T.newDraggableIndex=p,T.originalEvent=b,T.pullMode=y?y.lastPutMode:void 0;var P=Ir(Ir({},w),Rs.getEventProperties(r,t));for(var j in P)T[j]=P[j];n&&n.dispatchEvent(T),O[I]&&O[I].call(t,T)}}var C1=["evt"],Mn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=c1(r,C1);Rs.pluginEvent.bind(nt)(t,n,Ir({dragEl:Ee,parentEl:Kt,ghostEl:pt,rootEl:$t,nextEl:Mi,lastDownEl:dl,cloneEl:Ut,cloneHidden:gi,dragStarted:Ms,putSortable:pn,activeSortable:nt.active,originalEvent:i,oldIndex:So,oldDraggableIndex:Ns,newIndex:zn,newDraggableIndex:mi,hideGhostForTarget:sg,unhideGhostForTarget:ag,cloneNowHidden:function(){gi=!0},cloneNowShown:function(){gi=!1},dispatchSortableEvent:function(l){An({sortable:n,name:l,originalEvent:i})}},o))};function An(e){b1(Ir({putSortable:pn,cloneEl:Ut,targetEl:Ee,rootEl:$t,oldIndex:So,oldDraggableIndex:Ns,newIndex:zn,newDraggableIndex:mi},e))}var Ee,Kt,pt,$t,Mi,dl,Ut,gi,So,zn,Ns,mi,pl,pn,Ao=!1,hl=!1,gl=[],Fi,Cr,Oc,Lc,eg,tg,Ms,Eo,Fs,$s=!1,ml=!1,vl,yn,Ic=[],Pc=!1,yl=[],bl=typeof document<"u",Cl=Kh,ng=Is||zr?"cssFloat":"float",_1=bl&&!Vh&&!Kh&&"draggable"in document.createElement("div"),rg=function(){if(bl){if(zr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),ig=function(t,n){var r=tt(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=xo(t,0,n),s=xo(t,1,n),l=o&&tt(o),c=s&&tt(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+nn(o).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+nn(s).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var p=l.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=i&&r[ng]==="none"||s&&r[ng]==="none"&&d+h>i)?"vertical":"horizontal"},w1=function(t,n,r){var i=r?t.left:t.top,o=r?t.right:t.bottom,s=r?t.width:t.height,l=r?n.left:n.top,c=r?n.right:n.bottom,d=r?n.width:n.height;return i===l||o===c||i+s/2===l+d/2},T1=function(t,n){var r;return gl.some(function(i){var o=i[qn].options.emptyInsertThreshold;if(!(!o||Sc(i))){var s=nn(i),l=t>=s.left-o&&t<=s.right+o,c=n>=s.top-o&&n<=s.bottom+o;if(l&&c)return r=i}}),r},og=function(t){function n(o,s){return function(l,c,d,h){var p=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(o==null&&(s||p))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return n(o(l,c,d,h),s)(l,c,d,h);var b=(s?l:c).options.group.name;return o===!0||typeof o=="string"&&o===b||o.join&&o.indexOf(b)>-1}}var r={},i=t.group;(!i||cl(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},sg=function(){!rg&&pt&&tt(pt,"display","none")},ag=function(){!rg&&pt&&tt(pt,"display","")};bl&&!Vh&&document.addEventListener("click",function(e){if(hl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),hl=!1,!1},!0);var $i=function(t){if(Ee){t=t.touches?t.touches[0]:t;var n=T1(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[qn]._onDragOver(r)}}},x1=function(t){Ee&&Ee.parentNode[qn]._isOutsideThisEl(t.target)};function nt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Vr({},t),e[qn]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ig(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:nt.supportPointer!==!1&&"PointerEvent"in window&&!Ps,emptyInsertThreshold:5};Rs.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);og(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:_1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?St(e,"pointerdown",this._onTapStart):(St(e,"mousedown",this._onTapStart),St(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(St(e,"dragover",this),St(e,"dragenter",this)),gl.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Vr(this,m1())}nt.prototype={constructor:nt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Eo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ee):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,o=i.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,h=i.filter;if(P1(r),!Ee&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ps&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Pr(c,i.draggable,r,!1),!(c&&c.animated)&&dl!==c)){if(So=or(c),Ns=or(c,i.draggable),typeof h=="function"){if(h.call(this,t,c,this)){An({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Mn("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(p){if(p=Pr(d,p.trim(),r,!1),p)return An({sortable:n,rootEl:p,name:"filter",targetEl:c,fromEl:r,toEl:r}),Mn("filter",n,{evt:t}),!0}),h)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Pr(d,i.handle,r,!1)||this._prepareDragStart(t,l,c)}}},_prepareDragStart:function(t,n,r){var i=this,o=i.el,s=i.options,l=o.ownerDocument,c;if(r&&!Ee&&r.parentNode===o){var d=nn(r);if($t=o,Ee=r,Kt=Ee.parentNode,Mi=Ee.nextSibling,dl=r,pl=s.group,nt.dragged=Ee,Fi={target:Ee,clientX:(n||t).clientX,clientY:(n||t).clientY},eg=Fi.clientX-d.left,tg=Fi.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ee.style["will-change"]="all",c=function(){if(Mn("delayEnded",i,{evt:t}),nt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Wh&&i.nativeDraggable&&(Ee.draggable=!0),i._triggerDragStart(t,n),An({sortable:i,name:"choose",originalEvent:t}),Vn(Ee,s.chosenClass,!0)},s.ignore.split(",").forEach(function(h){Gh(Ee,h.trim(),Dc)}),St(l,"dragover",$i),St(l,"mousemove",$i),St(l,"touchmove",$i),St(l,"mouseup",i._onDrop),St(l,"touchend",i._onDrop),St(l,"touchcancel",i._onDrop),Wh&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ee.draggable=!0),Mn("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Is||zr))){if(nt.eventCanceled){this._onDrop();return}St(l,"mouseup",i._disableDelayedDrag),St(l,"touchend",i._disableDelayedDrag),St(l,"touchcancel",i._disableDelayedDrag),St(l,"mousemove",i._delayedDragTouchMoveHandler),St(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&St(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ee&&Dc(Ee),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;wt(t,"mouseup",this._disableDelayedDrag),wt(t,"touchend",this._disableDelayedDrag),wt(t,"touchcancel",this._disableDelayedDrag),wt(t,"mousemove",this._delayedDragTouchMoveHandler),wt(t,"touchmove",this._delayedDragTouchMoveHandler),wt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?St(document,"pointermove",this._onTouchMove):n?St(document,"touchmove",this._onTouchMove):St(document,"mousemove",this._onTouchMove):(St(Ee,"dragend",this),St($t,"dragstart",this._onDragStart));try{document.selection?wl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Ao=!1,$t&&Ee){Mn("dragStarted",this,{evt:n}),this.nativeDraggable&&St(document,"dragover",x1);var r=this.options;!t&&Vn(Ee,r.dragClass,!1),Vn(Ee,r.ghostClass,!0),nt.active=this,t&&this._appendGhost(),An({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cr){this._lastX=Cr.clientX,this._lastY=Cr.clientY,sg();for(var t=document.elementFromPoint(Cr.clientX,Cr.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cr.clientX,Cr.clientY),t!==n);)n=t;if(Ee.parentNode[qn]._isOutsideThisEl(t),n)do{if(n[qn]){var r=void 0;if(r=n[qn]._onDragOver({clientX:Cr.clientX,clientY:Cr.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);ag()}},_onTouchMove:function(t){if(Fi){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,s=pt&&To(pt,!0),l=pt&&s&&s.a,c=pt&&s&&s.d,d=Cl&&yn&&Xh(yn),h=(o.clientX-Fi.clientX+i.x)/(l||1)+(d?d[0]-Ic[0]:0)/(l||1),p=(o.clientY-Fi.clientY+i.y)/(c||1)+(d?d[1]-Ic[1]:0)/(c||1);if(!nt.active&&!Ao){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(pt){s?(s.e+=h-(Oc||0),s.f+=p-(Lc||0)):s={a:1,b:0,c:0,d:1,e:h,f:p};var b="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");tt(pt,"webkitTransform",b),tt(pt,"mozTransform",b),tt(pt,"msTransform",b),tt(pt,"transform",b),Oc=h,Lc=p,Cr=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!pt){var t=this.options.fallbackOnBody?document.body:$t,n=nn(Ee,!0,Cl,!0,t),r=this.options;if(Cl){for(yn=t;tt(yn,"position")==="static"&&tt(yn,"transform")==="none"&&yn!==document;)yn=yn.parentNode;yn!==document.body&&yn!==document.documentElement?(yn===document&&(yn=Dr()),n.top+=yn.scrollTop,n.left+=yn.scrollLeft):yn=Dr(),Ic=Xh(yn)}pt=Ee.cloneNode(!0),Vn(pt,r.ghostClass,!1),Vn(pt,r.fallbackClass,!0),Vn(pt,r.dragClass,!0),tt(pt,"transition",""),tt(pt,"transform",""),tt(pt,"box-sizing","border-box"),tt(pt,"margin",0),tt(pt,"top",n.top),tt(pt,"left",n.left),tt(pt,"width",n.width),tt(pt,"height",n.height),tt(pt,"opacity","0.8"),tt(pt,"position",Cl?"absolute":"fixed"),tt(pt,"zIndex","100000"),tt(pt,"pointerEvents","none"),nt.ghost=pt,t.appendChild(pt),tt(pt,"transform-origin",eg/parseInt(pt.style.width)*100+"% "+tg/parseInt(pt.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,i=t.dataTransfer,o=r.options;if(Mn("dragStart",this,{evt:t}),nt.eventCanceled){this._onDrop();return}Mn("setupClone",this),nt.eventCanceled||(Ut=Qh(Ee),Ut.removeAttribute("id"),Ut.draggable=!1,Ut.style["will-change"]="",this._hideClone(),Vn(Ut,this.options.chosenClass,!1),nt.clone=Ut),r.cloneId=wl(function(){Mn("clone",r),!nt.eventCanceled&&(r.options.removeCloneOnHide||$t.insertBefore(Ut,Ee),r._hideClone(),An({sortable:r,name:"clone"}))}),!n&&Vn(Ee,o.dragClass,!0),n?(hl=!0,r._loopId=setInterval(r._emulateDragOver,50)):(wt(document,"mouseup",r._onDrop),wt(document,"touchend",r._onDrop),wt(document,"touchcancel",r._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(r,i,Ee)),St(document,"drop",r),tt(Ee,"transform","translateZ(0)")),Ao=!0,r._dragStartId=wl(r._dragStarted.bind(r,n,t)),St(document,"selectstart",r),Ms=!0,Ps&&tt(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,r=t.target,i,o,s,l=this.options,c=l.group,d=nt.active,h=pl===c,p=l.sort,b=pn||d,y,w=this,T=!1;if(Pc)return;function O(ie,fe){Mn(ie,w,Ir({evt:t,isOwner:h,axis:y?"vertical":"horizontal",revert:s,dragRect:i,targetRect:o,canSort:p,fromSortable:b,target:r,completed:P,onMove:function(Ve,ne){return _l($t,n,Ee,i,Ve,nn(Ve),t,ne)},changed:j},fe))}function I(){O("dragOverAnimationCapture"),w.captureAnimationState(),w!==b&&b.captureAnimationState()}function P(ie){return O("dragOverCompleted",{insertion:ie}),ie&&(h?d._hideClone():d._showClone(w),w!==b&&(Vn(Ee,pn?pn.options.ghostClass:d.options.ghostClass,!1),Vn(Ee,l.ghostClass,!0)),pn!==w&&w!==nt.active?pn=w:w===nt.active&&pn&&(pn=null),b===w&&(w._ignoreWhileAnimating=r),w.animateAll(function(){O("dragOverAnimationComplete"),w._ignoreWhileAnimating=null}),w!==b&&(b.animateAll(),b._ignoreWhileAnimating=null)),(r===Ee&&!Ee.animated||r===n&&!r.animated)&&(Eo=null),!l.dragoverBubble&&!t.rootEl&&r!==document&&(Ee.parentNode[qn]._isOutsideThisEl(t.target),!ie&&$i(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),T=!0}function j(){zn=or(Ee),mi=or(Ee,l.draggable),An({sortable:w,name:"change",toEl:n,newIndex:zn,newDraggableIndex:mi,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=Pr(r,l.draggable,n,!0),O("dragOver"),nt.eventCanceled)return T;if(Ee.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||w._ignoreWhileAnimating===r)return P(!1);if(hl=!1,d&&!l.disabled&&(h?p||(s=Kt!==$t):pn===this||(this.lastPutMode=pl.checkPull(this,d,Ee,t))&&c.checkPut(this,d,Ee,t))){if(y=this._getDirection(t,r)==="vertical",i=nn(Ee),O("dragOverValid"),nt.eventCanceled)return T;if(s)return Kt=$t,I(),this._hideClone(),O("revert"),nt.eventCanceled||(Mi?$t.insertBefore(Ee,Mi):$t.appendChild(Ee)),P(!0);var L=Sc(n,l.draggable);if(!L||E1(t,y,this)&&!L.animated){if(L===Ee)return P(!1);if(L&&n===t.target&&(r=L),r&&(o=nn(r)),_l($t,n,Ee,i,r,o,t,!!r)!==!1)return I(),L&&L.nextSibling?n.insertBefore(Ee,L.nextSibling):n.appendChild(Ee),Kt=n,j(),P(!0)}else if(L&&A1(t,y,this)){var we=xo(n,0,l,!0);if(we===Ee)return P(!1);if(r=we,o=nn(r),_l($t,n,Ee,i,r,o,t,!1)!==!1)return I(),n.insertBefore(Ee,we),Kt=n,j(),P(!0)}else if(r.parentNode===n){o=nn(r);var m=0,ce,D=Ee.parentNode!==n,S=!w1(Ee.animated&&Ee.toRect||i,r.animated&&r.toRect||o,y),R=y?"top":"left",U=Yh(r,"top","top")||Yh(Ee,"top","top"),ee=U?U.scrollTop:void 0;Eo!==r&&(ce=o[R],$s=!1,ml=!S&&l.invertSwap||D),m=O1(t,r,o,y,S?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,ml,Eo===r);var J;if(m!==0){var be=or(Ee);do be-=m,J=Kt.children[be];while(J&&(tt(J,"display")==="none"||J===pt))}if(m===0||J===r)return P(!1);Eo=r,Fs=m;var je=r.nextElementSibling,Ne=!1;Ne=m===1;var z=_l($t,n,Ee,i,r,o,t,Ne);if(z!==!1)return(z===1||z===-1)&&(Ne=z===1),Pc=!0,setTimeout(S1,30),I(),Ne&&!je?n.appendChild(Ee):r.parentNode.insertBefore(Ee,Ne?je:r),U&&Zh(U,0,ee-U.scrollTop),Kt=Ee.parentNode,ce!==void 0&&!ml&&(vl=Math.abs(ce-nn(r)[R])),j(),P(!0)}if(n.contains(Ee))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){wt(document,"mousemove",this._onTouchMove),wt(document,"touchmove",this._onTouchMove),wt(document,"pointermove",this._onTouchMove),wt(document,"dragover",$i),wt(document,"mousemove",$i),wt(document,"touchmove",$i)},_offUpEvents:function(){var t=this.el.ownerDocument;wt(t,"mouseup",this._onDrop),wt(t,"touchend",this._onDrop),wt(t,"pointerup",this._onDrop),wt(t,"touchcancel",this._onDrop),wt(document,"selectstart",this)},_onDrop:function(t){var n=this.el,r=this.options;if(zn=or(Ee),mi=or(Ee,r.draggable),Mn("drop",this,{evt:t}),Kt=Ee&&Ee.parentNode,zn=or(Ee),mi=or(Ee,r.draggable),nt.eventCanceled){this._nulling();return}Ao=!1,ml=!1,$s=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Rc(this.cloneId),Rc(this._dragStartId),this.nativeDraggable&&(wt(document,"drop",this),wt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ps&&tt(document.body,"user-select",""),tt(Ee,"transform",""),t&&(Ms&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),pt&&pt.parentNode&&pt.parentNode.removeChild(pt),($t===Kt||pn&&pn.lastPutMode!=="clone")&&Ut&&Ut.parentNode&&Ut.parentNode.removeChild(Ut),Ee&&(this.nativeDraggable&&wt(Ee,"dragend",this),Dc(Ee),Ee.style["will-change"]="",Ms&&!Ao&&Vn(Ee,pn?pn.options.ghostClass:this.options.ghostClass,!1),Vn(Ee,this.options.chosenClass,!1),An({sortable:this,name:"unchoose",toEl:Kt,newIndex:null,newDraggableIndex:null,originalEvent:t}),$t!==Kt?(zn>=0&&(An({rootEl:Kt,name:"add",toEl:Kt,fromEl:$t,originalEvent:t}),An({sortable:this,name:"remove",toEl:Kt,originalEvent:t}),An({rootEl:Kt,name:"sort",toEl:Kt,fromEl:$t,originalEvent:t}),An({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),pn&&pn.save()):zn!==So&&zn>=0&&(An({sortable:this,name:"update",toEl:Kt,originalEvent:t}),An({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),nt.active&&((zn==null||zn===-1)&&(zn=So,mi=Ns),An({sortable:this,name:"end",toEl:Kt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Mn("nulling",this),$t=Ee=Kt=pt=Mi=Ut=dl=gi=Fi=Cr=Ms=zn=mi=So=Ns=Eo=Fs=pn=pl=nt.dragged=nt.ghost=nt.clone=nt.active=null,yl.forEach(function(t){t.checked=!0}),yl.length=Oc=Lc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ee&&(this._onDragOver(t),k1(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,o=r.length,s=this.options;i<o;i++)n=r[i],Pr(n,s.draggable,this.el,!1)&&t.push(n.getAttribute(s.dataIdAttr)||I1(n));return t},sort:function(t,n){var r={},i=this.el;this.toArray().forEach(function(o,s){var l=i.children[s];Pr(l,this.options.draggable,i,!1)&&(r[o]=l)},this),n&&this.captureAnimationState(),t.forEach(function(o){r[o]&&(i.removeChild(r[o]),i.appendChild(r[o]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return Pr(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var r=this.options;if(n===void 0)return r[t];var i=Rs.modifyOption(this,t,n);typeof i<"u"?r[t]=i:r[t]=n,t==="group"&&og(r)},destroy:function(){Mn("destroy",this);var t=this.el;t[qn]=null,wt(t,"mousedown",this._onTapStart),wt(t,"touchstart",this._onTapStart),wt(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(wt(t,"dragover",this),wt(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),gl.splice(gl.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!gi){if(Mn("hideClone",this),nt.eventCanceled)return;tt(Ut,"display","none"),this.options.removeCloneOnHide&&Ut.parentNode&&Ut.parentNode.removeChild(Ut),gi=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(gi){if(Mn("showClone",this),nt.eventCanceled)return;Ee.parentNode==$t&&!this.options.group.revertClone?$t.insertBefore(Ut,Ee):Mi?$t.insertBefore(Ut,Mi):$t.appendChild(Ut),this.options.group.revertClone&&this.animate(Ee,Ut),tt(Ut,"display",""),gi=!1}}};function k1(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function _l(e,t,n,r,i,o,s,l){var c,d=e[qn],h=d.options.onMove,p;return window.CustomEvent&&!zr&&!Is?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=t,c.from=e,c.dragged=n,c.draggedRect=r,c.related=i||t,c.relatedRect=o||nn(t),c.willInsertAfter=l,c.originalEvent=s,e.dispatchEvent(c),h&&(p=h.call(d,c,s)),p}function Dc(e){e.draggable=!1}function S1(){Pc=!1}function A1(e,t,n){var r=nn(xo(n.el,0,n.options,!0)),i=10;return t?e.clientX<r.left-i||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-i||e.clientY<r.bottom&&e.clientX<r.left}function E1(e,t,n){var r=nn(Sc(n.el,n.options.draggable)),i=10;return t?e.clientX>r.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function O1(e,t,n,r,i,o,s,l){var c=r?e.clientY:e.clientX,d=r?n.height:n.width,h=r?n.top:n.left,p=r?n.bottom:n.right,b=!1;if(!s){if(l&&vl<d*i){if(!$s&&(Fs===1?c>h+d*o/2:c<p-d*o/2)&&($s=!0),$s)b=!0;else if(Fs===1?c<h+vl:c>p-vl)return-Fs}else if(c>h+d*(1-i)/2&&c<p-d*(1-i)/2)return L1(t)}return b=b||s,b&&(c<h+d*o/2||c>p-d*o/2)?c>h+d/2?1:-1:0}function L1(e){return or(Ee)<or(e)?1:-1}function I1(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function P1(e){yl.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&yl.push(r)}}function wl(e){return setTimeout(e,0)}function Rc(e){return clearTimeout(e)}bl&&St(document,"touchmove",function(e){(nt.active||Ao)&&e.cancelable&&e.preventDefault()}),nt.utils={on:St,off:wt,css:tt,find:Gh,is:function(t,n){return!!Pr(t,n,t,!1)},extend:h1,throttle:Jh,closest:Pr,toggleClass:Vn,clone:Qh,index:or,nextTick:wl,cancelNextTick:Rc,detectDirection:ig,getChild:xo},nt.get=function(e){return e[qn]},nt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(r){if(!r.prototype||!r.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(r));r.utils&&(nt.utils=Ir(Ir({},nt.utils),r.utils)),Rs.mount(r)})},nt.create=function(e,t){return new nt(e,t)},nt.version=f1;var Jt=[],Bs,Nc,Mc=!1,Fc,$c,Tl,Hs;function D1(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(n){var r=n.originalEvent;this.sortable.nativeDraggable?St(document,"dragover",this._handleAutoScroll):this.options.supportPointer?St(document,"pointermove",this._handleFallbackAutoScroll):r.touches?St(document,"touchmove",this._handleFallbackAutoScroll):St(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var r=n.originalEvent;!this.options.dragOverBubble&&!r.rootEl&&this._handleAutoScroll(r)},drop:function(){this.sortable.nativeDraggable?wt(document,"dragover",this._handleAutoScroll):(wt(document,"pointermove",this._handleFallbackAutoScroll),wt(document,"touchmove",this._handleFallbackAutoScroll),wt(document,"mousemove",this._handleFallbackAutoScroll)),lg(),xl(),g1()},nulling:function(){Tl=Nc=Bs=Mc=Hs=Fc=$c=null,Jt.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,r){var i=this,o=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(o,s);if(Tl=n,r||this.options.forceAutoScrollFallback||Is||zr||Ps){Bc(n,this.options,l,r);var c=hi(l,!0);Mc&&(!Hs||o!==Fc||s!==$c)&&(Hs&&lg(),Hs=setInterval(function(){var d=hi(document.elementFromPoint(o,s),!0);d!==c&&(c=d,xl()),Bc(n,i.options,d,r)},10),Fc=o,$c=s)}else{if(!this.options.bubbleScroll||hi(l,!0)===Dr()){xl();return}Bc(n,this.options,hi(l,!1),!1)}}},Vr(e,{pluginName:"scroll",initializeByDefault:!0})}function xl(){Jt.forEach(function(e){clearInterval(e.pid)}),Jt=[]}function lg(){clearInterval(Hs)}var Bc=Jh(function(e,t,n,r){if(t.scroll){var i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=Dr(),d=!1,h;Nc!==n&&(Nc=n,xl(),Bs=t.scroll,h=t.scrollFn,Bs===!0&&(Bs=hi(n,!0)));var p=0,b=Bs;do{var y=b,w=nn(y),T=w.top,O=w.bottom,I=w.left,P=w.right,j=w.width,L=w.height,we=void 0,m=void 0,ce=y.scrollWidth,D=y.scrollHeight,S=tt(y),R=y.scrollLeft,U=y.scrollTop;y===c?(we=j<ce&&(S.overflowX==="auto"||S.overflowX==="scroll"||S.overflowX==="visible"),m=L<D&&(S.overflowY==="auto"||S.overflowY==="scroll"||S.overflowY==="visible")):(we=j<ce&&(S.overflowX==="auto"||S.overflowX==="scroll"),m=L<D&&(S.overflowY==="auto"||S.overflowY==="scroll"));var ee=we&&(Math.abs(P-i)<=s&&R+j<ce)-(Math.abs(I-i)<=s&&!!R),J=m&&(Math.abs(O-o)<=s&&U+L<D)-(Math.abs(T-o)<=s&&!!U);if(!Jt[p])for(var be=0;be<=p;be++)Jt[be]||(Jt[be]={});(Jt[p].vx!=ee||Jt[p].vy!=J||Jt[p].el!==y)&&(Jt[p].el=y,Jt[p].vx=ee,Jt[p].vy=J,clearInterval(Jt[p].pid),(ee!=0||J!=0)&&(d=!0,Jt[p].pid=setInterval(function(){r&&this.layer===0&&nt.active._onTouchMove(Tl);var je=Jt[this.layer].vy?Jt[this.layer].vy*l:0,Ne=Jt[this.layer].vx?Jt[this.layer].vx*l:0;typeof h=="function"&&h.call(nt.dragged.parentNode[qn],Ne,je,e,Tl,Jt[this.layer].el)!=="continue"||Zh(Jt[this.layer].el,Ne,je)}.bind({layer:p}),24))),p++}while(t.bubbleScroll&&b!==c&&(b=hi(b,!1)));Mc=d}},30),ug=function(t){var n=t.originalEvent,r=t.putSortable,i=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,l=t.hideGhostForTarget,c=t.unhideGhostForTarget;if(n){var d=r||o;l();var h=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,p=document.elementFromPoint(h.clientX,h.clientY);c(),d&&!d.el.contains(p)&&(s("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function Hc(){}Hc.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,r=t.putSortable;this.sortable.captureAnimationState(),r&&r.captureAnimationState();var i=xo(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(n,i):this.sortable.el.appendChild(n),this.sortable.animateAll(),r&&r.animateAll()},drop:ug},Vr(Hc,{pluginName:"revertOnSpill"});function jc(){}jc.prototype={onSpill:function(t){var n=t.dragEl,r=t.putSortable,i=r||this.sortable;i.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),i.animateAll()},drop:ug},Vr(jc,{pluginName:"removeOnSpill"}),nt.mount(new D1),nt.mount(jc,Hc);const R1=(e,t=!1,n=!1)=>{if(e==null||e===!1||e===""||e.trim()==="")return[];e=e.replace(/,/g,","),e=e.replace(/。/g,","),e=e.replace(/、/g,","),e=e.replace(/;/g,","),e=e.replace(/./g,","),e=e.replace(/\t/g,`
|
||
`),e=e.replace(/\r/g,`
|
||
`),e=e.replace(/\n+/g,`
|
||
`);const r={"(":")","[":"]","<":">","{":"}"},i=Object.keys(r);let o=e.length,s="",l="",c="",d=0,h=[];for(let p=0;p<o;p++){const b=e[p];b===`
|
||
`?l===""?(s.trim()!==""&&h.push(s.trim()),h.push(`
|
||
`),d=0,l="",c="",s=""):s+=" ":b===","?l===""?(h.push(s.trim()),d=0,l="",c="",s=""):s+=b:l===""?i.includes(b)?(d=1,l=b,c=r[b],s+=b):b===" "&&s.trim()==="BREAK"?(h.push(s.trim()),d=0,l="",c="",s=""):(s+=b,s.endsWith(" BREAK")&&(s=s.substring(0,s.length-6),h.push(s.trim()),h.push("BREAK"),d=0,l="",c="",s="")):b===c?(d--,d===0&&(l="",c=""),s+=b):(b===l&&d++,s+=b)}return s!==""&&h.push(s.trim()),h},kl={name:"Physton/sd-webui-prompt-all-in-one",shortName:"sd-webui-prompt-all-in-one",github:"https://github.com/Physton/sd-webui-prompt-all-in-one",nameAssets:"Physton/sd-webui-prompt-all-in-one-assets",shortNameAssets:"sd-webui-prompt-all-in-one-assets",githubAssets:"https://github.com/Physton/sd-webui-prompt-all-in-one-assets",gitee:"https://gitee.com/Physton/sd-webui-prompt-all-in-one",docs:"https://aiodoc.physton.com",nameTagComplete:"DominikDoom/a1111-sd-webui-tagcomplete",shortNameTagComplete:"a1111-sd-webui-tagcomplete",githubTagComplete:"https://github.com/DominikDoom/a1111-sd-webui-tagcomplete"};function Sl(e){return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}var N1=/^\s+/,M1=/\s+$/;function De(e,t){if(e=e||"",t=t||{},e instanceof De)return e;if(!(this instanceof De))return new De(e,t);var n=F1(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}De.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},getLuminance:function(){var t=this.toRgb(),n,r,i,o,s,l;return n=t.r/255,r=t.g/255,i=t.b/255,n<=.03928?o=n/12.92:o=Math.pow((n+.055)/1.055,2.4),r<=.03928?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),i<=.03928?l=i/12.92:l=Math.pow((i+.055)/1.055,2.4),.2126*o+.7152*s+.0722*l},setAlpha:function(t){return this._a=gg(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=fg(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=fg(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this._a==1?"hsv("+n+", "+r+"%, "+i+"%)":"hsva("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=cg(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=cg(this._r,this._g,this._b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this._a==1?"hsl("+n+", "+r+"%, "+i+"%)":"hsla("+n+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return dg(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return j1(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(Bt(this._r,255)*100)+"%",g:Math.round(Bt(this._g,255)*100)+"%",b:Math.round(Bt(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Bt(this._r,255)*100)+"%, "+Math.round(Bt(this._g,255)*100)+"%, "+Math.round(Bt(this._b,255)*100)+"%)":"rgba("+Math.round(Bt(this._r,255)*100)+"%, "+Math.round(Bt(this._g,255)*100)+"%, "+Math.round(Bt(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:Q1[dg(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+pg(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=De(t);r="#"+pg(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+n+",endColorstr="+r+")"},toString:function(t){var n=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return De(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(V1,arguments)},brighten:function(){return this._applyModification(q1,arguments)},darken:function(){return this._applyModification(z1,arguments)},desaturate:function(){return this._applyModification(U1,arguments)},saturate:function(){return this._applyModification(W1,arguments)},greyscale:function(){return this._applyModification(K1,arguments)},spin:function(){return this._applyModification(G1,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(J1,arguments)},complement:function(){return this._applyCombination(Y1,arguments)},monochromatic:function(){return this._applyCombination(Z1,arguments)},splitcomplement:function(){return this._applyCombination(X1,arguments)},triad:function(){return this._applyCombination(hg,[3])},tetrad:function(){return this._applyCombination(hg,[4])}},De.fromRatio=function(e,t){if(Sl(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=js(e[r]));e=n}return De(e,t)};function F1(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=rw(e)),Sl(e)=="object"&&(Gr(e.r)&&Gr(e.g)&&Gr(e.b)?(t=$1(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Gr(e.h)&&Gr(e.s)&&Gr(e.v)?(r=js(e.s),i=js(e.v),t=H1(e.h,r,i),s=!0,l="hsv"):Gr(e.h)&&Gr(e.s)&&Gr(e.l)&&(r=js(e.s),o=js(e.l),t=B1(e.h,r,o),s=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=gg(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function $1(e,t,n){return{r:Bt(e,255)*255,g:Bt(t,255)*255,b:Bt(n,255)*255}}function cg(e,t,n){e=Bt(e,255),t=Bt(t,255),n=Bt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,s,l=(r+i)/2;if(r==i)o=s=0;else{var c=r-i;switch(s=l>.5?c/(2-r-i):c/(r+i),r){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break}o/=6}return{h:o,s,l}}function B1(e,t,n){var r,i,o;e=Bt(e,360),t=Bt(t,100),n=Bt(n,100);function s(d,h,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(h-d)*6*p:p<1/2?h:p<2/3?d+(h-d)*(2/3-p)*6:d}if(t===0)r=i=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=s(c,l,e+1/3),i=s(c,l,e),o=s(c,l,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function fg(e,t,n){e=Bt(e,255),t=Bt(t,255),n=Bt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,s,l=r,c=r-i;if(s=r===0?0:c/r,r==i)o=0;else{switch(r){case e:o=(t-n)/c+(t<n?6:0);break;case t:o=(n-e)/c+2;break;case n:o=(e-t)/c+4;break}o/=6}return{h:o,s,v:l}}function H1(e,t,n){e=Bt(e,360)*6,t=Bt(t,100),n=Bt(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),s=n*(1-i*t),l=n*(1-(1-i)*t),c=r%6,d=[n,s,o,o,l,n][c],h=[l,n,n,s,o,o][c],p=[o,o,l,n,n,s][c];return{r:d*255,g:h*255,b:p*255}}function dg(e,t,n,r){var i=[_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function j1(e,t,n,r,i){var o=[_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(n).toString(16)),_r(mg(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function pg(e,t,n,r){var i=[_r(mg(r)),_r(Math.round(e).toString(16)),_r(Math.round(t).toString(16)),_r(Math.round(n).toString(16))];return i.join("")}De.equals=function(e,t){return!e||!t?!1:De(e).toRgbString()==De(t).toRgbString()},De.random=function(){return De.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function U1(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.s-=t/100,n.s=Al(n.s),De(n)}function W1(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.s+=t/100,n.s=Al(n.s),De(n)}function K1(e){return De(e).desaturate(100)}function V1(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.l+=t/100,n.l=Al(n.l),De(n)}function q1(e,t){t=t===0?0:t||10;var n=De(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),De(n)}function z1(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.l-=t/100,n.l=Al(n.l),De(n)}function G1(e,t){var n=De(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,De(n)}function Y1(e){var t=De(e).toHsl();return t.h=(t.h+180)%360,De(t)}function hg(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=De(e).toHsl(),r=[De(e)],i=360/t,o=1;o<t;o++)r.push(De({h:(n.h+o*i)%360,s:n.s,l:n.l}));return r}function X1(e){var t=De(e).toHsl(),n=t.h;return[De(e),De({h:(n+72)%360,s:t.s,l:t.l}),De({h:(n+216)%360,s:t.s,l:t.l})]}function J1(e,t,n){t=t||6,n=n||30;var r=De(e).toHsl(),i=360/n,o=[De(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(De(r));return o}function Z1(e,t){t=t||6;for(var n=De(e).toHsv(),r=n.h,i=n.s,o=n.v,s=[],l=1/t;t--;)s.push(De({h:r,s:i,v:o})),o=(o+l)%1;return s}De.mix=function(e,t,n){n=n===0?0:n||50;var r=De(e).toRgb(),i=De(t).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return De(s)},De.readability=function(e,t){var n=De(e),r=De(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},De.isReadable=function(e,t,n){var r=De.readability(e,t),i,o;switch(o=!1,i=iw(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},De.mostReadable=function(e,t,n){var r=null,i=0,o,s,l,c;n=n||{},s=n.includeFallbackColors,l=n.level,c=n.size;for(var d=0;d<t.length;d++)o=De.readability(e,t[d]),o>i&&(i=o,r=De(t[d]));return De.isReadable(e,r,{level:l,size:c})||!s?r:(n.includeFallbackColors=!1,De.mostReadable(e,["#fff","#000"],n))};var Uc=De.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Q1=De.hexNames=ew(Uc);function ew(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function gg(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Bt(e,t){tw(e)&&(e="100%");var n=nw(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Al(e){return Math.min(1,Math.max(0,e))}function Gn(e){return parseInt(e,16)}function tw(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function nw(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _r(e){return e.length==1?"0"+e:""+e}function js(e){return e<=1&&(e=e*100+"%"),e}function mg(e){return Math.round(parseFloat(e)*255).toString(16)}function vg(e){return Gn(e)/255}var wr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Gr(e){return!!wr.CSS_UNIT.exec(e)}function rw(e){e=e.replace(N1,"").replace(M1,"").toLowerCase();var t=!1;if(Uc[e])e=Uc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=wr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=wr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=wr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=wr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=wr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=wr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=wr.hex8.exec(e))?{r:Gn(n[1]),g:Gn(n[2]),b:Gn(n[3]),a:vg(n[4]),format:t?"name":"hex8"}:(n=wr.hex6.exec(e))?{r:Gn(n[1]),g:Gn(n[2]),b:Gn(n[3]),format:t?"name":"hex"}:(n=wr.hex4.exec(e))?{r:Gn(n[1]+""+n[1]),g:Gn(n[2]+""+n[2]),b:Gn(n[3]+""+n[3]),a:vg(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=wr.hex3.exec(e))?{r:Gn(n[1]+""+n[1]),g:Gn(n[2]+""+n[2]),b:Gn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function iw(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const pe={loraRegex:/^\<lora:\s*([^\:]+)\s*(:)?\s*([0-9\.]+)?\>$/,lycoRegex:/^\<lyco:\s*([^\:]+)\s*(:)?\s*([0-9\.]+)?\>$/,weightNumRegex:/(.*):([0-9\.]+)/,weightNumRegexEN:/(.*):\s*([0-9\.]+)/,weightNumRegexCN:/(.*):\s*([0-9\.]+)/,bracketsEN:[{"(":"(",")":")"},{"[":"[","]":"]"},{"{":"{","}":"}"},{"<":"<",">":">"}],bracketsCN:[{"(":"(",")":")"},{"【":"[","】":"]"},{"《":"<","》":">"},{"「":"{","」":"}"},{"『":"{","』":"}"},{"〈":"<","〉":">"},{"﹝":"(","﹞":")"},{"﹛":"{","﹜":"}"},{"﹙":"(","﹚":")"}],replaceTag(e){return typeof e!="string"||e===""||(e=this.replaceBrackets(e),this.weightNumRegexEN.test(e)&&(e=e.replace(this.weightNumRegexEN,"$1:$2")),this.weightNumRegexCN.test(e)&&(e=e.replace(this.weightNumRegexCN,"$1:$2"))),e},replaceBrackets(e){const t=e.length;if(t===0)return e;let n={};this.bracketsCN.forEach(o=>{for(const s in o)n[s]=o[s]});let r=e[0],i=e[t-1];return typeof n[r]<"u"&&(e=n[r]+e.substring(1)),typeof n[i]<"u"&&(e=e.substring(0,t-1)+n[i]),e},hasBrackets(e){const t=e.length;if(t===0)return!1;let n=[];this.bracketsEN.forEach(o=>{let s=[];for(const l in o)s.push(l);n.push(s)}),this.bracketsCN.forEach(o=>{let s=[];for(const l in o)s.push(l);n.push(s)});let r=e[0],i=e[t-1];for(const o of n)if(o[0]===r&&o[1]===i)return o;return!1},splitTag(e){let t={left:"",value:"",right:""},n=e.match(/^([\(\<\{\[]+)(.*)$/);return!n||(t.left=n[1],e=n[2],n=e.match(/((\:[0-9\.]+)?[\)\>\}\]]+)$/),!n)?(t.value=e,t):(t.right=n[1],e=e.substring(0,e.length-t.right.length),t.value=e,t)},splitTags(e,t=!1,n=!1){return R1(e,t,n)},canTranslate(e){return!(e.trim()===""||e[0]==="<"&&e[e.length-1]===">"||/^[0-9`~!@#$%^&*()_+\-=\[\]{}\\|;:'",.\/<>?]+$/.test(e)||/^[a-zA-Z]$/.test(e))},isEnglish(e){const t=e.length;if(e[0]==="<"&&e[t-1]===">")return!0;for(let n=0;n<t;n++)if(e.charCodeAt(n)>127)return!1;return!0},canOneTranslate(e){const t=["zh_CN","zh_HK","zh_TW","ar_SA","ja_JP","ko_KR","ru_RU"];return t.push("am_ET","hy_AM","as_IN","bn_BD","ba_RU","bg_BG","prs_AF","dv_MV","el_GR","gu_IN","he_IL","hi_IN","iu_CA","kn_IN","kk_KZ","km_KH","ku_Arab_IQ","ky_KG","lo_LA","mk_MK","ml_IN","mr_IN","mn_Cyrl_MN","mn_Mong_CN","my_MM","ne_NP","or_IN","ps_AF","fa_IR","pa_Guru_IN","sr_Cyrl_RS","ta_IN","tt_Latn_RU","te_IN","th_TH","bo_CN","ti_ET","uk_UA","ur_PK","ug_Arab_CN","vi_VN"),!!t.includes(e)},isEnglishByLangCode(e,t){if(!this.canOneTranslate(t))return-1;const n=e.length;for(let r=0;r<n;r++)if(e.charCodeAt(r)>127)return 0;return 1},isSameLang(e,t){if(e===t)return!0;let n=e.toLowerCase(),r=t.toLowerCase();return n===r||(e=e.replace("-","_"),t=t.replace("-","_"),e===t)||(e=e.split("_")[0],t=t.split("_")[0],e===t)},getLang(e,t,n){return n[t]&&n[t].lang&&n[t].lang[e]?this.replaceGlobals(n[t].lang[e],t):n.en_US&&n.en_US.lang&&n.en_US.lang[e]?this.replaceGlobals(n.en_US.lang[e],"en_US"):this.replaceGlobals(e,t)},replaceGlobals(e,t){for(let n in kl){let r=kl[n];if(n==="docs")switch(t){case"zh_CN":r+="/zh-CN";break;case"zh_HK":case"zh_TW":r+="/zh-TW";break;case"ru_RU":r+="/ru";break}e=e.replace(new RegExp(`{{${n}}}`,"g"),r)}return e},escapeHtml(e){return e.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]||t)},unescapeHtml(e){return e.replace(/&|<|>|'|"/g,t=>({"&":"&","<":"<",">":">","'":"'",""":'"'})[t]||t)},getTagWeightNum(e){const t=e.match(this.weightNumRegex);let n=t?parseFloat(t[2]):0;return n=n>=0?n:0,n},getTagIncWeight(e){return this.countLayers(e,"(",")")},getTagDecWeight(e){return this.countLayers(e,"[","]")},countLayers(e,t="(",n=")"){let r=0;if(e.length<2)return r;for(;;){let i=e[0],o=e[e.length-1];if(i===t&&o===n)r++,e=e.slice(1,e.length-1);else break}return r},setLayers(e,t=0,n="(",r=")",i=""){for(;;){let o=e[0],s=e[e.length-1];if(o===n&&s===r)e=e.slice(1,e.length-1);else break}return t===0?e:n.repeat(t)+e+i+r.repeat(t)},getTranslateApiInfo(e,t){let n=!1;for(const r in t)for(const i in r.children)if(i.key===e){n=i;break}return n},isEqualTags(e,t,n=[]){if(t.length!==e.length)return!1;for(let r=0;r<e.length;r++){for(let i in e[r])if(!n.includes(i)&&t[r][i]!==e[r][i])return!1;for(let i in t[r])if(!n.includes(i)&&t[r][i]!==e[r][i])return!1}return!0},getTranslateApiItem(e,t){if(!e||e.length<=0)return{};for(let n of e)for(let r of n.children)if(r.key===t)return r;return e[0].children[0]},hideCompleteResults(e){typeof hideResults=="function"&&[100,200,300,500,1e3].forEach(n=>{setTimeout(()=>{hideResults(e)},n)})},formatTime(e,t=!0){let n=new Date(e),r=n.getFullYear(),i=n.getMonth()+1;i<10&&(i="0"+i);let o=n.getDate();o<10&&(o="0"+o);let s=n.getHours();s<10&&(s="0"+s);let l=n.getMinutes();l<10&&(l="0"+l);let c=n.getSeconds();return c<10&&(c="0"+c),t?`${r}/${i}/${o} ${s}:${l}:${c}`:`${i}/${o} ${s}:${l}:${c}`},apiUrl(){let e;return e=window.location.origin+window.location.pathname,e+=e.endsWith("/")?"":"/",e+="physton_prompt/",e},removeCSS(e,t=!0){if(!e)return;let n=null;t?n=this.gradioApp().querySelector("#"+e):n=document.querySelector("#"+e),n&&n.remove()},loadCSS(e,t="",n=!0,r=!1,i=!0){n&&this.removeCSS(t,i);let o=this.apiUrl()+"styles?file="+encodeURIComponent(e);r||(o+="&t="+new Date().getTime());let s=document.createElement("link");s.id=t,s.rel="stylesheet",s.href=o,i?this.gradioApp().appendChild(s):document.body.appendChild(s)},swapElement(e,t){let n=e.parentNode,r=t.parentNode,i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)},insertBefore(e,t){t.parentNode.insertBefore(e,t)},insertAfter(e,t){t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e)},gradioContainer:null,gradioApp(){if(this.gradioContainer)return this.gradioContainer;const e=document.getElementsByTagName("gradio-app"),t=e.length==0?null:e[0].shadowRoot;if(t){const n=t.querySelectorAll(".gradio-container");for(let r=0;r<n.length;r++){const i=n[r];if(i.querySelectorAll("#tabs").length)return i.classList.add("physton-gradio-container"),this.gradioContainer=i,i}}else return document.body.classList.add("physton-gradio-container"),this.gradioContainer=document.body,document.body},fitterInputColor(e,t="rgba(0,0,0,0)"){let n="fitterInputColor:"+e+":"+t;return localStorage[n]?localStorage[n]:!e||e===""||e==="default"||e==="none"||e==="null"||e==="undefined"||e==="false"||e==="true"||!De(e).isValid()?(localStorage[n]=t,t):(localStorage[n]=e,e)},isColorTransparent(e){let t="isColorTransparent:"+e;if(localStorage[t])return localStorage[t]==="true";let n=De(e).getAlpha()===0;return localStorage[t]=n,n},getTagsColorKey(e,t){return e+"||"+t}};var Wc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function El(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yg={exports:{}};/* @license
|
||
Papa Parse
|
||
v5.4.1
|
||
https://github.com/mholt/PapaParse
|
||
License: MIT
|
||
*/(function(e,t){(function(n,r){e.exports=r()})(Wc,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},i=!r.document&&!!r.postMessage,o=r.IS_PAPA_WORKER||!1,s={},l=0,c={parse:function(D,S){var R=(S=S||{}).dynamicTyping||!1;if(ce(R)&&(S.dynamicTypingFunction=R,R={}),S.dynamicTyping=R,S.transform=!!ce(S.transform)&&S.transform,S.worker&&c.WORKERS_SUPPORTED){var U=function(){if(!c.WORKERS_SUPPORTED)return!1;var J=(je=r.URL||r.webkitURL||null,Ne=n.toString(),c.BLOB_URL||(c.BLOB_URL=je.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",Ne,")();"],{type:"text/javascript"})))),be=new r.Worker(J),je,Ne;return be.onmessage=P,be.id=l++,s[be.id]=be}();return U.userStep=S.step,U.userChunk=S.chunk,U.userComplete=S.complete,U.userError=S.error,S.step=ce(S.step),S.chunk=ce(S.chunk),S.complete=ce(S.complete),S.error=ce(S.error),delete S.worker,void U.postMessage({input:D,config:S,workerId:U.id})}var ee=null;return c.NODE_STREAM_INPUT,typeof D=="string"?(D=function(J){return J.charCodeAt(0)===65279?J.slice(1):J}(D),ee=S.download?new p(S):new y(S)):D.readable===!0&&ce(D.read)&&ce(D.on)?ee=new w(S):(r.File&&D instanceof File||D instanceof Object)&&(ee=new b(S)),ee.stream(D)},unparse:function(D,S){var R=!1,U=!0,ee=",",J=`\r
|
||
`,be='"',je=be+be,Ne=!1,z=null,ie=!1;(function(){if(typeof S=="object"){if(typeof S.delimiter!="string"||c.BAD_DELIMITERS.filter(function(ne){return S.delimiter.indexOf(ne)!==-1}).length||(ee=S.delimiter),(typeof S.quotes=="boolean"||typeof S.quotes=="function"||Array.isArray(S.quotes))&&(R=S.quotes),typeof S.skipEmptyLines!="boolean"&&typeof S.skipEmptyLines!="string"||(Ne=S.skipEmptyLines),typeof S.newline=="string"&&(J=S.newline),typeof S.quoteChar=="string"&&(be=S.quoteChar),typeof S.header=="boolean"&&(U=S.header),Array.isArray(S.columns)){if(S.columns.length===0)throw new Error("Option columns is empty");z=S.columns}S.escapeChar!==void 0&&(je=S.escapeChar+be),(typeof S.escapeFormulae=="boolean"||S.escapeFormulae instanceof RegExp)&&(ie=S.escapeFormulae instanceof RegExp?S.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var fe=new RegExp(O(be),"g");if(typeof D=="string"&&(D=JSON.parse(D)),Array.isArray(D)){if(!D.length||Array.isArray(D[0]))return rt(null,D,Ne);if(typeof D[0]=="object")return rt(z||Object.keys(D[0]),D,Ne)}else if(typeof D=="object")return typeof D.data=="string"&&(D.data=JSON.parse(D.data)),Array.isArray(D.data)&&(D.fields||(D.fields=D.meta&&D.meta.fields||z),D.fields||(D.fields=Array.isArray(D.data[0])?D.fields:typeof D.data[0]=="object"?Object.keys(D.data[0]):[]),Array.isArray(D.data[0])||typeof D.data[0]=="object"||(D.data=[D.data])),rt(D.fields||[],D.data||[],Ne);throw new Error("Unable to serialize unrecognized input");function rt(ne,me,Te){var Ae="";typeof ne=="string"&&(ne=JSON.parse(ne)),typeof me=="string"&&(me=JSON.parse(me));var Oe=Array.isArray(ne)&&0<ne.length,He=!Array.isArray(me[0]);if(Oe&&U){for(var Xe=0;Xe<ne.length;Xe++)0<Xe&&(Ae+=ee),Ae+=Ve(ne[Xe],Xe);0<me.length&&(Ae+=J)}for(var Le=0;Le<me.length;Le++){var it=Oe?ne.length:me[Le].length,mt=!1,N=Oe?Object.keys(me[Le]).length===0:me[Le].length===0;if(Te&&!Oe&&(mt=Te==="greedy"?me[Le].join("").trim()==="":me[Le].length===1&&me[Le][0].length===0),Te==="greedy"&&Oe){for(var $=[],G=0;G<it;G++){var te=He?ne[G]:G;$.push(me[Le][te])}mt=$.join("").trim()===""}if(!mt){for(var K=0;K<it;K++){0<K&&!N&&(Ae+=ee);var X=Oe&&He?ne[K]:K;Ae+=Ve(me[Le][X],K)}Le<me.length-1&&(!Te||0<it&&!N)&&(Ae+=J)}}return Ae}function Ve(ne,me){if(ne==null)return"";if(ne.constructor===Date)return JSON.stringify(ne).slice(1,25);var Te=!1;ie&&typeof ne=="string"&&ie.test(ne)&&(ne="'"+ne,Te=!0);var Ae=ne.toString().replace(fe,je);return(Te=Te||R===!0||typeof R=="function"&&R(ne,me)||Array.isArray(R)&&R[me]||function(Oe,He){for(var Xe=0;Xe<He.length;Xe++)if(-1<Oe.indexOf(He[Xe]))return!0;return!1}(Ae,c.BAD_DELIMITERS)||-1<Ae.indexOf(ee)||Ae.charAt(0)===" "||Ae.charAt(Ae.length-1)===" ")?be+Ae+be:Ae}}};if(c.RECORD_SEP=String.fromCharCode(30),c.UNIT_SEP=String.fromCharCode(31),c.BYTE_ORDER_MARK="\uFEFF",c.BAD_DELIMITERS=["\r",`
|
||
`,'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!i&&!!r.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=I,c.ParserHandle=T,c.NetworkStreamer=p,c.FileStreamer=b,c.StringStreamer=y,c.ReadableStreamStreamer=w,r.jQuery){var d=r.jQuery;d.fn.parse=function(D){var S=D.config||{},R=[];return this.each(function(J){if(!(d(this).prop("tagName").toUpperCase()==="INPUT"&&d(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var be=0;be<this.files.length;be++)R.push({file:this.files[be],inputElem:this,instanceConfig:d.extend({},S)})}),U(),this;function U(){if(R.length!==0){var J,be,je,Ne,z=R[0];if(ce(D.before)){var ie=D.before(z.file,z.inputElem);if(typeof ie=="object"){if(ie.action==="abort")return J="AbortError",be=z.file,je=z.inputElem,Ne=ie.reason,void(ce(D.error)&&D.error({name:J},be,je,Ne));if(ie.action==="skip")return void ee();typeof ie.config=="object"&&(z.instanceConfig=d.extend(z.instanceConfig,ie.config))}else if(ie==="skip")return void ee()}var fe=z.instanceConfig.complete;z.instanceConfig.complete=function(rt){ce(fe)&&fe(rt,z.file,z.inputElem),ee()},c.parse(z.file,z.instanceConfig)}else ce(D.complete)&&D.complete()}function ee(){R.splice(0,1),U()}}}function h(D){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(S){var R=we(S);R.chunkSize=parseInt(R.chunkSize),S.step||S.chunk||(R.chunkSize=null),this._handle=new T(R),(this._handle.streamer=this)._config=R}.call(this,D),this.parseChunk=function(S,R){if(this.isFirstChunk&&ce(this._config.beforeFirstChunk)){var U=this._config.beforeFirstChunk(S);U!==void 0&&(S=U)}this.isFirstChunk=!1,this._halted=!1;var ee=this._partialLine+S;this._partialLine="";var J=this._handle.parse(ee,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var be=J.meta.cursor;this._finished||(this._partialLine=ee.substring(be-this._baseIndex),this._baseIndex=be),J&&J.data&&(this._rowCount+=J.data.length);var je=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)r.postMessage({results:J,workerId:c.WORKER_ID,finished:je});else if(ce(this._config.chunk)&&!R){if(this._config.chunk(J,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);J=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(J.data),this._completeResults.errors=this._completeResults.errors.concat(J.errors),this._completeResults.meta=J.meta),this._completed||!je||!ce(this._config.complete)||J&&J.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),je||J&&J.meta.paused||this._nextChunk(),J}this._halted=!0},this._sendError=function(S){ce(this._config.error)?this._config.error(S):o&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:S,finished:!1})}}function p(D){var S;(D=D||{}).chunkSize||(D.chunkSize=c.RemoteChunkSize),h.call(this,D),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(R){this._input=R,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(S=new XMLHttpRequest,this._config.withCredentials&&(S.withCredentials=this._config.withCredentials),i||(S.onload=m(this._chunkLoaded,this),S.onerror=m(this._chunkError,this)),S.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var R=this._config.downloadRequestHeaders;for(var U in R)S.setRequestHeader(U,R[U])}if(this._config.chunkSize){var ee=this._start+this._config.chunkSize-1;S.setRequestHeader("Range","bytes="+this._start+"-"+ee)}try{S.send(this._config.downloadRequestBody)}catch(J){this._chunkError(J.message)}i&&S.status===0&&this._chunkError()}},this._chunkLoaded=function(){S.readyState===4&&(S.status<200||400<=S.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:S.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(R){var U=R.getResponseHeader("Content-Range");return U===null?-1:parseInt(U.substring(U.lastIndexOf("/")+1))}(S),this.parseChunk(S.responseText)))},this._chunkError=function(R){var U=S.statusText||R;this._sendError(new Error(U))}}function b(D){var S,R;(D=D||{}).chunkSize||(D.chunkSize=c.LocalChunkSize),h.call(this,D);var U=typeof FileReader<"u";this.stream=function(ee){this._input=ee,R=ee.slice||ee.webkitSlice||ee.mozSlice,U?((S=new FileReader).onload=m(this._chunkLoaded,this),S.onerror=m(this._chunkError,this)):S=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var ee=this._input;if(this._config.chunkSize){var J=Math.min(this._start+this._config.chunkSize,this._input.size);ee=R.call(ee,this._start,J)}var be=S.readAsText(ee,this._config.encoding);U||this._chunkLoaded({target:{result:be}})},this._chunkLoaded=function(ee){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(ee.target.result)},this._chunkError=function(){this._sendError(S.error)}}function y(D){var S;h.call(this,D=D||{}),this.stream=function(R){return S=R,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var R,U=this._config.chunkSize;return U?(R=S.substring(0,U),S=S.substring(U)):(R=S,S=""),this._finished=!S,this.parseChunk(R)}}}function w(D){h.call(this,D=D||{});var S=[],R=!0,U=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(ee){this._input=ee,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){U&&S.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),S.length?this.parseChunk(S.shift()):R=!0},this._streamData=m(function(ee){try{S.push(typeof ee=="string"?ee:ee.toString(this._config.encoding)),R&&(R=!1,this._checkIsFinished(),this.parseChunk(S.shift()))}catch(J){this._streamError(J)}},this),this._streamError=m(function(ee){this._streamCleanUp(),this._sendError(ee)},this),this._streamEnd=m(function(){this._streamCleanUp(),U=!0,this._streamData("")},this),this._streamCleanUp=m(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function T(D){var S,R,U,ee=Math.pow(2,53),J=-ee,be=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,je=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ne=this,z=0,ie=0,fe=!1,rt=!1,Ve=[],ne={data:[],errors:[],meta:{}};if(ce(D.step)){var me=D.step;D.step=function(Le){if(ne=Le,Oe())Ae();else{if(Ae(),ne.data.length===0)return;z+=Le.data.length,D.preview&&z>D.preview?R.abort():(ne.data=ne.data[0],me(ne,Ne))}}}function Te(Le){return D.skipEmptyLines==="greedy"?Le.join("").trim()==="":Le.length===1&&Le[0].length===0}function Ae(){return ne&&U&&(Xe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),U=!1),D.skipEmptyLines&&(ne.data=ne.data.filter(function(Le){return!Te(Le)})),Oe()&&function(){if(!ne)return;function Le(mt,N){ce(D.transformHeader)&&(mt=D.transformHeader(mt,N)),Ve.push(mt)}if(Array.isArray(ne.data[0])){for(var it=0;Oe()&&it<ne.data.length;it++)ne.data[it].forEach(Le);ne.data.splice(0,1)}else ne.data.forEach(Le)}(),function(){if(!ne||!D.header&&!D.dynamicTyping&&!D.transform)return ne;function Le(mt,N){var $,G=D.header?{}:[];for($=0;$<mt.length;$++){var te=$,K=mt[$];D.header&&(te=$>=Ve.length?"__parsed_extra":Ve[$]),D.transform&&(K=D.transform(K,te)),K=He(te,K),te==="__parsed_extra"?(G[te]=G[te]||[],G[te].push(K)):G[te]=K}return D.header&&($>Ve.length?Xe("FieldMismatch","TooManyFields","Too many fields: expected "+Ve.length+" fields but parsed "+$,ie+N):$<Ve.length&&Xe("FieldMismatch","TooFewFields","Too few fields: expected "+Ve.length+" fields but parsed "+$,ie+N)),G}var it=1;return!ne.data.length||Array.isArray(ne.data[0])?(ne.data=ne.data.map(Le),it=ne.data.length):ne.data=Le(ne.data,0),D.header&&ne.meta&&(ne.meta.fields=Ve),ie+=it,ne}()}function Oe(){return D.header&&Ve.length===0}function He(Le,it){return mt=Le,D.dynamicTypingFunction&&D.dynamicTyping[mt]===void 0&&(D.dynamicTyping[mt]=D.dynamicTypingFunction(mt)),(D.dynamicTyping[mt]||D.dynamicTyping)===!0?it==="true"||it==="TRUE"||it!=="false"&&it!=="FALSE"&&(function(N){if(be.test(N)){var $=parseFloat(N);if(J<$&&$<ee)return!0}return!1}(it)?parseFloat(it):je.test(it)?new Date(it):it===""?null:it):it;var mt}function Xe(Le,it,mt,N){var $={type:Le,code:it,message:mt};N!==void 0&&($.row=N),ne.errors.push($)}this.parse=function(Le,it,mt){var N=D.quoteChar||'"';if(D.newline||(D.newline=function(te,K){te=te.substring(0,1048576);var X=new RegExp(O(K)+"([^]*?)"+O(K),"gm"),Ce=(te=te.replace(X,"")).split("\r"),de=te.split(`
|
||
`),ve=1<de.length&&de[0].length<Ce[0].length;if(Ce.length===1||ve)return`
|
||
`;for(var se=0,ke=0;ke<Ce.length;ke++)Ce[ke][0]===`
|
||
`&&se++;return se>=Ce.length/2?`\r
|
||
`:"\r"}(Le,N)),U=!1,D.delimiter)ce(D.delimiter)&&(D.delimiter=D.delimiter(Le),ne.meta.delimiter=D.delimiter);else{var $=function(te,K,X,Ce,de){var ve,se,ke,_e;de=de||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var Me=0;Me<de.length;Me++){var Se=de[Me],qe=0,dt=0,lt=0;ke=void 0;for(var Ct=new I({comments:Ce,delimiter:Se,newline:K,preview:10}).parse(te),Ft=0;Ft<Ct.data.length;Ft++)if(X&&Te(Ct.data[Ft]))lt++;else{var an=Ct.data[Ft].length;dt+=an,ke!==void 0?0<an&&(qe+=Math.abs(an-ke),ke=an):ke=an}0<Ct.data.length&&(dt/=Ct.data.length-lt),(se===void 0||qe<=se)&&(_e===void 0||_e<dt)&&1.99<dt&&(se=qe,ve=Se,_e=dt)}return{successful:!!(D.delimiter=ve),bestDelimiter:ve}}(Le,D.newline,D.skipEmptyLines,D.comments,D.delimitersToGuess);$.successful?D.delimiter=$.bestDelimiter:(U=!0,D.delimiter=c.DefaultDelimiter),ne.meta.delimiter=D.delimiter}var G=we(D);return D.preview&&D.header&&G.preview++,S=Le,R=new I(G),ne=R.parse(S,it,mt),Ae(),fe?{meta:{paused:!0}}:ne||{meta:{paused:!1}}},this.paused=function(){return fe},this.pause=function(){fe=!0,R.abort(),S=ce(D.chunk)?"":S.substring(R.getCharIndex())},this.resume=function(){Ne.streamer._halted?(fe=!1,Ne.streamer.parseChunk(S,!0)):setTimeout(Ne.resume,3)},this.aborted=function(){return rt},this.abort=function(){rt=!0,R.abort(),ne.meta.aborted=!0,ce(D.complete)&&D.complete(ne),S=""}}function O(D){return D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function I(D){var S,R=(D=D||{}).delimiter,U=D.newline,ee=D.comments,J=D.step,be=D.preview,je=D.fastMode,Ne=S=D.quoteChar===void 0||D.quoteChar===null?'"':D.quoteChar;if(D.escapeChar!==void 0&&(Ne=D.escapeChar),(typeof R!="string"||-1<c.BAD_DELIMITERS.indexOf(R))&&(R=","),ee===R)throw new Error("Comment character same as delimiter");ee===!0?ee="#":(typeof ee!="string"||-1<c.BAD_DELIMITERS.indexOf(ee))&&(ee=!1),U!==`
|
||
`&&U!=="\r"&&U!==`\r
|
||
`&&(U=`
|
||
`);var z=0,ie=!1;this.parse=function(fe,rt,Ve){if(typeof fe!="string")throw new Error("Input must be a string");var ne=fe.length,me=R.length,Te=U.length,Ae=ee.length,Oe=ce(J),He=[],Xe=[],Le=[],it=z=0;if(!fe)return Ht();if(D.header&&!rt){var mt=fe.split(U)[0].split(R),N=[],$={},G=!1;for(var te in mt){var K=mt[te];ce(D.transformHeader)&&(K=D.transformHeader(K,te));var X=K,Ce=$[K]||0;for(0<Ce&&(G=!0,X=K+"_"+Ce),$[K]=Ce+1;N.includes(X);)X=X+"_"+Ce;N.push(X)}if(G){var de=fe.split(U);de[0]=N.join(R),fe=de.join(U)}}if(je||je!==!1&&fe.indexOf(S)===-1){for(var ve=fe.split(U),se=0;se<ve.length;se++){if(Le=ve[se],z+=Le.length,se!==ve.length-1)z+=U.length;else if(Ve)return Ht();if(!ee||Le.substring(0,Ae)!==ee){if(Oe){if(He=[],lt(Le.split(R)),fn(),ie)return Ht()}else lt(Le.split(R));if(be&&be<=se)return He=He.slice(0,be),Ht(!0)}}return Ht()}for(var ke=fe.indexOf(R,z),_e=fe.indexOf(U,z),Me=new RegExp(O(Ne)+O(S),"g"),Se=fe.indexOf(S,z);;)if(fe[z]!==S)if(ee&&Le.length===0&&fe.substring(z,z+Ae)===ee){if(_e===-1)return Ht();z=_e+Te,_e=fe.indexOf(U,z),ke=fe.indexOf(R,z)}else if(ke!==-1&&(ke<_e||_e===-1))Le.push(fe.substring(z,ke)),z=ke+me,ke=fe.indexOf(R,z);else{if(_e===-1)break;if(Le.push(fe.substring(z,_e)),an(_e+Te),Oe&&(fn(),ie))return Ht();if(be&&He.length>=be)return Ht(!0)}else for(Se=z,z++;;){if((Se=fe.indexOf(S,Se+1))===-1)return Ve||Xe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:He.length,index:z}),Ft();if(Se===ne-1)return Ft(fe.substring(z,Se).replace(Me,S));if(S!==Ne||fe[Se+1]!==Ne){if(S===Ne||Se===0||fe[Se-1]!==Ne){ke!==-1&&ke<Se+1&&(ke=fe.indexOf(R,Se+1)),_e!==-1&&_e<Se+1&&(_e=fe.indexOf(U,Se+1));var qe=Ct(_e===-1?ke:Math.min(ke,_e));if(fe.substr(Se+1+qe,me)===R){Le.push(fe.substring(z,Se).replace(Me,S)),fe[z=Se+1+qe+me]!==S&&(Se=fe.indexOf(S,z)),ke=fe.indexOf(R,z),_e=fe.indexOf(U,z);break}var dt=Ct(_e);if(fe.substring(Se+1+dt,Se+1+dt+Te)===U){if(Le.push(fe.substring(z,Se).replace(Me,S)),an(Se+1+dt+Te),ke=fe.indexOf(R,z),Se=fe.indexOf(S,z),Oe&&(fn(),ie))return Ht();if(be&&He.length>=be)return Ht(!0);break}Xe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:He.length,index:z}),Se++}}else Se++}return Ft();function lt(Q){He.push(Q),it=z}function Ct(Q){var Re=0;if(Q!==-1){var Fe=fe.substring(Se+1,Q);Fe&&Fe.trim()===""&&(Re=Fe.length)}return Re}function Ft(Q){return Ve||(Q===void 0&&(Q=fe.substring(z)),Le.push(Q),z=ne,lt(Le),Oe&&fn()),Ht()}function an(Q){z=Q,lt(Le),Le=[],_e=fe.indexOf(U,z)}function Ht(Q){return{data:He,errors:Xe,meta:{delimiter:R,linebreak:U,aborted:ie,truncated:!!Q,cursor:it+(rt||0)}}}function fn(){J(Ht()),He=[],Xe=[]}},this.abort=function(){ie=!0},this.getCharIndex=function(){return z}}function P(D){var S=D.data,R=s[S.workerId],U=!1;if(S.error)R.userError(S.error,S.file);else if(S.results&&S.results.data){var ee={abort:function(){U=!0,j(S.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:L,resume:L};if(ce(R.userStep)){for(var J=0;J<S.results.data.length&&(R.userStep({data:S.results.data[J],errors:S.results.errors,meta:S.results.meta},ee),!U);J++);delete S.results}else ce(R.userChunk)&&(R.userChunk(S.results,ee,S.file),delete S.results)}S.finished&&!U&&j(S.workerId,S.results)}function j(D,S){var R=s[D];ce(R.userComplete)&&R.userComplete(S),R.terminate(),delete s[D]}function L(){throw new Error("Not implemented.")}function we(D){if(typeof D!="object"||D===null)return D;var S=Array.isArray(D)?[]:{};for(var R in D)S[R]=we(D[R]);return S}function m(D,S){return function(){D.apply(S,arguments)}}function ce(D){return typeof D=="function"}return o&&(r.onmessage=function(D){var S=D.data;if(c.WORKER_ID===void 0&&S&&(c.WORKER_ID=S.workerId),typeof S.input=="string")r.postMessage({workerId:c.WORKER_ID,results:c.parse(S.input,S.config),finished:!0});else if(r.File&&S.input instanceof File||S.input instanceof Object){var R=c.parse(S.input,S.config);R&&r.postMessage({workerId:c.WORKER_ID,results:R,finished:!0})}}),(p.prototype=Object.create(h.prototype)).constructor=p,(b.prototype=Object.create(h.prototype)).constructor=b,(y.prototype=Object.create(y.prototype)).constructor=y,(w.prototype=Object.create(h.prototype)).constructor=w,c})})(yg);var ow=yg.exports;const sw=El(ow),Tr={props:{languageCode:{type:String,default:"en_US"},languages:{type:Object,default:()=>{}},translateApis:{type:Array,default:()=>[]},translateApi:{type:String,default:""},translateApiConfig:{type:Object},tagCompleteFile:{type:String,default:""},onlyCsvOnAuto:{type:Boolean,default:!1},groupTagsTranslate:{type:Boolean,default:!0},groupTagsTranslateCache:{type:Object,default:()=>({toEn:new Map,toLocal:new Map})}},data(){return{cancelMultiTranslate:!1,globals:kl}},computed:{langName(){for(const e in this.languages){const t=this.languages[e];if(t.code===this.languageCode)return t.name}return item.name}},methods:{getLang(e){return pe.getLang(e,this.languageCode,this.languages)},replaceGlobals(e){return pe.replaceGlobals(e,this.languageCode)},getCSV(e=null,t=!1){return window.tagCompleteFileCache=window.tagCompleteFileCache||{},window.tagCompleteFileLoading=window.tagCompleteFileLoading||{},new Promise((n,r)=>{if(e=e||this.tagCompleteFile,!t&&window.tagCompleteFileCache[e]){n(window.tagCompleteFileCache[e]);return}if(window.tagCompleteFileLoading[e]){const s=setInterval(()=>{window.tagCompleteFileLoading[e]||(clearInterval(s),n(window.tagCompleteFileCache[e]))},100);return}window.tagCompleteFileLoading[e]=!0;let i={toEn:new Map,toLocal:new Map},o=(s,l)=>{[s,s.replace(/\_/g," "),s.replace(/\-/g," ")].forEach(d=>i.toLocal.set(d,l)),i.toEn.set(l,s)};if(!e&&typeof translations=="object"&&translations instanceof Map){translations.forEach((s,l)=>{o(l,s)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,n(i);return}if(!e){window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,r(this.getLang("not_found_csv_file"));return}this.gradioAPI.getCSV(e).then(s=>{s=sw.parse(s,{header:!1,skipEmptyLines:!0}),s.data.forEach(l=>{if(l.length<2)return;let c=l[0].trim(),d=l[1].trim();c===""||d===""||o(c,d)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,n(i)}).catch(s=>{window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,s.response&&s.response.status===404?r(this.getLang("not_found_csv_file")):r(s.message)})})},async translateToLocalByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return e=e.trim().toLowerCase(),r.toLocal.has(e)?r.toLocal.get(e):""},async translateToEnByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return e=e.trim().toLowerCase(),r.toEn.has(e)?r.toEn.get(e):""},async translateToLocalByGroupTags(e){return e=e.trim().toLowerCase(),this.groupTagsTranslateCache.toLocal.has(e)?this.groupTagsTranslateCache.toLocal.get(e).join(" / "):""},async translateToEnByGroupTags(e){return e=e.trim().toLowerCase(),this.groupTagsTranslateCache.toEn.has(e)?this.groupTagsTranslateCache.toEn.get(e):""}}},Bi=Number.isNaN||window.isNaN,aw=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,lw=/\.\d*(?:0|9){10}\d*$/,bg=(e,t=1e11)=>lw.test(String(e))?Math.round(e*t)/t:e,uw=Rn({name:"VueNumberInput",props:{attrs:{type:Object,default:void 0},center:Boolean,controls:Boolean,disabled:Boolean,inputtable:{type:Boolean,default:!0},inline:Boolean,max:{type:Number,default:1/0},min:{type:Number,default:-1/0},name:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:Boolean,rounded:Boolean,size:{type:String,default:void 0},step:{type:Number,default:1},modelValue:{type:Number,default:NaN}},emits:["update:modelValue"],data(){return{value:NaN}},computed:{increasable(){return Bi(this.value)||this.value<this.max},decreasable(){return Bi(this.value)||this.value>this.min}},watch:{modelValue:{immediate:!0,handler(e,t){!(Bi(e)&&typeof t>"u")&&e!==this.value&&this.setValue(e)}}},methods:{isNaN:Bi,change(e){this.setValue(e.target.value)},paste(e){const t=e.clipboardData||window.clipboardData;t&&!aw.test(t.getData("text"))&&e.preventDefault()},decrease(){if(this.decreasable){let{value:e}=this;Bi(e)&&(e=0),this.setValue(bg(e-this.step))}},increase(){if(this.increasable){let{value:e}=this;Bi(e)&&(e=0),this.setValue(bg(e+this.step))}},setValue(e){const t=this.value;let n=typeof e!="number"?parseFloat(e):e;Bi(n)||(this.min<=this.max&&(n=Math.min(this.max,Math.max(this.min,n))),this.rounded&&(n=Math.round(n))),this.value=n,n===t&&(this.$refs.input.value=String(n)),this.$emit("update:modelValue",n,t)}}}),En=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},cw=["disabled"],fw=["name","value","min","max","step","readonly","disabled","placeholder"],dw=["disabled"];function pw(e,t,n,r,i,o){return E(),B("div",{class:Ze(["vue-number-input",{"vue-number-input--inline":e.inline,"vue-number-input--center":e.center,"vue-number-input--controls":e.controls,[`vue-number-input--${e.size}`]:e.size}])},[e.controls?(E(),B("button",{key:0,class:"vue-number-input__button vue-number-input__button--minus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.decreasable,onClick:t[0]||(t[0]=gt((...s)=>e.decrease&&e.decrease(...s),["prevent"]))},null,8,cw)):Pe("",!0),x("input",ll({ref:"input",class:"vue-number-input__input"},e.attrs,{type:"number",name:e.name,value:isNaN(e.value)?"":e.value,min:e.min,max:e.max,step:e.step,readonly:e.readonly||!e.inputtable,disabled:e.disabled||!e.decreasable&&!e.increasable,placeholder:e.placeholder,autocomplete:"off",onChange:t[1]||(t[1]=(...s)=>e.change&&e.change(...s)),onPaste:t[2]||(t[2]=(...s)=>e.paste&&e.paste(...s))}),null,16,fw),e.controls?(E(),B("button",{key:1,class:"vue-number-input__button vue-number-input__button--plus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.increasable,onClick:t[3]||(t[3]=gt((...s)=>e.increase&&e.increase(...s),["prevent"]))},null,8,dw)):Pe("",!0)],2)}const hw=En(uw,[["render",pw]]),gw={data(){return{autocompleteResults:null,showAppendList:!1,appendListStyle:{top:0,left:0},appendListSelected:null,appendListChildSelected:null,appendList:[{type:"wrap",name:"line_break_character",icon:"wrap",children:[]}],favorites:[],autoInputPrompt:"disabled",autoInputPromptKey:""}},computed:{appendListChildItemTags(){return this.appendListSelected===null?[]:this.appendListChildSelected===null?[]:this.appendList[this.appendListSelected].type!=="favorite"&&this.appendList[this.appendListSelected].type!=="history"?[]:this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags}},mounted(){this.initAutoInputPrompt(),[{name:"txt2img",type:"prompt",key:"txt2img",neg:!1},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",neg:!0},{name:"img2img",type:"prompt",key:"img2img",neg:!1},{name:"img2img",type:"negative_prompt",key:"img2img_neg",neg:!0}].forEach(t=>{t.neg===this.neg&&this.appendList.push({type:"favorite",name:["favorite",t.name],icon:"favorite",key:t.key,dataKey:"favorite."+t.key,children:[]})})},methods:{onUnfoldClick(){this.hidePanel&&this.$nextTick(()=>{this.onResize()}),this.$emit("update:hidePanel",!this.hidePanel)},onTranslatesToLocalClick(){if(this.tags.length===0)return;if(this.loading.all_local){this.cancelMultiTranslate=!0,this.loading.all_local=!1;return}this.loading.all_local=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);return this.translates(e,!0,!0).finally(()=>{this.loading.all_local=!1,this.updateTags()})},onTranslatesToEnglishClick(){if(this.tags.length===0)return;if(this.loading.all_en){this.cancelMultiTranslate=!0,this.loading.all_en=!1;return}this.loading.all_en=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);this.translates(e,!1,!0).finally(()=>{this.loading.all_en=!1,this.updateTags()})},onCopyAllTagsClick(){this.copy(this.prompt)},onDeleteAllTagsClick(){confirm(this.getLang("delete_all_keywords_confirm"))&&(this.tags=[],this.updateTags())},appendListItemName(e){let t=[];if(typeof e.name=="object")for(let n of e.name)t.push(this.getLang(n));else t=[this.getLang(e.name)];return t.join(" / ")},onAppendTagFocus(e){if(this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""){this.appendListStyle={top:e.target.offsetTop+e.target.offsetHeight+"px",left:e.target.offsetLeft+"px"},this.appendListSelected=null,this.appendListChildSelected=null,this.showAppendList=!0;let t=[];this.appendList.forEach(n=>{typeof n.dataKey=="string"&&t.push(n.dataKey)}),this.gradioAPI.getDatas(t).then(n=>{this.appendList.forEach(r=>{typeof r.dataKey=="string"&&(r.children=n[r.dataKey]||[],r.children.reverse())})})}this._setTextareaFocus()},onAppendTagBlur(e){setTimeout(()=>{this.showAppendList=!1},300)},selectAppendList(e=!0){this.appendList.length!==0&&(this.appendListSelected===null?this.appendListSelected=0:e?(this.appendListSelected++,this.appendListSelected>=this.appendList.length&&(this.appendListSelected=0)):(this.appendListSelected--,this.appendListSelected<0&&(this.appendListSelected=this.appendList.length-1)),this.appendListChildSelected=null)},selectAppendListChild(e=!0){this.appendList.length!==0&&this.appendListSelected!==null&&this.appendList[this.appendListSelected].children.length!==0&&(this.appendListChildSelected===null?this.appendListChildSelected=0:e?(this.appendListChildSelected++,this.appendListChildSelected>=this.appendList[this.appendListSelected].children.length&&(this.appendListChildSelected=0)):(this.appendListChildSelected--,this.appendListChildSelected<0&&(this.appendListChildSelected=this.appendList[this.appendListSelected].children.length-1)),this.scrollAppendListChild())},scrollAppendListChild(){this.appendListSelected!==null&&(this.appendListChildSelected===0||this.appendListChildSelected===null?this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop=0:this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({behavior:"smooth",block:"center"}))},onAppendTagKeyDown(e,t=null){if(!(e.keyCode===38||e.keyCode===40))if(e.keyCode===13){if(this.getAutocompleteResults()&&this.autocompleteResults.style.display==="block"&&this.getAutocompleteResultsSelected()){let r=this.getAutocompleteResultsSelectedText();setTimeout(()=>{t=this.$refs.promptTagAppend.value,r?t=r:(r=this.getAutocompleteResultsSelectedText(),r&&(t=r)),this.onAppendTagKeyDown(e,t)},300);return}let n=this.$refs.promptTagAppend.value;if(this.$refs.promptTagAppend.value="",this.showAppendList=!0,console.log(n,t),t)n=n.replace(/\s*,\s*$/,"").trim(),pe.hasBrackets(n)&&(n=pe.replaceBrackets(n)),this._appendTag(n,t),this.updateTags();else{pe.hasBrackets(n)?(n=pe.replaceBrackets(n),n=[n]):n=pe.splitTags(n,this.autoBreakBeforeWrap,this.autoBreakAfterWrap);let r=[];n.forEach(i=>{let o=-1;i===`
|
||
`?o=this._appendTag(`
|
||
`,`
|
||
`,!1,-1,"wrap"):o=this._appendTag(i),o!==-1&&r.push(o)}),this.updatePrompt(),this.autoTranslateToEnglish||this.autoTranslateToLocal?this.$nextTick(()=>{let i=!(this.tagCompleteFile&&this.onlyCsvOnAuto);this.autoTranslateToEnglish?this.translates(r,!1,i).finally(()=>{this.updateTags()}):this.autoTranslateToLocal&&this.translates(r,!0,i).finally(()=>{this.updateTags()})}):this.updateTags()}}else this.removeAutocompleteResultsSelected()},onAppendTagKeyUp(e){this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""?(this.$refs.promptTagAppend.value="",this.showAppendList=!0,e.keyCode===38||e.keyCode===40?this.appendListChildSelected===null?this.selectAppendList(e.keyCode===40):this.selectAppendListChild(e.keyCode===40):e.keyCode===37||e.keyCode===39?this.appendListSelected!==null&&(e.keyCode===37?(this.appendListChildSelected=null,this.scrollAppendListChild()):this.appendList[this.appendListSelected].children.length===0?this.appendListChildSelected=null:(this.appendListChildSelected=0,this.scrollAppendListChild())):e.keyCode===13&&(this._appendTagByList(),this.scrollAppendListChild(),this.appendListSelected=null,this.appendListChildSelected=null)):this.showAppendList=!1},onAppendGroupClick(e,t,n){if(e!==null){if(this.appendListSelected=e,t===null){if(this.appendList[this.appendListSelected].children.length>0)return}else this.appendListChildSelected=t;this._appendTagByList()}},onAppendListChildMouseLeave(e,t,n){this.appendListSelected=null,this.appendListChildSelected=null},onAppendListChildMouseEnter(e,t,n){this.appendListSelected=e,this.appendListChildSelected=t},_appendTagByList(){if(this.appendListSelected===null)return;const e=this.appendList[this.appendListSelected];let t=null;e.children.length>0&&this.appendListChildSelected!==null&&(t=e.children[this.appendListChildSelected]);let n=[];switch(e.type){case"wrap":n.push({value:`
|
||
`,localValue:`
|
||
`,disabled:!1,type:"wrap"});break;case"lora":break;case"favorite":case"history":t&&t.tags.forEach(r=>{n.push({value:r.value,localValue:r.localValue,disabled:r.disabled,type:r.type||"text"})});break}n.length<=0||(n.forEach(r=>{this._appendTag(r.value,r.localValue,r.disabled,-1,r.type)}),this.updateTags())},getAutocompleteResults(){if(!this.autocompleteResults){const e=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteResults");e&&(this.autocompleteResults=e,this.autocompleteResults.getAttribute("data-mousemove")!=="true"&&(this.autocompleteResults.setAttribute("data-mousemove","true"),this.autocompleteResults.addEventListener("mousemove",t=>{this.bindAutocompleteResultsClick()})))}return this.autocompleteResults},removeAutocompleteResultsSelected(){const e=this.getAutocompleteResults();return e?(e.querySelectorAll("li").forEach(t=>{t.classList.remove("selected")}),!0):!1},getAutocompleteResultsSelected(){const e=this.getAutocompleteResults();if(!e)return null;const t=e.querySelector("li.selected");return t||null},getAutocompleteResultsSelectedText(e=null){if(!e&&(e=this.getAutocompleteResultsSelected(),!e))return null;const r=e.querySelector(".acListItem").innerText.match(/\[(.+?)\]/);return r?r[1]:null},bindAutocompleteResultsClick(){if(this.getAutocompleteResults(),!this.autocompleteResults)return;this.autocompleteResults.querySelectorAll("li").forEach(t=>{t.getAttribute("physton-on-clicked")!=="true"&&(t.setAttribute("physton-on-clicked","true"),t.addEventListener("click",()=>{this.onAutocompleteResultsClicked(t)}))})},onAutocompleteResultsClicked(e){const t=this.getAutocompleteResultsSelectedText(e);setTimeout(()=>{let n=this.$refs.promptTagAppend.value.replace(/,\s*$/,"");this.$refs.promptTagAppend.value="",n=n.replace(/\s*,\s*$/,"").trim(),pe.hasBrackets(n)&&(n=pe.replaceBrackets(n)),this._appendTag(n,t),this.updateTags()},300)},onSettingBoxMouseEnter(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[]},getCurrentTypeFavorites(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[];let e=[];return this.favorites.forEach(t=>{if(this.neg){if(t.type!=="negative_prompt")return}else if(t.type!=="prompt")return;e.push(t)}),e},onAutoInputPromptChange(){this.gradioAPI.setData(this.autoInputPromptKey,this.autoInputPrompt).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},initAutoInputPrompt(){this.autoInputPromptKey="autoInputPrompt-"+this.name,this.gradioAPI.getData(this.autoInputPromptKey).then(e=>{if(e!==null)if(this.autoInputPrompt=e,this.autoInputPrompt==="last")this.gradioAPI.getLatestHistory(this.historyKey).then(t=>{this.useHistory(t)});else{const t=()=>{if(typeof window.phystonPromptfavorites=="object"&&window.phystonPromptfavorites.length>0){for(let n of window.phystonPromptfavorites)for(let r of n.list)if(r.id===this.autoInputPrompt){this.useFavorite(r);return}return}setTimeout(t,100)};setTimeout(t,100)}})}}},mw={data(){return{dropStartX:0,dropStartY:0,dropEndX:0,dropEndY:0,dropOffsetX:0,dropOffsetY:0,dropIsSelecting:!1,dropIsStart:!1,dropIsEnd:!1,dropArea:{top:0,left:0,width:0,height:0},dropTags:[],dropTimeId:0}},methods:{_dropOver(){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!1,this.dropTags=[];for(let e=0;e<this.$refs.promptTagsList.children.length;e++){let t=this.$refs.promptTagsList.children[e];t.style.display==="none"&&(t.style.display=""),t.classList.remove("drop-selected")}},onDropMouseDown(e){this.droping||(this._dropOver(),this.dropOffsetX=e.clientX-e.layerX,this.dropOffsetY=e.clientY-e.layerY,this.dropStartX=e.clientX-this.dropOffsetX,this.dropStartY=e.clientY-this.dropOffsetY,this.dropEndX=e.clientX-this.dropOffsetX,this.dropEndY=e.clientY-this.dropOffsetY,this.dropIsStart=!0)},onDropMouseMove(e){if(this.dropIsStart){this.dropIsSelecting=!0,this.dropEndX=e.clientX-this.dropOffsetX,this.dropEndY=e.clientY-this.dropOffsetY;let t=Math.min(this.dropStartX,this.dropEndX),n=Math.min(this.dropStartY,this.dropEndY),r=Math.abs(this.dropStartX-this.dropEndX),i=Math.abs(this.dropStartY-this.dropEndY);t=Math.max(t,0),n=Math.max(n,0),r=Math.min(r,this.$refs.promptTags.clientWidth-t),i=Math.min(i,this.$refs.promptTags.clientHeight-n),this.dropArea.top=n,this.dropArea.left=t,this.dropArea.width=r,this.dropArea.height=i,this.dropTimeId&&clearTimeout(this.dropTimeId),this.dropTimeId=setTimeout(this.dropSelectItems,10)}},dropSelectItems(){this.dropTimeId&&clearTimeout(this.dropTimeId);let e=[];for(let t=0;t<this.$refs.promptTagsList.children.length;t++){let n=this.$refs.promptTagsList.children[t];if(!n.classList.contains("prompt-tag"))continue;let r=n.offsetLeft,i=n.offsetTop,o=n.clientWidth,s=n.clientHeight,l=r+o,c=i+s;!(l<this.dropArea.left||c<this.dropArea.top||r>this.dropArea.left+this.dropArea.width||i>this.dropArea.top+this.dropArea.height)?(e.push(n.getAttribute("data-id")),n.classList.add("drop-selected")):n.classList.remove("drop-selected"),this.dropTags=e}},onDropMouseUp(e){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!0,this.$refs.dropSelectBtns.style.left=this.$refs.dropSelectBox.style.left,this.$refs.dropSelectBtns.style.top=this.$refs.dropSelectBox.style.top},_getDropTags(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.find(r=>r.id===t);n&&e.push(n)}),e},_getDropIndexes(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.findIndex(r=>r.id===t);n!==-1&&e.push(n)}),e},_getDropTagsEle(){let e=[];return this.dropTags.forEach(t=>{let n=this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id="${t}"]`);n&&e.push(n)}),e},onDropCopy(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.copy(t)},onDropFavorite(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.gradioAPI.pushFavorite(this.favoriteKey,e,t,"").then(n=>{n?(this.$toastr.success(this.getLang("success")),this.$emit("refreshFavorites",this.favoriteKey)):this.$toastr.error(this.getLang("failed"))}).catch(n=>{this.$toastr.error(this.getLang("failed"))})},onDropDisable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!0}),this.updateTags()},onDropEnable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!1}),this.updateTags()},onDropDelete(){let e=this._getDropIndexes();this._dropOver(),e.sort((t,n)=>n-t),e.forEach(t=>{this.tags.splice(t,1)}),this.updateTags()}}};var Kc="__autosizeInputGhost",vw={" ":"nbsp","<":"lt",">":"gt"};function yw(e){return"&"+vw[e]+";"}function bw(e){return e.replace(/\s|<|>/g,yw)}function Cw(){var e=document.createElement("div");return e.id=Kc,e.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",document.body.appendChild(e),e}var _w=function(e,t){var n=window.getComputedStyle(e),r="box-sizing:"+n.boxSizing+";border-left:"+n.borderLeftWidth+" solid red;border-right:"+n.borderRightWidth+" solid red;font-family:"+n.fontFamily+";font-feature-settings:"+n.fontFeatureSettings+";font-kerning:"+n.fontKerning+";font-size:"+n.fontSize+";font-stretch:"+n.fontStretch+";font-style:"+n.fontStyle+";font-variant:"+n.fontVariant+";font-variant-caps:"+n.fontVariantCaps+";font-variant-ligatures:"+n.fontVariantLigatures+";font-variant-numeric:"+n.fontVariantNumeric+";font-weight:"+n.fontWeight+";letter-spacing:"+n.letterSpacing+";margin-left:"+n.marginLeft+";margin-right:"+n.marginRight+";padding-left:"+n.paddingLeft+";padding-right:"+n.paddingRight+";text-indent:"+n.textIndent+";text-transform:"+n.textTransform;function i(){var s=e.value||e.getAttribute("placeholder")||"",l=document.getElementById(Kc)||Cw();l.style.cssText+=r,l.innerHTML=bw(s);var c=window.getComputedStyle(l).width;return e.style.width=c,c}e.addEventListener("input",i);var o=i();return t&&t.minWidth&&o!=="0px"&&(e.style.minWidth=o),function(){e.removeEventListener("input",i);var s=document.getElementById(Kc);s&&s.parentNode.removeChild(s)}};const ww=El(_w),Tw={data(){return{tagClickTimeId:0}},mounted(){pe.gradioApp().addEventListener("mousemove",()=>{this.$refs.highlightPrompt.hide()})},methods:{_setTag(e){if(typeof e.type=="string"&&e.type==="wrap")e.weightNum=1,e.incWeight=0,e.decWeight=0;else if(e.weightNum=pe.getTagWeightNum(e.value),e.weightNum=e.weightNum<=0?1:e.weightNum,e.incWeight=pe.getTagIncWeight(e.value),e.decWeight=pe.getTagDecWeight(e.value),e.originalValue=e.value,!e.isLora&&!e.isLyco&&!e.isEmbedding){let t=e.value;const n=pe.hasBrackets(t);(n[0]==="("&&n[1]===")"||n[0]==="["&&n[1]==="]")&&(t=pe.setLayers(t,0,n[0],n[1]),e.originalValue=t.replace(pe.weightNumRegex,"$1"))}this._setTagClass(e),this.$nextTick(()=>{this._setTagHeight(e)})},_setTagHeight(e){let t=10,n=setInterval(()=>{if(t--,t<=0&&clearInterval(n),!this.$refs["promptTagValue-"+e.id]||!this.$refs["promptTagValue-"+e.id][0])return!1;clearInterval(n);let r=this.$refs["promptTagValue-"+e.id][0],i=r.offsetHeight;r.parentNode.style.height=i+"px",this.$refs["promptTagEdit-"+e.id]&&(this.$refs["promptTagEdit-"+e.id][0].style.height=i+"px"),this.$refs["promptTagDelete-"+e.id]&&(this.$refs["promptTagDelete-"+e.id][0].style.height=i+"px")},50)},_getTagType(e){},_setTagClass(e){if(e.isLora=!1,e.loraExists=!1,e.isLyco=!1,e.lycoExists=!1,e.isEmbedding=!1,!(typeof e.type=="string"&&e.type==="wrap")){const n=e.value.match(pe.loraRegex);if(n){e.isLora=!0;const r=this.loraExists(n[1]);r!==!1&&(e.loraExists=!0,e.loraName=r)}if(!e.isLora){const r=e.value.match(pe.lycoRegex);if(r){e.isLyco=!0;const i=this.lycoExists(r[1]);i!==!1&&(e.lycoExists=!0,e.lycoName=i)}}if(!e.isLora&&!e.isLyco){const r=this.embeddingExists(e.value);if(r!==!1)e.isEmbedding=!0,e.value=r,e.embeddingName=r;else{const i=this.embeddingExists(e.originalValue);i!==!1&&(e.isEmbedding=!0,e.embeddingName=i)}}}let t=["prompt-tag-value"];return e.isLora?(t.push("lora-tag"),e.loraExists||t.push("lora-not-exists")):e.isLyco?(t.push("lyco-tag"),e.lycoExists||t.push("lyco-not-exists")):e.isEmbedding?t.push("embedding-tag"):this.neg&&t.push("neg-tag"),e.classes=t,t},_setTagById(e,t=null,n=null){let r=this.tags.find(i=>i.id===e);return r?(t!==null&&(r.value=t),n!==null&&(r.localValue=n),r):!1},_isTagBlacklist(e){if(typeof e.type=="string"&&e.type==="wrap")return!1;if(e.isLora){if(this.blacklist.lora&&this.blacklist.lora.includes(e.loraName))return!0}else if(e.isLyco){if(this.blacklist.lycoris&&this.blacklist.lycoris.includes(e.lycoName))return!0}else if(e.isEmbedding){if(this.blacklist.embedding&&this.blacklist.embedding.includes(e.embeddingName))return!0}else if(this.neg){if(this.blacklist.negative_prompt&&this.blacklist.negative_prompt.includes(e.originalValue))return!0}else if(this.blacklist.prompt&&this.blacklist.prompt.includes(e.originalValue))return!0;return!1},_appendTag(e,t="",n=!1,r=-1,i="text"){if(e==="")return-1;const o=Date.now()+(Math.random()*1e6).toFixed(0);let s={id:o,value:e==null||e===!1?"":e,localValue:t==null||t===!1?"":t,disabled:n,type:i};return this._setTag(s),this._isTagBlacklist(s)?-1:(r>=0?this.tags.splice(r,0,s):r=this.tags.push(s),this.$nextTick(()=>{this.$refs["promptTagEdit-"+o]&&ww(this.$refs["promptTagEdit-"+o][0])}),r-1)},renderTag(e){let t=this.tags.find(r=>r.id===e);if(!t)return"";let n=t.value;if(n==="BREAK"&&(this.autoBreakBeforeWrap||this.autoBreakAfterWrap))n='<div class="break-character">---------------------</div> <div class="character">BREAK</div> <div class="break-character">---------------------</div>';else if(n=pe.escapeHtml(n),t.incWeight>0){n=pe.setLayers(n,0,"(",")"),n='<div class="character">'+n+"</div>";let r='<div class="weight-character">'+"(".repeat(t.incWeight)+"</div>",i='<div class="weight-character">'+")".repeat(t.incWeight)+"</div>";n=r+n+i}else if(t.decWeight>0){n=pe.setLayers(n,0,"[","]"),n='<div class="character">'+n+"</div>";let r='<div class="weight-character">'+"[".repeat(t.decWeight)+"</div>",i='<div class="weight-character">'+"]".repeat(t.decWeight)+"</div>";n=r+n+i}else n='<div class="character">'+n+"</div>";return n},isFavorite(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;if(typeof window.phystonPromptfavorites=="object"){for(const n of window.phystonPromptfavorites)if(n.key===this.favoriteKey){for(const r of n.list)if(r.tags.length===1&&r.tags[0].value===t.value)return r.id}}return!1},onTagMouseEnter(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;t.isFavorite=this.isFavorite(t.id)},onTagMouseMove(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.$refs.highlightPrompt.show(t)},onTagClick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.tagClickTimeId&&clearTimeout(this.tagClickTimeId),this.tagClickTimeId=setTimeout(()=>{this.editing={},this.editing[t.id]=!0,this.$forceUpdate(),this.$nextTick(()=>{const n=this.$refs["promptTagEdit-"+t.id][0];n.focus(),n.dispatchEvent(new Event("input"))}),clearTimeout(this.tagClickTimeId)},250)},onTagDblclick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;clearTimeout(this.tagClickTimeId),this.onDisabledTagClick(t.id)},onTagInputBlur(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.editing[t.id]=!1},onTagInputKeyDown(e,t){if(t.keyCode===13){let n=this.tags.find(r=>r.id===e);if(!n)return!1;this.editing[n.id]=!1,n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())}},onTagInputChange(e,t){let n=this.tags.find(r=>r.id===e);if(!n)return!1;n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())},onTagWeightNumChange(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return!1;if(t=typeof t=="number"||typeof a=="string"?t:t.target.value,n.weightNum==t)return;let r=t,i=n.value,o=n.localValue;if(r>0){if(r===1&&!this.autoKeepWeightOne){const s=pe.hasBrackets(i);s[0]==="("&&s[1]===")"&&(i=pe.setLayers(i,0,s[0],s[1]),o!==""&&(o=pe.setLayers(o,0,s[0],s[1]))),i=i.replace(pe.weightNumRegex,"$1"),o!==""&&(o=o.replace(pe.weightNumRegex,"$1"))}else{if(!pe.weightNumRegex.test(i)){let s=pe.hasBrackets(i);s?(i=pe.setLayers(i,1,s[0],s[1],":"+r),o!==""&&(o=pe.setLayers(o,1,s[0],s[1],":"+r))):(i=i+":"+r,o!==""&&(o=o+":"+r))}pe.hasBrackets(i)||(i=pe.setLayers(i,1,"(",")"),o!==""&&(o=pe.setLayers(o,1,"(",")")))}i!==n.value&&(n.value=i,o!==""&&(n.localValue=o),this._setTag(n))}else{const s=pe.hasBrackets(i);s[0]==="<"&&s[1]===">"?r=.1:this.autoKeepWeightZero?(n.value=i.replace(pe.weightNumRegex,"$1:0"),o!==""&&(n.localValue=n.localValue.replace(pe.weightNumRegex,"$1:0"))):(n.value=i.replace(pe.weightNumRegex,"$1"),o!==""&&(n.localValue=n.localValue.replace(pe.weightNumRegex,"$1")))}n.weightNum=r,this.updateTags()},onDeleteTagClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return!1;let n=this.tags.indexOf(t);this.tags.splice(n,1),this.updateTags()},onFavoriteTagClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return!1;let n=this.isFavorite(t.id);n?this.gradioAPI.unFavorite(this.favoriteKey,n).then(r=>{r&&(t.isFavorite=!1,this.$emit("refreshFavorites",this.favoriteKey))}):this.gradioAPI.pushFavorite(this.favoriteKey,[t],t.value,t.localValue===""?t.value:t.localValue).then(r=>{r&&(t.isFavorite=!0,this.$emit("refreshFavorites",this.favoriteKey))})},onDisabledTagClick(e){let t=this.tags.find(n=>n.id===e);t&&(t.disabled=!t.disabled,this.updateTags())},onIncWeightClick(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return;let r=n.value,i=n.localValue;r=pe.setLayers(r,0,"[","]"),i!==""&&(i=pe.setLayers(i,0,"[","]"));let o=n.incWeight;o+=t,o<0&&(o=0),n.incWeight=o,n.decWeight=0,r=pe.setLayers(r,o,"(",")"),i!==""&&(i=pe.setLayers(i,o,"(",")")),n.value=r,i!==""&&(n.localValue=i),this.updateTags()},onDecWeightClick(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return;let r=n.value,i=n.localValue;r=pe.setLayers(r,0,"(",")"),i!==""&&(i=pe.setLayers(i,0,"(",")"));let o=n.decWeight;o+=t,o<0&&(o=0),n.incWeight=0,n.decWeight=o,r=pe.setLayers(r,o,"[","]"),i!==""&&(i=pe.setLayers(i,o,"[","]")),n.value=r,i!==""&&(n.localValue=i),this.updateTags()},onWrapTagClick(e){let t=this.tags.find(o=>o.id===e);if(!t)return;let n=this.tags.indexOf(t),r=this._appendTag(`
|
||
`,`
|
||
`,!1,-1,"wrap"),i=this.tags[r];this.tags.splice(r,1),this.tags.splice(n+1,0,i),this.updateTags()},onTranslateToLocalClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_local"]||this.translates([n],!0,!0).finally(()=>{this.updateTags()})},onTranslateToEnglishClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_en"]||this.translates([n],!1,!0).finally(()=>{this.updateTags()})}}},xw={data(){return{groupTagsActive:"",subGroupTagsActive:""}},watch:{groupTags:{handler(){(!this.groupTagsActive||!this.subGroupTagsActive)&&(this.groupTagsActive="favorite",this.subGroupTagsActive="favorite-"+this.favoriteKey),this._setGroupTagItemWidth()},deep:!0,immediate:!0},favorites:{handler(){},deep:!0,immediate:!0}},methods:{activeGroupTab(e){e==="favorite"?(this.groupTagsActive="favorite",this.subGroupTagsActive="favorite-"+this.favoriteKey,e=0):(this.groupTagsActive=this.groupTags[e].tabKey,this.subGroupTagsActive=this.groupTags[e].groups[0].tabKey,e+=1);let t=this.$refs.groupTabsHeader.children[e].offsetLeft-this.$refs.groupTabsHeader.offsetWidth/2+this.$refs.groupTabsHeader.children[e].offsetWidth/2;this.$refs.groupTabsHeader.scrollTo({left:t,behavior:"smooth"}),this._setGroupTagItemWidth()},activeSubGroupTab(e,t){e==="favorite"?this.subGroupTagsActive="favorite-"+t:this.subGroupTagsActive=this.groupTags[e].groups[t].tabKey,this._setGroupTagItemWidth()},_setGroupTagItemWidth(){this.$nextTick(()=>{if(!this.$refs.groupTagItem)return;this.$refs.groupTagItem.forEach((t,n)=>{t.style.width="auto"});let e=0;this.$refs.groupTagItem.forEach((t,n)=>{e=Math.max(e,t.offsetWidth)}),e>0&&this.$refs.groupTagItem.forEach((t,n)=>{t.style.width=e+"px"})})},onClickHideGroupTags(){this.$emit("update:hideGroupTags",!this.hideGroupTags)},onClickGroupTag(e,t){this._appendTag(t,e,!1,-1,"text"),this.updateTags()},onClickGroupTagFavorite(e){e.tags.forEach(t=>{this._appendTag(t.value,t.localValue,t.disabled,-1,t.type)}),this.updateTags()},getGroupTagTooltip(e,t){let n="";return e&&e!==t&&(n+=e+"<br/>"),n+=t,n},getGroupTagStyle(e,t){let n={},r=pe.getTagsColorKey(e,t),i="";return this.groupTagsColor[r]&&(i=this.groupTagsColor[r],pe.isColorTransparent(i)&&(i="")),i&&(n={background:i}),n},getTagsColorKey(e,t){return pe.getTagsColorKey(e,t)},onTagsColorChange(e){this.$emit("update:groupTagsColor",this.groupTagsColor)},onClickResetTagsColor(e){for(let t of this.groupTags)for(let n of t.groups){if(n.type&&n.typ=="wrap")continue;let r=pe.getTagsColorKey(t.name,n.name);e===r&&(this.groupTagsColor[e]=Et(pe.fitterInputColor(n.color)))}this.onTagsColorChange(e)},onClickClearTagsColor(e){this.groupTagsColor[e]=Et("rgba(0,0,0,0)"),this.onTagsColorChange(e)},getTagColorStyle(e){if(e.isLora||e.isLyco||e.isEmbedding)return{};if(!this.groupTagsColorKeyCache[e.value])return{};let t=this.groupTagsColorKeyCache[e.value];if(!this.groupTagsColor[t])return{};let n=this.groupTagsColor[t];return pe.isColorTransparent(n)?{}:{background:n}}}},kw={name:"IconSvg",props:{name:{type:String,required:!0},svgName:{type:String,default:""}},data(){return{svgCode:""}},watch:{name:{handler:function(e,t){this.getSvg()},immediate:!1}},mounted(){this.getSvg()},methods:{getSvg(){if(!this.name)return;let e=this.svgName||this.name;if(window.loadingSvg=window.loadingSvg||{},window.isLoadSvg=window.isLoadSvg||{},window.isLoadSvg[e]){this.svgCode=localStorage.getItem("iconSVG-"+e);return}if(localStorage.getItem("iconSVG-"+e)&&(this.svgCode=localStorage.getItem("iconSVG-"+e)),window.loadingSvg[e]){const t=setInterval(()=>{window.loadingSvg[e]||(clearInterval(t),this.svgCode=localStorage.getItem("iconSVG-"+e))},10);return}window.loadingSvg[e]=!0,window.iconSvgHash||(window.iconSvgHash=new Date().getTime()),this.gradioAPI.styles("icons/"+e+".svg",window.iconSvgHash).then(t=>{this.svgCode=t,localStorage.setItem("iconSVG-"+e,t),window.isLoadSvg[e]=!0,window.loadingSvg[e]=!1}).catch(t=>{window.loadingSvg[e]=!1})}}},Sw=["innerHTML"];function Aw(e,t,n,r,i,o){return ye((E(),B("div",{class:Ze(["icon-svg","icon-svg-"+n.name]),"data-name":"name",innerHTML:i.svgCode},null,10,Sw)),[[Ot,i.svgCode]])}const sr=En(kw,[["render",Aw]]),Ew={name:"HighlightPrompt",props:{textarea:{type:Object,required:!0},hideDefaultInput:{type:Boolean,default:!1}},data(){return{scrollTop:0,showTimeId:0,hideTimeId:0,lastHighLightTag:null}},watch:{},mounted(){},methods:{show(e){this.lastHighLightTag&&this.lastHighLightTag.value===e.value||(this.lastHighLightTag=e,this.showTimeId&&clearTimeout(this.showTimeId),this.showTimeId=setTimeout(()=>{this._show(e),this.showTimeId=0},10))},_show(e){if(this.hideDefaultInput)return this._hide();if(typeof e.type=="string"&&e.type==="wrap")return this._hide();let t=e.value,n=this.textarea.value;if(t===""||t.trim()==="")return this._hide();if(n===""||n.trim()==="")return this._hide();if(t=pe.escapeHtml(t),n=pe.escapeHtml(this.textarea.value),n.indexOf(t)===-1)return this._hide();this.textarea.parentNode.insertBefore(this.$refs.highlightPrompt,this.textarea.nextSibling);const i=window.getComputedStyle(this.textarea);for(const l of i)this.$refs.highlightPrompt.style[l]=i[l];this.$refs.highlightPrompt.style.display="block",this.textarea.style.display="none";let o="",s=n;for(;;){const l=s.indexOf(t);if(l===-1){o+=s;break}const c=l+t.length;o+=s.substring(0,l),o+='<span class="physton-highlight-prompt">',o+=s.substring(l,c),o+="</span>",s=s.substring(c)}this.$refs.highlightPrompt.innerHTML=o,this.$refs.highlightPrompt.scrollTop=this.scrollTop},hide(){this.lastHighLightTag=null,this.showTimeId&&clearTimeout(this.showTimeId),this.hideTimeId&&clearTimeout(this.hideTimeId),this.hideTimeId=setTimeout(()=>{this._hide(),this.hideTimeId=0},10)},_hide(){this.textarea.style.display="block",this.$refs.highlightPrompt.style.display="none",this.scrollTop=this.textarea.scrollTop}}};function Ow(e,t,n,r,i,o){return E(),B("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:t[0]||(t[0]=(...s)=>o.hide&&o.hide(...s))},null,512)}const Lw=En(Ew,[["render",Ow]]);function Iw(e){return vp()?(Qb(e),!0):!1}function Us(e){return typeof e=="function"?e():Hp(e)}const Cg=typeof window<"u",Ws=()=>{},Pw=Dw();function Dw(){var e;return Cg&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function _g(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const wg=e=>e();function Rw(e,t={}){let n,r,i=Ws;const o=l=>{clearTimeout(l),i(),i=Ws};return l=>{const c=Us(e),d=Us(t.maxWait);return n&&o(n),c<=0||d!==void 0&&d<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((h,p)=>{i=t.rejectOnCancel?p:h,d&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,h(l())},d)),n=setTimeout(()=>{r&&o(r),r=null,h(l())},c)})}}function Nw(e=wg){const t=Et(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:ec(t),pause:n,resume:r,eventFilter:i}}function Hi(e,t=200,n={}){return _g(Rw(t,n),e)}function Oo(e,t=!0){kh()?lc(e):t?e():Xa(e)}var Tg=Object.getOwnPropertySymbols,Mw=Object.prototype.hasOwnProperty,Fw=Object.prototype.propertyIsEnumerable,$w=(e,t)=>{var n={};for(var r in e)Mw.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tg)for(var r of Tg(e))t.indexOf(r)<0&&Fw.call(e,r)&&(n[r]=e[r]);return n};function Bw(e,t,n={}){const r=n,{eventFilter:i=wg}=r,o=$w(r,["eventFilter"]);return rr(e,_g(i,t),o)}var Hw=Object.defineProperty,jw=Object.defineProperties,Uw=Object.getOwnPropertyDescriptors,Ol=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Sg=(e,t,n)=>t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ww=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Sg(e,n,t[n]);if(Ol)for(var n of Ol(t))kg.call(t,n)&&Sg(e,n,t[n]);return e},Kw=(e,t)=>jw(e,Uw(t)),Vw=(e,t)=>{var n={};for(var r in e)xg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ol)for(var r of Ol(e))t.indexOf(r)<0&&kg.call(e,r)&&(n[r]=e[r]);return n};function qw(e,t,n={}){const r=n,{eventFilter:i}=r,o=Vw(r,["eventFilter"]),{eventFilter:s,pause:l,resume:c,isActive:d}=Nw(i);return{stop:Bw(e,t,Kw(Ww({},o),{eventFilter:s})),pause:l,resume:c,isActive:d}}function bn(e,t,n){return rr(e,(r,i,o)=>{r&&t(r,i,o)},n)}function Ks(e){var t;const n=Us(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Vs=Cg?window:void 0;function qs(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Vs):[t,n,r,i]=e,!t)return Ws;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(h=>h()),o.length=0},l=(h,p,b,y)=>(h.addEventListener(p,b,y),()=>h.removeEventListener(p,b,y)),c=rr(()=>[Ks(t),Us(i)],([h,p])=>{s(),h&&o.push(...n.flatMap(b=>r.map(y=>l(h,b,y,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Iw(d),d}let Ag=!1;function zw(e,t,n={}){const{window:r=Vs,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return;Pw&&!Ag&&(Ag=!0,Array.from(r.document.body.children).forEach(b=>b.addEventListener("click",Ws)),r.document.documentElement.addEventListener("click",Ws));let l=!0;const c=b=>i.some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(w=>w===b.target||b.composedPath().includes(w));{const w=Ks(y);return w&&(b.target===w||b.composedPath().includes(w))}}),h=[qs(r,"click",b=>{const y=Ks(e);if(!(!y||y===b.target||b.composedPath().includes(y))){if(b.detail===0&&(l=!c(b)),!l){l=!0;return}t(b)}},{passive:!0,capture:o}),qs(r,"pointerdown",b=>{const y=Ks(e);y&&(l=!b.composedPath().includes(y)&&!c(b))},{passive:!0}),s&&qs(r,"blur",b=>{setTimeout(()=>{var y;const w=Ks(e);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(w!=null&&w.contains(r.document.activeElement))&&t(b)},0)})].filter(Boolean);return()=>h.forEach(b=>b())}const Ll=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il="__vueuse_ssr_handlers__",Gw=Yw();function Yw(){return Il in Ll||(Ll[Il]=Ll[Il]||{}),Ll[Il]}function Xw(e,t){return Gw[e]||t}function Jw(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Zw=Object.defineProperty,Eg=Object.getOwnPropertySymbols,Qw=Object.prototype.hasOwnProperty,eT=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?Zw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lg=(e,t)=>{for(var n in t||(t={}))Qw.call(t,n)&&Og(e,n,t[n]);if(Eg)for(var n of Eg(t))eT.call(t,n)&&Og(e,n,t[n]);return e};const tT={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ig="vueuse-storage";function nT(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:d=!1,shallow:h,window:p=Vs,eventFilter:b,onError:y=D=>{console.error(D)}}=r,w=(h?AC:Et)(t);if(!n)try{n=Xw("getDefaultStorage",()=>{var D;return(D=Vs)==null?void 0:D.localStorage})()}catch(D){y(D)}if(!n)return w;const T=Us(t),O=Jw(T),I=(i=r.serializer)!=null?i:tT[O],{pause:P,resume:j}=qw(w,()=>L(w.value),{flush:o,deep:s,eventFilter:b});return p&&l&&(qs(p,"storage",ce),qs(p,Ig,m)),ce(),w;function L(D){try{if(D==null)n.removeItem(e);else{const S=I.write(D),R=n.getItem(e);R!==S&&(n.setItem(e,S),p&&p.dispatchEvent(new CustomEvent(Ig,{detail:{key:e,oldValue:R,newValue:S,storageArea:n}})))}}catch(S){y(S)}}function we(D){const S=D?D.newValue:n.getItem(e);if(S==null)return c&&T!==null&&n.setItem(e,I.write(T)),T;if(!D&&d){const R=I.read(S);return typeof d=="function"?d(R,T):O==="object"&&!Array.isArray(R)?Lg(Lg({},T),R):R}else return typeof S!="string"?S:I.read(S)}function m(D){ce(D.detail)}function ce(D){if(!(D&&D.storageArea!==n)){if(D&&D.key==null){w.value=T;return}if(!(D&&D.key!==e)){P();try{w.value=we(D)}catch(S){y(S)}finally{D?Xa(j):j()}}}}}function Vc(e,t,n={}){const{window:r=Vs}=n;return nT(e,t,r==null?void 0:r.localStorage,n)}var ji=ji||{};ji.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,r=e.visit(t.at),i=e.visit(t.style);return i&&(n+=" "+i),r&&(n+=" at "+r),n},"visit_default-radial":function(t){var n="",r=e.visit(t.at);return r&&(n+=r),n},"visit_extent-keyword":function(t){var n=t.value,r=e.visit(t.at);return r&&(n+=" at "+r),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var r=t,i=e.visit(n.length);return i&&(r+=" "+i),r},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",r=t.length;return t.forEach(function(i,o){n+=e.visit(i),o<r-1&&(n+=", ")}),n},visit:function(t){if(!t)return"";var n="";if(t instanceof Array)return e.visit_array(t,n);if(t.type){var r=e["visit_"+t.type];if(r)return r(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var ji=ji||{};ji.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(z){var ie=new Error(t+": "+z);throw ie.source=t,ie}function r(){var z=i();return t.length>0&&n("Invalid input not EOF"),z}function i(){return j(o)}function o(){return s("linear-gradient",e.linearGradient,c)||s("repeating-linear-gradient",e.repeatingLinearGradient,c)||s("radial-gradient",e.radialGradient,p)||s("repeating-radial-gradient",e.repeatingRadialGradient,p)}function s(z,ie,fe){return l(ie,function(rt){var Ve=fe();return Ve&&(je(e.comma)||n("Missing comma before color stops")),{type:z,orientation:Ve,colorStops:j(L)}})}function l(z,ie){var fe=je(z);if(fe){je(e.startCall)||n("Missing (");var rt=ie(fe);return je(e.endCall)||n("Missing )"),rt}}function c(){return d()||h()}function d(){return be("directional",e.sideOrCorner,1)}function h(){return be("angular",e.angleValue,1)}function p(){var z,ie=b(),fe;return ie&&(z=[],z.push(ie),fe=t,je(e.comma)&&(ie=b(),ie?z.push(ie):t=fe)),z}function b(){var z=y()||w();if(z)z.at=O();else{var ie=T();if(ie){z=ie;var fe=O();fe&&(z.at=fe)}else{var rt=I();rt&&(z={type:"default-radial",at:rt})}}return z}function y(){var z=be("shape",/^(circle)/i,0);return z&&(z.style=J()||T()),z}function w(){var z=be("shape",/^(ellipse)/i,0);return z&&(z.style=U()||T()),z}function T(){return be("extent-keyword",e.extentKeywords,1)}function O(){if(be("position",/^at/,0)){var z=I();return z||n("Missing positioning value"),z}}function I(){var z=P();if(z.x||z.y)return{type:"position",value:z}}function P(){return{x:U(),y:U()}}function j(z){var ie=z(),fe=[];if(ie)for(fe.push(ie);je(e.comma);)ie=z(),ie?fe.push(ie):n("One extra comma");return fe}function L(){var z=we();return z||n("Expected color definition"),z.length=U(),z}function we(){return ce()||S()||D()||m()}function m(){return be("literal",e.literalColor,0)}function ce(){return be("hex",e.hexColor,1)}function D(){return l(e.rgbColor,function(){return{type:"rgb",value:j(R)}})}function S(){return l(e.rgbaColor,function(){return{type:"rgba",value:j(R)}})}function R(){return je(e.number)[1]}function U(){return be("%",e.percentageValue,1)||ee()||J()}function ee(){return be("position-keyword",e.positionKeywords,1)}function J(){return be("px",e.pixelValue,1)||be("em",e.emValue,1)}function be(z,ie,fe){var rt=je(ie);if(rt)return{type:z,value:rt[fe]}}function je(z){var ie,fe;return fe=/^[\n\r\t\s]+/.exec(t),fe&&Ne(fe[0].length),ie=z.exec(t),ie&&Ne(ie[0].length),ie}function Ne(z){t=t.substr(z)}return function(z){return t=z.toString(),r()}}();var rT=ji.parse,iT=ji.stringify,Fn="top",ar="bottom",lr="right",$n="left",qc="auto",zs=[Fn,ar,lr,$n],Lo="start",Gs="end",oT="clippingParents",Pg="viewport",Ys="popper",sT="reference",Dg=zs.reduce(function(e,t){return e.concat([t+"-"+Lo,t+"-"+Gs])},[]),Rg=[].concat(zs,[qc]).reduce(function(e,t){return e.concat([t,t+"-"+Lo,t+"-"+Gs])},[]),aT="beforeRead",lT="read",uT="afterRead",cT="beforeMain",fT="main",dT="afterMain",pT="beforeWrite",hT="write",gT="afterWrite",mT=[aT,lT,uT,cT,fT,dT,pT,hT,gT];function Rr(e){return e?(e.nodeName||"").toLowerCase():null}function Yn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ui(e){var t=Yn(e).Element;return e instanceof t||e instanceof Element}function ur(e){var t=Yn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zc(e){if(typeof ShadowRoot>"u")return!1;var t=Yn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function vT(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ur(o)||!Rr(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function yT(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ur(i)||!Rr(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ng={name:"applyStyles",enabled:!0,phase:"write",fn:vT,effect:yT,requires:["computeStyles"]};function Nr(e){return e.split("-")[0]}var Wi=Math.max,Pl=Math.min,Io=Math.round;function Gc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Mg(){return!/^((?!chrome|android).)*safari/i.test(Gc())}function Po(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ur(e)&&(i=e.offsetWidth>0&&Io(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Io(r.height)/e.offsetHeight||1);var s=Ui(e)?Yn(e):window,l=s.visualViewport,c=!Mg()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,h=(r.top+(c&&l?l.offsetTop:0))/o,p=r.width/i,b=r.height/o;return{width:p,height:b,top:h,right:d+p,bottom:h+b,left:d,x:d,y:h}}function Yc(e){var t=Po(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zc(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Yr(e){return Yn(e).getComputedStyle(e)}function bT(e){return["table","td","th"].indexOf(Rr(e))>=0}function vi(e){return((Ui(e)?e.ownerDocument:e.document)||window.document).documentElement}function Dl(e){return Rr(e)==="html"?e:e.assignedSlot||e.parentNode||(zc(e)?e.host:null)||vi(e)}function $g(e){return!ur(e)||Yr(e).position==="fixed"?null:e.offsetParent}function CT(e){var t=/firefox/i.test(Gc()),n=/Trident/i.test(Gc());if(n&&ur(e)){var r=Yr(e);if(r.position==="fixed")return null}var i=Dl(e);for(zc(i)&&(i=i.host);ur(i)&&["html","body"].indexOf(Rr(i))<0;){var o=Yr(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Xs(e){for(var t=Yn(e),n=$g(e);n&&bT(n)&&Yr(n).position==="static";)n=$g(n);return n&&(Rr(n)==="html"||Rr(n)==="body"&&Yr(n).position==="static")?t:n||CT(e)||t}function Xc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Js(e,t,n){return Wi(e,Pl(t,n))}function _T(e,t,n){var r=Js(e,t,n);return r>n?n:r}function Bg(){return{top:0,right:0,bottom:0,left:0}}function Hg(e){return Object.assign({},Bg(),e)}function jg(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var wT=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Hg(typeof t!="number"?t:jg(t,zs))};function TT(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Nr(n.placement),c=Xc(l),d=[$n,lr].indexOf(l)>=0,h=d?"height":"width";if(!(!o||!s)){var p=wT(i.padding,n),b=Yc(o),y=c==="y"?Fn:$n,w=c==="y"?ar:lr,T=n.rects.reference[h]+n.rects.reference[c]-s[c]-n.rects.popper[h],O=s[c]-n.rects.reference[c],I=Xs(o),P=I?c==="y"?I.clientHeight||0:I.clientWidth||0:0,j=T/2-O/2,L=p[y],we=P-b[h]-p[w],m=P/2-b[h]/2+j,ce=Js(L,m,we),D=c;n.modifiersData[r]=(t={},t[D]=ce,t.centerOffset=ce-m,t)}}function xT(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Fg(t.elements.popper,i)&&(t.elements.arrow=i))}const kT={name:"arrow",enabled:!0,phase:"main",fn:TT,effect:xT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Do(e){return e.split("-")[1]}var ST={top:"auto",right:"auto",bottom:"auto",left:"auto"};function AT(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Io(n*i)/i||0,y:Io(r*i)/i||0}}function Ug(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,p=e.isFixed,b=s.x,y=b===void 0?0:b,w=s.y,T=w===void 0?0:w,O=typeof h=="function"?h({x:y,y:T}):{x:y,y:T};y=O.x,T=O.y;var I=s.hasOwnProperty("x"),P=s.hasOwnProperty("y"),j=$n,L=Fn,we=window;if(d){var m=Xs(n),ce="clientHeight",D="clientWidth";if(m===Yn(n)&&(m=vi(n),Yr(m).position!=="static"&&l==="absolute"&&(ce="scrollHeight",D="scrollWidth")),m=m,i===Fn||(i===$n||i===lr)&&o===Gs){L=ar;var S=p&&m===we&&we.visualViewport?we.visualViewport.height:m[ce];T-=S-r.height,T*=c?1:-1}if(i===$n||(i===Fn||i===ar)&&o===Gs){j=lr;var R=p&&m===we&&we.visualViewport?we.visualViewport.width:m[D];y-=R-r.width,y*=c?1:-1}}var U=Object.assign({position:l},d&&ST),ee=h===!0?AT({x:y,y:T},Yn(n)):{x:y,y:T};if(y=ee.x,T=ee.y,c){var J;return Object.assign({},U,(J={},J[L]=P?"0":"",J[j]=I?"0":"",J.transform=(we.devicePixelRatio||1)<=1?"translate("+y+"px, "+T+"px)":"translate3d("+y+"px, "+T+"px, 0)",J))}return Object.assign({},U,(t={},t[L]=P?T+"px":"",t[j]=I?y+"px":"",t.transform="",t))}function ET(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:Nr(t.placement),variation:Do(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ug(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ug(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const OT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ET,data:{}};var Rl={passive:!0};function LT(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Yn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Rl)}),l&&c.addEventListener("resize",n.update,Rl),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Rl)}),l&&c.removeEventListener("resize",n.update,Rl)}}const IT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:LT,data:{}};var PT={left:"right",right:"left",bottom:"top",top:"bottom"};function Nl(e){return e.replace(/left|right|bottom|top/g,function(t){return PT[t]})}var DT={start:"end",end:"start"};function Wg(e){return e.replace(/start|end/g,function(t){return DT[t]})}function Jc(e){var t=Yn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Zc(e){return Po(vi(e)).left+Jc(e).scrollLeft}function RT(e,t){var n=Yn(e),r=vi(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=Mg();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+Zc(e),y:c}}function NT(e){var t,n=vi(e),r=Jc(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Wi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Zc(e),c=-r.scrollTop;return Yr(i||n).direction==="rtl"&&(l+=Wi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Qc(e){var t=Yr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Kg(e){return["html","body","#document"].indexOf(Rr(e))>=0?e.ownerDocument.body:ur(e)&&Qc(e)?e:Kg(Dl(e))}function Zs(e,t){var n;t===void 0&&(t=[]);var r=Kg(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yn(r),s=i?[o].concat(o.visualViewport||[],Qc(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(Zs(Dl(s)))}function ef(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function MT(e,t){var n=Po(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Vg(e,t,n){return t===Pg?ef(RT(e,n)):Ui(t)?MT(t,n):ef(NT(vi(e)))}function FT(e){var t=Zs(Dl(e)),n=["absolute","fixed"].indexOf(Yr(e).position)>=0,r=n&&ur(e)?Xs(e):e;return Ui(r)?t.filter(function(i){return Ui(i)&&Fg(i,r)&&Rr(i)!=="body"}):[]}function $T(e,t,n,r){var i=t==="clippingParents"?FT(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var h=Vg(e,d,r);return c.top=Wi(h.top,c.top),c.right=Pl(h.right,c.right),c.bottom=Pl(h.bottom,c.bottom),c.left=Wi(h.left,c.left),c},Vg(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function qg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Nr(r):null,o=r?Do(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Fn:c={x:s,y:t.y-n.height};break;case ar:c={x:s,y:t.y+t.height};break;case lr:c={x:t.x+t.width,y:l};break;case $n:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?Xc(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Lo:c[d]=c[d]-(t[h]/2-n[h]/2);break;case Gs:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function Qs(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?oT:l,d=n.rootBoundary,h=d===void 0?Pg:d,p=n.elementContext,b=p===void 0?Ys:p,y=n.altBoundary,w=y===void 0?!1:y,T=n.padding,O=T===void 0?0:T,I=Hg(typeof O!="number"?O:jg(O,zs)),P=b===Ys?sT:Ys,j=e.rects.popper,L=e.elements[w?P:b],we=$T(Ui(L)?L:L.contextElement||vi(e.elements.popper),c,h,s),m=Po(e.elements.reference),ce=qg({reference:m,element:j,strategy:"absolute",placement:i}),D=ef(Object.assign({},j,ce)),S=b===Ys?D:m,R={top:we.top-S.top+I.top,bottom:S.bottom-we.bottom+I.bottom,left:we.left-S.left+I.left,right:S.right-we.right+I.right},U=e.modifiersData.offset;if(b===Ys&&U){var ee=U[i];Object.keys(R).forEach(function(J){var be=[lr,ar].indexOf(J)>=0?1:-1,je=[Fn,ar].indexOf(J)>=0?"y":"x";R[J]+=ee[je]*be})}return R}function BT(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?Rg:c,h=Do(r),p=h?l?Dg:Dg.filter(function(w){return Do(w)===h}):zs,b=p.filter(function(w){return d.indexOf(w)>=0});b.length===0&&(b=p);var y=b.reduce(function(w,T){return w[T]=Qs(e,{placement:T,boundary:i,rootBoundary:o,padding:s})[Nr(T)],w},{});return Object.keys(y).sort(function(w,T){return y[w]-y[T]})}function HT(e){if(Nr(e)===qc)return[];var t=Nl(e);return[Wg(e),t,Wg(t)]}function jT(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,h=n.boundary,p=n.rootBoundary,b=n.altBoundary,y=n.flipVariations,w=y===void 0?!0:y,T=n.allowedAutoPlacements,O=t.options.placement,I=Nr(O),P=I===O,j=c||(P||!w?[Nl(O)]:HT(O)),L=[O].concat(j).reduce(function(Te,Ae){return Te.concat(Nr(Ae)===qc?BT(t,{placement:Ae,boundary:h,rootBoundary:p,padding:d,flipVariations:w,allowedAutoPlacements:T}):Ae)},[]),we=t.rects.reference,m=t.rects.popper,ce=new Map,D=!0,S=L[0],R=0;R<L.length;R++){var U=L[R],ee=Nr(U),J=Do(U)===Lo,be=[Fn,ar].indexOf(ee)>=0,je=be?"width":"height",Ne=Qs(t,{placement:U,boundary:h,rootBoundary:p,altBoundary:b,padding:d}),z=be?J?lr:$n:J?ar:Fn;we[je]>m[je]&&(z=Nl(z));var ie=Nl(z),fe=[];if(o&&fe.push(Ne[ee]<=0),l&&fe.push(Ne[z]<=0,Ne[ie]<=0),fe.every(function(Te){return Te})){S=U,D=!1;break}ce.set(U,fe)}if(D)for(var rt=w?3:1,Ve=function(Ae){var Oe=L.find(function(He){var Xe=ce.get(He);if(Xe)return Xe.slice(0,Ae).every(function(Le){return Le})});if(Oe)return S=Oe,"break"},ne=rt;ne>0;ne--){var me=Ve(ne);if(me==="break")break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}}const UT={name:"flip",enabled:!0,phase:"main",fn:jT,requiresIfExists:["offset"],data:{_skip:!1}};function zg(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Gg(e){return[Fn,lr,ar,$n].some(function(t){return e[t]>=0})}function WT(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Qs(t,{elementContext:"reference"}),l=Qs(t,{altBoundary:!0}),c=zg(s,r),d=zg(l,i,o),h=Gg(c),p=Gg(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const KT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:WT};function VT(e,t,n){var r=Nr(e),i=[$n,Fn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[$n,lr].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function qT(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=Rg.reduce(function(h,p){return h[p]=VT(p,t.rects,o),h},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const zT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qT};function GT(e){var t=e.state,n=e.name;t.modifiersData[n]=qg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const YT={name:"popperOffsets",enabled:!0,phase:"read",fn:GT,data:{}};function XT(e){return e==="x"?"y":"x"}function JT(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,b=n.tether,y=b===void 0?!0:b,w=n.tetherOffset,T=w===void 0?0:w,O=Qs(t,{boundary:c,rootBoundary:d,padding:p,altBoundary:h}),I=Nr(t.placement),P=Do(t.placement),j=!P,L=Xc(I),we=XT(L),m=t.modifiersData.popperOffsets,ce=t.rects.reference,D=t.rects.popper,S=typeof T=="function"?T(Object.assign({},t.rects,{placement:t.placement})):T,R=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),U=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(m){if(o){var J,be=L==="y"?Fn:$n,je=L==="y"?ar:lr,Ne=L==="y"?"height":"width",z=m[L],ie=z+O[be],fe=z-O[je],rt=y?-D[Ne]/2:0,Ve=P===Lo?ce[Ne]:D[Ne],ne=P===Lo?-D[Ne]:-ce[Ne],me=t.elements.arrow,Te=y&&me?Yc(me):{width:0,height:0},Ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bg(),Oe=Ae[be],He=Ae[je],Xe=Js(0,ce[Ne],Te[Ne]),Le=j?ce[Ne]/2-rt-Xe-Oe-R.mainAxis:Ve-Xe-Oe-R.mainAxis,it=j?-ce[Ne]/2+rt+Xe+He+R.mainAxis:ne+Xe+He+R.mainAxis,mt=t.elements.arrow&&Xs(t.elements.arrow),N=mt?L==="y"?mt.clientTop||0:mt.clientLeft||0:0,$=(J=U==null?void 0:U[L])!=null?J:0,G=z+Le-$-N,te=z+it-$,K=Js(y?Pl(ie,G):ie,z,y?Wi(fe,te):fe);m[L]=K,ee[L]=K-z}if(l){var X,Ce=L==="x"?Fn:$n,de=L==="x"?ar:lr,ve=m[we],se=we==="y"?"height":"width",ke=ve+O[Ce],_e=ve-O[de],Me=[Fn,$n].indexOf(I)!==-1,Se=(X=U==null?void 0:U[we])!=null?X:0,qe=Me?ke:ve-ce[se]-D[se]-Se+R.altAxis,dt=Me?ve+ce[se]+D[se]-Se-R.altAxis:_e,lt=y&&Me?_T(qe,ve,dt):Js(y?qe:ke,ve,y?dt:_e);m[we]=lt,ee[we]=lt-ve}t.modifiersData[r]=ee}}const ZT={name:"preventOverflow",enabled:!0,phase:"main",fn:JT,requiresIfExists:["offset"]};function QT(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ex(e){return e===Yn(e)||!ur(e)?Jc(e):QT(e)}function tx(e){var t=e.getBoundingClientRect(),n=Io(t.width)/e.offsetWidth||1,r=Io(t.height)/e.offsetHeight||1;return n!==1||r!==1}function nx(e,t,n){n===void 0&&(n=!1);var r=ur(t),i=ur(t)&&tx(t),o=vi(t),s=Po(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Rr(t)!=="body"||Qc(o))&&(l=ex(t)),ur(t)?(c=Po(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Zc(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function rx(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ix(e){var t=rx(e);return mT.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ox(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function sx(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Yg={placement:"bottom",modifiers:[],strategy:"absolute"};function Xg(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function ax(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?Yg:i;return function(l,c,d){d===void 0&&(d=o);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},Yg,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},p=[],b=!1,y={state:h,setOptions:function(I){var P=typeof I=="function"?I(h.options):I;T(),h.options=Object.assign({},o,h.options,P),h.scrollParents={reference:Ui(l)?Zs(l):l.contextElement?Zs(l.contextElement):[],popper:Zs(c)};var j=ix(sx([].concat(r,h.options.modifiers)));return h.orderedModifiers=j.filter(function(L){return L.enabled}),w(),y.update()},forceUpdate:function(){if(!b){var I=h.elements,P=I.reference,j=I.popper;if(Xg(P,j)){h.rects={reference:nx(P,Xs(j),h.options.strategy==="fixed"),popper:Yc(j)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(R){return h.modifiersData[R.name]=Object.assign({},R.data)});for(var L=0;L<h.orderedModifiers.length;L++){if(h.reset===!0){h.reset=!1,L=-1;continue}var we=h.orderedModifiers[L],m=we.fn,ce=we.options,D=ce===void 0?{}:ce,S=we.name;typeof m=="function"&&(h=m({state:h,options:D,name:S,instance:y})||h)}}}},update:ox(function(){return new Promise(function(O){y.forceUpdate(),O(h)})}),destroy:function(){T(),b=!0}};if(!Xg(l,c))return y;y.setOptions(d).then(function(O){!b&&d.onFirstUpdate&&d.onFirstUpdate(O)});function w(){h.orderedModifiers.forEach(function(O){var I=O.name,P=O.options,j=P===void 0?{}:P,L=O.effect;if(typeof L=="function"){var we=L({state:h,name:I,instance:y,options:j}),m=function(){};p.push(we||m)}})}function T(){p.forEach(function(O){return O()}),p=[]}return y}}var lx=[IT,YT,OT,Ng,zT,UT,ZT,kT,KT],Jg=ax({defaultModifiers:lx});/*!
|
||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
*
|
||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/function Zg(e){return Object.prototype.toString.call(e)==="[object Object]"}function ux(e){var t,n;return Zg(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(Zg(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function ea(){return ea=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ea.apply(this,arguments)}function Qg(e,t){if(e==null)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(i[n]=e[n]);return i}const cx={silent:!1,logLevel:"warn"},fx=["validator"],em=Object.prototype,tm=em.toString,dx=em.hasOwnProperty,nm=/^\s*function (\w+)/;function rm(e){var t;const n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){const r=n.toString().match(nm);return r?r[1]:""}return""}const Ki=ux;let Cn=e=>e;const Ro=(e,t)=>dx.call(e,t),px=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},No=Array.isArray||function(e){return tm.call(e)==="[object Array]"},Mo=e=>tm.call(e)==="[object Function]",Ml=e=>Ki(e)&&Ro(e,"_vueTypes_name"),im=e=>Ki(e)&&(Ro(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>Ro(e,t)));function tf(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function Vi(e,t,n=!1){let r,i=!0,o="";r=Ki(e)?e:{type:e};const s=Ml(r)?r._vueTypes_name+" - ":"";if(im(r)&&r.type!==null){if(r.type===void 0||r.type===!0||!r.required&&t===void 0)return i;No(r.type)?(i=r.type.some(l=>Vi(l,t,!0)===!0),o=r.type.map(l=>rm(l)).join(" or ")):(o=rm(r),i=o==="Array"?No(t):o==="Object"?Ki(t):o==="String"||o==="Number"||o==="Boolean"||o==="Function"?function(l){if(l==null)return"";const c=l.constructor.toString().match(nm);return c?c[1]:""}(t)===o:t instanceof r.type)}if(!i){const l=`${s}value "${t}" should be of type "${o}"`;return n===!1?(Cn(l),!1):l}if(Ro(r,"validator")&&Mo(r.validator)){const l=Cn,c=[];if(Cn=d=>{c.push(d)},i=r.validator(t),Cn=l,!i){const d=(c.length>1?"* ":"")+c.join(`
|
||
* `);return c.length=0,n===!1?(Cn(d),i):d}}return i}function Xn(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(i){return i===void 0?(Ro(this,"default")&&delete this.default,this):Mo(i)||Vi(this,i,!0)===!0?(this.default=No(i)?()=>[...i]:Ki(i)?()=>Object.assign({},i):i,this):(Cn(`${this._vueTypes_name} - invalid default value: "${i}"`),this)}}}),{validator:r}=n;return Mo(r)&&(n.validator=tf(r,n)),n}function Mr(e,t){const n=Xn(e,t);return Object.defineProperty(n,"validate",{value(r){return Mo(this.validator)&&Cn(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
||
${JSON.stringify(this)}`),this.validator=tf(r,this),this}})}function om(e,t,n){const r=function(c){const d={};return Object.getOwnPropertyNames(c).forEach(h=>{d[h]=Object.getOwnPropertyDescriptor(c,h)}),Object.defineProperties({},d)}(t);if(r._vueTypes_name=e,!Ki(n))return r;const{validator:i}=n,o=Qg(n,fx);if(Mo(i)){let{validator:c}=r;c&&(c=(l=(s=c).__original)!==null&&l!==void 0?l:s),r.validator=tf(c?function(d){return c.call(this,d)&&i.call(this,d)}:i,r)}var s,l;return Object.assign(r,o)}function Fl(e){return e.replace(/^(?!\s*$)/gm," ")}const hx=()=>Mr("any",{}),gx=()=>Mr("function",{type:Function}),mx=()=>Mr("boolean",{type:Boolean}),vx=()=>Mr("string",{type:String}),yx=()=>Mr("number",{type:Number}),bx=()=>Mr("array",{type:Array}),Cx=()=>Mr("object",{type:Object}),_x=()=>Xn("integer",{type:Number,validator:e=>px(e)}),wx=()=>Xn("symbol",{validator:e=>typeof e=="symbol"});function Tx(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return Xn(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||Cn(`${this._vueTypes_name} - ${t}`),r}})}function xx(e){if(!No(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,n=e.reduce((r,i)=>{if(i!=null){const o=i.constructor;r.indexOf(o)===-1&&r.push(o)}return r},[]);return Xn("oneOf",{type:n.length>0?n:void 0,validator(r){const i=e.indexOf(r)!==-1;return i||Cn(t),i}})}function kx(e){if(!No(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=[];for(let i=0;i<e.length;i+=1){const o=e[i];if(im(o)){if(Ml(o)&&o._vueTypes_name==="oneOf"&&o.type){n=n.concat(o.type);continue}if(Mo(o.validator)&&(t=!0),o.type===!0||!o.type){Cn('oneOfType - invalid usage of "true" or "null" as types.');continue}n=n.concat(o.type)}else n.push(o)}n=n.filter((i,o)=>n.indexOf(i)===o);const r=n.length>0?n:null;return Xn("oneOfType",t?{type:r,validator(i){const o=[],s=e.some(l=>{const c=Vi(Ml(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,i,!0);return typeof c=="string"&&o.push(c),c===!0});return s||Cn(`oneOfType - provided value does not match any of the ${o.length} passed-in validators:
|
||
${Fl(o.join(`
|
||
`))}`),s}}:{type:r})}function Sx(e){return Xn("arrayOf",{type:Array,validator(t){let n="";const r=t.every(i=>(n=Vi(e,i,!0),n===!0));return r||Cn(`arrayOf - value validation error:
|
||
${Fl(n)}`),r}})}function Ax(e){return Xn("instanceOf",{type:e})}function Ex(e){return Xn("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(i=>(n=Vi(e,t[i],!0),n===!0));return r||Cn(`objectOf - value validation error:
|
||
${Fl(n)}`),r}})}function Ox(e){const t=Object.keys(e),n=t.filter(i=>{var o;return!((o=e[i])===null||o===void 0||!o.required)}),r=Xn("shape",{type:Object,validator(i){if(!Ki(i))return!1;const o=Object.keys(i);if(n.length>0&&n.some(s=>o.indexOf(s)===-1)){const s=n.filter(l=>o.indexOf(l)===-1);return Cn(s.length===1?`shape - required property "${s[0]}" is not defined.`:`shape - required properties "${s.join('", "')}" are not defined.`),!1}return o.every(s=>{if(t.indexOf(s)===-1)return this._vueTypes_isLoose===!0||(Cn(`shape - shape definition does not include a "${s}" property. Allowed keys: "${t.join('", "')}".`),!1);const l=Vi(e[s],i[s],!0);return typeof l=="string"&&Cn(`shape - "${s}" property validation error:
|
||
${Fl(l)}`),l===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const Lx=["name","validate","getter"],Ix=(()=>{var e;return(e=class{static get any(){return hx()}static get func(){return gx().def(this.defaults.func)}static get bool(){return mx().def(this.defaults.bool)}static get string(){return vx().def(this.defaults.string)}static get number(){return yx().def(this.defaults.number)}static get array(){return bx().def(this.defaults.array)}static get object(){return Cx().def(this.defaults.object)}static get integer(){return _x().def(this.defaults.integer)}static get symbol(){return wx()}static get nullable(){return{type:null}}static extend(t){if(No(t))return t.forEach(c=>this.extend(c)),this;const{name:n,validate:r=!1,getter:i=!1}=t,o=Qg(t,Lx);if(Ro(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:s}=o;if(Ml(s))return delete o.type,Object.defineProperty(this,n,i?{get:()=>om(n,s,o)}:{value(...c){const d=om(n,s,o);return d.validator&&(d.validator=d.validator.bind(d,...c)),d}});let l;return l=i?{get(){const c=Object.assign({},o);return r?Mr(n,c):Xn(n,c)},enumerable:!0}:{value(...c){const d=Object.assign({},o);let h;return h=r?Mr(n,d):Xn(n,d),d.validator&&(h.validator=d.validator.bind(h,...c)),h},enumerable:!0},Object.defineProperty(this,n,l)}}).defaults={},e.sensibleDefaults=void 0,e.config=cx,e.custom=Tx,e.oneOf=xx,e.instanceOf=Ax,e.oneOfType=kx,e.arrayOf=Sx,e.objectOf=Ex,e.shape=Ox,e.utils={validate:(t,n)=>Vi(n,t,!0)===!0,toType:(t,n,r=!1)=>r?Mr(t,n):Xn(t,n)},e})();function Px(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;return(t=class extends Ix{static get sensibleDefaults(){return ea({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?ea({},n!==!0?n:e):{}}}).defaults=ea({},e),t}let at=class extends Px(){};var sm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nf(e){var t={exports:{}};return e(t,t.exports),t.exports}var $l=function(e){return e&&e.Math==Math&&e},rn=$l(typeof globalThis=="object"&&globalThis)||$l(typeof window=="object"&&window)||$l(typeof self=="object"&&self)||$l(typeof sm=="object"&&sm)||function(){return this}()||Function("return this")(),Nt=function(e){try{return!!e()}catch{return!0}},cr=!Nt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),am={}.propertyIsEnumerable,lm=Object.getOwnPropertyDescriptor,Dx={f:lm&&!am.call({1:2},1)?function(e){var t=lm(this,e);return!!t&&t.enumerable}:am},Bl=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Rx={}.toString,Xr=function(e){return Rx.call(e).slice(8,-1)},Nx="".split,Hl=Nt(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return Xr(e)=="String"?Nx.call(e,""):Object(e)}:Object,yi=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},Fo=function(e){return Hl(yi(e))},cn=function(e){return typeof e=="object"?e!==null:typeof e=="function"},rf=function(e,t){if(!cn(e))return e;var n,r;if(t&&typeof(n=e.toString)=="function"&&!cn(r=n.call(e))||typeof(n=e.valueOf)=="function"&&!cn(r=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!cn(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Mx={}.hasOwnProperty,Zt=function(e,t){return Mx.call(e,t)},of=rn.document,Fx=cn(of)&&cn(of.createElement),um=function(e){return Fx?of.createElement(e):{}},cm=!cr&&!Nt(function(){return Object.defineProperty(um("div"),"a",{get:function(){return 7}}).a!=7}),fm=Object.getOwnPropertyDescriptor,sf={f:cr?fm:function(e,t){if(e=Fo(e),t=rf(t,!0),cm)try{return fm(e,t)}catch{}if(Zt(e,t))return Bl(!Dx.f.call(e,t),e[t])}},On=function(e){if(!cn(e))throw TypeError(String(e)+" is not an object");return e},dm=Object.defineProperty,Jr={f:cr?dm:function(e,t,n){if(On(e),t=rf(t,!0),On(n),cm)try{return dm(e,t,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},fr=cr?function(e,t,n){return Jr.f(e,t,Bl(1,n))}:function(e,t,n){return e[t]=n,e},af=function(e,t){try{fr(rn,e,t)}catch{rn[e]=t}return t},qi=rn["__core-js_shared__"]||af("__core-js_shared__",{}),$x=Function.toString;typeof qi.inspectSource!="function"&&(qi.inspectSource=function(e){return $x.call(e)});var jl,ta,Ul,pm=qi.inspectSource,hm=rn.WeakMap,Bx=typeof hm=="function"&&/native code/.test(pm(hm)),gm=nf(function(e){(e.exports=function(t,n){return qi[t]||(qi[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),Hx=0,jx=Math.random(),lf=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Hx+jx).toString(36)},mm=gm("keys"),uf=function(e){return mm[e]||(mm[e]=lf(e))},Wl={},Ux=rn.WeakMap;if(Bx){var $o=qi.state||(qi.state=new Ux),Wx=$o.get,Kx=$o.has,Vx=$o.set;jl=function(e,t){return t.facade=e,Vx.call($o,e,t),t},ta=function(e){return Wx.call($o,e)||{}},Ul=function(e){return Kx.call($o,e)}}else{var na=uf("state");Wl[na]=!0,jl=function(e,t){return t.facade=e,fr(e,na,t),t},ta=function(e){return Zt(e,na)?e[na]:{}},Ul=function(e){return Zt(e,na)}}var bi={set:jl,get:ta,has:Ul,enforce:function(e){return Ul(e)?ta(e):jl(e,{})},getterFor:function(e){return function(t){var n;if(!cn(t)||(n=ta(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Ci=nf(function(e){var t=bi.get,n=bi.enforce,r=String(String).split("String");(e.exports=function(i,o,s,l){var c,d=!!l&&!!l.unsafe,h=!!l&&!!l.enumerable,p=!!l&&!!l.noTargetGet;typeof s=="function"&&(typeof o!="string"||Zt(s,"name")||fr(s,"name",o),(c=n(s)).source||(c.source=r.join(typeof o=="string"?o:""))),i!==rn?(d?!p&&i[o]&&(h=!0):delete i[o],h?i[o]=s:fr(i,o,s)):h?i[o]=s:af(o,s)})(Function.prototype,"toString",function(){return typeof this=="function"&&t(this).source||pm(this)})}),cf=rn,vm=function(e){return typeof e=="function"?e:void 0},Kl=function(e,t){return arguments.length<2?vm(cf[e])||vm(rn[e]):cf[e]&&cf[e][t]||rn[e]&&rn[e][t]},qx=Math.ceil,zx=Math.floor,Bo=function(e){return isNaN(e=+e)?0:(e>0?zx:qx)(e)},Gx=Math.min,Jn=function(e){return e>0?Gx(Bo(e),9007199254740991):0},Yx=Math.max,Xx=Math.min,Vl=function(e,t){var n=Bo(e);return n<0?Yx(n+t,0):Xx(n,t)},ym=function(e){return function(t,n,r){var i,o=Fo(t),s=Jn(o.length),l=Vl(r,s);if(e&&n!=n){for(;s>l;)if((i=o[l++])!=i)return!0}else for(;s>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}},bm={includes:ym(!0),indexOf:ym(!1)},Jx=bm.indexOf,Cm=function(e,t){var n,r=Fo(e),i=0,o=[];for(n in r)!Zt(Wl,n)&&Zt(r,n)&&o.push(n);for(;t.length>i;)Zt(r,n=t[i++])&&(~Jx(o,n)||o.push(n));return o},ql=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zx=ql.concat("length","prototype"),Qx={f:Object.getOwnPropertyNames||function(e){return Cm(e,Zx)}},ek={f:Object.getOwnPropertySymbols},tk=Kl("Reflect","ownKeys")||function(e){var t=Qx.f(On(e)),n=ek.f;return n?t.concat(n(e)):t},nk=function(e,t){for(var n=tk(t),r=Jr.f,i=sf.f,o=0;o<n.length;o++){var s=n[o];Zt(e,s)||r(e,s,i(t,s))}},rk=/#|\.prototype\./,ra=function(e,t){var n=ok[ik(e)];return n==ak||n!=sk&&(typeof t=="function"?Nt(t):!!t)},ik=ra.normalize=function(e){return String(e).replace(rk,".").toLowerCase()},ok=ra.data={},sk=ra.NATIVE="N",ak=ra.POLYFILL="P",ff=ra,lk=sf.f,_n=function(e,t){var n,r,i,o,s,l=e.target,c=e.global,d=e.stat;if(n=c?rn:d?rn[l]||af(l,{}):(rn[l]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(s=lk(n,r))&&s.value:n[r],!ff(c?r:l+(d?".":"#")+r,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;nk(o,i)}(e.sham||i&&i.sham)&&fr(o,"sham",!0),Ci(n,r,o,e)}},df=function(e,t){var n=[][e];return!!n&&Nt(function(){n.call(null,t||function(){throw 1},1)})},uk=Object.defineProperty,pf={},_m=function(e){throw e},Ho=function(e,t){if(Zt(pf,e))return pf[e];t||(t={});var n=[][e],r=!!Zt(t,"ACCESSORS")&&t.ACCESSORS,i=Zt(t,0)?t[0]:_m,o=Zt(t,1)?t[1]:void 0;return pf[e]=!!n&&!Nt(function(){if(r&&!cr)return!0;var s={length:-1};r?uk(s,1,{enumerable:!0,get:_m}):s[1]=1,n.call(s,i,o)})},ck=bm.indexOf,wm=[].indexOf,Tm=!!wm&&1/[1].indexOf(1,-0)<0,fk=df("indexOf"),dk=Ho("indexOf",{ACCESSORS:!0,1:0});function zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gi(e,t,n){return t&&xm(e.prototype,t),n&&xm(e,n),e}_n({target:"Array",proto:!0,forced:Tm||!fk||!dk},{indexOf:function(e){return Tm?wm.apply(this,arguments)||0:ck(this,e,arguments.length>1?arguments[1]:void 0)}}),function(){function e(){zi(this,e)}return Gi(e,null,[{key:"isInBrowser",value:function(){return typeof window<"u"}},{key:"isServer",value:function(){return typeof window>"u"}},{key:"getUA",value:function(){return e.isInBrowser()?window.navigator.userAgent.toLowerCase():""}},{key:"isMobile",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:"isOpera",value:function(){return navigator.userAgent.indexOf("Opera")!==-1}},{key:"isIE",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie")>0}},{key:"isIE9",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie 9.0")>0}},{key:"isEdge",value:function(){var t=e.getUA();return t!==""&&t.indexOf("edge/")>0}},{key:"isChrome",value:function(){var t=e.getUA();return t!==""&&/chrome\/\d+/.test(t)&&!e.isEdge()}},{key:"isPhantomJS",value:function(){var t=e.getUA();return t!==""&&/phantomjs/.test(t)}},{key:"isFirefox",value:function(){var t=e.getUA();return t!==""&&/firefox/.test(t)}}]),e}();var pk=[].join,hk=Hl!=Object,gk=df("join",",");_n({target:"Array",proto:!0,forced:hk||!gk},{join:function(e){return pk.call(Fo(this),e===void 0?",":e)}});var jo,zl,Zr=function(e){return Object(yi(e))},Uo=Array.isArray||function(e){return Xr(e)=="Array"},km=!!Object.getOwnPropertySymbols&&!Nt(function(){return!String(Symbol())}),mk=km&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Gl=gm("wks"),ia=rn.Symbol,vk=mk?ia:ia&&ia.withoutSetter||lf,Vt=function(e){return Zt(Gl,e)||(km&&Zt(ia,e)?Gl[e]=ia[e]:Gl[e]=vk("Symbol."+e)),Gl[e]},yk=Vt("species"),Yl=function(e,t){var n;return Uo(e)&&(typeof(n=e.constructor)!="function"||n!==Array&&!Uo(n.prototype)?cn(n)&&(n=n[yk])===null&&(n=void 0):n=void 0),new(n===void 0?Array:n)(t===0?0:t)},Wo=function(e,t,n){var r=rf(t);r in e?Jr.f(e,r,Bl(0,n)):e[r]=n},hf=Kl("navigator","userAgent")||"",Sm=rn.process,Am=Sm&&Sm.versions,Em=Am&&Am.v8;Em?zl=(jo=Em.split("."))[0]+jo[1]:hf&&(!(jo=hf.match(/Edge\/(\d+)/))||jo[1]>=74)&&(jo=hf.match(/Chrome\/(\d+)/))&&(zl=jo[1]);var Xl=zl&&+zl,bk=Vt("species"),gf=function(e){return Xl>=51||!Nt(function(){var t=[];return(t.constructor={})[bk]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Ck=gf("splice"),_k=Ho("splice",{ACCESSORS:!0,0:0,1:2}),wk=Math.max,Tk=Math.min;_n({target:"Array",proto:!0,forced:!Ck||!_k},{splice:function(e,t){var n,r,i,o,s,l,c=Zr(this),d=Jn(c.length),h=Vl(e,d),p=arguments.length;if(p===0?n=r=0:p===1?(n=0,r=d-h):(n=p-2,r=Tk(wk(Bo(t),0),d-h)),d+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=Yl(c,r),o=0;o<r;o++)(s=h+o)in c&&Wo(i,o,c[s]);if(i.length=r,n<r){for(o=h;o<d-r;o++)l=o+n,(s=o+r)in c?c[l]=c[s]:delete c[l];for(o=d;o>d-r+n;o--)delete c[o-1]}else if(n>r)for(o=d-r;o>h;o--)l=o+n-1,(s=o+r-1)in c?c[l]=c[s]:delete c[l];for(o=0;o<n;o++)c[o+h]=arguments[o+2];return c.length=d-r+n,i}});var Om={};Om[Vt("toStringTag")]="z";var mf=String(Om)==="[object z]",xk=Vt("toStringTag"),kk=Xr(function(){return arguments}())=="Arguments",Lm=mf?Xr:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=function(i,o){try{return i[o]}catch{}}(t=Object(e),xk))=="string"?n:kk?Xr(t):(r=Xr(t))=="Object"&&typeof t.callee=="function"?"Arguments":r},Sk=mf?{}.toString:function(){return"[object "+Lm(this)+"]"};mf||Ci(Object.prototype,"toString",Sk,{unsafe:!0});var Im=function(){var e=On(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function Pm(e,t){return RegExp(e,t)}var vf,yf,Dm={UNSUPPORTED_Y:Nt(function(){var e=Pm("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),BROKEN_CARET:Nt(function(){var e=Pm("^r","gy");return e.lastIndex=2,e.exec("str")!=null})},Jl=RegExp.prototype.exec,Ak=String.prototype.replace,Rm=Jl,bf=(vf=/a/,yf=/b*/g,Jl.call(vf,"a"),Jl.call(yf,"a"),vf.lastIndex!==0||yf.lastIndex!==0),Nm=Dm.UNSUPPORTED_Y||Dm.BROKEN_CARET,Cf=/()??/.exec("")[1]!==void 0;(bf||Cf||Nm)&&(Rm=function(e){var t,n,r,i,o=this,s=Nm&&o.sticky,l=Im.call(o),c=o.source,d=0,h=e;return s&&((l=l.replace("y","")).indexOf("g")===-1&&(l+="g"),h=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&e[o.lastIndex-1]!==`
|
||
`)&&(c="(?: "+c+")",h=" "+h,d++),n=new RegExp("^(?:"+c+")",l)),Cf&&(n=new RegExp("^"+c+"$(?!\\s)",l)),bf&&(t=o.lastIndex),r=Jl.call(s?n:o,h),s?r?(r.input=r.input.slice(d),r[0]=r[0].slice(d),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:bf&&r&&(o.lastIndex=o.global?r.index+r[0].length:t),Cf&&r&&r.length>1&&Ak.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(r[i]=void 0)}),r});var oa=Rm;_n({target:"RegExp",proto:!0,forced:/./.exec!==oa},{exec:oa});var Mm=RegExp.prototype,Fm=Mm.toString,Ek=Nt(function(){return Fm.call({source:"a",flags:"b"})!="/a/b"}),Ok=Fm.name!="toString";(Ek||Ok)&&Ci(RegExp.prototype,"toString",function(){var e=On(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===void 0&&e instanceof RegExp&&!("flags"in Mm)?Im.call(e):n)},{unsafe:!0});var Lk=Vt("species"),Ik=!Nt(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"}),$m="a".replace(/./,"$0")==="$0",Bm=Vt("replace"),Hm=!!/./[Bm]&&/./[Bm]("a","$0")==="",Pk=!Nt(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),jm=function(e,t,n,r){var i=Vt(e),o=!Nt(function(){var p={};return p[i]=function(){return 7},""[e](p)!=7}),s=o&&!Nt(function(){var p=!1,b=/a/;return e==="split"&&((b={}).constructor={},b.constructor[Lk]=function(){return b},b.flags="",b[i]=/./[i]),b.exec=function(){return p=!0,null},b[i](""),!p});if(!o||!s||e==="replace"&&(!Ik||!$m||Hm)||e==="split"&&!Pk){var l=/./[i],c=n(i,""[e],function(p,b,y,w,T){return b.exec===oa?o&&!T?{done:!0,value:l.call(b,y,w)}:{done:!0,value:p.call(y,b,w)}:{done:!1}},{REPLACE_KEEPS_$0:$m,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Hm}),d=c[0],h=c[1];Ci(String.prototype,e,d),Ci(RegExp.prototype,i,t==2?function(p,b){return h.call(p,this,b)}:function(p){return h.call(p,this)})}r&&fr(RegExp.prototype[i],"sham",!0)},Dk=Vt("match"),Um=function(e){var t;return cn(e)&&((t=e[Dk])!==void 0?!!t:Xr(e)=="RegExp")},_f=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e},Rk=Vt("species"),Wm=function(e){return function(t,n){var r,i,o=String(yi(t)),s=Bo(n),l=o.length;return s<0||s>=l?e?"":void 0:(r=o.charCodeAt(s))<55296||r>56319||s+1===l||(i=o.charCodeAt(s+1))<56320||i>57343?e?o.charAt(s):r:e?o.slice(s,s+2):i-56320+(r-55296<<10)+65536}},Km={codeAt:Wm(!1),charAt:Wm(!0)},Nk=Km.charAt,Vm=function(e,t,n){return t+(n?Nk(e,t).length:1)},wf=function(e,t){var n=e.exec;if(typeof n=="function"){var r=n.call(e,t);if(typeof r!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return r}if(Xr(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return oa.call(e,t)},Mk=[].push,Fk=Math.min,Ko=!Nt(function(){return!RegExp(4294967295,"y")});jm("split",2,function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var s=String(yi(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!Um(i))return t.call(s,i,l);for(var c,d,h,p=[],b=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),y=0,w=new RegExp(i.source,b+"g");(c=oa.call(w,s))&&!((d=w.lastIndex)>y&&(p.push(s.slice(y,c.index)),c.length>1&&c.index<s.length&&Mk.apply(p,c.slice(1)),h=c[0].length,y=d,p.length>=l));)w.lastIndex===c.index&&w.lastIndex++;return y===s.length?!h&&w.test("")||p.push(""):p.push(s.slice(y)),p.length>l?p.slice(0,l):p}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:t.call(this,i,o)}:t,[function(i,o){var s=yi(this),l=i==null?void 0:i[e];return l!==void 0?l.call(i,s,o):r.call(String(s),i,o)},function(i,o){var s=n(r,i,this,o,r!==t);if(s.done)return s.value;var l=On(i),c=String(this),d=function(L,we){var m,ce=On(L).constructor;return ce===void 0||(m=On(ce)[Rk])==null?we:_f(m)}(l,RegExp),h=l.unicode,p=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Ko?"y":"g"),b=new d(Ko?l:"^(?:"+l.source+")",p),y=o===void 0?4294967295:o>>>0;if(y===0)return[];if(c.length===0)return wf(b,c)===null?[c]:[];for(var w=0,T=0,O=[];T<c.length;){b.lastIndex=Ko?T:0;var I,P=wf(b,Ko?c:c.slice(T));if(P===null||(I=Fk(Jn(b.lastIndex+(Ko?0:T)),c.length))===w)T=Vm(c,T,h);else{if(O.push(c.slice(w,T)),O.length===y)return O;for(var j=1;j<=P.length-1;j++)if(O.push(P[j]),O.length===y)return O;T=w=I}}return O.push(c.slice(w)),O}]},!Ko);var Tf=`
|
||
\v\f\r \u2028\u2029\uFEFF`,Zl="["+Tf+"]",$k=RegExp("^"+Zl+Zl+"*"),Bk=RegExp(Zl+Zl+"*$"),xf=function(e){return function(t){var n=String(yi(t));return 1&e&&(n=n.replace($k,"")),2&e&&(n=n.replace(Bk,"")),n}},Hk={start:xf(1),end:xf(2),trim:xf(3)},jk=Hk.trim;_n({target:"String",proto:!0,forced:function(e){return Nt(function(){return!!Tf[e]()||"
"[e]()!="
"||Tf[e].name!==e})}("trim")},{trim:function(){return jk(this)}});var Uk=gf("slice"),Wk=Ho("slice",{ACCESSORS:!0,0:0,1:2}),Kk=Vt("species"),Vk=[].slice,qk=Math.max;_n({target:"Array",proto:!0,forced:!Uk||!Wk},{slice:function(e,t){var n,r,i,o=Fo(this),s=Jn(o.length),l=Vl(e,s),c=Vl(t===void 0?s:t,s);if(Uo(o)&&(typeof(n=o.constructor)!="function"||n!==Array&&!Uo(n.prototype)?cn(n)&&(n=n[Kk])===null&&(n=void 0):n=void 0,n===Array||n===void 0))return Vk.call(o,l,c);for(r=new(n===void 0?Array:n)(qk(c-l,0)),i=0;l<c;l++,i++)l in o&&Wo(r,i,o[l]);return r.length=i,r}});var kf=Object.keys||function(e){return Cm(e,ql)},zk=Nt(function(){kf(1)});_n({target:"Object",stat:!0,forced:zk},{keys:function(e){return kf(Zr(e))}});var Sf,Gk=function(e){if(Um(e))throw TypeError("The method doesn't accept regular expressions");return e},Yk=Vt("match"),Xk=sf.f,qm="".startsWith,Jk=Math.min,zm=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[Yk]=!1,"/./"[e](t)}catch{}}return!1}("startsWith"),Zk=!(zm||(Sf=Xk(String.prototype,"startsWith"),!Sf||Sf.writable));function Gm(e){return(Gm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}_n({target:"String",proto:!0,forced:!Zk&&!zm},{startsWith:function(e){var t=String(yi(this));Gk(e);var n=Jn(Jk(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return qm?qm.call(t,r,n):t.slice(n,n+r.length)===r}});var Vo=function(e){return typeof e=="string"},qo=function(e){return e!==null&&Gm(e)==="object"},zo=function(){function e(){zi(this,e)}return Gi(e,null,[{key:"isWindow",value:function(t){return t===window}},{key:"addEventListener",value:function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&r&&t.addEventListener(n,r,i)}},{key:"removeEventListener",value:function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&r&&t.removeEventListener(n,r,i)}},{key:"triggerDragEvent",value:function(t,n){var r=!1,i=function(s){var l;(l=n.drag)===null||l===void 0||l.call(n,s)},o=function s(l){var c;e.removeEventListener(document,"mousemove",i),e.removeEventListener(document,"mouseup",s),document.onselectstart=null,document.ondragstart=null,r=!1,(c=n.end)===null||c===void 0||c.call(n,l)};e.addEventListener(t,"mousedown",function(s){var l;r||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},e.addEventListener(document,"mousemove",i),e.addEventListener(document,"mouseup",o),r=!0,(l=n.start)===null||l===void 0||l.call(n,s))})}},{key:"getBoundingClientRect",value:function(t){return t&&qo(t)&&t.nodeType===1?t.getBoundingClientRect():null}},{key:"hasClass",value:function(t,n){return!!(t&&qo(t)&&Vo(n)&&t.nodeType===1)&&t.classList.contains(n.trim())}},{key:"addClass",value:function(t,n){if(t&&qo(t)&&Vo(n)&&t.nodeType===1&&(n=n.trim(),!e.hasClass(t,n))){var r=t.className;t.className=r?r+" "+n:n}}},{key:"removeClass",value:function(t,n){if(t&&qo(t)&&Vo(n)&&t.nodeType===1&&typeof t.className=="string"){n=n.trim();for(var r=t.className.trim().split(" "),i=r.length-1;i>=0;i--)r[i]=r[i].trim(),r[i]&&r[i]!==n||r.splice(i,1);t.className=r.join(" ")}}},{key:"toggleClass",value:function(t,n,r){t&&qo(t)&&Vo(n)&&t.nodeType===1&&t.classList.toggle(n,r)}},{key:"replaceClass",value:function(t,n,r){t&&qo(t)&&Vo(n)&&Vo(r)&&t.nodeType===1&&(n=n.trim(),r=r.trim(),e.removeClass(t,n),e.addClass(t,r))}},{key:"getScrollTop",value:function(t){var n="scrollTop"in t?t.scrollTop:t.pageYOffset;return Math.max(n,0)}},{key:"setScrollTop",value:function(t,n){"scrollTop"in t?t.scrollTop=n:t.scrollTo(t.scrollX,n)}},{key:"getRootScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:"setRootScrollTop",value:function(t){e.setScrollTop(window,t),e.setScrollTop(document.body,t)}},{key:"getElementTop",value:function(t,n){if(e.isWindow(t))return 0;var r=n?e.getScrollTop(n):e.getRootScrollTop();return t.getBoundingClientRect().top+r}},{key:"getVisibleHeight",value:function(t){return e.isWindow(t)?t.innerHeight:t.getBoundingClientRect().height}},{key:"isHidden",value:function(t){if(!t)return!1;var n=window.getComputedStyle(t),r=n.display==="none",i=t.offsetParent===null&&n.position!=="fixed";return r||i}},{key:"triggerEvent",value:function(t,n){if("createEvent"in document){var r=document.createEvent("HTMLEvents");r.initEvent(n,!1,!0),t.dispatchEvent(r)}}},{key:"calcAngle",value:function(t,n){var r=t.getBoundingClientRect(),i=r.left+r.width/2,o=r.top+r.height/2,s=Math.abs(i-n.clientX),l=Math.abs(o-n.clientY),c=l/Math.sqrt(Math.pow(s,2)+Math.pow(l,2)),d=Math.acos(c),h=Math.floor(180/(Math.PI/d));return n.clientX>i&&n.clientY>o&&(h=180-h),n.clientX==i&&n.clientY>o&&(h=180),n.clientX>i&&n.clientY==o&&(h=90),n.clientX<i&&n.clientY>o&&(h=180+h),n.clientX<i&&n.clientY==o&&(h=270),n.clientX<i&&n.clientY<o&&(h=360-h),h}},{key:"querySelector",value:function(t,n){return n?n.querySelector(t):document.querySelector(t)}},{key:"createElement",value:function(t){for(var n=document.createElement(t),r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];for(var s=0;s<i.length;s++)i[s]&&n.classList.add(i[s]);return n}},{key:"appendChild",value:function(t){for(var n=0;n<(arguments.length<=1?0:arguments.length-1);n++)t.appendChild(n+1<1||arguments.length<=n+1?void 0:arguments[n+1])}},{key:"getWindow",value:function(t){if(t.toString()!=="[object Window]"){var n=t.ownerDocument;return n&&n.defaultView||window}return t}},{key:"isElement",value:function(t){return t instanceof this.getWindow(t).Element||t instanceof Element}},{key:"isHTMLElement",value:function(t){return t instanceof this.getWindow(t).HTMLElement||t instanceof HTMLElement}},{key:"isShadowRoot",value:function(t){return typeof ShadowRoot<"u"&&(t instanceof this.getWindow(t).ShadowRoot||t instanceof ShadowRoot)}},{key:"getWindowScroll",value:function(t){var n=this.getWindow(t);return{scrollLeft:n.pageXOffset||0,scrollTop:n.pageYOffset||0}}}]),e}(),Qk=Math.floor,eS="".replace,tS=/\$([$&'`]|\d\d?|<[^>]*>)/g,nS=/\$([$&'`]|\d\d?)/g,rS=function(e,t,n,r,i,o){var s=n+e.length,l=r.length,c=nS;return i!==void 0&&(i=Zr(i),c=tS),eS.call(o,c,function(d,h){var p;switch(h.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":p=i[h.slice(1,-1)];break;default:var b=+h;if(b===0)return d;if(b>l){var y=Qk(b/10);return y===0?d:y<=l?r[y-1]===void 0?h.charAt(1):r[y-1]+h.charAt(1):d}p=r[b-1]}return p===void 0?"":p})},iS=Math.max,oS=Math.min;jm("replace",2,function(e,t,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=r.REPLACE_KEEPS_$0,s=i?"$":"$0";return[function(l,c){var d=yi(this),h=l==null?void 0:l[e];return h!==void 0?h.call(l,d,c):t.call(String(d),l,c)},function(l,c){if(!i&&o||typeof c=="string"&&c.indexOf(s)===-1){var d=n(t,l,this,c);if(d.done)return d.value}var h=On(l),p=String(this),b=typeof c=="function";b||(c=String(c));var y=h.global;if(y){var w=h.unicode;h.lastIndex=0}for(var T=[];;){var O=wf(h,p);if(O===null||(T.push(O),!y))break;String(O[0])===""&&(h.lastIndex=Vm(p,Jn(h.lastIndex),w))}for(var I,P="",j=0,L=0;L<T.length;L++){O=T[L];for(var we=String(O[0]),m=iS(oS(Bo(O.index),p.length),0),ce=[],D=1;D<O.length;D++)ce.push((I=O[D])===void 0?I:String(I));var S=O.groups;if(b){var R=[we].concat(ce,m,p);S!==void 0&&R.push(S);var U=String(c.apply(void 0,R))}else U=rS(we,p,m,ce,S,c);m>=j&&(P+=p.slice(j,m)+U,j=m+we.length)}return P+p.slice(j)}]}),function(){function e(){zi(this,e)}return Gi(e,null,[{key:"camelize",value:function(t){return t.replace(/-(\w)/g,function(n,r){return r?r.toUpperCase():""})}},{key:"capitalize",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),e}(),function(){function e(){zi(this,e)}return Gi(e,null,[{key:"_clone",value:function(){}}]),e}();var Ym=Vt("isConcatSpreadable"),sS=Xl>=51||!Nt(function(){var e=[];return e[Ym]=!1,e.concat()[0]!==e}),aS=gf("concat"),lS=function(e){if(!cn(e))return!1;var t=e[Ym];return t!==void 0?!!t:Uo(e)};_n({target:"Array",proto:!0,forced:!sS||!aS},{concat:function(e){var t,n,r,i,o,s=Zr(this),l=Yl(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(lS(o=t===-1?s:arguments[t])){if(c+(i=Jn(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,c++)n in o&&Wo(l,c,o[n])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Wo(l,c++,o)}return l.length=c,l}});var Af,sa=function(e,t,n){if(_f(e),t===void 0)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,i){return e.call(t,r,i)};case 3:return function(r,i,o){return e.call(t,r,i,o)}}return function(){return e.apply(t,arguments)}},Xm=[].push,_i=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,s=e==7,l=e==5||o;return function(c,d,h,p){for(var b,y,w=Zr(c),T=Hl(w),O=sa(d,h,3),I=Jn(T.length),P=0,j=p||Yl,L=t?j(c,I):n||s?j(c,0):void 0;I>P;P++)if((l||P in T)&&(y=O(b=T[P],P,w),e))if(t)L[P]=y;else if(y)switch(e){case 3:return!0;case 5:return b;case 6:return P;case 2:Xm.call(L,b)}else switch(e){case 4:return!1;case 7:Xm.call(L,b)}return o?-1:r||i?i:L}},Jm={forEach:_i(0),map:_i(1),filter:_i(2),some:_i(3),every:_i(4),find:_i(5),findIndex:_i(6),filterOut:_i(7)},uS=cr?Object.defineProperties:function(e,t){On(e);for(var n,r=kf(t),i=r.length,o=0;i>o;)Jr.f(e,n=r[o++],t[n]);return e},cS=Kl("document","documentElement"),Zm=uf("IE_PROTO"),Ef=function(){},Qm=function(e){return"<script>"+e+"<\/script>"},Ql=function(){try{Af=document.domain&&new ActiveXObject("htmlfile")}catch{}var e,t;Ql=Af?function(r){r.write(Qm("")),r.close();var i=r.parentWindow.Object;return r=null,i}(Af):((t=um("iframe")).style.display="none",cS.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(Qm("document.F=Object")),e.close(),e.F);for(var n=ql.length;n--;)delete Ql.prototype[ql[n]];return Ql()};Wl[Zm]=!0;var Of=Object.create||function(e,t){var n;return e!==null?(Ef.prototype=On(e),n=new Ef,Ef.prototype=null,n[Zm]=e):n=Ql(),t===void 0?n:uS(n,t)},Lf=Vt("unscopables"),If=Array.prototype;If[Lf]==null&&Jr.f(If,Lf,{configurable:!0,value:Of(null)});var Go=function(e){If[Lf][e]=!0},fS=Jm.find,ev=!0,dS=Ho("find");"find"in[]&&Array(1).find(function(){ev=!1}),_n({target:"Array",proto:!0,forced:ev||!dS},{find:function(e){return fS(this,e,arguments.length>1?arguments[1]:void 0)}}),Go("find");var pS=Jm.findIndex,tv=!0,hS=Ho("findIndex");"findIndex"in[]&&Array(1).findIndex(function(){tv=!1}),_n({target:"Array",proto:!0,forced:tv||!hS},{findIndex:function(e){return pS(this,e,arguments.length>1?arguments[1]:void 0)}}),Go("findIndex");var nv=function(e,t,n,r,i,o,s,l){for(var c,d=i,h=0,p=!!s&&sa(s,l,3);h<r;){if(h in n){if(c=p?p(n[h],h,t):n[h],o>0&&Uo(c))d=nv(e,t,c,Jn(c.length),d,o-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=c}d++}h++}return d},gS=nv;_n({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=Zr(this),n=Jn(t.length),r=Yl(t,0);return r.length=gS(r,t,t,n,0,e===void 0?1:Bo(e)),r}});var Pf=function(e){var t=e.return;if(t!==void 0)return On(t.call(e)).value},mS=function(e,t,n,r){try{return r?t(On(n)[0],n[1]):t(n)}catch(i){throw Pf(e),i}},Yo={},vS=Vt("iterator"),yS=Array.prototype,rv=function(e){return e!==void 0&&(Yo.Array===e||yS[vS]===e)},bS=Vt("iterator"),iv=function(e){if(e!=null)return e[bS]||e["@@iterator"]||Yo[Lm(e)]},ov=Vt("iterator"),sv=!1;try{var CS=0,av={next:function(){return{done:!!CS++}},return:function(){sv=!0}};av[ov]=function(){return this},Array.from(av,function(){throw 2})}catch{}var lv=function(e,t){if(!t&&!sv)return!1;var n=!1;try{var r={};r[ov]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},_S=!lv(function(e){Array.from(e)});_n({target:"Array",stat:!0,forced:_S},{from:function(e){var t,n,r,i,o,s,l=Zr(e),c=typeof this=="function"?this:Array,d=arguments.length,h=d>1?arguments[1]:void 0,p=h!==void 0,b=iv(l),y=0;if(p&&(h=sa(h,d>2?arguments[2]:void 0,2)),b==null||c==Array&&rv(b))for(n=new c(t=Jn(l.length));t>y;y++)s=p?h(l[y],y):l[y],Wo(n,y,s);else for(o=(i=b.call(l)).next,n=new c;!(r=o.call(i)).done;y++)s=p?mS(i,h,[r.value,y],!0):r.value,Wo(n,y,s);return n.length=y,n}});var uv=function(e){return function(t,n,r,i){_f(n);var o=Zr(t),s=Hl(o),l=Jn(o.length),c=e?l-1:0,d=e?-1:1;if(r<2)for(;;){if(c in s){i=s[c],c+=d;break}if(c+=d,e?c<0:l<=c)throw TypeError("Reduce of empty array with no initial value")}for(;e?c>=0:l>c;c+=d)c in s&&(i=n(i,s[c],c,o));return i}},wS={left:uv(!1),right:uv(!0)},TS=Xr(rn.process)=="process",xS=wS.left,kS=df("reduce"),SS=Ho("reduce",{1:0});_n({target:"Array",proto:!0,forced:!kS||!SS||!TS&&Xl>79&&Xl<83},{reduce:function(e){return xS(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}}),Go("flat");var Yi,cv,fv,AS=!Nt(function(){return Object.isExtensible(Object.preventExtensions({}))}),dv=nf(function(e){var t=Jr.f,n=lf("meta"),r=0,i=Object.isExtensible||function(){return!0},o=function(l){t(l,n,{value:{objectID:"O"+ ++r,weakData:{}}})},s=e.exports={REQUIRED:!1,fastKey:function(l,c){if(!cn(l))return typeof l=="symbol"?l:(typeof l=="string"?"S":"P")+l;if(!Zt(l,n)){if(!i(l))return"F";if(!c)return"E";o(l)}return l[n].objectID},getWeakData:function(l,c){if(!Zt(l,n)){if(!i(l))return!0;if(!c)return!1;o(l)}return l[n].weakData},onFreeze:function(l){return AS&&s.REQUIRED&&i(l)&&!Zt(l,n)&&o(l),l}};Wl[n]=!0}),aa=function(e,t){this.stopped=e,this.result=t},pv=function(e,t,n){var r,i,o,s,l,c,d,h=n&&n.that,p=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),y=!(!n||!n.INTERRUPTED),w=sa(t,h,1+p+y),T=function(I){return r&&Pf(r),new aa(!0,I)},O=function(I){return p?(On(I),y?w(I[0],I[1],T):w(I[0],I[1])):y?w(I,T):w(I)};if(b)r=e;else{if(typeof(i=iv(e))!="function")throw TypeError("Target is not iterable");if(rv(i)){for(o=0,s=Jn(e.length);s>o;o++)if((l=O(e[o]))&&l instanceof aa)return l;return new aa(!1)}r=i.call(e)}for(c=r.next;!(d=c.call(r)).done;){try{l=O(d.value)}catch(I){throw Pf(r),I}if(typeof l=="object"&&l&&l instanceof aa)return l}return new aa(!1)},hv=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},ES=Jr.f,gv=Vt("toStringTag"),Df=function(e,t,n){e&&!Zt(e=n?e:e.prototype,gv)&&ES(e,gv,{configurable:!0,value:t})},eu=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch{}return function(r,i){return On(r),function(o){if(!cn(o)&&o!==null)throw TypeError("Can't set "+String(o)+" as a prototype")}(i),t?e.call(r,i):r.__proto__=i,r}}():void 0),mv=function(e,t,n){for(var r in t)Ci(e,r,t[r],n);return e},OS=!Nt(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),vv=uf("IE_PROTO"),LS=Object.prototype,tu=OS?Object.getPrototypeOf:function(e){return e=Zr(e),Zt(e,vv)?e[vv]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?LS:null},Rf=Vt("iterator"),yv=!1;[].keys&&("next"in(fv=[].keys())?(cv=tu(tu(fv)))!==Object.prototype&&(Yi=cv):yv=!0),(Yi==null||Nt(function(){var e={};return Yi[Rf].call(e)!==e}))&&(Yi={}),Zt(Yi,Rf)||fr(Yi,Rf,function(){return this});var Nf={IteratorPrototype:Yi,BUGGY_SAFARI_ITERATORS:yv},IS=Nf.IteratorPrototype,PS=function(){return this},Mf=Nf.IteratorPrototype,nu=Nf.BUGGY_SAFARI_ITERATORS,la=Vt("iterator"),DS=function(){return this},Ff=function(e,t,n,r,i,o,s){(function(I,P,j){var L=P+" Iterator";I.prototype=Of(IS,{next:Bl(1,j)}),Df(I,L,!1),Yo[L]=PS})(n,t,r);var l,c,d,h=function(I){if(I===i&&T)return T;if(!nu&&I in y)return y[I];switch(I){case"keys":case"values":case"entries":return function(){return new n(this,I)}}return function(){return new n(this)}},p=t+" Iterator",b=!1,y=e.prototype,w=y[la]||y["@@iterator"]||i&&y[i],T=!nu&&w||h(i),O=t=="Array"&&y.entries||w;if(O&&(l=tu(O.call(new e)),Mf!==Object.prototype&&l.next&&(tu(l)!==Mf&&(eu?eu(l,Mf):typeof l[la]!="function"&&fr(l,la,DS)),Df(l,p,!0))),i=="values"&&w&&w.name!=="values"&&(b=!0,T=function(){return w.call(this)}),y[la]!==T&&fr(y,la,T),Yo[t]=T,i)if(c={values:h("values"),keys:o?T:h("keys"),entries:h("entries")},s)for(d in c)(nu||b||!(d in y))&&Ci(y,d,c[d]);else _n({target:t,proto:!0,forced:nu||b},c);return c},bv=Vt("species"),RS=Jr.f,Cv=dv.fastKey,_v=bi.set,$f=bi.getterFor;(function(e,t,n){var r=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=r?"set":"add",s=rn[e],l=s&&s.prototype,c=s,d={},h=function(O){var I=l[O];Ci(l,O,O=="add"?function(P){return I.call(this,P===0?0:P),this}:O=="delete"?function(P){return!(i&&!cn(P))&&I.call(this,P===0?0:P)}:O=="get"?function(P){return i&&!cn(P)?void 0:I.call(this,P===0?0:P)}:O=="has"?function(P){return!(i&&!cn(P))&&I.call(this,P===0?0:P)}:function(P,j){return I.call(this,P===0?0:P,j),this})};if(ff(e,typeof s!="function"||!(i||l.forEach&&!Nt(function(){new s().entries().next()}))))c=n.getConstructor(t,e,r,o),dv.REQUIRED=!0;else if(ff(e,!0)){var p=new c,b=p[o](i?{}:-0,1)!=p,y=Nt(function(){p.has(1)}),w=lv(function(O){new s(O)}),T=!i&&Nt(function(){for(var O=new s,I=5;I--;)O[o](I,I);return!O.has(-0)});w||((c=t(function(O,I){hv(O,c,e);var P=function(j,L,we){var m,ce;return eu&&typeof(m=L.constructor)=="function"&&m!==we&&cn(ce=m.prototype)&&ce!==we.prototype&&eu(j,ce),j}(new s,O,c);return I!=null&&pv(I,P[o],{that:P,AS_ENTRIES:r}),P})).prototype=l,l.constructor=c),(y||T)&&(h("delete"),h("has"),r&&h("get")),(T||b)&&h(o),i&&l.clear&&delete l.clear}d[e]=c,_n({global:!0,forced:c!=s},d),Df(c,e),i||n.setStrong(c,e,r)})("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},{getConstructor:function(e,t,n,r){var i=e(function(c,d){hv(c,i,t),_v(c,{type:t,index:Of(null),first:void 0,last:void 0,size:0}),cr||(c.size=0),d!=null&&pv(d,c[r],{that:c,AS_ENTRIES:n})}),o=$f(t),s=function(c,d,h){var p,b,y=o(c),w=l(c,d);return w?w.value=h:(y.last=w={index:b=Cv(d,!0),key:d,value:h,previous:p=y.last,next:void 0,removed:!1},y.first||(y.first=w),p&&(p.next=w),cr?y.size++:c.size++,b!=="F"&&(y.index[b]=w)),c},l=function(c,d){var h,p=o(c),b=Cv(d);if(b!=="F")return p.index[b];for(h=p.first;h;h=h.next)if(h.key==d)return h};return mv(i.prototype,{clear:function(){for(var c=o(this),d=c.index,h=c.first;h;)h.removed=!0,h.previous&&(h.previous=h.previous.next=void 0),delete d[h.index],h=h.next;c.first=c.last=void 0,cr?c.size=0:this.size=0},delete:function(c){var d=this,h=o(d),p=l(d,c);if(p){var b=p.next,y=p.previous;delete h.index[p.index],p.removed=!0,y&&(y.next=b),b&&(b.previous=y),h.first==p&&(h.first=b),h.last==p&&(h.last=y),cr?h.size--:d.size--}return!!p},forEach:function(c){for(var d,h=o(this),p=sa(c,arguments.length>1?arguments[1]:void 0,3);d=d?d.next:h.first;)for(p(d.value,d.key,this);d&&d.removed;)d=d.previous},has:function(c){return!!l(this,c)}}),mv(i.prototype,n?{get:function(c){var d=l(this,c);return d&&d.value},set:function(c,d){return s(this,c===0?0:c,d)}}:{add:function(c){return s(this,c=c===0?0:c,c)}}),cr&&RS(i.prototype,"size",{get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=$f(t),o=$f(r);Ff(e,t,function(s,l){_v(this,{type:r,target:s,state:i(s),kind:l,last:void 0})},function(){for(var s=o(this),l=s.kind,c=s.last;c&&c.removed;)c=c.previous;return s.target&&(s.last=c=c?c.next:s.state.first)?l=="keys"?{value:c.key,done:!1}:l=="values"?{value:c.value,done:!1}:{value:[c.key,c.value],done:!1}:(s.target=void 0,{value:void 0,done:!0})},n?"entries":"values",!n,!0),function(s){var l=Kl(s),c=Jr.f;cr&&l&&!l[bv]&&c(l,bv,{configurable:!0,get:function(){return this}})}(t)}});var NS=Km.charAt,MS=bi.set,FS=bi.getterFor("String Iterator");Ff(String,"String",function(e){MS(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=FS(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=NS(n,r),t.index+=e.length,{value:e,done:!1})});var wv={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},$S=bi.set,BS=bi.getterFor("Array Iterator"),ua=Ff(Array,"Array",function(e,t){$S(this,{type:"Array Iterator",target:Fo(e),index:0,kind:t})},function(){var e=BS(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");Yo.Arguments=Yo.Array,Go("keys"),Go("values"),Go("entries");var Bf=Vt("iterator"),Tv=Vt("toStringTag"),Hf=ua.values;for(var jf in wv){var xv=rn[jf],Qr=xv&&xv.prototype;if(Qr){if(Qr[Bf]!==Hf)try{fr(Qr,Bf,Hf)}catch{Qr[Bf]=Hf}if(Qr[Tv]||fr(Qr,Tv,jf),wv[jf]){for(var Xo in ua)if(Qr[Xo]!==ua[Xo])try{fr(Qr,Xo,ua[Xo])}catch{Qr[Xo]=ua[Xo]}}}}(function(){function e(){zi(this,e)}return Gi(e,null,[{key:"deduplicate",value:function(t){return Array.from(new Set(t))}},{key:"flat",value:function(t){return t.reduce(function(n,r){var i=Array.isArray(r)?e.flat(r):r;return n.concat(i)},[])}},{key:"find",value:function(t,n){return t.find(n)}},{key:"findIndex",value:function(t,n){return t.findIndex(n)}}]),e})(),function(){function e(){zi(this,e)}return Gi(e,null,[{key:"today",value:function(){return new Date}}]),e}(),function(){function e(){zi(this,e)}return Gi(e,null,[{key:"range",value:function(t,n,r){return Math.min(Math.max(t,n),r)}},{key:"clamp",value:function(t,n,r){return n<r?t<n?n:t>r?r:t:t<r?r:t>n?n:t}}]),e}();var HS=typeof global=="object"&&global&&global.Object===Object&&global;const kv=HS;var jS=typeof self=="object"&&self&&self.Object===Object&&self,US=kv||jS||Function("return this")();const Jo=US;var WS=Jo.Symbol;const ru=WS;var Sv=Object.prototype,KS=Sv.hasOwnProperty,VS=Sv.toString,ca=ru?ru.toStringTag:void 0;function qS(e){var t=KS.call(e,ca),n=e[ca];try{e[ca]=void 0;var r=!0}catch{}var i=VS.call(e);return r&&(t?e[ca]=n:delete e[ca]),i}var zS=Object.prototype,GS=zS.toString;function YS(e){return GS.call(e)}var XS="[object Null]",JS="[object Undefined]",Av=ru?ru.toStringTag:void 0;function iu(e){return e==null?e===void 0?JS:XS:Av&&Av in Object(e)?qS(e):YS(e)}function fa(e){return e!=null&&typeof e=="object"}var ZS=Array.isArray;const Uf=ZS;function Xi(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Ev(e){return e}var QS="[object AsyncFunction]",eA="[object Function]",tA="[object GeneratorFunction]",nA="[object Proxy]";function Wf(e){if(!Xi(e))return!1;var t=iu(e);return t==eA||t==tA||t==QS||t==nA}var rA=Jo["__core-js_shared__"];const Kf=rA;var Ov=function(){var e=/[^.]+$/.exec(Kf&&Kf.keys&&Kf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function iA(e){return!!Ov&&Ov in e}var oA=Function.prototype,sA=oA.toString;function aA(e){if(e!=null){try{return sA.call(e)}catch{}try{return e+""}catch{}}return""}var lA=/[\\^$.*+?()[\]{}|]/g,uA=/^\[object .+?Constructor\]$/,cA=Function.prototype,fA=Object.prototype,dA=cA.toString,pA=fA.hasOwnProperty,hA=RegExp("^"+dA.call(pA).replace(lA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gA(e){if(!Xi(e)||iA(e))return!1;var t=Wf(e)?hA:uA;return t.test(aA(e))}function mA(e,t){return e==null?void 0:e[t]}function Vf(e,t){var n=mA(e,t);return gA(n)?n:void 0}var Lv=Object.create,vA=function(){function e(){}return function(t){if(!Xi(t))return{};if(Lv)return Lv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const yA=vA;function bA(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function CA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var _A=800,wA=16,TA=Date.now;function xA(e){var t=0,n=0;return function(){var r=TA(),i=wA-(r-n);if(n=r,i>0){if(++t>=_A)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function kA(e){return function(){return e}}var SA=function(){try{var e=Vf(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ou=SA;var AA=ou?function(e,t){return ou(e,"toString",{configurable:!0,enumerable:!1,value:kA(t),writable:!0})}:Ev,EA=xA(AA);const OA=EA;var LA=9007199254740991,IA=/^(?:0|[1-9]\d*)$/;function Iv(e,t){var n=typeof e;return t=t??LA,!!t&&(n=="number"||n!="symbol"&&IA.test(e))&&e>-1&&e%1==0&&e<t}function qf(e,t,n){t=="__proto__"&&ou?ou(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function su(e,t){return e===t||e!==e&&t!==t}var PA=Object.prototype,DA=PA.hasOwnProperty;function RA(e,t,n){var r=e[t];(!(DA.call(e,t)&&su(r,n))||n===void 0&&!(t in e))&&qf(e,t,n)}function NA(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var l=t[o],c=r?r(n[l],e[l],l,n,e):void 0;c===void 0&&(c=e[l]),i?qf(n,l,c):RA(n,l,c)}return n}var Pv=Math.max;function MA(e,t,n){return t=Pv(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Pv(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=r[i];return l[t]=n(s),bA(e,this,l)}}function FA(e,t){return OA(MA(e,t,Ev),e+"")}var $A=9007199254740991;function Dv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$A}function zf(e){return e!=null&&Dv(e.length)&&!Wf(e)}function BA(e,t,n){if(!Xi(n))return!1;var r=typeof t;return(r=="number"?zf(n)&&Iv(t,n.length):r=="string"&&t in n)?su(n[t],e):!1}function HA(e){return FA(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,s&&BA(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var l=n[r];l&&e(t,l,r,o)}return t})}var jA=Object.prototype;function Rv(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||jA;return e===n}function UA(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var WA="[object Arguments]";function Nv(e){return fa(e)&&iu(e)==WA}var Mv=Object.prototype,KA=Mv.hasOwnProperty,VA=Mv.propertyIsEnumerable,qA=Nv(function(){return arguments}())?Nv:function(e){return fa(e)&&KA.call(e,"callee")&&!VA.call(e,"callee")};const Gf=qA;function zA(){return!1}var Fv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$v=Fv&&typeof module=="object"&&module&&!module.nodeType&&module,GA=$v&&$v.exports===Fv,Bv=GA?Jo.Buffer:void 0,YA=Bv?Bv.isBuffer:void 0,XA=YA||zA;const Hv=XA;var JA="[object Arguments]",ZA="[object Array]",QA="[object Boolean]",eE="[object Date]",tE="[object Error]",nE="[object Function]",rE="[object Map]",iE="[object Number]",oE="[object Object]",sE="[object RegExp]",aE="[object Set]",lE="[object String]",uE="[object WeakMap]",cE="[object ArrayBuffer]",fE="[object DataView]",dE="[object Float32Array]",pE="[object Float64Array]",hE="[object Int8Array]",gE="[object Int16Array]",mE="[object Int32Array]",vE="[object Uint8Array]",yE="[object Uint8ClampedArray]",bE="[object Uint16Array]",CE="[object Uint32Array]",Mt={};Mt[dE]=Mt[pE]=Mt[hE]=Mt[gE]=Mt[mE]=Mt[vE]=Mt[yE]=Mt[bE]=Mt[CE]=!0,Mt[JA]=Mt[ZA]=Mt[cE]=Mt[QA]=Mt[fE]=Mt[eE]=Mt[tE]=Mt[nE]=Mt[rE]=Mt[iE]=Mt[oE]=Mt[sE]=Mt[aE]=Mt[lE]=Mt[uE]=!1;function _E(e){return fa(e)&&Dv(e.length)&&!!Mt[iu(e)]}function wE(e){return function(t){return e(t)}}var jv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,da=jv&&typeof module=="object"&&module&&!module.nodeType&&module,TE=da&&da.exports===jv,Yf=TE&&kv.process,xE=function(){try{var e=da&&da.require&&da.require("util").types;return e||Yf&&Yf.binding&&Yf.binding("util")}catch{}}();const Uv=xE;var Wv=Uv&&Uv.isTypedArray,kE=Wv?wE(Wv):_E;const Kv=kE;var SE=Object.prototype,AE=SE.hasOwnProperty;function EE(e,t){var n=Uf(e),r=!n&&Gf(e),i=!n&&!r&&Hv(e),o=!n&&!r&&!i&&Kv(e),s=n||r||i||o,l=s?UA(e.length,String):[],c=l.length;for(var d in e)(t||AE.call(e,d))&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Iv(d,c)))&&l.push(d);return l}function OE(e,t){return function(n){return e(t(n))}}function LE(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var IE=Object.prototype,PE=IE.hasOwnProperty;function DE(e){if(!Xi(e))return LE(e);var t=Rv(e),n=[];for(var r in e)r=="constructor"&&(t||!PE.call(e,r))||n.push(r);return n}function Vv(e){return zf(e)?EE(e,!0):DE(e)}var RE=Vf(Object,"create");const pa=RE;function NE(){this.__data__=pa?pa(null):{},this.size=0}function ME(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var FE="__lodash_hash_undefined__",$E=Object.prototype,BE=$E.hasOwnProperty;function HE(e){var t=this.__data__;if(pa){var n=t[e];return n===FE?void 0:n}return BE.call(t,e)?t[e]:void 0}var jE=Object.prototype,UE=jE.hasOwnProperty;function WE(e){var t=this.__data__;return pa?t[e]!==void 0:UE.call(t,e)}var KE="__lodash_hash_undefined__";function VE(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pa&&t===void 0?KE:t,this}function Ji(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ji.prototype.clear=NE,Ji.prototype.delete=ME,Ji.prototype.get=HE,Ji.prototype.has=WE,Ji.prototype.set=VE;function qE(){this.__data__=[],this.size=0}function au(e,t){for(var n=e.length;n--;)if(su(e[n][0],t))return n;return-1}var zE=Array.prototype,GE=zE.splice;function YE(e){var t=this.__data__,n=au(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():GE.call(t,n,1),--this.size,!0}function XE(e){var t=this.__data__,n=au(t,e);return n<0?void 0:t[n][1]}function JE(e){return au(this.__data__,e)>-1}function ZE(e,t){var n=this.__data__,r=au(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ei(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ei.prototype.clear=qE,ei.prototype.delete=YE,ei.prototype.get=XE,ei.prototype.has=JE,ei.prototype.set=ZE;var QE=Vf(Jo,"Map");const qv=QE;function eO(){this.size=0,this.__data__={hash:new Ji,map:new(qv||ei),string:new Ji}}function tO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function lu(e,t){var n=e.__data__;return tO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function nO(e){var t=lu(this,e).delete(e);return this.size-=t?1:0,t}function rO(e){return lu(this,e).get(e)}function iO(e){return lu(this,e).has(e)}function oO(e,t){var n=lu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Zo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zo.prototype.clear=eO,Zo.prototype.delete=nO,Zo.prototype.get=rO,Zo.prototype.has=iO,Zo.prototype.set=oO;var sO=OE(Object.getPrototypeOf,Object);const zv=sO;var aO="[object Object]",lO=Function.prototype,uO=Object.prototype,Gv=lO.toString,cO=uO.hasOwnProperty,fO=Gv.call(Object);function dO(e){if(!fa(e)||iu(e)!=aO)return!1;var t=zv(e);if(t===null)return!0;var n=cO.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Gv.call(n)==fO}function pO(){this.__data__=new ei,this.size=0}function hO(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function gO(e){return this.__data__.get(e)}function mO(e){return this.__data__.has(e)}var vO=200;function yO(e,t){var n=this.__data__;if(n instanceof ei){var r=n.__data__;if(!qv||r.length<vO-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zo(r)}return n.set(e,t),this.size=n.size,this}function Qo(e){var t=this.__data__=new ei(e);this.size=t.size}Qo.prototype.clear=pO,Qo.prototype.delete=hO,Qo.prototype.get=gO,Qo.prototype.has=mO,Qo.prototype.set=yO;var Yv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xv=Yv&&typeof module=="object"&&module&&!module.nodeType&&module,bO=Xv&&Xv.exports===Yv,Jv=bO?Jo.Buffer:void 0,Zv=Jv?Jv.allocUnsafe:void 0;function CO(e,t){if(t)return e.slice();var n=e.length,r=Zv?Zv(n):new e.constructor(n);return e.copy(r),r}var _O=Jo.Uint8Array;const Qv=_O;function wO(e){var t=new e.constructor(e.byteLength);return new Qv(t).set(new Qv(e)),t}function TO(e,t){var n=t?wO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function xO(e){return typeof e.constructor=="function"&&!Rv(e)?yA(zv(e)):{}}function kO(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),l=s.length;l--;){var c=s[e?l:++i];if(n(o[c],c,o)===!1)break}return t}}var SO=kO();const AO=SO;function Xf(e,t,n){(n!==void 0&&!su(e[t],n)||n===void 0&&!(t in e))&&qf(e,t,n)}function EO(e){return fa(e)&&zf(e)}function Jf(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function OO(e){return NA(e,Vv(e))}function LO(e,t,n,r,i,o,s){var l=Jf(e,n),c=Jf(t,n),d=s.get(c);if(d){Xf(e,n,d);return}var h=o?o(l,c,n+"",e,t,s):void 0,p=h===void 0;if(p){var b=Uf(c),y=!b&&Hv(c),w=!b&&!y&&Kv(c);h=c,b||y||w?Uf(l)?h=l:EO(l)?h=CA(l):y?(p=!1,h=CO(c,!0)):w?(p=!1,h=TO(c,!0)):h=[]:dO(c)||Gf(c)?(h=l,Gf(l)?h=OO(l):(!Xi(l)||Wf(l))&&(h=xO(c))):p=!1}p&&(s.set(c,h),i(h,c,r,o,s),s.delete(c)),Xf(e,n,h)}function ey(e,t,n,r,i){e!==t&&AO(t,function(o,s){if(i||(i=new Qo),Xi(o))LO(e,t,s,n,ey,r,i);else{var l=r?r(Jf(e,s),o,s+"",e,t,i):void 0;l===void 0&&(l=o),Xf(e,s,l)}},Vv)}var IO=HA(function(e,t,n){ey(e,t,n)});const uu=IO;var PO=Object.defineProperty,DO=(e,t,n)=>t in e?PO(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wn=(e,t,n)=>(DO(e,typeof t!="symbol"?t+"":t,n),n);const Yt=e=>Math.round(e*100)/100;class qt{constructor(t){wn(this,"instance"),wn(this,"alphaValue",0),wn(this,"redValue",0),wn(this,"greenValue",0),wn(this,"blueValue",0),wn(this,"hueValue",0),wn(this,"saturationValue",0),wn(this,"brightnessValue",0),wn(this,"hslSaturationValue",0),wn(this,"lightnessValue",0),wn(this,"initAlpha",()=>{const n=this.instance.getAlpha();this.alphaValue=Math.min(1,n)*100}),wn(this,"initLightness",()=>{const{s:n,l:r}=this.instance.toHsl();this.hslSaturationValue=Yt(n),this.lightnessValue=Yt(r)}),wn(this,"initRgb",()=>{const{r:n,g:r,b:i}=this.instance.toRgb();this.redValue=Yt(n),this.greenValue=Yt(r),this.blueValue=Yt(i)}),wn(this,"initHsb",()=>{const{h:n,s:r,v:i}=this.instance.toHsv();this.hueValue=Math.min(360,Math.ceil(n)),this.saturationValue=Yt(r),this.brightnessValue=Yt(i)}),wn(this,"toHexString",()=>this.instance.toHexString()),wn(this,"toRgbString",()=>this.instance.toRgbString()),this.instance=De(t),this.initRgb(),this.initHsb(),this.initLightness(),this.initAlpha()}toString(t){return this.instance.toString(t)}get hex(){return this.instance.toHex()}set hex(t){this.instance=De(t),this.initHsb(),this.initRgb(),this.initAlpha(),this.initLightness()}set hue(t){this.saturation===0&&this.brightness===0&&(this.saturationValue=1,this.brightnessValue=1),this.instance=De({h:Yt(t),s:this.saturation,v:this.brightness,a:this.alphaValue/100}),this.initRgb(),this.initLightness(),this.hueValue=Yt(t)}get hue(){return this.hueValue}set saturation(t){this.instance=De({h:this.hue,s:Yt(t),v:this.brightness,a:this.alphaValue/100}),this.initRgb(),this.initLightness(),this.saturationValue=Yt(t)}get saturation(){return this.saturationValue}set brightness(t){this.instance=De({h:this.hue,s:this.saturation,v:Yt(t),a:this.alphaValue/100}),this.initRgb(),this.initLightness(),this.brightnessValue=Yt(t)}get brightness(){return this.brightnessValue}set lightness(t){this.instance=De({h:this.hue,s:this.hslSaturationValue,l:Yt(t),a:this.alphaValue/100}),this.initRgb(),this.initHsb(),this.lightnessValue=Yt(t)}get lightness(){return this.lightnessValue}set red(t){const n=this.instance.toRgb();this.instance=De({...n,r:Yt(t),a:this.alphaValue/100}),this.initHsb(),this.initLightness(),this.redValue=Yt(t)}get red(){return this.redValue}set green(t){const n=this.instance.toRgb();this.instance=De({...n,g:Yt(t),a:this.alphaValue/100}),this.initHsb(),this.initLightness(),this.greenValue=Yt(t)}get green(){return this.greenValue}set blue(t){const n=this.instance.toRgb();this.instance=De({...n,b:Yt(t),a:this.alphaValue/100}),this.initHsb(),this.initLightness(),this.blueValue=Yt(t)}get blue(){return this.blueValue}set alpha(t){this.instance.setAlpha(t/100),this.alphaValue=t}get alpha(){return this.alphaValue}get RGB(){return[this.red,this.green,this.blue,this.alpha/100]}get HSB(){return[this.hue,this.saturation,this.brightness,this.alpha/100]}get HSL(){return[this.hue,this.hslSaturationValue,this.lightness,this.alpha/100]}}function ty(e,t,n,r){return`rgba(${[e,t,n,r/100].join(",")})`}const Zf=(e,t,n)=>t<n?e<t?t:e>n?n:e:e<n?n:e>t?t:e,Qf="color-history",ed=8,dr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},RO=Rn({name:"Alpha",props:{color:at.instanceOf(qt),size:at.oneOf(["small","default"]).def("default")},emits:["change"],setup(e,{emit:t}){const n=Et(null),r=Et(null);let i=e.color||new qt;const o=Dn({red:i.red,green:i.green,blue:i.blue,alpha:i.alpha});rr(()=>e.color,p=>{p&&(i=p,uu(o,{red:p.red,green:p.green,blue:p.blue,alpha:p.alpha}))},{deep:!0});const s=tn(()=>{const p=ty(o.red,o.green,o.blue,0),b=ty(o.red,o.green,o.blue,100);return{background:`linear-gradient(to right, ${p} , ${b})`}}),l=()=>{if(n.value&&r.value){const p=o.alpha/100,b=n.value.getBoundingClientRect(),y=r.value.offsetWidth;return Math.round(p*(b.width-y)+y/2)}return 0},c=tn(()=>({left:l()+"px",top:0})),d=p=>{p.target!==n.value&&h(p)},h=p=>{if(p.stopPropagation(),n.value&&r.value){const b=n.value.getBoundingClientRect(),y=r.value.offsetWidth;let w=p.clientX-b.left;w=Math.max(y/2,w),w=Math.min(w,b.width-y/2);const T=Math.round((w-y/2)/(b.width-y)*100);i.alpha=T,o.alpha=T,t("change",T)}};return Oo(()=>{const p={drag:b=>{h(b)},end:b=>{h(b)}};n.value&&r.value&&zo.triggerDragEvent(n.value,p)}),{barElement:n,cursorElement:r,getCursorStyle:c,getBackgroundStyle:s,onClickSider:d}}}),NO=e=>(vo("data-v-18925ba6"),e=e(),yo(),e),MO=NO(()=>x("div",{class:"vc-alpha-slider__bar-handle"},null,-1)),FO=[MO];function $O(e,t,n,r,i,o){return E(),B("div",{class:Ze(["vc-alpha-slider","transparent",{"small-slider":e.size==="small"}])},[x("div",{ref:"barElement",class:"vc-alpha-slider__bar",style:bt(e.getBackgroundStyle),onClick:t[0]||(t[0]=(...s)=>e.onClickSider&&e.onClickSider(...s))},[x("div",{class:Ze(["vc-alpha-slider__bar-pointer",{"small-bar":e.size==="small"}]),ref:"cursorElement",style:bt(e.getCursorStyle)},FO,6)],4)],2)}const td=dr(RO,[["render",$O],["__scopeId","data-v-18925ba6"]]),BO=[["#fcc02e","#f67c01","#e64a19","#d81b43","#8e24aa","#512da7","#1f87e8","#008781","#05a045"],["#fed835","#fb8c00","#f5511e","#eb1d4e","#9c28b1","#5d35b0","#2097f3","#029688","#4cb050"],["#ffeb3c","#ffa727","#fe5722","#eb4165","#aa47bc","#673bb7","#42a5f6","#26a59a","#83c683"],["#fff176","#ffb74e","#ff8a66","#f1627e","#b968c7","#7986cc","#64b5f6","#80cbc4","#a5d6a7"],["#fff59c","#ffcc80","#ffab91","#fb879e","#cf93d9","#9ea8db","#90caf8","#b2dfdc","#c8e6ca"],["transparent","#ffffff","#dedede","#a9a9a9","#4b4b4b","#353535","#212121","#000000","advance"]],HO=Rn({name:"Palette",emits:["change"],setup(e,{emit:t}){return{palettes:BO,computedBgStyle:n=>n==="transparent"?n:n==="advance"?{}:{background:De(n).toRgbString()},onColorChange:n=>{t("change",n)}}}}),jO={class:"vc-compact"},UO=["onClick"];function WO(e,t,n,r,i,o){return E(),B("div",jO,[(E(!0),B(Be,null,ft(e.palettes,(s,l)=>(E(),B("div",{key:l,class:"vc-compact__row"},[(E(!0),B(Be,null,ft(s,(c,d)=>(E(),B("div",{key:d,class:"vc-compact__color-cube--wrap",onClick:h=>e.onColorChange(c)},[x("div",{class:Ze(["vc-compact__color_cube",{advance:c==="advance",transparent:c==="transparent"}]),style:bt(e.computedBgStyle(c))},null,6)],8,UO))),128))]))),128))])}const ny=dr(HO,[["render",WO],["__scopeId","data-v-b969fd48"]]),KO=Rn({name:"Board",props:{color:at.instanceOf(qt),round:at.bool.def(!1),hide:at.bool.def(!0)},emits:["change"],setup(e,{emit:t}){var n,r,i;const o=kh(),s={h:((n=e.color)==null?void 0:n.hue)||0,s:1,v:1},l=new qt(s).toHexString(),c=Dn({hueColor:l,saturation:((r=e.color)==null?void 0:r.saturation)||0,brightness:((i=e.color)==null?void 0:i.brightness)||0}),d=Et(0),h=Et(0),p=Et(),b=Et(),y=tn(()=>({top:d.value+"px",left:h.value+"px"})),w=()=>{if(o){const I=o.vnode.el;h.value=c.saturation*(I==null?void 0:I.clientWidth),d.value=(1-c.brightness)*(I==null?void 0:I.clientHeight)}},T=I=>{I.target!==b.value&&O(I)},O=I=>{if(o){const P=o.vnode.el,j=P==null?void 0:P.getBoundingClientRect();let L=I.clientX-j.left,we=I.clientY-j.top;L=Zf(L,0,j.width),we=Zf(we,0,j.height);const m=L/j.width,ce=Zf(-(we/j.height)+1,0,1);h.value=L,d.value=we,c.saturation=m,c.brightness=ce,t("change",m,ce)}};return Oo(()=>{o&&o.vnode.el&&p.value&&(zo.triggerDragEvent(p.value,{drag:I=>{O(I)},end:I=>{O(I)}}),Xa(()=>{w()}))}),bn(()=>e.color,I=>{uu(c,{hueColor:new qt({h:I.hue,s:1,v:1}).toHexString(),saturation:I.saturation,brightness:I.brightness}),w()},{deep:!0}),{state:c,cursorElement:p,getCursorStyle:y,onClickBoard:T}}}),nd=e=>(vo("data-v-058e5db2"),e=e(),yo(),e),VO=nd(()=>x("div",{class:"vc-saturation__white"},null,-1)),qO=nd(()=>x("div",{class:"vc-saturation__black"},null,-1)),zO=nd(()=>x("div",null,null,-1)),GO=[zO];function YO(e,t,n,r,i,o){return E(),B("div",{ref:"boardElement",class:Ze(["vc-saturation",{"vc-saturation__chrome":e.round,"vc-saturation__hidden":e.hide}]),style:bt({backgroundColor:e.state.hueColor}),onClick:t[0]||(t[0]=(...s)=>e.onClickBoard&&e.onClickBoard(...s))},[VO,qO,x("div",{class:"vc-saturation__cursor",ref:"cursorElement",style:bt(e.getCursorStyle)},GO,4)],6)}const rd=dr(KO,[["render",YO],["__scopeId","data-v-058e5db2"]]),XO=Rn({name:"Hue",props:{color:at.instanceOf(qt),size:at.oneOf(["small","default"]).def("default")},emits:["change"],setup(e,{emit:t}){const n=Et(null),r=Et(null);let i=e.color||new qt;const o=Dn({hue:i.hue||0});rr(()=>e.color,h=>{h&&(i=h,uu(o,{hue:i.hue}))},{deep:!0});const s=()=>{if(n.value&&r.value){const h=n.value.getBoundingClientRect(),p=r.value.offsetWidth;return o.hue===360?h.width-p/2:o.hue%360*(h.width-p)/360+p/2}return 0},l=tn(()=>({left:s()+"px",top:0})),c=h=>{h.target!==n.value&&d(h)},d=h=>{if(h.stopPropagation(),n.value&&r.value){const p=n.value.getBoundingClientRect(),b=r.value.offsetWidth;let y=h.clientX-p.left;y=Math.min(y,p.width-b/2),y=Math.max(b/2,y);const w=Math.round((y-b/2)/(p.width-b)*360);i.hue=w,o.hue=w,t("change",w)}};return Oo(()=>{const h={drag:p=>{d(p)},end:p=>{d(p)}};n.value&&r.value&&zo.triggerDragEvent(n.value,h)}),{barElement:n,cursorElement:r,getCursorStyle:l,onClickSider:c}}}),JO=e=>(vo("data-v-e1a08576"),e=e(),yo(),e),ZO=JO(()=>x("div",{class:"vc-hue-slider__bar-handle"},null,-1)),QO=[ZO];function eL(e,t,n,r,i,o){return E(),B("div",{class:Ze(["vc-hue-slider",{"small-slider":e.size==="small"}])},[x("div",{ref:"barElement",class:"vc-hue-slider__bar",onClick:t[0]||(t[0]=(...s)=>e.onClickSider&&e.onClickSider(...s))},[x("div",{class:Ze(["vc-hue-slider__bar-pointer",{"small-bar":e.size==="small"}]),ref:"cursorElement",style:bt(e.getCursorStyle)},QO,6)],512)],2)}const id=dr(XO,[["render",eL],["__scopeId","data-v-e1a08576"]]),tL=Rn({name:"Lightness",props:{color:at.instanceOf(qt),size:at.oneOf(["small","default"]).def("default")},emits:["change"],setup(e,{emit:t}){const n=Et(null),r=Et(null);let i=e.color||new qt;const[o,s,l]=i.HSL,c=Dn({hue:o,saturation:s,lightness:l});rr(()=>e.color,w=>{if(w){i=w;const[T,O,I]=i.HSL;uu(c,{hue:T,saturation:O,lightness:I})}},{deep:!0});const d=tn(()=>{const w=De({h:c.hue,s:c.saturation,l:.8}).toPercentageRgbString(),T=De({h:c.hue,s:c.saturation,l:.6}).toPercentageRgbString(),O=De({h:c.hue,s:c.saturation,l:.4}).toPercentageRgbString(),I=De({h:c.hue,s:c.saturation,l:.2}).toPercentageRgbString();return{background:[`linear-gradient(to right, rgb(255, 255, 255), ${w}, ${T}, ${O}, ${I}, rgb(0, 0, 0))`,`-webkit-linear-gradient(left, rgb(255, 255, 255), ${w}, ${T}, ${O}, ${I}, rgb(0, 0, 0))`,`-moz-linear-gradient(left, rgb(255, 255, 255), ${w}, ${T}, ${O}, ${I}, rgb(0, 0, 0))`,`-ms-linear-gradient(left, rgb(255, 255, 255), ${w}, ${T}, ${O}, ${I}, rgb(0, 0, 0))`]}}),h=()=>{if(n.value&&r.value){const w=c.lightness,T=n.value.getBoundingClientRect(),O=r.value.offsetWidth;return(1-w)*(T.width-O)+O/2}return 0},p=tn(()=>({left:h()+"px",top:0})),b=w=>{w.target!==n.value&&y(w)},y=w=>{if(w.stopPropagation(),n.value&&r.value){const T=n.value.getBoundingClientRect(),O=r.value.offsetWidth;let I=w.clientX-T.left;I=Math.max(O/2,I),I=Math.min(I,T.width-O/2);const P=1-(I-O/2)/(T.width-O);i.lightness=P,t("change",P)}};return Oo(()=>{const w={drag:T=>{y(T)},end:T=>{y(T)}};n.value&&r.value&&zo.triggerDragEvent(n.value,w)}),{barElement:n,cursorElement:r,getCursorStyle:p,getBackgroundStyle:d,onClickSider:b}}}),nL=e=>(vo("data-v-94a50a9e"),e=e(),yo(),e),rL=nL(()=>x("div",{class:"vc-lightness-slider__bar-handle"},null,-1)),iL=[rL];function oL(e,t,n,r,i,o){return E(),B("div",{class:Ze(["vc-lightness-slider",{"small-slider":e.size==="small"}])},[x("div",{ref:"barElement",class:"vc-lightness-slider__bar",style:bt(e.getBackgroundStyle),onClick:t[0]||(t[0]=(...s)=>e.onClickSider&&e.onClickSider(...s))},[x("div",{class:Ze(["vc-lightness-slider__bar-pointer",{"small-bar":e.size==="small"}]),ref:"cursorElement",style:bt(e.getCursorStyle)},iL,6)],4)],2)}const ry=dr(tL,[["render",oL],["__scopeId","data-v-94a50a9e"]]),sL=Rn({name:"History",props:{colors:at.arrayOf(String).def(()=>[]),round:at.bool.def(!1)},emits:["change"],setup(e,{emit:t}){return{onColorSelect:n=>{t("change",n)}}}}),aL={key:0,class:"vc-colorPicker__record"},lL={class:"color-list"},uL=["onClick"];function cL(e,t,n,r,i,o){return e.colors&&e.colors.length>0?(E(),B("div",aL,[x("div",lL,[(E(!0),B(Be,null,ft(e.colors,(s,l)=>(E(),B("div",{key:l,class:Ze(["color-item","transparent",{"color-item__round":e.round}]),onClick:c=>e.onColorSelect(s)},[x("div",{class:"color-item__display",style:bt({backgroundColor:s})},null,4)],10,uL))),128))])])):Pe("",!0)}const od=dr(sL,[["render",cL],["__scopeId","data-v-0f657238"]]),fL=Rn({name:"Display",props:{color:at.instanceOf(qt),disableAlpha:at.bool.def(!1)},emits:["update:color","change"],setup(e,{emit:t}){var n,r,i,o;const s=Et("hex"),l=Dn({color:e.color,hex:(n=e.color)==null?void 0:n.hex,alpha:((r=e.color)==null?void 0:r.alpha)+"%",rgba:(i=e.color)==null?void 0:i.RGB,previewBgColor:(o=e.color)==null?void 0:o.toRgbString()}),c=tn(()=>({background:l.previewBgColor})),d=()=>{s.value=s.value==="rgba"?"hex":"rgba"},h=Hi(b=>{if(!b.target.value)return;let y=parseInt(b.target.value.replace("%",""));y>100&&(b.target.value="100%",y=100),y<0&&(b.target.value="0%",y=0),isNaN(y)&&(b.target.value="100%",y=100),!isNaN(y)&&l.color&&(l.color.alpha=y),t("update:color",l.color),t("change",l.color)},300),p=Hi((b,y)=>{if(console.log(b.target.value),!!b.target.value){if(s.value==="hex"){const w=b.target.value.replace("#","");De(w).isValid()&&l.color&&(l.color.hex=w)}else if(y!==void 0&&l.rgba&&l.color){b.target.value<0&&(b.target.value=0),y===3&&b.target.value>1&&(b.target.value=1),y<3&&b.target.value>255&&(b.target.value=255),l.rgba[y]=Number(b.target.value);const[w,T,O,I]=l.rgba;l.color.hex=De({r:w,g:T,b:O}).toHex(),l.color.alpha=Math.floor(I*100)}t("update:color",l.color),t("change",l.color)}},300);return bn(()=>e.color,b=>{b&&(l.color=b,l.alpha=Math.floor(l.color.alpha)+"%",l.hex=l.color.hex,l.rgba=l.color.RGB)},{deep:!0}),bn(()=>l.color,()=>{l.color&&(l.previewBgColor=l.color.toRgbString())},{deep:!0}),{state:l,getBgColorStyle:c,inputType:s,onInputTypeChange:d,onAlphaBlur:h,onInputChange:p}}}),dL={class:"vc-display"},pL={class:"vc-current-color vc-transparent"},hL={key:0,style:{display:"flex",flex:"1",gap:"4px",height:"100%"}},gL={class:"vc-color-input"},mL=["value"],vL={key:0,class:"vc-alpha-input"},yL=["value"],bL={key:1,style:{display:"flex",flex:"1",gap:"4px",height:"100%"}},CL=["value","onInput"];function _L(e,t,n,r,i,o){return E(),B("div",dL,[x("div",pL,[x("div",{class:"color-cube",style:bt(e.getBgColorStyle)},null,4)]),e.inputType==="hex"?(E(),B("div",hL,[x("div",gL,[x("input",{value:e.state.hex,onInput:t[0]||(t[0]=(...s)=>e.onInputChange&&e.onInputChange(...s))},null,40,mL)]),e.disableAlpha?Pe("",!0):(E(),B("div",vL,[x("input",{class:"vc-alpha-input__inner",value:e.state.alpha,onInput:t[1]||(t[1]=(...s)=>e.onAlphaBlur&&e.onAlphaBlur(...s))},null,40,yL)]))])):e.state.rgba?(E(),B("div",bL,[(E(!0),B(Be,null,ft(e.state.rgba,(s,l)=>(E(),B("div",{class:"vc-rgb-input",key:l},[x("div",null,[x("input",{value:s,onInput:c=>e.onInputChange(c,l)},null,40,CL)]),x("div",null,ue(["R","G","B","A"][l]),1)]))),128))])):Pe("",!0),x("div",{class:"vc-input-toggle",onClick:t[2]||(t[2]=(...s)=>e.onInputTypeChange&&e.onInputTypeChange(...s))})])}const sd=dr(fL,[["render",_L],["__scopeId","data-v-f6f511ec"]]),wL=Rn({name:"FkColorPicker",components:{Display:sd,Alpha:td,Palette:ny,Board:rd,Hue:id,Lightness:ry,History:od},props:{color:at.instanceOf(qt),disableHistory:at.bool.def(!1),roundHistory:at.bool.def(!1),disableAlpha:at.bool.def(!1)},emits:["update:color","change","advanceChange"],setup(e,{emit:t}){const n=e.color||new qt,r=Dn({color:n,hex:n.toHexString(),rgb:n.toRgbString()}),i=Et(!1),o=tn(()=>({background:r.rgb})),s=()=>{i.value=!1,t("advanceChange",!1)},l=Vc(Qf,[],{}),c=Hi(()=>{if(e.disableHistory)return;const T=r.color.toRgbString();if(l.value=l.value.filter(O=>!De.equals(O,T)),!l.value.includes(T)){for(;l.value.length>ed;)l.value.pop();l.value.unshift(T)}},500),d=T=>{T==="advance"?(i.value=!0,t("advanceChange",!0)):(r.color.hex=T,t("advanceChange",!1))},h=T=>{r.color.alpha=T},p=T=>{r.color.hue=T},b=(T,O)=>{r.color.saturation=T,r.color.brightness=O},y=T=>{r.color.lightness=T},w=T=>{const O=T.target.value.replace("#","");De(O).isValid()&&(r.color.hex=O)};return bn(()=>e.color,T=>{T&&(r.color=T)},{deep:!0}),bn(()=>r.color,()=>{r.hex=r.color.hex,r.rgb=r.color.toRgbString(),c(),t("update:color",r.color),t("change",r.color)},{deep:!0}),{state:r,advancePanelShow:i,onBack:s,onCompactChange:d,onAlphaChange:h,onHueChange:p,onBoardChange:b,onLightChange:y,onInputChange:w,previewStyle:o,historyColors:l}}}),TL=e=>(vo("data-v-0d5bef46"),e=e(),yo(),e),xL={class:"vc-fk-colorPicker"},kL={class:"vc-fk-colorPicker__inner"},SL={class:"vc-fk-colorPicker__header"},AL=TL(()=>x("div",{class:"back"},null,-1)),EL=[AL];function OL(e,t,n,r,i,o){const s=st("Palette"),l=st("Board"),c=st("Hue"),d=st("Lightness"),h=st("Alpha"),p=st("Display"),b=st("History");return E(),B("div",xL,[x("div",kL,[x("div",SL,[e.advancePanelShow?(E(),B("span",{key:0,style:{cursor:"pointer"},onClick:t[0]||(t[0]=(...y)=>e.onBack&&e.onBack(...y))},EL)):Pe("",!0)]),e.advancePanelShow?Pe("",!0):(E(),Qe(s,{key:0,onChange:e.onCompactChange},null,8,["onChange"])),e.advancePanelShow?(E(),Qe(l,{key:1,color:e.state.color,onChange:e.onBoardChange},null,8,["color","onChange"])):Pe("",!0),e.advancePanelShow?(E(),Qe(c,{key:2,color:e.state.color,onChange:e.onHueChange},null,8,["color","onChange"])):Pe("",!0),e.advancePanelShow?Pe("",!0):(E(),Qe(d,{key:3,color:e.state.color,onChange:e.onLightChange},null,8,["color","onChange"])),e.disableAlpha?Pe("",!0):(E(),Qe(h,{key:4,color:e.state.color,onChange:e.onAlphaChange},null,8,["color","onChange"])),xe(p,{color:e.state.color,"disable-alpha":e.disableAlpha},null,8,["color","disable-alpha"]),e.disableHistory?Pe("",!0):(E(),Qe(b,{key:5,round:e.roundHistory,colors:e.historyColors,onChange:e.onCompactChange},null,8,["round","colors","onChange"]))])])}const iy=dr(wL,[["render",OL],["__scopeId","data-v-0d5bef46"]]),LL=Rn({name:"ChromeColorPicker",components:{Display:sd,Alpha:td,Board:rd,Hue:id,History:od},props:{color:at.instanceOf(qt),disableHistory:at.bool.def(!1),roundHistory:at.bool.def(!1),disableAlpha:at.bool.def(!1)},emits:["update:color","change"],setup(e,{emit:t}){const n=e.color||new qt,r=Dn({color:n,hex:n.toHexString(),rgb:n.toRgbString()}),i=tn(()=>({background:r.rgb})),o=Vc(Qf,[],{}),s=Hi(()=>{if(e.disableHistory)return;const p=r.color.toRgbString();if(o.value=o.value.filter(b=>!De.equals(b,p)),!o.value.includes(p)){for(;o.value.length>ed;)o.value.pop();o.value.unshift(p)}},500),l=p=>{r.color.alpha=p},c=p=>{r.color.hue=p},d=(p,b)=>{r.color.saturation=p,r.color.brightness=b},h=p=>{p!=="advance"&&(r.color.hex=p)};return bn(()=>e.color,p=>{p&&(r.color=p)},{deep:!0}),bn(()=>r.color,()=>{r.hex=r.color.hex,r.rgb=r.color.toRgbString(),s(),t("update:color",r.color),t("change",r.color)},{deep:!0}),{state:r,previewStyle:i,historyColors:o,onAlphaChange:l,onHueChange:c,onBoardChange:d,onCompactChange:h}}}),IL={class:"vc-chrome-colorPicker"},PL={class:"vc-chrome-colorPicker-body"},DL={class:"chrome-controls"},RL={class:"chrome-sliders"};function NL(e,t,n,r,i,o){const s=st("Board"),l=st("Hue"),c=st("Alpha"),d=st("Display"),h=st("History");return E(),B("div",IL,[xe(s,{round:!0,hide:!1,color:e.state.color,onChange:e.onBoardChange},null,8,["color","onChange"]),x("div",PL,[x("div",DL,[x("div",RL,[xe(l,{size:"small",color:e.state.color,onChange:e.onHueChange},null,8,["color","onChange"]),e.disableAlpha?Pe("",!0):(E(),Qe(c,{key:0,size:"small",color:e.state.color,onChange:e.onAlphaChange},null,8,["color","onChange"]))])]),xe(d,{color:e.state.color,"disable-alpha":e.disableAlpha},null,8,["color","disable-alpha"]),e.disableHistory?Pe("",!0):(E(),Qe(h,{key:0,round:e.roundHistory,colors:e.historyColors,onChange:e.onCompactChange},null,8,["round","colors","onChange"]))])])}const oy=dr(LL,[["render",NL],["__scopeId","data-v-33636434"]]),ad="Vue3ColorPickerProvider",ML=(e,t)=>{const n=e.getBoundingClientRect(),r=n.left+n.width/2,i=n.top+n.height/2,o=Math.abs(r-t.clientX),s=Math.abs(i-t.clientY),l=Math.sqrt(Math.pow(o,2)+Math.pow(s,2)),c=s/l,d=Math.acos(c);let h=Math.floor(180/(Math.PI/d));return t.clientX>r&&t.clientY>i&&(h=180-h),t.clientX==r&&t.clientY>i&&(h=180),t.clientX>r&&t.clientY==i&&(h=90),t.clientX<r&&t.clientY>i&&(h=180+h),t.clientX<r&&t.clientY==i&&(h=270),t.clientX<r&&t.clientY<i&&(h=360-h),h};let ld=!1;const FL=(e,t)=>{const n=function(i){var o;(o=t.drag)==null||o.call(t,i)},r=function(i){var o;document.removeEventListener("mousemove",n,!1),document.removeEventListener("mouseup",r,!1),document.onselectstart=null,document.ondragstart=null,ld=!1,(o=t.end)==null||o.call(t,i)};e&&e.addEventListener("mousedown",i=>{var o;ld||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",r,!1),ld=!0,(o=t.start)==null||o.call(t,i))})},$L={angle:{type:Number,default:0},size:{type:Number,default:16,validator:e=>e>=16},borderWidth:{type:Number,default:1,validator:e=>e>=1},borderColor:{type:String,default:"#666"}},BL=Rn({name:"Angle",props:$L,emits:["update:angle","change"],setup(e,{emit:t}){const n=Et(null),r=Et(0);rr(()=>e.angle,l=>{r.value=l});const i=()=>{let l=Number(r.value);isNaN(l)||(l=l>360||l<0?e.angle:l,r.value=l===360?0:l,t("update:angle",r.value),t("change",r.value))},o=tn(()=>({width:e.size+"px",height:e.size+"px",borderWidth:e.borderWidth+"px",borderColor:e.borderColor,transform:`rotate(${r.value}deg)`})),s=l=>{n.value&&(r.value=ML(n.value,l)%360,i())};return lc(()=>{const l={drag:c=>{s(c)},end:c=>{s(c)}};n.value&&FL(n.value,l)}),()=>xe("div",{class:"bee-angle"},[xe("div",{class:"bee-angle__round",ref:n,style:o.value},null)])}}),HL=Rn({name:"GradientColorPicker",components:{Angle:BL,Display:sd,Alpha:td,Palette:ny,Board:rd,Hue:id,Lightness:ry,History:od},props:{startColor:at.instanceOf(qt).isRequired,endColor:at.instanceOf(qt).isRequired,startColorStop:at.number.def(0),endColorStop:at.number.def(100),angle:at.number.def(0),type:at.oneOf(["linear","radial"]).def("linear"),disableHistory:at.bool.def(!1),roundHistory:at.bool.def(!1),disableAlpha:at.bool.def(!1),pickerType:at.oneOf(["fk","chrome"]).def("fk")},emits:["update:startColor","update:endColor","update:angle","update:startColorStop","update:endColorStop","startColorChange","endColorChange","advanceChange","angleChange","startColorStopChange","endColorStopChange","typeChange"],setup(e,{emit:t}){const n=Dn({startActive:!0,startColor:e.startColor,endColor:e.endColor,startColorStop:e.startColorStop,endColorStop:e.endColorStop,angle:e.angle,type:e.type,startColorRgba:e.startColor.toRgbString(),endColorRgba:e.endColor.toRgbString()}),r=bo(ad),i=Et(e.pickerType==="chrome"),o=Et(),s=Et(),l=Et();rr(()=>[e.startColor,e.endColor,e.angle],U=>{n.startColor=U[0],n.endColor=U[1],n.angle=U[2]}),rr(()=>e.type,U=>{n.type=U});const c=tn({get:()=>n.startActive?n.startColor:n.endColor,set:U=>{if(n.startActive){n.startColor=U;return}n.endColor=U}}),d=tn(()=>{if(l.value&&o.value){const U=n.startColorStop/100,ee=l.value.getBoundingClientRect(),J=o.value.offsetWidth;return Math.round(U*(ee.width-J)+J/2)}return 0}),h=tn(()=>{if(l.value&&s.value){const U=n.endColorStop/100,ee=l.value.getBoundingClientRect(),J=s.value.offsetWidth;return Math.round(U*(ee.width-J)+J/2)}return 0}),p=tn(()=>{let U=`background: linear-gradient(${n.angle}deg, ${n.startColorRgba} ${n.startColorStop}%, ${n.endColorRgba} ${n.endColorStop}%)`;return n.type==="radial"&&(U=`background: radial-gradient(circle, ${n.startColorRgba} ${n.startColorStop}%, ${n.endColorRgba} ${n.endColorStop}%)`),U}),b=U=>{var ee;if(n.startActive=!0,l.value&&o.value){const J=(ee=l.value)==null?void 0:ee.getBoundingClientRect();let be=U.clientX-J.left;be=Math.max(o.value.offsetWidth/2,be),be=Math.min(be,J.width-o.value.offsetWidth/2),n.startColorStop=Math.round((be-o.value.offsetWidth/2)/(J.width-o.value.offsetWidth)*100),t("update:startColorStop",n.startColorStop),t("startColorStopChange",n.startColorStop)}},y=U=>{var ee;if(n.startActive=!1,l.value&&s.value){const J=(ee=l.value)==null?void 0:ee.getBoundingClientRect();let be=U.clientX-J.left;be=Math.max(s.value.offsetWidth/2,be),be=Math.min(be,J.width-s.value.offsetWidth/2),n.endColorStop=Math.round((be-s.value.offsetWidth/2)/(J.width-s.value.offsetWidth)*100),t("update:endColorStop",n.endColorStop),t("endColorStopChange",n.endColorStop)}},w=U=>{const ee=U.target,J=parseInt(ee.value.replace("°",""));isNaN(J)||(n.angle=J%360),t("update:angle",n.angle),t("angleChange",n.angle)},T=U=>{n.angle=U,t("update:angle",n.angle),t("angleChange",n.angle)},O=U=>{U==="advance"?(i.value=!0,t("advanceChange",!0)):(c.value.hex=U,t("advanceChange",!1)),m()},I=U=>{c.value.alpha=U,m()},P=U=>{c.value.hue=U,m()},j=(U,ee)=>{c.value.saturation=U,c.value.brightness=ee,m()},L=U=>{c.value.lightness=U,m()},we=()=>{m()},m=()=>{n.startActive?(t("update:startColor",n.startColor),t("startColorChange",n.startColor)):(t("update:endColor",n.endColor),t("endColorChange",n.endColor))},ce=()=>{i.value=!1,t("advanceChange",!1)},D=()=>{n.type=n.type==="linear"?"radial":"linear",t("typeChange",n.type)},S=Vc(Qf,[],{}),R=Hi(()=>{if(e.disableHistory)return;const U=c.value.toRgbString();if(S.value=S.value.filter(ee=>!De.equals(ee,U)),!S.value.includes(U)){for(;S.value.length>ed;)S.value.pop();S.value.unshift(U)}},500);return Oo(()=>{s.value&&o.value&&(zo.triggerDragEvent(s.value,{drag:U=>{y(U)},end:U=>{y(U)}}),zo.triggerDragEvent(o.value,{drag:U=>{b(U)},end:U=>{b(U)}}))}),bn(()=>n.startColor,U=>{n.startColorRgba=U.toRgbString()},{deep:!0}),bn(()=>n.endColor,U=>{n.endColorRgba=U.toRgbString()},{deep:!0}),bn(()=>c.value,()=>{R()},{deep:!0}),{startGradientRef:o,stopGradientRef:s,colorRangeRef:l,state:n,currentColor:c,getStartColorLeft:d,getEndColorLeft:h,gradientBg:p,advancePanelShow:i,onDegreeBlur:w,onCompactChange:O,onAlphaChange:I,onHueChange:P,onBoardChange:j,onLightChange:L,historyColors:S,onBack:ce,onDegreeChange:T,onDisplayChange:we,onTypeChange:D,lang:r==null?void 0:r.lang}}}),sy=e=>(vo("data-v-1e7e32e5"),e=e(),yo(),e),jL={class:"vc-gradient-picker"},UL={class:"vc-gradient-picker__header"},WL={class:"vc-gradient__types"},KL={class:"vc-gradient-picker__body"},VL={class:"vc-color-range",ref:"colorRangeRef"},qL={class:"vc-color-range__container"},zL={class:"vc-gradient__stop__container"},GL=["title"],YL=sy(()=>x("span",{class:"vc-gradient__stop--inner"},null,-1)),XL=[YL],JL=["title"],ZL=sy(()=>x("span",{class:"vc-gradient__stop--inner"},null,-1)),QL=[ZL],eI={class:"vc-picker-degree-input vc-degree-input"},tI={class:"vc-degree-input__control"},nI=["value"],rI={class:"vc-degree-input__panel"},iI={class:"vc-degree-input__disk"};function oI(e,t,n,r,i,o){var s,l;const c=st("Angle"),d=st("Board"),h=st("Hue"),p=st("Palette"),b=st("Lightness"),y=st("Alpha"),w=st("Display"),T=st("History");return E(),B("div",jL,[x("div",UL,[x("div",null,[ye(x("div",{class:"back",style:{cursor:"pointer"},onClick:t[0]||(t[0]=(...O)=>e.onBack&&e.onBack(...O))},null,512),[[Ot,e.pickerType==="fk"&&e.advancePanelShow]])]),x("div",WL,[(E(),B(Be,null,ft(["linear","radial"],O=>x("div",{class:Ze(["vc-gradient__type",{active:e.state.type===O}]),key:O,onClick:t[1]||(t[1]=(...I)=>e.onTypeChange&&e.onTypeChange(...I))},ue(e.lang?e.lang[O]:O),3)),64))])]),x("div",KL,[x("div",VL,[x("div",qL,[x("div",{class:"vc-background",style:bt(e.gradientBg)},null,4),x("div",zL,[x("div",{class:Ze(["vc-gradient__stop",{"vc-gradient__stop--current":e.state.startActive}]),ref:"startGradientRef",title:(s=e.lang)==null?void 0:s.start,style:bt({left:e.getStartColorLeft+"px"})},XL,14,GL),x("div",{class:Ze(["vc-gradient__stop",{"vc-gradient__stop--current":!e.state.startActive}]),ref:"stopGradientRef",title:(l=e.lang)==null?void 0:l.end,style:bt({left:e.getEndColorLeft+"px"})},QL,14,JL)])])],512),x("div",eI,[x("div",tI,[x("input",{value:e.state.angle,onBlur:t[2]||(t[2]=(...O)=>e.onDegreeBlur&&e.onDegreeBlur(...O))},null,40,nI),Xt("deg ")]),x("div",rI,[x("div",iI,[xe(c,{angle:e.state.angle,"onUpdate:angle":t[3]||(t[3]=O=>e.state.angle=O),size:40,onChange:e.onDegreeChange},null,8,["angle","onChange"])])])])]),e.advancePanelShow?(E(),Qe(d,{key:0,color:e.currentColor,onChange:e.onBoardChange},null,8,["color","onChange"])):Pe("",!0),e.advancePanelShow?(E(),Qe(h,{key:1,color:e.currentColor,onChange:e.onHueChange},null,8,["color","onChange"])):Pe("",!0),e.advancePanelShow?Pe("",!0):(E(),Qe(p,{key:2,onChange:e.onCompactChange},null,8,["onChange"])),e.advancePanelShow?Pe("",!0):(E(),Qe(b,{key:3,color:e.currentColor,onChange:e.onLightChange},null,8,["color","onChange"])),e.disableAlpha?Pe("",!0):(E(),Qe(y,{key:4,color:e.currentColor,onChange:e.onAlphaChange},null,8,["color","onChange"])),xe(w,{color:e.currentColor,"disable-alpha":e.disableAlpha,onChange:e.onDisplayChange},null,8,["color","disable-alpha","onChange"]),e.disableHistory?Pe("",!0):(E(),Qe(T,{key:5,round:e.roundHistory,colors:e.historyColors,onChange:e.onCompactChange},null,8,["round","colors","onChange"]))])}const ay=dr(HL,[["render",oI],["__scopeId","data-v-1e7e32e5"]]),sI=Rn({name:"WrapContainer",props:{theme:at.oneOf(["white","black"]).def("white"),showTab:at.bool.def(!1),activeKey:at.oneOf(["pure","gradient"]).def("pure")},emits:["update:activeKey","change"],setup(e,{emit:t}){const n=Dn({activeKey:e.activeKey}),r=bo(ad),i=o=>{n.activeKey=o,t("update:activeKey",o),t("change",o)};return bn(()=>e.activeKey,o=>{n.activeKey=o}),{state:n,onActiveKeyChange:i,lang:r==null?void 0:r.lang}}}),aI={class:"vc-colorpicker--container"},lI={key:0,class:"vc-colorpicker--tabs"},uI={class:"vc-colorpicker--tabs__inner"},cI={class:"vc-btn__content"},fI={class:"vc-btn__content"};function dI(e,t,n,r,i,o){var s,l;return E(),B("div",{class:Ze(["vc-colorpicker",e.theme])},[x("div",aI,[e.showTab?(E(),B("div",lI,[x("div",uI,[x("div",{class:Ze(["vc-colorpicker--tabs__btn",{"vc-btn-active":e.state.activeKey==="pure"}]),onClick:t[0]||(t[0]=c=>e.onActiveKeyChange("pure"))},[x("button",null,[x("div",cI,ue((s=e.lang)==null?void 0:s.pure),1)])],2),x("div",{class:Ze(["vc-colorpicker--tabs__btn",{"vc-btn-active":e.state.activeKey==="gradient"}]),onClick:t[1]||(t[1]=c=>e.onActiveKeyChange("gradient"))},[x("button",null,[x("div",fI,ue((l=e.lang)==null?void 0:l.gradient),1)])],2),x("div",{class:"vc-colorpicker--tabs__bg",style:bt({width:"50%",left:`calc(${e.state.activeKey==="gradient"?50:0}%)`})},null,4)])])):Pe("",!0),r_(e.$slots,"default",{},void 0,!0)])],2)}const pI=dr(sI,[["render",dI],["__scopeId","data-v-0492277d"]]),hI={start:"Start",end:"End",pure:"Pure",gradient:"Gradient",linear:"linear",radial:"radial"},gI={start:"开始",end:"结束",pure:"纯色",gradient:"渐变",linear:"线性",radial:"径向"},mI={En:hI,"ZH-cn":gI},vI={isWidget:at.bool.def(!1),pickerType:at.oneOf(["fk","chrome"]).def("fk"),shape:at.oneOf(["circle","square"]).def("square"),pureColor:{type:[String,Object],default:"#000000"},gradientColor:at.string.def("linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(0, 0, 0, 1) 100%)"),format:{type:String,default:"rgb"},disableAlpha:at.bool.def(!1),disableHistory:at.bool.def(!1),roundHistory:at.bool.def(!1),useType:at.oneOf(["pure","gradient","both"]).def("pure"),activeKey:at.oneOf(["pure","gradient"]).def("pure"),lang:{type:String,default:"ZH-cn"},zIndex:at.number.def(9999),pickerContainer:{type:String||HTMLElement,default:"body"},debounce:at.number.def(100),theme:at.oneOf(["white","black"]).def("white")},yI=Rn({name:"ColorPicker",components:{FkColorPicker:iy,ChromeColorPicker:oy,GradientColorPicker:ay,WrapContainer:pI},inheritAttrs:!1,props:vI,emits:["update:pureColor","pureColorChange","update:gradientColor","gradientColorChange","update:activeKey","activeKeyChange"],setup(e,{emit:t}){Xp(ad,{lang:tn(()=>mI[e.lang||"ZH-cn"])});const n=Dn({pureColor:e.pureColor||"",activeKey:e.useType==="gradient"?"gradient":e.activeKey,isAdvanceMode:!1}),r=new qt("#000"),i=new qt("#000"),o=new qt(n.pureColor),s=Dn({startColor:r,endColor:i,startColorStop:0,endColorStop:100,angle:0,type:"linear",gradientColor:e.gradientColor}),l=Et(o),c=Et(!1),d=Et(null),h=Et(null);let p=null;const b=tn(()=>({background:n.activeKey!=="gradient"?De(n.pureColor).toRgbString():s.gradientColor})),y=tn(()=>n.activeKey==="gradient"?ay.name:e.pickerType==="fk"?iy.name:oy.name),w=S=>{n.isAdvanceMode=S},T=tn(()=>{const S={disableAlpha:e.disableAlpha,disableHistory:e.disableHistory,roundHistory:e.roundHistory,pickerType:e.pickerType};return n.activeKey==="gradient"?{...S,startColor:s.startColor,endColor:s.endColor,angle:s.angle,type:s.type,startColorStop:s.startColorStop,endColorStop:s.endColorStop,onStartColorChange:R=>{s.startColor=R,j()},onEndColorChange:R=>{s.endColor=R,j()},onStartColorStopChange:R=>{s.startColorStop=R,j()},onEndColorStopChange:R=>{s.endColorStop=R,j()},onAngleChange:R=>{s.angle=R,j()},onTypeChange:R=>{s.type=R,j()},onAdvanceChange:w}:{...S,disableAlpha:e.disableAlpha,disableHistory:e.disableHistory,roundHistory:e.roundHistory,color:l.value,onChange:m,onAdvanceChange:w}}),O=()=>{c.value=!0,p?p.update():we()},I=()=>{c.value=!1},P=()=>{var S,R,U,ee;try{const[J]=rT(s.gradientColor);if(J&&J.type.includes("gradient")&&J.colorStops.length>=2){const be=J.colorStops[0],je=J.colorStops[1];s.startColorStop=Number((S=be.length)==null?void 0:S.value)||0,s.endColorStop=Number((R=je.length)==null?void 0:R.value)||0,J.type==="linear-gradient"&&((U=J.orientation)==null?void 0:U.type)==="angular"&&(s.angle=Number((ee=J.orientation)==null?void 0:ee.value)||0),s.type=J.type.split("-")[0];const[Ne,z,ie,fe]=be.value,[rt,Ve,ne,me]=je.value;s.startColor=new qt({r:Number(Ne),g:Number(z),b:Number(ie),a:Number(fe)}),s.endColor=new qt({r:Number(rt),g:Number(Ve),b:Number(ne),a:Number(me)})}}catch(J){console.log(`[Parse Color]: ${J}`)}},j=Hi(()=>{const S=L();try{s.gradientColor=iT(S),t("update:gradientColor",s.gradientColor),t("gradientColorChange",s.gradientColor)}catch(R){console.log(R)}},e.debounce),L=()=>{const S=[],R=s.startColor.RGB.map(J=>J.toString()),U=s.endColor.RGB.map(J=>J.toString()),ee=[{type:"rgba",value:[R[0],R[1],R[2],R[3]],length:{value:s.startColorStop+"",type:"%"}},{type:"rgba",value:[U[0],U[1],U[2],U[3]],length:{value:s.endColorStop+"",type:"%"}}];return s.type==="linear"?S.push({type:"linear-gradient",orientation:{type:"angular",value:s.angle+""},colorStops:ee}):s.type==="radial"&&S.push({type:"radial-gradient",orientation:[{type:"shape",value:"circle"}],colorStops:ee}),S},we=()=>{d.value&&h.value&&(p=Jg(d.value,h.value,{placement:"auto",modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"flip",options:{allowedAutoPlacements:["top","bottom","left","right"],rootBoundary:"viewport"}}]}))},m=S=>{l.value=S,n.pureColor=S.toString(e.format),ce()},ce=Hi(()=>{t("update:pureColor",n.pureColor),t("pureColorChange",n.pureColor)},e.debounce);zw(h,()=>{I()});const D=S=>{n.activeKey=S,t("update:activeKey",S),t("activeKeyChange",S)};return Oo(()=>{P()}),bn(()=>e.gradientColor,S=>{S!=s.gradientColor&&(s.gradientColor=S)}),bn(()=>s.gradientColor,()=>{P()}),bn(()=>e.activeKey,S=>{n.activeKey=S}),bn(()=>e.useType,S=>{n.activeKey!=="gradient"&&S==="gradient"?n.activeKey="gradient":n.activeKey="pure"}),bn(()=>e.pureColor,S=>{De.equals(S,n.pureColor)||(n.pureColor=S,l.value=new qt(S))},{deep:!0}),{colorCubeRef:d,pickerRef:h,showPicker:c,colorInstance:l,getBgColorStyle:b,onColorChange:m,onShowPicker:O,onActiveKeyChange:D,getComponentName:y,getBindArgs:T,state:n}}});function bI(e,t,n,r,i,o){const s=st("WrapContainer");return E(),B(Be,null,[e.isWidget?(E(),Qe(s,{key:0,"active-key":e.state.activeKey,"onUpdate:activeKey":t[0]||(t[0]=l=>e.state.activeKey=l),"show-tab":e.useType==="both",onChange:e.onActiveKeyChange,style:bt({zIndex:e.zIndex}),theme:e.theme},{default:sc(()=>[(E(),Qe(rh(e.getComponentName),ll({key:e.getComponentName},e.getBindArgs),null,16))]),_:1},8,["active-key","show-tab","onChange","style","theme"])):Pe("",!0),e.isWidget?Pe("",!0):(E(),B(Be,{key:1},[x("div",{class:Ze(["vc-color-wrap transparent",{round:e.shape==="circle"}]),ref:"colorCubeRef"},[x("div",{class:"current-color",style:bt(e.getBgColorStyle),onClick:t[1]||(t[1]=(...l)=>e.onShowPicker&&e.onShowPicker(...l))},null,4)],2),(E(),Qe(T_,{to:e.pickerContainer},[ye(x("div",{ref:"pickerRef",style:bt({zIndex:e.zIndex})},[e.showPicker?(E(),Qe(s,{key:0,"show-tab":e.useType==="both"&&!e.state.isAdvanceMode,"active-key":e.state.activeKey,"onUpdate:activeKey":t[2]||(t[2]=l=>e.state.activeKey=l),onChange:e.onActiveKeyChange,theme:e.theme},{default:sc(()=>[(E(),Qe(rh(e.getComponentName),ll({key:e.getComponentName},e.getBindArgs),null,16))]),_:1},8,["show-tab","active-key","onChange","theme"])):Pe("",!0)],4),[[Ot,e.showPicker]])],8,["to"]))],64))],64)}const CI={name:"PhystonPrompt",components:{HighlightPrompt:Lw,VueNumberInput:hw,IconSvg:sr,ColorPicker:dr(yI,[["render",bI],["__scopeId","data-v-11de56b7"]])},mixins:[Tr,gw,mw,Tw,xw],props:{name:{type:String,required:!0},neg:{type:Boolean,default:!1},textarea:{type:Object,required:!0},steps:{type:Object,required:!0},canOneTranslate:{type:Boolean,default:!1},autoTranslate:{type:Boolean,default:!1},autoTranslateToEnglish:{type:Boolean,default:!1},autoTranslateToLocal:{type:Boolean,default:!1},autoRemoveSpace:{type:Boolean,default:!1},autoRemoveLastComma:{type:Boolean,default:!1},autoKeepWeightZero:{type:Boolean,default:!1},autoKeepWeightOne:{type:Boolean,default:!1},autoBreakBeforeWrap:{type:Boolean,default:!1},autoBreakAfterWrap:{type:Boolean,default:!1},hideDefaultInput:{type:Boolean,default:!1},hidePanel:{type:Boolean,default:!1},enableTooltip:{type:Boolean,default:!0},historyKey:{type:String,default:""},favoriteKey:{type:String,default:""},extraNetworks:{type:Array,default:()=>[]},loras:{type:Array,default:()=>[]},lycos:{type:Array,default:()=>[]},embeddings:{type:Array,default:()=>[]},version:{type:String,default:""},latestVersion:{type:String,default:""},isLatestVersion:{type:Boolean,default:!0},theme:{type:String,default:"dark"},groupTags:{type:Array,default:()=>[]},hideGroupTags:{type:Boolean,default:!1},groupTagsColor:{type:Object,default:()=>({})},groupTagsColorKeyCache:{type:Object,default:()=>({})},blacklist:{type:Object,default:()=>({})}},emits:["update:languageCode","update:autoTranslate","update:autoTranslateToEnglish","update:autoTranslateToLocal","update:autoRemoveSpace","update:autoRemoveLastComma","update:autoKeepWeightZero","update:autoKeepWeightOne","update:hideDefaultInput","update:hidePanel","update:enableTooltip","update:translateApi","click:translateApi","click:promptFormat","click:blacklist","click:selectTheme","click:switchTheme","click:showAbout","click:selectLanguage","click:showHistory","click:showFavorite","refreshFavorites","click:showChatgpt","update:hideGroupTags","update:groupTagsColor"],data(){return{prompt:"",counterText:"0/75",tags:[],sortable:null,droping:!1,loading:{},editing:{}}},computed:{isEnglish(){return this.languageCode==="en_US"},translateApiItem(){return pe.getTranslateApiItem(this.translateApis,this.translateApi)}},watch:{loras:{handler(){this.tags.forEach(e=>{this._setTagClass(e)})},immediate:!1},lycos:{handler(){this.tags.forEach(e=>{this._setTagClass(e)})},immediate:!1},embeddings:{handler(){this.tags.forEach(e=>{this._setTagClass(e)})},immediate:!1}},mounted(){this.$nextTick(()=>{this.initSortable();let e=[1e3,3e3,5e3,1e4,2e4,3e4],t=!1;e.forEach(n=>{t||setTimeout(()=>{t||typeof addAutocompleteToArea=="function"&&typeof TAC_CFG=="object"&&TAC_CFG&&TAC_CFG.activeIn&&(t=!0,addAutocompleteToArea(this.$refs.promptTagAppend))},n)}),this.init()})},methods:{init(){this.tags=[],this.onTextareaChange()},onTextareaChange(e){const t=this.textarea.parentElement.getElementsByClassName("autocompleteParent");if(t.length){if(t[0].style.display!=="none")return}else{const l=this.textarea.parentElement.getElementsByClassName("autocompleteResults");if(l.length>0&&l[0].style.display!=="none")return}let n=this.textarea.value.trim();if(n===this.prompt.trim())return;let r=pe.splitTags(n,this.autoBreakBeforeWrap,this.autoBreakAfterWrap),i=[];this.tags.forEach((l,c)=>{l.disabled&&i.push({tag:l,index:c})}),i.forEach(({tag:l,index:c})=>{r.splice(c,0,l.value)});let o=[],s=this.tags;this.tags=[];for(let l in r){let c=r[l];if(c===`
|
||
`)this._appendTag(`
|
||
`,`
|
||
`,!1,-1,"wrap");else{let d=!1;for(let y of s)if(y.value===c){d=y;break}const h=d?d.localValue:"",p=d?d.disabled:!1,b=this._appendTag(c,h,p,-1,"text");!d&&b!==-1&&o.push(b)}}if(this.autoTranslateToLocal&&e){let l=!(this.tagCompleteFile&&this.onlyCsvOnAuto);l=!1,this.translates(o,!0,l).finally(()=>{this.updateTags()})}else this.updateTags()},_setTextareaFocus(){if(typeof get_uiCurrentTabContent!="function"||typeof activePromptTextarea!="object")return;const e=get_uiCurrentTabContent();if(!e)return;let t=e.id.replace("tab_","");t&&(activePromptTextarea[t]=this.textarea)},copy(e){this.$copyText(e).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},genPrompt(e=null,t=!1){e=e||this.tags;let n=[],r=e.length;return e.forEach((i,o)=>{let s="";if(typeof i.type=="string"&&i.type==="wrap")s=`
|
||
`;else{let l=pe.replaceTag(i.value);l!==i.value&&(i.value=l,this._setTag(i));let c=pe.replaceTag(i.localValue);if(c!==i.localValue&&(i.localValue=c),i.weightNum>0&&(i.weightNum=Number(parseFloat(i.weightNum).toFixed(6)),i.value=i.value.replace(pe.weightNumRegex,"$1:"+i.weightNum),i.localValue!==""&&(i.localValue=i.localValue.replace(pe.weightNumRegex,"$1:"+i.weightNum))),i.disabled&&!t)return;let d=","+(this.autoRemoveSpace?"":" "),h=null,p=!1;if(o+1<r&&(h=e[o+1],typeof h.type=="string"&&h.type==="wrap"?p=!0:h.value),p){const b=[" BREAK"," ADDCOL"," ADDROW"," ADDCOMM"," ADDBASE"];for(const y of b)i.value.endsWith(y)&&(d="")}i.value==="BREAK"&&(p?d="":d=" "),this.autoRemoveLastComma&&o+1===r&&(d=""),s=i.value+d}s&&n.push(s)}),n.length<=0?"":n.join("")},updatePrompt(){let e=[],t=this.tags.length;for(let n=0;n<t;n++)if(this.tags[n].value==="BREAK"){if(this.autoBreakBeforeWrap&&n-1>=0){let i=this.tags[n-1];typeof i.type=="string"&&i.type==="wrap"||e.push(n)}if(this.autoBreakAfterWrap&&n+1<t){let i=this.tags[n+1];typeof i.type=="string"&&i.type==="wrap"||e.push(n+1)}}for(let n=0;n<e.length;n++){let r=e[n]+n;this._appendTag(`
|
||
`,`
|
||
`,!1,r,"wrap")}if(e.length){this.updateTags();return}this.prompt=this.genPrompt(),this.textarea.value=this.prompt,pe.hideCompleteResults(this.textarea),typeof updateInput=="function"?updateInput(this.textarea):this.textarea.dispatchEvent(new Event("input"))},updateTags(){console.log("tags change",this.tags),this.updatePrompt();const e=this.steps.querySelector('input[type="number"]').value;this.gradioAPI.tokenCounter(this.textarea.value,e).then(t=>{const{token_count:n,max_length:r}=t;this.counterText=`${n}/${r}`}),this.tags.length&&this.gradioAPI.getLatestHistory(this.historyKey).then(t=>{t&&t.prompt===this.prompt?this.gradioAPI.setHistory(this.historyKey,t.id,this.tags,this.prompt,t.name).then(n=>{}).catch(n=>{}):this.gradioAPI.pushHistory(this.historyKey,this.tags,this.prompt).then(n=>{}).catch(n=>{})}).catch(t=>{}),this.$nextTick(()=>{for(let t=0;t<this.$refs.promptTagsList.children.length;t++){let n=this.$refs.promptTagsList.children[t];if(!n.classList.contains("prompt-tag"))continue;let r=n.getAttribute("data-id"),i=this.$refs.promptTagWrap.find(o=>o.getAttribute("data-id")===r);i&&n.parentNode.insertBefore(i,n.nextElementSibling)}})},onResize(){this.tags.forEach(e=>{this._setTagHeight(e)})},initSortable(){this.sortable=nt.create(this.$refs.promptTagsList,{animation:150,handle:".prompt-tag-value",draggable:".prompt-tag",onEnd:e=>{if(this.dropTags.length){let n=e.item,r=n.getAttribute("data-id"),i=this._getDropTagsEle(),o=i.findIndex(c=>c.getAttribute("data-id")===r),s=i.slice(0,o),l=i.slice(o+1).reverse();s.forEach(c=>{pe.insertBefore(c,n)}),l.forEach(c=>{pe.insertAfter(c,n)})}this._dropOver(),this.droping=!1;let t=[];for(let n=0;n<this.$refs.promptTagsList.children.length;n++){let r=this.$refs.promptTagsList.children[n];if(!r.classList.contains("prompt-tag"))continue;let i=r.getAttribute("data-id");t.push(i)}this.tags=this.tags.sort((n,r)=>t.indexOf(n.id)-t.indexOf(r.id)),this.$forceUpdate(),this.updateTags()},onChoose:e=>{if(console.log(e),this.dropTags.length){let n=e.item.getAttribute("data-id");this._getDropTagsEle().forEach(i=>{i.getAttribute("data-id")!==n&&(i.style.display="block",i.style.transition="transform 0.2s",i.style.transform="scale(0)",setTimeout(()=>{i.style.transition="",i.style.transform="",i.style.display="none"},300))})}this.editing={},this.droping=!0},onUnchoose:e=>{if(this.droping=null,this.dropTags.length){let n=e.item.getAttribute("data-id");this._getDropTagsEle().forEach(i=>{i.getAttribute("data-id")!==n&&(i.style.display="")})}}})},useHistory(e){this.tags=[],e.tags.forEach(t=>{this._appendTag(t.value,t.localValue,t.disabled,-1,t.type||"text")}),this.updateTags()},useFavorite(e){this.useHistory(e)},useChatgpt(e){let t=pe.splitTags(e,this.autoBreakBeforeWrap,this.autoBreakAfterWrap);this.tags=[],t.forEach(n=>{this._appendTag(n,"",!1,-1,"text")}),this.updateTags()},onPromptMainClick(){this.onTextareaChange(!0),this._setTextareaFocus()},translates(e,t=!1,n=!0){return new Promise((r,i)=>{if(this.languageCode==="en_US"||this.languageCode==="en_GB"){r();return}let o=[],s=(y,w)=>{y.forEach(T=>{l(T,w)})},l=(y,w)=>{this.canOneTranslate?(this.loading[y.id+"_local"]=w,this.loading[y.id+"_en"]=w):y.toLocal?this.loading[y.id+"_local"]=w:this.loading[y.id+"_en"]=w},c=(y,w)=>{y.toLocal?y.localValue=w:(y.localValue=y.value,y.value=w),this._setTagById(y.id,y.value,y.localValue)},d=y=>y.isLora&&y.loraExists?this.getExtraNetworkFullName(y.loraName,"lora"):y.isLyco&&y.lycoExists?this.getExtraNetworkFullName(y.lycoName,"lycoris"):y.isEmbedding?this.getExtraNetworkFullName(y.value,"textual inversion"):y.value;e.forEach(y=>{let w=this.tags[y],T=d(w);if(T!==w.value){w.localValue=T;return}if(pe.canTranslate(w.value)){if(w.isEnglish=pe.isEnglishByLangCode(w.value,this.languageCode),w.isEnglish===-1)t?w.toLocal=!0:w.toLocal=!1;else if(w.isEnglish===0)if(t)if(w.localValue==="")w.localValue=w.value,w.toLocal=!1;else{const O=w.value;w.value=w.localValue,w.localValue=O}else w.toLocal=!1;else w.toLocal=!0;l(w,!0),o.push(w)}});const h=y=>{if(y.length<=0){s(y,!1),r();return}let w={};y.forEach((O,I)=>{let P=O.toLocal?"en_US":this.languageCode,j=O.toLocal?this.languageCode:"en_US",L=P+"."+j;w[L]||(w[L]={fromLang:P,toLang:j,tags:[]}),w[L].tags.push(O)});const T=()=>{let O=w[Object.keys(w)[0]];if(!O){r();return}let I=O.tags.map(P=>d(P));this.gradioAPI.translates(I,O.fromLang,O.toLang,this.translateApi,this.translateApiConfig).then(P=>{P.success?(P.translated_text.forEach((L,we)=>{L=L.replace(/\.$/,"").trim(),pe.isEnglish(L)&&L!==L.toUpperCase()&&(L=L.toLowerCase());let m=O.tags[we];L!==""&&c(m,L),l(m,!1)}),delete w[Object.keys(w)[0]],T()):(s(y,!1),this.$toastr.error(P.message),i(P.message))}).catch(P=>{s(y,!1),this.$toastr.error(P.message),i(P.message)})};T()};let p=y=>{console.log("translateByCSV",y.map(T=>T.value).join(", "));let w=[];y.forEach(T=>{const O=pe.splitTag(T.value);O.value!==T.value&&(T.value=O.value,T.splits=O),T.toLocal?w.push(this.translateToLocalByCSV(T.value)):w.push(this.translateToEnByCSV(T.value))}),Promise.all(w).then(T=>{let O=[];T.forEach((I,P)=>{let j=y[P];j.splits&&(j.value=j.splits.left+j.value+j.splits.right),I===""?O.push(j):(j.splits&&(I=j.splits.left+I+j.splits.right),l(j,!1),c(j,I))}),console.log("No translated keywords: ",O.map(I=>I.value).join(", ")),n?h(O):(s(O,!1),r())}).catch(T=>{s(y,!1),this.$toastr.error(T),i(T)})},b=y=>{console.log("translateByGroupTags",y.map(T=>T.value).join(", "));let w=[];y.forEach(T=>{const O=pe.splitTag(T.value);O.value!==T.value&&(T.value=O.value,T.splits=O),T.toLocal?w.push(this.translateToLocalByGroupTags(T.value)):w.push(this.translateToEnByGroupTags(T.value))}),Promise.all(w).then(T=>{let O=[];T.forEach((I,P)=>{let j=y[P];j.splits&&(j.value=j.splits.left+j.value+j.splits.right),I===""?O.push(j):(j.splits&&(I=j.splits.left+I+j.splits.right),l(j,!1),c(j,I))}),console.log("No translated keywords: ",O.map(I=>I.value).join(", ")),this.tagCompleteFile?p(O):n?h(O):(s(O,!1),r())}).catch(T=>{s(y,!1),this.$toastr.error(T),i(T)})};this.groupTagsTranslate?b(o):this.tagCompleteFile?p(o):n?h(o):(s(o,!1),r())})}}},_I=["name"],wI={class:"prompt-header"},TI={class:"prompt-header-title"},xI={class:"prompt-header-extend"},kI={class:"extend-content"},SI={class:"extend-btn-group"},AI={key:0,class:"gradio-checkbox hover-scale-120"},EI=["checked"],OI={class:"gradio-checkbox hover-scale-120"},LI=["checked"],II={class:"gradio-checkbox hover-scale-120"},PI=["checked"],DI={class:"gradio-checkbox hover-scale-120"},RI=["checked"],NI={class:"gradio-checkbox"},MI={value:"disabled"},FI={value:"last"},$I=["label"],BI=["value"],HI={class:"prompt-header-extend"},jI={class:"extend-content"},UI={class:"extend-btn-group"},WI={key:0,class:"prompt-header-extend"},KI={class:"extend-content"},VI={class:"extend-btn-group"},qI={class:"prompt-header-extend"},zI={class:"extend-content"},GI={class:"extend-btn-group"},YI={key:1,class:"prompt-header-extend"},XI={class:"extend-content"},JI={class:"extend-btn-group"},ZI={class:"prompt-header-extend prompt-append"},QI={class:"extend-content"},e2={class:"gradio-checkbox hover-scale-120"},t2={key:0},n2=["checked"],r2={key:1},i2=["checked"],o2=["placeholder"],s2=["onClick"],a2={class:"arrow-right"},l2=["onMouseleave","onMouseenter","onClick"],u2={key:0,class:"tags-name"},c2={key:1,class:"tags-name"},f2={class:"tags-detail"},d2={class:"tags-list"},p2={key:0,class:"item-wrap"},h2={key:1,class:"tags-item"},g2={class:"item-tag-value"},m2={class:"item-tag-local-value"},v2={class:"prompt-tags-list",ref:"promptTagsList"},y2=["data-id"],b2=["onMouseenter","onMousemove"],C2={class:"prompt-tag-edit"},_2=["onClick","onDblclick","innerHTML"],w2=["placeholder","value","onBlur","onKeydown","onChange"],T2=["onClick"],x2=["onClick"],k2=["onClick"],S2=["onClick"],A2=["onClick"],E2=["onClick"],O2=["onClick"],L2=["onClick"],I2=["onClick"],P2=["onClick"],D2={class:"prompt-local-language"},R2=["onClick"],N2={class:"local-language"},M2=["data-id"],F2={class:"btns-title"},$2={class:"group-tabs"},B2={class:"group-header",ref:"groupTabsHeader"},H2=["onClick","data-name"],j2={class:"group-body"},U2={key:0,class:"sub-group-header"},W2=["onClick","data-name"],K2={key:1,class:"sub-group-body"},V2={key:0,class:"group-tags"},q2=["onClick"],z2={class:"tag-local"},G2={class:"tag-en"},Y2={key:0,class:"sub-group-header"},X2=["onClick","data-name"],J2={key:1,class:"sub-group-body"},Z2={key:0,class:"group-tags"},Q2=["onClick"],eP={class:"tag-en"},tP={class:"tags-footer"},nP={class:"tags-color"},rP={class:"tags-color-picker hover-scale-120",unaffected:"true"},iP=["onClick"],oP=["onClick"],sP={class:"tags-copyright"};function aP(e,t,n,r,i,o){const s=st("icon-svg"),l=st("vue-number-input"),c=st("color-picker"),d=st("highlight-prompt"),h=nl("tooltip");return E(),B("div",{class:"physton-prompt",name:n.name},[x("div",{class:Ze(["prompt-main",n.hidePanel?"fold":""]),onClick:t[57]||(t[57]=(...p)=>o.onPromptMainClick&&o.onPromptMainClick(...p))},[x("div",wI,[ye((E(),B("div",{class:"prompt-unfold",onClick:t[0]||(t[0]=(...p)=>e.onUnfoldClick&&e.onUnfoldClick(...p))},[xe(s,{class:"hover-scale-120",name:"unfold"})])),[[h,e.getLang(n.hidePanel?"show_panel":"hide_panel")]]),x("div",TI,ue(n.neg?e.getLang("negative_prompt"):e.getLang("prompt")),1),ye(x("div",{class:"prompt-header-counter"},"("+ue(i.counterText)+")",513),[[Ot,i.counterText]]),x("div",xI,[x("div",kI,[x("div",SI,[ye((E(),B("div",{class:"extend-btn-item",onClick:t[1]||(t[1]=p=>e.$emit("click:selectLanguage",p))},[xe(s,{class:"hover-scale-120",name:"i18n"})])),[[h,"Language: "+e.langName]]),x("div",{class:Ze(["extend-btn-item",n.isLatestVersion?"":"red-dot"])},[ye(xe(s,{class:"hover-scale-120",name:"setting"},null,512),[[h,e.getLang("setting_desc")]]),x("div",{class:"setting-box",onMouseenter:t[14]||(t[14]=(...p)=>e.onSettingBoxMouseEnter&&e.onSettingBoxMouseEnter(...p))},[o.translateApiItem.name&&!o.isEnglish?ye((E(),B("div",{key:0,class:"extend-btn-item",onClick:t[2]||(t[2]=p=>e.$emit("click:translateApi",p))},[xe(s,{class:"hover-scale-120",name:"api"})])),[[h,e.getLang("translate_api")+": "+o.translateApiItem.name]]):Pe("",!0),ye((E(),B("div",{class:"extend-btn-item",onClick:t[3]||(t[3]=p=>e.$emit("click:promptFormat",p))},[xe(s,{class:"hover-scale-120",name:"format"})])),[[h,e.getLang("prompt_format")]]),ye((E(),B("div",{class:"extend-btn-item",onClick:t[4]||(t[4]=p=>e.$emit("click:blacklist",p))},[xe(s,{class:"hover-scale-120",name:"blacklist"})])),[[h,e.getLang("keywords_blacklist")]]),ye((E(),B("div",{class:"extend-btn-item",onClick:t[5]||(t[5]=p=>e.$emit("click:selectTheme",p))},[xe(s,{class:"hover-scale-120",name:"theme"})])),[[h,e.getLang("theme_extension")]]),ye((E(),B("div",{class:"extend-btn-item",onClick:t[6]||(t[6]=p=>e.$emit("click:switchTheme",p))},[xe(s,{class:"hover-scale-120",name:n.theme==="dark"?"sun":"moon"},null,8,["name"])])),[[h,e.getLang(n.theme==="dark"?"switch_to_light_theme":"switch_to_dark_theme")]]),ye((E(),B("div",{class:Ze(["extend-btn-item",n.isLatestVersion?"":"red-dot"]),onClick:t[7]||(t[7]=p=>e.$emit("click:showAbout",p))},[xe(s,{class:"hover-scale-120",name:"about"})],2)),[[h,e.getLang("about_desc")]]),o.isEnglish?Pe("",!0):(E(),B(Be,{key:1},[n.canOneTranslate?(E(),B("div",AI,[ye((E(),B("label",null,[x("input",{type:"checkbox",name:"auto_translate",value:"1",checked:n.autoTranslate,onChange:t[8]||(t[8]=p=>e.$emit("update:autoTranslate",p.target.checked))},null,40,EI),xe(s,{name:"translate"})])),[[h,e.getLang("auto_translate")]])])):(E(),B(Be,{key:1},[x("div",OI,[ye((E(),B("label",null,[x("input",{type:"checkbox",name:"auto_translate_to_local_language",value:"1",checked:n.autoTranslateToLocal,onChange:t[9]||(t[9]=p=>e.$emit("update:autoTranslateToLocal",p.target.checked))},null,40,LI),xe(s,{name:"translate"})])),[[h,e.getLang("auto_translate_to_local_language")]])]),x("div",II,[ye((E(),B("label",null,[x("input",{type:"checkbox",name:"auto_translate_to_english",value:"1",checked:n.autoTranslateToEnglish,onChange:t[10]||(t[10]=p=>e.$emit("update:autoTranslateToEnglish",p.target.checked))},null,40,PI),xe(s,{name:"english"})])),[[h,e.getLang("auto_translate_to_english")]])])],64))],64)),x("div",DI,[ye((E(),B("label",null,[x("input",{type:"checkbox",name:"enable_tooltip",value:"1",checked:n.enableTooltip,onChange:t[11]||(t[11]=p=>e.$emit("update:enableTooltip",p.target.checked))},null,40,RI),xe(s,{name:"tooltip"})])),[[h,e.getLang("whether_to_enable_tooltip")]])]),x("div",NI,[ye((E(),B("label",null,[ye(x("select",{"onUpdate:modelValue":t[12]||(t[12]=p=>e.autoInputPrompt=p),onChange:t[13]||(t[13]=(...p)=>e.onAutoInputPromptChange&&e.onAutoInputPromptChange(...p))},[x("option",MI,ue(e.getLang("auto_input_prompt"))+": "+ue(e.getLang("disabled")),1),x("option",FI,ue(e.getLang("last_input_prompt")),1),(E(!0),B(Be,null,ft(e.getCurrentTypeFavorites(),p=>(E(),B("optgroup",{key:p.key,label:e.getLang("favorite")+" / "+e.getLang(p.name)},[(E(!0),B(Be,null,ft(p.list,b=>(E(),B("option",{value:b.id},ue(b.name||b.prompt.substring(0,40)),9,BI))),256))],8,$I))),128))],544),[[Es,e.autoInputPrompt]])])),[[h,e.getLang("auto_input_prompt")]])])],32)],2)])])]),x("div",HI,[x("div",jI,[x("div",UI,[ye((E(),B("div",{class:"extend-btn-item",ref:"historyButton",onClick:t[15]||(t[15]=p=>e.$emit("click:showHistory",p))},[xe(s,{class:"hover-scale-120",name:"history"})])),[[h,e.getLang("history")]]),ye((E(),B("div",{class:"extend-btn-item",ref:"favoriteButton",onClick:t[16]||(t[16]=p=>e.$emit("click:showFavorite",p))},[xe(s,{class:"hover-scale-120",name:"favorite"})])),[[h,e.getLang("favorite")]])])])]),o.isEnglish?Pe("",!0):(E(),B("div",WI,[x("div",KI,[x("div",VI,[n.canOneTranslate?ye((E(),B("div",{key:0,class:"extend-btn-item",onClick:t[17]||(t[17]=(...p)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...p))},[i.loading.all_local?Pe("",!0):(E(),Qe(s,{key:0,class:"hover-scale-120",name:"translate"})),i.loading.all_local?(E(),Qe(s,{key:1,class:"hover-scale-120",name:"loading"})):Pe("",!0)])),[[h,e.getLang("one_translate_all_keywords")]]):(E(),B(Be,{key:1},[ye((E(),B("div",{class:"extend-btn-item",onClick:t[18]||(t[18]=(...p)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...p))},[i.loading.all_local?Pe("",!0):(E(),Qe(s,{key:0,class:"hover-scale-120",name:"translate"})),i.loading.all_local?(E(),Qe(s,{key:1,class:"hover-scale-120",name:"loading"})):Pe("",!0)])),[[h,e.getLang("translate_keywords_to_local_language")]]),ye((E(),B("div",{class:"extend-btn-item",onClick:t[19]||(t[19]=(...p)=>e.onTranslatesToEnglishClick&&e.onTranslatesToEnglishClick(...p))},[i.loading.all_en?Pe("",!0):(E(),Qe(s,{key:0,class:"hover-scale-120",name:"english"})),i.loading.all_en?(E(),Qe(s,{key:1,class:"hover-scale-120",name:"loading"})):Pe("",!0)])),[[h,e.getLang("translate_all_keywords_to_english")]])],64))])])])),x("div",qI,[x("div",zI,[x("div",GI,[ye((E(),B("div",{class:"extend-btn-item",onClick:t[20]||(t[20]=(...p)=>e.onCopyAllTagsClick&&e.onCopyAllTagsClick(...p))},[xe(s,{class:"hover-scale-120",name:"copy"})])),[[h,e.getLang("copy_keywords_to_clipboard")]]),ye((E(),B("div",{class:"extend-btn-item",onClick:t[21]||(t[21]=(...p)=>e.onDeleteAllTagsClick&&e.onDeleteAllTagsClick(...p))},[xe(s,{class:"hover-scale-120",name:"remove"})])),[[h,e.getLang("delete_all_keywords")]])])])]),n.neg?Pe("",!0):(E(),B("div",YI,[x("div",XI,[x("div",JI,[ye((E(),B("div",{class:"extend-btn-item",onClick:t[22]||(t[22]=p=>e.$emit("click:showChatgpt",p))},[xe(s,{class:"hover-scale-120",name:"chatgpt"})])),[[h,e.getLang("use_chatgpt_gen_prompts")]])])])])),x("div",ZI,[x("div",QI,[x("div",e2,[n.hideDefaultInput?ye((E(),B("label",t2,[x("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[23]||(t[23]=p=>e.$emit("update:hideDefaultInput",!p.target.checked))},null,40,n2),xe(s,{name:"input"})])),[[h,e.getLang("show_default_input_box")]]):ye((E(),B("label",r2,[x("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[24]||(t[24]=p=>e.$emit("update:hideDefaultInput",!p.target.checked))},null,40,i2),xe(s,{name:"input"})])),[[h,e.getLang("hide_default_input_box")]])]),ye(x("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-append",ref:"promptTagAppend",placeholder:e.getLang("please_enter_new_keyword"),onFocus:t[25]||(t[25]=(...p)=>e.onAppendTagFocus&&e.onAppendTagFocus(...p)),onBlur:t[26]||(t[26]=(...p)=>e.onAppendTagBlur&&e.onAppendTagBlur(...p)),onKeyup:t[27]||(t[27]=(...p)=>e.onAppendTagKeyUp&&e.onAppendTagKeyUp(...p)),onKeydown:t[28]||(t[28]=(...p)=>e.onAppendTagKeyDown&&e.onAppendTagKeyDown(...p))},null,40,o2),[[h,e.getLang("enter_to_add")]]),ye(x("div",{class:"prompt-append-list",ref:"promptAppendList",style:bt(e.appendListStyle)},[(E(!0),B(Be,null,ft(e.appendList,(p,b)=>(E(),B("div",{key:p.type,class:Ze(["prompt-append-group",e.appendListSelected===b?"selected":""])},[x("div",{class:"append-group-name",onClick:y=>e.onAppendGroupClick(b,null,y)},[p.icon==="wrap"?(E(),Qe(s,{key:0,class:"name-icon",name:"wrap"})):p.icon==="history"?(E(),Qe(s,{key:1,class:"name-icon",name:"history"})):p.icon==="favorite"?(E(),Qe(s,{key:2,class:"name-icon",name:"favorite"})):Pe("",!0),Xt(" "+ue(e.appendListItemName(p))+" ",1),ye(x("span",a2,null,512),[[Ot,p.children.length>0]])],8,s2),ye(x("div",{class:"append-group-list",ref_for:!0,ref:"promptAppendListChildren"},[(E(!0),B(Be,null,ft(p.children,(y,w)=>(E(),B("div",{key:w,ref_for:!0,ref:"promptAppendListChild",class:Ze(["append-item",e.appendListChildSelected===w?"selected":""]),onMouseleave:T=>e.onAppendListChildMouseLeave(b,w,T),onMouseenter:T=>e.onAppendListChildMouseEnter(b,w,T),onClick:T=>e.onAppendGroupClick(b,w,T)},[p.type==="favorite"||p.type==="history"?(E(),B(Be,{key:0},[y.name?(E(),B("div",u2,ue(y.name),1)):(E(),B("div",c2,ue(y.prompt),1))],64)):Pe("",!0)],42,l2))),128))],512),[[Ot,p.children.length>0]]),ye(x("div",f2,[x("div",d2,[(E(!0),B(Be,null,ft(e.appendListChildItemTags,(y,w)=>(E(),B(Be,{key:w},[y.type&&y.type==="wrap"?(E(),B("div",p2)):(E(),B("div",h2,[x("div",g2,ue(y.value),1),x("div",m2,ue(y.localValue),1)]))],64))),128))])],512),[[Ot,e.appendListSelected!==null&&e.appendListChildSelected!==null&&e.appendListSelected===b&&(p.type==="favorite"||p.type==="history")]])],2))),128))],4),[[Ot,e.showAppendList]])])])]),x("div",{class:Ze(["prompt-tags",i.droping?"droping":"",e.dropIsSelecting||e.dropIsEnd&&e.dropTags.length?"selecting":""]),ref:"promptTags",onMousedown:t[52]||(t[52]=(...p)=>e.onDropMouseDown&&e.onDropMouseDown(...p)),onMousemove:t[53]||(t[53]=(...p)=>e.onDropMouseMove&&e.onDropMouseMove(...p)),onMouseup:t[54]||(t[54]=(...p)=>e.onDropMouseUp&&e.onDropMouseUp(...p))},[x("div",v2,[(E(!0),B(Be,null,ft(i.tags,(p,b)=>(E(),B("div",{key:p.id,class:Ze(["prompt-tag",p.disabled?"disabled":"",p.type==="wrap"?"wrap-tag":""]),ref_for:!0,ref:"promptTag-"+p.id,"data-id":p.id},[x("div",{class:"prompt-tag-main",onMouseenter:y=>e.onTagMouseEnter(p.id),onMousemove:gt(y=>e.onTagMouseMove(p.id),["stop"])},[x("div",C2,[p.type==="wrap"?ye((E(),B("div",{key:0,class:"prompt-tag-value",ref_for:!0,ref:"promptTagValue-"+p.id,style:{width:"100%"}},[xe(s,{name:"wrap"})])),[[h,e.getLang("line_break_character")+"<br/>"+e.getLang("drop_to_order")]]):(E(),B(Be,{key:1},[ye(x("div",{class:Ze(p.classes),style:bt(e.getTagColorStyle(p)),ref_for:!0,ref:"promptTagValue-"+p.id,onClick:y=>e.onTagClick(p.id,y),onDblclick:y=>e.onTagDblclick(p.id),innerHTML:e.renderTag(p.id)},null,46,_2),[[Ot,!i.editing[p.id]],[h,e.getLang("click_to_edit")+"<br/>"+e.getLang("dblclick_to_disable")+"<br/>"+e.getLang("drop_to_order")]]),ye(x("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-edit",ref_for:!0,ref:"promptTagEdit-"+p.id,placeholder:e.getLang("enter_to_save"),value:p.value,onMousedown:t[29]||(t[29]=gt(()=>{},["stop"])),onMousemove:t[30]||(t[30]=gt(()=>{},["stop"])),onMouseup:t[31]||(t[31]=gt(()=>{},["stop"])),onBlur:y=>e.onTagInputBlur(p.id),onKeydown:y=>e.onTagInputKeyDown(p.id,y),onChange:y=>e.onTagInputChange(p.id,y)},null,40,w2),[[Ot,i.editing[p.id]]])],64)),x("div",{class:"btn-tag-delete",ref_for:!0,ref:"promptTagDelete-"+p.id,onClick:y=>e.onDeleteTagClick(p.id),onMousedown:t[32]||(t[32]=gt(()=>{},["stop"])),onMousemove:t[33]||(t[33]=gt(()=>{},["stop"])),onMouseup:t[34]||(t[34]=gt(()=>{},["stop"]))},[xe(s,{name:"close"})],40,T2)]),ye(x("div",{class:"btn-tag-extend",onMousedown:t[35]||(t[35]=gt(()=>{},["stop"])),onMousemove:t[36]||(t[36]=gt(()=>{},["stop"])),onMouseup:t[37]||(t[37]=gt(()=>{},["stop"]))},[xe(l,{class:"input-number","model-value":p.weightNum,center:"",controls:"",min:0,step:.1,size:"small","onUpdate:modelValue":y=>e.onTagWeightNumChange(p.id,y)},null,8,["model-value","step","onUpdate:modelValue"]),ye((E(),B("button",{type:"button",onClick:y=>e.onIncWeightClick(p.id,1)},[xe(s,{name:"weight-parentheses-inc"})],8,x2)),[[h,e.getLang("increase_weight_add_parentheses")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onIncWeightClick(p.id,-1)},[xe(s,{name:"weight-parentheses-dec"})],8,k2)),[[h,e.getLang("increase_weight_subtract_parentheses")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onDecWeightClick(p.id,1)},[xe(s,{name:"weight-brackets-inc"})],8,S2)),[[h,e.getLang("decrease_weight_add_brackets")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onDecWeightClick(p.id,-1)},[xe(s,{name:"weight-brackets-dec"})],8,A2)),[[h,e.getLang("decrease_weight_subtract_brackets")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onWrapTagClick(p.id)},[xe(s,{name:"wrap"})],8,E2)),[[h,e.getLang("line_break_character")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onTranslateToEnglishClick(p.id)},[i.loading[p.id+"_en"]?Pe("",!0):(E(),Qe(s,{key:0,name:"english"})),i.loading[p.id+"_en"]?(E(),Qe(s,{key:1,name:"loading"})):Pe("",!0)],8,O2)),[[h,e.getLang("translate_keyword_to_english")],[Ot,!o.isEnglish]]),ye((E(),B("button",{type:"button",onClick:y=>o.copy(p.value)},[xe(s,{name:"copy"})],8,L2)),[[h,e.getLang("copy_to_clipboard")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onFavoriteTagClick(p.id)},[p.isFavorite?(E(),Qe(s,{key:0,name:"favorite-yes"})):Pe("",!0),p.isFavorite?Pe("",!0):(E(),Qe(s,{key:1,name:"favorite-no"}))],8,I2)),[[h,e.getLang(p.isFavorite?"remove_from_favorite":"add_to_favorite")]]),ye((E(),B("button",{type:"button",onClick:y=>e.onDisabledTagClick(p.id)},[p.disabled?Pe("",!0):(E(),Qe(s,{key:0,name:"disabled"})),p.disabled?(E(),Qe(s,{key:1,name:"enable"})):Pe("",!0)],8,P2)),[[h,e.getLang(p.disabled?"enable_keyword":"disable_keyword")]])],544),[[Ot,p.type==="text"||!p.type]])],40,b2),ye(x("div",D2,[ye((E(),B("div",{class:"translate-to-local hover-scale-120",onClick:y=>e.onTranslateToLocalClick(p.id),onMousedown:t[38]||(t[38]=gt(()=>{},["stop"])),onMousemove:t[39]||(t[39]=gt(()=>{},["stop"])),onMouseup:t[40]||(t[40]=gt(()=>{},["stop"]))},[i.loading[p.id+"_local"]?Pe("",!0):(E(),Qe(s,{key:0,name:"translate"})),i.loading[p.id+"_local"]?(E(),Qe(s,{key:1,name:"loading"})):Pe("",!0)],40,R2)),[[h,e.getLang("translate_keyword_to_local_language")]]),x("div",N2,ue(p.localValue),1)],512),[[Ot,!o.isEnglish&&(p.type==="text"||!p.type)]])],10,y2))),128)),(E(!0),B(Be,null,ft(i.tags,(p,b)=>(E(),B("div",{key:p.id,class:Ze(["prompt-wrap",p.type==="wrap"?"wrap-tag":""]),"data-id":p.id,ref_for:!0,ref:"promptTagWrap",onMousedown:t[41]||(t[41]=gt(()=>{},["stop"])),onMousemove:t[42]||(t[42]=gt(()=>{},["stop"])),onMouseup:t[43]||(t[43]=gt(()=>{},["stop"]))},null,42,M2))),128))],512),x("div",{class:"drop-select-bg",ref:"dropSelectBg",style:bt({display:e.dropIsStart?"block":"none"})},null,4),x("div",{class:"drop-select-box",ref:"dropSelectBox",style:bt({display:e.dropIsSelecting?"block":"none",top:e.dropArea.top+"px",left:e.dropArea.left+"px",width:e.dropArea.width+"px",height:e.dropArea.height+"px"})},null,4),x("div",{class:"drop-select-btns",ref:"dropSelectBtns",style:bt({display:e.dropIsEnd&&e.dropTags.length?"flex":"none",top:e.dropEndY-32+"px",left:e.dropEndX+"px"}),onMousedown:t[49]||(t[49]=gt(()=>{},["stop"])),onMousemove:t[50]||(t[50]=gt(()=>{},["stop"])),onMouseup:t[51]||(t[51]=gt(()=>{},["stop"]))},[x("div",F2,ue(e.getLang("batch_operation")),1),ye((E(),B("button",{type:"button",onClick:t[44]||(t[44]=(...p)=>e.onDropCopy&&e.onDropCopy(...p))},[xe(s,{name:"copy"})])),[[h,e.getLang("copy_to_clipboard")]]),ye((E(),B("button",{type:"button",onClick:t[45]||(t[45]=(...p)=>e.onDropFavorite&&e.onDropFavorite(...p))},[xe(s,{name:"favorite-no"})])),[[h,e.getLang("add_to_favorite")]]),ye((E(),B("button",{type:"button",onClick:t[46]||(t[46]=(...p)=>e.onDropDisable&&e.onDropDisable(...p))},[xe(s,{name:"disabled"})])),[[h,e.getLang("disable_keyword")]]),ye((E(),B("button",{type:"button",onClick:t[47]||(t[47]=(...p)=>e.onDropEnable&&e.onDropEnable(...p))},[xe(s,{name:"enable"})])),[[h,e.getLang("enable_keyword")]]),x("button",{type:"button",onClick:t[48]||(t[48]=(...p)=>e.onDropDelete&&e.onDropDelete(...p))},[xe(s,{name:"remove"})])],36)],34),n.groupTags.length?ye((E(),B("div",{key:0,class:Ze(["show-group-tags",n.hideGroupTags?"hided":""]),onClick:t[55]||(t[55]=(...p)=>e.onClickHideGroupTags&&e.onClickHideGroupTags(...p))},[xe(s,{class:"hover-scale-120",name:"unfold"})],2)),[[h,e.getLang(n.hideGroupTags?"show_group_tags":"hide_group_tags")]]):Pe("",!0),ye(x("div",$2,[x("div",B2,[x("div",{class:Ze(["group-tab",e.groupTagsActive=="favorite"?"active":""]),onClick:t[56]||(t[56]=p=>e.activeGroupTab("favorite")),"data-name":"favorite"},ue(e.getLang("favorite")),3),(E(!0),B(Be,null,ft(n.groupTags,(p,b)=>(E(),B("div",{key:b,class:Ze(["group-tab",p.tabKey==e.groupTagsActive?"active":""]),onClick:y=>e.activeGroupTab(b),"data-name":p.name},ue(p.name),11,H2))),128))],512),x("div",j2,[x("div",{class:Ze(["group-main",e.groupTagsActive=="favorite"?"active":""])},[e.groupTagsActive=="favorite"?(E(),B("div",U2,[(E(!0),B(Be,null,ft(e.getCurrentTypeFavorites(),p=>(E(),B("div",{key:p.key,class:Ze(["sub-group-tab","favorite-"+p.key==e.subGroupTagsActive?"active":""]),onClick:b=>e.activeSubGroupTab("favorite",p.key),"data-name":p.name},ue(e.getLang(p.name)),11,W2))),128))])):Pe("",!0),e.groupTagsActive=="favorite"?(E(),B("div",K2,[(E(!0),B(Be,null,ft(e.getCurrentTypeFavorites(),p=>(E(),B("div",{key:p.key,class:Ze(["sub-group-main","favorite-"+p.key==e.subGroupTagsActive?"active":""])},["favorite-"+p.key==e.subGroupTagsActive?(E(),B("div",V2,[(E(!0),B(Be,null,ft(p.list,b=>ye((E(),B("div",{class:"tag-item",ref_for:!0,ref:"groupTagItem",onClick:y=>e.onClickGroupTagFavorite(b)},[x("div",z2,ue(b.name==""?b.prompt:b.name),1),x("div",G2,ue(b.prompt),1)],8,q2)),[[h,e.getGroupTagTooltip(b.name,b.prompt)]])),256))])):Pe("",!0)],2))),128))])):Pe("",!0)],2),(E(!0),B(Be,null,ft(n.groupTags,(p,b)=>(E(),B("div",{key:b,class:Ze(["group-main",p.tabKey==e.groupTagsActive?"active":""])},[p.tabKey==e.groupTagsActive?(E(),B("div",Y2,[(E(!0),B(Be,null,ft(p.groups,(y,w)=>(E(),B("div",{key:w,class:Ze([y.type&&y.type==="wrap"?"sub-group-tag-wrap":"sub-group-tab",y.tabKey==e.subGroupTagsActive?"active":""]),onClick:T=>e.activeSubGroupTab(b,w),"data-name":y.name},ue(y.name),11,X2))),128))])):Pe("",!0),p.tabKey==e.groupTagsActive?(E(),B("div",J2,[(E(!0),B(Be,null,ft(p.groups,(y,w)=>(E(),B("div",{key:w,class:Ze(["sub-group-main",y.tabKey==e.subGroupTagsActive?"active":""])},[y.tabKey==e.subGroupTagsActive?(E(),B("div",Z2,[(E(!0),B(Be,null,ft(y.tags,(T,O)=>ye((E(),B("div",{class:"tag-item",ref_for:!0,ref:"groupTagItem",onClick:I=>e.onClickGroupTag(T,O)},[T&&T!=O?(E(),B(Be,{key:0},[x("div",{class:"tag-local",style:bt(e.getGroupTagStyle(p.name,y.name))},ue(T),5),x("div",eP,ue(O),1)],64)):(E(),B("div",{key:1,class:"tag-local",style:bt(e.getGroupTagStyle(p.name,y.name))},ue(O),5))],8,Q2)),[[h,e.getGroupTagTooltip(T,O)]])),256))])):Pe("",!0),x("div",tP,[x("div",nP,[x("div",null,ue(e.getLang("tags_color"))+":",1),ye((E(),B("div",rP,[xe(c,{theme:n.theme=="dark"?"black":"white",pureColor:n.groupTagsColor[e.getTagsColorKey(p.name,y.name)],"onUpdate:pureColor":T=>n.groupTagsColor[e.getTagsColorKey(p.name,y.name)]=T,onPureColorChange:T=>e.onTagsColorChange(e.getTagsColorKey(p.name,y.name))},null,8,["theme","pureColor","onUpdate:pureColor","onPureColorChange"])])),[[h,n.groupTagsColor[e.getTagsColorKey(p.name,y.name)]]]),ye((E(),B("div",{class:"tags-color-reset hover-scale-120",onClick:T=>e.onClickResetTagsColor(e.getTagsColorKey(p.name,y.name))},[xe(s,{name:"reset"})],8,iP)),[[h,e.getLang("reset_default_color")]]),ye((E(),B("div",{class:"tags-color-clear hover-scale-120",onClick:T=>e.onClickClearTagsColor(e.getTagsColorKey(p.name,y.name))},[xe(s,{name:"clear"})],8,oP)),[[h,e.getLang("clear_color")]])]),x("div",sP,ue(e.getLang("tags-copyright")),1)])],2))),128))])):Pe("",!0)],2))),128))])],512),[[Ot,!n.hideGroupTags&&n.groupTags.length]])],2),xe(d,{ref:"highlightPrompt",textarea:n.textarea,"hide-default-input":n.hideDefaultInput},null,8,["textarea","hide-default-input"])],8,_I)}const lP=En(CI,[["render",aP]]),uP={name:"TranslateSetting",components:{IconSvg:sr},mixins:[Tr],props:{},data(){return{testText:"",translateSuccess:!1,errorMessage:"",translatedText:"",loading:!1,isOpen:!1,configs:[],apiKey:"",tagCompleteFiles:[],tagCompleteFilesLoading:!1,tagCompleteFileKey:"",tagCompleteResults:[],onlyCsvOnAutoValue:!1,groupTagsTranslateValue:!0,mbart50Loading:!1,mbart50Success:!1,mbart50Message:""}},computed:{apiItem(){return pe.getTranslateApiItem(this.translateApis,this.apiKey)},supportApi(){if(!this.translateApis||this.translateApis.length<=0)return[];let e=JSON.parse(JSON.stringify(this.translateApis));return e.forEach(t=>{t.children.forEach(n=>{n.disabled=!n.support[this.languageCode]})}),e}},mounted(){this.translateSuccess=!1,this.errorMessage="",this.translatedText="",this.loading=!1},emits:["update:translateApi","forceUpdate:translateApi","update:tagCompleteFile","update:onlyCsvOnAuto","update:groupTagsTranslate"],watch:{apiKey:{handler:function(e,t){this.translateSuccess=!1,this.errorMessage="",this.translatedText="",this.loading=!1,this.configs=[],this.gradioAPI.getData("translate_api."+this.apiKey).then(n=>{const r=this.apiItem;if(r&&r.config){for(const i of this.apiItem.config)n?i.value=n[i.key]||i.default:i.value=i.default||"",this.configs.push(i);console.log(this.configs)}})},immediate:!1}},methods:{open(e){this.testText=`Hi, this extension is developed by Physton. Welcome to use it!
|
||
If you have any suggestions or opinions, please feel free to raise an issue or PR on Github.
|
||
If you find this extension helpful, please give me a star on Github!
|
||
|
||
Developed by: Physton
|
||
Github: {{name}}`,this.testText=pe.replaceGlobals(this.testText),this.apiKey=e,this.isOpen=!0,this.errorMessage="",this.translatedText="",this.loading=!1,this.tagCompleteFileKey=this.tagCompleteFile,this.onlyCsvOnAutoValue=this.onlyCsvOnAuto,this.groupTagsTranslateValue=this.groupTagsTranslate,this.mbart50Success=!1,this.mbart50Message="",this.refreshCSVs()},getItemName(e){let t=e.name;return t=t.replace("[Free] ","["+this.getLang("free")+"] "),t=t.replace("[ApiKey] ","["+this.getLang("apply_for_free")+"] "),t},onChangeConfigValue(e){e.type==="input"&&e.value===""&&e.default&&(e.value=e.default)},refreshCSVs(){this.tagCompleteFilesLoading||(this.tagCompleteFilesLoading=!0,this.tagCompleteFiles=[],this.gradioAPI.getCSVs().then(e=>{if(this.tagCompleteFilesLoading=!1,!(!e||e.length<=0)){this.tagCompleteFiles.push({key:"",name:this.getLang("not_enable")});for(const t of e)this.tagCompleteFiles.push({key:t.key,name:t.key})}}).catch(e=>{this.tagCompleteFilesLoading=!1}))},onTestClick(){if(this.loading)return;this.translateSuccess=!1,this.errorMessage="",this.translatedText="",this.loading=!0;let e={};for(const t of this.configs)e[t.key]=t.value;this.translate(this.testText,"en_US",this.languageCode,this.apiKey,e).then(t=>{t.success?(this.translatedText=t.translated_text,this.translateSuccess=!0):this.errorMessage=t.message,this.loading=!1}).catch(t=>{this.errorMessage=t.message,this.loading=!1})},translate(e,t,n,r=null,i=null){return new Promise(async(o,s)=>{r=r||this.translateApi,i=i||this.translateApiConfig||{},this.gradioAPI.translate(e,t,n,r,i).then(l=>{l.success?o(l):s(l)}).catch(l=>{s(l)})})},onSaveClick(){this.isOpen=!1;let e={};for(const t of this.configs)e[t.key]=t.value;this.$emit("update:translateApi",this.apiKey),this.$emit("update:tagCompleteFile",this.tagCompleteFileKey),this.$emit("update:onlyCsvOnAuto",this.onlyCsvOnAutoValue),this.$emit("update:groupTagsTranslate",this.groupTagsTranslateValue),this.gradioAPI.setData("translate_api."+this.apiKey,e).then(t=>{this.apiKey===this.translateApi&&this.$emit("forceUpdate:translateApi")})},onCloseClick(){this.isOpen=!1},onTagCompleteTestClick(){this.tagCompleteResults=[],["1girl","Robot dog"].forEach(t=>{let n=this.getLang("translate_result");this.translateToLocalByCSV(t,this.tagCompleteFileKey,!0).then(r=>{this.tagCompleteResults.push(n.replace("{0}",t).replace("{1}",r))}).catch(r=>{this.$toastr.error(r)})})},onMbart50Initialize(){this.mbart50Loading=!0,this.mbart50Success=!1,this.mbart50Message="",this.gradioAPI.mbart50Initialize().then(e=>{this.mbart50Loading=!1,e.success?(this.mbart50Success=!0,this.mbart50Message=this.getLang("initialize_finished")):this.mbart50Message=this.getLang("initialize_failed")+": "+e.message}).catch(e=>{this.mbart50Loading=!1,this.mbart50Message=e.message})}}},cP={key:0,class:"physton-prompt-translate-setting"},fP={class:"translate-setting-main"},dP={class:"translate-setting-content"},pP={class:"setting-line"},hP={class:"line-title"},gP={class:"line-content"},mP=["label"],vP=["value","disabled"],yP={key:0,class:"setting-line"},bP=x("div",{class:"line-title"},null,-1),CP={class:"line-content"},_P={class:"common-red"},wP={key:1,class:"setting-line"},TP=x("div",{class:"line-title"},null,-1),xP={class:"line-content"},kP={class:"help-list"},SP={class:"help-item"},AP=["href"],EP={class:"setting-line"},OP={class:"line-title"},LP={class:"line-content"},IP=["onUpdate:modelValue","onChange"],PP=["onUpdate:modelValue"],DP=["value"],RP=["innerHTML"],NP={key:2,class:"setting-line"},MP={class:"line-title"},FP={class:"line-content"},$P=["innerHTML"],BP=["innerHTML"],HP={key:3,class:"setting-line"},jP=x("div",{class:"line-title"},null,-1),UP={class:"line-content"},WP={class:"setting-line"},KP={class:"line-title"},VP={class:"line-content"},qP={class:"setting-line"},zP=x("div",{class:"line-title"},null,-1),GP={class:"line-content"},YP={class:"setting-line"},XP=x("div",{class:"line-title"},null,-1),JP={class:"line-content"},ZP={key:0,class:"translate-error"},QP={class:"setting-line"},eD={class:"line-title"},tD={class:"line-content"},nD=["innerHTML"],rD={class:"onlyCsvOnAuto"},iD={class:"setting-line"},oD=x("div",{class:"line-title"},"TagComplete",-1),sD={class:"line-content"},aD={class:"help-list"},lD={class:"help-item"},uD=["href"],cD=["innerHTML"],fD=["innerHTML"],dD={class:"line-row"},pD=["value"],hD={class:"setting-line"},gD=x("div",{class:"line-title"},null,-1),mD={class:"line-content"},vD={ref:"tagCompleteResults"},yD={class:"setting-btns"};function bD(e,t,n,r,i,o){const s=st("icon-svg"),l=nl("tooltip");return i.isOpen?(E(),B("div",cP,[x("div",fP,[x("div",dP,[x("div",pP,[x("div",hP,ue(e.getLang("translate_api")),1),x("div",gP,[ye(x("select",{"onUpdate:modelValue":t[0]||(t[0]=c=>i.apiKey=c)},[(E(!0),B(Be,null,ft(o.supportApi,c=>(E(),B("optgroup",{key:c.type,label:e.getLang(c.type)},[(E(!0),B(Be,null,ft(c.children,d=>(E(),B("option",{key:d.key,value:d.key,disabled:d.disabled},ue(o.getItemName(d)),9,vP))),128))],8,mP))),128))],512),[[Es,i.apiKey]])])]),o.apiItem&&o.apiItem.type=="translators"?(E(),B("div",yP,[bP,x("div",CP,[x("span",_P,"*"+ue(e.getLang("not_api_key_desc")),1)])])):Pe("",!0),o.apiItem.help?(E(),B("div",wP,[TP,x("div",xP,[(E(!0),B(Be,null,ft(o.apiItem.help,c=>(E(),B("div",kP,[x("div",SP,[Xt("[?] "),x("a",{href:c.url,target:"_blank"},ue(c.title),9,AP)])]))),256))])])):Pe("",!0),(E(!0),B(Be,null,ft(i.configs,c=>(E(),B("div",EP,[x("div",OP,ue(c.title),1),x("div",LP,[c.type=="input"?ye((E(),B("input",{key:0,type:"text","onUpdate:modelValue":d=>c.value=d,onChange:d=>o.onChangeConfigValue(c)},null,40,IP)),[[ir,c.value]]):Pe("",!0),c.type=="select"?ye((E(),B("select",{key:1,"onUpdate:modelValue":d=>c.value=d},[(E(!0),B(Be,null,ft(c.options,d=>(E(),B("option",{value:d},ue(d),9,DP))),256))],8,PP)),[[Es,c.value]]):Pe("",!0),c.desc?(E(),B("div",{key:2,innerHTML:c.desc},null,8,RP)):Pe("",!0)])]))),256)),o.apiItem.key==="mbart50"?(E(),B("div",NP,[x("div",MP,ue(e.getLang("initialize")),1),x("div",FP,[x("div",{class:"hover-scale-120 test-btn",onClick:t[1]||(t[1]=(...c)=>o.onMbart50Initialize&&o.onMbart50Initialize(...c))},[i.mbart50Loading?(E(),Qe(s,{key:0,name:"loading"})):(E(),B(Be,{key:1},[Xt(ue(e.getLang("initialize")),1)],64))]),x("p",{class:"common-red",innerHTML:e.getLang("download_model_desc")},null,8,$P),x("p",{class:"common-red",innerHTML:e.getLang("download_model_desc2")},null,8,BP)])])):Pe("",!0),o.apiItem.key==="mbart50"&&i.mbart50Message?(E(),B("div",HP,[jP,x("div",UP,[x("div",{class:Ze([i.mbart50Success?"":"common-red"])},ue(i.mbart50Message),3)])])):Pe("",!0),x("div",WP,[x("div",KP,ue(e.getLang("translate_test")),1),x("div",VP,[ye(x("textarea",{class:"test-input","onUpdate:modelValue":t[2]||(t[2]=c=>i.testText=c)},null,512),[[ir,i.testText]])])]),x("div",qP,[zP,x("div",GP,[x("div",{class:"hover-scale-120 test-btn",onClick:t[3]||(t[3]=(...c)=>o.onTestClick&&o.onTestClick(...c))},[i.loading?(E(),Qe(s,{key:0,name:"loading"})):(E(),B(Be,{key:1},[Xt(ue(e.getLang("test")),1)],64))])])]),x("div",YP,[XP,x("div",JP,[!i.translateSuccess&&i.errorMessage?(E(),B("div",ZP,ue(i.errorMessage),1)):Pe("",!0),i.translatedText?ye((E(),B("textarea",{key:1,class:"test-input","onUpdate:modelValue":t[4]||(t[4]=c=>i.translatedText=c)},null,512)),[[ir,i.translatedText]]):Pe("",!0)])]),x("div",QP,[x("div",eD,ue(e.getLang("Keyword_group")),1),x("div",tD,[x("div",{innerHTML:e.getLang("enhance_translation_use_Keyword_group_desc")},null,8,nD),x("label",rD,[ye(x("input",{class:"hover-scale-120",type:"checkbox",value:"1","onUpdate:modelValue":t[5]||(t[5]=c=>i.groupTagsTranslateValue=c)},null,512),[[Fh,i.groupTagsTranslateValue]]),x("span",null,ue(e.getLang("enhance_translation_use_keyword_group")),1)])])]),x("div",iD,[oD,x("div",sD,[x("div",aD,[x("div",lD,[Xt("[?] "),x("a",{href:e.globals.docs+"/TranslationApiConfiguration.html#tagcomplete-translation-enhancement",target:"_blank"},"[Wiki] TagComplete Translation enhancement",8,uD)])]),x("div",{innerHTML:e.getLang("tagcomplete_translate_desc")},null,8,cD),x("div",{class:"common-red",innerHTML:e.getLang("tagcomplete_translate_desc2")},null,8,fD),x("div",dD,[ye(x("select",{"onUpdate:modelValue":t[6]||(t[6]=c=>i.tagCompleteFileKey=c),onChange:t[7]||(t[7]=c=>i.tagCompleteResults=[])},[(E(!0),B(Be,null,ft(i.tagCompleteFiles,c=>(E(),B("option",{value:c.key},ue(c.name),9,pD))),256))],544),[[Es,i.tagCompleteFileKey]]),ye((E(),B("div",{class:"refresh-btn hover-scale-120",onClick:t[8]||(t[8]=(...c)=>o.refreshCSVs&&o.refreshCSVs(...c))},[i.tagCompleteFilesLoading?(E(),Qe(s,{key:0,name:"loading"})):(E(),Qe(s,{key:1,name:"refresh"}))])),[[l,e.getLang("refresh")]])]),x("label",{class:"onlyCsvOnAuto",style:bt({display:i.tagCompleteFileKey?"flex":"none"})},[ye(x("input",{class:"hover-scale-120",type:"checkbox",value:"1","onUpdate:modelValue":t[9]||(t[9]=c=>i.onlyCsvOnAutoValue=c)},null,512),[[Fh,i.onlyCsvOnAutoValue]]),x("span",null,ue(e.getLang("only_csv_on_auto")),1)],4)])]),ye(x("div",hD,[gD,x("div",mD,[x("div",{class:"hover-scale-120 test-btn",onClick:t[10]||(t[10]=(...c)=>o.onTagCompleteTestClick&&o.onTagCompleteTestClick(...c))},ue(e.getLang("test")),1),ye(x("div",vD,[(E(!0),B(Be,null,ft(i.tagCompleteResults,c=>(E(),B("p",{key:c},ue(c),1))),128))],512),[[Ot,i.tagCompleteResults.length>0]])])],512),[[Ot,i.tagCompleteFileKey]])]),x("div",yD,[x("div",{class:"translate-save hover-scale-120",onClick:t[11]||(t[11]=(...c)=>o.onSaveClick&&o.onSaveClick(...c))},ue(e.getLang("save")),1),x("div",{class:"translate-close hover-scale-120",onClick:t[12]||(t[12]=(...c)=>o.onCloseClick&&o.onCloseClick(...c))},ue(e.getLang("close")),1)])])])):Pe("",!0)}const CD=En(uP,[["render",bD]]),_D={name:"SelectLanguage",components:{IconSvg:sr},mixins:[Tr],props:{},data(){return{isOpen:!1}},computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.$nextTick(()=>{this.scrollToSelectedItem()})},close(){this.isOpen=!1},onLanguageClick(e){this.$emit("update:languageCode",e.code),this.close()},scrollToSelectedItem(){const e=this.$refs.items;for(let t=0;t<e.length;t++)if(e[t].classList.contains("selected")){e[t].scrollIntoView({behavior:"smooth",block:"center"});break}}}},wD=["onClick"];function TD(e,t,n,r,i,o){const s=st("icon-svg");return i.isOpen?(E(),B("div",{key:0,class:"physton-prompt-select-language",onClick:t[3]||(t[3]=(...l)=>o.close&&o.close(...l))},[x("div",{class:"language-main",onClick:t[2]||(t[2]=gt(()=>{},["stop"]))},[x("div",{class:"language-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[xe(s,{name:"close"})]),x("div",{class:"language-list",onClick:t[1]||(t[1]=gt(()=>{},["stop"]))},[(E(!0),B(Be,null,ft(e.languages,l=>(E(),B("div",{key:l.code,class:Ze(["language-item",l.code==e.languageCode?"selected":""]),ref_for:!0,ref:"items",onClick:c=>o.onLanguageClick(l)},ue(l.code)+" - "+ue(l.name),11,wD))),128))])])])):Pe("",!0)}const xD=En(_D,[["render",TD]]),kD={components:{IconSvg:sr},props:{},mixins:[Tr],data(){return{favoriteKey:"",favorites:[{name:"txt2img",type:"prompt",key:"txt2img",list:[]},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",list:[]},{name:"img2img",type:"prompt",key:"img2img",list:[]},{name:"img2img",type:"negative_prompt",key:"img2img_neg",list:[]}],isShow:!1,loading:!1,emptyMsg:"",mouseEnter:!1,currentItem:{}}},emits:["use"],mounted(){this.favorites.forEach(e=>{this.getFavorites(e.key)})},methods:{formatTime(e){return pe.formatTime(e*1e3,!1)},getFavorites(e){if(!e)return;let t=this.favorites.find(n=>n.key===e);t&&(this.loading=!0,this.gradioAPI.getFavorites(e).then(n=>{n&&n.length>0&&(n.reverse(),n.forEach(r=>{r.is_favorite=!0}),t.list=n),window.phystonPromptfavorites=this.favorites,this.emptyMsg=this.getLang("no_favorite"),this.loading=!1}).catch(n=>{this.emptyMsg=this.getLang("get_favorite_error"),this.loading=!1}))},show(e,t){if(!(!e||!t)){if(this.favoriteKey=e,this.isShow){this.isShow=!1;return}this.mouseEnter=!1,this.loading=!0,this.isShow=!0,this.$refs.favorite.style.top=t.pageY+2+"px",this.$refs.favorite.style.left=t.pageX+2+"px",this.getFavorites(this.favoriteKey),setTimeout(()=>{this.mouseEnter||this.hide()},3e3)}},hide(){this.mouseEnter=!1,this.isShow=!1},onMouseEnter(){this.mouseEnter=!0},onMouseLeave(){this.hide()},onTabClick(e){this.favoriteKey=e,this.getFavorites(this.favoriteKey)},onFavoriteClick(e){let t=this.favorites.find(r=>r.key===this.favoriteKey);if(!t)return;let n=t.list[e];n.is_favorite?this.gradioAPI.unFavorite(this.favoriteKey,n.id).then(r=>{r&&(n.is_favorite=!1,window.phystonPromptfavorites=this.favorites)}):this.gradioAPI.doFavorite(this.favoriteKey,n.id).then(r=>{r&&(n.is_favorite=!0,window.phystonPromptfavorites=this.favorites)})},onCopyClick(e){let t=this.favorites.find(r=>r.key===this.favoriteKey);if(!t)return;let n=t.list[e];this.$copyText(n.prompt).then(()=>{this.$toastr.success("success!")}).catch(()=>{this.$toastr.error("error!")})},onNameKeyDown(e,t){t.keyCode===13&&t.target.blur()},onNameChange(e,t){let n=this.favorites.find(o=>o.key===this.favoriteKey);if(!n)return;let r=n.list[e];const i=t.target.value;this.gradioAPI.setFavoriteName(this.favoriteKey,r.id,i).then(o=>{o?(r.name=i,window.phystonPromptfavorites=this.favorites):t.target.value=r.name}).catch(o=>{t.target.value=r.name})},onItemMouseEnter(e){let t=this.favorites.find(n=>n.key===this.favoriteKey);t&&(this.currentItem=t.list[e])},onItemMouseLeave(e){this.currentItem={}},onUseClick(e){let t=this.favorites.find(n=>n.key===this.favoriteKey);t&&(this.hide(),this.$emit("use",t.list[e]))}}},SD={class:"popup-tabs"},AD=["onClick"],ED={class:"tab-name"},OD={class:"tab-type"},LD={class:"tab-count"},ID={class:"popup-detail"},PD={class:"popup-item-tags"},DD={key:0,class:"item-wrap"},RD={key:1,class:"item-tag"},ND={class:"item-tag-value"},MD={class:"item-tag-local-value"},FD={class:"content-list"},$D=["onMouseenter","onMouseleave"],BD={class:"item-header"},HD={class:"item-header-left"},jD={class:"item-header-index"},UD={class:"item-header-time"},WD={class:"item-header-name"},KD=["value","onKeydown","onChange","placeholder"],VD={class:"item-header-right"},qD=["onClick"],zD=["onClick"],GD=["onClick"],YD=["onClick"],XD={class:"item-prompt"},JD={class:"content-empty"},ZD={key:1};function QD(e,t,n,r,i,o){const s=st("icon-svg"),l=nl("tooltip");return ye((E(),B("div",{class:"physton-prompt-favorite",ref:"favorite",onMouseenter:t[0]||(t[0]=(...c)=>o.onMouseEnter&&o.onMouseEnter(...c)),onMouseleave:t[1]||(t[1]=(...c)=>o.onMouseLeave&&o.onMouseLeave(...c)),onClick:t[2]||(t[2]=gt(()=>{},["stop"]))},[x("div",SD,[(E(!0),B(Be,null,ft(i.favorites,c=>(E(),B("div",{key:c.key,class:Ze(["popup-tab",c.key===i.favoriteKey?"active":""]),onClick:d=>o.onTabClick(c.key)},[x("div",ED,ue(e.getLang(c.name)),1),x("div",OD,ue(e.getLang(c.type)),1),x("div",LD,ue(c.list.length),1)],10,AD))),128))]),ye(x("div",ID,[x("div",PD,[(E(!0),B(Be,null,ft(i.currentItem.tags,(c,d)=>(E(),B(Be,{key:d},[c.type&&c.type==="wrap"?(E(),B("div",DD)):(E(),B("div",RD,[x("div",ND,ue(c.value),1),x("div",MD,ue(c.localValue),1)]))],64))),128))])],512),[[Ot,i.currentItem&&i.currentItem.tags]]),(E(!0),B(Be,null,ft(i.favorites,c=>(E(),B("div",{key:c.key,class:Ze(["popup-tab-content",c.key===i.favoriteKey?"active":""])},[ye(x("div",FD,[(E(!0),B(Be,null,ft(c.list,(d,h)=>(E(),B("div",{class:"content-item",key:d.id,onMouseenter:p=>o.onItemMouseEnter(h),onMouseleave:p=>o.onItemMouseLeave(h)},[x("div",BD,[x("div",HD,[x("div",jD,ue(c.list.length-h),1),x("div",UD,ue(o.formatTime(d.time)),1),x("div",WD,[x("input",{class:"header-name-input",value:d.name,onKeydown:p=>o.onNameKeyDown(h,p),onChange:p=>o.onNameChange(h,p),placeholder:e.getLang("unset_name")},null,40,KD)])]),x("div",VD,[ye((E(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:p=>o.onFavoriteClick(h)},[xe(s,{name:"favorite-yes"})],8,qD)),[[Ot,d.is_favorite],[l,e.getLang("remove_from_favorite")]]),ye((E(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:p=>o.onFavoriteClick(h)},[xe(s,{name:"favorite-no"})],8,zD)),[[Ot,!d.is_favorite],[l,e.getLang("add_to_favorite")]]),ye((E(),B("div",{class:"header-btn-copy hover-scale-140",onClick:p=>o.onCopyClick(h)},[xe(s,{name:"copy"})],8,GD)),[[l,e.getLang("copy_to_clipboard")]]),ye((E(),B("div",{class:"header-btn-use hover-scale-140",onClick:p=>o.onUseClick(h)},[xe(s,{name:"use"})],8,YD)),[[l,e.getLang("use")]])])]),x("div",XD,ue(d.prompt),1)],40,$D))),128))],512),[[Ot,c.list.length>0]]),ye(x("div",JD,[i.loading?(E(),Qe(s,{key:0,name:"loading"})):(E(),B("span",ZD,ue(i.emptyMsg),1))],512),[[Ot,c.list.length===0]])],2))),128))],544)),[[Ot,i.isShow]])}const eR=En(kD,[["render",QD]]),tR={components:{IconSvg:sr},props:{},mixins:[Tr],data(){return{historyKey:"",histories:[{name:"txt2img",type:"prompt",key:"txt2img",list:[]},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",list:[]},{name:"img2img",type:"prompt",key:"img2img",list:[]},{name:"img2img",type:"negative_prompt",key:"img2img_neg",list:[]}],isShow:!1,loading:!1,emptyMsg:"",mouseEnter:!1,currentItem:{}}},emits:["use","refreshFavorites"],mounted(){},methods:{formatTime(e){return pe.formatTime(e*1e3,!1)},getHistories(e){if(!e)return;let t=this.histories.find(n=>n.key===e);t&&(this.loading=!0,this.gradioAPI.getHistories(e).then(n=>{n&&n.length>0&&(n.reverse(),t.list=n),this.emptyMsg=this.getLang("no_history"),this.loading=!1}).catch(n=>{this.emptyMsg=this.getLang("get_history_error"),this.loading=!1}))},show(e,t){if(!(!e||!t)){if(this.historyKey=e,this.isShow){this.isShow=!1;return}this.mouseEnter=!1,this.loading=!0,this.isShow=!0,this.$refs.history.style.top=t.pageY+2+"px",this.$refs.history.style.left=t.pageX+2+"px",this.getHistories(this.historyKey),setTimeout(()=>{this.mouseEnter||this.hide()},3e3)}},hide(){this.mouseEnter=!1,this.isShow=!1},onMouseEnter(){this.mouseEnter=!0},onMouseLeave(){this.hide()},onTabClick(e){this.historyKey=e,this.getHistories(this.historyKey)},onDeleteClick(e){let t=this.histories.find(r=>r.key===this.historyKey);if(!t)return;let n=t.list[e];this.gradioAPI.deleteHistory(this.historyKey,n.id).then(r=>{r&&t.list.splice(e,1)})},onFavoriteClick(e){let t=this.histories.find(r=>r.key===this.historyKey);if(!t)return;let n=t.list[e];n.is_favorite?this.gradioAPI.unFavorite(this.historyKey,n.id).then(r=>{r&&(n.is_favorite=!1,this.$emit("refreshFavorites",this.historyKey))}):this.gradioAPI.doFavorite(this.historyKey,n.id).then(r=>{r&&(n.is_favorite=!0,this.$emit("refreshFavorites",this.historyKey))})},onCopyClick(e){let t=this.histories.find(r=>r.key===this.historyKey);if(!t)return;let n=t.list[e];this.$copyText(n.prompt).then(()=>{this.$toastr.success("success!")}).catch(()=>{this.$toastr.error("error!")})},onNameKeyDown(e,t){t.keyCode===13&&t.target.blur()},onNameChange(e,t){let n=this.histories.find(o=>o.key===this.historyKey);if(!n)return;let r=n.list[e];const i=t.target.value;this.gradioAPI.setHistoryName(this.historyKey,r.id,i).then(o=>{o?(r.name=i,this.$emit("refreshFavorites",this.historyKey)):t.target.value=r.name}).catch(o=>{t.target.value=r.name})},onItemMouseEnter(e){let t=this.histories.find(n=>n.key===this.historyKey);t&&(this.currentItem=t.list[e])},onItemMouseLeave(e){this.currentItem={}},onUseClick(e){let t=this.histories.find(n=>n.key===this.historyKey);t&&(this.hide(),this.$emit("use",t.list[e]))},onDeleteAllHistoryClick(){let e=this.histories.find(t=>t.key===this.historyKey);e&&confirm(this.getLang("delete_all_history_confirm"))&&this.gradioAPI.deleteHistories(this.historyKey).then(t=>{e.list=[]}).catch(t=>{})}}},nR={class:"popup-tabs"},rR=["onClick"],iR={class:"tab-name"},oR={class:"tab-type"},sR={class:"tab-count"},aR={class:"popup-detail"},lR={class:"popup-item-tags"},uR={key:0,class:"item-wrap"},cR={key:1,class:"item-tag"},fR={class:"item-tag-value"},dR={class:"item-tag-local-value"},pR={class:"content-list"},hR=["onMouseenter","onMouseleave"],gR={class:"item-header"},mR={class:"item-header-left"},vR={class:"item-header-index"},yR={class:"item-header-time"},bR={class:"item-header-name"},CR=["value","onKeydown","onChange","placeholder"],_R={class:"item-header-right"},wR=["onClick"],TR=["onClick"],xR=["onClick"],kR=["onClick"],SR=["onClick"],AR={class:"item-prompt"},ER={class:"content-empty"},OR={key:1};function LR(e,t,n,r,i,o){const s=st("icon-svg"),l=nl("tooltip");return ye((E(),B("div",{class:"physton-prompt-history",ref:"history",onMouseenter:t[1]||(t[1]=(...c)=>o.onMouseEnter&&o.onMouseEnter(...c)),onMouseleave:t[2]||(t[2]=(...c)=>o.onMouseLeave&&o.onMouseLeave(...c)),onClick:t[3]||(t[3]=gt(()=>{},["stop"]))},[x("div",nR,[(E(!0),B(Be,null,ft(i.histories,c=>(E(),B("div",{key:c.key,class:Ze(["popup-tab",c.key===i.historyKey?"active":""]),onClick:d=>o.onTabClick(c.key)},[x("div",iR,ue(e.getLang(c.name)),1),x("div",oR,ue(e.getLang(c.type)),1),x("div",sR,ue(c.list.length),1)],10,rR))),128))]),ye(x("div",aR,[x("div",lR,[(E(!0),B(Be,null,ft(i.currentItem.tags,(c,d)=>(E(),B(Be,{key:d},[c.type&&c.type==="wrap"?(E(),B("div",uR)):(E(),B("div",cR,[x("div",fR,ue(c.value),1),x("div",dR,ue(c.localValue),1)]))],64))),128))])],512),[[Ot,i.currentItem&&i.currentItem.tags]]),(E(!0),B(Be,null,ft(i.histories,c=>(E(),B("div",{key:c.key,class:Ze(["popup-tab-content",c.key===i.historyKey?"active":""])},[ye(x("div",pR,[x("div",{class:"clear-btn",onClick:t[0]||(t[0]=(...d)=>o.onDeleteAllHistoryClick&&o.onDeleteAllHistoryClick(...d))},[xe(s,{name:"remove"}),Xt(" "+ue(e.getLang("delete_all_history")),1)]),(E(!0),B(Be,null,ft(c.list,(d,h)=>(E(),B("div",{class:"content-item",key:d.id,onMouseenter:p=>o.onItemMouseEnter(h),onMouseleave:p=>o.onItemMouseLeave(h)},[x("div",gR,[x("div",mR,[x("div",vR,ue(c.list.length-h),1),x("div",yR,ue(o.formatTime(d.time)),1),x("div",bR,[x("input",{class:"header-name-input",value:d.name,onKeydown:p=>o.onNameKeyDown(h,p),onChange:p=>o.onNameChange(h,p),placeholder:e.getLang("unset_name")},null,40,CR)])]),x("div",_R,[x("div",{class:"header-btn-favorite hover-scale-140",onClick:p=>o.onDeleteClick(h)},[xe(s,{name:"remove"})],8,wR),ye((E(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:p=>o.onFavoriteClick(h)},[xe(s,{name:"favorite-yes"})],8,TR)),[[Ot,d.is_favorite],[l,e.getLang("remove_from_favorite")]]),ye((E(),B("div",{class:"header-btn-favorite hover-scale-140",onClick:p=>o.onFavoriteClick(h)},[xe(s,{name:"favorite-no"})],8,xR)),[[Ot,!d.is_favorite],[l,e.getLang("add_to_favorite")]]),ye((E(),B("div",{class:"header-btn-copy hover-scale-140",onClick:p=>o.onCopyClick(h)},[xe(s,{name:"copy"})],8,kR)),[[l,e.getLang("copy_to_clipboard")]]),ye((E(),B("div",{class:"header-btn-use hover-scale-140",onClick:p=>o.onUseClick(h)},[xe(s,{name:"use"})],8,SR)),[[l,e.getLang("use")]])])]),x("div",AR,ue(d.prompt),1)],40,hR))),128))],512),[[Ot,c.list.length>0]]),ye(x("div",ER,[i.loading?(E(),Qe(s,{key:0,name:"loading"})):(E(),B("span",OR,ue(i.emptyMsg),1))],512),[[Ot,c.list.length===0]])],2))),128))],544)),[[Ot,i.isShow]])}const IR=En(tR,[["render",LR]]),PR={name:"ExtensionCss",components:{IconSvg:sr},mixins:[Tr],props:{},data(){return{isOpen:!1,list:[]}},computed:{},mounted(){},methods:{init(){this.refresh(!0)},refresh(e=!1){this.gradioAPI.getExtensionCssList().then(t=>{let n=[];for(let r=0;r<t.length;r++)t[r].manifest=JSON.parse(t[r].manifest),t[r].manifest&&typeof t[r].manifest=="object"&&t[r].manifest.name&&(t[r].selected=t[r].selected||!1,t[r].id="physton-prompt-extension-"+t[r].dir,n.push(t[r]));n.forEach(r=>{r.sort=r.manifest.type+"."+r.dir}),n.sort((r,i)=>r.sort>i.sort?1:-1),this.list=n,e&&this.list.forEach(r=>{r.selected&&pe.loadCSS(r.style,r.id,!0,!1)})})},getName(e){if(!e)return"";let t=e.manifest.name;return e.manifest.i18n&&e.manifest.i18n[this.languageCode]&&(t=e.manifest.i18n[this.languageCode]),t},onChangeSelect(e){let t=this.list.find(n=>n.id===e);t&&(t.selected=!t.selected,t.selected?pe.loadCSS(t.style,t.id,!0,!1):pe.removeCSS(t.id),this.gradioAPI.setData(t.dataName,t.selected))},open(){this.isOpen=!0,this.refresh(!1)},close(){this.isOpen=!1}}},DR={class:"extension-table"},RR=["checked","onChange"],NR={class:"extension-name"},MR={class:"extension-type"},FR={class:"extension-dir"},$R={class:"extension-author"};function BR(e,t,n,r,i,o){const s=st("icon-svg");return i.isOpen?(E(),B("div",{key:0,class:"physton-prompt-extension-css",onClick:t[3]||(t[3]=(...l)=>o.close&&o.close(...l))},[x("div",{class:"extension-main",onClick:t[2]||(t[2]=gt(()=>{},["stop"]))},[x("div",{class:"extension-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[xe(s,{name:"close"})]),x("div",{class:"extension-list",onClick:t[1]||(t[1]=gt(()=>{},["stop"]))},[x("table",DR,[(E(!0),B(Be,null,ft(i.list,(l,c)=>(E(),B("tr",{key:l.dir,class:"extension-item",ref_for:!0,ref:"items"},[x("td",null,[x("input",{class:"extension-checkbox",type:"checkbox",name:"extension-item",checked:l.selected,onChange:d=>o.onChangeSelect(l.id)},null,40,RR)]),x("td",NR,ue(o.getName(l)),1),x("td",MR,ue(e.getLang(l.manifest.type)),1),x("td",FR,ue(l.dir),1),x("td",$R,[l.manifest.author?(E(),B(Be,{key:0},[Xt("By: "+ue(l.manifest.author),1)],64)):Pe("",!0)])]))),128))])])])])):Pe("",!0)}const HR=En(PR,[["render",BR]]),jR={name:"PromptFormat",components:{IconSvg:sr},mixins:[Tr],props:{autoRemoveSpace:{type:Boolean,default:!1},autoRemoveLastComma:{type:Boolean,default:!1},autoKeepWeightZero:{type:Boolean,default:!1},autoKeepWeightOne:{type:Boolean,default:!1},autoBreakBeforeWrap:{type:Boolean,default:!1},autoBreakAfterWrap:{type:Boolean,default:!1}},data(){return{isOpen:!1}},emits:["update:autoRemoveSpace","update:autoRemoveLastComma","update:autoKeepWeightZero","update:autoKeepWeightOne","update:autoBreakBeforeWrap","update:autoBreakAfterWrap"],computed:{},mounted(){},methods:{open(){this.isOpen=!0},close(){this.isOpen=!1}}},UR={class:"format-item"},WR=["checked"],KR=["innerHTML"],VR={class:"format-item"},qR=["checked"],zR=["innerHTML"],GR={class:"format-item"},YR=["checked"],XR=["innerHTML"],JR={class:"format-item"},ZR=["checked"],QR=["innerHTML"],eN={class:"format-item"},tN=["checked"],nN=["innerHTML"];function rN(e,t,n,r,i,o){const s=st("icon-svg");return i.isOpen?(E(),B("div",{key:0,class:"physton-prompt-format",onClick:t[8]||(t[8]=(...l)=>o.close&&o.close(...l))},[x("div",{class:"format-main",onClick:t[7]||(t[7]=gt(()=>{},["stop"]))},[x("div",{class:"format-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[xe(s,{name:"close"})]),x("div",{class:"format-list",onClick:t[6]||(t[6]=gt(()=>{},["stop"]))},[x("div",UR,[x("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveSpace,onChange:t[1]||(t[1]=l=>e.$emit("update:autoRemoveSpace",l.target.checked))},null,40,WR),x("div",{class:"format-desc",innerHTML:e.getLang("is_remove_space")},null,8,KR)]),x("div",VR,[x("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveLastComma,onChange:t[2]||(t[2]=l=>e.$emit("update:autoRemoveLastComma",l.target.checked))},null,40,qR),x("div",{class:"format-desc",innerHTML:e.getLang("is_remove_last_comma")},null,8,zR)]),x("div",GR,[x("input",{class:"format-checkbox",type:"checkbox",checked:n.autoKeepWeightZero,onChange:t[3]||(t[3]=l=>e.$emit("update:autoKeepWeightZero",l.target.checked))},null,40,YR),x("div",{class:"format-desc",innerHTML:e.getLang("is_keep_weight_zero")},null,8,XR)]),x("div",JR,[x("input",{class:"format-checkbox",type:"checkbox",checked:n.autoBreakBeforeWrap,onChange:t[4]||(t[4]=l=>e.$emit("update:autoBreakBeforeWrap",l.target.checked))},null,40,ZR),x("div",{class:"format-desc",innerHTML:e.getLang("is_break_before_wrap")},null,8,QR)]),x("div",eN,[x("input",{class:"format-checkbox",type:"checkbox",checked:n.autoBreakAfterWrap,onChange:t[5]||(t[5]=l=>e.$emit("update:autoBreakAfterWrap",l.target.checked))},null,40,tN),x("div",{class:"format-desc",innerHTML:e.getLang("is_break_after_wrap")},null,8,nN)])])])])):Pe("",!0)}const iN=En(jR,[["render",rN]]),oN={name:"Blacklist",components:{IconSvg:sr},mixins:[Tr],props:{autoRemoveSpace:{type:Boolean,default:!1},autoRemoveLastComma:{type:Boolean,default:!1},autoKeepWeightZero:{type:Boolean,default:!1},autoKeepWeightOne:{type:Boolean,default:!1},autoBreakBeforeWrap:{type:Boolean,default:!1},autoBreakAfterWrap:{type:Boolean,default:!1}},data(){return{isOpen:!1,data:{prompt:[],negative_prompt:[],lora:[],lycoris:[],embedding:[]},textarea:{prompt:"",negative_prompt:"",lora:"",lycoris:"",embedding:""}}},emits:["update:blacklist"],computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.data={prompt:[],negative_prompt:[],lora:[],lycoris:[],embedding:[]},this.textarea={prompt:"",negative_prompt:"",lora:"",lycoris:"",embedding:""},this.gradioAPI.getData("blacklist").then(e=>{e&&(this.data.prompt=e.prompt||[],this.data.negative_prompt=e.negative_prompt||[],this.data.lora=e.lora||[],this.data.lycoris=e.lycoris||[],this.data.embedding=e.embedding||[]),this.textarea.prompt=this.data.prompt.join(`
|
||
`),this.textarea.negative_prompt=this.data.negative_prompt.join(`
|
||
`),this.textarea.lora=this.data.lora.join(`
|
||
`),this.textarea.lycoris=this.data.lycoris.join(`
|
||
`),this.textarea.embedding=this.data.embedding.join(`
|
||
`)})},close(){this.isOpen=!1},onCloseClick(){this.close()},onSaveClick(){this.data.prompt=this.textarea.prompt.split(`
|
||
`).filter(e=>e),this.data.negative_prompt=this.textarea.negative_prompt.split(`
|
||
`).filter(e=>e),this.data.lora=this.textarea.lora.split(`
|
||
`).filter(e=>e),this.data.lycoris=this.textarea.lycoris.split(`
|
||
`).filter(e=>e),this.data.embedding=this.textarea.embedding.split(`
|
||
`).filter(e=>e),this.gradioAPI.setData("blacklist",this.data),this.close(),this.$emit("update:blacklist",this.data)}}},sN={class:"blacklist-desc"},aN={class:"blacklist-group"},lN={class:"group-title"},uN=["placeholder"],cN={class:"blacklist-group"},fN={class:"group-title"},dN=["placeholder"],pN=x("div",{class:"blacklist-wrap"},null,-1),hN={class:"blacklist-group"},gN={class:"group-title"},mN=["placeholder"],vN={class:"blacklist-group"},yN={class:"group-title"},bN=["placeholder"],CN={class:"blacklist-group"},_N={class:"group-title"},wN=["placeholder"],TN=x("div",{class:"blacklist-wrap"},null,-1),xN={class:"setting-btns"};function kN(e,t,n,r,i,o){return i.isOpen?(E(),B("div",{key:0,class:"physton-prompt-blacklist",onClick:t[9]||(t[9]=()=>{})},[x("div",{class:"blacklist-main",onClick:t[8]||(t[8]=gt(()=>{},["stop"]))},[x("div",{class:"blacklist-body",onClick:t[7]||(t[7]=gt(()=>{},["stop"]))},[x("div",sN,ue(e.getLang("blacklist_desc")),1),x("div",aN,[x("div",lN,ue(e.getLang("prompt_blacklist_list"))+":",1),ye(x("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[0]||(t[0]=s=>i.textarea.prompt=s)},null,8,uN),[[ir,i.textarea.prompt]])]),x("div",cN,[x("div",fN,ue(e.getLang("negative_prompt_blacklist_list"))+":",1),ye(x("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[1]||(t[1]=s=>i.textarea.negative_prompt=s)},null,8,dN),[[ir,i.textarea.negative_prompt]])]),pN,x("div",hN,[x("div",gN,ue(e.getLang("lora_blacklist_list"))+":",1),ye(x("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[2]||(t[2]=s=>i.textarea.lora=s)},null,8,mN),[[ir,i.textarea.lora]])]),x("div",vN,[x("div",yN,ue(e.getLang("lycoris_blacklist_list"))+":",1),ye(x("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[3]||(t[3]=s=>i.textarea.lycoris=s)},null,8,bN),[[ir,i.textarea.lycoris]])]),x("div",CN,[x("div",_N,ue(e.getLang("embedding_blacklist_list"))+":",1),ye(x("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[4]||(t[4]=s=>i.textarea.embedding=s)},null,8,wN),[[ir,i.textarea.embedding]])]),TN,x("div",xN,[x("div",{class:"blacklist-save hover-scale-120",onClick:t[5]||(t[5]=(...s)=>o.onSaveClick&&o.onSaveClick(...s))},ue(e.getLang("save")),1),x("div",{class:"blacklist-close hover-scale-120",onClick:t[6]||(t[6]=(...s)=>o.onCloseClick&&o.onCloseClick(...s))},ue(e.getLang("close")),1)])])])])):Pe("",!0)}const SN=En(oN,[["render",kN]]),AN={name:"PackagesState",components:{IconSvg:sr},mixins:[Tr],props:{python:{type:String,default:"./python"},packagesState:{type:Array,default:()=>[]}},data(){return{todayNotShow:!1,isOpen:!1,loading:!1,showResult:!1,result:`1112323
|
||
sfsdfsdf
|
||
2222
|
||
3333
|
||
1112323
|
||
sfsdfsdf
|
||
2222
|
||
3333
|
||
1112323
|
||
sfsdfsdf
|
||
2222
|
||
3333`}},emits:[],computed:{},watch:{packagesState:{handler(){this.isAllInstalled()||this.open()},deep:!0}},mounted(){},methods:{isInstalled(e){for(let t of this.packagesState)if(t.name===e)return t.state;return!1},isAllInstalled(){for(let e of this.packagesState)if(!e.state)return!1;return!0},getCommand(e){return`${this.python} -m pip install ${e.package}`},onInstallClick(){if(this.loading)return;this.loading=!0,this.showResult=!0,this.result="";let e=[];this.packagesState.forEach(r=>{r.state||e.push(r)});const t=(r=!1)=>{this.loading=!1,r&&(this.result+=`
|
||
complete!`,setTimeout(this.close,2e3)),this.scrollToBottom()},n=()=>{let r=e.shift();if(!r)return t(!0);this.gradioAPI.installPackage(r.name,r.package).then(i=>{this.result+=`${i.message}
|
||
`,i.state?(this.scrollToBottom(),n()):t(!1)}).catch(i=>{console.log(i),this.result+=`${r.name} install failed
|
||
${i.message}
|
||
`,t(!1)})};n()},scrollToBottom(){this.$nextTick(()=>{this.$refs.result.scrollTop=this.$refs.result.scrollHeight})},onTodayNotShowChange(){this.todayNotShow=!this.todayNotShow,this.gradioAPI.setData("packagesStateTodayNotShow",new Date().toLocaleDateString())},open(){this.gradioAPI.getData("packagesStateTodayNotShow").then(e=>{e&&e===new Date().toLocaleDateString()?this.close():(this.result="",this.loading=!1,this.showResult=!1,this.isOpen=!0)}).catch(e=>{})},close(){this.isOpen=!1}}},EN={class:"today-now-show"},ON=["value"],LN={class:"state-body-name"},IN=["innerHTML"],PN={class:"package-list"},DN={class:"package-name"},RN={class:"package-command"},NN={key:0,class:"install-result"};function MN(e,t,n,r,i,o){const s=st("icon-svg");return i.isOpen?(E(),B("div",{key:0,class:"physton-packages-state",onClick:t[6]||(t[6]=(...l)=>o.close&&o.close(...l))},[x("div",{class:"state-main",onClick:t[5]||(t[5]=gt(()=>{},["stop"]))},[x("div",{class:"state-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[xe(s,{name:"close"})]),x("div",{class:"state-body",onClick:t[4]||(t[4]=gt(()=>{},["stop"]))},[x("div",EN,[x("label",null,[x("input",{type:"checkbox",value:i.todayNotShow,onChange:t[1]||(t[1]=(...l)=>o.onTodayNotShowChange&&o.onTodayNotShowChange(...l))},null,40,ON),Xt(" "+ue(e.getLang("today_not_show")),1)])]),x("div",LN,ue(e.globals.shortName),1),x("div",{class:"state-body-language",onClick:t[2]||(t[2]=l=>e.$emit("click:selectLanguage",l))},[xe(s,{name:"i18n"}),x("div",null,"Language: "+ue(e.langName),1)]),x("div",{class:"state-body-desc",innerHTML:e.getLang("packages_desc")},null,8,IN),x("div",PN,[(E(!0),B(Be,null,ft(n.packagesState,l=>(E(),B("div",{key:l.name,class:"package-item"},[x("div",DN,ue(l.name),1),x("div",{class:Ze(["package-state",l.state?"installed":"not_install"])},ue(e.getLang(l.state?"installed":"not_install")),3),x("div",RN,ue(o.getCommand(l)),1)]))),128))]),x("div",{class:"btn-packages-install hover-scale-120",onClick:t[3]||(t[3]=(...l)=>o.onInstallClick&&o.onInstallClick(...l))},[i.loading?(E(),Qe(s,{key:0,name:"loading"})):(E(),B(Be,{key:1},[Xt(ue(e.getLang("install")),1)],64))]),i.showResult?(E(),B("div",NN,[Xt(ue(e.getLang("packages_installing"))+" ",1),i.result?(E(),B("div",{key:0,class:"result-content",ref:"result"},ue(i.result),513)):Pe("",!0)])):Pe("",!0)])])])):Pe("",!0)}const FN=En(AN,[["render",MN]]),$N={name:"ChatgptPrompt",components:{IconSvg:sr},mixins:[Tr],props:{},data(){return{isOpen:!1,api:{},configs:[],chatPreset:"",hidePanels:{api:!0},imageDesc:"",promptResult:"",saveConfigIng:!1,genIng:!1}},emits:["use"],computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.saveConfigIng=!1,this.genIng=!1,this.gradioAPI.getDatas(["chatgpt_prompts_preset","chatgpt_key","translate_api.openai"]).then(e=>{console.log(e),e.chatgpt_prompts_preset!==null?this.chatPreset=e.chatgpt_prompts_preset:this.chatPreset=this.getLang("chatgpt_prompts_preset"),this.configs=[];let t={},n=pe.getTranslateApiItem(this.translateApis,"openai");if(n=JSON.parse(JSON.stringify(n)),e.chatgpt_key&&typeof e.chatgpt_key=="object")for(const r of n.config)t[r.key]=e.chatgpt_key[r.key]||r.default||"";else for(const r of n.config)t[r.key]=r.default||"";t.api_key||(this.hidePanels.api=!1);for(const r of n.config)r.value=t[r.key],this.configs.push(r)})},close(){this.isOpen=!1},onUnfoldClick(e){this.hidePanels[e]=!this.hidePanels[e]},onSaveConfigClick(){if(this.saveConfigIng)return;this.saveConfigIng=!0;let e={};this.configs.forEach(t=>{e[t.key]=t.value}),this.gradioAPI.setData("chatgpt_key",e).then(t=>{this.$toastr.success(this.getLang("success")),this.saveConfigIng=!1}).catch(t=>{this.$toastr.error(t.message||t),this.saveConfigIng=!1})},onPresetChange(e){this.chatPreset=e.target.value,this._saveChatPreset()},onRestoreClick(){this.chatPreset=this.getLang("chatgpt_prompts_preset"),this._saveChatPreset()},_saveChatPreset(){this.gradioAPI.setData("chatgpt_prompts_preset",this.chatPreset)},onGenClick(){if(this.genIng)return;if(!this.imageDesc)return this.$refs.imageDesc.focus();if(this.imageDesc=this.imageDesc.trim(),!this.imageDesc)return this.$refs.imageDesc.focus();this.genIng=!0;let e=[{role:"user",content:this.chatPreset},{role:"user",content:this.imageDesc}],t={};this.configs.forEach(n=>{t[n.key]=n.value}),this.gradioAPI.genOpenAI(e,t).then(n=>{n.success?this.promptResult=n.result:this.$toastr.error(n.message||"error"),this.genIng=!1}).catch(n=>{this.$toastr.error(n.message||n),this.genIng=!1})},onUseClick(){this.$emit("use",this.promptResult),this.close()}}},BN={class:"panel-header"},HN={class:"panel-title"},jN={class:"panel-content"},UN={class:"body-line"},WN={class:"line-title"},KN={class:"line-content"},VN=["onUpdate:modelValue"],qN=["onUpdate:modelValue"],zN=["value"],GN=["innerHTML"],YN={class:"body-line"},XN=x("div",{class:"line-title"},null,-1),JN={class:"line-content text-right"},ZN={class:"panel-header"},QN={class:"panel-title"},eM={class:"panel-content"},tM={class:"body-line"},nM={class:"line-title"},rM={class:"line-subtitle"},iM={class:"line-content"},oM=["value"],sM={class:"body-line"},aM=x("div",{class:"line-title"},null,-1),lM={class:"line-content text-right"},uM={class:"body-line"},cM={class:"line-title"},fM={class:"line-subtitle"},dM={class:"line-content"},pM=["placeholder"],hM={class:"body-line"},gM=x("div",{class:"line-title"},null,-1),mM={class:"line-content text-right"},vM={class:"panel-header"},yM={class:"panel-title"},bM={class:"panel-content"},CM={class:"body-line"},_M={class:"line-title"},wM={class:"line-content"},TM={key:0,class:"body-line"},xM=x("div",{class:"line-title"},null,-1),kM={class:"line-content text-right"};function SM(e,t,n,r,i,o){const s=st("icon-svg");return i.isOpen?(E(),B("div",{key:0,class:"physton-chatgpt-prompt",onClick:t[13]||(t[13]=(...l)=>o.close&&o.close(...l))},[x("div",{class:"chatgpt-main",onClick:t[12]||(t[12]=gt(()=>{},["stop"]))},[x("div",{class:"chatgpt-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[xe(s,{name:"close"})]),x("div",{class:"chatgpt-body",onClick:t[11]||(t[11]=gt(()=>{},["stop"]))},[x("div",{class:Ze(["body-panel",i.hidePanels.api?"fold":""])},[x("div",BN,[x("div",{class:"panel-unfold",onClick:t[1]||(t[1]=l=>o.onUnfoldClick("api"))},[xe(s,{class:"hover-scale-120",name:"unfold"})]),x("div",HN,ue(e.getLang("api_config")),1)]),x("div",jN,[(E(!0),B(Be,null,ft(i.configs,l=>(E(),B("div",UN,[x("div",WN,ue(l.title),1),x("div",KN,[l.type=="input"?ye((E(),B("input",{key:0,type:"text","onUpdate:modelValue":c=>l.value=c},null,8,VN)),[[ir,l.value]]):Pe("",!0),l.type=="select"?ye((E(),B("select",{key:1,"onUpdate:modelValue":c=>l.value=c},[(E(!0),B(Be,null,ft(l.options,c=>(E(),B("option",{value:c},ue(c),9,zN))),256))],8,qN)),[[Es,l.value]]):Pe("",!0),l.desc?(E(),B("div",{key:2,innerHTML:l.desc},null,8,GN)):Pe("",!0)])]))),256)),x("div",YN,[XN,x("div",JN,[x("div",{class:"common-btn hover-scale-120",onClick:t[2]||(t[2]=(...l)=>o.onSaveConfigClick&&o.onSaveConfigClick(...l))},[i.saveConfigIng?(E(),Qe(s,{key:0,name:"loading"})):(E(),B(Be,{key:1},[Xt(ue(e.getLang("save")),1)],64))])])])])],2),x("div",{class:Ze(["body-panel",i.hidePanels.send?"fold":""])},[x("div",ZN,[x("div",{class:"panel-unfold",onClick:t[3]||(t[3]=l=>o.onUnfoldClick("send"))},[xe(s,{class:"hover-scale-120",name:"unfold"})]),x("div",QN,ue(e.getLang("image_desc")),1)]),x("div",eM,[x("div",tM,[x("div",nM,[Xt(ue(e.getLang("preset"))+" ",1),x("div",rM,ue(e.getLang("ai_one")),1)]),x("div",iM,[x("textarea",{value:i.chatPreset,onChange:t[4]||(t[4]=(...l)=>o.onPresetChange&&o.onPresetChange(...l)),style:{height:"100px"}},null,40,oM)])]),x("div",sM,[aM,x("div",lM,[x("a",{href:"javascript:",onClick:t[5]||(t[5]=(...l)=>o.onRestoreClick&&o.onRestoreClick(...l))},ue(e.getLang("restore_to_default")),1)])]),x("div",uM,[x("div",cM,[Xt(ue(e.getLang("image_desc"))+" ",1),x("div",fM,ue(e.getLang("ai_two")),1)]),x("div",dM,[ye(x("textarea",{style:{height:"100px"},ref:"imageDesc","onUpdate:modelValue":t[6]||(t[6]=l=>i.imageDesc=l),placeholder:e.getLang("input_image_desc")},null,8,pM),[[ir,i.imageDesc]])])]),x("div",hM,[gM,x("div",mM,[x("div",{class:"common-btn hover-scale-120",onClick:t[7]||(t[7]=(...l)=>o.onGenClick&&o.onGenClick(...l))},[i.genIng?(E(),Qe(s,{key:0,name:"loading"})):(E(),B(Be,{key:1},[Xt(ue(e.getLang("generate")),1)],64))])])])])],2),x("div",{class:Ze(["body-panel",i.hidePanels.result?"fold":""])},[x("div",vM,[x("div",{class:"panel-unfold",onClick:t[8]||(t[8]=l=>o.onUnfoldClick("result"))},[xe(s,{class:"hover-scale-120",name:"unfold"})]),x("div",yM,ue(e.getLang("generate_result")),1)]),x("div",bM,[x("div",CM,[x("div",_M,ue(e.getLang("generate_result")),1),x("div",wM,[ye(x("textarea",{style:{height:"100px"},"onUpdate:modelValue":t[9]||(t[9]=l=>i.promptResult=l)},null,512),[[ir,i.promptResult]])])]),i.promptResult?(E(),B("div",TM,[xM,x("div",kM,[x("div",{class:"common-btn hover-scale-120",onClick:t[10]||(t[10]=(...l)=>o.onUseClick&&o.onUseClick(...l))},ue(e.getLang("use")),1)])])):Pe("",!0)])],2)])])])):Pe("",!0)}const AM=En($N,[["render",SM]]),EM={name:"About",components:{IconSvg:sr},mixins:[Tr],data(){return{version:"",latestVersion:"",isLatestVersion:!0,isOpen:!1,loading:!1,versions:[],icons:[]}},emits:["use"],computed:{},mounted(){this.icons=[{title:"GitHub stars",url:this.globals.github+"/stargazers",image:"https://img.shields.io/github/stars/"+this.globals.name+"?style=flat-square"},{title:"GitHub forks",url:this.globals.github+"/network/members",image:"https://img.shields.io/github/forks/"+this.globals.name+"?style=flat-square"},{title:"GitHub issues",url:this.globals.github+"/issues",image:"https://img.shields.io/github/issues/"+this.globals.name+"?style=flat-square"},{title:"GitHub issues closed",url:this.globals.github+"/issues?q=is%3Aissue+is%3Aclosed",image:"https://img.shields.io/github/issues-closed/"+this.globals.name+"?style=flat-square"},{title:"GitHub license",url:this.globals.github+"/blob/master/LICENSE.md",image:"https://img.shields.io/github/license/"+this.globals.name+"?style=flat-square"},{title:"GitHub commits",url:this.globals.github+"/commits/main",image:"https://img.shields.io/github/last-commit/"+this.globals.name+"?style=flat-square"}]},methods:{open(){this.isOpen=!0,this.version="",this.latestVersion="",this.isLatestVersion=!0,this.versions=[],this.loading=!0,this.gradioAPI.getVersion().then(e=>{this.version=e.version,this.latestVersion=e.latest_version,this.isLatestVersion=e.version===e.latest_version}),this.gradioAPI.getRemoteVersions().then(e=>{this.loading=!1;let t=[];e.forEach((n,r)=>{n.is_update_readme||(n.date=pe.formatTime(n.date),t.push(n))}),this.versions=t}).catch(e=>{this.loading=!1})},close(){this.isOpen=!1},commitUrl(e){return this.globals.github+"/commit/"+e},formatVersion(e){return e?e.slice(0,7):this.getLang("unknown_version")},message(e){return e=pe.escapeHtml(e),e=e.replace(/Former-commit-id: [a-z0-9]{40}/g,""),e=e.trim(),e=e.replace(`
|
||
`,"<br/>"),e=e.replace(/#(\d+)/g,'<a href="'+this.globals.github+'/issues/$1" target="_blank">#$1</a>'),e}}},OM={class:"body-title"},LM=["href"],IM=["href"],PM=["src","alt"],DM={key:0},RM=["href"],NM={key:0,class:"has-new-version"},MM=["href"],FM=["href"],$M={class:"version-list"},BM={class:"item-header"},HM={class:"version-sha"},jM=["href"],UM={class:"version-date"},WM=["innerHTML"];function KM(e,t,n,r,i,o){const s=st("icon-svg");return i.isOpen?(E(),B("div",{key:0,class:"physton-about-prompt",onClick:t[3]||(t[3]=(...l)=>o.close&&o.close(...l))},[x("div",{class:"about-main",onClick:t[2]||(t[2]=gt(()=>{},["stop"]))},[x("div",{class:"about-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[xe(s,{name:"close"})]),x("div",{class:"about-body",onClick:t[1]||(t[1]=gt(()=>{},["stop"]))},[x("p",OM,[x("a",{href:e.globals.github,target:"_blank"},ue(e.globals.name),9,LM)]),x("p",null,[(E(!0),B(Be,null,ft(i.icons,l=>(E(),B("a",{key:l.title,href:l.url,target:"_blank"},[x("img",{src:l.image,alt:l.title},null,8,PM)],8,IM))),128))]),i.loading?Pe("",!0):(E(),B("p",DM,[x("span",null,[Xt(ue(e.getLang("version"))+": ",1),x("a",{href:o.commitUrl(i.version),target:"_blank"},ue(o.formatVersion(i.version)),9,RM)]),!i.isLatestVersion&&i.latestVersion?(E(),B("span",NM,[Xt(" ("+ue(e.getLang("has_new_version"))+": ",1),x("a",{href:o.commitUrl(i.latestVersion),target:"_blank"},ue(o.formatVersion(i.latestVersion)),9,MM),Xt(")")])):Pe("",!0)])),x("p",null,[Xt(ue(e.getLang("wiki_desc"))+" ",1),x("a",{href:e.replaceGlobals("{{docs}}"),target:"_blank"},"Wiki",8,FM)]),x("div",$M,[i.loading?(E(),Qe(s,{key:0,name:"loading"})):Pe("",!0),(E(!0),B(Be,null,ft(i.versions,l=>(E(),B("div",{class:"version-item",key:l.version},[x("div",BM,[x("div",HM,[x("a",{href:o.commitUrl(l.version),target:"_blank"},ue(o.formatVersion(l.version)),9,jM)]),x("div",UM,ue(l.date),1)]),x("div",{class:"version-msg",innerHTML:o.message(l.message)},null,8,WM)]))),128))])])])])):Pe("",!0)}const VM=En(EM,[["render",KM]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ly(e){return typeof e>"u"||e===null}function qM(e){return typeof e=="object"&&e!==null}function zM(e){return Array.isArray(e)?e:ly(e)?[]:[e]}function GM(e,t){var n,r,i,o;if(t)for(o=Object.keys(t),n=0,r=o.length;n<r;n+=1)i=o[n],e[i]=t[i];return e}function YM(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function XM(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var JM=ly,ZM=qM,QM=zM,eF=YM,tF=XM,nF=GM,on={isNothing:JM,isObject:ZM,toArray:QM,repeat:eF,isNegativeZero:tF,extend:nF};function uy(e,t){var n="",r=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(n+='in "'+e.mark.name+'" '),n+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(n+=`
|
||
|
||
`+e.mark.snippet),r+" "+n):r}function ha(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=uy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ha.prototype=Object.create(Error.prototype),ha.prototype.constructor=ha,ha.prototype.toString=function(t){return this.name+": "+uy(this,t)};var Ln=ha;function ud(e,t,n,r,i){var o="",s="",l=Math.floor(i/2)-1;return r-t>l&&(o=" ... ",t=r-l+o.length),n-r>l&&(s=" ...",n=r+l-s.length),{str:o+e.slice(t,n).replace(/\t/g,"→")+s,pos:r-t+o.length}}function cd(e,t){return on.repeat(" ",t-e.length)+e}function rF(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],o,s=-1;o=n.exec(e.buffer);)i.push(o.index),r.push(o.index+o[0].length),e.position<=o.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var l="",c,d,h=Math.min(e.line+t.linesAfter,i.length).toString().length,p=t.maxLength-(t.indent+h+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)d=ud(e.buffer,r[s-c],i[s-c],e.position-(r[s]-r[s-c]),p),l=on.repeat(" ",t.indent)+cd((e.line-c+1).toString(),h)+" | "+d.str+`
|
||
`+l;for(d=ud(e.buffer,r[s],i[s],e.position,p),l+=on.repeat(" ",t.indent)+cd((e.line+1).toString(),h)+" | "+d.str+`
|
||
`,l+=on.repeat("-",t.indent+h+3+d.pos)+`^
|
||
`,c=1;c<=t.linesAfter&&!(s+c>=i.length);c++)d=ud(e.buffer,r[s+c],i[s+c],e.position-(r[s]-r[s+c]),p),l+=on.repeat(" ",t.indent)+cd((e.line+c+1).toString(),h)+" | "+d.str+`
|
||
`;return l.replace(/\n$/,"")}var iF=rF,oF=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],sF=["scalar","sequence","mapping"];function aF(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function lF(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(oF.indexOf(n)===-1)throw new Ln('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(n){return n},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=aF(t.styleAliases||null),sF.indexOf(this.kind)===-1)throw new Ln('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var hn=lF;function cy(e,t){var n=[];return e[t].forEach(function(r){var i=n.length;n.forEach(function(o,s){o.tag===r.tag&&o.kind===r.kind&&o.multi===r.multi&&(i=s)}),n[i]=r}),n}function uF(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}function fd(e){return this.extend(e)}fd.prototype.extend=function(t){var n=[],r=[];if(t instanceof hn)r.push(t);else if(Array.isArray(t))r=r.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(n=n.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit));else throw new Ln("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof hn))throw new Ln("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Ln("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Ln("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(o){if(!(o instanceof hn))throw new Ln("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(fd.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=cy(i,"implicit"),i.compiledExplicit=cy(i,"explicit"),i.compiledTypeMap=uF(i.compiledImplicit,i.compiledExplicit),i};var fy=fd,dy=new hn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),py=new hn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),hy=new hn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),gy=new fy({explicit:[dy,py,hy]});function cF(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function fF(){return null}function dF(e){return e===null}var my=new hn("tag:yaml.org,2002:null",{kind:"scalar",resolve:cF,construct:fF,predicate:dF,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function pF(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 hF(e){return e==="true"||e==="True"||e==="TRUE"}function gF(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var vy=new hn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:pF,construct:hF,predicate:gF,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 mF(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function vF(e){return 48<=e&&e<=55}function yF(e){return 48<=e&&e<=57}function bF(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i==="-"||i==="+")&&(i=e[++n]),i==="0"){if(n+1===t)return!0;if(i=e[++n],i==="b"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(i!=="0"&&i!=="1")return!1;r=!0}return r&&i!=="_"}if(i==="x"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!mF(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!vF(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!yF(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function CF(e){var t=e,n=1,r;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),r=t[0],(r==="-"||r==="+")&&(r==="-"&&(n=-1),t=t.slice(1),r=t[0]),t==="0")return 0;if(r==="0"){if(t[1]==="b")return n*parseInt(t.slice(2),2);if(t[1]==="x")return n*parseInt(t.slice(2),16);if(t[1]==="o")return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}function _F(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!on.isNegativeZero(e)}var yy=new hn("tag:yaml.org,2002:int",{kind:"scalar",resolve:bF,construct:CF,predicate:_F,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"]}}),wF=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function TF(e){return!(e===null||!wF.test(e)||e[e.length-1]==="_")}function xF(e){var t,n;return t=e.replace(/_/g,"").toLowerCase(),n=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:n*parseFloat(t,10)}var kF=/^[-+]?[0-9]+e/;function SF(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(on.isNegativeZero(e))return"-0.0";return n=e.toString(10),kF.test(n)?n.replace("e",".e"):n}function AF(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||on.isNegativeZero(e))}var by=new hn("tag:yaml.org,2002:float",{kind:"scalar",resolve:TF,construct:xF,predicate:AF,represent:SF,defaultStyle:"lowercase"}),Cy=gy.extend({implicit:[my,vy,yy,by]}),_y=Cy,wy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ty=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 EF(e){return e===null?!1:wy.exec(e)!==null||Ty.exec(e)!==null}function OF(e){var t,n,r,i,o,s,l,c=0,d=null,h,p,b;if(t=wy.exec(e),t===null&&(t=Ty.exec(e)),t===null)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],s=+t[5],l=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(h=+t[10],p=+(t[11]||0),d=(h*60+p)*6e4,t[9]==="-"&&(d=-d)),b=new Date(Date.UTC(n,r,i,o,s,l,c)),d&&b.setTime(b.getTime()-d),b}function LF(e){return e.toISOString()}var xy=new hn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:EF,construct:OF,instanceOf:Date,represent:LF});function IF(e){return e==="<<"||e===null}var ky=new hn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:IF}),dd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`;function PF(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=dd;for(n=0;n<i;n++)if(t=o.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8===0}function DF(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=dd,s=0,l=[];for(t=0;t<i;t++)t%4===0&&t&&(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|o.indexOf(r.charAt(t));return n=i%4*6,n===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):n===18?(l.push(s>>10&255),l.push(s>>2&255)):n===12&&l.push(s>>4&255),new Uint8Array(l)}function RF(e){var t="",n=0,r,i,o=e.length,s=dd;for(r=0;r<o;r++)r%3===0&&r&&(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]),n=(n<<8)+e[r];return i=o%3,i===0?(t+=s[n>>18&63],t+=s[n>>12&63],t+=s[n>>6&63],t+=s[n&63]):i===2?(t+=s[n>>10&63],t+=s[n>>4&63],t+=s[n<<2&63],t+=s[64]):i===1&&(t+=s[n>>2&63],t+=s[n<<4&63],t+=s[64],t+=s[64]),t}function NF(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Sy=new hn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:PF,construct:DF,predicate:NF,represent:RF}),MF=Object.prototype.hasOwnProperty,FF=Object.prototype.toString;function $F(e){if(e===null)return!0;var t=[],n,r,i,o,s,l=e;for(n=0,r=l.length;n<r;n+=1){if(i=l[n],s=!1,FF.call(i)!=="[object Object]")return!1;for(o in i)if(MF.call(i,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function BF(e){return e!==null?e:[]}var Ay=new hn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:$F,construct:BF}),HF=Object.prototype.toString;function jF(e){if(e===null)return!0;var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],HF.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function UF(e){if(e===null)return[];var t,n,r,i,o,s=e;for(o=new Array(s.length),t=0,n=s.length;t<n;t+=1)r=s[t],i=Object.keys(r),o[t]=[i[0],r[i[0]]];return o}var Ey=new hn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:jF,construct:UF}),WF=Object.prototype.hasOwnProperty;function KF(e){if(e===null)return!0;var t,n=e;for(t in n)if(WF.call(n,t)&&n[t]!==null)return!1;return!0}function VF(e){return e!==null?e:{}}var Oy=new hn("tag:yaml.org,2002:set",{kind:"mapping",resolve:KF,construct:VF}),pd=_y.extend({implicit:[xy,ky],explicit:[Sy,Ay,Ey,Oy]}),wi=Object.prototype.hasOwnProperty,cu=1,Ly=2,Iy=3,fu=4,hd=1,qF=2,Py=3,zF=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,GF=/[\x85\u2028\u2029]/,YF=/[,\[\]\{\}]/,Dy=/^(?:!|!!|![a-z\-]+!)$/i,Ry=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ny(e){return Object.prototype.toString.call(e)}function Fr(e){return e===10||e===13}function Zi(e){return e===9||e===32}function Bn(e){return e===9||e===32||e===10||e===13}function es(e){return e===44||e===91||e===93||e===123||e===125}function XF(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function JF(e){return e===120?2:e===117?4:e===85?8:0}function ZF(e){return 48<=e&&e<=57?e-48:-1}function My(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 QF(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var Fy=new Array(256),$y=new Array(256),ts=0;ts<256;ts++)Fy[ts]=My(ts)?1:0,$y[ts]=My(ts);function e$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||pd,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 By(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=iF(n),new Ln(t,n)}function Ke(e,t){throw By(e,t)}function du(e,t){e.onWarning&&e.onWarning.call(null,By(e,t))}var Hy={YAML:function(t,n,r){var i,o,s;t.version!==null&&Ke(t,"duplication of %YAML directive"),r.length!==1&&Ke(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Ke(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&Ke(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&du(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&Ke(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Dy.test(i)||Ke(t,"ill-formed tag handle (first argument) of the TAG directive"),wi.call(t.tagMap,i)&&Ke(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ry.test(o)||Ke(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{Ke(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function Ti(e,t,n,r){var i,o,s,l;if(t<n){if(l=e.input.slice(t,n),r)for(i=0,o=l.length;i<o;i+=1)s=l.charCodeAt(i),s===9||32<=s&&s<=1114111||Ke(e,"expected valid JSON character");else zF.test(l)&&Ke(e,"the stream contains non-printable characters");e.result+=l}}function jy(e,t,n,r){var i,o,s,l;for(on.isObject(n)||Ke(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),s=0,l=i.length;s<l;s+=1)o=i[s],wi.call(t,o)||(t[o]=n[o],r[o]=!0)}function ns(e,t,n,r,i,o,s,l,c){var d,h;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),d=0,h=i.length;d<h;d+=1)Array.isArray(i[d])&&Ke(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Ny(i[d])==="[object Object]"&&(i[d]="[object Object]");if(typeof i=="object"&&Ny(i)==="[object Object]"&&(i="[object Object]"),i=String(i),t===null&&(t={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(d=0,h=o.length;d<h;d+=1)jy(e,t,o[d],n);else jy(e,t,o,n);else!e.json&&!wi.call(n,i)&&wi.call(t,i)&&(e.line=s||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,Ke(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):t[i]=o,delete n[i];return t}function gd(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++):Ke(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Qt(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Zi(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Fr(i))for(gd(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&du(e,"deficient indentation"),r}function pu(e){var t=e.position,n;return n=e.input.charCodeAt(t),!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Bn(n)))}function md(e,t){t===1?e.result+=" ":t>1&&(e.result+=on.repeat(`
|
||
`,t-1))}function t$(e,t,n){var r,i,o,s,l,c,d,h,p=e.kind,b=e.result,y;if(y=e.input.charCodeAt(e.position),Bn(y)||es(y)||y===35||y===38||y===42||y===33||y===124||y===62||y===39||y===34||y===37||y===64||y===96||(y===63||y===45)&&(i=e.input.charCodeAt(e.position+1),Bn(i)||n&&es(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,l=!1;y!==0;){if(y===58){if(i=e.input.charCodeAt(e.position+1),Bn(i)||n&&es(i))break}else if(y===35){if(r=e.input.charCodeAt(e.position-1),Bn(r))break}else{if(e.position===e.lineStart&&pu(e)||n&&es(y))break;if(Fr(y))if(c=e.line,d=e.lineStart,h=e.lineIndent,Qt(e,!1,-1),e.lineIndent>=t){l=!0,y=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=d,e.lineIndent=h;break}}l&&(Ti(e,o,s,!1),md(e,e.line-c),o=s=e.position,l=!1),Zi(y)||(s=e.position+1),y=e.input.charCodeAt(++e.position)}return Ti(e,o,s,!1),e.result?!0:(e.kind=p,e.result=b,!1)}function n$(e,t){var n,r,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Ti(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Fr(n)?(Ti(e,r,i,!0),md(e,Qt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&pu(e)?Ke(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Ke(e,"unexpected end of the stream within a single quoted scalar")}function r$(e,t){var n,r,i,o,s,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return Ti(e,n,e.position,!0),e.position++,!0;if(l===92){if(Ti(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),Fr(l))Qt(e,!1,t);else if(l<256&&Fy[l])e.result+=$y[l],e.position++;else if((s=JF(l))>0){for(i=s,o=0;i>0;i--)l=e.input.charCodeAt(++e.position),(s=XF(l))>=0?o=(o<<4)+s:Ke(e,"expected hexadecimal character");e.result+=QF(o),e.position++}else Ke(e,"unknown escape sequence");n=r=e.position}else Fr(l)?(Ti(e,n,r,!0),md(e,Qt(e,!1,t)),n=r=e.position):e.position===e.lineStart&&pu(e)?Ke(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Ke(e,"unexpected end of the stream within a double quoted scalar")}function i$(e,t){var n=!0,r,i,o,s=e.tag,l,c=e.anchor,d,h,p,b,y,w=Object.create(null),T,O,I,P;if(P=e.input.charCodeAt(e.position),P===91)h=93,y=!1,l=[];else if(P===123)h=125,y=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),P=e.input.charCodeAt(++e.position);P!==0;){if(Qt(e,!0,t),P=e.input.charCodeAt(e.position),P===h)return e.position++,e.tag=s,e.anchor=c,e.kind=y?"mapping":"sequence",e.result=l,!0;n?P===44&&Ke(e,"expected the node content, but found ','"):Ke(e,"missed comma between flow collection entries"),O=T=I=null,p=b=!1,P===63&&(d=e.input.charCodeAt(e.position+1),Bn(d)&&(p=b=!0,e.position++,Qt(e,!0,t))),r=e.line,i=e.lineStart,o=e.position,rs(e,t,cu,!1,!0),O=e.tag,T=e.result,Qt(e,!0,t),P=e.input.charCodeAt(e.position),(b||e.line===r)&&P===58&&(p=!0,P=e.input.charCodeAt(++e.position),Qt(e,!0,t),rs(e,t,cu,!1,!0),I=e.result),y?ns(e,l,w,O,T,I,r,i,o):p?l.push(ns(e,null,w,O,T,I,r,i,o)):l.push(T),Qt(e,!0,t),P=e.input.charCodeAt(e.position),P===44?(n=!0,P=e.input.charCodeAt(++e.position)):n=!1}Ke(e,"unexpected end of the stream within a flow collection")}function o$(e,t){var n,r,i=hd,o=!1,s=!1,l=t,c=0,d=!1,h,p;if(p=e.input.charCodeAt(e.position),p===124)r=!1;else if(p===62)r=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)hd===i?i=p===43?Py:qF:Ke(e,"repeat of a chomping mode identifier");else if((h=ZF(p))>=0)h===0?Ke(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Ke(e,"repeat of an indentation width identifier"):(l=t+h-1,s=!0);else break;if(Zi(p)){do p=e.input.charCodeAt(++e.position);while(Zi(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!Fr(p)&&p!==0)}for(;p!==0;){for(gd(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!s||e.lineIndent<l)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>l&&(l=e.lineIndent),Fr(p)){c++;continue}if(e.lineIndent<l){i===Py?e.result+=on.repeat(`
|
||
`,o?1+c:c):i===hd&&o&&(e.result+=`
|
||
`);break}for(r?Zi(p)?(d=!0,e.result+=on.repeat(`
|
||
`,o?1+c:c)):d?(d=!1,e.result+=on.repeat(`
|
||
`,c+1)):c===0?o&&(e.result+=" "):e.result+=on.repeat(`
|
||
`,c):e.result+=on.repeat(`
|
||
`,o?1+c:c),o=!0,s=!0,c=0,n=e.position;!Fr(p)&&p!==0;)p=e.input.charCodeAt(++e.position);Ti(e,n,e.position,!1)}return!0}function Uy(e,t){var n,r=e.tag,i=e.anchor,o=[],s,l=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ke(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!Bn(s))));){if(l=!0,e.position++,Qt(e,!0,-1)&&e.lineIndent<=t){o.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,rs(e,t,Iy,!1,!0),o.push(e.result),Qt(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)Ke(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return l?(e.tag=r,e.anchor=i,e.kind="sequence",e.result=o,!0):!1}function s$(e,t,n){var r,i,o,s,l,c,d=e.tag,h=e.anchor,p={},b=Object.create(null),y=null,w=null,T=null,O=!1,I=!1,P;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),P=e.input.charCodeAt(e.position);P!==0;){if(!O&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ke(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,(P===63||P===58)&&Bn(r))P===63?(O&&(ns(e,p,b,y,w,null,s,l,c),y=w=T=null),I=!0,O=!0,i=!0):O?(O=!1,i=!0):Ke(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,P=r;else{if(s=e.line,l=e.lineStart,c=e.position,!rs(e,n,Ly,!1,!0))break;if(e.line===o){for(P=e.input.charCodeAt(e.position);Zi(P);)P=e.input.charCodeAt(++e.position);if(P===58)P=e.input.charCodeAt(++e.position),Bn(P)||Ke(e,"a whitespace character is expected after the key-value separator within a block mapping"),O&&(ns(e,p,b,y,w,null,s,l,c),y=w=T=null),I=!0,O=!1,i=!1,y=e.tag,w=e.result;else if(I)Ke(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=h,!0}else if(I)Ke(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=h,!0}if((e.line===o||e.lineIndent>t)&&(O&&(s=e.line,l=e.lineStart,c=e.position),rs(e,t,fu,!0,i)&&(O?w=e.result:T=e.result),O||(ns(e,p,b,y,w,T,s,l,c),y=w=T=null),Qt(e,!0,-1),P=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&P!==0)Ke(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return O&&ns(e,p,b,y,w,null,s,l,c),I&&(e.tag=d,e.anchor=h,e.kind="mapping",e.result=p),I}function a$(e){var t,n=!1,r=!1,i,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Ke(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(n=!0,s=e.input.charCodeAt(++e.position)):s===33?(r=!0,i="!!",s=e.input.charCodeAt(++e.position)):i="!",t=e.position,n){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Ke(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Bn(s);)s===33&&(r?Ke(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),Dy.test(i)||Ke(e,"named tag handle cannot contain such characters"),r=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),YF.test(o)&&Ke(e,"tag suffix cannot contain flow indicator characters")}o&&!Ry.test(o)&&Ke(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{Ke(e,"tag name is malformed: "+o)}return n?e.tag=o:wi.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:Ke(e,'undeclared tag handle "'+i+'"'),!0}function l$(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Ke(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Bn(n)&&!es(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ke(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function u$(e){var t,n,r;if(r=e.input.charCodeAt(e.position),r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Bn(r)&&!es(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ke(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),wi.call(e.anchorMap,n)||Ke(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Qt(e,!0,-1),!0}function rs(e,t,n,r,i){var o,s,l,c=1,d=!1,h=!1,p,b,y,w,T,O;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=l=fu===n||Iy===n,r&&Qt(e,!0,-1)&&(d=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;a$(e)||l$(e);)Qt(e,!0,-1)?(d=!0,l=o,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):l=!1;if(l&&(l=d||i),(c===1||fu===n)&&(cu===n||Ly===n?T=t:T=t+1,O=e.position-e.lineStart,c===1?l&&(Uy(e,O)||s$(e,O,T))||i$(e,T)?h=!0:(s&&o$(e,T)||n$(e,T)||r$(e,T)?h=!0:u$(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Ke(e,"alias node should not have any properties")):t$(e,T,cu===n)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(h=l&&Uy(e,O))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ke(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,b=e.implicitTypes.length;p<b;p+=1)if(w=e.implicitTypes[p],w.resolve(e.result)){e.result=w.construct(e.result),e.tag=w.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(wi.call(e.typeMap[e.kind||"fallback"],e.tag))w=e.typeMap[e.kind||"fallback"][e.tag];else for(w=null,y=e.typeMap.multi[e.kind||"fallback"],p=0,b=y.length;p<b;p+=1)if(e.tag.slice(0,y[p].tag.length)===y[p].tag){w=y[p];break}w||Ke(e,"unknown tag !<"+e.tag+">"),e.result!==null&&w.kind!==e.kind&&Ke(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+w.kind+'", not "'+e.kind+'"'),w.resolve(e.result,e.tag)?(e.result=w.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ke(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function c$(e){var t=e.position,n,r,i,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(Qt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),n=e.position;s!==0&&!Bn(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Ke(e,"directive name must not be less than one character in length");s!==0;){for(;Zi(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!Fr(s));break}if(Fr(s))break;for(n=e.position;s!==0&&!Bn(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&gd(e),wi.call(Hy,r)?Hy[r](e,r,i):du(e,'unknown document directive "'+r+'"')}if(Qt(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,Qt(e,!0,-1)):o&&Ke(e,"directives end mark is expected"),rs(e,e.lineIndent-1,fu,!1,!0),Qt(e,!0,-1),e.checkLineBreaks&&GF.test(e.input.slice(t,e.position))&&du(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&pu(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Qt(e,!0,-1));return}if(e.position<e.length-1)Ke(e,"end of the stream or a document separator is expected");else return}function Wy(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
||
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new e$(e,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Ke(n,"null byte is not allowed in input")),n.input+="\0";n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)c$(n);return n.documents}function f$(e,t,n){t!==null&&typeof t=="object"&&typeof n>"u"&&(n=t,t=null);var r=Wy(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function d$(e,t){var n=Wy(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Ln("expected a single document in the stream, but found more")}}var p$=f$,h$=d$,Ky={loadAll:p$,load:h$},Vy=Object.prototype.toString,qy=Object.prototype.hasOwnProperty,vd=65279,g$=9,ga=10,m$=13,v$=32,y$=33,b$=34,yd=35,C$=37,_$=38,w$=39,T$=42,zy=44,x$=45,hu=58,k$=61,S$=62,A$=63,E$=64,Gy=91,Yy=93,O$=96,Xy=123,L$=124,Jy=125,Tn={};Tn[0]="\\0",Tn[7]="\\a",Tn[8]="\\b",Tn[9]="\\t",Tn[10]="\\n",Tn[11]="\\v",Tn[12]="\\f",Tn[13]="\\r",Tn[27]="\\e",Tn[34]='\\"',Tn[92]="\\\\",Tn[133]="\\N",Tn[160]="\\_",Tn[8232]="\\L",Tn[8233]="\\P";var I$=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],P$=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function D$(e,t){var n,r,i,o,s,l,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,o=r.length;i<o;i+=1)s=r[i],l=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),c=e.compiledTypeMap.fallback[s],c&&qy.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[s]=l;return n}function R$(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n="x",r=2;else if(e<=65535)n="u",r=4;else if(e<=4294967295)n="U",r=8;else throw new Ln("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+on.repeat("0",r-t.length)+t}var N$=1,ma=2;function M$(e){this.schema=e.schema||pd,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=on.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=D$(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==='"'?ma:N$,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 Zy(e,t){for(var n=on.repeat(" ",t),r=0,i=-1,o="",s,l=e.length;r<l;)i=e.indexOf(`
|
||
`,r),i===-1?(s=e.slice(r),r=l):(s=e.slice(r,i+1),r=i+1),s.length&&s!==`
|
||
`&&(o+=n),o+=s;return o}function bd(e,t){return`
|
||
`+on.repeat(" ",e.indent*t)}function F$(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function gu(e){return e===v$||e===g$}function va(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==vd||65536<=e&&e<=1114111}function Qy(e){return va(e)&&e!==vd&&e!==m$&&e!==ga}function e0(e,t,n){var r=Qy(e),i=r&&!gu(e);return(n?r:r&&e!==zy&&e!==Gy&&e!==Yy&&e!==Xy&&e!==Jy)&&e!==yd&&!(t===hu&&!i)||Qy(t)&&!gu(t)&&e===yd||t===hu&&i}function $$(e){return va(e)&&e!==vd&&!gu(e)&&e!==x$&&e!==A$&&e!==hu&&e!==zy&&e!==Gy&&e!==Yy&&e!==Xy&&e!==Jy&&e!==yd&&e!==_$&&e!==T$&&e!==y$&&e!==L$&&e!==k$&&e!==S$&&e!==w$&&e!==b$&&e!==C$&&e!==E$&&e!==O$}function B$(e){return!gu(e)&&e!==hu}function ya(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function t0(e){var t=/^\n* /;return t.test(e)}var n0=1,Cd=2,r0=3,i0=4,is=5;function H$(e,t,n,r,i,o,s,l){var c,d=0,h=null,p=!1,b=!1,y=r!==-1,w=-1,T=$$(ya(e,0))&&B$(ya(e,e.length-1));if(t||s)for(c=0;c<e.length;d>=65536?c+=2:c++){if(d=ya(e,c),!va(d))return is;T=T&&e0(d,h,l),h=d}else{for(c=0;c<e.length;d>=65536?c+=2:c++){if(d=ya(e,c),d===ga)p=!0,y&&(b=b||c-w-1>r&&e[w+1]!==" ",w=c);else if(!va(d))return is;T=T&&e0(d,h,l),h=d}b=b||y&&c-w-1>r&&e[w+1]!==" "}return!p&&!b?T&&!s&&!i(e)?n0:o===ma?is:Cd:n>9&&t0(e)?is:s?o===ma?is:Cd:b?i0:r0}function j$(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===ma?'""':"''";if(!e.noCompatMode&&(I$.indexOf(t)!==-1||P$.test(t)))return e.quotingType===ma?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),l=r||e.flowLevel>-1&&n>=e.flowLevel;function c(d){return F$(e,d)}switch(H$(t,l,e.indent,s,c,e.quotingType,e.forceQuotes&&!r,i)){case n0:return t;case Cd:return"'"+t.replace(/'/g,"''")+"'";case r0:return"|"+o0(t,e.indent)+s0(Zy(t,o));case i0:return">"+o0(t,e.indent)+s0(Zy(U$(t,s),o));case is:return'"'+W$(t)+'"';default:throw new Ln("impossible error: invalid scalar style")}}()}function o0(e,t){var n=t0(e)?String(t):"",r=e[e.length-1]===`
|
||
`,i=r&&(e[e.length-2]===`
|
||
`||e===`
|
||
`),o=i?"+":r?"":"-";return n+o+`
|
||
`}function s0(e){return e[e.length-1]===`
|
||
`?e.slice(0,-1):e}function U$(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(`
|
||
`);return d=d!==-1?d:e.length,n.lastIndex=d,a0(e.slice(0,d),t)}(),i=e[0]===`
|
||
`||e[0]===" ",o,s;s=n.exec(e);){var l=s[1],c=s[2];o=c[0]===" ",r+=l+(!i&&!o&&c!==""?`
|
||
`:"")+a0(c,t),i=o}return r}function a0(e,t){if(e===""||e[0]===" ")return e;for(var n=/ [^ ]/g,r,i=0,o,s=0,l=0,c="";r=n.exec(e);)l=r.index,l-i>t&&(o=s>i?s:l,c+=`
|
||
`+e.slice(i,o),i=o+1),s=l;return c+=`
|
||
`,e.length-i>t&&s>i?c+=e.slice(i,s)+`
|
||
`+e.slice(s+1):c+=e.slice(i),c.slice(1)}function W$(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=ya(e,i),r=Tn[n],!r&&va(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||R$(n);return t}function K$(e,t,n){var r="",i=e.tag,o,s,l;for(o=0,s=n.length;o<s;o+=1)l=n[o],e.replacer&&(l=e.replacer.call(n,String(o),l)),(ti(e,t,l,!1,!1)||typeof l>"u"&&ti(e,t,null,!1,!1))&&(r!==""&&(r+=","+(e.condenseFlow?"":" ")),r+=e.dump);e.tag=i,e.dump="["+r+"]"}function l0(e,t,n,r){var i="",o=e.tag,s,l,c;for(s=0,l=n.length;s<l;s+=1)c=n[s],e.replacer&&(c=e.replacer.call(n,String(s),c)),(ti(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&ti(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=bd(e,t)),e.dump&&ga===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function V$(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,l,c,d,h;for(s=0,l=o.length;s<l;s+=1)h="",r!==""&&(h+=", "),e.condenseFlow&&(h+='"'),c=o[s],d=n[c],e.replacer&&(d=e.replacer.call(n,c,d)),ti(e,t,c,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ti(e,t,d,!1,!1)&&(h+=e.dump,r+=h));e.tag=i,e.dump="{"+r+"}"}function q$(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),l,c,d,h,p,b;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Ln("sortKeys must be a boolean or a function");for(l=0,c=s.length;l<c;l+=1)b="",(!r||i!=="")&&(b+=bd(e,t)),d=s[l],h=n[d],e.replacer&&(h=e.replacer.call(n,d,h)),ti(e,t+1,d,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&ga===e.dump.charCodeAt(0)?b+="?":b+="? "),b+=e.dump,p&&(b+=bd(e,t)),ti(e,t+1,h,!0,p)&&(e.dump&&ga===e.dump.charCodeAt(0)?b+=":":b+=": ",b+=e.dump,i+=b));e.tag=o,e.dump=i||"{}"}function u0(e,t,n){var r,i,o,s,l,c;for(i=n?e.explicitTypes:e.implicitTypes,o=0,s=i.length;o<s;o+=1)if(l=i[o],(l.instanceOf||l.predicate)&&(!l.instanceOf||typeof t=="object"&&t instanceof l.instanceOf)&&(!l.predicate||l.predicate(t))){if(n?l.multi&&l.representName?e.tag=l.representName(t):e.tag=l.tag:e.tag="?",l.represent){if(c=e.styleMap[l.tag]||l.defaultStyle,Vy.call(l.represent)==="[object Function]")r=l.represent(t,c);else if(qy.call(l.represent,c))r=l.represent[c](t,c);else throw new Ln("!<"+l.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function ti(e,t,n,r,i,o,s){e.tag=null,e.dump=n,u0(e,n,!1)||u0(e,n,!0);var l=Vy.call(e.dump),c=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var h=l==="[object Object]"||l==="[object Array]",p,b;if(h&&(p=e.duplicates.indexOf(n),b=p!==-1),(e.tag!==null&&e.tag!=="?"||b||e.indent!==2&&t>0)&&(i=!1),b&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(h&&b&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(q$(e,t,e.dump,i),b&&(e.dump="&ref_"+p+e.dump)):(V$(e,t,e.dump),b&&(e.dump="&ref_"+p+" "+e.dump));else if(l==="[object Array]")r&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?l0(e,t-1,e.dump,i):l0(e,t,e.dump,i),b&&(e.dump="&ref_"+p+e.dump)):(K$(e,t,e.dump),b&&(e.dump="&ref_"+p+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&j$(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Ln("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 z$(e,t){var n=[],r=[],i,o;for(_d(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function _d(e,t,n){var r,i,o;if(e!==null&&typeof e=="object")if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,o=e.length;i<o;i+=1)_d(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)_d(e[r[i]],t,n)}function G$(e,t){t=t||{};var n=new M$(t);n.noRefs||z$(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),ti(n,0,r,!0,!0)?n.dump+`
|
||
`:""}var Y$=G$,X$={dump:Y$};function wd(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 J$=hn,Z$=fy,Q$=gy,eB=Cy,tB=_y,nB=pd,rB=Ky.load,iB=Ky.loadAll,oB=X$.dump,sB=Ln,aB={binary:Sy,float:by,map:hy,null:my,pairs:Ey,set:Oy,timestamp:xy,bool:vy,int:yy,merge:ky,omap:Ay,seq:py,str:dy},lB=wd("safeLoad","load"),uB=wd("safeLoadAll","loadAll"),cB=wd("safeDump","dump"),fB={Type:J$,Schema:Z$,FAILSAFE_SCHEMA:Q$,JSON_SCHEMA:eB,CORE_SCHEMA:tB,DEFAULT_SCHEMA:nB,load:rB,loadAll:iB,dump:oB,YAMLException:sB,types:aB,safeLoad:lB,safeLoadAll:uB,safeDump:cB};const dB={name:"App",components:{About:VM,ChatgptPrompt:AM,PackagesState:FN,PromptFormat:iN,Blacklist:SN,ExtensionCss:HR,IconSvg:sr,History:IR,Favorite:eR,SelectLanguage:xD,TranslateSetting:CD,PhystonPrompt:lP},mixins:[],data(){return{prompts:[{tab:"tab_txt2img",prompt:"txt2img_prompt",counter:"txt2img_token_counter",button:"txt2img_token_button",steps:"txt2img_steps",historyKey:"txt2img",favoriteKey:"txt2img",$prompt:null,$textarea:null,$steps:null,name:"txt2img_prompt",neg:!1,hideDefaultInputKey:"txt2ImgHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"txt2ImgHidePanel",hidePanel:!1,hideGroupTagsKey:"txt2ImgHideGroupTags",hideGroupTags:!1,id:"phystonPrompt_txt2img_prompt"},{tab:"tab_txt2img",prompt:"txt2img_neg_prompt",counter:"txt2img_negative_token_counter",button:"txt2img_negative_token_button",steps:"txt2img_steps",historyKey:"txt2img_neg",favoriteKey:"txt2img_neg",$prompt:null,$textarea:null,$steps:null,name:"txt2img_neg_prompt",neg:!0,hideDefaultInputKey:"txt2ImgNegHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"txt2ImgNegHidePanel",hidePanel:!1,hideGroupTagsKey:"txt2ImgNegHideGroupTags",hideGroupTags:!1,id:"phystonPrompt_txt2img_neg_prompt"},{tab:"tab_img2img",prompt:"img2img_prompt",counter:"img2img_token_counter",button:"img2img_token_button",steps:"img2img_steps",historyKey:"img2img",favoriteKey:"img2img",$prompt:null,$textarea:null,$steps:null,name:"img2img_prompt",neg:!1,hideDefaultInputKey:"img2ImgHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"img2ImgHidePanel",hidePanel:!1,hideGroupTagsKey:"img2ImgHideGroupTags",hideGroupTags:!1,id:"phystonPrompt_img2img_prompt"},{tab:"tab_img2img",prompt:"img2img_neg_prompt",counter:"img2img_negative_token_counter",button:"img2img_negative_token_button",steps:"img2img_steps",historyKey:"img2img_neg",favoriteKey:"img2img_neg",$prompt:null,$textarea:null,$steps:null,name:"img2img_neg_prompt",neg:!0,hideDefaultInputKey:"img2ImgNegHideDefaultInput",hideDefaultInput:!1,hidePanelKey:"img2ImgNegHidePanel",hidePanel:!1,hideGroupTagsKey:"img2ImgNegHideGroupTags",hideGroupTags:!1,id:"phystonPrompt_img2img_neg_prompt"}],languageCode:"",languages:{},translateApis:[],translateApi:"",translateApiConfig:{},canOneTranslate:!1,autoTranslate:!1,autoTranslateToEnglish:!1,autoTranslateToLocal:!1,autoRemoveSpace:!0,autoRemoveLastComma:!1,autoKeepWeightZero:!1,autoKeepWeightOne:!1,autoBreakBeforeWrap:!1,autoBreakAfterWrap:!1,enableTooltip:!0,tagCompleteFile:"",onlyCsvOnAuto:!1,startWatchSave:!1,pasteBtn:null,showPastePopup:!1,pasteTitle:"",pasteContent:"",pasteLoading:!1,historyCurrentPrompt:"",favoriteCurrentPrompt:"",chatgptCurrentPrompt:"",extraNetworks:[],loras:[],lycos:[],embeddings:[],python:"",packagesState:[],version:"",latestVersion:"",isLatestVersion:!0,theme:"dark",groupTags:[],groupTagsColor:{},groupTagsColorKeyCache:{},groupTagsTranslate:!0,groupTagsTranslateCache:{toEn:new Map,toLocal:new Map},blacklist:{}}},watch:{languageCode:{handler:function(e,t){this.startWatchSave&&(console.log("onLanguageCodeChange",e),this.canOneTranslate=pe.canOneTranslate(this.languageCode),this.gradioAPI.setData("languageCode",e).then(n=>{}).catch(n=>{}),this.loadGroupTags())},immediate:!1},autoTranslateToEnglish:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoTranslateToEnglishChange",e),this.gradioAPI.setData("autoTranslateToEnglish",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoTranslateToLocal:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoTranslateToLocalChange",e),this.gradioAPI.setData("autoTranslateToLocal",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoTranslate:{handler:function(e,t){this.startWatchSave&&(this.autoTranslateToEnglish=this.autoTranslate,this.autoTranslateToLocal=this.autoTranslate,console.log("onAutoTranslateChange",e),this.gradioAPI.setData("autoTranslate",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoRemoveSpace:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoRemoveSpaceChange",e),this.gradioAPI.setData("autoRemoveSpace",e).then(n=>{this.prompts.forEach(r=>{this.$refs[r.id][0].updatePrompt()})}).catch(n=>{}))},immediate:!1},autoRemoveLastComma:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoRemoveLastCommaChange",e),this.gradioAPI.setData("autoRemoveLastComma",e).then(n=>{this.prompts.forEach(r=>{this.$refs[r.id][0].updatePrompt()})}).catch(n=>{}))},immediate:!1},autoKeepWeightZero:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoKeepWeightZeroChange",e),this.gradioAPI.setData("autoKeepWeightZero",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoKeepWeightOne:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoKeepWeightOneChange",e),this.gradioAPI.setData("autoKeepWeightOne",e).then(n=>{}).catch(n=>{}))},immediate:!1},autoBreakBeforeWrap:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoBreakBeforeWrap",e),this.gradioAPI.setData("autoBreakBeforeWrap",e).then(n=>{this.prompts.forEach(r=>{this.$refs[r.id][0].updatePrompt()})}).catch(n=>{}))},immediate:!1},autoBreakAfterWrap:{handler:function(e,t){this.startWatchSave&&(console.log("onAutoBreakAfterWrap",e),this.gradioAPI.setData("autoBreakAfterWrap",e).then(n=>{this.prompts.forEach(r=>{this.$refs[r.id][0].updatePrompt()})}).catch(n=>{}))},immediate:!1},enableTooltip:{handler:function(e,t){this.startWatchSave&&(localStorage.setItem("phystonPromptEnableTooltip",e?"true":"false"),this.updateTippyState(),this.gradioAPI.setData("enableTooltip",e).then(n=>{}).catch(n=>{}))},immediate:!1},translateApi:{handler:function(e,t){this.startWatchSave&&(console.log("onTranslateApiChange",e,t),this.updateTranslateApiConfig(),this.gradioAPI.setData("translateApi",e).then(n=>{}).catch(n=>{}))},immediate:!1},tagCompleteFile:{handler:function(e,t){this.startWatchSave&&(console.log("onTagCompleteFileChange",e,t),this.gradioAPI.setData("tagCompleteFile",e).then(n=>{}).catch(n=>{}))},immediate:!1},groupTagsColor:{handler:function(e,t){this.startWatchSave&&(console.log("onGroupTagsColorChange",e,t),this.gradioAPI.setData("groupTagsColor",e).then(n=>{}).catch(n=>{}))},deep:!0,immediate:!1},groupTagsTranslate:{handler:function(e,t){this.startWatchSave&&(console.log("onGroupTagsTranslateChange",e,t),this.gradioAPI.setData("groupTagsTranslate",e).then(n=>{}).catch(n=>{}))},immediate:!1},onlyCsvOnAuto(){this.startWatchSave&&(console.log("onOnlyCsvOnAutoChange",this.onlyCsvOnAuto),this.gradioAPI.setData("onlyCsvOnAuto",this.onlyCsvOnAuto).then(e=>{}).catch(e=>{}))}},mounted(){pe.loadCSS("toastr.min.css","physton-prompt-toastr",!0,!0,!1),pe.loadCSS("tippy.css","physton-prompt-tippy",!0,!0,!1),pe.loadCSS("vue3-colorpicker.css","physton-prompt-vue3-colorpicker",!0,!0,!1),pe.loadCSS("main.min.css","physton-prompt-main",!0);let t=new URLSearchParams(window.location.search).get("__theme");["dark","light"].includes(t)&&(this.theme=t,pe.gradioApp().classList.contains(this.theme)||pe.gradioApp().classList.add(this.theme)),setTimeout(()=>{document.querySelector('meta[content="LobeHub"]')&&pe.gradioApp().classList.add("physton-prompt-lobehub")},3e3),this.gradioAPI.getConfig().then(n=>{console.log("config:",n),this.languageCode=n.i18n.default,this.translateApi=n.translate_apis.default,this.translateApis=n.translate_apis.apis,this.python=n.python,this.packagesState=n.packages_state;let r={};n.i18n.languages.forEach(i=>{r[i.code]=i}),this.languages=r,this.init()}).catch(n=>{this.$toastr.error("Connection to backend API service failed. Please manually refresh the webpage. If it still doesn't work, please restart the WebUI.<br/>连接到后台接口服务失败,请手动再刷新一次网页。如果还是不行,请重启WebUI。<br/><br/>"+n.message,kl.shortName,{timeOut:2e4}),console.log(n)})},methods:{getLang(e){return pe.getLang(e,this.languageCode,this.languages)},init(){this.loadExtraNetworks();let e=["languageCode","autoTranslate","autoTranslateToEnglish","autoTranslateToLocal","autoRemoveSpace","autoRemoveLastComma","autoKeepWeightZero","autoKeepWeightOne","autoBreakBeforeWrap","autoBreakAfterWrap","translateApi","enableTooltip","tagCompleteFile","onlyCsvOnAuto","extensionSelect.minimalist","groupTagsColor","groupTagsTranslate","blacklist"];this.prompts.forEach(t=>{e.push(t.hideDefaultInputKey),e.push(t.hidePanelKey),e.push(t.hideGroupTagsKey)}),this.gradioAPI.getDatas(e).then(t=>{if(t.languageCode!==null){let n=!1;for(let r in this.languages)if(this.languages[r].code===t.languageCode){n=!0;break}n&&(this.languageCode=t.languageCode,this.$forceUpdate(),this.gradioAPI.setData("languageCode",this.languageCode))}else{let n=navigator.language||navigator.userLanguage||"";if(n){for(let r in this.languages)if(pe.isSameLang(this.languages[r].code,n)){this.languageCode=this.languages[r].code,this.$forceUpdate(),this.gradioAPI.setData("languageCode",this.languageCode);break}}}if(this.canOneTranslate=pe.canOneTranslate(this.languageCode),t.autoTranslateToEnglish!==null&&(this.autoTranslateToEnglish=t.autoTranslateToEnglish),t.autoTranslateToLocal!==null&&(this.autoTranslateToLocal=t.autoTranslateToLocal),t.autoTranslate!==null?this.canOneTranslate?(this.autoTranslate=t.autoTranslate,this.autoTranslateToEnglish=this.autoTranslate,this.autoTranslateToLocal=this.autoTranslate):this.autoTranslate=!1:this.canOneTranslate?(this.autoTranslate=this.autoTranslateToEnglish||this.autoTranslateToLocal,this.autoTranslateToEnglish=!0,this.autoTranslateToLocal=!0):this.autoTranslate=!1,t.autoRemoveSpace!==null&&(this.autoRemoveSpace=t.autoRemoveSpace),t.autoRemoveLastComma!==null&&(this.autoRemoveLastComma=t.autoRemoveLastComma),t.autoKeepWeightZero!==null&&(this.autoKeepWeightZero=t.autoKeepWeightZero),t.autoKeepWeightOne!==null&&(this.autoKeepWeightOne=t.autoKeepWeightOne),t.autoBreakBeforeWrap!==null&&(this.autoBreakBeforeWrap=t.autoBreakBeforeWrap),t.autoBreakAfterWrap!==null&&(this.autoBreakAfterWrap=t.autoBreakAfterWrap),t.enableTooltip!==null&&(this.enableTooltip=t.enableTooltip),localStorage.setItem("phystonPromptEnableTooltip",this.enableTooltip?"true":"false"),this.updateTippyState(),t.translateApi!==null&&(this.translateApi=t.translateApi),t.tagCompleteFile!==null&&(this.tagCompleteFile=t.tagCompleteFile,this.$nextTick(()=>{this.$refs.translateSetting.getCSV(this.tagCompleteFile)})),t.onlyCsvOnAuto!==null&&(this.onlyCsvOnAuto=t.onlyCsvOnAuto),t["extensionSelect.minimalist"]===null&&this.gradioAPI.setData("extensionSelect.minimalist",!0),t.groupTagsColor!==null&&typeof t.groupTagsColor=="object"){this.groupTagsColor={};for(let n in t.groupTagsColor){let r=t.groupTagsColor[n];this.groupTagsColor[n]=Et(pe.fitterInputColor(r))}}t.groupTagsTranslate!==null&&(this.groupTagsTranslate=t.groupTagsTranslate),t.blacklist!==null&&(this.blacklist=t.blacklist),this.updateTranslateApiConfig(),this.$refs.extensionCss.init(),this.prompts.forEach(n=>{t[n.hideDefaultInputKey]!==null&&(n.hideDefaultInput=t[n.hideDefaultInputKey]),t[n.hidePanelKey]!==null&&(n.hidePanel=t[n.hidePanelKey]),t[n.hideGroupTagsKey]!==null&&(n.hideGroupTags=t[n.hideGroupTagsKey]),n.$prompt=pe.gradioApp().querySelector("#"+n.prompt),n.$textarea=n.$prompt.getElementsByTagName("textarea")[0],n.$steps=pe.gradioApp().querySelector("#"+n.steps)}),this.$nextTick(()=>{this.prompts.forEach(n=>{const r=pe.gradioApp().querySelector("#"+n.id);n.$prompt.parentElement.parentElement.parentElement.appendChild(r),n.$prompt.parentElement.parentElement.style.display=n.hideDefaultInput?"none":"flex"}),this.startWatchSave=!0}),this.handlePaste(),this.loadGroupTags()})},loadGroupTags(){this.gradioAPI.getGroupTags(this.languageCode).then(e=>{if(!e||e==="")this.groupTags=[];else try{this.groupTags=fB.load(e),Array.isArray(this.groupTags)||(this.groupTags=[])}catch(t){console.log(t),this.groupTags=[]}this._handleGroupTags()})},_handleGroupTags(){let e={toEn:new Map,toLocal:new Map},t=(n,r)=>{[n,n.replace(/\_/g," "),n.replace(/\-/g," ")].forEach(o=>{if(e.toLocal.has(o)){let s=e.toLocal.get(o);s.includes(r)||s.push(r)}else e.toLocal.set(o,[r])}),e.toEn.set(r,n)};this.groupTags.forEach((n,r)=>{n.tabKey="groupTags-"+r,n.groups.forEach((i,o)=>{if(i.tabKey="subGroupTags-"+r+"-"+o,i.type&&i.type=="wrap")return;let s=pe.getTagsColorKey(n.name,i.name);this.groupTagsColor[s]||(this.groupTagsColor[s]=Et(pe.fitterInputColor(i.color)));for(let l in i.tags){if(!l)continue;this.groupTagsColorKeyCache[l]=s;let c=i.tags[l];!c||l==c||t(l,c)}})}),this.groupTagsTranslateCache=e},updateTippyState(){for(const e of this.$tippyList)this.enableTooltip?e.enable():e.disable()},updateTranslateApiConfig(){this.gradioAPI.getData("translate_api."+this.translateApi).then(e=>{let t={};const n=pe.getTranslateApiItem(this.translateApis,this.translateApi);if(n.config){for(const r of n.config)n.type==="translators"&&r.key==="region"&&!e.region?t[r.key]=this.languageCode==="zh_CN"||this.languageCode==="zh_HK"||this.languageCode==="zh_TW"?"China":"EN":e?t[r.key]=e[r.key]:t[r.key]=r.default||"";t.concurrent=n.concurrent||0}this.translateApiConfig=t})},onPromptFormatClick(e){this.$refs.promptFormat.open(e)},onBlacklistClick(e){this.$refs.blacklist.open(e)},onSelectLanguageClick(e){this.$refs.selectLanguage.open(e)},onTranslateApiClick(){this.$refs.translateSetting.open(this.translateApi)},onSelectThemeClick(){this.$refs.extensionCss.open()},handlePaste(){if(typeof gradioApp!="function")return;const e=gradioApp().querySelectorAll("#paste");!e||e.length<=0||e.forEach((t,n)=>{const r=t.cloneNode(!0);r.id="paste-new-"+n,r.innerHTML="🗒",t.parentNode.insertBefore(r,t.nextSibling),r.addEventListener("click",()=>{this.pasteBtn=t,this.openPastePopup()}),this.pasteTitle=t.title})},openPastePopup(){this.pasteContent="",this.pasteLoading=!1,this.showPastePopup=!0},closePastePopup(){this.showPastePopup=!1},onClickPasteSubmit(){this.pasteLoading=!0;const e=get_uiCurrentTabContent();let t=null,n=null,r=null,i=null,o=[];for(const s of this.prompts)s.tab==e.id&&(console.log(s),o.push(s.id),s.neg?(n=s.$textarea,i=s.$prompt):(t=s.$textarea,r=s.$prompt));if(!t||!r||!i){this.pasteLoading=!1;return}t.value=this.pasteContent,t.dispatchEvent(new Event("input")),this.pasteBtn.dispatchEvent(new Event("click")),setTimeout(()=>{let s=0,l=0;s=setInterval(()=>{if(l++,l>100){this.pasteLoading=!1,clearInterval(s);return}r.getElementsByClassName("hide").length>0&&i.getElementsByClassName("hide").length>0&&(this.pasteLoading=!1,this.closePastePopup(),clearInterval(s),pe.hideCompleteResults(t),pe.hideCompleteResults(n),o.forEach((c,d)=>{setTimeout(()=>{this.$refs[c][0].onTextareaChange(!0)},1e3)}))},100)},1e3)},onUpdateHideDefaultInput(e,t){const n=this.prompts.find(r=>r.id==e);n&&(n.hideDefaultInput=t,this.gradioAPI.setData(n.hideDefaultInputKey,n.hideDefaultInput),n.$prompt.parentElement.parentElement.style.display=n.hideDefaultInput?"none":"flex")},onUpdateHidePanel(e,t){const n=this.prompts.find(r=>r.id==e);n&&(n.hidePanel=t,this.gradioAPI.setData(n.hidePanelKey,n.hidePanel))},onUpdateHideGroupTags(e,t){const n=this.prompts.find(r=>r.id==e);n&&(n.hideGroupTags=t,this.gradioAPI.setData(n.hideGroupTagsKey,n.hideGroupTags))},onShowHistory(e,t){this.$refs.favorite.hide(),this.historyCurrentPrompt=e;const n=this.prompts.find(r=>r.id==e);n&&this.$refs.history.show(n.historyKey,t)},onUseHistory(e){if(!this.historyCurrentPrompt)return;const t=this.prompts.find(n=>n.id==this.historyCurrentPrompt);t&&this.$refs[t.id][0].useFavorite(e)},onShowFavorite(e,t){this.$refs.history.hide(),this.favoriteCurrentPrompt=e;const n=this.prompts.find(r=>r.id==e);n&&this.$refs.favorite.show(n.favoriteKey,t)},onUseFavorite(e){if(!this.favoriteCurrentPrompt)return;const t=this.prompts.find(n=>n.id==this.favoriteCurrentPrompt);t&&this.$refs[t.id][0].useFavorite(e)},onRefreshFavorites(e){this.$refs.favorite.getFavorites(e)},onShowChatgpt(e,t){this.chatgptCurrentPrompt=e,this.prompts.find(r=>r.id==e)&&this.$refs.chatgptPrompt.open()},onUseChatgpt(e){if(!this.chatgptCurrentPrompt)return;const t=this.prompts.find(n=>n.id==this.chatgptCurrentPrompt);t&&this.$refs[t.id][0].useChatgpt(e)},onShowAbout(){this.$refs.about.open()},onSwitchTheme(){this.theme=this.theme==="dark"?"light":"dark";let e=window.location.href,t=new URL(e),n=new URLSearchParams(t.search);n.has("__theme")?n.set("__theme",this.theme):n.append("__theme",this.theme);let r=t.origin+t.pathname+"?"+n.toString();window.location.href=r},onUpdateBlacklist(e){this.blacklist=e}}},pB={class:"paste-popup-title"},hB={class:"paste-popup-body"},gB=["placeholder"],mB={key:1,class:"paste-submit"};function vB(e,t,n,r,i,o){const s=st("physton-prompt"),l=st("translate-setting"),c=st("select-language"),d=st("prompt-format"),h=st("blacklist"),p=st("history"),b=st("favorite"),y=st("extension-css"),w=st("packages-state"),T=st("chatgpt-prompt"),O=st("about"),I=st("icon-svg");return E(),B("div",null,[(E(!0),B(Be,null,ft(i.prompts,P=>(E(),B(Be,{key:P.name},[P.$textarea?(E(),Qe(s,{key:0,id:P.id,ref_for:!0,ref:P.id,name:P.name,neg:P.neg,textarea:P.$textarea,steps:P.$steps,"language-code":i.languageCode,"onUpdate:languageCode":t[0]||(t[0]=j=>i.languageCode=j),"translate-apis":i.translateApis,languages:i.languages,"history-key":P.historyKey,"onClick:showHistory":j=>o.onShowHistory(P.id,j),"favorite-key":P.favoriteKey,onRefreshFavorites:o.onRefreshFavorites,"onClick:showFavorite":j=>o.onShowFavorite(P.id,j),"can-one-translate":i.canOneTranslate,"onUpdate:canOneTranslate":t[1]||(t[1]=j=>i.canOneTranslate=j),"auto-translate":i.autoTranslate,"onUpdate:autoTranslate":t[2]||(t[2]=j=>i.autoTranslate=j),"auto-translate-to-english":i.autoTranslateToEnglish,"onUpdate:autoTranslateToEnglish":t[3]||(t[3]=j=>i.autoTranslateToEnglish=j),"auto-translate-to-local":i.autoTranslateToLocal,"onUpdate:autoTranslateToLocal":t[4]||(t[4]=j=>i.autoTranslateToLocal=j),"auto-remove-space":i.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[5]||(t[5]=j=>i.autoRemoveSpace=j),"auto-remove-last-comma":i.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[6]||(t[6]=j=>i.autoRemoveLastComma=j),"auto-keep-weight-zero":i.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[7]||(t[7]=j=>i.autoKeepWeightZero=j),"auto-keep-weight-one":i.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[8]||(t[8]=j=>i.autoKeepWeightOne=j),"auto-break-before-wrap":i.autoBreakBeforeWrap,"onUpdate:autoBreakBeforeWrap":t[9]||(t[9]=j=>i.autoBreakBeforeWrap=j),"auto-break-after-wrap":i.autoBreakAfterWrap,"onUpdate:autoBreakAfterWrap":t[10]||(t[10]=j=>i.autoBreakAfterWrap=j),"hide-default-input":P.hideDefaultInput,"onUpdate:hideDefaultInput":j=>o.onUpdateHideDefaultInput(P.id,j),"hide-panel":P.hidePanel,"onUpdate:hidePanel":j=>o.onUpdateHidePanel(P.id,j),"enable-tooltip":i.enableTooltip,"onUpdate:enableTooltip":t[11]||(t[11]=j=>i.enableTooltip=j),"translate-api":i.translateApi,"onUpdate:translateApi":t[12]||(t[12]=j=>i.translateApi=j),"translate-api-config":i.translateApiConfig,"onClick:translateApi":o.onTranslateApiClick,"onClick:promptFormat":o.onPromptFormatClick,"onClick:blacklist":o.onBlacklistClick,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[13]||(t[13]=j=>i.tagCompleteFile=j),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[14]||(t[14]=j=>i.onlyCsvOnAuto=j),"group-tags-translate":i.groupTagsTranslate,"onUpdate:groupTagsTranslate":t[15]||(t[15]=j=>i.groupTagsTranslate=j),"onClick:selectLanguage":o.onSelectLanguageClick,"onClick:selectTheme":o.onSelectThemeClick,"onClick:showChatgpt":j=>o.onShowChatgpt(P.id,j),"extra-networks":i.extraNetworks,loras:i.loras,lycos:i.lycos,embeddings:i.embeddings,version:i.version,"latest-version":i.latestVersion,"is-latest-version":i.isLatestVersion,"onClick:showAbout":o.onShowAbout,theme:i.theme,"onClick:switchTheme":o.onSwitchTheme,"group-tags":i.groupTags,"hide-group-tags":P.hideGroupTags,"group-tags-color":i.groupTagsColor,"onUpdate:groupTagsColor":t[16]||(t[16]=j=>i.groupTagsColor=j),"group-tags-color-key-cache":i.groupTagsColorKeyCache,"onUpdate:hideGroupTags":j=>o.onUpdateHideGroupTags(P.id,j),"group-tags-translate-cache":i.groupTagsTranslateCache,blacklist:i.blacklist},null,8,["id","name","neg","textarea","steps","language-code","translate-apis","languages","history-key","onClick:showHistory","favorite-key","onRefreshFavorites","onClick:showFavorite","can-one-translate","auto-translate","auto-translate-to-english","auto-translate-to-local","auto-remove-space","auto-remove-last-comma","auto-keep-weight-zero","auto-keep-weight-one","auto-break-before-wrap","auto-break-after-wrap","hide-default-input","onUpdate:hideDefaultInput","hide-panel","onUpdate:hidePanel","enable-tooltip","translate-api","translate-api-config","onClick:translateApi","onClick:promptFormat","onClick:blacklist","tag-complete-file","only-csv-on-auto","group-tags-translate","onClick:selectLanguage","onClick:selectTheme","onClick:showChatgpt","extra-networks","loras","lycos","embeddings","version","latest-version","is-latest-version","onClick:showAbout","theme","onClick:switchTheme","group-tags","hide-group-tags","group-tags-color","group-tags-color-key-cache","onUpdate:hideGroupTags","group-tags-translate-cache","blacklist"])):Pe("",!0)],64))),128)),xe(l,{ref:"translateSetting","language-code":i.languageCode,"onUpdate:languageCode":t[17]||(t[17]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"onForceUpdate:translateApi":o.updateTranslateApiConfig,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[18]||(t[18]=P=>i.tagCompleteFile=P),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[19]||(t[19]=P=>i.onlyCsvOnAuto=P),"group-tags-translate":i.groupTagsTranslate,"onUpdate:groupTagsTranslate":t[20]||(t[20]=P=>i.groupTagsTranslate=P),"translate-api":i.translateApi,"onUpdate:translateApi":t[21]||(t[21]=P=>i.translateApi=P)},null,8,["language-code","translate-apis","languages","onForceUpdate:translateApi","tag-complete-file","only-csv-on-auto","group-tags-translate","translate-api"]),xe(c,{ref:"selectLanguage","language-code":i.languageCode,"onUpdate:languageCode":t[22]||(t[22]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"translate-api":i.translateApi,"onUpdate:translateApi":t[23]||(t[23]=P=>i.translateApi=P),"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[24]||(t[24]=P=>i.tagCompleteFile=P),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[25]||(t[25]=P=>i.onlyCsvOnAuto=P)},null,8,["language-code","translate-apis","languages","translate-api","tag-complete-file","only-csv-on-auto"]),xe(d,{ref:"promptFormat","language-code":i.languageCode,"onUpdate:languageCode":t[26]||(t[26]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"auto-remove-space":i.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[27]||(t[27]=P=>i.autoRemoveSpace=P),"auto-remove-last-comma":i.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[28]||(t[28]=P=>i.autoRemoveLastComma=P),"auto-keep-weight-zero":i.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[29]||(t[29]=P=>i.autoKeepWeightZero=P),"auto-keep-weight-one":i.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[30]||(t[30]=P=>i.autoKeepWeightOne=P),"auto-break-before-wrap":i.autoBreakBeforeWrap,"onUpdate:autoBreakBeforeWrap":t[31]||(t[31]=P=>i.autoBreakBeforeWrap=P),"auto-break-after-wrap":i.autoBreakAfterWrap,"onUpdate:autoBreakAfterWrap":t[32]||(t[32]=P=>i.autoBreakAfterWrap=P)},null,8,["language-code","translate-apis","languages","auto-remove-space","auto-remove-last-comma","auto-keep-weight-zero","auto-keep-weight-one","auto-break-before-wrap","auto-break-after-wrap"]),xe(h,{ref:"blacklist","language-code":i.languageCode,"onUpdate:languageCode":t[33]||(t[33]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"onUpdate:blacklist":o.onUpdateBlacklist},null,8,["language-code","translate-apis","languages","onUpdate:blacklist"]),xe(p,{ref:"history","language-code":i.languageCode,"onUpdate:languageCode":t[34]||(t[34]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[35]||(t[35]=P=>i.tagCompleteFile=P),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[36]||(t[36]=P=>i.onlyCsvOnAuto=P),onRefreshFavorites:o.onRefreshFavorites,onUse:o.onUseHistory},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onRefreshFavorites","onUse"]),xe(b,{ref:"favorite","language-code":i.languageCode,"onUpdate:languageCode":t[37]||(t[37]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[38]||(t[38]=P=>i.tagCompleteFile=P),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[39]||(t[39]=P=>i.onlyCsvOnAuto=P),onUse:o.onUseFavorite},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onUse"]),xe(y,{ref:"extensionCss","language-code":i.languageCode,"onUpdate:languageCode":t[40]||(t[40]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages},null,8,["language-code","translate-apis","languages"]),xe(w,{ref:"packagesState","language-code":i.languageCode,"onUpdate:languageCode":t[41]||(t[41]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,"onClick:selectLanguage":o.onSelectLanguageClick,"packages-state":i.packagesState,python:i.python},null,8,["language-code","translate-apis","languages","onClick:selectLanguage","packages-state","python"]),xe(T,{ref:"chatgptPrompt","language-code":i.languageCode,"onUpdate:languageCode":t[42]||(t[42]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages,onUse:o.onUseChatgpt},null,8,["language-code","translate-apis","languages","onUse"]),xe(O,{ref:"about","language-code":i.languageCode,"onUpdate:languageCode":t[43]||(t[43]=P=>i.languageCode=P),"translate-apis":i.translateApis,languages:i.languages},null,8,["language-code","translate-apis","languages"]),i.showPastePopup?(E(),B("div",{key:0,class:"physton-paste-popup",onClick:t[48]||(t[48]=(...P)=>o.closePastePopup&&o.closePastePopup(...P))},[x("div",{class:"paste-popup-main",onClick:t[47]||(t[47]=gt(()=>{},["stop"]))},[x("div",{class:"paste-popup-close",onClick:t[44]||(t[44]=(...P)=>o.closePastePopup&&o.closePastePopup(...P))},[xe(I,{name:"close"})]),x("div",pB,ue(i.pasteTitle),1),x("div",hB,[ye(x("textarea",{class:"paste-content","onUpdate:modelValue":t[45]||(t[45]=P=>i.pasteContent=P),placeholder:o.getLang("please_enter_the_content_here")},null,8,gB),[[ir,i.pasteContent]]),i.pasteLoading?(E(),B("div",mB,[xe(I,{name:"loading"})])):(E(),B("div",{key:0,class:"paste-submit",onClick:t[46]||(t[46]=(...P)=>o.onClickPasteSubmit&&o.onClickPasteSubmit(...P))},"Submit"))])])])):Pe("",!0)])}const yB=En(dB,[["render",vB]]);var c0={exports:{}},Td={exports:{}};/*!
|
||
* jQuery JavaScript Library v3.6.4
|
||
* https://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* https://sizzlejs.com/
|
||
*
|
||
* Copyright OpenJS Foundation and other contributors
|
||
* Released under the MIT license
|
||
* https://jquery.org/license
|
||
*
|
||
* Date: 2023-03-08T15:28Z
|
||
*/var f0;function bB(){return f0||(f0=1,function(e){(function(t,n){e.exports=t.document?n(t,!0):function(r){if(!r.document)throw new Error("jQuery requires a window with a document");return n(r)}})(typeof window<"u"?window:Wc,function(t,n){var r=[],i=Object.getPrototypeOf,o=r.slice,s=r.flat?function(u){return r.flat.call(u)}:function(u){return r.concat.apply([],u)},l=r.push,c=r.indexOf,d={},h=d.toString,p=d.hasOwnProperty,b=p.toString,y=b.call(Object),w={},T=function(f){return typeof f=="function"&&typeof f.nodeType!="number"&&typeof f.item!="function"},O=function(f){return f!=null&&f===f.window},I=t.document,P={type:!0,src:!0,nonce:!0,noModule:!0};function j(u,f,g){g=g||I;var v,C,_=g.createElement("script");if(_.text=u,f)for(v in P)C=f[v]||f.getAttribute&&f.getAttribute(v),C&&_.setAttribute(v,C);g.head.appendChild(_).parentNode.removeChild(_)}function L(u){return u==null?u+"":typeof u=="object"||typeof u=="function"?d[h.call(u)]||"object":typeof u}var we="3.6.4",m=function(u,f){return new m.fn.init(u,f)};m.fn=m.prototype={jquery:we,constructor:m,length:0,toArray:function(){return o.call(this)},get:function(u){return u==null?o.call(this):u<0?this[u+this.length]:this[u]},pushStack:function(u){var f=m.merge(this.constructor(),u);return f.prevObject=this,f},each:function(u){return m.each(this,u)},map:function(u){return this.pushStack(m.map(this,function(f,g){return u.call(f,g,f)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(m.grep(this,function(u,f){return(f+1)%2}))},odd:function(){return this.pushStack(m.grep(this,function(u,f){return f%2}))},eq:function(u){var f=this.length,g=+u+(u<0?f:0);return this.pushStack(g>=0&&g<f?[this[g]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:r.sort,splice:r.splice},m.extend=m.fn.extend=function(){var u,f,g,v,C,_,k=arguments[0]||{},H=1,M=arguments.length,q=!1;for(typeof k=="boolean"&&(q=k,k=arguments[H]||{},H++),typeof k!="object"&&!T(k)&&(k={}),H===M&&(k=this,H--);H<M;H++)if((u=arguments[H])!=null)for(f in u)v=u[f],!(f==="__proto__"||k===v)&&(q&&v&&(m.isPlainObject(v)||(C=Array.isArray(v)))?(g=k[f],C&&!Array.isArray(g)?_=[]:!C&&!m.isPlainObject(g)?_={}:_=g,C=!1,k[f]=m.extend(q,_,v)):v!==void 0&&(k[f]=v));return k},m.extend({expando:"jQuery"+(we+Math.random()).replace(/\D/g,""),isReady:!0,error:function(u){throw new Error(u)},noop:function(){},isPlainObject:function(u){var f,g;return!u||h.call(u)!=="[object Object]"?!1:(f=i(u),f?(g=p.call(f,"constructor")&&f.constructor,typeof g=="function"&&b.call(g)===y):!0)},isEmptyObject:function(u){var f;for(f in u)return!1;return!0},globalEval:function(u,f,g){j(u,{nonce:f&&f.nonce},g)},each:function(u,f){var g,v=0;if(ce(u))for(g=u.length;v<g&&f.call(u[v],v,u[v])!==!1;v++);else for(v in u)if(f.call(u[v],v,u[v])===!1)break;return u},makeArray:function(u,f){var g=f||[];return u!=null&&(ce(Object(u))?m.merge(g,typeof u=="string"?[u]:u):l.call(g,u)),g},inArray:function(u,f,g){return f==null?-1:c.call(f,u,g)},merge:function(u,f){for(var g=+f.length,v=0,C=u.length;v<g;v++)u[C++]=f[v];return u.length=C,u},grep:function(u,f,g){for(var v,C=[],_=0,k=u.length,H=!g;_<k;_++)v=!f(u[_],_),v!==H&&C.push(u[_]);return C},map:function(u,f,g){var v,C,_=0,k=[];if(ce(u))for(v=u.length;_<v;_++)C=f(u[_],_,g),C!=null&&k.push(C);else for(_ in u)C=f(u[_],_,g),C!=null&&k.push(C);return s(k)},guid:1,support:w}),typeof Symbol=="function"&&(m.fn[Symbol.iterator]=r[Symbol.iterator]),m.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(u,f){d["[object "+f+"]"]=f.toLowerCase()});function ce(u){var f=!!u&&"length"in u&&u.length,g=L(u);return T(u)||O(u)?!1:g==="array"||f===0||typeof f=="number"&&f>0&&f-1 in u}var D=function(u){var f,g,v,C,_,k,H,M,q,Z,he,Y,re,We,ct,Ue,ln,en,Zn,Lt="sizzle"+1*new Date,ut=u.document,Un=0,xt=0,Wt=Mu(),Ia=Mu(),Du=Mu(),Qn=Mu(),no=function(A,F){return A===F&&(he=!0),0},ro={}.hasOwnProperty,Wn=[],ki=Wn.pop,hr=Wn.push,Si=Wn.push,Ob=Wn.slice,io=function(A,F){for(var W=0,oe=A.length;W<oe;W++)if(A[W]===F)return W;return-1},np="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",At="[\\x20\\t\\r\\n\\f]",oo="(?:\\\\[\\da-fA-F]{1,6}"+At+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Lb="\\["+At+"*("+oo+")(?:"+At+"*([*^$|!~]?=)"+At+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+oo+"))|)"+At+"*\\]",rp=":("+oo+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Lb+")*)|.*)\\)|)",Kj=new RegExp(At+"+","g"),Ru=new RegExp("^"+At+"+|((?:^|[^\\\\])(?:\\\\.)*)"+At+"+$","g"),Vj=new RegExp("^"+At+"*,"+At+"*"),Ib=new RegExp("^"+At+"*([>+~]|"+At+")"+At+"*"),qj=new RegExp(At+"|>"),zj=new RegExp(rp),Gj=new RegExp("^"+oo+"$"),Nu={ID:new RegExp("^#("+oo+")"),CLASS:new RegExp("^\\.("+oo+")"),TAG:new RegExp("^("+oo+"|[*])"),ATTR:new RegExp("^"+Lb),PSEUDO:new RegExp("^"+rp),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+At+"*(even|odd|(([+-]|)(\\d*)n|)"+At+"*(?:([+-]|)"+At+"*(\\d+)|))"+At+"*\\)|)","i"),bool:new RegExp("^(?:"+np+")$","i"),needsContext:new RegExp("^"+At+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+At+"*((?:-\\d)?\\d*)"+At+"*\\)|)(?=[^-]|$)","i")},Yj=/HTML$/i,Xj=/^(?:input|select|textarea|button)$/i,Jj=/^h\d$/i,Pa=/^[^{]+\{\s*\[native \w/,Zj=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ip=/[+~]/,oi=new RegExp("\\\\[\\da-fA-F]{1,6}"+At+"?|\\\\([^\\r\\n\\f])","g"),si=function(A,F){var W="0x"+A.slice(1)-65536;return F||(W<0?String.fromCharCode(W+65536):String.fromCharCode(W>>10|55296,W&1023|56320))},Pb=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,Db=function(A,F){return F?A==="\0"?"<22>":A.slice(0,-1)+"\\"+A.charCodeAt(A.length-1).toString(16)+" ":"\\"+A},Rb=function(){Y()},Qj=$u(function(A){return A.disabled===!0&&A.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{Si.apply(Wn=Ob.call(ut.childNodes),ut.childNodes),Wn[ut.childNodes.length].nodeType}catch{Si={apply:Wn.length?function(F,W){hr.apply(F,Ob.call(W))}:function(F,W){for(var oe=F.length,V=0;F[oe++]=W[V++];);F.length=oe-1}}}function It(A,F,W,oe){var V,le,ge,Ie,$e,Ge,ze,Je=F&&F.ownerDocument,vt=F?F.nodeType:9;if(W=W||[],typeof A!="string"||!A||vt!==1&&vt!==9&&vt!==11)return W;if(!oe&&(Y(F),F=F||re,ct)){if(vt!==11&&($e=Zj.exec(A)))if(V=$e[1]){if(vt===9)if(ge=F.getElementById(V)){if(ge.id===V)return W.push(ge),W}else return W;else if(Je&&(ge=Je.getElementById(V))&&Zn(F,ge)&&ge.id===V)return W.push(ge),W}else{if($e[2])return Si.apply(W,F.getElementsByTagName(A)),W;if((V=$e[3])&&g.getElementsByClassName&&F.getElementsByClassName)return Si.apply(W,F.getElementsByClassName(V)),W}if(g.qsa&&!Qn[A+" "]&&(!Ue||!Ue.test(A))&&(vt!==1||F.nodeName.toLowerCase()!=="object")){if(ze=A,Je=F,vt===1&&(qj.test(A)||Ib.test(A))){for(Je=ip.test(A)&&sp(F.parentNode)||F,(Je!==F||!g.scope)&&((Ie=F.getAttribute("id"))?Ie=Ie.replace(Pb,Db):F.setAttribute("id",Ie=Lt)),Ge=k(A),le=Ge.length;le--;)Ge[le]=(Ie?"#"+Ie:":scope")+" "+Fu(Ge[le]);ze=Ge.join(",")}try{return Si.apply(W,Je.querySelectorAll(ze)),W}catch{Qn(A,!0)}finally{Ie===Lt&&F.removeAttribute("id")}}}return M(A.replace(Ru,"$1"),F,W,oe)}function Mu(){var A=[];function F(W,oe){return A.push(W+" ")>v.cacheLength&&delete F[A.shift()],F[W+" "]=oe}return F}function Sr(A){return A[Lt]=!0,A}function gr(A){var F=re.createElement("fieldset");try{return!!A(F)}catch{return!1}finally{F.parentNode&&F.parentNode.removeChild(F),F=null}}function op(A,F){for(var W=A.split("|"),oe=W.length;oe--;)v.attrHandle[W[oe]]=F}function Nb(A,F){var W=F&&A,oe=W&&A.nodeType===1&&F.nodeType===1&&A.sourceIndex-F.sourceIndex;if(oe)return oe;if(W){for(;W=W.nextSibling;)if(W===F)return-1}return A?1:-1}function e3(A){return function(F){var W=F.nodeName.toLowerCase();return W==="input"&&F.type===A}}function t3(A){return function(F){var W=F.nodeName.toLowerCase();return(W==="input"||W==="button")&&F.type===A}}function Mb(A){return function(F){return"form"in F?F.parentNode&&F.disabled===!1?"label"in F?"label"in F.parentNode?F.parentNode.disabled===A:F.disabled===A:F.isDisabled===A||F.isDisabled!==!A&&Qj(F)===A:F.disabled===A:"label"in F?F.disabled===A:!1}}function so(A){return Sr(function(F){return F=+F,Sr(function(W,oe){for(var V,le=A([],W.length,F),ge=le.length;ge--;)W[V=le[ge]]&&(W[V]=!(oe[V]=W[V]))})})}function sp(A){return A&&typeof A.getElementsByTagName<"u"&&A}g=It.support={},_=It.isXML=function(A){var F=A&&A.namespaceURI,W=A&&(A.ownerDocument||A).documentElement;return!Yj.test(F||W&&W.nodeName||"HTML")},Y=It.setDocument=function(A){var F,W,oe=A?A.ownerDocument||A:ut;return oe==re||oe.nodeType!==9||!oe.documentElement||(re=oe,We=re.documentElement,ct=!_(re),ut!=re&&(W=re.defaultView)&&W.top!==W&&(W.addEventListener?W.addEventListener("unload",Rb,!1):W.attachEvent&&W.attachEvent("onunload",Rb)),g.scope=gr(function(V){return We.appendChild(V).appendChild(re.createElement("div")),typeof V.querySelectorAll<"u"&&!V.querySelectorAll(":scope fieldset div").length}),g.cssHas=gr(function(){try{return re.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),g.attributes=gr(function(V){return V.className="i",!V.getAttribute("className")}),g.getElementsByTagName=gr(function(V){return V.appendChild(re.createComment("")),!V.getElementsByTagName("*").length}),g.getElementsByClassName=Pa.test(re.getElementsByClassName),g.getById=gr(function(V){return We.appendChild(V).id=Lt,!re.getElementsByName||!re.getElementsByName(Lt).length}),g.getById?(v.filter.ID=function(V){var le=V.replace(oi,si);return function(ge){return ge.getAttribute("id")===le}},v.find.ID=function(V,le){if(typeof le.getElementById<"u"&&ct){var ge=le.getElementById(V);return ge?[ge]:[]}}):(v.filter.ID=function(V){var le=V.replace(oi,si);return function(ge){var Ie=typeof ge.getAttributeNode<"u"&&ge.getAttributeNode("id");return Ie&&Ie.value===le}},v.find.ID=function(V,le){if(typeof le.getElementById<"u"&&ct){var ge,Ie,$e,Ge=le.getElementById(V);if(Ge){if(ge=Ge.getAttributeNode("id"),ge&&ge.value===V)return[Ge];for($e=le.getElementsByName(V),Ie=0;Ge=$e[Ie++];)if(ge=Ge.getAttributeNode("id"),ge&&ge.value===V)return[Ge]}return[]}}),v.find.TAG=g.getElementsByTagName?function(V,le){if(typeof le.getElementsByTagName<"u")return le.getElementsByTagName(V);if(g.qsa)return le.querySelectorAll(V)}:function(V,le){var ge,Ie=[],$e=0,Ge=le.getElementsByTagName(V);if(V==="*"){for(;ge=Ge[$e++];)ge.nodeType===1&&Ie.push(ge);return Ie}return Ge},v.find.CLASS=g.getElementsByClassName&&function(V,le){if(typeof le.getElementsByClassName<"u"&&ct)return le.getElementsByClassName(V)},ln=[],Ue=[],(g.qsa=Pa.test(re.querySelectorAll))&&(gr(function(V){var le;We.appendChild(V).innerHTML="<a id='"+Lt+"'></a><select id='"+Lt+"-\r\\' msallowcapture=''><option selected=''></option></select>",V.querySelectorAll("[msallowcapture^='']").length&&Ue.push("[*^$]="+At+`*(?:''|"")`),V.querySelectorAll("[selected]").length||Ue.push("\\["+At+"*(?:value|"+np+")"),V.querySelectorAll("[id~="+Lt+"-]").length||Ue.push("~="),le=re.createElement("input"),le.setAttribute("name",""),V.appendChild(le),V.querySelectorAll("[name='']").length||Ue.push("\\["+At+"*name"+At+"*="+At+`*(?:''|"")`),V.querySelectorAll(":checked").length||Ue.push(":checked"),V.querySelectorAll("a#"+Lt+"+*").length||Ue.push(".#.+[+~]"),V.querySelectorAll("\\\f"),Ue.push("[\\r\\n\\f]")}),gr(function(V){V.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var le=re.createElement("input");le.setAttribute("type","hidden"),V.appendChild(le).setAttribute("name","D"),V.querySelectorAll("[name=d]").length&&Ue.push("name"+At+"*[*^$|!~]?="),V.querySelectorAll(":enabled").length!==2&&Ue.push(":enabled",":disabled"),We.appendChild(V).disabled=!0,V.querySelectorAll(":disabled").length!==2&&Ue.push(":enabled",":disabled"),V.querySelectorAll("*,:x"),Ue.push(",.*:")})),(g.matchesSelector=Pa.test(en=We.matches||We.webkitMatchesSelector||We.mozMatchesSelector||We.oMatchesSelector||We.msMatchesSelector))&&gr(function(V){g.disconnectedMatch=en.call(V,"*"),en.call(V,"[s!='']:x"),ln.push("!=",rp)}),g.cssHas||Ue.push(":has"),Ue=Ue.length&&new RegExp(Ue.join("|")),ln=ln.length&&new RegExp(ln.join("|")),F=Pa.test(We.compareDocumentPosition),Zn=F||Pa.test(We.contains)?function(V,le){var ge=V.nodeType===9&&V.documentElement||V,Ie=le&&le.parentNode;return V===Ie||!!(Ie&&Ie.nodeType===1&&(ge.contains?ge.contains(Ie):V.compareDocumentPosition&&V.compareDocumentPosition(Ie)&16))}:function(V,le){if(le){for(;le=le.parentNode;)if(le===V)return!0}return!1},no=F?function(V,le){if(V===le)return he=!0,0;var ge=!V.compareDocumentPosition-!le.compareDocumentPosition;return ge||(ge=(V.ownerDocument||V)==(le.ownerDocument||le)?V.compareDocumentPosition(le):1,ge&1||!g.sortDetached&&le.compareDocumentPosition(V)===ge?V==re||V.ownerDocument==ut&&Zn(ut,V)?-1:le==re||le.ownerDocument==ut&&Zn(ut,le)?1:Z?io(Z,V)-io(Z,le):0:ge&4?-1:1)}:function(V,le){if(V===le)return he=!0,0;var ge,Ie=0,$e=V.parentNode,Ge=le.parentNode,ze=[V],Je=[le];if(!$e||!Ge)return V==re?-1:le==re?1:$e?-1:Ge?1:Z?io(Z,V)-io(Z,le):0;if($e===Ge)return Nb(V,le);for(ge=V;ge=ge.parentNode;)ze.unshift(ge);for(ge=le;ge=ge.parentNode;)Je.unshift(ge);for(;ze[Ie]===Je[Ie];)Ie++;return Ie?Nb(ze[Ie],Je[Ie]):ze[Ie]==ut?-1:Je[Ie]==ut?1:0}),re},It.matches=function(A,F){return It(A,null,null,F)},It.matchesSelector=function(A,F){if(Y(A),g.matchesSelector&&ct&&!Qn[F+" "]&&(!ln||!ln.test(F))&&(!Ue||!Ue.test(F)))try{var W=en.call(A,F);if(W||g.disconnectedMatch||A.document&&A.document.nodeType!==11)return W}catch{Qn(F,!0)}return It(F,re,null,[A]).length>0},It.contains=function(A,F){return(A.ownerDocument||A)!=re&&Y(A),Zn(A,F)},It.attr=function(A,F){(A.ownerDocument||A)!=re&&Y(A);var W=v.attrHandle[F.toLowerCase()],oe=W&&ro.call(v.attrHandle,F.toLowerCase())?W(A,F,!ct):void 0;return oe!==void 0?oe:g.attributes||!ct?A.getAttribute(F):(oe=A.getAttributeNode(F))&&oe.specified?oe.value:null},It.escape=function(A){return(A+"").replace(Pb,Db)},It.error=function(A){throw new Error("Syntax error, unrecognized expression: "+A)},It.uniqueSort=function(A){var F,W=[],oe=0,V=0;if(he=!g.detectDuplicates,Z=!g.sortStable&&A.slice(0),A.sort(no),he){for(;F=A[V++];)F===A[V]&&(oe=W.push(V));for(;oe--;)A.splice(W[oe],1)}return Z=null,A},C=It.getText=function(A){var F,W="",oe=0,V=A.nodeType;if(V){if(V===1||V===9||V===11){if(typeof A.textContent=="string")return A.textContent;for(A=A.firstChild;A;A=A.nextSibling)W+=C(A)}else if(V===3||V===4)return A.nodeValue}else for(;F=A[oe++];)W+=C(F);return W},v=It.selectors={cacheLength:50,createPseudo:Sr,match:Nu,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(A){return A[1]=A[1].replace(oi,si),A[3]=(A[3]||A[4]||A[5]||"").replace(oi,si),A[2]==="~="&&(A[3]=" "+A[3]+" "),A.slice(0,4)},CHILD:function(A){return A[1]=A[1].toLowerCase(),A[1].slice(0,3)==="nth"?(A[3]||It.error(A[0]),A[4]=+(A[4]?A[5]+(A[6]||1):2*(A[3]==="even"||A[3]==="odd")),A[5]=+(A[7]+A[8]||A[3]==="odd")):A[3]&&It.error(A[0]),A},PSEUDO:function(A){var F,W=!A[6]&&A[2];return Nu.CHILD.test(A[0])?null:(A[3]?A[2]=A[4]||A[5]||"":W&&zj.test(W)&&(F=k(W,!0))&&(F=W.indexOf(")",W.length-F)-W.length)&&(A[0]=A[0].slice(0,F),A[2]=W.slice(0,F)),A.slice(0,3))}},filter:{TAG:function(A){var F=A.replace(oi,si).toLowerCase();return A==="*"?function(){return!0}:function(W){return W.nodeName&&W.nodeName.toLowerCase()===F}},CLASS:function(A){var F=Wt[A+" "];return F||(F=new RegExp("(^|"+At+")"+A+"("+At+"|$)"))&&Wt(A,function(W){return F.test(typeof W.className=="string"&&W.className||typeof W.getAttribute<"u"&&W.getAttribute("class")||"")})},ATTR:function(A,F,W){return function(oe){var V=It.attr(oe,A);return V==null?F==="!=":F?(V+="",F==="="?V===W:F==="!="?V!==W:F==="^="?W&&V.indexOf(W)===0:F==="*="?W&&V.indexOf(W)>-1:F==="$="?W&&V.slice(-W.length)===W:F==="~="?(" "+V.replace(Kj," ")+" ").indexOf(W)>-1:F==="|="?V===W||V.slice(0,W.length+1)===W+"-":!1):!0}},CHILD:function(A,F,W,oe,V){var le=A.slice(0,3)!=="nth",ge=A.slice(-4)!=="last",Ie=F==="of-type";return oe===1&&V===0?function($e){return!!$e.parentNode}:function($e,Ge,ze){var Je,vt,Pt,Ye,un,xn,er=le!==ge?"nextSibling":"previousSibling",jt=$e.parentNode,Da=Ie&&$e.nodeName.toLowerCase(),Ra=!ze&&!Ie,tr=!1;if(jt){if(le){for(;er;){for(Ye=$e;Ye=Ye[er];)if(Ie?Ye.nodeName.toLowerCase()===Da:Ye.nodeType===1)return!1;xn=er=A==="only"&&!xn&&"nextSibling"}return!0}if(xn=[ge?jt.firstChild:jt.lastChild],ge&&Ra){for(Ye=jt,Pt=Ye[Lt]||(Ye[Lt]={}),vt=Pt[Ye.uniqueID]||(Pt[Ye.uniqueID]={}),Je=vt[A]||[],un=Je[0]===Un&&Je[1],tr=un&&Je[2],Ye=un&&jt.childNodes[un];Ye=++un&&Ye&&Ye[er]||(tr=un=0)||xn.pop();)if(Ye.nodeType===1&&++tr&&Ye===$e){vt[A]=[Un,un,tr];break}}else if(Ra&&(Ye=$e,Pt=Ye[Lt]||(Ye[Lt]={}),vt=Pt[Ye.uniqueID]||(Pt[Ye.uniqueID]={}),Je=vt[A]||[],un=Je[0]===Un&&Je[1],tr=un),tr===!1)for(;(Ye=++un&&Ye&&Ye[er]||(tr=un=0)||xn.pop())&&!((Ie?Ye.nodeName.toLowerCase()===Da:Ye.nodeType===1)&&++tr&&(Ra&&(Pt=Ye[Lt]||(Ye[Lt]={}),vt=Pt[Ye.uniqueID]||(Pt[Ye.uniqueID]={}),vt[A]=[Un,tr]),Ye===$e)););return tr-=V,tr===oe||tr%oe===0&&tr/oe>=0}}},PSEUDO:function(A,F){var W,oe=v.pseudos[A]||v.setFilters[A.toLowerCase()]||It.error("unsupported pseudo: "+A);return oe[Lt]?oe(F):oe.length>1?(W=[A,A,"",F],v.setFilters.hasOwnProperty(A.toLowerCase())?Sr(function(V,le){for(var ge,Ie=oe(V,F),$e=Ie.length;$e--;)ge=io(V,Ie[$e]),V[ge]=!(le[ge]=Ie[$e])}):function(V){return oe(V,0,W)}):oe}},pseudos:{not:Sr(function(A){var F=[],W=[],oe=H(A.replace(Ru,"$1"));return oe[Lt]?Sr(function(V,le,ge,Ie){for(var $e,Ge=oe(V,null,Ie,[]),ze=V.length;ze--;)($e=Ge[ze])&&(V[ze]=!(le[ze]=$e))}):function(V,le,ge){return F[0]=V,oe(F,null,ge,W),F[0]=null,!W.pop()}}),has:Sr(function(A){return function(F){return It(A,F).length>0}}),contains:Sr(function(A){return A=A.replace(oi,si),function(F){return(F.textContent||C(F)).indexOf(A)>-1}}),lang:Sr(function(A){return Gj.test(A||"")||It.error("unsupported lang: "+A),A=A.replace(oi,si).toLowerCase(),function(F){var W;do if(W=ct?F.lang:F.getAttribute("xml:lang")||F.getAttribute("lang"))return W=W.toLowerCase(),W===A||W.indexOf(A+"-")===0;while((F=F.parentNode)&&F.nodeType===1);return!1}}),target:function(A){var F=u.location&&u.location.hash;return F&&F.slice(1)===A.id},root:function(A){return A===We},focus:function(A){return A===re.activeElement&&(!re.hasFocus||re.hasFocus())&&!!(A.type||A.href||~A.tabIndex)},enabled:Mb(!1),disabled:Mb(!0),checked:function(A){var F=A.nodeName.toLowerCase();return F==="input"&&!!A.checked||F==="option"&&!!A.selected},selected:function(A){return A.parentNode&&A.parentNode.selectedIndex,A.selected===!0},empty:function(A){for(A=A.firstChild;A;A=A.nextSibling)if(A.nodeType<6)return!1;return!0},parent:function(A){return!v.pseudos.empty(A)},header:function(A){return Jj.test(A.nodeName)},input:function(A){return Xj.test(A.nodeName)},button:function(A){var F=A.nodeName.toLowerCase();return F==="input"&&A.type==="button"||F==="button"},text:function(A){var F;return A.nodeName.toLowerCase()==="input"&&A.type==="text"&&((F=A.getAttribute("type"))==null||F.toLowerCase()==="text")},first:so(function(){return[0]}),last:so(function(A,F){return[F-1]}),eq:so(function(A,F,W){return[W<0?W+F:W]}),even:so(function(A,F){for(var W=0;W<F;W+=2)A.push(W);return A}),odd:so(function(A,F){for(var W=1;W<F;W+=2)A.push(W);return A}),lt:so(function(A,F,W){for(var oe=W<0?W+F:W>F?F:W;--oe>=0;)A.push(oe);return A}),gt:so(function(A,F,W){for(var oe=W<0?W+F:W;++oe<F;)A.push(oe);return A})}},v.pseudos.nth=v.pseudos.eq;for(f in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})v.pseudos[f]=e3(f);for(f in{submit:!0,reset:!0})v.pseudos[f]=t3(f);function Fb(){}Fb.prototype=v.filters=v.pseudos,v.setFilters=new Fb,k=It.tokenize=function(A,F){var W,oe,V,le,ge,Ie,$e,Ge=Ia[A+" "];if(Ge)return F?0:Ge.slice(0);for(ge=A,Ie=[],$e=v.preFilter;ge;){(!W||(oe=Vj.exec(ge)))&&(oe&&(ge=ge.slice(oe[0].length)||ge),Ie.push(V=[])),W=!1,(oe=Ib.exec(ge))&&(W=oe.shift(),V.push({value:W,type:oe[0].replace(Ru," ")}),ge=ge.slice(W.length));for(le in v.filter)(oe=Nu[le].exec(ge))&&(!$e[le]||(oe=$e[le](oe)))&&(W=oe.shift(),V.push({value:W,type:le,matches:oe}),ge=ge.slice(W.length));if(!W)break}return F?ge.length:ge?It.error(A):Ia(A,Ie).slice(0)};function Fu(A){for(var F=0,W=A.length,oe="";F<W;F++)oe+=A[F].value;return oe}function $u(A,F,W){var oe=F.dir,V=F.next,le=V||oe,ge=W&&le==="parentNode",Ie=xt++;return F.first?function($e,Ge,ze){for(;$e=$e[oe];)if($e.nodeType===1||ge)return A($e,Ge,ze);return!1}:function($e,Ge,ze){var Je,vt,Pt,Ye=[Un,Ie];if(ze){for(;$e=$e[oe];)if(($e.nodeType===1||ge)&&A($e,Ge,ze))return!0}else for(;$e=$e[oe];)if($e.nodeType===1||ge)if(Pt=$e[Lt]||($e[Lt]={}),vt=Pt[$e.uniqueID]||(Pt[$e.uniqueID]={}),V&&V===$e.nodeName.toLowerCase())$e=$e[oe]||$e;else{if((Je=vt[le])&&Je[0]===Un&&Je[1]===Ie)return Ye[2]=Je[2];if(vt[le]=Ye,Ye[2]=A($e,Ge,ze))return!0}return!1}}function ap(A){return A.length>1?function(F,W,oe){for(var V=A.length;V--;)if(!A[V](F,W,oe))return!1;return!0}:A[0]}function n3(A,F,W){for(var oe=0,V=F.length;oe<V;oe++)It(A,F[oe],W);return W}function Bu(A,F,W,oe,V){for(var le,ge=[],Ie=0,$e=A.length,Ge=F!=null;Ie<$e;Ie++)(le=A[Ie])&&(!W||W(le,oe,V))&&(ge.push(le),Ge&&F.push(Ie));return ge}function lp(A,F,W,oe,V,le){return oe&&!oe[Lt]&&(oe=lp(oe)),V&&!V[Lt]&&(V=lp(V,le)),Sr(function(ge,Ie,$e,Ge){var ze,Je,vt,Pt=[],Ye=[],un=Ie.length,xn=ge||n3(F||"*",$e.nodeType?[$e]:$e,[]),er=A&&(ge||!F)?Bu(xn,Pt,A,$e,Ge):xn,jt=W?V||(ge?A:un||oe)?[]:Ie:er;if(W&&W(er,jt,$e,Ge),oe)for(ze=Bu(jt,Ye),oe(ze,[],$e,Ge),Je=ze.length;Je--;)(vt=ze[Je])&&(jt[Ye[Je]]=!(er[Ye[Je]]=vt));if(ge){if(V||A){if(V){for(ze=[],Je=jt.length;Je--;)(vt=jt[Je])&&ze.push(er[Je]=vt);V(null,jt=[],ze,Ge)}for(Je=jt.length;Je--;)(vt=jt[Je])&&(ze=V?io(ge,vt):Pt[Je])>-1&&(ge[ze]=!(Ie[ze]=vt))}}else jt=Bu(jt===Ie?jt.splice(un,jt.length):jt),V?V(null,Ie,jt,Ge):Si.apply(Ie,jt)})}function up(A){for(var F,W,oe,V=A.length,le=v.relative[A[0].type],ge=le||v.relative[" "],Ie=le?1:0,$e=$u(function(Je){return Je===F},ge,!0),Ge=$u(function(Je){return io(F,Je)>-1},ge,!0),ze=[function(Je,vt,Pt){var Ye=!le&&(Pt||vt!==q)||((F=vt).nodeType?$e(Je,vt,Pt):Ge(Je,vt,Pt));return F=null,Ye}];Ie<V;Ie++)if(W=v.relative[A[Ie].type])ze=[$u(ap(ze),W)];else{if(W=v.filter[A[Ie].type].apply(null,A[Ie].matches),W[Lt]){for(oe=++Ie;oe<V&&!v.relative[A[oe].type];oe++);return lp(Ie>1&&ap(ze),Ie>1&&Fu(A.slice(0,Ie-1).concat({value:A[Ie-2].type===" "?"*":""})).replace(Ru,"$1"),W,Ie<oe&&up(A.slice(Ie,oe)),oe<V&&up(A=A.slice(oe)),oe<V&&Fu(A))}ze.push(W)}return ap(ze)}function r3(A,F){var W=F.length>0,oe=A.length>0,V=function(le,ge,Ie,$e,Ge){var ze,Je,vt,Pt=0,Ye="0",un=le&&[],xn=[],er=q,jt=le||oe&&v.find.TAG("*",Ge),Da=Un+=er==null?1:Math.random()||.1,Ra=jt.length;for(Ge&&(q=ge==re||ge||Ge);Ye!==Ra&&(ze=jt[Ye])!=null;Ye++){if(oe&&ze){for(Je=0,!ge&&ze.ownerDocument!=re&&(Y(ze),Ie=!ct);vt=A[Je++];)if(vt(ze,ge||re,Ie)){$e.push(ze);break}Ge&&(Un=Da)}W&&((ze=!vt&&ze)&&Pt--,le&&un.push(ze))}if(Pt+=Ye,W&&Ye!==Pt){for(Je=0;vt=F[Je++];)vt(un,xn,ge,Ie);if(le){if(Pt>0)for(;Ye--;)un[Ye]||xn[Ye]||(xn[Ye]=ki.call($e));xn=Bu(xn)}Si.apply($e,xn),Ge&&!le&&xn.length>0&&Pt+F.length>1&&It.uniqueSort($e)}return Ge&&(Un=Da,q=er),un};return W?Sr(V):V}return H=It.compile=function(A,F){var W,oe=[],V=[],le=Du[A+" "];if(!le){for(F||(F=k(A)),W=F.length;W--;)le=up(F[W]),le[Lt]?oe.push(le):V.push(le);le=Du(A,r3(V,oe)),le.selector=A}return le},M=It.select=function(A,F,W,oe){var V,le,ge,Ie,$e,Ge=typeof A=="function"&&A,ze=!oe&&k(A=Ge.selector||A);if(W=W||[],ze.length===1){if(le=ze[0]=ze[0].slice(0),le.length>2&&(ge=le[0]).type==="ID"&&F.nodeType===9&&ct&&v.relative[le[1].type]){if(F=(v.find.ID(ge.matches[0].replace(oi,si),F)||[])[0],F)Ge&&(F=F.parentNode);else return W;A=A.slice(le.shift().value.length)}for(V=Nu.needsContext.test(A)?0:le.length;V--&&(ge=le[V],!v.relative[Ie=ge.type]);)if(($e=v.find[Ie])&&(oe=$e(ge.matches[0].replace(oi,si),ip.test(le[0].type)&&sp(F.parentNode)||F))){if(le.splice(V,1),A=oe.length&&Fu(le),!A)return Si.apply(W,oe),W;break}}return(Ge||H(A,ze))(oe,F,!ct,W,!F||ip.test(A)&&sp(F.parentNode)||F),W},g.sortStable=Lt.split("").sort(no).join("")===Lt,g.detectDuplicates=!!he,Y(),g.sortDetached=gr(function(A){return A.compareDocumentPosition(re.createElement("fieldset"))&1}),gr(function(A){return A.innerHTML="<a href='#'></a>",A.firstChild.getAttribute("href")==="#"})||op("type|href|height|width",function(A,F,W){if(!W)return A.getAttribute(F,F.toLowerCase()==="type"?1:2)}),(!g.attributes||!gr(function(A){return A.innerHTML="<input/>",A.firstChild.setAttribute("value",""),A.firstChild.getAttribute("value")===""}))&&op("value",function(A,F,W){if(!W&&A.nodeName.toLowerCase()==="input")return A.defaultValue}),gr(function(A){return A.getAttribute("disabled")==null})||op(np,function(A,F,W){var oe;if(!W)return A[F]===!0?F.toLowerCase():(oe=A.getAttributeNode(F))&&oe.specified?oe.value:null}),It}(t);m.find=D,m.expr=D.selectors,m.expr[":"]=m.expr.pseudos,m.uniqueSort=m.unique=D.uniqueSort,m.text=D.getText,m.isXMLDoc=D.isXML,m.contains=D.contains,m.escapeSelector=D.escape;var S=function(u,f,g){for(var v=[],C=g!==void 0;(u=u[f])&&u.nodeType!==9;)if(u.nodeType===1){if(C&&m(u).is(g))break;v.push(u)}return v},R=function(u,f){for(var g=[];u;u=u.nextSibling)u.nodeType===1&&u!==f&&g.push(u);return g},U=m.expr.match.needsContext;function ee(u,f){return u.nodeName&&u.nodeName.toLowerCase()===f.toLowerCase()}var J=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function be(u,f,g){return T(f)?m.grep(u,function(v,C){return!!f.call(v,C,v)!==g}):f.nodeType?m.grep(u,function(v){return v===f!==g}):typeof f!="string"?m.grep(u,function(v){return c.call(f,v)>-1!==g}):m.filter(f,u,g)}m.filter=function(u,f,g){var v=f[0];return g&&(u=":not("+u+")"),f.length===1&&v.nodeType===1?m.find.matchesSelector(v,u)?[v]:[]:m.find.matches(u,m.grep(f,function(C){return C.nodeType===1}))},m.fn.extend({find:function(u){var f,g,v=this.length,C=this;if(typeof u!="string")return this.pushStack(m(u).filter(function(){for(f=0;f<v;f++)if(m.contains(C[f],this))return!0}));for(g=this.pushStack([]),f=0;f<v;f++)m.find(u,C[f],g);return v>1?m.uniqueSort(g):g},filter:function(u){return this.pushStack(be(this,u||[],!1))},not:function(u){return this.pushStack(be(this,u||[],!0))},is:function(u){return!!be(this,typeof u=="string"&&U.test(u)?m(u):u||[],!1).length}});var je,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,z=m.fn.init=function(u,f,g){var v,C;if(!u)return this;if(g=g||je,typeof u=="string")if(u[0]==="<"&&u[u.length-1]===">"&&u.length>=3?v=[null,u,null]:v=Ne.exec(u),v&&(v[1]||!f))if(v[1]){if(f=f instanceof m?f[0]:f,m.merge(this,m.parseHTML(v[1],f&&f.nodeType?f.ownerDocument||f:I,!0)),J.test(v[1])&&m.isPlainObject(f))for(v in f)T(this[v])?this[v](f[v]):this.attr(v,f[v]);return this}else return C=I.getElementById(v[2]),C&&(this[0]=C,this.length=1),this;else return!f||f.jquery?(f||g).find(u):this.constructor(f).find(u);else{if(u.nodeType)return this[0]=u,this.length=1,this;if(T(u))return g.ready!==void 0?g.ready(u):u(m)}return m.makeArray(u,this)};z.prototype=m.fn,je=m(I);var ie=/^(?:parents|prev(?:Until|All))/,fe={children:!0,contents:!0,next:!0,prev:!0};m.fn.extend({has:function(u){var f=m(u,this),g=f.length;return this.filter(function(){for(var v=0;v<g;v++)if(m.contains(this,f[v]))return!0})},closest:function(u,f){var g,v=0,C=this.length,_=[],k=typeof u!="string"&&m(u);if(!U.test(u)){for(;v<C;v++)for(g=this[v];g&&g!==f;g=g.parentNode)if(g.nodeType<11&&(k?k.index(g)>-1:g.nodeType===1&&m.find.matchesSelector(g,u))){_.push(g);break}}return this.pushStack(_.length>1?m.uniqueSort(_):_)},index:function(u){return u?typeof u=="string"?c.call(m(u),this[0]):c.call(this,u.jquery?u[0]:u):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(u,f){return this.pushStack(m.uniqueSort(m.merge(this.get(),m(u,f))))},addBack:function(u){return this.add(u==null?this.prevObject:this.prevObject.filter(u))}});function rt(u,f){for(;(u=u[f])&&u.nodeType!==1;);return u}m.each({parent:function(u){var f=u.parentNode;return f&&f.nodeType!==11?f:null},parents:function(u){return S(u,"parentNode")},parentsUntil:function(u,f,g){return S(u,"parentNode",g)},next:function(u){return rt(u,"nextSibling")},prev:function(u){return rt(u,"previousSibling")},nextAll:function(u){return S(u,"nextSibling")},prevAll:function(u){return S(u,"previousSibling")},nextUntil:function(u,f,g){return S(u,"nextSibling",g)},prevUntil:function(u,f,g){return S(u,"previousSibling",g)},siblings:function(u){return R((u.parentNode||{}).firstChild,u)},children:function(u){return R(u.firstChild)},contents:function(u){return u.contentDocument!=null&&i(u.contentDocument)?u.contentDocument:(ee(u,"template")&&(u=u.content||u),m.merge([],u.childNodes))}},function(u,f){m.fn[u]=function(g,v){var C=m.map(this,f,g);return u.slice(-5)!=="Until"&&(v=g),v&&typeof v=="string"&&(C=m.filter(v,C)),this.length>1&&(fe[u]||m.uniqueSort(C),ie.test(u)&&C.reverse()),this.pushStack(C)}});var Ve=/[^\x20\t\r\n\f]+/g;function ne(u){var f={};return m.each(u.match(Ve)||[],function(g,v){f[v]=!0}),f}m.Callbacks=function(u){u=typeof u=="string"?ne(u):m.extend({},u);var f,g,v,C,_=[],k=[],H=-1,M=function(){for(C=C||u.once,v=f=!0;k.length;H=-1)for(g=k.shift();++H<_.length;)_[H].apply(g[0],g[1])===!1&&u.stopOnFalse&&(H=_.length,g=!1);u.memory||(g=!1),f=!1,C&&(g?_=[]:_="")},q={add:function(){return _&&(g&&!f&&(H=_.length-1,k.push(g)),function Z(he){m.each(he,function(Y,re){T(re)?(!u.unique||!q.has(re))&&_.push(re):re&&re.length&&L(re)!=="string"&&Z(re)})}(arguments),g&&!f&&M()),this},remove:function(){return m.each(arguments,function(Z,he){for(var Y;(Y=m.inArray(he,_,Y))>-1;)_.splice(Y,1),Y<=H&&H--}),this},has:function(Z){return Z?m.inArray(Z,_)>-1:_.length>0},empty:function(){return _&&(_=[]),this},disable:function(){return C=k=[],_=g="",this},disabled:function(){return!_},lock:function(){return C=k=[],!g&&!f&&(_=g=""),this},locked:function(){return!!C},fireWith:function(Z,he){return C||(he=he||[],he=[Z,he.slice?he.slice():he],k.push(he),f||M()),this},fire:function(){return q.fireWith(this,arguments),this},fired:function(){return!!v}};return q};function me(u){return u}function Te(u){throw u}function Ae(u,f,g,v){var C;try{u&&T(C=u.promise)?C.call(u).done(f).fail(g):u&&T(C=u.then)?C.call(u,f,g):f.apply(void 0,[u].slice(v))}catch(_){g.apply(void 0,[_])}}m.extend({Deferred:function(u){var f=[["notify","progress",m.Callbacks("memory"),m.Callbacks("memory"),2],["resolve","done",m.Callbacks("once memory"),m.Callbacks("once memory"),0,"resolved"],["reject","fail",m.Callbacks("once memory"),m.Callbacks("once memory"),1,"rejected"]],g="pending",v={state:function(){return g},always:function(){return C.done(arguments).fail(arguments),this},catch:function(_){return v.then(null,_)},pipe:function(){var _=arguments;return m.Deferred(function(k){m.each(f,function(H,M){var q=T(_[M[4]])&&_[M[4]];C[M[1]](function(){var Z=q&&q.apply(this,arguments);Z&&T(Z.promise)?Z.promise().progress(k.notify).done(k.resolve).fail(k.reject):k[M[0]+"With"](this,q?[Z]:arguments)})}),_=null}).promise()},then:function(_,k,H){var M=0;function q(Z,he,Y,re){return function(){var We=this,ct=arguments,Ue=function(){var en,Zn;if(!(Z<M)){if(en=Y.apply(We,ct),en===he.promise())throw new TypeError("Thenable self-resolution");Zn=en&&(typeof en=="object"||typeof en=="function")&&en.then,T(Zn)?re?Zn.call(en,q(M,he,me,re),q(M,he,Te,re)):(M++,Zn.call(en,q(M,he,me,re),q(M,he,Te,re),q(M,he,me,he.notifyWith))):(Y!==me&&(We=void 0,ct=[en]),(re||he.resolveWith)(We,ct))}},ln=re?Ue:function(){try{Ue()}catch(en){m.Deferred.exceptionHook&&m.Deferred.exceptionHook(en,ln.stackTrace),Z+1>=M&&(Y!==Te&&(We=void 0,ct=[en]),he.rejectWith(We,ct))}};Z?ln():(m.Deferred.getStackHook&&(ln.stackTrace=m.Deferred.getStackHook()),t.setTimeout(ln))}}return m.Deferred(function(Z){f[0][3].add(q(0,Z,T(H)?H:me,Z.notifyWith)),f[1][3].add(q(0,Z,T(_)?_:me)),f[2][3].add(q(0,Z,T(k)?k:Te))}).promise()},promise:function(_){return _!=null?m.extend(_,v):v}},C={};return m.each(f,function(_,k){var H=k[2],M=k[5];v[k[1]]=H.add,M&&H.add(function(){g=M},f[3-_][2].disable,f[3-_][3].disable,f[0][2].lock,f[0][3].lock),H.add(k[3].fire),C[k[0]]=function(){return C[k[0]+"With"](this===C?void 0:this,arguments),this},C[k[0]+"With"]=H.fireWith}),v.promise(C),u&&u.call(C,C),C},when:function(u){var f=arguments.length,g=f,v=Array(g),C=o.call(arguments),_=m.Deferred(),k=function(H){return function(M){v[H]=this,C[H]=arguments.length>1?o.call(arguments):M,--f||_.resolveWith(v,C)}};if(f<=1&&(Ae(u,_.done(k(g)).resolve,_.reject,!f),_.state()==="pending"||T(C[g]&&C[g].then)))return _.then();for(;g--;)Ae(C[g],k(g),_.reject);return _.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;m.Deferred.exceptionHook=function(u,f){t.console&&t.console.warn&&u&&Oe.test(u.name)&&t.console.warn("jQuery.Deferred exception: "+u.message,u.stack,f)},m.readyException=function(u){t.setTimeout(function(){throw u})};var He=m.Deferred();m.fn.ready=function(u){return He.then(u).catch(function(f){m.readyException(f)}),this},m.extend({isReady:!1,readyWait:1,ready:function(u){(u===!0?--m.readyWait:m.isReady)||(m.isReady=!0,!(u!==!0&&--m.readyWait>0)&&He.resolveWith(I,[m]))}}),m.ready.then=He.then;function Xe(){I.removeEventListener("DOMContentLoaded",Xe),t.removeEventListener("load",Xe),m.ready()}I.readyState==="complete"||I.readyState!=="loading"&&!I.documentElement.doScroll?t.setTimeout(m.ready):(I.addEventListener("DOMContentLoaded",Xe),t.addEventListener("load",Xe));var Le=function(u,f,g,v,C,_,k){var H=0,M=u.length,q=g==null;if(L(g)==="object"){C=!0;for(H in g)Le(u,f,H,g[H],!0,_,k)}else if(v!==void 0&&(C=!0,T(v)||(k=!0),q&&(k?(f.call(u,v),f=null):(q=f,f=function(Z,he,Y){return q.call(m(Z),Y)})),f))for(;H<M;H++)f(u[H],g,k?v:v.call(u[H],H,f(u[H],g)));return C?u:q?f.call(u):M?f(u[0],g):_},it=/^-ms-/,mt=/-([a-z])/g;function N(u,f){return f.toUpperCase()}function $(u){return u.replace(it,"ms-").replace(mt,N)}var G=function(u){return u.nodeType===1||u.nodeType===9||!+u.nodeType};function te(){this.expando=m.expando+te.uid++}te.uid=1,te.prototype={cache:function(u){var f=u[this.expando];return f||(f={},G(u)&&(u.nodeType?u[this.expando]=f:Object.defineProperty(u,this.expando,{value:f,configurable:!0}))),f},set:function(u,f,g){var v,C=this.cache(u);if(typeof f=="string")C[$(f)]=g;else for(v in f)C[$(v)]=f[v];return C},get:function(u,f){return f===void 0?this.cache(u):u[this.expando]&&u[this.expando][$(f)]},access:function(u,f,g){return f===void 0||f&&typeof f=="string"&&g===void 0?this.get(u,f):(this.set(u,f,g),g!==void 0?g:f)},remove:function(u,f){var g,v=u[this.expando];if(v!==void 0){if(f!==void 0)for(Array.isArray(f)?f=f.map($):(f=$(f),f=f in v?[f]:f.match(Ve)||[]),g=f.length;g--;)delete v[f[g]];(f===void 0||m.isEmptyObject(v))&&(u.nodeType?u[this.expando]=void 0:delete u[this.expando])}},hasData:function(u){var f=u[this.expando];return f!==void 0&&!m.isEmptyObject(f)}};var K=new te,X=new te,Ce=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,de=/[A-Z]/g;function ve(u){return u==="true"?!0:u==="false"?!1:u==="null"?null:u===+u+""?+u:Ce.test(u)?JSON.parse(u):u}function se(u,f,g){var v;if(g===void 0&&u.nodeType===1)if(v="data-"+f.replace(de,"-$&").toLowerCase(),g=u.getAttribute(v),typeof g=="string"){try{g=ve(g)}catch{}X.set(u,f,g)}else g=void 0;return g}m.extend({hasData:function(u){return X.hasData(u)||K.hasData(u)},data:function(u,f,g){return X.access(u,f,g)},removeData:function(u,f){X.remove(u,f)},_data:function(u,f,g){return K.access(u,f,g)},_removeData:function(u,f){K.remove(u,f)}}),m.fn.extend({data:function(u,f){var g,v,C,_=this[0],k=_&&_.attributes;if(u===void 0){if(this.length&&(C=X.get(_),_.nodeType===1&&!K.get(_,"hasDataAttrs"))){for(g=k.length;g--;)k[g]&&(v=k[g].name,v.indexOf("data-")===0&&(v=$(v.slice(5)),se(_,v,C[v])));K.set(_,"hasDataAttrs",!0)}return C}return typeof u=="object"?this.each(function(){X.set(this,u)}):Le(this,function(H){var M;if(_&&H===void 0)return M=X.get(_,u),M!==void 0||(M=se(_,u),M!==void 0)?M:void 0;this.each(function(){X.set(this,u,H)})},null,f,arguments.length>1,null,!0)},removeData:function(u){return this.each(function(){X.remove(this,u)})}}),m.extend({queue:function(u,f,g){var v;if(u)return f=(f||"fx")+"queue",v=K.get(u,f),g&&(!v||Array.isArray(g)?v=K.access(u,f,m.makeArray(g)):v.push(g)),v||[]},dequeue:function(u,f){f=f||"fx";var g=m.queue(u,f),v=g.length,C=g.shift(),_=m._queueHooks(u,f),k=function(){m.dequeue(u,f)};C==="inprogress"&&(C=g.shift(),v--),C&&(f==="fx"&&g.unshift("inprogress"),delete _.stop,C.call(u,k,_)),!v&&_&&_.empty.fire()},_queueHooks:function(u,f){var g=f+"queueHooks";return K.get(u,g)||K.access(u,g,{empty:m.Callbacks("once memory").add(function(){K.remove(u,[f+"queue",g])})})}}),m.fn.extend({queue:function(u,f){var g=2;return typeof u!="string"&&(f=u,u="fx",g--),arguments.length<g?m.queue(this[0],u):f===void 0?this:this.each(function(){var v=m.queue(this,u,f);m._queueHooks(this,u),u==="fx"&&v[0]!=="inprogress"&&m.dequeue(this,u)})},dequeue:function(u){return this.each(function(){m.dequeue(this,u)})},clearQueue:function(u){return this.queue(u||"fx",[])},promise:function(u,f){var g,v=1,C=m.Deferred(),_=this,k=this.length,H=function(){--v||C.resolveWith(_,[_])};for(typeof u!="string"&&(f=u,u=void 0),u=u||"fx";k--;)g=K.get(_[k],u+"queueHooks"),g&&g.empty&&(v++,g.empty.add(H));return H(),C.promise(f)}});var ke=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_e=new RegExp("^(?:([+-])=|)("+ke+")([a-z%]*)$","i"),Me=["Top","Right","Bottom","Left"],Se=I.documentElement,qe=function(u){return m.contains(u.ownerDocument,u)},dt={composed:!0};Se.getRootNode&&(qe=function(u){return m.contains(u.ownerDocument,u)||u.getRootNode(dt)===u.ownerDocument});var lt=function(u,f){return u=f||u,u.style.display==="none"||u.style.display===""&&qe(u)&&m.css(u,"display")==="none"};function Ct(u,f,g,v){var C,_,k=20,H=v?function(){return v.cur()}:function(){return m.css(u,f,"")},M=H(),q=g&&g[3]||(m.cssNumber[f]?"":"px"),Z=u.nodeType&&(m.cssNumber[f]||q!=="px"&&+M)&&_e.exec(m.css(u,f));if(Z&&Z[3]!==q){for(M=M/2,q=q||Z[3],Z=+M||1;k--;)m.style(u,f,Z+q),(1-_)*(1-(_=H()/M||.5))<=0&&(k=0),Z=Z/_;Z=Z*2,m.style(u,f,Z+q),g=g||[]}return g&&(Z=+Z||+M||0,C=g[1]?Z+(g[1]+1)*g[2]:+g[2],v&&(v.unit=q,v.start=Z,v.end=C)),C}var Ft={};function an(u){var f,g=u.ownerDocument,v=u.nodeName,C=Ft[v];return C||(f=g.body.appendChild(g.createElement(v)),C=m.css(f,"display"),f.parentNode.removeChild(f),C==="none"&&(C="block"),Ft[v]=C,C)}function Ht(u,f){for(var g,v,C=[],_=0,k=u.length;_<k;_++)v=u[_],v.style&&(g=v.style.display,f?(g==="none"&&(C[_]=K.get(v,"display")||null,C[_]||(v.style.display="")),v.style.display===""&<(v)&&(C[_]=an(v))):g!=="none"&&(C[_]="none",K.set(v,"display",g)));for(_=0;_<k;_++)C[_]!=null&&(u[_].style.display=C[_]);return u}m.fn.extend({show:function(){return Ht(this,!0)},hide:function(){return Ht(this)},toggle:function(u){return typeof u=="boolean"?u?this.show():this.hide():this.each(function(){lt(this)?m(this).show():m(this).hide()})}});var fn=/^(?:checkbox|radio)$/i,Q=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Re=/^$|^module$|\/(?:java|ecma)script/i;(function(){var u=I.createDocumentFragment(),f=u.appendChild(I.createElement("div")),g=I.createElement("input");g.setAttribute("type","radio"),g.setAttribute("checked","checked"),g.setAttribute("name","t"),f.appendChild(g),w.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,f.innerHTML="<textarea>x</textarea>",w.noCloneChecked=!!f.cloneNode(!0).lastChild.defaultValue,f.innerHTML="<option></option>",w.option=!!f.lastChild})();var Fe={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Fe.tbody=Fe.tfoot=Fe.colgroup=Fe.caption=Fe.thead,Fe.th=Fe.td,w.option||(Fe.optgroup=Fe.option=[1,"<select multiple='multiple'>","</select>"]);function ot(u,f){var g;return typeof u.getElementsByTagName<"u"?g=u.getElementsByTagName(f||"*"):typeof u.querySelectorAll<"u"?g=u.querySelectorAll(f||"*"):g=[],f===void 0||f&&ee(u,f)?m.merge([u],g):g}function yt(u,f){for(var g=0,v=u.length;g<v;g++)K.set(u[g],"globalEval",!f||K.get(f[g],"globalEval"))}var gn=/<|&#?\w+;/;function In(u,f,g,v,C){for(var _,k,H,M,q,Z,he=f.createDocumentFragment(),Y=[],re=0,We=u.length;re<We;re++)if(_=u[re],_||_===0)if(L(_)==="object")m.merge(Y,_.nodeType?[_]:_);else if(!gn.test(_))Y.push(f.createTextNode(_));else{for(k=k||he.appendChild(f.createElement("div")),H=(Q.exec(_)||["",""])[1].toLowerCase(),M=Fe[H]||Fe._default,k.innerHTML=M[1]+m.htmlPrefilter(_)+M[2],Z=M[0];Z--;)k=k.lastChild;m.merge(Y,k.childNodes),k=he.firstChild,k.textContent=""}for(he.textContent="",re=0;_=Y[re++];){if(v&&m.inArray(_,v)>-1){C&&C.push(_);continue}if(q=qe(_),k=ot(he.appendChild(_),"script"),q&&yt(k),g)for(Z=0;_=k[Z++];)Re.test(_.type||"")&&g.push(_)}return he}var ri=/^([^.]*)(?:\.(.+)|)/;function ii(){return!0}function Hn(){return!1}function ka(u,f){return u===ls()==(f==="focus")}function ls(){try{return I.activeElement}catch{}}function jr(u,f,g,v,C,_){var k,H;if(typeof f=="object"){typeof g!="string"&&(v=v||g,g=void 0);for(H in f)jr(u,H,g,v,f[H],_);return u}if(v==null&&C==null?(C=g,v=g=void 0):C==null&&(typeof g=="string"?(C=v,v=void 0):(C=v,v=g,g=void 0)),C===!1)C=Hn;else if(!C)return u;return _===1&&(k=C,C=function(M){return m().off(M),k.apply(this,arguments)},C.guid=k.guid||(k.guid=m.guid++)),u.each(function(){m.event.add(this,f,C,v,g)})}m.event={global:{},add:function(u,f,g,v,C){var _,k,H,M,q,Z,he,Y,re,We,ct,Ue=K.get(u);if(G(u))for(g.handler&&(_=g,g=_.handler,C=_.selector),C&&m.find.matchesSelector(Se,C),g.guid||(g.guid=m.guid++),(M=Ue.events)||(M=Ue.events=Object.create(null)),(k=Ue.handle)||(k=Ue.handle=function(ln){return typeof m<"u"&&m.event.triggered!==ln.type?m.event.dispatch.apply(u,arguments):void 0}),f=(f||"").match(Ve)||[""],q=f.length;q--;)H=ri.exec(f[q])||[],re=ct=H[1],We=(H[2]||"").split(".").sort(),re&&(he=m.event.special[re]||{},re=(C?he.delegateType:he.bindType)||re,he=m.event.special[re]||{},Z=m.extend({type:re,origType:ct,data:v,handler:g,guid:g.guid,selector:C,needsContext:C&&m.expr.match.needsContext.test(C),namespace:We.join(".")},_),(Y=M[re])||(Y=M[re]=[],Y.delegateCount=0,(!he.setup||he.setup.call(u,v,We,k)===!1)&&u.addEventListener&&u.addEventListener(re,k)),he.add&&(he.add.call(u,Z),Z.handler.guid||(Z.handler.guid=g.guid)),C?Y.splice(Y.delegateCount++,0,Z):Y.push(Z),m.event.global[re]=!0)},remove:function(u,f,g,v,C){var _,k,H,M,q,Z,he,Y,re,We,ct,Ue=K.hasData(u)&&K.get(u);if(!(!Ue||!(M=Ue.events))){for(f=(f||"").match(Ve)||[""],q=f.length;q--;){if(H=ri.exec(f[q])||[],re=ct=H[1],We=(H[2]||"").split(".").sort(),!re){for(re in M)m.event.remove(u,re+f[q],g,v,!0);continue}for(he=m.event.special[re]||{},re=(v?he.delegateType:he.bindType)||re,Y=M[re]||[],H=H[2]&&new RegExp("(^|\\.)"+We.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=_=Y.length;_--;)Z=Y[_],(C||ct===Z.origType)&&(!g||g.guid===Z.guid)&&(!H||H.test(Z.namespace))&&(!v||v===Z.selector||v==="**"&&Z.selector)&&(Y.splice(_,1),Z.selector&&Y.delegateCount--,he.remove&&he.remove.call(u,Z));k&&!Y.length&&((!he.teardown||he.teardown.call(u,We,Ue.handle)===!1)&&m.removeEvent(u,re,Ue.handle),delete M[re])}m.isEmptyObject(M)&&K.remove(u,"handle events")}},dispatch:function(u){var f,g,v,C,_,k,H=new Array(arguments.length),M=m.event.fix(u),q=(K.get(this,"events")||Object.create(null))[M.type]||[],Z=m.event.special[M.type]||{};for(H[0]=M,f=1;f<arguments.length;f++)H[f]=arguments[f];if(M.delegateTarget=this,!(Z.preDispatch&&Z.preDispatch.call(this,M)===!1)){for(k=m.event.handlers.call(this,M,q),f=0;(C=k[f++])&&!M.isPropagationStopped();)for(M.currentTarget=C.elem,g=0;(_=C.handlers[g++])&&!M.isImmediatePropagationStopped();)(!M.rnamespace||_.namespace===!1||M.rnamespace.test(_.namespace))&&(M.handleObj=_,M.data=_.data,v=((m.event.special[_.origType]||{}).handle||_.handler).apply(C.elem,H),v!==void 0&&(M.result=v)===!1&&(M.preventDefault(),M.stopPropagation()));return Z.postDispatch&&Z.postDispatch.call(this,M),M.result}},handlers:function(u,f){var g,v,C,_,k,H=[],M=f.delegateCount,q=u.target;if(M&&q.nodeType&&!(u.type==="click"&&u.button>=1)){for(;q!==this;q=q.parentNode||this)if(q.nodeType===1&&!(u.type==="click"&&q.disabled===!0)){for(_=[],k={},g=0;g<M;g++)v=f[g],C=v.selector+" ",k[C]===void 0&&(k[C]=v.needsContext?m(C,this).index(q)>-1:m.find(C,this,null,[q]).length),k[C]&&_.push(v);_.length&&H.push({elem:q,handlers:_})}}return q=this,M<f.length&&H.push({elem:q,handlers:f.slice(M)}),H},addProp:function(u,f){Object.defineProperty(m.Event.prototype,u,{enumerable:!0,configurable:!0,get:T(f)?function(){if(this.originalEvent)return f(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[u]},set:function(g){Object.defineProperty(this,u,{enumerable:!0,configurable:!0,writable:!0,value:g})}})},fix:function(u){return u[m.expando]?u:new m.Event(u)},special:{load:{noBubble:!0},click:{setup:function(u){var f=this||u;return fn.test(f.type)&&f.click&&ee(f,"input")&&us(f,"click",ii),!1},trigger:function(u){var f=this||u;return fn.test(f.type)&&f.click&&ee(f,"input")&&us(f,"click"),!0},_default:function(u){var f=u.target;return fn.test(f.type)&&f.click&&ee(f,"input")&&K.get(f,"click")||ee(f,"a")}},beforeunload:{postDispatch:function(u){u.result!==void 0&&u.originalEvent&&(u.originalEvent.returnValue=u.result)}}}};function us(u,f,g){if(!g){K.get(u,f)===void 0&&m.event.add(u,f,ii);return}K.set(u,f,!1),m.event.add(u,f,{namespace:!1,handler:function(v){var C,_,k=K.get(this,f);if(v.isTrigger&1&&this[f]){if(k.length)(m.event.special[f]||{}).delegateType&&v.stopPropagation();else if(k=o.call(arguments),K.set(this,f,k),C=g(this,f),this[f](),_=K.get(this,f),k!==_||C?K.set(this,f,!1):_={},k!==_)return v.stopImmediatePropagation(),v.preventDefault(),_&&_.value}else k.length&&(K.set(this,f,{value:m.event.trigger(m.extend(k[0],m.Event.prototype),k.slice(1),this)}),v.stopImmediatePropagation())}})}m.removeEvent=function(u,f,g){u.removeEventListener&&u.removeEventListener(f,g)},m.Event=function(u,f){if(!(this instanceof m.Event))return new m.Event(u,f);u&&u.type?(this.originalEvent=u,this.type=u.type,this.isDefaultPrevented=u.defaultPrevented||u.defaultPrevented===void 0&&u.returnValue===!1?ii:Hn,this.target=u.target&&u.target.nodeType===3?u.target.parentNode:u.target,this.currentTarget=u.currentTarget,this.relatedTarget=u.relatedTarget):this.type=u,f&&m.extend(this,f),this.timeStamp=u&&u.timeStamp||Date.now(),this[m.expando]=!0},m.Event.prototype={constructor:m.Event,isDefaultPrevented:Hn,isPropagationStopped:Hn,isImmediatePropagationStopped:Hn,isSimulated:!1,preventDefault:function(){var u=this.originalEvent;this.isDefaultPrevented=ii,u&&!this.isSimulated&&u.preventDefault()},stopPropagation:function(){var u=this.originalEvent;this.isPropagationStopped=ii,u&&!this.isSimulated&&u.stopPropagation()},stopImmediatePropagation:function(){var u=this.originalEvent;this.isImmediatePropagationStopped=ii,u&&!this.isSimulated&&u.stopImmediatePropagation(),this.stopPropagation()}},m.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},m.event.addProp),m.each({focus:"focusin",blur:"focusout"},function(u,f){m.event.special[u]={setup:function(){return us(this,u,ka),!1},trigger:function(){return us(this,u),!0},_default:function(g){return K.get(g.target,u)},delegateType:f}}),m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(u,f){m.event.special[u]={delegateType:f,bindType:f,handle:function(g){var v,C=this,_=g.relatedTarget,k=g.handleObj;return(!_||_!==C&&!m.contains(C,_))&&(g.type=k.origType,v=k.handler.apply(this,arguments),g.type=f),v}}}),m.fn.extend({on:function(u,f,g,v){return jr(this,u,f,g,v)},one:function(u,f,g,v){return jr(this,u,f,g,v,1)},off:function(u,f,g){var v,C;if(u&&u.preventDefault&&u.handleObj)return v=u.handleObj,m(u.delegateTarget).off(v.namespace?v.origType+"."+v.namespace:v.origType,v.selector,v.handler),this;if(typeof u=="object"){for(C in u)this.off(C,f,u[C]);return this}return(f===!1||typeof f=="function")&&(g=f,f=void 0),g===!1&&(g=Hn),this.each(function(){m.event.remove(this,u,g,f)})}});var Sa=/<script|<style|<link/i,cs=/checked\s*(?:[^=]|=\s*.checked.)/i,dj=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function ob(u,f){return ee(u,"table")&&ee(f.nodeType!==11?f:f.firstChild,"tr")&&m(u).children("tbody")[0]||u}function pj(u){return u.type=(u.getAttribute("type")!==null)+"/"+u.type,u}function hj(u){return(u.type||"").slice(0,5)==="true/"?u.type=u.type.slice(5):u.removeAttribute("type"),u}function sb(u,f){var g,v,C,_,k,H,M;if(f.nodeType===1){if(K.hasData(u)&&(_=K.get(u),M=_.events,M)){K.remove(f,"handle events");for(C in M)for(g=0,v=M[C].length;g<v;g++)m.event.add(f,C,M[C][g])}X.hasData(u)&&(k=X.access(u),H=m.extend({},k),X.set(f,H))}}function gj(u,f){var g=f.nodeName.toLowerCase();g==="input"&&fn.test(u.type)?f.checked=u.checked:(g==="input"||g==="textarea")&&(f.defaultValue=u.defaultValue)}function fs(u,f,g,v){f=s(f);var C,_,k,H,M,q,Z=0,he=u.length,Y=he-1,re=f[0],We=T(re);if(We||he>1&&typeof re=="string"&&!w.checkClone&&cs.test(re))return u.each(function(ct){var Ue=u.eq(ct);We&&(f[0]=re.call(this,ct,Ue.html())),fs(Ue,f,g,v)});if(he&&(C=In(f,u[0].ownerDocument,!1,u,v),_=C.firstChild,C.childNodes.length===1&&(C=_),_||v)){for(k=m.map(ot(C,"script"),pj),H=k.length;Z<he;Z++)M=C,Z!==Y&&(M=m.clone(M,!0,!0),H&&m.merge(k,ot(M,"script"))),g.call(u[Z],M,Z);if(H)for(q=k[k.length-1].ownerDocument,m.map(k,hj),Z=0;Z<H;Z++)M=k[Z],Re.test(M.type||"")&&!K.access(M,"globalEval")&&m.contains(q,M)&&(M.src&&(M.type||"").toLowerCase()!=="module"?m._evalUrl&&!M.noModule&&m._evalUrl(M.src,{nonce:M.nonce||M.getAttribute("nonce")},q):j(M.textContent.replace(dj,""),M,q))}return u}function ab(u,f,g){for(var v,C=f?m.filter(f,u):u,_=0;(v=C[_])!=null;_++)!g&&v.nodeType===1&&m.cleanData(ot(v)),v.parentNode&&(g&&qe(v)&&yt(ot(v,"script")),v.parentNode.removeChild(v));return u}m.extend({htmlPrefilter:function(u){return u},clone:function(u,f,g){var v,C,_,k,H=u.cloneNode(!0),M=qe(u);if(!w.noCloneChecked&&(u.nodeType===1||u.nodeType===11)&&!m.isXMLDoc(u))for(k=ot(H),_=ot(u),v=0,C=_.length;v<C;v++)gj(_[v],k[v]);if(f)if(g)for(_=_||ot(u),k=k||ot(H),v=0,C=_.length;v<C;v++)sb(_[v],k[v]);else sb(u,H);return k=ot(H,"script"),k.length>0&&yt(k,!M&&ot(u,"script")),H},cleanData:function(u){for(var f,g,v,C=m.event.special,_=0;(g=u[_])!==void 0;_++)if(G(g)){if(f=g[K.expando]){if(f.events)for(v in f.events)C[v]?m.event.remove(g,v):m.removeEvent(g,v,f.handle);g[K.expando]=void 0}g[X.expando]&&(g[X.expando]=void 0)}}}),m.fn.extend({detach:function(u){return ab(this,u,!0)},remove:function(u){return ab(this,u)},text:function(u){return Le(this,function(f){return f===void 0?m.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=f)})},null,u,arguments.length)},append:function(){return fs(this,arguments,function(u){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=ob(this,u);f.appendChild(u)}})},prepend:function(){return fs(this,arguments,function(u){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=ob(this,u);f.insertBefore(u,f.firstChild)}})},before:function(){return fs(this,arguments,function(u){this.parentNode&&this.parentNode.insertBefore(u,this)})},after:function(){return fs(this,arguments,function(u){this.parentNode&&this.parentNode.insertBefore(u,this.nextSibling)})},empty:function(){for(var u,f=0;(u=this[f])!=null;f++)u.nodeType===1&&(m.cleanData(ot(u,!1)),u.textContent="");return this},clone:function(u,f){return u=u??!1,f=f??u,this.map(function(){return m.clone(this,u,f)})},html:function(u){return Le(this,function(f){var g=this[0]||{},v=0,C=this.length;if(f===void 0&&g.nodeType===1)return g.innerHTML;if(typeof f=="string"&&!Sa.test(f)&&!Fe[(Q.exec(f)||["",""])[1].toLowerCase()]){f=m.htmlPrefilter(f);try{for(;v<C;v++)g=this[v]||{},g.nodeType===1&&(m.cleanData(ot(g,!1)),g.innerHTML=f);g=0}catch{}}g&&this.empty().append(f)},null,u,arguments.length)},replaceWith:function(){var u=[];return fs(this,arguments,function(f){var g=this.parentNode;m.inArray(this,u)<0&&(m.cleanData(ot(this)),g&&g.replaceChild(f,this))},u)}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(u,f){m.fn[u]=function(g){for(var v,C=[],_=m(g),k=_.length-1,H=0;H<=k;H++)v=H===k?this:this.clone(!0),m(_[H])[f](v),l.apply(C,v.get());return this.pushStack(C)}});var Kd=new RegExp("^("+ke+")(?!px)[a-z%]+$","i"),Vd=/^--/,Lu=function(u){var f=u.ownerDocument.defaultView;return(!f||!f.opener)&&(f=t),f.getComputedStyle(u)},lb=function(u,f,g){var v,C,_={};for(C in f)_[C]=u.style[C],u.style[C]=f[C];v=g.call(u);for(C in f)u.style[C]=_[C];return v},mj=new RegExp(Me.join("|"),"i"),ub="[\\x20\\t\\r\\n\\f]",vj=new RegExp("^"+ub+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ub+"+$","g");(function(){function u(){if(q){M.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",q.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",Se.appendChild(M).appendChild(q);var Z=t.getComputedStyle(q);g=Z.top!=="1%",H=f(Z.marginLeft)===12,q.style.right="60%",_=f(Z.right)===36,v=f(Z.width)===36,q.style.position="absolute",C=f(q.offsetWidth/3)===12,Se.removeChild(M),q=null}}function f(Z){return Math.round(parseFloat(Z))}var g,v,C,_,k,H,M=I.createElement("div"),q=I.createElement("div");q.style&&(q.style.backgroundClip="content-box",q.cloneNode(!0).style.backgroundClip="",w.clearCloneStyle=q.style.backgroundClip==="content-box",m.extend(w,{boxSizingReliable:function(){return u(),v},pixelBoxStyles:function(){return u(),_},pixelPosition:function(){return u(),g},reliableMarginLeft:function(){return u(),H},scrollboxSize:function(){return u(),C},reliableTrDimensions:function(){var Z,he,Y,re;return k==null&&(Z=I.createElement("table"),he=I.createElement("tr"),Y=I.createElement("div"),Z.style.cssText="position:absolute;left:-11111px;border-collapse:separate",he.style.cssText="border:1px solid",he.style.height="1px",Y.style.height="9px",Y.style.display="block",Se.appendChild(Z).appendChild(he).appendChild(Y),re=t.getComputedStyle(he),k=parseInt(re.height,10)+parseInt(re.borderTopWidth,10)+parseInt(re.borderBottomWidth,10)===he.offsetHeight,Se.removeChild(Z)),k}}))})();function Aa(u,f,g){var v,C,_,k,H=Vd.test(f),M=u.style;return g=g||Lu(u),g&&(k=g.getPropertyValue(f)||g[f],H&&k&&(k=k.replace(vj,"$1")||void 0),k===""&&!qe(u)&&(k=m.style(u,f)),!w.pixelBoxStyles()&&Kd.test(k)&&mj.test(f)&&(v=M.width,C=M.minWidth,_=M.maxWidth,M.minWidth=M.maxWidth=M.width=k,k=g.width,M.width=v,M.minWidth=C,M.maxWidth=_)),k!==void 0?k+"":k}function cb(u,f){return{get:function(){if(u()){delete this.get;return}return(this.get=f).apply(this,arguments)}}}var fb=["Webkit","Moz","ms"],db=I.createElement("div").style,pb={};function yj(u){for(var f=u[0].toUpperCase()+u.slice(1),g=fb.length;g--;)if(u=fb[g]+f,u in db)return u}function qd(u){var f=m.cssProps[u]||pb[u];return f||(u in db?u:pb[u]=yj(u)||u)}var bj=/^(none|table(?!-c[ea]).+)/,Cj={position:"absolute",visibility:"hidden",display:"block"},hb={letterSpacing:"0",fontWeight:"400"};function gb(u,f,g){var v=_e.exec(f);return v?Math.max(0,v[2]-(g||0))+(v[3]||"px"):f}function zd(u,f,g,v,C,_){var k=f==="width"?1:0,H=0,M=0;if(g===(v?"border":"content"))return 0;for(;k<4;k+=2)g==="margin"&&(M+=m.css(u,g+Me[k],!0,C)),v?(g==="content"&&(M-=m.css(u,"padding"+Me[k],!0,C)),g!=="margin"&&(M-=m.css(u,"border"+Me[k]+"Width",!0,C))):(M+=m.css(u,"padding"+Me[k],!0,C),g!=="padding"?M+=m.css(u,"border"+Me[k]+"Width",!0,C):H+=m.css(u,"border"+Me[k]+"Width",!0,C));return!v&&_>=0&&(M+=Math.max(0,Math.ceil(u["offset"+f[0].toUpperCase()+f.slice(1)]-_-M-H-.5))||0),M}function mb(u,f,g){var v=Lu(u),C=!w.boxSizingReliable()||g,_=C&&m.css(u,"boxSizing",!1,v)==="border-box",k=_,H=Aa(u,f,v),M="offset"+f[0].toUpperCase()+f.slice(1);if(Kd.test(H)){if(!g)return H;H="auto"}return(!w.boxSizingReliable()&&_||!w.reliableTrDimensions()&&ee(u,"tr")||H==="auto"||!parseFloat(H)&&m.css(u,"display",!1,v)==="inline")&&u.getClientRects().length&&(_=m.css(u,"boxSizing",!1,v)==="border-box",k=M in u,k&&(H=u[M])),H=parseFloat(H)||0,H+zd(u,f,g||(_?"border":"content"),k,v,H)+"px"}m.extend({cssHooks:{opacity:{get:function(u,f){if(f){var g=Aa(u,"opacity");return g===""?"1":g}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(u,f,g,v){if(!(!u||u.nodeType===3||u.nodeType===8||!u.style)){var C,_,k,H=$(f),M=Vd.test(f),q=u.style;if(M||(f=qd(H)),k=m.cssHooks[f]||m.cssHooks[H],g!==void 0){if(_=typeof g,_==="string"&&(C=_e.exec(g))&&C[1]&&(g=Ct(u,f,C),_="number"),g==null||g!==g)return;_==="number"&&!M&&(g+=C&&C[3]||(m.cssNumber[H]?"":"px")),!w.clearCloneStyle&&g===""&&f.indexOf("background")===0&&(q[f]="inherit"),(!k||!("set"in k)||(g=k.set(u,g,v))!==void 0)&&(M?q.setProperty(f,g):q[f]=g)}else return k&&"get"in k&&(C=k.get(u,!1,v))!==void 0?C:q[f]}},css:function(u,f,g,v){var C,_,k,H=$(f),M=Vd.test(f);return M||(f=qd(H)),k=m.cssHooks[f]||m.cssHooks[H],k&&"get"in k&&(C=k.get(u,!0,g)),C===void 0&&(C=Aa(u,f,v)),C==="normal"&&f in hb&&(C=hb[f]),g===""||g?(_=parseFloat(C),g===!0||isFinite(_)?_||0:C):C}}),m.each(["height","width"],function(u,f){m.cssHooks[f]={get:function(g,v,C){if(v)return bj.test(m.css(g,"display"))&&(!g.getClientRects().length||!g.getBoundingClientRect().width)?lb(g,Cj,function(){return mb(g,f,C)}):mb(g,f,C)},set:function(g,v,C){var _,k=Lu(g),H=!w.scrollboxSize()&&k.position==="absolute",M=H||C,q=M&&m.css(g,"boxSizing",!1,k)==="border-box",Z=C?zd(g,f,C,q,k):0;return q&&H&&(Z-=Math.ceil(g["offset"+f[0].toUpperCase()+f.slice(1)]-parseFloat(k[f])-zd(g,f,"border",!1,k)-.5)),Z&&(_=_e.exec(v))&&(_[3]||"px")!=="px"&&(g.style[f]=v,v=m.css(g,f)),gb(g,v,Z)}}}),m.cssHooks.marginLeft=cb(w.reliableMarginLeft,function(u,f){if(f)return(parseFloat(Aa(u,"marginLeft"))||u.getBoundingClientRect().left-lb(u,{marginLeft:0},function(){return u.getBoundingClientRect().left}))+"px"}),m.each({margin:"",padding:"",border:"Width"},function(u,f){m.cssHooks[u+f]={expand:function(g){for(var v=0,C={},_=typeof g=="string"?g.split(" "):[g];v<4;v++)C[u+Me[v]+f]=_[v]||_[v-2]||_[0];return C}},u!=="margin"&&(m.cssHooks[u+f].set=gb)}),m.fn.extend({css:function(u,f){return Le(this,function(g,v,C){var _,k,H={},M=0;if(Array.isArray(v)){for(_=Lu(g),k=v.length;M<k;M++)H[v[M]]=m.css(g,v[M],!1,_);return H}return C!==void 0?m.style(g,v,C):m.css(g,v)},u,f,arguments.length>1)}});function jn(u,f,g,v,C){return new jn.prototype.init(u,f,g,v,C)}m.Tween=jn,jn.prototype={constructor:jn,init:function(u,f,g,v,C,_){this.elem=u,this.prop=g,this.easing=C||m.easing._default,this.options=f,this.start=this.now=this.cur(),this.end=v,this.unit=_||(m.cssNumber[g]?"":"px")},cur:function(){var u=jn.propHooks[this.prop];return u&&u.get?u.get(this):jn.propHooks._default.get(this)},run:function(u){var f,g=jn.propHooks[this.prop];return this.options.duration?this.pos=f=m.easing[this.easing](u,this.options.duration*u,0,1,this.options.duration):this.pos=f=u,this.now=(this.end-this.start)*f+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),g&&g.set?g.set(this):jn.propHooks._default.set(this),this}},jn.prototype.init.prototype=jn.prototype,jn.propHooks={_default:{get:function(u){var f;return u.elem.nodeType!==1||u.elem[u.prop]!=null&&u.elem.style[u.prop]==null?u.elem[u.prop]:(f=m.css(u.elem,u.prop,""),!f||f==="auto"?0:f)},set:function(u){m.fx.step[u.prop]?m.fx.step[u.prop](u):u.elem.nodeType===1&&(m.cssHooks[u.prop]||u.elem.style[qd(u.prop)]!=null)?m.style(u.elem,u.prop,u.now+u.unit):u.elem[u.prop]=u.now}}},jn.propHooks.scrollTop=jn.propHooks.scrollLeft={set:function(u){u.elem.nodeType&&u.elem.parentNode&&(u.elem[u.prop]=u.now)}},m.easing={linear:function(u){return u},swing:function(u){return .5-Math.cos(u*Math.PI)/2},_default:"swing"},m.fx=jn.prototype.init,m.fx.step={};var ds,Iu,_j=/^(?:toggle|show|hide)$/,wj=/queueHooks$/;function Gd(){Iu&&(I.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(Gd):t.setTimeout(Gd,m.fx.interval),m.fx.tick())}function vb(){return t.setTimeout(function(){ds=void 0}),ds=Date.now()}function Pu(u,f){var g,v=0,C={height:u};for(f=f?1:0;v<4;v+=2-f)g=Me[v],C["margin"+g]=C["padding"+g]=u;return f&&(C.opacity=C.width=u),C}function yb(u,f,g){for(var v,C=(kr.tweeners[f]||[]).concat(kr.tweeners["*"]),_=0,k=C.length;_<k;_++)if(v=C[_].call(g,f,u))return v}function Tj(u,f,g){var v,C,_,k,H,M,q,Z,he="width"in f||"height"in f,Y=this,re={},We=u.style,ct=u.nodeType&<(u),Ue=K.get(u,"fxshow");g.queue||(k=m._queueHooks(u,"fx"),k.unqueued==null&&(k.unqueued=0,H=k.empty.fire,k.empty.fire=function(){k.unqueued||H()}),k.unqueued++,Y.always(function(){Y.always(function(){k.unqueued--,m.queue(u,"fx").length||k.empty.fire()})}));for(v in f)if(C=f[v],_j.test(C)){if(delete f[v],_=_||C==="toggle",C===(ct?"hide":"show"))if(C==="show"&&Ue&&Ue[v]!==void 0)ct=!0;else continue;re[v]=Ue&&Ue[v]||m.style(u,v)}if(M=!m.isEmptyObject(f),!(!M&&m.isEmptyObject(re))){he&&u.nodeType===1&&(g.overflow=[We.overflow,We.overflowX,We.overflowY],q=Ue&&Ue.display,q==null&&(q=K.get(u,"display")),Z=m.css(u,"display"),Z==="none"&&(q?Z=q:(Ht([u],!0),q=u.style.display||q,Z=m.css(u,"display"),Ht([u]))),(Z==="inline"||Z==="inline-block"&&q!=null)&&m.css(u,"float")==="none"&&(M||(Y.done(function(){We.display=q}),q==null&&(Z=We.display,q=Z==="none"?"":Z)),We.display="inline-block")),g.overflow&&(We.overflow="hidden",Y.always(function(){We.overflow=g.overflow[0],We.overflowX=g.overflow[1],We.overflowY=g.overflow[2]})),M=!1;for(v in re)M||(Ue?"hidden"in Ue&&(ct=Ue.hidden):Ue=K.access(u,"fxshow",{display:q}),_&&(Ue.hidden=!ct),ct&&Ht([u],!0),Y.done(function(){ct||Ht([u]),K.remove(u,"fxshow");for(v in re)m.style(u,v,re[v])})),M=yb(ct?Ue[v]:0,v,Y),v in Ue||(Ue[v]=M.start,ct&&(M.end=M.start,M.start=0))}}function xj(u,f){var g,v,C,_,k;for(g in u)if(v=$(g),C=f[v],_=u[g],Array.isArray(_)&&(C=_[1],_=u[g]=_[0]),g!==v&&(u[v]=_,delete u[g]),k=m.cssHooks[v],k&&"expand"in k){_=k.expand(_),delete u[v];for(g in _)g in u||(u[g]=_[g],f[g]=C)}else f[v]=C}function kr(u,f,g){var v,C,_=0,k=kr.prefilters.length,H=m.Deferred().always(function(){delete M.elem}),M=function(){if(C)return!1;for(var he=ds||vb(),Y=Math.max(0,q.startTime+q.duration-he),re=Y/q.duration||0,We=1-re,ct=0,Ue=q.tweens.length;ct<Ue;ct++)q.tweens[ct].run(We);return H.notifyWith(u,[q,We,Y]),We<1&&Ue?Y:(Ue||H.notifyWith(u,[q,1,0]),H.resolveWith(u,[q]),!1)},q=H.promise({elem:u,props:m.extend({},f),opts:m.extend(!0,{specialEasing:{},easing:m.easing._default},g),originalProperties:f,originalOptions:g,startTime:ds||vb(),duration:g.duration,tweens:[],createTween:function(he,Y){var re=m.Tween(u,q.opts,he,Y,q.opts.specialEasing[he]||q.opts.easing);return q.tweens.push(re),re},stop:function(he){var Y=0,re=he?q.tweens.length:0;if(C)return this;for(C=!0;Y<re;Y++)q.tweens[Y].run(1);return he?(H.notifyWith(u,[q,1,0]),H.resolveWith(u,[q,he])):H.rejectWith(u,[q,he]),this}}),Z=q.props;for(xj(Z,q.opts.specialEasing);_<k;_++)if(v=kr.prefilters[_].call(q,u,Z,q.opts),v)return T(v.stop)&&(m._queueHooks(q.elem,q.opts.queue).stop=v.stop.bind(v)),v;return m.map(Z,yb,q),T(q.opts.start)&&q.opts.start.call(u,q),q.progress(q.opts.progress).done(q.opts.done,q.opts.complete).fail(q.opts.fail).always(q.opts.always),m.fx.timer(m.extend(M,{elem:u,anim:q,queue:q.opts.queue})),q}m.Animation=m.extend(kr,{tweeners:{"*":[function(u,f){var g=this.createTween(u,f);return Ct(g.elem,u,_e.exec(f),g),g}]},tweener:function(u,f){T(u)?(f=u,u=["*"]):u=u.match(Ve);for(var g,v=0,C=u.length;v<C;v++)g=u[v],kr.tweeners[g]=kr.tweeners[g]||[],kr.tweeners[g].unshift(f)},prefilters:[Tj],prefilter:function(u,f){f?kr.prefilters.unshift(u):kr.prefilters.push(u)}}),m.speed=function(u,f,g){var v=u&&typeof u=="object"?m.extend({},u):{complete:g||!g&&f||T(u)&&u,duration:u,easing:g&&f||f&&!T(f)&&f};return m.fx.off?v.duration=0:typeof v.duration!="number"&&(v.duration in m.fx.speeds?v.duration=m.fx.speeds[v.duration]:v.duration=m.fx.speeds._default),(v.queue==null||v.queue===!0)&&(v.queue="fx"),v.old=v.complete,v.complete=function(){T(v.old)&&v.old.call(this),v.queue&&m.dequeue(this,v.queue)},v},m.fn.extend({fadeTo:function(u,f,g,v){return this.filter(lt).css("opacity",0).show().end().animate({opacity:f},u,g,v)},animate:function(u,f,g,v){var C=m.isEmptyObject(u),_=m.speed(f,g,v),k=function(){var H=kr(this,m.extend({},u),_);(C||K.get(this,"finish"))&&H.stop(!0)};return k.finish=k,C||_.queue===!1?this.each(k):this.queue(_.queue,k)},stop:function(u,f,g){var v=function(C){var _=C.stop;delete C.stop,_(g)};return typeof u!="string"&&(g=f,f=u,u=void 0),f&&this.queue(u||"fx",[]),this.each(function(){var C=!0,_=u!=null&&u+"queueHooks",k=m.timers,H=K.get(this);if(_)H[_]&&H[_].stop&&v(H[_]);else for(_ in H)H[_]&&H[_].stop&&wj.test(_)&&v(H[_]);for(_=k.length;_--;)k[_].elem===this&&(u==null||k[_].queue===u)&&(k[_].anim.stop(g),C=!1,k.splice(_,1));(C||!g)&&m.dequeue(this,u)})},finish:function(u){return u!==!1&&(u=u||"fx"),this.each(function(){var f,g=K.get(this),v=g[u+"queue"],C=g[u+"queueHooks"],_=m.timers,k=v?v.length:0;for(g.finish=!0,m.queue(this,u,[]),C&&C.stop&&C.stop.call(this,!0),f=_.length;f--;)_[f].elem===this&&_[f].queue===u&&(_[f].anim.stop(!0),_.splice(f,1));for(f=0;f<k;f++)v[f]&&v[f].finish&&v[f].finish.call(this);delete g.finish})}}),m.each(["toggle","show","hide"],function(u,f){var g=m.fn[f];m.fn[f]=function(v,C,_){return v==null||typeof v=="boolean"?g.apply(this,arguments):this.animate(Pu(f,!0),v,C,_)}}),m.each({slideDown:Pu("show"),slideUp:Pu("hide"),slideToggle:Pu("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(u,f){m.fn[u]=function(g,v,C){return this.animate(f,g,v,C)}}),m.timers=[],m.fx.tick=function(){var u,f=0,g=m.timers;for(ds=Date.now();f<g.length;f++)u=g[f],!u()&&g[f]===u&&g.splice(f--,1);g.length||m.fx.stop(),ds=void 0},m.fx.timer=function(u){m.timers.push(u),m.fx.start()},m.fx.interval=13,m.fx.start=function(){Iu||(Iu=!0,Gd())},m.fx.stop=function(){Iu=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(u,f){return u=m.fx&&m.fx.speeds[u]||u,f=f||"fx",this.queue(f,function(g,v){var C=t.setTimeout(g,u);v.stop=function(){t.clearTimeout(C)}})},function(){var u=I.createElement("input"),f=I.createElement("select"),g=f.appendChild(I.createElement("option"));u.type="checkbox",w.checkOn=u.value!=="",w.optSelected=g.selected,u=I.createElement("input"),u.value="t",u.type="radio",w.radioValue=u.value==="t"}();var bb,Ea=m.expr.attrHandle;m.fn.extend({attr:function(u,f){return Le(this,m.attr,u,f,arguments.length>1)},removeAttr:function(u){return this.each(function(){m.removeAttr(this,u)})}}),m.extend({attr:function(u,f,g){var v,C,_=u.nodeType;if(!(_===3||_===8||_===2)){if(typeof u.getAttribute>"u")return m.prop(u,f,g);if((_!==1||!m.isXMLDoc(u))&&(C=m.attrHooks[f.toLowerCase()]||(m.expr.match.bool.test(f)?bb:void 0)),g!==void 0){if(g===null){m.removeAttr(u,f);return}return C&&"set"in C&&(v=C.set(u,g,f))!==void 0?v:(u.setAttribute(f,g+""),g)}return C&&"get"in C&&(v=C.get(u,f))!==null?v:(v=m.find.attr(u,f),v??void 0)}},attrHooks:{type:{set:function(u,f){if(!w.radioValue&&f==="radio"&&ee(u,"input")){var g=u.value;return u.setAttribute("type",f),g&&(u.value=g),f}}}},removeAttr:function(u,f){var g,v=0,C=f&&f.match(Ve);if(C&&u.nodeType===1)for(;g=C[v++];)u.removeAttribute(g)}}),bb={set:function(u,f,g){return f===!1?m.removeAttr(u,g):u.setAttribute(g,g),g}},m.each(m.expr.match.bool.source.match(/\w+/g),function(u,f){var g=Ea[f]||m.find.attr;Ea[f]=function(v,C,_){var k,H,M=C.toLowerCase();return _||(H=Ea[M],Ea[M]=k,k=g(v,C,_)!=null?M:null,Ea[M]=H),k}});var kj=/^(?:input|select|textarea|button)$/i,Sj=/^(?:a|area)$/i;m.fn.extend({prop:function(u,f){return Le(this,m.prop,u,f,arguments.length>1)},removeProp:function(u){return this.each(function(){delete this[m.propFix[u]||u]})}}),m.extend({prop:function(u,f,g){var v,C,_=u.nodeType;if(!(_===3||_===8||_===2))return(_!==1||!m.isXMLDoc(u))&&(f=m.propFix[f]||f,C=m.propHooks[f]),g!==void 0?C&&"set"in C&&(v=C.set(u,g,f))!==void 0?v:u[f]=g:C&&"get"in C&&(v=C.get(u,f))!==null?v:u[f]},propHooks:{tabIndex:{get:function(u){var f=m.find.attr(u,"tabindex");return f?parseInt(f,10):kj.test(u.nodeName)||Sj.test(u.nodeName)&&u.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),w.optSelected||(m.propHooks.selected={get:function(u){var f=u.parentNode;return f&&f.parentNode&&f.parentNode.selectedIndex,null},set:function(u){var f=u.parentNode;f&&(f.selectedIndex,f.parentNode&&f.parentNode.selectedIndex)}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this});function eo(u){var f=u.match(Ve)||[];return f.join(" ")}function to(u){return u.getAttribute&&u.getAttribute("class")||""}function Yd(u){return Array.isArray(u)?u:typeof u=="string"?u.match(Ve)||[]:[]}m.fn.extend({addClass:function(u){var f,g,v,C,_,k;return T(u)?this.each(function(H){m(this).addClass(u.call(this,H,to(this)))}):(f=Yd(u),f.length?this.each(function(){if(v=to(this),g=this.nodeType===1&&" "+eo(v)+" ",g){for(_=0;_<f.length;_++)C=f[_],g.indexOf(" "+C+" ")<0&&(g+=C+" ");k=eo(g),v!==k&&this.setAttribute("class",k)}}):this)},removeClass:function(u){var f,g,v,C,_,k;return T(u)?this.each(function(H){m(this).removeClass(u.call(this,H,to(this)))}):arguments.length?(f=Yd(u),f.length?this.each(function(){if(v=to(this),g=this.nodeType===1&&" "+eo(v)+" ",g){for(_=0;_<f.length;_++)for(C=f[_];g.indexOf(" "+C+" ")>-1;)g=g.replace(" "+C+" "," ");k=eo(g),v!==k&&this.setAttribute("class",k)}}):this):this.attr("class","")},toggleClass:function(u,f){var g,v,C,_,k=typeof u,H=k==="string"||Array.isArray(u);return T(u)?this.each(function(M){m(this).toggleClass(u.call(this,M,to(this),f),f)}):typeof f=="boolean"&&H?f?this.addClass(u):this.removeClass(u):(g=Yd(u),this.each(function(){if(H)for(_=m(this),C=0;C<g.length;C++)v=g[C],_.hasClass(v)?_.removeClass(v):_.addClass(v);else(u===void 0||k==="boolean")&&(v=to(this),v&&K.set(this,"__className__",v),this.setAttribute&&this.setAttribute("class",v||u===!1?"":K.get(this,"__className__")||""))}))},hasClass:function(u){var f,g,v=0;for(f=" "+u+" ";g=this[v++];)if(g.nodeType===1&&(" "+eo(to(g))+" ").indexOf(f)>-1)return!0;return!1}});var Aj=/\r/g;m.fn.extend({val:function(u){var f,g,v,C=this[0];return arguments.length?(v=T(u),this.each(function(_){var k;this.nodeType===1&&(v?k=u.call(this,_,m(this).val()):k=u,k==null?k="":typeof k=="number"?k+="":Array.isArray(k)&&(k=m.map(k,function(H){return H==null?"":H+""})),f=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],(!f||!("set"in f)||f.set(this,k,"value")===void 0)&&(this.value=k))})):C?(f=m.valHooks[C.type]||m.valHooks[C.nodeName.toLowerCase()],f&&"get"in f&&(g=f.get(C,"value"))!==void 0?g:(g=C.value,typeof g=="string"?g.replace(Aj,""):g??"")):void 0}}),m.extend({valHooks:{option:{get:function(u){var f=m.find.attr(u,"value");return f??eo(m.text(u))}},select:{get:function(u){var f,g,v,C=u.options,_=u.selectedIndex,k=u.type==="select-one",H=k?null:[],M=k?_+1:C.length;for(_<0?v=M:v=k?_:0;v<M;v++)if(g=C[v],(g.selected||v===_)&&!g.disabled&&(!g.parentNode.disabled||!ee(g.parentNode,"optgroup"))){if(f=m(g).val(),k)return f;H.push(f)}return H},set:function(u,f){for(var g,v,C=u.options,_=m.makeArray(f),k=C.length;k--;)v=C[k],(v.selected=m.inArray(m.valHooks.option.get(v),_)>-1)&&(g=!0);return g||(u.selectedIndex=-1),_}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(u,f){if(Array.isArray(f))return u.checked=m.inArray(m(u).val(),f)>-1}},w.checkOn||(m.valHooks[this].get=function(u){return u.getAttribute("value")===null?"on":u.value})}),w.focusin="onfocusin"in t;var Cb=/^(?:focusinfocus|focusoutblur)$/,_b=function(u){u.stopPropagation()};m.extend(m.event,{trigger:function(u,f,g,v){var C,_,k,H,M,q,Z,he,Y=[g||I],re=p.call(u,"type")?u.type:u,We=p.call(u,"namespace")?u.namespace.split("."):[];if(_=he=k=g=g||I,!(g.nodeType===3||g.nodeType===8)&&!Cb.test(re+m.event.triggered)&&(re.indexOf(".")>-1&&(We=re.split("."),re=We.shift(),We.sort()),M=re.indexOf(":")<0&&"on"+re,u=u[m.expando]?u:new m.Event(re,typeof u=="object"&&u),u.isTrigger=v?2:3,u.namespace=We.join("."),u.rnamespace=u.namespace?new RegExp("(^|\\.)"+We.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=void 0,u.target||(u.target=g),f=f==null?[u]:m.makeArray(f,[u]),Z=m.event.special[re]||{},!(!v&&Z.trigger&&Z.trigger.apply(g,f)===!1))){if(!v&&!Z.noBubble&&!O(g)){for(H=Z.delegateType||re,Cb.test(H+re)||(_=_.parentNode);_;_=_.parentNode)Y.push(_),k=_;k===(g.ownerDocument||I)&&Y.push(k.defaultView||k.parentWindow||t)}for(C=0;(_=Y[C++])&&!u.isPropagationStopped();)he=_,u.type=C>1?H:Z.bindType||re,q=(K.get(_,"events")||Object.create(null))[u.type]&&K.get(_,"handle"),q&&q.apply(_,f),q=M&&_[M],q&&q.apply&&G(_)&&(u.result=q.apply(_,f),u.result===!1&&u.preventDefault());return u.type=re,!v&&!u.isDefaultPrevented()&&(!Z._default||Z._default.apply(Y.pop(),f)===!1)&&G(g)&&M&&T(g[re])&&!O(g)&&(k=g[M],k&&(g[M]=null),m.event.triggered=re,u.isPropagationStopped()&&he.addEventListener(re,_b),g[re](),u.isPropagationStopped()&&he.removeEventListener(re,_b),m.event.triggered=void 0,k&&(g[M]=k)),u.result}},simulate:function(u,f,g){var v=m.extend(new m.Event,g,{type:u,isSimulated:!0});m.event.trigger(v,null,f)}}),m.fn.extend({trigger:function(u,f){return this.each(function(){m.event.trigger(u,f,this)})},triggerHandler:function(u,f){var g=this[0];if(g)return m.event.trigger(u,f,g,!0)}}),w.focusin||m.each({focus:"focusin",blur:"focusout"},function(u,f){var g=function(v){m.event.simulate(f,v.target,m.event.fix(v))};m.event.special[f]={setup:function(){var v=this.ownerDocument||this.document||this,C=K.access(v,f);C||v.addEventListener(u,g,!0),K.access(v,f,(C||0)+1)},teardown:function(){var v=this.ownerDocument||this.document||this,C=K.access(v,f)-1;C?K.access(v,f,C):(v.removeEventListener(u,g,!0),K.remove(v,f))}}});var Oa=t.location,wb={guid:Date.now()},Xd=/\?/;m.parseXML=function(u){var f,g;if(!u||typeof u!="string")return null;try{f=new t.DOMParser().parseFromString(u,"text/xml")}catch{}return g=f&&f.getElementsByTagName("parsererror")[0],(!f||g)&&m.error("Invalid XML: "+(g?m.map(g.childNodes,function(v){return v.textContent}).join(`
|
||
`):u)),f};var Ej=/\[\]$/,Tb=/\r?\n/g,Oj=/^(?:submit|button|image|reset|file)$/i,Lj=/^(?:input|select|textarea|keygen)/i;function Jd(u,f,g,v){var C;if(Array.isArray(f))m.each(f,function(_,k){g||Ej.test(u)?v(u,k):Jd(u+"["+(typeof k=="object"&&k!=null?_:"")+"]",k,g,v)});else if(!g&&L(f)==="object")for(C in f)Jd(u+"["+C+"]",f[C],g,v);else v(u,f)}m.param=function(u,f){var g,v=[],C=function(_,k){var H=T(k)?k():k;v[v.length]=encodeURIComponent(_)+"="+encodeURIComponent(H??"")};if(u==null)return"";if(Array.isArray(u)||u.jquery&&!m.isPlainObject(u))m.each(u,function(){C(this.name,this.value)});else for(g in u)Jd(g,u[g],f,C);return v.join("&")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var u=m.prop(this,"elements");return u?m.makeArray(u):this}).filter(function(){var u=this.type;return this.name&&!m(this).is(":disabled")&&Lj.test(this.nodeName)&&!Oj.test(u)&&(this.checked||!fn.test(u))}).map(function(u,f){var g=m(this).val();return g==null?null:Array.isArray(g)?m.map(g,function(v){return{name:f.name,value:v.replace(Tb,`\r
|
||
`)}}):{name:f.name,value:g.replace(Tb,`\r
|
||
`)}}).get()}});var Ij=/%20/g,Pj=/#.*$/,Dj=/([?&])_=[^&]*/,Rj=/^(.*?):[ \t]*([^\r\n]*)$/mg,Nj=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mj=/^(?:GET|HEAD)$/,Fj=/^\/\//,xb={},Zd={},kb="*/".concat("*"),Qd=I.createElement("a");Qd.href=Oa.href;function Sb(u){return function(f,g){typeof f!="string"&&(g=f,f="*");var v,C=0,_=f.toLowerCase().match(Ve)||[];if(T(g))for(;v=_[C++];)v[0]==="+"?(v=v.slice(1)||"*",(u[v]=u[v]||[]).unshift(g)):(u[v]=u[v]||[]).push(g)}}function Ab(u,f,g,v){var C={},_=u===Zd;function k(H){var M;return C[H]=!0,m.each(u[H]||[],function(q,Z){var he=Z(f,g,v);if(typeof he=="string"&&!_&&!C[he])return f.dataTypes.unshift(he),k(he),!1;if(_)return!(M=he)}),M}return k(f.dataTypes[0])||!C["*"]&&k("*")}function ep(u,f){var g,v,C=m.ajaxSettings.flatOptions||{};for(g in f)f[g]!==void 0&&((C[g]?u:v||(v={}))[g]=f[g]);return v&&m.extend(!0,u,v),u}function $j(u,f,g){for(var v,C,_,k,H=u.contents,M=u.dataTypes;M[0]==="*";)M.shift(),v===void 0&&(v=u.mimeType||f.getResponseHeader("Content-Type"));if(v){for(C in H)if(H[C]&&H[C].test(v)){M.unshift(C);break}}if(M[0]in g)_=M[0];else{for(C in g){if(!M[0]||u.converters[C+" "+M[0]]){_=C;break}k||(k=C)}_=_||k}if(_)return _!==M[0]&&M.unshift(_),g[_]}function Bj(u,f,g,v){var C,_,k,H,M,q={},Z=u.dataTypes.slice();if(Z[1])for(k in u.converters)q[k.toLowerCase()]=u.converters[k];for(_=Z.shift();_;)if(u.responseFields[_]&&(g[u.responseFields[_]]=f),!M&&v&&u.dataFilter&&(f=u.dataFilter(f,u.dataType)),M=_,_=Z.shift(),_){if(_==="*")_=M;else if(M!=="*"&&M!==_){if(k=q[M+" "+_]||q["* "+_],!k){for(C in q)if(H=C.split(" "),H[1]===_&&(k=q[M+" "+H[0]]||q["* "+H[0]],k)){k===!0?k=q[C]:q[C]!==!0&&(_=H[0],Z.unshift(H[1]));break}}if(k!==!0)if(k&&u.throws)f=k(f);else try{f=k(f)}catch(he){return{state:"parsererror",error:k?he:"No conversion from "+M+" to "+_}}}}return{state:"success",data:f}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Oa.href,type:"GET",isLocal:Nj.test(Oa.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":kb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(u,f){return f?ep(ep(u,m.ajaxSettings),f):ep(m.ajaxSettings,u)},ajaxPrefilter:Sb(xb),ajaxTransport:Sb(Zd),ajax:function(u,f){typeof u=="object"&&(f=u,u=void 0),f=f||{};var g,v,C,_,k,H,M,q,Z,he,Y=m.ajaxSetup({},f),re=Y.context||Y,We=Y.context&&(re.nodeType||re.jquery)?m(re):m.event,ct=m.Deferred(),Ue=m.Callbacks("once memory"),ln=Y.statusCode||{},en={},Zn={},Lt="canceled",ut={readyState:0,getResponseHeader:function(xt){var Wt;if(M){if(!_)for(_={};Wt=Rj.exec(C);)_[Wt[1].toLowerCase()+" "]=(_[Wt[1].toLowerCase()+" "]||[]).concat(Wt[2]);Wt=_[xt.toLowerCase()+" "]}return Wt==null?null:Wt.join(", ")},getAllResponseHeaders:function(){return M?C:null},setRequestHeader:function(xt,Wt){return M==null&&(xt=Zn[xt.toLowerCase()]=Zn[xt.toLowerCase()]||xt,en[xt]=Wt),this},overrideMimeType:function(xt){return M==null&&(Y.mimeType=xt),this},statusCode:function(xt){var Wt;if(xt)if(M)ut.always(xt[ut.status]);else for(Wt in xt)ln[Wt]=[ln[Wt],xt[Wt]];return this},abort:function(xt){var Wt=xt||Lt;return g&&g.abort(Wt),Un(0,Wt),this}};if(ct.promise(ut),Y.url=((u||Y.url||Oa.href)+"").replace(Fj,Oa.protocol+"//"),Y.type=f.method||f.type||Y.method||Y.type,Y.dataTypes=(Y.dataType||"*").toLowerCase().match(Ve)||[""],Y.crossDomain==null){H=I.createElement("a");try{H.href=Y.url,H.href=H.href,Y.crossDomain=Qd.protocol+"//"+Qd.host!=H.protocol+"//"+H.host}catch{Y.crossDomain=!0}}if(Y.data&&Y.processData&&typeof Y.data!="string"&&(Y.data=m.param(Y.data,Y.traditional)),Ab(xb,Y,f,ut),M)return ut;q=m.event&&Y.global,q&&m.active++===0&&m.event.trigger("ajaxStart"),Y.type=Y.type.toUpperCase(),Y.hasContent=!Mj.test(Y.type),v=Y.url.replace(Pj,""),Y.hasContent?Y.data&&Y.processData&&(Y.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Y.data=Y.data.replace(Ij,"+")):(he=Y.url.slice(v.length),Y.data&&(Y.processData||typeof Y.data=="string")&&(v+=(Xd.test(v)?"&":"?")+Y.data,delete Y.data),Y.cache===!1&&(v=v.replace(Dj,"$1"),he=(Xd.test(v)?"&":"?")+"_="+wb.guid+++he),Y.url=v+he),Y.ifModified&&(m.lastModified[v]&&ut.setRequestHeader("If-Modified-Since",m.lastModified[v]),m.etag[v]&&ut.setRequestHeader("If-None-Match",m.etag[v])),(Y.data&&Y.hasContent&&Y.contentType!==!1||f.contentType)&&ut.setRequestHeader("Content-Type",Y.contentType),ut.setRequestHeader("Accept",Y.dataTypes[0]&&Y.accepts[Y.dataTypes[0]]?Y.accepts[Y.dataTypes[0]]+(Y.dataTypes[0]!=="*"?", "+kb+"; q=0.01":""):Y.accepts["*"]);for(Z in Y.headers)ut.setRequestHeader(Z,Y.headers[Z]);if(Y.beforeSend&&(Y.beforeSend.call(re,ut,Y)===!1||M))return ut.abort();if(Lt="abort",Ue.add(Y.complete),ut.done(Y.success),ut.fail(Y.error),g=Ab(Zd,Y,f,ut),!g)Un(-1,"No Transport");else{if(ut.readyState=1,q&&We.trigger("ajaxSend",[ut,Y]),M)return ut;Y.async&&Y.timeout>0&&(k=t.setTimeout(function(){ut.abort("timeout")},Y.timeout));try{M=!1,g.send(en,Un)}catch(xt){if(M)throw xt;Un(-1,xt)}}function Un(xt,Wt,Ia,Du){var Qn,no,ro,Wn,ki,hr=Wt;M||(M=!0,k&&t.clearTimeout(k),g=void 0,C=Du||"",ut.readyState=xt>0?4:0,Qn=xt>=200&&xt<300||xt===304,Ia&&(Wn=$j(Y,ut,Ia)),!Qn&&m.inArray("script",Y.dataTypes)>-1&&m.inArray("json",Y.dataTypes)<0&&(Y.converters["text script"]=function(){}),Wn=Bj(Y,Wn,ut,Qn),Qn?(Y.ifModified&&(ki=ut.getResponseHeader("Last-Modified"),ki&&(m.lastModified[v]=ki),ki=ut.getResponseHeader("etag"),ki&&(m.etag[v]=ki)),xt===204||Y.type==="HEAD"?hr="nocontent":xt===304?hr="notmodified":(hr=Wn.state,no=Wn.data,ro=Wn.error,Qn=!ro)):(ro=hr,(xt||!hr)&&(hr="error",xt<0&&(xt=0))),ut.status=xt,ut.statusText=(Wt||hr)+"",Qn?ct.resolveWith(re,[no,hr,ut]):ct.rejectWith(re,[ut,hr,ro]),ut.statusCode(ln),ln=void 0,q&&We.trigger(Qn?"ajaxSuccess":"ajaxError",[ut,Y,Qn?no:ro]),Ue.fireWith(re,[ut,hr]),q&&(We.trigger("ajaxComplete",[ut,Y]),--m.active||m.event.trigger("ajaxStop")))}return ut},getJSON:function(u,f,g){return m.get(u,f,g,"json")},getScript:function(u,f){return m.get(u,void 0,f,"script")}}),m.each(["get","post"],function(u,f){m[f]=function(g,v,C,_){return T(v)&&(_=_||C,C=v,v=void 0),m.ajax(m.extend({url:g,type:f,dataType:_,data:v,success:C},m.isPlainObject(g)&&g))}}),m.ajaxPrefilter(function(u){var f;for(f in u.headers)f.toLowerCase()==="content-type"&&(u.contentType=u.headers[f]||"")}),m._evalUrl=function(u,f,g){return m.ajax({url:u,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(v){m.globalEval(v,f,g)}})},m.fn.extend({wrapAll:function(u){var f;return this[0]&&(T(u)&&(u=u.call(this[0])),f=m(u,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&f.insertBefore(this[0]),f.map(function(){for(var g=this;g.firstElementChild;)g=g.firstElementChild;return g}).append(this)),this},wrapInner:function(u){return T(u)?this.each(function(f){m(this).wrapInner(u.call(this,f))}):this.each(function(){var f=m(this),g=f.contents();g.length?g.wrapAll(u):f.append(u)})},wrap:function(u){var f=T(u);return this.each(function(g){m(this).wrapAll(f?u.call(this,g):u)})},unwrap:function(u){return this.parent(u).not("body").each(function(){m(this).replaceWith(this.childNodes)}),this}}),m.expr.pseudos.hidden=function(u){return!m.expr.pseudos.visible(u)},m.expr.pseudos.visible=function(u){return!!(u.offsetWidth||u.offsetHeight||u.getClientRects().length)},m.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Hj={0:200,1223:204},La=m.ajaxSettings.xhr();w.cors=!!La&&"withCredentials"in La,w.ajax=La=!!La,m.ajaxTransport(function(u){var f,g;if(w.cors||La&&!u.crossDomain)return{send:function(v,C){var _,k=u.xhr();if(k.open(u.type,u.url,u.async,u.username,u.password),u.xhrFields)for(_ in u.xhrFields)k[_]=u.xhrFields[_];u.mimeType&&k.overrideMimeType&&k.overrideMimeType(u.mimeType),!u.crossDomain&&!v["X-Requested-With"]&&(v["X-Requested-With"]="XMLHttpRequest");for(_ in v)k.setRequestHeader(_,v[_]);f=function(H){return function(){f&&(f=g=k.onload=k.onerror=k.onabort=k.ontimeout=k.onreadystatechange=null,H==="abort"?k.abort():H==="error"?typeof k.status!="number"?C(0,"error"):C(k.status,k.statusText):C(Hj[k.status]||k.status,k.statusText,(k.responseType||"text")!=="text"||typeof k.responseText!="string"?{binary:k.response}:{text:k.responseText},k.getAllResponseHeaders()))}},k.onload=f(),g=k.onerror=k.ontimeout=f("error"),k.onabort!==void 0?k.onabort=g:k.onreadystatechange=function(){k.readyState===4&&t.setTimeout(function(){f&&g()})},f=f("abort");try{k.send(u.hasContent&&u.data||null)}catch(H){if(f)throw H}},abort:function(){f&&f()}}}),m.ajaxPrefilter(function(u){u.crossDomain&&(u.contents.script=!1)}),m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(u){return m.globalEval(u),u}}}),m.ajaxPrefilter("script",function(u){u.cache===void 0&&(u.cache=!1),u.crossDomain&&(u.type="GET")}),m.ajaxTransport("script",function(u){if(u.crossDomain||u.scriptAttrs){var f,g;return{send:function(v,C){f=m("<script>").attr(u.scriptAttrs||{}).prop({charset:u.scriptCharset,src:u.url}).on("load error",g=function(_){f.remove(),g=null,_&&C(_.type==="error"?404:200,_.type)}),I.head.appendChild(f[0])},abort:function(){g&&g()}}}});var Eb=[],tp=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var u=Eb.pop()||m.expando+"_"+wb.guid++;return this[u]=!0,u}}),m.ajaxPrefilter("json jsonp",function(u,f,g){var v,C,_,k=u.jsonp!==!1&&(tp.test(u.url)?"url":typeof u.data=="string"&&(u.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&tp.test(u.data)&&"data");if(k||u.dataTypes[0]==="jsonp")return v=u.jsonpCallback=T(u.jsonpCallback)?u.jsonpCallback():u.jsonpCallback,k?u[k]=u[k].replace(tp,"$1"+v):u.jsonp!==!1&&(u.url+=(Xd.test(u.url)?"&":"?")+u.jsonp+"="+v),u.converters["script json"]=function(){return _||m.error(v+" was not called"),_[0]},u.dataTypes[0]="json",C=t[v],t[v]=function(){_=arguments},g.always(function(){C===void 0?m(t).removeProp(v):t[v]=C,u[v]&&(u.jsonpCallback=f.jsonpCallback,Eb.push(v)),_&&T(C)&&C(_[0]),_=C=void 0}),"script"}),w.createHTMLDocument=function(){var u=I.implementation.createHTMLDocument("").body;return u.innerHTML="<form></form><form></form>",u.childNodes.length===2}(),m.parseHTML=function(u,f,g){if(typeof u!="string")return[];typeof f=="boolean"&&(g=f,f=!1);var v,C,_;return f||(w.createHTMLDocument?(f=I.implementation.createHTMLDocument(""),v=f.createElement("base"),v.href=I.location.href,f.head.appendChild(v)):f=I),C=J.exec(u),_=!g&&[],C?[f.createElement(C[1])]:(C=In([u],f,_),_&&_.length&&m(_).remove(),m.merge([],C.childNodes))},m.fn.load=function(u,f,g){var v,C,_,k=this,H=u.indexOf(" ");return H>-1&&(v=eo(u.slice(H)),u=u.slice(0,H)),T(f)?(g=f,f=void 0):f&&typeof f=="object"&&(C="POST"),k.length>0&&m.ajax({url:u,type:C||"GET",dataType:"html",data:f}).done(function(M){_=arguments,k.html(v?m("<div>").append(m.parseHTML(M)).find(v):M)}).always(g&&function(M,q){k.each(function(){g.apply(this,_||[M.responseText,q,M])})}),this},m.expr.pseudos.animated=function(u){return m.grep(m.timers,function(f){return u===f.elem}).length},m.offset={setOffset:function(u,f,g){var v,C,_,k,H,M,q,Z=m.css(u,"position"),he=m(u),Y={};Z==="static"&&(u.style.position="relative"),H=he.offset(),_=m.css(u,"top"),M=m.css(u,"left"),q=(Z==="absolute"||Z==="fixed")&&(_+M).indexOf("auto")>-1,q?(v=he.position(),k=v.top,C=v.left):(k=parseFloat(_)||0,C=parseFloat(M)||0),T(f)&&(f=f.call(u,g,m.extend({},H))),f.top!=null&&(Y.top=f.top-H.top+k),f.left!=null&&(Y.left=f.left-H.left+C),"using"in f?f.using.call(u,Y):he.css(Y)}},m.fn.extend({offset:function(u){if(arguments.length)return u===void 0?this:this.each(function(C){m.offset.setOffset(this,u,C)});var f,g,v=this[0];if(v)return v.getClientRects().length?(f=v.getBoundingClientRect(),g=v.ownerDocument.defaultView,{top:f.top+g.pageYOffset,left:f.left+g.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var u,f,g,v=this[0],C={top:0,left:0};if(m.css(v,"position")==="fixed")f=v.getBoundingClientRect();else{for(f=this.offset(),g=v.ownerDocument,u=v.offsetParent||g.documentElement;u&&(u===g.body||u===g.documentElement)&&m.css(u,"position")==="static";)u=u.parentNode;u&&u!==v&&u.nodeType===1&&(C=m(u).offset(),C.top+=m.css(u,"borderTopWidth",!0),C.left+=m.css(u,"borderLeftWidth",!0))}return{top:f.top-C.top-m.css(v,"marginTop",!0),left:f.left-C.left-m.css(v,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var u=this.offsetParent;u&&m.css(u,"position")==="static";)u=u.offsetParent;return u||Se})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(u,f){var g=f==="pageYOffset";m.fn[u]=function(v){return Le(this,function(C,_,k){var H;if(O(C)?H=C:C.nodeType===9&&(H=C.defaultView),k===void 0)return H?H[f]:C[_];H?H.scrollTo(g?H.pageXOffset:k,g?k:H.pageYOffset):C[_]=k},u,v,arguments.length)}}),m.each(["top","left"],function(u,f){m.cssHooks[f]=cb(w.pixelPosition,function(g,v){if(v)return v=Aa(g,f),Kd.test(v)?m(g).position()[f]+"px":v})}),m.each({Height:"height",Width:"width"},function(u,f){m.each({padding:"inner"+u,content:f,"":"outer"+u},function(g,v){m.fn[v]=function(C,_){var k=arguments.length&&(g||typeof C!="boolean"),H=g||(C===!0||_===!0?"margin":"border");return Le(this,function(M,q,Z){var he;return O(M)?v.indexOf("outer")===0?M["inner"+u]:M.document.documentElement["client"+u]:M.nodeType===9?(he=M.documentElement,Math.max(M.body["scroll"+u],he["scroll"+u],M.body["offset"+u],he["offset"+u],he["client"+u])):Z===void 0?m.css(M,q,H):m.style(M,q,Z,H)},f,k?C:void 0,k)}})}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(u,f){m.fn[f]=function(g){return this.on(f,g)}}),m.fn.extend({bind:function(u,f,g){return this.on(u,null,f,g)},unbind:function(u,f){return this.off(u,null,f)},delegate:function(u,f,g,v){return this.on(f,u,g,v)},undelegate:function(u,f,g){return arguments.length===1?this.off(u,"**"):this.off(f,u||"**",g)},hover:function(u,f){return this.mouseenter(u).mouseleave(f||u)}}),m.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(u,f){m.fn[f]=function(g,v){return arguments.length>0?this.on(f,null,g,v):this.trigger(f)}});var jj=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;m.proxy=function(u,f){var g,v,C;if(typeof f=="string"&&(g=u[f],f=u,u=g),!!T(u))return v=o.call(arguments,2),C=function(){return u.apply(f||this,v.concat(o.call(arguments)))},C.guid=u.guid=u.guid||m.guid++,C},m.holdReady=function(u){u?m.readyWait++:m.ready(!0)},m.isArray=Array.isArray,m.parseJSON=JSON.parse,m.nodeName=ee,m.isFunction=T,m.isWindow=O,m.camelCase=$,m.type=L,m.now=Date.now,m.isNumeric=function(u){var f=m.type(u);return(f==="number"||f==="string")&&!isNaN(u-parseFloat(u))},m.trim=function(u){return u==null?"":(u+"").replace(jj,"$1")};var Uj=t.jQuery,Wj=t.$;return m.noConflict=function(u){return t.$===m&&(t.$=Wj),u&&t.jQuery===m&&(t.jQuery=Uj),m},typeof n>"u"&&(t.jQuery=t.$=m),m})}(Td)),Td.exports}(function(e){(function(t){t(["jquery"],function(n){return function(){var r,i,o=0,s={error:"error",info:"info",success:"success",warning:"warning"},l={clear:T,remove:O,error:d,getContainer:h,info:p,options:{},subscribe:b,success:y,version:"2.1.4",warning:w},c;return l;function d(S,R,U){return m({type:s.error,iconClass:ce().iconClasses.error,message:S,optionsOverride:U,title:R})}function h(S,R){return S||(S=ce()),r=n("#"+S.containerId),r.length||R&&(r=j(S)),r}function p(S,R,U){return m({type:s.info,iconClass:ce().iconClasses.info,message:S,optionsOverride:U,title:R})}function b(S){i=S}function y(S,R,U){return m({type:s.success,iconClass:ce().iconClasses.success,message:S,optionsOverride:U,title:R})}function w(S,R,U){return m({type:s.warning,iconClass:ce().iconClasses.warning,message:S,optionsOverride:U,title:R})}function T(S,R){var U=ce();r||h(U),P(S,U,R)||I(U)}function O(S){var R=ce();if(r||h(R),S&&n(":focus",S).length===0){D(S);return}r.children().length&&r.remove()}function I(S){for(var R=r.children(),U=R.length-1;U>=0;U--)P(n(R[U]),S)}function P(S,R,U){var ee=U&&U.force?U.force:!1;return S&&(ee||n(":focus",S).length===0)?(S[R.hideMethod]({duration:R.hideDuration,easing:R.hideEasing,complete:function(){D(S)}}),!0):!1}function j(S){return r=n("<div/>").attr("id",S.containerId).addClass(S.positionClass),r.appendTo(n(S.target)),r}function L(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:void 0,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:void 0,closeMethod:!1,closeDuration:!1,closeEasing:!1,closeOnHover:!0,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",escapeHtml:!1,target:"body",closeHtml:'<button type="button">×</button>',closeClass:"toast-close-button",newestOnTop:!0,preventDuplicates:!1,progressBar:!1,progressClass:"toast-progress",rtl:!1}}function we(S){i&&i(S)}function m(S){var R=ce(),U=S.iconClass||R.iconClass;if(typeof S.optionsOverride<"u"&&(R=n.extend(R,S.optionsOverride),U=S.optionsOverride.iconClass||U),N(R,S))return;o++,r=h(R,!0);var ee=null,J=n("<div/>"),be=n("<div/>"),je=n("<div/>"),Ne=n("<div/>"),z=n(R.closeHtml),ie={intervalId:null,hideEta:null,maxHideTime:null},fe={toastId:o,state:"visible",startTime:new Date,options:R,map:S};return Ve(),Te(),me(),we(fe),R.debug&&console&&console.log(fe),J;function rt(X){return X==null&&(X=""),X.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function Ve(){Ae(),He(),Xe(),Le(),it(),mt(),Oe(),ne()}function ne(){var X="";switch(S.iconClass){case"toast-success":case"toast-info":X="polite";break;default:X="assertive"}J.attr("aria-live",X)}function me(){R.closeOnHover&&J.hover(te,G),!R.onclick&&R.tapToDismiss&&J.click($),R.closeButton&&z&&z.click(function(X){X.stopPropagation?X.stopPropagation():X.cancelBubble!==void 0&&X.cancelBubble!==!0&&(X.cancelBubble=!0),R.onCloseClick&&R.onCloseClick(X),$(!0)}),R.onclick&&J.click(function(X){R.onclick(X),$()})}function Te(){J.hide(),J[R.showMethod]({duration:R.showDuration,easing:R.showEasing,complete:R.onShown}),R.timeOut>0&&(ee=setTimeout($,R.timeOut),ie.maxHideTime=parseFloat(R.timeOut),ie.hideEta=new Date().getTime()+ie.maxHideTime,R.progressBar&&(ie.intervalId=setInterval(K,10)))}function Ae(){S.iconClass&&J.addClass(R.toastClass).addClass(U)}function Oe(){R.newestOnTop?r.prepend(J):r.append(J)}function He(){if(S.title){var X=S.title;R.escapeHtml&&(X=rt(S.title)),be.append(X).addClass(R.titleClass),J.append(be)}}function Xe(){if(S.message){var X=S.message;R.escapeHtml&&(X=rt(S.message)),je.append(X).addClass(R.messageClass),J.append(je)}}function Le(){R.closeButton&&(z.addClass(R.closeClass).attr("role","button"),J.prepend(z))}function it(){R.progressBar&&(Ne.addClass(R.progressClass),J.prepend(Ne))}function mt(){R.rtl&&J.addClass("rtl")}function N(X,Ce){if(X.preventDuplicates){if(Ce.message===c)return!0;c=Ce.message}return!1}function $(X){var Ce=X&&R.closeMethod!==!1?R.closeMethod:R.hideMethod,de=X&&R.closeDuration!==!1?R.closeDuration:R.hideDuration,ve=X&&R.closeEasing!==!1?R.closeEasing:R.hideEasing;if(!(n(":focus",J).length&&!X))return clearTimeout(ie.intervalId),J[Ce]({duration:de,easing:ve,complete:function(){D(J),clearTimeout(ee),R.onHidden&&fe.state!=="hidden"&&R.onHidden(),fe.state="hidden",fe.endTime=new Date,we(fe)}})}function G(){(R.timeOut>0||R.extendedTimeOut>0)&&(ee=setTimeout($,R.extendedTimeOut),ie.maxHideTime=parseFloat(R.extendedTimeOut),ie.hideEta=new Date().getTime()+ie.maxHideTime)}function te(){clearTimeout(ee),ie.hideEta=0,J.stop(!0,!0)[R.showMethod]({duration:R.showDuration,easing:R.showEasing})}function K(){var X=(ie.hideEta-new Date().getTime())/ie.maxHideTime*100;Ne.width(X+"%")}}function ce(){return n.extend({},L(),l.options)}function D(S){r||(r=h()),!S.is(":visible")&&(S.remove(),S=null,r.children().length===0&&(r.remove(),c=void 0))}}()})})(function(t,n){e.exports?e.exports=n(bB()):window.toastr=n(window.jQuery)})})(c0);var CB=c0.exports;const _B=El(CB);var d0={exports:{}};/*!
|
||
* clipboard.js v2.0.11
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/(function(e,t){(function(r,i){e.exports=i()})(Wc,function(){return function(){var n={686:function(o,s,l){l.d(s,{default:function(){return Ve}});var c=l(279),d=l.n(c),h=l(370),p=l.n(h),b=l(817),y=l.n(b);function w(ne){try{return document.execCommand(ne)}catch{return!1}}var T=function(me){var Te=y()(me);return w("cut"),Te},O=T;function I(ne){var me=document.documentElement.getAttribute("dir")==="rtl",Te=document.createElement("textarea");Te.style.fontSize="12pt",Te.style.border="0",Te.style.padding="0",Te.style.margin="0",Te.style.position="absolute",Te.style[me?"right":"left"]="-9999px";var Ae=window.pageYOffset||document.documentElement.scrollTop;return Te.style.top="".concat(Ae,"px"),Te.setAttribute("readonly",""),Te.value=ne,Te}var P=function(me,Te){var Ae=I(me);Te.container.appendChild(Ae);var Oe=y()(Ae);return w("copy"),Ae.remove(),Oe},j=function(me){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Ae="";return typeof me=="string"?Ae=P(me,Te):me instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(me==null?void 0:me.type)?Ae=P(me.value,Te):(Ae=y()(me),w("copy")),Ae},L=j;function we(ne){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?we=function(Te){return typeof Te}:we=function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},we(ne)}var m=function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Te=me.action,Ae=Te===void 0?"copy":Te,Oe=me.container,He=me.target,Xe=me.text;if(Ae!=="copy"&&Ae!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(He!==void 0)if(He&&we(He)==="object"&&He.nodeType===1){if(Ae==="copy"&&He.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Ae==="cut"&&(He.hasAttribute("readonly")||He.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(Xe)return L(Xe,{container:Oe});if(He)return Ae==="cut"?O(He):L(He,{container:Oe})},ce=m;function D(ne){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(Te){return typeof Te}:D=function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},D(ne)}function S(ne,me){if(!(ne instanceof me))throw new TypeError("Cannot call a class as a function")}function R(ne,me){for(var Te=0;Te<me.length;Te++){var Ae=me[Te];Ae.enumerable=Ae.enumerable||!1,Ae.configurable=!0,"value"in Ae&&(Ae.writable=!0),Object.defineProperty(ne,Ae.key,Ae)}}function U(ne,me,Te){return me&&R(ne.prototype,me),Te&&R(ne,Te),ne}function ee(ne,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function");ne.prototype=Object.create(me&&me.prototype,{constructor:{value:ne,writable:!0,configurable:!0}}),me&&J(ne,me)}function J(ne,me){return J=Object.setPrototypeOf||function(Ae,Oe){return Ae.__proto__=Oe,Ae},J(ne,me)}function be(ne){var me=z();return function(){var Ae=ie(ne),Oe;if(me){var He=ie(this).constructor;Oe=Reflect.construct(Ae,arguments,He)}else Oe=Ae.apply(this,arguments);return je(this,Oe)}}function je(ne,me){return me&&(D(me)==="object"||typeof me=="function")?me:Ne(ne)}function Ne(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function z(){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 ie(ne){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(Te){return Te.__proto__||Object.getPrototypeOf(Te)},ie(ne)}function fe(ne,me){var Te="data-clipboard-".concat(ne);if(me.hasAttribute(Te))return me.getAttribute(Te)}var rt=function(ne){ee(Te,ne);var me=be(Te);function Te(Ae,Oe){var He;return S(this,Te),He=me.call(this),He.resolveOptions(Oe),He.listenClick(Ae),He}return U(Te,[{key:"resolveOptions",value:function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Oe.action=="function"?Oe.action:this.defaultAction,this.target=typeof Oe.target=="function"?Oe.target:this.defaultTarget,this.text=typeof Oe.text=="function"?Oe.text:this.defaultText,this.container=D(Oe.container)==="object"?Oe.container:document.body}},{key:"listenClick",value:function(Oe){var He=this;this.listener=p()(Oe,"click",function(Xe){return He.onClick(Xe)})}},{key:"onClick",value:function(Oe){var He=Oe.delegateTarget||Oe.currentTarget,Xe=this.action(He)||"copy",Le=ce({action:Xe,container:this.container,target:this.target(He),text:this.text(He)});this.emit(Le?"success":"error",{action:Xe,text:Le,trigger:He,clearSelection:function(){He&&He.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Oe){return fe("action",Oe)}},{key:"defaultTarget",value:function(Oe){var He=fe("target",Oe);if(He)return document.querySelector(He)}},{key:"defaultText",value:function(Oe){return fe("text",Oe)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Oe){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return L(Oe,He)}},{key:"cut",value:function(Oe){return O(Oe)}},{key:"isSupported",value:function(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],He=typeof Oe=="string"?[Oe]:Oe,Xe=!!document.queryCommandSupported;return He.forEach(function(Le){Xe=Xe&&!!document.queryCommandSupported(Le)}),Xe}}]),Te}(d()),Ve=rt},828:function(o){var s=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 c(d,h){for(;d&&d.nodeType!==s;){if(typeof d.matches=="function"&&d.matches(h))return d;d=d.parentNode}}o.exports=c},438:function(o,s,l){var c=l(828);function d(b,y,w,T,O){var I=p.apply(this,arguments);return b.addEventListener(w,I,O),{destroy:function(){b.removeEventListener(w,I,O)}}}function h(b,y,w,T,O){return typeof b.addEventListener=="function"?d.apply(null,arguments):typeof w=="function"?d.bind(null,document).apply(null,arguments):(typeof b=="string"&&(b=document.querySelectorAll(b)),Array.prototype.map.call(b,function(I){return d(I,y,w,T,O)}))}function p(b,y,w,T){return function(O){O.delegateTarget=c(O.target,y),O.delegateTarget&&T.call(b,O)}}o.exports=h},879:function(o,s){s.node=function(l){return l!==void 0&&l instanceof HTMLElement&&l.nodeType===1},s.nodeList=function(l){var c=Object.prototype.toString.call(l);return l!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in l&&(l.length===0||s.node(l[0]))},s.string=function(l){return typeof l=="string"||l instanceof String},s.fn=function(l){var c=Object.prototype.toString.call(l);return c==="[object Function]"}},370:function(o,s,l){var c=l(879),d=l(438);function h(w,T,O){if(!w&&!T&&!O)throw new Error("Missing required arguments");if(!c.string(T))throw new TypeError("Second argument must be a String");if(!c.fn(O))throw new TypeError("Third argument must be a Function");if(c.node(w))return p(w,T,O);if(c.nodeList(w))return b(w,T,O);if(c.string(w))return y(w,T,O);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function p(w,T,O){return w.addEventListener(T,O),{destroy:function(){w.removeEventListener(T,O)}}}function b(w,T,O){return Array.prototype.forEach.call(w,function(I){I.addEventListener(T,O)}),{destroy:function(){Array.prototype.forEach.call(w,function(I){I.removeEventListener(T,O)})}}}function y(w,T,O){return d(document.body,w,T,O)}o.exports=h},817:function(o){function s(l){var c;if(l.nodeName==="SELECT")l.focus(),c=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"),c=l.value}else{l.hasAttribute("contenteditable")&&l.focus();var h=window.getSelection(),p=document.createRange();p.selectNodeContents(l),h.removeAllRanges(),h.addRange(p),c=h.toString()}return c}o.exports=s},279:function(o){function s(){}s.prototype={on:function(l,c,d){var h=this.e||(this.e={});return(h[l]||(h[l]=[])).push({fn:c,ctx:d}),this},once:function(l,c,d){var h=this;function p(){h.off(l,p),c.apply(d,arguments)}return p._=c,this.on(l,p,d)},emit:function(l){var c=[].slice.call(arguments,1),d=((this.e||(this.e={}))[l]||[]).slice(),h=0,p=d.length;for(h;h<p;h++)d[h].fn.apply(d[h].ctx,c);return this},off:function(l,c){var d=this.e||(this.e={}),h=d[l],p=[];if(h&&c)for(var b=0,y=h.length;b<y;b++)h[b].fn!==c&&h[b].fn._!==c&&p.push(h[b]);return p.length?d[l]=p:delete d[l],this}},o.exports=s,o.exports.TinyEmitter=s}},r={};function i(o){if(r[o])return r[o].exports;var s=r[o]={exports:{}};return n[o](s,s.exports,i),s.exports}return function(){i.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(s,{a:s}),s}}(),function(){i.d=function(o,s){for(var l in s)i.o(s,l)&&!i.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:s[l]})}}(),function(){i.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)}}(),i(686)}().default})})(d0);var wB=d0.exports;const TB=El(wB),xB=e=>{const t=(e==null?void 0:e.appendToBody)===void 0?!0:e.appendToBody;return{toClipboard(n,r){return new Promise((i,o)=>{const s=document.createElement("button"),l=new TB(s,{text:()=>n,action:()=>"copy",container:r!==void 0?r:document.body});l.on("success",c=>{l.destroy(),i(c)}),l.on("error",c=>{l.destroy(),o(c)}),t&&document.body.appendChild(s),s.click(),t&&document.body.removeChild(s)})}}};function p0(e,t){return function(){return e.apply(t,arguments)}}const{toString:kB}=Object.prototype,{getPrototypeOf:xd}=Object,mu=(e=>t=>{const n=kB.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),$r=e=>(e=e.toLowerCase(),t=>mu(t)===e),vu=e=>t=>typeof t===e,{isArray:os}=Array,ba=vu("undefined");function SB(e){return e!==null&&!ba(e)&&e.constructor!==null&&!ba(e.constructor)&&pr(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h0=$r("ArrayBuffer");function AB(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&h0(e.buffer),t}const EB=vu("string"),pr=vu("function"),g0=vu("number"),yu=e=>e!==null&&typeof e=="object",OB=e=>e===!0||e===!1,bu=e=>{if(mu(e)!=="object")return!1;const t=xd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},LB=$r("Date"),IB=$r("File"),PB=$r("Blob"),DB=$r("FileList"),RB=e=>yu(e)&&pr(e.pipe),NB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pr(e.append)&&((t=mu(e))==="formdata"||t==="object"&&pr(e.toString)&&e.toString()==="[object FormData]"))},MB=$r("URLSearchParams"),FB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ca(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),os(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let l;for(r=0;r<s;r++)l=o[r],t.call(null,e[l],l,e)}}function m0(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const v0=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),y0=e=>!ba(e)&&e!==v0;function kd(){const{caseless:e}=y0(this)&&this||{},t={},n=(r,i)=>{const o=e&&m0(t,i)||i;bu(t[o])&&bu(r)?t[o]=kd(t[o],r):bu(r)?t[o]=kd({},r):os(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Ca(arguments[r],n);return t}const $B=(e,t,n,{allOwnKeys:r}={})=>(Ca(t,(i,o)=>{n&&pr(i)?e[o]=p0(i,n):e[o]=i},{allOwnKeys:r}),e),BB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),HB=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},jB=(e,t,n,r)=>{let i,o,s;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&xd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},UB=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},WB=e=>{if(!e)return null;if(os(e))return e;let t=e.length;if(!g0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},KB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&xd(Uint8Array)),VB=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},qB=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zB=$r("HTMLFormElement"),GB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),b0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),YB=$r("RegExp"),C0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ca(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},XB=e=>{C0(e,(t,n)=>{if(pr(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pr(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},JB=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return os(e)?r(e):r(String(e).split(t)),n},ZB=()=>{},QB=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Sd="abcdefghijklmnopqrstuvwxyz",_0="0123456789",w0={DIGIT:_0,ALPHA:Sd,ALPHA_DIGIT:Sd+Sd.toUpperCase()+_0},eH=(e=16,t=w0.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function tH(e){return!!(e&&pr(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const nH=e=>{const t=new Array(10),n=(r,i)=>{if(yu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=os(r)?[]:{};return Ca(r,(s,l)=>{const c=n(s,i+1);!ba(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},rH=$r("AsyncFunction"),ae={isArray:os,isArrayBuffer:h0,isBuffer:SB,isFormData:NB,isArrayBufferView:AB,isString:EB,isNumber:g0,isBoolean:OB,isObject:yu,isPlainObject:bu,isUndefined:ba,isDate:LB,isFile:IB,isBlob:PB,isRegExp:YB,isFunction:pr,isStream:RB,isURLSearchParams:MB,isTypedArray:KB,isFileList:DB,forEach:Ca,merge:kd,extend:$B,trim:FB,stripBOM:BB,inherits:HB,toFlatObject:jB,kindOf:mu,kindOfTest:$r,endsWith:UB,toArray:WB,forEachEntry:VB,matchAll:qB,isHTMLForm:zB,hasOwnProperty:b0,hasOwnProp:b0,reduceDescriptors:C0,freezeMethods:XB,toObjectSet:JB,toCamelCase:GB,noop:ZB,toFiniteNumber:QB,findKey:m0,global:v0,isContextDefined:y0,ALPHABET:w0,generateString:eH,isSpecCompliantForm:tH,toJSONObject:nH,isAsyncFn:rH,isThenable:e=>e&&(yu(e)||pr(e))&&pr(e.then)&&pr(e.catch)};function Tt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}ae.inherits(Tt,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:ae.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const T0=Tt.prototype,x0={};["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=>{x0[e]={value:e}}),Object.defineProperties(Tt,x0),Object.defineProperty(T0,"isAxiosError",{value:!0}),Tt.from=(e,t,n,r,i,o)=>{const s=Object.create(T0);return ae.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),Tt.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const iH=null;function Ad(e){return ae.isPlainObject(e)||ae.isArray(e)}function k0(e){return ae.endsWith(e,"[]")?e.slice(0,-2):e}function S0(e,t,n){return e?e.concat(t).map(function(i,o){return i=k0(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function oH(e){return ae.isArray(e)&&!e.some(Ad)}const sH=ae.toFlatObject(ae,{},null,function(t){return/^is[A-Z]/.test(t)});function Cu(e,t,n){if(!ae.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,O){return!ae.isUndefined(O[T])});const r=n.metaTokens,i=n.visitor||h,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&ae.isSpecCompliantForm(t);if(!ae.isFunction(i))throw new TypeError("visitor must be a function");function d(w){if(w===null)return"";if(ae.isDate(w))return w.toISOString();if(!c&&ae.isBlob(w))throw new Tt("Blob is not supported. Use a Buffer instead.");return ae.isArrayBuffer(w)||ae.isTypedArray(w)?c&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,T,O){let I=w;if(w&&!O&&typeof w=="object"){if(ae.endsWith(T,"{}"))T=r?T:T.slice(0,-2),w=JSON.stringify(w);else if(ae.isArray(w)&&oH(w)||(ae.isFileList(w)||ae.endsWith(T,"[]"))&&(I=ae.toArray(w)))return T=k0(T),I.forEach(function(j,L){!(ae.isUndefined(j)||j===null)&&t.append(s===!0?S0([T],L,o):s===null?T:T+"[]",d(j))}),!1}return Ad(w)?!0:(t.append(S0(O,T,o),d(w)),!1)}const p=[],b=Object.assign(sH,{defaultVisitor:h,convertValue:d,isVisitable:Ad});function y(w,T){if(!ae.isUndefined(w)){if(p.indexOf(w)!==-1)throw Error("Circular reference detected in "+T.join("."));p.push(w),ae.forEach(w,function(I,P){(!(ae.isUndefined(I)||I===null)&&i.call(t,I,ae.isString(P)?P.trim():P,T,b))===!0&&y(I,T?T.concat(P):[P])}),p.pop()}}if(!ae.isObject(e))throw new TypeError("data must be an object");return y(e),t}function A0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ed(e,t){this._pairs=[],e&&Cu(e,this,t)}const E0=Ed.prototype;E0.append=function(t,n){this._pairs.push([t,n])},E0.toString=function(t){const n=t?function(r){return t.call(this,r,A0)}:A0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function aH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function O0(e,t,n){if(!t)return e;const r=n&&n.encode||aH,i=n&&n.serialize;let o;if(i?o=i(t,n):o=ae.isURLSearchParams(t)?t.toString():new Ed(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class lH{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ae.forEach(this.handlers,function(r){r!==null&&t(r)})}}const L0=lH,I0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uH=typeof URLSearchParams<"u"?URLSearchParams:Ed,cH=typeof FormData<"u"?FormData:null,fH=typeof Blob<"u"?Blob:null,dH=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),pH=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Br={isBrowser:!0,classes:{URLSearchParams:uH,FormData:cH,Blob:fH},isStandardBrowserEnv:dH,isStandardBrowserWebWorkerEnv:pH,protocols:["http","https","file","blob","url","data"]};function hH(e,t){return Cu(e,new Br.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Br.isNode&&ae.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function gH(e){return ae.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function mH(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function P0(e){function t(n,r,i,o){let s=n[o++];const l=Number.isFinite(+s),c=o>=n.length;return s=!s&&ae.isArray(i)?i.length:s,c?(ae.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!ae.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&ae.isArray(i[s])&&(i[s]=mH(i[s])),!l)}if(ae.isFormData(e)&&ae.isFunction(e.entries)){const n={};return ae.forEachEntry(e,(r,i)=>{t(gH(r),i,n,0)}),n}return null}const vH={"Content-Type":void 0};function yH(e,t,n){if(ae.isString(e))try{return(t||JSON.parse)(e),ae.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _u={transitional:I0,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ae.isObject(t);if(o&&ae.isHTMLForm(t)&&(t=new FormData(t)),ae.isFormData(t))return i&&i?JSON.stringify(P0(t)):t;if(ae.isArrayBuffer(t)||ae.isBuffer(t)||ae.isStream(t)||ae.isFile(t)||ae.isBlob(t))return t;if(ae.isArrayBufferView(t))return t.buffer;if(ae.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return hH(t,this.formSerializer).toString();if((l=ae.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Cu(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),yH(t)):t}],transformResponse:[function(t){const n=this.transitional||_u.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&ae.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?Tt.from(l,Tt.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:Br.classes.FormData,Blob:Br.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ae.forEach(["delete","get","head"],function(t){_u.headers[t]={}}),ae.forEach(["post","put","patch"],function(t){_u.headers[t]=ae.merge(vH)});const Od=_u,bH=ae.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"]),CH=e=>{const t={};let n,r,i;return e&&e.split(`
|
||
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&bH[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},D0=Symbol("internals");function _a(e){return e&&String(e).trim().toLowerCase()}function wu(e){return e===!1||e==null?e:ae.isArray(e)?e.map(wu):String(e)}function _H(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const wH=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ld(e,t,n,r,i){if(ae.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ae.isString(t)){if(ae.isString(r))return t.indexOf(r)!==-1;if(ae.isRegExp(r))return r.test(t)}}function TH(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function xH(e,t){const n=ae.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class Tu{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,c,d){const h=_a(c);if(!h)throw new Error("header name must be a non-empty string");const p=ae.findKey(i,h);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||c]=wu(l))}const s=(l,c)=>ae.forEach(l,(d,h)=>o(d,h,c));return ae.isPlainObject(t)||t instanceof this.constructor?s(t,n):ae.isString(t)&&(t=t.trim())&&!wH(t)?s(CH(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=_a(t),t){const r=ae.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return _H(i);if(ae.isFunction(n))return n.call(this,i,r);if(ae.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_a(t),t){const r=ae.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ld(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=_a(s),s){const l=ae.findKey(r,s);l&&(!n||Ld(r,r[l],l,n))&&(delete r[l],i=!0)}}return ae.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ld(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return ae.forEach(this,(i,o)=>{const s=ae.findKey(r,o);if(s){n[s]=wu(i),delete n[o];return}const l=t?TH(o):String(o).trim();l!==o&&delete n[o],n[l]=wu(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ae.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ae.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[D0]=this[D0]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=_a(s);r[l]||(xH(i,s),r[l]=!0)}return ae.isArray(t)?t.forEach(o):o(t),this}}Tu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ae.freezeMethods(Tu.prototype),ae.freezeMethods(Tu);const ni=Tu;function Id(e,t){const n=this||Od,r=t||n,i=ni.from(r.headers);let o=r.data;return ae.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function R0(e){return!!(e&&e.__CANCEL__)}function wa(e,t,n){Tt.call(this,e??"canceled",Tt.ERR_CANCELED,t,n),this.name="CanceledError"}ae.inherits(wa,Tt,{__CANCEL__:!0});function kH(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Tt("Request failed with status code "+n.status,[Tt.ERR_BAD_REQUEST,Tt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const SH=Br.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,l){const c=[];c.push(n+"="+encodeURIComponent(r)),ae.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),ae.isString(o)&&c.push("path="+o),ae.isString(s)&&c.push("domain="+s),l===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function AH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function EH(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function N0(e,t){return e&&!AH(t)?EH(e,t):t}const OH=Br.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const l=ae.isString(s)?i(s):s;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function LH(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function IH(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),h=r[o];s||(s=d),n[i]=c,r[i]=d;let p=o,b=0;for(;p!==i;)b+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-s<t)return;const y=h&&d-h;return y?Math.round(b*1e3/y):void 0}}function M0(e,t){let n=0;const r=IH(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,l=o-n,c=r(l),d=o<=s;n=o;const h={loaded:o,total:s,progress:s?o/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&d?(s-o)/c:void 0,event:i};h[t?"download":"upload"]=!0,e(h)}}const xu={http:iH,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=ni.from(e.headers).normalize(),s=e.responseType;let l;function c(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}ae.isFormData(i)&&(Br.isStandardBrowserEnv||Br.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let d=new XMLHttpRequest;if(e.auth){const y=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(y+":"+w))}const h=N0(e.baseURL,e.url);d.open(e.method.toUpperCase(),O0(h,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function p(){if(!d)return;const y=ni.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:y,config:e,request:d};kH(function(I){n(I),c()},function(I){r(I),c()},T),d=null}if("onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(r(new Tt("Request aborted",Tt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new Tt("Network Error",Tt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const T=e.transitional||I0;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),r(new Tt(w,T.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,e,d)),d=null},Br.isStandardBrowserEnv){const y=(e.withCredentials||OH(h))&&e.xsrfCookieName&&SH.read(e.xsrfCookieName);y&&o.set(e.xsrfHeaderName,y)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&ae.forEach(o.toJSON(),function(w,T){d.setRequestHeader(T,w)}),ae.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),s&&s!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",M0(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",M0(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=y=>{d&&(r(!y||y.type?new wa(null,e,d):y),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const b=LH(h);if(b&&Br.protocols.indexOf(b)===-1){r(new Tt("Unsupported protocol "+b+":",Tt.ERR_BAD_REQUEST,e));return}d.send(i||null)})}};ae.forEach(xu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const PH={getAdapter:e=>{e=ae.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=ae.isString(n)?xu[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new Tt(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ae.hasOwnProp(xu,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ae.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:xu};function Pd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wa(null,e)}function F0(e){return Pd(e),e.headers=ni.from(e.headers),e.data=Id.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),PH.getAdapter(e.adapter||Od.adapter)(e).then(function(r){return Pd(e),r.data=Id.call(e,e.transformResponse,r),r.headers=ni.from(r.headers),r},function(r){return R0(r)||(Pd(e),r&&r.response&&(r.response.data=Id.call(e,e.transformResponse,r.response),r.response.headers=ni.from(r.response.headers))),Promise.reject(r)})}const $0=e=>e instanceof ni?e.toJSON():e;function ss(e,t){t=t||{};const n={};function r(d,h,p){return ae.isPlainObject(d)&&ae.isPlainObject(h)?ae.merge.call({caseless:p},d,h):ae.isPlainObject(h)?ae.merge({},h):ae.isArray(h)?h.slice():h}function i(d,h,p){if(ae.isUndefined(h)){if(!ae.isUndefined(d))return r(void 0,d,p)}else return r(d,h,p)}function o(d,h){if(!ae.isUndefined(h))return r(void 0,h)}function s(d,h){if(ae.isUndefined(h)){if(!ae.isUndefined(d))return r(void 0,d)}else return r(void 0,h)}function l(d,h,p){if(p in t)return r(d,h);if(p in e)return r(void 0,d)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(d,h)=>i($0(d),$0(h),!0)};return ae.forEach(Object.keys(Object.assign({},e,t)),function(h){const p=c[h]||i,b=p(e[h],t[h],h);ae.isUndefined(b)&&p!==l||(n[h]=b)}),n}const B0="1.4.0",Dd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Dd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const H0={};Dd.transitional=function(t,n,r){function i(o,s){return"[Axios v"+B0+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,l)=>{if(t===!1)throw new Tt(i(s," has been removed"+(n?" in "+n:"")),Tt.ERR_DEPRECATED);return n&&!H0[s]&&(H0[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,l):!0}};function DH(e,t,n){if(typeof e!="object")throw new Tt("options must be an object",Tt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const l=e[o],c=l===void 0||s(l,o,e);if(c!==!0)throw new Tt("option "+o+" must be "+c,Tt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Tt("Unknown option "+o,Tt.ERR_BAD_OPTION)}}const Rd={assertOptions:DH,validators:Dd},xi=Rd.validators;class ku{constructor(t){this.defaults=t,this.interceptors={request:new L0,response:new L0}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ss(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Rd.assertOptions(r,{silentJSONParsing:xi.transitional(xi.boolean),forcedJSONParsing:xi.transitional(xi.boolean),clarifyTimeoutError:xi.transitional(xi.boolean)},!1),i!=null&&(ae.isFunction(i)?n.paramsSerializer={serialize:i}:Rd.assertOptions(i,{encode:xi.function,serialize:xi.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&ae.merge(o.common,o[n.method]),s&&ae.forEach(["delete","get","head","post","put","patch","common"],w=>{delete o[w]}),n.headers=ni.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(n)===!1||(c=c&&T.synchronous,l.unshift(T.fulfilled,T.rejected))});const d=[];this.interceptors.response.forEach(function(T){d.push(T.fulfilled,T.rejected)});let h,p=0,b;if(!c){const w=[F0.bind(this),void 0];for(w.unshift.apply(w,l),w.push.apply(w,d),b=w.length,h=Promise.resolve(n);p<b;)h=h.then(w[p++],w[p++]);return h}b=l.length;let y=n;for(p=0;p<b;){const w=l[p++],T=l[p++];try{y=w(y)}catch(O){T.call(this,O);break}}try{h=F0.call(this,y)}catch(w){return Promise.reject(w)}for(p=0,b=d.length;p<b;)h=h.then(d[p++],d[p++]);return h}getUri(t){t=ss(this.defaults,t);const n=N0(t.baseURL,t.url);return O0(n,t.params,t.paramsSerializer)}}ae.forEach(["delete","get","head","options"],function(t){ku.prototype[t]=function(n,r){return this.request(ss(r||{},{method:t,url:n,data:(r||{}).data}))}}),ae.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,l){return this.request(ss(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}ku.prototype[t]=n(),ku.prototype[t+"Form"]=n(!0)});const Su=ku;class Nd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(l=>{r.subscribe(l),o=l}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,l){r.reason||(r.reason=new wa(o,s,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Nd(function(i){t=i}),cancel:t}}}const RH=Nd;function NH(e){return function(n){return e.apply(null,n)}}function MH(e){return ae.isObject(e)&&e.isAxiosError===!0}const Md={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(Md).forEach(([e,t])=>{Md[t]=e});const FH=Md;function j0(e){const t=new Su(e),n=p0(Su.prototype.request,t);return ae.extend(n,Su.prototype,t,{allOwnKeys:!0}),ae.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return j0(ss(e,i))},n}const sn=j0(Od);sn.Axios=Su,sn.CanceledError=wa,sn.CancelToken=RH,sn.isCancel=R0,sn.VERSION=B0,sn.toFormData=Cu,sn.AxiosError=Tt,sn.Cancel=sn.CanceledError,sn.all=function(t){return Promise.all(t)},sn.spread=NH,sn.isAxiosError=MH,sn.mergeConfig=ss,sn.AxiosHeaders=ni,sn.formToJSON=e=>P0(ae.isHTMLForm(e)?new FormData(e):e),sn.HttpStatusCode=FH,sn.default=sn;const $H=sn;class BH{constructor(){$b(this,"apiBaseURL","");this.apiBaseURL=pe.apiUrl(),this.api=$H.create({baseURL:this.apiBaseURL,timeout:6e4,headers:{"Content-Type":"application/json"}})}async getVersion(){return(await this.api.get("/get_version")).data}async getRemoteVersions(t=1,n=100){return(await this.api.get("/get_remote_versions",{params:{page:t,per_page:n}})).data.versions}async getConfig(){return(await this.api.get("/get_config")).data}async installPackage(t,n){const r={timeout:1e7};return(await this.api.post("/install_package",{name:t,package:n},r)).data.result}async getExtensions(){return(await this.api.get("/get_extensions")).data.extensions}async tokenCounter(t,n){return(await this.api.post("/token_counter",{text:t,steps:n})).data}async getData(t){return(await this.api.get("/get_data",{params:{key:t}})).data.data}async getDatas(t){return typeof t=="object"&&(t=t.join(",")),(await this.api.get("/get_datas",{params:{keys:t}})).data.datas}async setData(t,n){return(await this.api.post("/set_data",{key:t,data:n})).data.success}async setDatas(t){return(await this.api.post("/set_datas",{datas:t})).data.success}async getDataListItem(t,n){return(await this.api.get("/get_data_list_item",{params:{key:t,index:n}})).data.item}async pushDataList(t,n){return(await this.api.post("/push_data_list",{key:t,item:n})).data.success}async popDataList(t){return(await this.api.post("/pop_data_list",{key:t})).data.item}async shiftDataList(t){return(await this.api.post("/shift_data_list",{key:t})).data.item}async removeDataList(t,n){return(await this.api.post("/remove_data_list",{key:t,index:n})).data.success}async clearDataList(t){return(await this.api.post("/clear_data_list",{key:t})).data.success}async getHistories(t){return(await this.api.get("/get_histories",{params:{type:t}})).data.histories}async getFavorites(t){return(await this.api.get("/get_favorites",{params:{type:t}})).data.favorites}async pushHistory(t,n,r,i=""){return(await this.api.post("/push_history",{type:t,tags:n,prompt:r,name:i})).data.success}async pushFavorite(t,n,r,i=""){return(await this.api.post("/push_favorite",{type:t,tags:n,prompt:r,name:i})).data.success}async getLatestHistory(t){return(await this.api.get("/get_latest_history",{params:{type:t}})).data.history}async setHistory(t,n,r,i,o){return(await this.api.post("/set_history",{type:t,id:n,tags:r,prompt:i,name:o})).data.success}async setHistoryName(t,n,r){return(await this.api.post("/set_history_name",{type:t,id:n,name:r})).data.success}async setFavoriteName(t,n,r){return(await this.api.post("/set_favorite_name",{type:t,id:n,name:r})).data.success}async doFavorite(t,n){return(await this.api.post("/dofavorite",{type:t,id:n})).data.success}async unFavorite(t,n){return(await this.api.post("/unfavorite",{type:t,id:n})).data.success}async deleteHistory(t,n){return(await this.api.post("/delete_history",{type:t,id:n})).data.success}async deleteHistories(t){return(await this.api.post("/delete_histories",{type:t})).data.success}async translate(t,n,r,i,o={}){let s=(await this.api.post("/translate",{text:t,from_lang:n,to_lang:r,api:i,api_config:o})).data;return s.translated_text&&(s.translated_text=pe.unescapeHtml(s.translated_text)),s}async translates(t,n,r,i,o={}){let s=(await this.api.post("/translates",{texts:t,from_lang:n,to_lang:r,api:i,api_config:o})).data;return s.translated_text&&s.translated_text.forEach((l,c)=>{s.translated_text[c]=pe.unescapeHtml(l)}),s}async getCSVs(){return(await this.api.get("/get_csvs")).data.csvs}async getCSV(t){return(await this.api.get("/get_csv",{params:{key:t}})).data}async styles(t,n=""){return(await this.api.get("/styles",{params:{file:t,hash:n}})).data}async getExtensionCssList(){return(await this.api.get("/get_extension_css_list")).data.css_list}async getExtraNetworks(){return(await this.api.get("/get_extra_networks")).data.extra_networks}async genOpenAI(t,n){return(await this.api.post("/gen_openai",{messages:t,api_config:n})).data}async mbart50Initialize(){const t={timeout:1e11};return(await this.api.post("/mbart50_initialize",{},t)).data}async getGroupTags(t){return(await this.api.get("/get_group_tags",{params:{lang:t}})).data.tags}}const HH={data(){return{gradioAPI:null}},beforeMount(){this.gradioAPI=new BH},methods:{loadExtraNetworks(){this.gradioAPI.getExtraNetworks().then(e=>{e&&(this.extraNetworks=e,e.forEach(t=>{if(t.name==="textual inversion"){let n=[];t.items.forEach(r=>{n.push(r.name)}),this.embeddings=n}else if(t.name==="lora"||t.name==="lycoris"){let n=[];t.items.forEach(r=>{n.push(r.name),r.output_name&&n.push(r.output_name)}),n=[...new Set(n)],t.name==="lora"?this.loras=n:this.lycos=n}}))})},getExtraNetworkFullName(e,t="lora"){if(typeof this.extraNetworks!="object")return e;for(let n of this.extraNetworks)if(n.name===t){for(let r of n.items)if(r.name===e||r.output_name===e)return!r.civitai_info||!r.civitai_info.name?e:r.civitai_info.model&&r.civitai_info.model.name&&r.civitai_info.model.name!==r.civitai_info.name?"["+r.civitai_info.name+"] "+r.civitai_info.model.name:r.civitai_info.name}return e},loraExists(e){if(typeof this.loras!="object")return e;for(let t in this.loras)if(this.loras[t]===e)return this.loras[t];return!1},lycoExists(e){if(typeof this.lycos!="object")return e;for(let t in this.lycos)if(this.lycos[t]===e)return this.lycos[t];return!1},embeddingExists(e){if(typeof this.embeddings!="object")return e;for(let t in this.embeddings)if(this.embeddings[t]===e)return this.embeddings[t];return!1}}};var jH="tippy-box",U0="tippy-content",UH="tippy-backdrop",W0="tippy-arrow",K0="tippy-svg-arrow",Qi={passive:!0,capture:!0},V0=function(){return document.body};function Fd(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function $d(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function q0(e,t){return typeof e=="function"?e.apply(void 0,t):e}function z0(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function WH(e){return e.split(/\s+/).filter(Boolean)}function as(e){return[].concat(e)}function G0(e,t){e.indexOf(t)===-1&&e.push(t)}function KH(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function VH(e){return e.split("-")[0]}function Au(e){return[].slice.call(e)}function Y0(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Ta(){return document.createElement("div")}function Eu(e){return["Element","Fragment"].some(function(t){return $d(e,t)})}function qH(e){return $d(e,"NodeList")}function zH(e){return $d(e,"MouseEvent")}function GH(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function YH(e){return Eu(e)?[e]:qH(e)?Au(e):Array.isArray(e)?e:Au(document.querySelectorAll(e))}function Bd(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function X0(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function XH(e){var t,n=as(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function JH(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,s=i.popperState,l=i.props,c=l.interactiveBorder,d=VH(s.placement),h=s.modifiersData.offset;if(!h)return!0;var p=d==="bottom"?h.top.y:0,b=d==="top"?h.bottom.y:0,y=d==="right"?h.left.x:0,w=d==="left"?h.right.x:0,T=o.top-r+p>c,O=r-o.bottom-b>c,I=o.left-n+y>c,P=n-o.right-w>c;return T||O||I||P})}function Hd(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function J0(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Hr={isTouch:!1},Z0=0;function ZH(){Hr.isTouch||(Hr.isTouch=!0,window.performance&&document.addEventListener("mousemove",Q0))}function Q0(){var e=performance.now();e-Z0<20&&(Hr.isTouch=!1,document.removeEventListener("mousemove",Q0)),Z0=e}function QH(){var e=document.activeElement;if(GH(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function ej(){document.addEventListener("touchstart",ZH,Qi),window.addEventListener("blur",QH)}var tj=typeof window<"u"&&typeof document<"u",nj=tj?!!window.msCrypto:!1,rj={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},ij={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},xr=Object.assign({appendTo:V0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},rj,ij),oj=Object.keys(xr),sj=function(t){var n=Object.keys(t);n.forEach(function(r){xr[r]=t[r]})};function eb(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,s=i.defaultValue;if(o){var l;r[o]=e[o]!==void 0?e[o]:(l=xr[o])!=null?l:s}return r},{});return Object.assign({},e,n)}function aj(e,t){var n=t?Object.keys(eb(Object.assign({},xr,{plugins:t}))):oj,r=n.reduce(function(i,o){var s=(e.getAttribute("data-tippy-"+o)||"").trim();if(!s)return i;if(o==="content")i[o]=s;else try{i[o]=JSON.parse(s)}catch{i[o]=s}return i},{});return r}function tb(e,t){var n=Object.assign({},t,{content:q0(t.content,[e])},t.ignoreAttributes?{}:aj(e,t.plugins));return n.aria=Object.assign({},xr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}var lj=function(){return"innerHTML"};function jd(e,t){e[lj()]=t}function nb(e){var t=Ta();return e===!0?t.className=W0:(t.className=K0,Eu(e)?t.appendChild(e):jd(t,e)),t}function rb(e,t){Eu(t.content)?(jd(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?jd(e,t.content):e.textContent=t.content)}function Ud(e){var t=e.firstElementChild,n=Au(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(U0)}),arrow:n.find(function(r){return r.classList.contains(W0)||r.classList.contains(K0)}),backdrop:n.find(function(r){return r.classList.contains(UH)})}}function ib(e){var t=Ta(),n=Ta();n.className=jH,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ta();r.className=U0,r.setAttribute("data-state","hidden"),rb(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var l=Ud(t),c=l.box,d=l.content,h=l.arrow;s.theme?c.setAttribute("data-theme",s.theme):c.removeAttribute("data-theme"),typeof s.animation=="string"?c.setAttribute("data-animation",s.animation):c.removeAttribute("data-animation"),s.inertia?c.setAttribute("data-inertia",""):c.removeAttribute("data-inertia"),c.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?c.setAttribute("role",s.role):c.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&rb(d,e.props),s.arrow?h?o.arrow!==s.arrow&&(c.removeChild(h),c.appendChild(nb(s.arrow))):c.appendChild(nb(s.arrow)):h&&c.removeChild(h)}return{popper:t,onUpdate:i}}ib.$$tippy=!0;var uj=1,Ou=[],Wd=[];function cj(e,t){var n=tb(e,Object.assign({},xr,eb(Y0(t)))),r,i,o,s=!1,l=!1,c=!1,d=!1,h,p,b,y=[],w=z0(G,n.interactiveDebounce),T,O=uj++,I=null,P=KH(n.plugins),j={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},L={id:O,reference:e,popper:Ta(),popperInstance:I,props:n,state:j,plugins:P,clearDelayTimeouts:qe,setProps:dt,setContent:lt,show:Ct,hide:Ft,hideWithInteractivity:an,enable:Me,disable:Se,unmount:Ht,destroy:fn};if(!n.render)return L;var we=n.render(L),m=we.popper,ce=we.onUpdate;m.setAttribute("data-tippy-root",""),m.id="tippy-"+L.id,L.popper=m,e._tippy=L,m._tippy=L;var D=P.map(function(Q){return Q.fn(L)}),S=e.hasAttribute("aria-expanded");return mt(),rt(),z(),ie("onCreate",[L]),n.showOnCreate&&ke(),m.addEventListener("mouseenter",function(){L.props.interactive&&L.state.isVisible&&L.clearDelayTimeouts()}),m.addEventListener("mouseleave",function(){L.props.interactive&&L.props.trigger.indexOf("mouseenter")>=0&&be().addEventListener("mousemove",w)}),L;function R(){var Q=L.props.touch;return Array.isArray(Q)?Q:[Q,0]}function U(){return R()[0]==="hold"}function ee(){var Q;return!!((Q=L.props.render)!=null&&Q.$$tippy)}function J(){return T||e}function be(){var Q=J().parentNode;return Q?XH(Q):document}function je(){return Ud(m)}function Ne(Q){return L.state.isMounted&&!L.state.isVisible||Hr.isTouch||h&&h.type==="focus"?0:Fd(L.props.delay,Q?0:1,xr.delay)}function z(Q){Q===void 0&&(Q=!1),m.style.pointerEvents=L.props.interactive&&!Q?"":"none",m.style.zIndex=""+L.props.zIndex}function ie(Q,Re,Fe){if(Fe===void 0&&(Fe=!0),D.forEach(function(yt){yt[Q]&&yt[Q].apply(yt,Re)}),Fe){var ot;(ot=L.props)[Q].apply(ot,Re)}}function fe(){var Q=L.props.aria;if(Q.content){var Re="aria-"+Q.content,Fe=m.id,ot=as(L.props.triggerTarget||e);ot.forEach(function(yt){var gn=yt.getAttribute(Re);if(L.state.isVisible)yt.setAttribute(Re,gn?gn+" "+Fe:Fe);else{var In=gn&&gn.replace(Fe,"").trim();In?yt.setAttribute(Re,In):yt.removeAttribute(Re)}})}}function rt(){if(!(S||!L.props.aria.expanded)){var Q=as(L.props.triggerTarget||e);Q.forEach(function(Re){L.props.interactive?Re.setAttribute("aria-expanded",L.state.isVisible&&Re===J()?"true":"false"):Re.removeAttribute("aria-expanded")})}}function Ve(){be().removeEventListener("mousemove",w),Ou=Ou.filter(function(Q){return Q!==w})}function ne(Q){if(!(Hr.isTouch&&(c||Q.type==="mousedown"))){var Re=Q.composedPath&&Q.composedPath()[0]||Q.target;if(!(L.props.interactive&&J0(m,Re))){if(as(L.props.triggerTarget||e).some(function(Fe){return J0(Fe,Re)})){if(Hr.isTouch||L.state.isVisible&&L.props.trigger.indexOf("click")>=0)return}else ie("onClickOutside",[L,Q]);L.props.hideOnClick===!0&&(L.clearDelayTimeouts(),L.hide(),l=!0,setTimeout(function(){l=!1}),L.state.isMounted||Oe())}}}function me(){c=!0}function Te(){c=!1}function Ae(){var Q=be();Q.addEventListener("mousedown",ne,!0),Q.addEventListener("touchend",ne,Qi),Q.addEventListener("touchstart",Te,Qi),Q.addEventListener("touchmove",me,Qi)}function Oe(){var Q=be();Q.removeEventListener("mousedown",ne,!0),Q.removeEventListener("touchend",ne,Qi),Q.removeEventListener("touchstart",Te,Qi),Q.removeEventListener("touchmove",me,Qi)}function He(Q,Re){Le(Q,function(){!L.state.isVisible&&m.parentNode&&m.parentNode.contains(m)&&Re()})}function Xe(Q,Re){Le(Q,Re)}function Le(Q,Re){var Fe=je().box;function ot(yt){yt.target===Fe&&(Hd(Fe,"remove",ot),Re())}if(Q===0)return Re();Hd(Fe,"remove",p),Hd(Fe,"add",ot),p=ot}function it(Q,Re,Fe){Fe===void 0&&(Fe=!1);var ot=as(L.props.triggerTarget||e);ot.forEach(function(yt){yt.addEventListener(Q,Re,Fe),y.push({node:yt,eventType:Q,handler:Re,options:Fe})})}function mt(){U()&&(it("touchstart",$,{passive:!0}),it("touchend",te,{passive:!0})),WH(L.props.trigger).forEach(function(Q){if(Q!=="manual")switch(it(Q,$),Q){case"mouseenter":it("mouseleave",te);break;case"focus":it(nj?"focusout":"blur",K);break;case"focusin":it("focusout",K);break}})}function N(){y.forEach(function(Q){var Re=Q.node,Fe=Q.eventType,ot=Q.handler,yt=Q.options;Re.removeEventListener(Fe,ot,yt)}),y=[]}function $(Q){var Re,Fe=!1;if(!(!L.state.isEnabled||X(Q)||l)){var ot=((Re=h)==null?void 0:Re.type)==="focus";h=Q,T=Q.currentTarget,rt(),!L.state.isVisible&&zH(Q)&&Ou.forEach(function(yt){return yt(Q)}),Q.type==="click"&&(L.props.trigger.indexOf("mouseenter")<0||s)&&L.props.hideOnClick!==!1&&L.state.isVisible?Fe=!0:ke(Q),Q.type==="click"&&(s=!Fe),Fe&&!ot&&_e(Q)}}function G(Q){var Re=Q.target,Fe=J().contains(Re)||m.contains(Re);if(!(Q.type==="mousemove"&&Fe)){var ot=se().concat(m).map(function(yt){var gn,In=yt._tippy,ri=(gn=In.popperInstance)==null?void 0:gn.state;return ri?{popperRect:yt.getBoundingClientRect(),popperState:ri,props:n}:null}).filter(Boolean);JH(ot,Q)&&(Ve(),_e(Q))}}function te(Q){var Re=X(Q)||L.props.trigger.indexOf("click")>=0&&s;if(!Re){if(L.props.interactive){L.hideWithInteractivity(Q);return}_e(Q)}}function K(Q){L.props.trigger.indexOf("focusin")<0&&Q.target!==J()||L.props.interactive&&Q.relatedTarget&&m.contains(Q.relatedTarget)||_e(Q)}function X(Q){return Hr.isTouch?U()!==Q.type.indexOf("touch")>=0:!1}function Ce(){de();var Q=L.props,Re=Q.popperOptions,Fe=Q.placement,ot=Q.offset,yt=Q.getReferenceClientRect,gn=Q.moveTransition,In=ee()?Ud(m).arrow:null,ri=yt?{getBoundingClientRect:yt,contextElement:yt.contextElement||J()}:e,ii={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ls){var jr=ls.state;if(ee()){var us=je(),Sa=us.box;["placement","reference-hidden","escaped"].forEach(function(cs){cs==="placement"?Sa.setAttribute("data-placement",jr.placement):jr.attributes.popper["data-popper-"+cs]?Sa.setAttribute("data-"+cs,""):Sa.removeAttribute("data-"+cs)}),jr.attributes.popper={}}}},Hn=[{name:"offset",options:{offset:ot}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!gn}},ii];ee()&&In&&Hn.push({name:"arrow",options:{element:In,padding:3}}),Hn.push.apply(Hn,(Re==null?void 0:Re.modifiers)||[]),L.popperInstance=Jg(ri,m,Object.assign({},Re,{placement:Fe,onFirstUpdate:b,modifiers:Hn}))}function de(){L.popperInstance&&(L.popperInstance.destroy(),L.popperInstance=null)}function ve(){var Q=L.props.appendTo,Re,Fe=J();L.props.interactive&&Q===V0||Q==="parent"?Re=Fe.parentNode:Re=q0(Q,[Fe]),Re.contains(m)||Re.appendChild(m),L.state.isMounted=!0,Ce()}function se(){return Au(m.querySelectorAll("[data-tippy-root]"))}function ke(Q){L.clearDelayTimeouts(),Q&&ie("onTrigger",[L,Q]),Ae();var Re=Ne(!0),Fe=R(),ot=Fe[0],yt=Fe[1];Hr.isTouch&&ot==="hold"&&yt&&(Re=yt),Re?r=setTimeout(function(){L.show()},Re):L.show()}function _e(Q){if(L.clearDelayTimeouts(),ie("onUntrigger",[L,Q]),!L.state.isVisible){Oe();return}if(!(L.props.trigger.indexOf("mouseenter")>=0&&L.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(Q.type)>=0&&s)){var Re=Ne(!1);Re?i=setTimeout(function(){L.state.isVisible&&L.hide()},Re):o=requestAnimationFrame(function(){L.hide()})}}function Me(){L.state.isEnabled=!0}function Se(){L.hide(),L.state.isEnabled=!1}function qe(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function dt(Q){if(!L.state.isDestroyed){ie("onBeforeUpdate",[L,Q]),N();var Re=L.props,Fe=tb(e,Object.assign({},Re,Y0(Q),{ignoreAttributes:!0}));L.props=Fe,mt(),Re.interactiveDebounce!==Fe.interactiveDebounce&&(Ve(),w=z0(G,Fe.interactiveDebounce)),Re.triggerTarget&&!Fe.triggerTarget?as(Re.triggerTarget).forEach(function(ot){ot.removeAttribute("aria-expanded")}):Fe.triggerTarget&&e.removeAttribute("aria-expanded"),rt(),z(),ce&&ce(Re,Fe),L.popperInstance&&(Ce(),se().forEach(function(ot){requestAnimationFrame(ot._tippy.popperInstance.forceUpdate)})),ie("onAfterUpdate",[L,Q])}}function lt(Q){L.setProps({content:Q})}function Ct(){var Q=L.state.isVisible,Re=L.state.isDestroyed,Fe=!L.state.isEnabled,ot=Hr.isTouch&&!L.props.touch,yt=Fd(L.props.duration,0,xr.duration);if(!(Q||Re||Fe||ot)&&!J().hasAttribute("disabled")&&(ie("onShow",[L],!1),L.props.onShow(L)!==!1)){if(L.state.isVisible=!0,ee()&&(m.style.visibility="visible"),z(),Ae(),L.state.isMounted||(m.style.transition="none"),ee()){var gn=je(),In=gn.box,ri=gn.content;Bd([In,ri],0)}b=function(){var Hn;if(!(!L.state.isVisible||d)){if(d=!0,m.offsetHeight,m.style.transition=L.props.moveTransition,ee()&&L.props.animation){var ka=je(),ls=ka.box,jr=ka.content;Bd([ls,jr],yt),X0([ls,jr],"visible")}fe(),rt(),G0(Wd,L),(Hn=L.popperInstance)==null||Hn.forceUpdate(),ie("onMount",[L]),L.props.animation&&ee()&&Xe(yt,function(){L.state.isShown=!0,ie("onShown",[L])})}},ve()}}function Ft(){var Q=!L.state.isVisible,Re=L.state.isDestroyed,Fe=!L.state.isEnabled,ot=Fd(L.props.duration,1,xr.duration);if(!(Q||Re||Fe)&&(ie("onHide",[L],!1),L.props.onHide(L)!==!1)){if(L.state.isVisible=!1,L.state.isShown=!1,d=!1,s=!1,ee()&&(m.style.visibility="hidden"),Ve(),Oe(),z(!0),ee()){var yt=je(),gn=yt.box,In=yt.content;L.props.animation&&(Bd([gn,In],ot),X0([gn,In],"hidden"))}fe(),rt(),L.props.animation?ee()&&He(ot,L.unmount):L.unmount()}}function an(Q){be().addEventListener("mousemove",w),G0(Ou,w),w(Q)}function Ht(){L.state.isVisible&&L.hide(),L.state.isMounted&&(de(),se().forEach(function(Q){Q._tippy.unmount()}),m.parentNode&&m.parentNode.removeChild(m),Wd=Wd.filter(function(Q){return Q!==L}),L.state.isMounted=!1,ie("onHidden",[L]))}function fn(){L.state.isDestroyed||(L.clearDelayTimeouts(),L.unmount(),N(),delete e._tippy,L.state.isDestroyed=!0,ie("onDestroy",[L]))}}function xa(e,t){t===void 0&&(t={});var n=xr.plugins.concat(t.plugins||[]);ej();var r=Object.assign({},t,{plugins:n}),i=YH(e),o=i.reduce(function(s,l){var c=l&&cj(l,r);return c&&s.push(c),s},[]);return Eu(e)?o[0]:o}xa.defaultProps=xr,xa.setDefaultProps=sj,xa.currentInput=Hr,Object.assign({},Ng,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}}),xa.setDefaultProps({render:ib});const{toClipboard:fj}=xB();onUiLoaded(()=>{const e=document.createElement("div");e.id="physton-prompt-all-in-one",pe.gradioApp().appendChild(e);const t=s1(yB);t.config.globalProperties.$toastr=_B,t.config.globalProperties.$copyText=fj,t.config.globalProperties.$tippyList=[],t.mixin(HH),t.directive("tooltip",{mounted(n,r){n.setAttribute("data-tippy-content",r.value);let i=n.getAttribute("unaffected");i=i===null?!1:i==="true";const o=xa(n,{placement:"bottom",theme:"light",allowHTML:!0,onCreate(s,l){if(i)return;localStorage.getItem("phystonPromptEnableTooltip")==="true"||s.disable()}});n.$tippyInstance=o,i||t.config.globalProperties.$tippyList.push(o)},updated(n,r){n.setAttribute("data-tippy-content",r.value),n.$tippyInstance.setContent(r.value)}}),t.mount(e)})});
|
||
//# sourceMappingURL=main.entry.js.map
|