mirror of
https://github.com/Physton/sd-webui-prompt-all-in-one.git
synced 2026-03-03 20:39:49 +00:00
136 lines
617 KiB
JavaScript
136 lines
617 KiB
JavaScript
(function(ar){typeof define=="function"&&define.amd?define(ar):ar()})(function(){"use strict";var v5=Object.defineProperty;var y5=(ar,mt,Di)=>mt in ar?v5(ar,mt,{enumerable:!0,configurable:!0,writable:!0,value:Di}):ar[mt]=Di;var sC=(ar,mt,Di)=>(y5(ar,typeof mt!="symbol"?mt+"":mt,Di),Di);function ar(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 mt(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++){const r=e[n],i=Kt(r)?uC(r):mt(r);if(i)for(const o in i)t[o]=i[o]}return t}else{if(Kt(e))return e;if(It(e))return e}}const Di=/;(?![^(]*\))/g,aC=/:([^]+)/,lC=/\/\*.*?\*\//gs;function uC(e){const t={};return e.replace(lC,"").split(Di).forEach(n=>{if(n){const r=n.split(aC);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function et(e){let t="";if(Kt(e))t=e;else if(Ye(e))for(let n=0;n<e.length;n++){const r=et(e[n]);r&&(t+=r+" ")}else if(It(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const cC=ar("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function xp(e){return!!e||e===""}function fC(e,t){if(e.length!==t.length)return!1;let n=!0;for(let r=0;n&&r<e.length;r++)n=Ts(e[r],t[r]);return n}function Ts(e,t){if(e===t)return!0;let n=Ap(e),r=Ap(t);if(n||r)return n&&r?e.getTime()===t.getTime():!1;if(n=ks(e),r=ks(t),n||r)return e===t;if(n=Ye(e),r=Ye(t),n||r)return n&&r?fC(e,t):!1;if(n=It(e),r=It(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||!Ts(e[s],t[s]))return!1}}return String(e)===String(t)}function Ju(e,t){return e.findIndex(n=>Ts(n,t))}const re=e=>Kt(e)?e:e==null?"":Ye(e)||It(e)&&(e.toString===Op||!gt(e.toString))?JSON.stringify(e,Sp,2):String(e),Sp=(e,t)=>t&&t.__v_isRef?Sp(e,t.value):yo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:bo(t)?{[`Set(${t.size})`]:[...t.values()]}:It(t)&&!Ye(t)&&!Lp(t)?String(t):t,Rt={},vo=[],wr=()=>{},dC=()=>!1,pC=/^on[^a-z]/,Va=e=>pC.test(e),Zu=e=>e.startsWith("onUpdate:"),hn=Object.assign,Qu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},hC=Object.prototype.hasOwnProperty,_t=(e,t)=>hC.call(e,t),Ye=Array.isArray,yo=e=>xs(e)==="[object Map]",bo=e=>xs(e)==="[object Set]",Ap=e=>xs(e)==="[object Date]",gt=e=>typeof e=="function",Kt=e=>typeof e=="string",ks=e=>typeof e=="symbol",It=e=>e!==null&&typeof e=="object",Ep=e=>It(e)&>(e.then)&>(e.catch),Op=Object.prototype.toString,xs=e=>Op.call(e),gC=e=>xs(e).slice(8,-1),Lp=e=>xs(e)==="[object Object]",ec=e=>Kt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,qa=ar(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),za=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},mC=/-(\w)/g,Ir=za(e=>e.replace(mC,(t,n)=>n?n.toUpperCase():"")),vC=/\B([A-Z])/g,Co=za(e=>e.replace(vC,"-$1").toLowerCase()),Ga=za(e=>e.charAt(0).toUpperCase()+e.slice(1)),tc=za(e=>e?`on${Ga(e)}`:""),Ss=(e,t)=>!Object.is(e,t),Ya=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Xa=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ja=e=>{const t=parseFloat(e);return isNaN(t)?e:t},yC=e=>{const t=Kt(e)?Number(e):NaN;return isNaN(t)?e:t};let Ip;const bC=()=>Ip||(Ip=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let zn;class CC{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=zn,!t&&zn&&(this.index=(zn.scopes||(zn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=zn;try{return zn=this,t()}finally{zn=n}}}on(){zn=this}off(){zn=this.parent}stop(t){if(this._active){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 _C(e,t=zn){t&&t.active&&t.effects.push(e)}function Pp(){return zn}function wC(e){zn&&zn.cleanups.push(e)}const nc=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Dp=e=>(e.w&fi)>0,Rp=e=>(e.n&fi)>0,TC=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=fi},kC=e=>{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r<t.length;r++){const i=t[r];Dp(i)&&!Rp(i)?i.delete(e):t[n++]=i,i.w&=~fi,i.n&=~fi}t.length=n}},rc=new WeakMap;let As=0,fi=1;const ic=30;let Tr;const Ri=Symbol(""),oc=Symbol("");class sc{constructor(t,n=null,r){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,_C(this,r)}run(){if(!this.active)return this.fn();let t=Tr,n=di;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=Tr,Tr=this,di=!0,fi=1<<++As,As<=ic?TC(this):Np(this),this.fn()}finally{As<=ic&&kC(this),fi=1<<--As,Tr=this.parent,di=n,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Tr===this?this.deferStop=!0:this.active&&(Np(this),this.onStop&&this.onStop(),this.active=!1)}}function Np(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}let di=!0;const Mp=[];function _o(){Mp.push(di),di=!1}function wo(){const e=Mp.pop();di=e===void 0?!0:e}function Rn(e,t,n){if(di&&Tr){let r=rc.get(e);r||rc.set(e,r=new Map);let i=r.get(n);i||r.set(n,i=nc()),Fp(i)}}function Fp(e,t){let n=!1;As<=ic?Rp(e)||(e.n|=fi,n=!Dp(e)):n=!e.has(Tr),n&&(e.add(Tr),Tr.deps.push(e))}function qr(e,t,n,r,i,o){const s=rc.get(e);if(!s)return;let l=[];if(t==="clear")l=[...s.values()];else if(n==="length"&&Ye(e)){const c=Number(r);s.forEach((d,p)=>{(p==="length"||p>=c)&&l.push(d)})}else switch(n!==void 0&&l.push(s.get(n)),t){case"add":Ye(e)?ec(n)&&l.push(s.get("length")):(l.push(s.get(Ri)),yo(e)&&l.push(s.get(oc)));break;case"delete":Ye(e)||(l.push(s.get(Ri)),yo(e)&&l.push(s.get(oc)));break;case"set":yo(e)&&l.push(s.get(Ri));break}if(l.length===1)l[0]&&ac(l[0]);else{const c=[];for(const d of l)d&&c.push(...d);ac(nc(c))}}function ac(e,t){const n=Ye(e)?e:[...e];for(const r of n)r.computed&&$p(r);for(const r of n)r.computed||$p(r)}function $p(e,t){(e!==Tr||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const xC=ar("__proto__,__v_isRef,__isVue"),Bp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ks)),SC=lc(),AC=lc(!1,!0),EC=lc(!0),Hp=OC();function OC(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=xt(this);for(let o=0,s=this.length;o<s;o++)Rn(r,"get",o+"");const i=r[t](...n);return i===-1||i===!1?r[t](...n.map(xt)):i}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){_o();const r=xt(this)[t].apply(this,n);return wo(),r}}),e}function LC(e){const t=xt(this);return Rn(t,"has",e),t.hasOwnProperty(e)}function lc(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?qC:Yp:t?Gp:zp).get(r))return r;const s=Ye(r);if(!e){if(s&&_t(Hp,i))return Reflect.get(Hp,i,o);if(i==="hasOwnProperty")return LC}const l=Reflect.get(r,i,o);return(ks(i)?Bp.has(i):xC(i))||(e||Rn(r,"get",i),t)?l:Cn(l)?s&&ec(i)?l:l.value:It(l)?e?fc(l):Nn(l):l}}const IC=jp(),PC=jp(!0);function jp(e=!1){return function(n,r,i,o){let s=n[r];if(ko(s)&&Cn(s)&&!Cn(i))return!1;if(!e&&(!il(i)&&!ko(i)&&(s=xt(s),i=xt(i)),!Ye(n)&&Cn(s)&&!Cn(i)))return s.value=i,!0;const l=Ye(n)&&ec(r)?Number(r)<n.length:_t(n,r),c=Reflect.set(n,r,i,o);return n===xt(o)&&(l?Ss(i,s)&&qr(n,"set",r,i):qr(n,"add",r,i)),c}}function DC(e,t){const n=_t(e,t);e[t];const r=Reflect.deleteProperty(e,t);return r&&n&&qr(e,"delete",t,void 0),r}function RC(e,t){const n=Reflect.has(e,t);return(!ks(t)||!Bp.has(t))&&Rn(e,"has",t),n}function NC(e){return Rn(e,"iterate",Ye(e)?"length":Ri),Reflect.ownKeys(e)}const Up={get:SC,set:IC,deleteProperty:DC,has:RC,ownKeys:NC},MC={get:EC,set(e,t){return!0},deleteProperty(e,t){return!0}},FC=hn({},Up,{get:AC,set:PC}),uc=e=>e,Za=e=>Reflect.getPrototypeOf(e);function Qa(e,t,n=!1,r=!1){e=e.__v_raw;const i=xt(e),o=xt(t);n||(t!==o&&Rn(i,"get",t),Rn(i,"get",o));const{has:s}=Za(i),l=r?uc:n?pc:Es;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 el(e,t=!1){const n=this.__v_raw,r=xt(n),i=xt(e);return t||(e!==i&&Rn(r,"has",e),Rn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function tl(e,t=!1){return e=e.__v_raw,!t&&Rn(xt(e),"iterate",Ri),Reflect.get(e,"size",e)}function Wp(e){e=xt(e);const t=xt(this);return Za(t).has.call(t,e)||(t.add(e),qr(t,"add",e,e)),this}function Kp(e,t){t=xt(t);const n=xt(this),{has:r,get:i}=Za(n);let o=r.call(n,e);o||(e=xt(e),o=r.call(n,e));const s=i.call(n,e);return n.set(e,t),o?Ss(t,s)&&qr(n,"set",e,t):qr(n,"add",e,t),this}function Vp(e){const t=xt(this),{has:n,get:r}=Za(t);let i=n.call(t,e);i||(e=xt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&qr(t,"delete",e,void 0),o}function qp(){const e=xt(this),t=e.size!==0,n=e.clear();return t&&qr(e,"clear",void 0,void 0),n}function nl(e,t){return function(r,i){const o=this,s=o.__v_raw,l=xt(s),c=t?uc:e?pc:Es;return!e&&Rn(l,"iterate",Ri),s.forEach((d,p)=>r.call(i,c(d),c(p),o))}}function rl(e,t,n){return function(...r){const i=this.__v_raw,o=xt(i),s=yo(o),l=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,d=i[e](...r),p=n?uc:t?pc:Es;return!t&&Rn(o,"iterate",c?oc:Ri),{next(){const{value:y,done:m}=d.next();return m?{value:y,done:m}:{value:l?[p(y[0]),p(y[1])]:p(y),done:m}},[Symbol.iterator](){return this}}}}function pi(e){return function(...t){return e==="delete"?!1:this}}function $C(){const e={get(o){return Qa(this,o)},get size(){return tl(this)},has:el,add:Wp,set:Kp,delete:Vp,clear:qp,forEach:nl(!1,!1)},t={get(o){return Qa(this,o,!1,!0)},get size(){return tl(this)},has:el,add:Wp,set:Kp,delete:Vp,clear:qp,forEach:nl(!1,!0)},n={get(o){return Qa(this,o,!0)},get size(){return tl(this,!0)},has(o){return el.call(this,o,!0)},add:pi("add"),set:pi("set"),delete:pi("delete"),clear:pi("clear"),forEach:nl(!0,!1)},r={get(o){return Qa(this,o,!0,!0)},get size(){return tl(this,!0)},has(o){return el.call(this,o,!0)},add:pi("add"),set:pi("set"),delete:pi("delete"),clear:pi("clear"),forEach:nl(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=rl(o,!1,!1),n[o]=rl(o,!0,!1),t[o]=rl(o,!1,!0),r[o]=rl(o,!0,!0)}),[e,n,t,r]}const[BC,HC,jC,UC]=$C();function cc(e,t){const n=t?e?UC:jC:e?HC:BC;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 WC={get:cc(!1,!1)},KC={get:cc(!1,!0)},VC={get:cc(!0,!1)},zp=new WeakMap,Gp=new WeakMap,Yp=new WeakMap,qC=new WeakMap;function zC(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function GC(e){return e.__v_skip||!Object.isExtensible(e)?0:zC(gC(e))}function Nn(e){return ko(e)?e:dc(e,!1,Up,WC,zp)}function YC(e){return dc(e,!1,FC,KC,Gp)}function fc(e){return dc(e,!0,MC,VC,Yp)}function dc(e,t,n,r,i){if(!It(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const s=GC(e);if(s===0)return e;const l=new Proxy(e,s===2?r:n);return i.set(e,l),l}function To(e){return ko(e)?To(e.__v_raw):!!(e&&e.__v_isReactive)}function ko(e){return!!(e&&e.__v_isReadonly)}function il(e){return!!(e&&e.__v_isShallow)}function Xp(e){return To(e)||ko(e)}function xt(e){const t=e&&e.__v_raw;return t?xt(t):e}function Jp(e){return Xa(e,"__v_skip",!0),e}const Es=e=>It(e)?Nn(e):e,pc=e=>It(e)?fc(e):e;function Zp(e){di&&Tr&&(e=xt(e),Fp(e.dep||(e.dep=nc())))}function Qp(e,t){e=xt(e);const n=e.dep;n&&ac(n)}function Cn(e){return!!(e&&e.__v_isRef===!0)}function Et(e){return eh(e,!1)}function XC(e){return eh(e,!0)}function eh(e,t){return Cn(e)?e:new JC(e,t)}class JC{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:xt(t),this._value=n?t:Es(t)}get value(){return Zp(this),this._value}set value(t){const n=this.__v_isShallow||il(t)||ko(t);t=n?t:xt(t),Ss(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:Es(t),Qp(this))}}function th(e){return Cn(e)?e.value:e}const ZC={get:(e,t,n)=>th(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return Cn(i)&&!Cn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function nh(e){return To(e)?e:new Proxy(e,ZC)}var rh;class QC{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[rh]=!1,this._dirty=!0,this.effect=new sc(t,()=>{this._dirty||(this._dirty=!0,Qp(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=xt(this);return Zp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}rh="__v_isReadonly";function e_(e,t,n=!1){let r,i;const o=gt(e);return o?(r=e,i=wr):(r=e.get,i=e.set),new QC(r,i,o||!i,n)}function C5(e,...t){}function hi(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){ol(o,t,n)}return i}function lr(e,t,n,r){if(gt(e)){const o=hi(e,t,n,r);return o&&Ep(o)&&o.catch(s=>{ol(s,t,n)}),o}const i=[];for(let o=0;o<e.length;o++)i.push(lr(e[o],t,n,r));return i}function ol(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 p=0;p<d.length;p++)if(d[p](e,s,l)===!1)return}o=o.parent}const c=t.appContext.config.errorHandler;if(c){hi(c,null,10,[e,s,l]);return}}t_(e,n,i,r)}function t_(e,t,n,r=!0){console.error(e)}let Os=!1,hc=!1;const _n=[];let Pr=0;const xo=[];let zr=null,Ni=0;const ih=Promise.resolve();let gc=null;function sl(e){const t=gc||ih;return e?t.then(this?e.bind(this):e):t}function n_(e){let t=Pr+1,n=_n.length;for(;t<n;){const r=t+n>>>1;Ls(_n[r])<e?t=r+1:n=r}return t}function mc(e){(!_n.length||!_n.includes(e,Os&&e.allowRecurse?Pr+1:Pr))&&(e.id==null?_n.push(e):_n.splice(n_(e.id),0,e),oh())}function oh(){!Os&&!hc&&(hc=!0,gc=ih.then(lh))}function r_(e){const t=_n.indexOf(e);t>Pr&&_n.splice(t,1)}function i_(e){Ye(e)?xo.push(...e):(!zr||!zr.includes(e,e.allowRecurse?Ni+1:Ni))&&xo.push(e),oh()}function sh(e,t=Os?Pr+1:0){for(;t<_n.length;t++){const n=_n[t];n&&n.pre&&(_n.splice(t,1),t--,n())}}function ah(e){if(xo.length){const t=[...new Set(xo)];if(xo.length=0,zr){zr.push(...t);return}for(zr=t,zr.sort((n,r)=>Ls(n)-Ls(r)),Ni=0;Ni<zr.length;Ni++)zr[Ni]();zr=null,Ni=0}}const Ls=e=>e.id==null?1/0:e.id,o_=(e,t)=>{const n=Ls(e)-Ls(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function lh(e){hc=!1,Os=!0,_n.sort(o_);const t=wr;try{for(Pr=0;Pr<_n.length;Pr++){const n=_n[Pr];n&&n.active!==!1&&hi(n,null,14)}}finally{Pr=0,_n.length=0,ah(),Os=!1,gc=null,(_n.length||xo.length)&&lh()}}function s_(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||Rt;let i=n;const o=t.startsWith("update:"),s=o&&t.slice(7);if(s&&s in r){const p=`${s==="modelValue"?"model":s}Modifiers`,{number:y,trim:m}=r[p]||Rt;m&&(i=n.map(C=>Kt(C)?C.trim():C)),y&&(i=n.map(Ja))}let l,c=r[l=tc(t)]||r[l=tc(Ir(t))];!c&&o&&(c=r[l=tc(Co(t))]),c&&lr(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,lr(d,e,6,i)}}function uh(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(!gt(e)){const c=d=>{const p=uh(d,t,!0);p&&(l=!0,hn(s,p))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(It(e)&&r.set(e,null),null):(Ye(o)?o.forEach(c=>s[c]=null):hn(s,o),It(e)&&r.set(e,s),s)}function al(e,t){return!e||!Va(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,Co(t))||_t(e,t))}let gn=null,ll=null;function ul(e){const t=gn;return gn=e,ll=e&&e.type.__scopeId||null,t}function So(e){ll=e}function Ao(){ll=null}function tn(e,t=gn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&Hh(-1);const o=ul(t);let s;try{s=e(...i)}finally{ul(o),r._d&&Hh(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function _5(){}function vc(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[s],slots:l,attrs:c,emit:d,render:p,renderCache:y,data:m,setupState:C,ctx:b,inheritAttrs:k}=e;let L,P;const j=ul(e);try{if(n.shapeFlag&4){const x=i||r;L=Dr(p.call(x,x,y,o,C,m,b)),P=c}else{const x=t;L=Dr(x.length>1?x(o,{attrs:c,slots:l,emit:d}):x(o,null)),P=t.props?c:a_(c)}}catch(x){Rs.length=0,ol(x,e,1),L=be(fr)}let G=L;if(P&&k!==!1){const x=Object.keys(P),{shapeFlag:X}=G;x.length&&X&7&&(s&&x.some(Zu)&&(P=l_(P,s)),G=gi(G,P))}return n.dirs&&(G=gi(G),G.dirs=G.dirs?G.dirs.concat(n.dirs):n.dirs),n.transition&&(G.transition=n.transition),L=G,ul(j),L}const a_=e=>{let t;for(const n in e)(n==="class"||n==="style"||Va(n))&&((t||(t={}))[n]=e[n]);return t},l_=(e,t)=>{const n={};for(const r in e)(!Zu(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function u_(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?ch(r,s,d):!!s;if(c&8){const p=t.dynamicProps;for(let y=0;y<p.length;y++){const m=p[y];if(s[m]!==r[m]&&!al(d,m))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:r===s?!1:r?s?ch(r,s,d):!0:!!s;return!1}function ch(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]&&!al(n,o))return!0}return!1}function c_({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const f_=e=>e.__isSuspense;function d_(e,t){t&&t.pendingBranch?Ye(e)?t.effects.push(...e):t.effects.push(e):i_(e)}function fh(e,t){if(Yt){let n=Yt.provides;const r=Yt.parent&&Yt.parent.provides;r===n&&(n=Yt.provides=Object.create(r)),n[e]=t}}function Eo(e,t,n=!1){const r=Yt||gn;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&>(t)?t.call(r.proxy):t}}const cl={};function ur(e,t,n){return dh(e,t,n)}function dh(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:s}=Rt){const l=Pp()===(Yt==null?void 0:Yt.scope)?Yt:null;let c,d=!1,p=!1;if(Cn(e)?(c=()=>e.value,d=il(e)):To(e)?(c=()=>e,r=!0):Ye(e)?(p=!0,d=e.some(G=>To(G)||il(G)),c=()=>e.map(G=>{if(Cn(G))return G.value;if(To(G))return Mi(G);if(gt(G))return hi(G,l,2)})):gt(e)?t?c=()=>hi(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return y&&y(),lr(e,l,3,[m])}:c=wr,t&&r){const G=c;c=()=>Mi(G())}let y,m=G=>{y=P.onStop=()=>{hi(G,l,4)}},C;if(Ms)if(m=wr,t?n&&lr(t,l,3,[c(),p?[]:void 0,m]):c(),i==="sync"){const G=a1();C=G.__watcherHandles||(G.__watcherHandles=[])}else return wr;let b=p?new Array(e.length).fill(cl):cl;const k=()=>{if(P.active)if(t){const G=P.run();(r||d||(p?G.some((x,X)=>Ss(x,b[X])):Ss(G,b)))&&(y&&y(),lr(t,l,3,[G,b===cl?void 0:p&&b[0]===cl?[]:b,m]),b=G)}else P.run()};k.allowRecurse=!!t;let L;i==="sync"?L=k:i==="post"?L=()=>Fn(k,l&&l.suspense):(k.pre=!0,l&&(k.id=l.uid),L=()=>mc(k));const P=new sc(c,L);t?n?k():b=P.run():i==="post"?Fn(P.run.bind(P),l&&l.suspense):P.run();const j=()=>{P.stop(),l&&l.scope&&Qu(l.scope.effects,P)};return C&&C.push(j),j}function p_(e,t,n){const r=this.proxy,i=Kt(e)?e.includes(".")?ph(r,e):()=>r[e]:e.bind(r,r);let o;gt(t)?o=t:(o=t.handler,n=t);const s=Yt;Lo(this);const l=dh(i,o.bind(r),n);return s?Lo(s):ji(),l}function ph(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 Mi(e,t){if(!It(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),Cn(e))Mi(e.value,t);else if(Ye(e))for(let n=0;n<e.length;n++)Mi(e[n],t);else if(bo(e)||yo(e))e.forEach(n=>{Mi(n,t)});else if(Lp(e))for(const n in e)Mi(e[n],t);return e}function h_(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return pl(()=>{e.isMounted=!0}),bh(()=>{e.isUnmounting=!0}),e}const cr=[Function,Array],hh={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:cr,onEnter:cr,onAfterEnter:cr,onEnterCancelled:cr,onBeforeLeave:cr,onLeave:cr,onAfterLeave:cr,onLeaveCancelled:cr,onBeforeAppear:cr,onAppear:cr,onAfterAppear:cr,onAppearCancelled:cr},setup(e,{slots:t}){const n=Nc(),r=h_();let i;return()=>{const o=t.default&&vh(t.default(),!0);if(!o||!o.length)return;let s=o[0];if(o.length>1){for(const k of o)if(k.type!==fr){s=k;break}}const l=xt(e),{mode:c}=l;if(r.isLeaving)return bc(s);const d=mh(s);if(!d)return bc(s);const p=yc(d,l,r,n);Cc(d,p);const y=n.subTree,m=y&&mh(y);let C=!1;const{getTransitionKey:b}=d.type;if(b){const k=b();i===void 0?i=k:k!==i&&(i=k,C=!0)}if(m&&m.type!==fr&&(!Hi(d,m)||C)){const k=yc(m,l,r,n);if(Cc(m,k),c==="out-in")return r.isLeaving=!0,k.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},bc(s);c==="in-out"&&d.type!==fr&&(k.delayLeave=(L,P,j)=>{const G=gh(r,m);G[String(m.key)]=m,L._leaveCb=()=>{P(),L._leaveCb=void 0,delete p.delayedLeave},p.delayedLeave=j})}return s}}};function gh(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function yc(e,t,n,r){const{appear:i,mode:o,persisted:s=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:d,onEnterCancelled:p,onBeforeLeave:y,onLeave:m,onAfterLeave:C,onLeaveCancelled:b,onBeforeAppear:k,onAppear:L,onAfterAppear:P,onAppearCancelled:j}=t,G=String(e.key),x=gh(n,e),X=(I,A)=>{I&&lr(I,r,9,A)},g=(I,A)=>{const D=A[1];X(I,A),Ye(I)?I.every(H=>H.length<=1)&&D():I.length<=1&&D()},le={mode:o,persisted:s,beforeEnter(I){let A=l;if(!n.isMounted)if(i)A=k||l;else return;I._leaveCb&&I._leaveCb(!0);const D=x[G];D&&Hi(e,D)&&D.el._leaveCb&&D.el._leaveCb(),X(A,[I])},enter(I){let A=c,D=d,H=p;if(!n.isMounted)if(i)A=L||c,D=P||d,H=j||p;else return;let K=!1;const z=I._enterCb=de=>{K||(K=!0,de?X(H,[I]):X(D,[I]),le.delayedLeave&&le.delayedLeave(),I._enterCb=void 0)};A?g(A,[I,z]):z()},leave(I,A){const D=String(e.key);if(I._enterCb&&I._enterCb(!0),n.isUnmounting)return A();X(y,[I]);let H=!1;const K=I._leaveCb=z=>{H||(H=!0,A(),z?X(b,[I]):X(C,[I]),I._leaveCb=void 0,x[D]===e&&delete x[D])};x[D]=e,m?g(m,[I,K]):K()},clone(I){return yc(I,t,n,r)}};return le}function bc(e){if(fl(e))return e=gi(e),e.children=null,e}function mh(e){return fl(e)?e.children?e.children[0]:void 0:e}function Cc(e,t){e.shapeFlag&6&&e.component?Cc(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function vh(e,t=!1,n){let r=[],i=0;for(let o=0;o<e.length;o++){let s=e[o];const l=n==null?s.key:String(n)+String(s.key!=null?s.key:o);s.type===Fe?(s.patchFlag&128&&i++,r=r.concat(vh(s.children,t,l))):(t||s.type!==fr)&&r.push(l!=null?gi(s,{key:l}):s)}if(i>1)for(let o=0;o<r.length;o++)r[o].patchFlag=-2;return r}function Mn(e){return gt(e)?{setup:e,name:e.name}:e}const Is=e=>!!e.type.__asyncLoader,fl=e=>e.type.__isKeepAlive;function g_(e,t){yh(e,"a",t)}function m_(e,t){yh(e,"da",t)}function yh(e,t,n=Yt){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(dl(t,r,n),n){let i=n.parent;for(;i&&i.parent;)fl(i.parent.vnode)&&v_(r,t,n,i),i=i.parent}}function v_(e,t,n,r){const i=dl(t,e,r,!0);Ch(()=>{Qu(r[t],i)},n)}function dl(e,t,n=Yt,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;_o(),Lo(n);const l=lr(t,n,e,s);return ji(),wo(),l});return r?i.unshift(o):i.push(o),o}}const Gr=e=>(t,n=Yt)=>(!Ms||e==="sp")&&dl(e,(...r)=>t(...r),n),y_=Gr("bm"),pl=Gr("m"),b_=Gr("bu"),C_=Gr("u"),bh=Gr("bum"),Ch=Gr("um"),__=Gr("sp"),w_=Gr("rtg"),T_=Gr("rtc");function k_(e,t=Yt){dl("ec",e,t)}function he(e,t){const n=gn;if(n===null)return e;const r=_l(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[s,l,c,d=Rt]=t[o];s&&(gt(s)&&(s={mounted:s,updated:s}),s.deep&&Mi(l),i.push({dir:s,instance:r,value:l,oldValue:void 0,arg:c,modifiers:d}))}return e}function Fi(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&&(_o(),lr(c,n,8,[e.el,l,e,t]),wo())}}const _c="components",x_="directives";function tt(e,t){return wc(_c,e,!0,t)||e}const _h=Symbol();function wh(e){return Kt(e)?wc(_c,e,!1)||e:e||_h}function Oo(e){return wc(x_,e)}function wc(e,t,n=!0,r=!1){const i=gn||Yt;if(i){const o=i.type;if(e===_c){const l=r1(o,!1);if(l&&(l===t||l===Ir(t)||l===Ga(Ir(t))))return o}const s=Th(i[e]||o[e],t)||Th(i.appContext[e],t);return!s&&r?o:s}}function Th(e,t){return e&&(e[t]||e[Ir(t)]||e[Ga(Ir(t))])}function ct(e,t,n,r){let i;const o=n&&n[r];if(Ye(e)||Kt(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(It(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 S_(e,t,n={},r,i){if(gn.isCE||gn.parent&&Is(gn.parent)&&gn.parent.isCE)return t!=="default"&&(n.name=t),be("slot",n,r&&r());let o=e[t];o&&o._c&&(o._d=!1),O();const s=o&&kh(o(n)),l=Ue(Fe,{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 kh(e){return e.some(t=>vl(t)?!(t.type===fr||t.type===Fe&&!kh(t.children)):!0)?e:null}const Tc=e=>e?Wh(e)?_l(e)||e.proxy:Tc(e.parent):null,Ps=hn(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=>Tc(e.parent),$root:e=>Tc(e.root),$emit:e=>e.emit,$options:e=>Sc(e),$forceUpdate:e=>e.f||(e.f=()=>mc(e.update)),$nextTick:e=>e.n||(e.n=sl.bind(e.proxy)),$watch:e=>p_.bind(e)}),kc=(e,t)=>e!==Rt&&!e.__isScriptSetup&&_t(e,t),A_={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 C=s[t];if(C!==void 0)switch(C){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(kc(r,t))return s[t]=1,r[t];if(i!==Rt&&_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!==Rt&&_t(n,t))return s[t]=4,n[t];xc&&(s[t]=0)}}const p=Ps[t];let y,m;if(p)return t==="$attrs"&&Rn(e,"get",t),p(e);if((y=l.__cssModules)&&(y=y[t]))return y;if(n!==Rt&&_t(n,t))return s[t]=4,n[t];if(m=c.config.globalProperties,_t(m,t))return m[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return kc(i,t)?(i[t]=n,!0):r!==Rt&&_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!==Rt&&_t(e,s)||kc(t,s)||(l=o[0])&&_t(l,s)||_t(r,s)||_t(Ps,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 xc=!0;function E_(e){const t=Sc(e),n=e.proxy,r=e.ctx;xc=!1,t.beforeCreate&&xh(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:s,watch:l,provide:c,inject:d,created:p,beforeMount:y,mounted:m,beforeUpdate:C,updated:b,activated:k,deactivated:L,beforeDestroy:P,beforeUnmount:j,destroyed:G,unmounted:x,render:X,renderTracked:g,renderTriggered:le,errorCaptured:I,serverPrefetch:A,expose:D,inheritAttrs:H,components:K,directives:z,filters:de}=t;if(d&&O_(d,r,null,e.appContext.config.unwrapInjectedRef),s)for(const Y in s){const se=s[Y];gt(se)&&(r[Y]=se.bind(n))}if(i){const Y=i.call(n,n);It(Y)&&(e.data=Nn(Y))}if(xc=!0,o)for(const Y in o){const se=o[Y],ge=gt(se)?se.bind(n,n):gt(se.get)?se.get.bind(n,n):wr,it=!gt(se)&>(se.set)?se.set.bind(n):wr,qe=nn({get:ge,set:it});Object.defineProperty(r,Y,{enumerable:!0,configurable:!0,get:()=>qe.value,set:ie=>qe.value=ie})}if(l)for(const Y in l)Sh(l[Y],r,n,Y);if(c){const Y=gt(c)?c.call(n):c;Reflect.ownKeys(Y).forEach(se=>{fh(se,Y[se])})}p&&xh(p,e,"c");function Re(Y,se){Ye(se)?se.forEach(ge=>Y(ge.bind(n))):se&&Y(se.bind(n))}if(Re(y_,y),Re(pl,m),Re(b_,C),Re(C_,b),Re(g_,k),Re(m_,L),Re(k_,I),Re(T_,g),Re(w_,le),Re(bh,j),Re(Ch,x),Re(__,A),Ye(D))if(D.length){const Y=e.exposed||(e.exposed={});D.forEach(se=>{Object.defineProperty(Y,se,{get:()=>n[se],set:ge=>n[se]=ge})})}else e.exposed||(e.exposed={});X&&e.render===wr&&(e.render=X),H!=null&&(e.inheritAttrs=H),K&&(e.components=K),z&&(e.directives=z)}function O_(e,t,n=wr,r=!1){Ye(e)&&(e=Ac(e));for(const i in e){const o=e[i];let s;It(o)?"default"in o?s=Eo(o.from||i,o.default,!0):s=Eo(o.from||i):s=Eo(o),Cn(s)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:l=>s.value=l}):t[i]=s}}function xh(e,t,n){lr(Ye(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Sh(e,t,n,r){const i=r.includes(".")?ph(n,r):()=>n[r];if(Kt(e)){const o=t[e];gt(o)&&ur(i,o)}else if(gt(e))ur(i,e.bind(n));else if(It(e))if(Ye(e))e.forEach(o=>Sh(o,t,n,r));else{const o=gt(e.handler)?e.handler.bind(n):t[e.handler];gt(o)&&ur(i,o,e)}}function Sc(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=>hl(c,d,s,!0)),hl(c,t,s)),It(t)&&o.set(t,c),c}function hl(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&hl(e,o,n,!0),i&&i.forEach(s=>hl(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const l=L_[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const L_={data:Ah,props:$i,emits:$i,methods:$i,computed:$i,beforeCreate:On,created:On,beforeMount:On,mounted:On,beforeUpdate:On,updated:On,beforeDestroy:On,beforeUnmount:On,destroyed:On,unmounted:On,activated:On,deactivated:On,errorCaptured:On,serverPrefetch:On,components:$i,directives:$i,watch:P_,provide:Ah,inject:I_};function Ah(e,t){return t?e?function(){return hn(gt(e)?e.call(this,this):e,gt(t)?t.call(this,this):t)}:t:e}function I_(e,t){return $i(Ac(e),Ac(t))}function Ac(e){if(Ye(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function On(e,t){return e?[...new Set([].concat(e,t))]:t}function $i(e,t){return e?hn(hn(Object.create(null),e),t):t}function P_(e,t){if(!e)return t;if(!t)return e;const n=hn(Object.create(null),e);for(const r in t)n[r]=On(e[r],t[r]);return n}function D_(e,t,n,r=!1){const i={},o={};Xa(o,yl,1),e.propsDefaults=Object.create(null),Eh(e,t,i,o);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=r?i:YC(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function R_(e,t,n,r){const{props:i,attrs:o,vnode:{patchFlag:s}}=e,l=xt(i),[c]=e.propsOptions;let d=!1;if((r||s>0)&&!(s&16)){if(s&8){const p=e.vnode.dynamicProps;for(let y=0;y<p.length;y++){let m=p[y];if(al(e.emitsOptions,m))continue;const C=t[m];if(c)if(_t(o,m))C!==o[m]&&(o[m]=C,d=!0);else{const b=Ir(m);i[b]=Ec(c,l,b,C,e,!1)}else C!==o[m]&&(o[m]=C,d=!0)}}}else{Eh(e,t,i,o)&&(d=!0);let p;for(const y in l)(!t||!_t(t,y)&&((p=Co(y))===y||!_t(t,p)))&&(c?n&&(n[y]!==void 0||n[p]!==void 0)&&(i[y]=Ec(c,l,y,void 0,e,!0)):delete i[y]);if(o!==l)for(const y in o)(!t||!_t(t,y))&&(delete o[y],d=!0)}d&&qr(e,"set","$attrs")}function Eh(e,t,n,r){const[i,o]=e.propsOptions;let s=!1,l;if(t)for(let c in t){if(qa(c))continue;const d=t[c];let p;i&&_t(i,p=Ir(c))?!o||!o.includes(p)?n[p]=d:(l||(l={}))[p]=d:al(e.emitsOptions,c)||(!(c in r)||d!==r[c])&&(r[c]=d,s=!0)}if(o){const c=xt(n),d=l||Rt;for(let p=0;p<o.length;p++){const y=o[p];n[y]=Ec(i,c,y,d[y],e,!_t(d,y))}}return s}function Ec(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&>(c)){const{propsDefaults:d}=i;n in d?r=d[n]:(Lo(i),r=d[n]=c.call(null,t),ji())}else r=c}s[0]&&(o&&!l?r=!1:s[1]&&(r===""||r===Co(n))&&(r=!0))}return r}function Oh(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(!gt(e)){const p=y=>{c=!0;const[m,C]=Oh(y,t,!0);hn(s,m),C&&l.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!o&&!c)return It(e)&&r.set(e,vo),vo;if(Ye(o))for(let p=0;p<o.length;p++){const y=Ir(o[p]);Lh(y)&&(s[y]=Rt)}else if(o)for(const p in o){const y=Ir(p);if(Lh(y)){const m=o[p],C=s[y]=Ye(m)||gt(m)?{type:m}:Object.assign({},m);if(C){const b=Dh(Boolean,C.type),k=Dh(String,C.type);C[0]=b>-1,C[1]=k<0||b<k,(b>-1||_t(C,"default"))&&l.push(y)}}}const d=[s,l];return It(e)&&r.set(e,d),d}function Lh(e){return e[0]!=="$"}function Ih(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function Ph(e,t){return Ih(e)===Ih(t)}function Dh(e,t){return Ye(t)?t.findIndex(n=>Ph(n,e)):gt(t)&&Ph(t,e)?0:-1}const Rh=e=>e[0]==="_"||e==="$stable",Oc=e=>Ye(e)?e.map(Dr):[Dr(e)],N_=(e,t,n)=>{if(t._n)return t;const r=tn((...i)=>Oc(t(...i)),n);return r._c=!1,r},Nh=(e,t,n)=>{const r=e._ctx;for(const i in e){if(Rh(i))continue;const o=e[i];if(gt(o))t[i]=N_(i,o,r);else if(o!=null){const s=Oc(o);t[i]=()=>s}}},Mh=(e,t)=>{const n=Oc(t);e.slots.default=()=>n},M_=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=xt(t),Xa(t,"_",n)):Nh(t,e.slots={})}else e.slots={},t&&Mh(e,t);Xa(e.slots,yl,1)},F_=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,s=Rt;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(hn(i,t),!n&&l===1&&delete i._):(o=!t.$stable,Nh(t,i)),s=t}else t&&(Mh(e,t),s={default:1});if(o)for(const l in i)!Rh(l)&&!(l in s)&&delete i[l]};function Fh(){return{app:null,config:{isNativeTag:dC,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 $_=0;function B_(e,t){return function(r,i=null){gt(r)||(r=Object.assign({},r)),i!=null&&!It(i)&&(i=null);const o=Fh(),s=new Set;let l=!1;const c=o.app={_uid:$_++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:l1,get config(){return o.config},set config(d){},use(d,...p){return s.has(d)||(d&>(d.install)?(s.add(d),d.install(c,...p)):gt(d)&&(s.add(d),d(c,...p))),c},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),c},component(d,p){return p?(o.components[d]=p,c):o.components[d]},directive(d,p){return p?(o.directives[d]=p,c):o.directives[d]},mount(d,p,y){if(!l){const m=be(r,i);return m.appContext=o,p&&t?t(m,d):e(m,d,y),l=!0,c._container=d,d.__vue_app__=c,_l(m.component)||m.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(d,p){return o.provides[d]=p,c}};return c}}function Lc(e,t,n,r,i=!1){if(Ye(e)){e.forEach((m,C)=>Lc(m,t&&(Ye(t)?t[C]:t),n,r,i));return}if(Is(r)&&!i)return;const o=r.shapeFlag&4?_l(r.component)||r.component.proxy:r.el,s=i?null:o,{i:l,r:c}=e,d=t&&t.r,p=l.refs===Rt?l.refs={}:l.refs,y=l.setupState;if(d!=null&&d!==c&&(Kt(d)?(p[d]=null,_t(y,d)&&(y[d]=null)):Cn(d)&&(d.value=null)),gt(c))hi(c,l,12,[s,p]);else{const m=Kt(c),C=Cn(c);if(m||C){const b=()=>{if(e.f){const k=m?_t(y,c)?y[c]:p[c]:c.value;i?Ye(k)&&Qu(k,o):Ye(k)?k.includes(o)||k.push(o):m?(p[c]=[o],_t(y,c)&&(y[c]=p[c])):(c.value=[o],e.k&&(p[e.k]=c.value))}else m?(p[c]=s,_t(y,c)&&(y[c]=s)):C&&(c.value=s,e.k&&(p[e.k]=s))};s?(b.id=-1,Fn(b,n)):b()}}}const Fn=d_;function H_(e){return j_(e)}function j_(e,t){const n=bC();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:s,createText:l,createComment:c,setText:d,setElementText:p,parentNode:y,nextSibling:m,setScopeId:C=wr,insertStaticContent:b}=e,k=(R,$,J,ne=null,W=null,Q=null,we=!1,me=null,_e=!!$.dynamicChildren)=>{if(R===$)return;R&&!Hi(R,$)&&(ne=He(R),ie(R,W,Q,!0),R=null),$.patchFlag===-2&&(_e=!1,$.dynamicChildren=null);const{type:ue,ref:Se,shapeFlag:Te}=$;switch(ue){case ml:L(R,$,J,ne);break;case fr:P(R,$,J,ne);break;case Dc:R==null&&j($,J,ne,we);break;case Fe:K(R,$,J,ne,W,Q,we,me,_e);break;default:Te&1?X(R,$,J,ne,W,Q,we,me,_e):Te&6?z(R,$,J,ne,W,Q,we,me,_e):(Te&64||Te&128)&&ue.process(R,$,J,ne,W,Q,we,me,_e,Ie)}Se!=null&&W&&Lc(Se,R&&R.ref,Q,$||R,!$)},L=(R,$,J,ne)=>{if(R==null)r($.el=l($.children),J,ne);else{const W=$.el=R.el;$.children!==R.children&&d(W,$.children)}},P=(R,$,J,ne)=>{R==null?r($.el=c($.children||""),J,ne):$.el=R.el},j=(R,$,J,ne)=>{[R.el,R.anchor]=b(R.children,$,J,ne,R.el,R.anchor)},G=({el:R,anchor:$},J,ne)=>{let W;for(;R&&R!==$;)W=m(R),r(R,J,ne),R=W;r($,J,ne)},x=({el:R,anchor:$})=>{let J;for(;R&&R!==$;)J=m(R),i(R),R=J;i($)},X=(R,$,J,ne,W,Q,we,me,_e)=>{we=we||$.type==="svg",R==null?g($,J,ne,W,Q,we,me,_e):A(R,$,W,Q,we,me,_e)},g=(R,$,J,ne,W,Q,we,me)=>{let _e,ue;const{type:Se,props:Te,shapeFlag:Me,transition:Ae,dirs:ze}=R;if(_e=R.el=s(R.type,Q,Te&&Te.is,Te),Me&8?p(_e,R.children):Me&16&&I(R.children,_e,null,ne,W,Q&&Se!=="foreignObject",we,me),ze&&Fi(R,null,ne,"created"),le(_e,R,R.scopeId,we,ne),Te){for(const ut in Te)ut!=="value"&&!qa(ut)&&o(_e,ut,null,Te[ut],Q,R.children,ne,W,Le);"value"in Te&&o(_e,"value",null,Te.value),(ue=Te.onVnodeBeforeMount)&&Rr(ue,ne,R)}ze&&Fi(R,null,ne,"beforeMount");const pt=(!W||W&&!W.pendingBranch)&&Ae&&!Ae.persisted;pt&&Ae.beforeEnter(_e),r(_e,$,J),((ue=Te&&Te.onVnodeMounted)||pt||ze)&&Fn(()=>{ue&&Rr(ue,ne,R),pt&&Ae.enter(_e),ze&&Fi(R,null,ne,"mounted")},W)},le=(R,$,J,ne,W)=>{if(J&&C(R,J),ne)for(let Q=0;Q<ne.length;Q++)C(R,ne[Q]);if(W){let Q=W.subTree;if($===Q){const we=W.vnode;le(R,we,we.scopeId,we.slotScopeIds,W.parent)}}},I=(R,$,J,ne,W,Q,we,me,_e=0)=>{for(let ue=_e;ue<R.length;ue++){const Se=R[ue]=me?mi(R[ue]):Dr(R[ue]);k(null,Se,$,J,ne,W,Q,we,me)}},A=(R,$,J,ne,W,Q,we)=>{const me=$.el=R.el;let{patchFlag:_e,dynamicChildren:ue,dirs:Se}=$;_e|=R.patchFlag&16;const Te=R.props||Rt,Me=$.props||Rt;let Ae;J&&Bi(J,!1),(Ae=Me.onVnodeBeforeUpdate)&&Rr(Ae,J,$,R),Se&&Fi($,R,J,"beforeUpdate"),J&&Bi(J,!0);const ze=W&&$.type!=="foreignObject";if(ue?D(R.dynamicChildren,ue,me,J,ne,ze,Q):we||se(R,$,me,null,J,ne,ze,Q,!1),_e>0){if(_e&16)H(me,$,Te,Me,J,ne,W);else if(_e&2&&Te.class!==Me.class&&o(me,"class",null,Me.class,W),_e&4&&o(me,"style",Te.style,Me.style,W),_e&8){const pt=$.dynamicProps;for(let ut=0;ut<pt.length;ut++){const Ct=pt[ut],Ft=Te[Ct],ln=Me[Ct];(ln!==Ft||Ct==="value")&&o(me,Ct,Ft,ln,W,R.children,J,ne,Le)}}_e&1&&R.children!==$.children&&p(me,$.children)}else!we&&ue==null&&H(me,$,Te,Me,J,ne,W);((Ae=Me.onVnodeUpdated)||Se)&&Fn(()=>{Ae&&Rr(Ae,J,$,R),Se&&Fi($,R,J,"updated")},ne)},D=(R,$,J,ne,W,Q,we)=>{for(let me=0;me<$.length;me++){const _e=R[me],ue=$[me],Se=_e.el&&(_e.type===Fe||!Hi(_e,ue)||_e.shapeFlag&70)?y(_e.el):J;k(_e,ue,Se,null,ne,W,Q,we,!0)}},H=(R,$,J,ne,W,Q,we)=>{if(J!==ne){if(J!==Rt)for(const me in J)!qa(me)&&!(me in ne)&&o(R,me,J[me],null,we,$.children,W,Q,Le);for(const me in ne){if(qa(me))continue;const _e=ne[me],ue=J[me];_e!==ue&&me!=="value"&&o(R,me,ue,_e,we,$.children,W,Q,Le)}"value"in ne&&o(R,"value",J.value,ne.value)}},K=(R,$,J,ne,W,Q,we,me,_e)=>{const ue=$.el=R?R.el:l(""),Se=$.anchor=R?R.anchor:l("");let{patchFlag:Te,dynamicChildren:Me,slotScopeIds:Ae}=$;Ae&&(me=me?me.concat(Ae):Ae),R==null?(r(ue,J,ne),r(Se,J,ne),I($.children,J,Se,W,Q,we,me,_e)):Te>0&&Te&64&&Me&&R.dynamicChildren?(D(R.dynamicChildren,Me,J,W,Q,we,me),($.key!=null||W&&$===W.subTree)&&Ic(R,$,!0)):se(R,$,J,Se,W,Q,we,me,_e)},z=(R,$,J,ne,W,Q,we,me,_e)=>{$.slotScopeIds=me,R==null?$.shapeFlag&512?W.ctx.activate($,J,ne,we,_e):de($,J,ne,W,Q,we,_e):je(R,$,_e)},de=(R,$,J,ne,W,Q,we)=>{const me=R.component=Z_(R,ne,W);if(fl(R)&&(me.ctx.renderer=Ie),Q_(me),me.asyncDep){if(W&&W.registerDep(me,Re),!R.el){const _e=me.subTree=be(fr);P(null,_e,$,J)}return}Re(me,R,$,J,W,Q,we)},je=(R,$,J)=>{const ne=$.component=R.component;if(u_(R,$,J))if(ne.asyncDep&&!ne.asyncResolved){Y(ne,$,J);return}else ne.next=$,r_(ne.update),ne.update();else $.el=R.el,ne.vnode=$},Re=(R,$,J,ne,W,Q,we)=>{const me=()=>{if(R.isMounted){let{next:Se,bu:Te,u:Me,parent:Ae,vnode:ze}=R,pt=Se,ut;Bi(R,!1),Se?(Se.el=ze.el,Y(R,Se,we)):Se=ze,Te&&Ya(Te),(ut=Se.props&&Se.props.onVnodeBeforeUpdate)&&Rr(ut,Ae,Se,ze),Bi(R,!0);const Ct=vc(R),Ft=R.subTree;R.subTree=Ct,k(Ft,Ct,y(Ft.el),He(Ft),R,W,Q),Se.el=Ct.el,pt===null&&c_(R,Ct.el),Me&&Fn(Me,W),(ut=Se.props&&Se.props.onVnodeUpdated)&&Fn(()=>Rr(ut,Ae,Se,ze),W)}else{let Se;const{el:Te,props:Me}=$,{bm:Ae,m:ze,parent:pt}=R,ut=Is($);if(Bi(R,!1),Ae&&Ya(Ae),!ut&&(Se=Me&&Me.onVnodeBeforeMount)&&Rr(Se,pt,$),Bi(R,!0),Te&&vt){const Ct=()=>{R.subTree=vc(R),vt(Te,R.subTree,R,W,null)};ut?$.type.__asyncLoader().then(()=>!R.isUnmounted&&Ct()):Ct()}else{const Ct=R.subTree=vc(R);k(null,Ct,J,ne,R,W,Q),$.el=Ct.el}if(ze&&Fn(ze,W),!ut&&(Se=Me&&Me.onVnodeMounted)){const Ct=$;Fn(()=>Rr(Se,pt,Ct),W)}($.shapeFlag&256||pt&&Is(pt.vnode)&&pt.vnode.shapeFlag&256)&&R.a&&Fn(R.a,W),R.isMounted=!0,$=J=ne=null}},_e=R.effect=new sc(me,()=>mc(ue),R.scope),ue=R.update=()=>_e.run();ue.id=R.uid,Bi(R,!0),ue()},Y=(R,$,J)=>{$.component=R;const ne=R.vnode.props;R.vnode=$,R.next=null,R_(R,$.props,ne,J),F_(R,$.children,J),_o(),sh(),wo()},se=(R,$,J,ne,W,Q,we,me,_e=!1)=>{const ue=R&&R.children,Se=R?R.shapeFlag:0,Te=$.children,{patchFlag:Me,shapeFlag:Ae}=$;if(Me>0){if(Me&128){it(ue,Te,J,ne,W,Q,we,me,_e);return}else if(Me&256){ge(ue,Te,J,ne,W,Q,we,me,_e);return}}Ae&8?(Se&16&&Le(ue,W,Q),Te!==ue&&p(J,Te)):Se&16?Ae&16?it(ue,Te,J,ne,W,Q,we,me,_e):Le(ue,W,Q,!0):(Se&8&&p(J,""),Ae&16&&I(Te,J,ne,W,Q,we,me,_e))},ge=(R,$,J,ne,W,Q,we,me,_e)=>{R=R||vo,$=$||vo;const ue=R.length,Se=$.length,Te=Math.min(ue,Se);let Me;for(Me=0;Me<Te;Me++){const Ae=$[Me]=_e?mi($[Me]):Dr($[Me]);k(R[Me],Ae,J,null,W,Q,we,me,_e)}ue>Se?Le(R,W,Q,!0,!1,Te):I($,J,ne,W,Q,we,me,_e,Te)},it=(R,$,J,ne,W,Q,we,me,_e)=>{let ue=0;const Se=$.length;let Te=R.length-1,Me=Se-1;for(;ue<=Te&&ue<=Me;){const Ae=R[ue],ze=$[ue]=_e?mi($[ue]):Dr($[ue]);if(Hi(Ae,ze))k(Ae,ze,J,null,W,Q,we,me,_e);else break;ue++}for(;ue<=Te&&ue<=Me;){const Ae=R[Te],ze=$[Me]=_e?mi($[Me]):Dr($[Me]);if(Hi(Ae,ze))k(Ae,ze,J,null,W,Q,we,me,_e);else break;Te--,Me--}if(ue>Te){if(ue<=Me){const Ae=Me+1,ze=Ae<Se?$[Ae].el:ne;for(;ue<=Me;)k(null,$[ue]=_e?mi($[ue]):Dr($[ue]),J,ze,W,Q,we,me,_e),ue++}}else if(ue>Me)for(;ue<=Te;)ie(R[ue],W,Q,!0),ue++;else{const Ae=ue,ze=ue,pt=new Map;for(ue=ze;ue<=Me;ue++){const Ne=$[ue]=_e?mi($[ue]):Dr($[ue]);Ne.key!=null&&pt.set(Ne.key,ue)}let ut,Ct=0;const Ft=Me-ze+1;let ln=!1,Ht=0;const pn=new Array(Ft);for(ue=0;ue<Ft;ue++)pn[ue]=0;for(ue=Ae;ue<=Te;ue++){const Ne=R[ue];if(Ct>=Ft){ie(Ne,W,Q,!0);continue}let $e;if(Ne.key!=null)$e=pt.get(Ne.key);else for(ut=ze;ut<=Me;ut++)if(pn[ut-ze]===0&&Hi(Ne,$[ut])){$e=ut;break}$e===void 0?ie(Ne,W,Q,!0):(pn[$e-ze]=ue+1,$e>=Ht?Ht=$e:ln=!0,k(Ne,$[$e],J,null,W,Q,we,me,_e),Ct++)}const te=ln?U_(pn):vo;for(ut=te.length-1,ue=Ft-1;ue>=0;ue--){const Ne=ze+ue,$e=$[Ne],st=Ne+1<Se?$[Ne+1].el:ne;pn[ue]===0?k(null,$e,J,st,W,Q,we,me,_e):ln&&(ut<0||ue!==te[ut]?qe($e,J,st,2):ut--)}}},qe=(R,$,J,ne,W=null)=>{const{el:Q,type:we,transition:me,children:_e,shapeFlag:ue}=R;if(ue&6){qe(R.component.subTree,$,J,ne);return}if(ue&128){R.suspense.move($,J,ne);return}if(ue&64){we.move(R,$,J,Ie);return}if(we===Fe){r(Q,$,J);for(let Te=0;Te<_e.length;Te++)qe(_e[Te],$,J,ne);r(R.anchor,$,J);return}if(we===Dc){G(R,$,J);return}if(ne!==2&&ue&1&&me)if(ne===0)me.beforeEnter(Q),r(Q,$,J),Fn(()=>me.enter(Q),W);else{const{leave:Te,delayLeave:Me,afterLeave:Ae}=me,ze=()=>r(Q,$,J),pt=()=>{Te(Q,()=>{ze(),Ae&&Ae()})};Me?Me(Q,ze,pt):pt()}else r(Q,$,J)},ie=(R,$,J,ne=!1,W=!1)=>{const{type:Q,props:we,ref:me,children:_e,dynamicChildren:ue,shapeFlag:Se,patchFlag:Te,dirs:Me}=R;if(me!=null&&Lc(me,null,J,R,!0),Se&256){$.ctx.deactivate(R);return}const Ae=Se&1&&Me,ze=!Is(R);let pt;if(ze&&(pt=we&&we.onVnodeBeforeUnmount)&&Rr(pt,$,R),Se&6)Ee(R.component,J,ne);else{if(Se&128){R.suspense.unmount(J,ne);return}Ae&&Fi(R,null,$,"beforeUnmount"),Se&64?R.type.remove(R,$,J,W,Ie,ne):ue&&(Q!==Fe||Te>0&&Te&64)?Le(ue,$,J,!1,!0):(Q===Fe&&Te&384||!W&&Se&16)&&Le(_e,$,J),ne&&Ce(R)}(ze&&(pt=we&&we.onVnodeUnmounted)||Ae)&&Fn(()=>{pt&&Rr(pt,$,R),Ae&&Fi(R,null,$,"unmounted")},J)},Ce=R=>{const{type:$,el:J,anchor:ne,transition:W}=R;if($===Fe){ke(J,ne);return}if($===Dc){x(R);return}const Q=()=>{i(J),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(R.shapeFlag&1&&W&&!W.persisted){const{leave:we,delayLeave:me}=W,_e=()=>we(J,Q);me?me(R.el,Q,_e):_e()}else Q()},ke=(R,$)=>{let J;for(;R!==$;)J=m(R),i(R),R=J;i($)},Ee=(R,$,J)=>{const{bum:ne,scope:W,update:Q,subTree:we,um:me}=R;ne&&Ya(ne),W.stop(),Q&&(Q.active=!1,ie(we,R,$,J)),me&&Fn(me,$),Fn(()=>{R.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&R.asyncDep&&!R.asyncResolved&&R.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},Le=(R,$,J,ne=!1,W=!1,Q=0)=>{for(let we=Q;we<R.length;we++)ie(R[we],$,J,ne,W)},He=R=>R.shapeFlag&6?He(R.component.subTree):R.shapeFlag&128?R.suspense.next():m(R.anchor||R.el),Ze=(R,$,J)=>{R==null?$._vnode&&ie($._vnode,null,null,!0):k($._vnode||null,R,$,null,null,null,J),sh(),ah(),$._vnode=R},Ie={p:k,um:ie,m:qe,r:Ce,mt:de,mc:I,pc:se,pbc:D,n:He,o:e};let ot,vt;return t&&([ot,vt]=t(Ie)),{render:Ze,hydrate:ot,createApp:B_(Ze,ot)}}function Bi({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ic(e,t,n=!1){const r=e.children,i=t.children;if(Ye(r)&&Ye(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]=mi(i[o]),l.el=s.el),n||Ic(s,l)),l.type===ml&&(l.el=s.el)}}function U_(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 W_=e=>e.__isTeleport,Ds=e=>e&&(e.disabled||e.disabled===""),$h=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Pc=(e,t)=>{const n=e&&e.to;return Kt(n)?t?t(n):null:n},K_={__isTeleport:!0,process(e,t,n,r,i,o,s,l,c,d){const{mc:p,pc:y,pbc:m,o:{insert:C,querySelector:b,createText:k,createComment:L}}=d,P=Ds(t.props);let{shapeFlag:j,children:G,dynamicChildren:x}=t;if(e==null){const X=t.el=k(""),g=t.anchor=k("");C(X,n,r),C(g,n,r);const le=t.target=Pc(t.props,b),I=t.targetAnchor=k("");le&&(C(I,le),s=s||$h(le));const A=(D,H)=>{j&16&&p(G,D,H,i,o,s,l,c)};P?A(n,g):le&&A(le,I)}else{t.el=e.el;const X=t.anchor=e.anchor,g=t.target=e.target,le=t.targetAnchor=e.targetAnchor,I=Ds(e.props),A=I?n:g,D=I?X:le;if(s=s||$h(g),x?(m(e.dynamicChildren,x,A,i,o,s,l),Ic(e,t,!0)):c||y(e,t,A,D,i,o,s,l,!1),P)I||gl(t,n,X,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const H=t.target=Pc(t.props,b);H&&gl(t,H,null,d,0)}else I&&gl(t,g,le,d,1)}Bh(t)},remove(e,t,n,r,{um:i,o:{remove:o}},s){const{shapeFlag:l,children:c,anchor:d,targetAnchor:p,target:y,props:m}=e;if(y&&o(p),(s||!Ds(m))&&(o(d),l&16))for(let C=0;C<c.length;C++){const b=c[C];i(b,t,n,!0,!!b.dynamicChildren)}},move:gl,hydrate:V_};function gl(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:p}=e,y=o===2;if(y&&r(s,t,n),(!y||Ds(p))&&c&16)for(let m=0;m<d.length;m++)i(d[m],t,n,2);y&&r(l,t,n)}function V_(e,t,n,r,i,o,{o:{nextSibling:s,parentNode:l,querySelector:c}},d){const p=t.target=Pc(t.props,c);if(p){const y=p._lpa||p.firstChild;if(t.shapeFlag&16)if(Ds(t.props))t.anchor=d(s(e),t,l(e),n,r,i,o),t.targetAnchor=y;else{t.anchor=s(e);let m=y;for(;m;)if(m=s(m),m&&m.nodeType===8&&m.data==="teleport anchor"){t.targetAnchor=m,p._lpa=t.targetAnchor&&s(t.targetAnchor);break}d(y,t,p,n,r,i,o)}Bh(t)}return t.anchor&&s(t.anchor)}const q_=K_;function Bh(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 Fe=Symbol(void 0),ml=Symbol(void 0),fr=Symbol(void 0),Dc=Symbol(void 0),Rs=[];let kr=null;function O(e=!1){Rs.push(kr=e?null:[])}function z_(){Rs.pop(),kr=Rs[Rs.length-1]||null}let Ns=1;function Hh(e){Ns+=e}function jh(e){return e.dynamicChildren=Ns>0?kr||vo:null,z_(),Ns>0&&kr&&kr.push(e),e}function N(e,t,n,r,i,o){return jh(T(e,t,n,r,i,o,!0))}function Ue(e,t,n,r,i){return jh(be(e,t,n,r,i,!0))}function vl(e){return e?e.__v_isVNode===!0:!1}function Hi(e,t){return e.type===t.type&&e.key===t.key}const yl="__vInternal",Uh=({key:e})=>e??null,bl=({ref:e,ref_key:t,ref_for:n})=>e!=null?Kt(e)||Cn(e)||gt(e)?{i:gn,r:e,k:t,f:!!n}:e:null;function T(e,t=null,n=null,r=0,i=null,o=e===Fe?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Uh(t),ref:t&&bl(t),scopeId:ll,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:gn};return l?(Rc(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=Kt(n)?8:16),Ns>0&&!s&&kr&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&kr.push(c),c}const be=G_;function G_(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===_h)&&(e=fr),vl(e)){const l=gi(e,t,!0);return n&&Rc(l,n),Ns>0&&!o&&kr&&(l.shapeFlag&6?kr[kr.indexOf(e)]=l:kr.push(l)),l.patchFlag|=-2,l}if(i1(e)&&(e=e.__vccOpts),t){t=Y_(t);let{class:l,style:c}=t;l&&!Kt(l)&&(t.class=et(l)),It(c)&&(Xp(c)&&!Ye(c)&&(c=hn({},c)),t.style=mt(c))}const s=Kt(e)?1:f_(e)?128:W_(e)?64:It(e)?4:gt(e)?2:0;return T(e,t,n,r,i,s,o,!0)}function Y_(e){return e?Xp(e)||yl in e?hn({},e):e:null}function gi(e,t,n=!1){const{props:r,ref:i,patchFlag:o,children:s}=e,l=t?Cl(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Uh(l),ref:t&&t.ref?n&&i?Ye(i)?i.concat(bl(t)):[i,bl(t)]:bl(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!==Fe?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&&gi(e.ssContent),ssFallback:e.ssFallback&&gi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Vt(e=" ",t=0){return be(ml,null,e,t)}function xe(e="",t=!1){return t?(O(),Ue(fr,null,e)):be(fr,null,e)}function Dr(e){return e==null||typeof e=="boolean"?be(fr):Ye(e)?be(Fe,null,e.slice()):typeof e=="object"?mi(e):be(ml,null,String(e))}function mi(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gi(e)}function Rc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ye(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Rc(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(yl in t)?t._ctx=gn:i===3&&gn&&(gn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else gt(t)?(t={default:t,_ctx:gn},n=32):(t=String(t),r&64?(n=16,t=[Vt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Cl(...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=et([t.class,r.class]));else if(i==="style")t.style=mt([t.style,r.style]);else if(Va(i)){const o=t[i],s=r[i];s&&o!==s&&!(Ye(o)&&o.includes(s))&&(t[i]=o?[].concat(o,s):s)}else i!==""&&(t[i]=r[i])}return t}function Rr(e,t,n,r=null){lr(e,t,7,[n,r])}const X_=Fh();let J_=0;function Z_(e,t,n){const r=e.type,i=(t?t.appContext:e.appContext)||X_,o={uid:J_++,vnode:e,type:r,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new CC(!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:Oh(r,i),emitsOptions:uh(r,i),emit:null,emitted:null,propsDefaults:Rt,inheritAttrs:r.inheritAttrs,ctx:Rt,data:Rt,props:Rt,attrs:Rt,slots:Rt,refs:Rt,setupState:Rt,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=s_.bind(null,o),e.ce&&e.ce(o),o}let Yt=null;const Nc=()=>Yt||gn,Lo=e=>{Yt=e,e.scope.on()},ji=()=>{Yt&&Yt.scope.off(),Yt=null};function Wh(e){return e.vnode.shapeFlag&4}let Ms=!1;function Q_(e,t=!1){Ms=t;const{props:n,children:r}=e.vnode,i=Wh(e);D_(e,n,i,t),M_(e,r);const o=i?e1(e,t):void 0;return Ms=!1,o}function e1(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Jp(new Proxy(e.ctx,A_));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?n1(e):null;Lo(e),_o();const o=hi(r,e,0,[e.props,i]);if(wo(),ji(),Ep(o)){if(o.then(ji,ji),t)return o.then(s=>{Kh(e,s,t)}).catch(s=>{ol(s,e,0)});e.asyncDep=o}else Kh(e,o,t)}else qh(e,t)}function Kh(e,t,n){gt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:It(t)&&(e.setupState=nh(t)),qh(e,n)}let Vh;function qh(e,t,n){const r=e.type;if(!e.render){if(!t&&Vh&&!r.render){const i=r.template||Sc(e).template;if(i){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,d=hn(hn({isCustomElement:o,delimiters:l},s),c);r.render=Vh(i,d)}}e.render=r.render||wr}Lo(e),_o(),E_(e),wo(),ji()}function t1(e){return new Proxy(e.attrs,{get(t,n){return Rn(e,"get","$attrs"),t[n]}})}function n1(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=t1(e))},slots:e.slots,emit:e.emit,expose:t}}function _l(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(nh(Jp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ps)return Ps[n](e)},has(t,n){return n in t||n in Ps}}))}function r1(e,t=!0){return gt(e)?e.displayName||e.name:e.name||t&&e.__name}function i1(e){return gt(e)&&"__vccOpts"in e}const nn=(e,t)=>e_(e,t,Ms);function o1(e,t,n){const r=arguments.length;return r===2?It(t)&&!Ye(t)?vl(t)?be(e,null,[t]):be(e,t):be(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&vl(n)&&(n=[n]),be(e,t,n))}const s1=Symbol(""),a1=()=>Eo(s1),l1="3.2.47",u1="http://www.w3.org/2000/svg",Ui=typeof document<"u"?document:null,zh=Ui&&Ui.createElement("template"),c1={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?Ui.createElementNS(u1,e):Ui.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Ui.createTextNode(e),createComment:e=>Ui.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ui.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{zh.innerHTML=r?`<svg>${e}</svg>`:e;const l=zh.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 f1(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 d1(e,t,n){const r=e.style,i=Kt(n);if(n&&!i){if(t&&!Kt(t))for(const o in t)n[o]==null&&Mc(r,o,"");for(const o in n)Mc(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 Gh=/\s*!important$/;function Mc(e,t,n){if(Ye(n))n.forEach(r=>Mc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=p1(e,t);Gh.test(n)?e.setProperty(Co(r),n.replace(Gh,""),"important"):e[r]=n}}const Yh=["Webkit","Moz","ms"],Fc={};function p1(e,t){const n=Fc[t];if(n)return n;let r=Ir(t);if(r!=="filter"&&r in e)return Fc[t]=r;r=Ga(r);for(let i=0;i<Yh.length;i++){const o=Yh[i]+r;if(o in e)return Fc[t]=o}return t}const Xh="http://www.w3.org/1999/xlink";function h1(e,t,n,r,i){if(r&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Xh,t.slice(6,t.length)):e.setAttributeNS(Xh,t,n);else{const o=cC(t);n==null||o&&!xp(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function g1(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=xp(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{e[t]=n}catch{}l&&e.removeAttribute(t)}function vi(e,t,n,r){e.addEventListener(t,n,r)}function m1(e,t,n,r){e.removeEventListener(t,n,r)}function v1(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]=y1(t);if(r){const d=o[t]=_1(r,i);vi(e,l,d,c)}else s&&(m1(e,l,s,c),o[t]=void 0)}}const Jh=/(?:Once|Passive|Capture)$/;function y1(e){let t;if(Jh.test(e)){t={};let r;for(;r=e.match(Jh);)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 $c=0;const b1=Promise.resolve(),C1=()=>$c||(b1.then(()=>$c=0),$c=Date.now());function _1(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;lr(w1(r,n.value),t,5,[r])};return n.value=e,n.attached=C1(),n}function w1(e,t){if(Ye(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 Zh=/^on[a-z]/,T1=(e,t,n,r,i=!1,o,s,l,c)=>{t==="class"?f1(e,r,i):t==="style"?d1(e,n,r):Va(t)?Zu(t)||v1(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):k1(e,t,r,i))?g1(e,t,r,o,s,l,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),h1(e,t,r,i))};function k1(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Zh.test(t)&>(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Zh.test(t)&&Kt(n)?!1:t in e}const yi="transition",Fs="animation",fn=(e,{slots:t})=>o1(hh,x1(e),t);fn.displayName="Transition";const Qh={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};fn.props=hn({},hh.props,Qh);const Wi=(e,t=[])=>{Ye(e)?e.forEach(n=>n(...t)):e&&e(...t)},eg=e=>e?Ye(e)?e.some(t=>t.length>1):e.length>1:!1;function x1(e){const t={};for(const K in e)K in Qh||(t[K]=e[K]);if(e.css===!1)return t;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:d=s,appearToClass:p=l,leaveFromClass:y=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,b=S1(i),k=b&&b[0],L=b&&b[1],{onBeforeEnter:P,onEnter:j,onEnterCancelled:G,onLeave:x,onLeaveCancelled:X,onBeforeAppear:g=P,onAppear:le=j,onAppearCancelled:I=G}=t,A=(K,z,de)=>{Ki(K,z?p:l),Ki(K,z?d:s),de&&de()},D=(K,z)=>{K._isLeaving=!1,Ki(K,y),Ki(K,C),Ki(K,m),z&&z()},H=K=>(z,de)=>{const je=K?le:j,Re=()=>A(z,K,de);Wi(je,[z,Re]),tg(()=>{Ki(z,K?c:o),bi(z,K?p:l),eg(je)||ng(z,r,k,Re)})};return hn(t,{onBeforeEnter(K){Wi(P,[K]),bi(K,o),bi(K,s)},onBeforeAppear(K){Wi(g,[K]),bi(K,c),bi(K,d)},onEnter:H(!1),onAppear:H(!0),onLeave(K,z){K._isLeaving=!0;const de=()=>D(K,z);bi(K,y),O1(),bi(K,m),tg(()=>{K._isLeaving&&(Ki(K,y),bi(K,C),eg(x)||ng(K,r,L,de))}),Wi(x,[K,de])},onEnterCancelled(K){A(K,!1),Wi(G,[K])},onAppearCancelled(K){A(K,!0),Wi(I,[K])},onLeaveCancelled(K){D(K),Wi(X,[K])}})}function S1(e){if(e==null)return null;if(It(e))return[Bc(e.enter),Bc(e.leave)];{const t=Bc(e);return[t,t]}}function Bc(e){return yC(e)}function bi(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function Ki(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function tg(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let A1=0;function ng(e,t,n,r){const i=e._endId=++A1,o=()=>{i===e._endId&&r()};if(n)return setTimeout(o,n);const{type:s,timeout:l,propCount:c}=E1(e,t);if(!s)return r();const d=s+"end";let p=0;const y=()=>{e.removeEventListener(d,m),o()},m=C=>{C.target===e&&++p>=c&&y()};setTimeout(()=>{p<c&&y()},l+1),e.addEventListener(d,m)}function E1(e,t){const n=window.getComputedStyle(e),r=b=>(n[b]||"").split(", "),i=r(`${yi}Delay`),o=r(`${yi}Duration`),s=rg(i,o),l=r(`${Fs}Delay`),c=r(`${Fs}Duration`),d=rg(l,c);let p=null,y=0,m=0;t===yi?s>0&&(p=yi,y=s,m=o.length):t===Fs?d>0&&(p=Fs,y=d,m=c.length):(y=Math.max(s,d),p=y>0?s>d?yi:Fs:null,m=p?p===yi?o.length:c.length:0);const C=p===yi&&/\b(transform|all)(,|$)/.test(r(`${yi}Property`).toString());return{type:p,timeout:y,propCount:m,hasTransform:C}}function rg(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,r)=>ig(n)+ig(e[r])))}function ig(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function O1(){return document.body.offsetHeight}const Io=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ye(t)?n=>Ya(t,n):t};function L1(e){e.target.composing=!0}function og(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Gn={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=Io(i);const o=r||i.props&&i.props.type==="number";vi(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&&vi(e,"change",()=>{e.value=e.value.trim()}),t||(vi(e,"compositionstart",L1),vi(e,"compositionend",og),vi(e,"change",og))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},o){if(e._assign=Io(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)}},Hc={deep:!0,created(e,t,n){e._assign=Io(n),vi(e,"change",()=>{const r=e._modelValue,i=$s(e),o=e.checked,s=e._assign;if(Ye(r)){const l=Ju(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(bo(r)){const l=new Set(r);o?l.add(i):l.delete(i),s(l)}else s(lg(e,o))})},mounted:sg,beforeUpdate(e,t,n){e._assign=Io(n),sg(e,t,n)}};function sg(e,{value:t,oldValue:n},r){e._modelValue=t,Ye(t)?e.checked=Ju(t,r.props.value)>-1:bo(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=Ts(t,lg(e,!0)))}const Po={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=bo(t);vi(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?Ja($s(s)):$s(s));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=Io(r)},mounted(e,{value:t}){ag(e,t)},beforeUpdate(e,t,n){e._assign=Io(n)},updated(e,{value:t}){ag(e,t)}};function ag(e,t){const n=e.multiple;if(!(n&&!Ye(t)&&!bo(t))){for(let r=0,i=e.options.length;r<i;r++){const o=e.options[r],s=$s(o);if(n)Ye(t)?o.selected=Ju(t,s)>-1:o.selected=t.has(s);else if(Ts($s(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function $s(e){return"_value"in e?e._value:e.value}function lg(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const I1=["ctrl","shift","alt","meta"],P1={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)=>I1.some(n=>e[`${n}Key`]&&!t.includes(n))},at=(e,t)=>(n,...r)=>{for(let i=0;i<t.length;i++){const o=P1[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):Bs(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),Bs(e,!0),r.enter(e)):r.leave(e,()=>{Bs(e,!1)}):Bs(e,t))},beforeUnmount(e,{value:t}){Bs(e,t)}};function Bs(e,t){e.style.display=t?e._vod:"none"}const D1=hn({patchProp:T1},c1);let ug;function R1(){return ug||(ug=H_(D1))}const N1=(...e)=>{const t=R1().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=M1(r);if(!i)return;const o=t._component;!gt(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 M1(e){return Kt(e)?document.querySelector(e):e}/**!
|
||
* Sortable 1.15.0
|
||
* @author RubaXa <trash@rubaxa.org>
|
||
* @author owenm <owen23355@gmail.com>
|
||
* @license MIT
|
||
*/function cg(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 Nr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cg(Object(n),!0).forEach(function(r){F1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wl=function(t){return typeof t}:wl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function F1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yr(){return Yr=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},Yr.apply(this,arguments)}function $1(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 B1(e,t){if(e==null)return{};var n=$1(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 H1="1.15.0";function Xr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var Jr=Xr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Hs=Xr(/Edge/i),fg=Xr(/firefox/i),js=Xr(/safari/i)&&!Xr(/chrome/i)&&!Xr(/android/i),dg=Xr(/iP(ad|od|hone)/i),pg=Xr(/chrome/i)&&Xr(/android/i),hg={capture:!1,passive:!1};function St(e,t,n){e.addEventListener(t,n,!Jr&&hg)}function wt(e,t,n){e.removeEventListener(t,n,!Jr&&hg)}function Tl(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 j1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Mr(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Tl(e,t):Tl(e,t))||r&&e===n)return e;if(e===n)break}while(e=j1(e))}return null}var gg=/\s+/g;function Yn(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(gg," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(gg," ")}}function nt(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 Do(e,t){var n="";if(typeof e=="string")n=e;else do{var r=nt(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 mg(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 Fr(){var e=document.scrollingElement;return e||document.documentElement}function rn(e,t,n,r,i){if(!(!e.getBoundingClientRect&&e!==window)){var o,s,l,c,d,p,y;if(e!==window&&e.parentNode&&e!==Fr()?(o=e.getBoundingClientRect(),s=o.top,l=o.left,c=o.bottom,d=o.right,p=o.height,y=o.width):(s=0,l=0,c=window.innerHeight,d=window.innerWidth,p=window.innerHeight,y=window.innerWidth),(t||n)&&e!==window&&(i=i||e.parentNode,!Jr))do if(i&&i.getBoundingClientRect&&(nt(i,"transform")!=="none"||n&&nt(i,"position")!=="static")){var m=i.getBoundingClientRect();s-=m.top+parseInt(nt(i,"border-top-width")),l-=m.left+parseInt(nt(i,"border-left-width")),c=s+o.height,d=l+o.width;break}while(i=i.parentNode);if(r&&e!==window){var C=Do(i||e),b=C&&C.a,k=C&&C.d;C&&(s/=k,l/=b,y/=b,p/=k,c=s+p,d=l+y)}return{top:s,left:l,bottom:c,right:d,width:y,height:p}}}function vg(e,t,n){for(var r=Ci(e,!0),i=rn(e)[t];r;){var o=rn(r)[n],s=void 0;if(n==="top"||n==="left"?s=i>=o:s=i<=o,!s)return r;if(r===Fr())break;r=Ci(r,!1)}return!1}function Ro(e,t,n,r){for(var i=0,o=0,s=e.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==rt.ghost&&(r||s[o]!==rt.dragged)&&Mr(s[o],n.draggable,e,!1)){if(i===t)return s[o];i++}o++}return null}function jc(e,t){for(var n=e.lastElementChild;n&&(n===rt.ghost||nt(n,"display")==="none"||t&&!Tl(n,t));)n=n.previousElementSibling;return n||null}function dr(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==rt.clone&&(!t||Tl(e,t))&&n++;return n}function yg(e){var t=0,n=0,r=Fr();if(e)do{var i=Do(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 U1(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 Ci(e,t){if(!e||!e.getBoundingClientRect)return Fr();var n=e,r=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=nt(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 Fr();if(r||t)return n;r=!0}}while(n=n.parentNode);return Fr()}function W1(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Uc(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 Us;function bg(e,t){return function(){if(!Us){var n=arguments,r=this;n.length===1?e.call(r,n[0]):e.apply(r,n),Us=setTimeout(function(){Us=void 0},t)}}}function K1(){clearTimeout(Us),Us=void 0}function Cg(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function _g(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 Xn="Sortable"+new Date().getTime();function V1(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var r=[].slice.call(this.el.children);r.forEach(function(i){if(!(nt(i,"display")==="none"||i===rt.ghost)){e.push({target:i,rect:rn(i)});var o=Nr({},e[e.length-1].rect);if(i.thisAnimationDuration){var s=Do(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(U1(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,p=d.fromRect,y=rn(d),m=d.prevFromRect,C=d.prevToRect,b=l.rect,k=Do(d,!0);k&&(y.top-=k.f,y.left-=k.e),d.toRect=y,d.thisAnimationDuration&&Uc(m,y)&&!Uc(p,y)&&(b.top-y.top)/(b.left-y.left)===(p.top-y.top)/(p.left-y.left)&&(c=z1(b,m,C,i.options)),Uc(y,p)||(d.prevFromRect=p,d.prevToRect=y,c||(c=i.options.animation),i.animate(d,b,y,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){nt(r,"transition",""),nt(r,"transform","");var l=Do(this.el),c=l&&l.a,d=l&&l.d,p=(i.left-o.left)/(c||1),y=(i.top-o.top)/(d||1);r.animatingX=!!p,r.animatingY=!!y,nt(r,"transform","translate3d("+p+"px,"+y+"px,0)"),this.forRepaintDummy=q1(r),nt(r,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),nt(r,"transform","translate3d(0,0,0)"),typeof r.animated=="number"&&clearTimeout(r.animated),r.animated=setTimeout(function(){nt(r,"transition",""),nt(r,"transform",""),r.animated=!1,r.animatingX=!1,r.animatingY=!1},s)}}}}function q1(e){return e.offsetWidth}function z1(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 No=[],Wc={initializeByDefault:!0},Ws={mount:function(t){for(var n in Wc)Wc.hasOwnProperty(n)&&!(n in t)&&(t[n]=Wc[n]);No.forEach(function(r){if(r.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),No.push(t)},pluginEvent:function(t,n,r){var i=this;this.eventCanceled=!1,r.cancel=function(){i.eventCanceled=!0};var o=t+"Global";No.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][o]&&n[s.pluginName][o](Nr({sortable:n},r)),n.options[s.pluginName]&&n[s.pluginName][t]&&n[s.pluginName][t](Nr({sortable:n},r)))})},initializePlugins:function(t,n,r,i){No.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,Yr(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 No.forEach(function(i){typeof i.eventProperties=="function"&&Yr(r,i.eventProperties.call(n[i.pluginName],t))}),r},modifyOption:function(t,n,r){var i;return No.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[n]=="function"&&(i=o.optionListeners[n].call(t[o.pluginName],r))}),i}};function G1(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,p=e.oldDraggableIndex,y=e.newDraggableIndex,m=e.originalEvent,C=e.putSortable,b=e.extraEventProperties;if(t=t||n&&n[Xn],!!t){var k,L=t.options,P="on"+r.charAt(0).toUpperCase()+r.substr(1);window.CustomEvent&&!Jr&&!Hs?k=new CustomEvent(r,{bubbles:!0,cancelable:!0}):(k=document.createEvent("Event"),k.initEvent(r,!0,!0)),k.to=s||n,k.from=l||n,k.item=i||n,k.clone=o,k.oldIndex=c,k.newIndex=d,k.oldDraggableIndex=p,k.newDraggableIndex=y,k.originalEvent=m,k.pullMode=C?C.lastPutMode:void 0;var j=Nr(Nr({},b),Ws.getEventProperties(r,t));for(var G in j)k[G]=j[G];n&&n.dispatchEvent(k),L[P]&&L[P].call(t,k)}}var Y1=["evt"],$n=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=B1(r,Y1);Ws.pluginEvent.bind(rt)(t,n,Nr({dragEl:Oe,parentEl:qt,ghostEl:ht,rootEl:$t,nextEl:Vi,lastDownEl:kl,cloneEl:Ut,cloneHidden:_i,dragStarted:Vs,putSortable:mn,activeSortable:rt.active,originalEvent:i,oldIndex:Mo,oldDraggableIndex:Ks,newIndex:Jn,newDraggableIndex:wi,hideGhostForTarget:Eg,unhideGhostForTarget:Og,cloneNowHidden:function(){_i=!0},cloneNowShown:function(){_i=!1},dispatchSortableEvent:function(l){Ln({sortable:n,name:l,originalEvent:i})}},o))};function Ln(e){G1(Nr({putSortable:mn,cloneEl:Ut,targetEl:Oe,rootEl:$t,oldIndex:Mo,oldDraggableIndex:Ks,newIndex:Jn,newDraggableIndex:wi},e))}var Oe,qt,ht,$t,Vi,kl,Ut,_i,Mo,Jn,Ks,wi,xl,mn,Fo=!1,Sl=!1,Al=[],qi,xr,Kc,Vc,wg,Tg,Vs,$o,qs,zs=!1,El=!1,Ol,wn,qc=[],zc=!1,Ll=[],Il=typeof document<"u",Pl=dg,kg=Hs||Jr?"cssFloat":"float",X1=Il&&!pg&&!dg&&"draggable"in document.createElement("div"),xg=function(){if(Il){if(Jr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Sg=function(t,n){var r=nt(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=Ro(t,0,n),s=Ro(t,1,n),l=o&&nt(o),c=s&&nt(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+rn(o).width,p=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+rn(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 y=l.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===y)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=i&&r[kg]==="none"||s&&r[kg]==="none"&&d+p>i)?"vertical":"horizontal"},J1=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},Z1=function(t,n){var r;return Al.some(function(i){var o=i[Xn].options.emptyInsertThreshold;if(!(!o||jc(i))){var s=rn(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},Ag=function(t){function n(o,s){return function(l,c,d,p){var y=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(o==null&&(s||y))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,p),s)(l,c,d,p);var m=(s?l:c).options.group.name;return o===!0||typeof o=="string"&&o===m||o.join&&o.indexOf(m)>-1}}var r={},i=t.group;(!i||wl(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},Eg=function(){!xg&&ht&&nt(ht,"display","none")},Og=function(){!xg&&ht&&nt(ht,"display","")};Il&&!pg&&document.addEventListener("click",function(e){if(Sl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Sl=!1,!1},!0);var zi=function(t){if(Oe){t=t.touches?t.touches[0]:t;var n=Z1(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[Xn]._onDragOver(r)}}},Q1=function(t){Oe&&Oe.parentNode[Xn]._isOutsideThisEl(t.target)};function rt(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=Yr({},t),e[Xn]=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 Sg(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:rt.supportPointer!==!1&&"PointerEvent"in window&&!js,emptyInsertThreshold:5};Ws.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);Ag(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:X1,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)),Al.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Yr(this,V1())}rt.prototype={constructor:rt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&($o=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Oe):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,p=i.filter;if(aw(r),!Oe&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&js&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Mr(c,i.draggable,r,!1),!(c&&c.animated)&&kl!==c)){if(Mo=dr(c),Ks=dr(c,i.draggable),typeof p=="function"){if(p.call(this,t,c,this)){Ln({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),$n("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(p&&(p=p.split(",").some(function(y){if(y=Mr(d,y.trim(),r,!1),y)return Ln({sortable:n,rootEl:y,name:"filter",targetEl:c,fromEl:r,toEl:r}),$n("filter",n,{evt:t}),!0}),p)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Mr(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&&!Oe&&r.parentNode===o){var d=rn(r);if($t=o,Oe=r,qt=Oe.parentNode,Vi=Oe.nextSibling,kl=r,xl=s.group,rt.dragged=Oe,qi={target:Oe,clientX:(n||t).clientX,clientY:(n||t).clientY},wg=qi.clientX-d.left,Tg=qi.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Oe.style["will-change"]="all",c=function(){if($n("delayEnded",i,{evt:t}),rt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!fg&&i.nativeDraggable&&(Oe.draggable=!0),i._triggerDragStart(t,n),Ln({sortable:i,name:"choose",originalEvent:t}),Yn(Oe,s.chosenClass,!0)},s.ignore.split(",").forEach(function(p){mg(Oe,p.trim(),Gc)}),St(l,"dragover",zi),St(l,"mousemove",zi),St(l,"touchmove",zi),St(l,"mouseup",i._onDrop),St(l,"touchend",i._onDrop),St(l,"touchcancel",i._onDrop),fg&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Oe.draggable=!0),$n("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Hs||Jr))){if(rt.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(){Oe&&Gc(Oe),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(Oe,"dragend",this),St($t,"dragstart",this._onDragStart));try{document.selection?Rl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Fo=!1,$t&&Oe){$n("dragStarted",this,{evt:n}),this.nativeDraggable&&St(document,"dragover",Q1);var r=this.options;!t&&Yn(Oe,r.dragClass,!1),Yn(Oe,r.ghostClass,!0),rt.active=this,t&&this._appendGhost(),Ln({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(xr){this._lastX=xr.clientX,this._lastY=xr.clientY,Eg();for(var t=document.elementFromPoint(xr.clientX,xr.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(xr.clientX,xr.clientY),t!==n);)n=t;if(Oe.parentNode[Xn]._isOutsideThisEl(t),n)do{if(n[Xn]){var r=void 0;if(r=n[Xn]._onDragOver({clientX:xr.clientX,clientY:xr.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);Og()}},_onTouchMove:function(t){if(qi){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,s=ht&&Do(ht,!0),l=ht&&s&&s.a,c=ht&&s&&s.d,d=Pl&&wn&&yg(wn),p=(o.clientX-qi.clientX+i.x)/(l||1)+(d?d[0]-qc[0]:0)/(l||1),y=(o.clientY-qi.clientY+i.y)/(c||1)+(d?d[1]-qc[1]:0)/(c||1);if(!rt.active&&!Fo){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<r)return;this._onDragStart(t,!0)}if(ht){s?(s.e+=p-(Kc||0),s.f+=y-(Vc||0)):s={a:1,b:0,c:0,d:1,e:p,f:y};var m="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");nt(ht,"webkitTransform",m),nt(ht,"mozTransform",m),nt(ht,"msTransform",m),nt(ht,"transform",m),Kc=p,Vc=y,xr=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ht){var t=this.options.fallbackOnBody?document.body:$t,n=rn(Oe,!0,Pl,!0,t),r=this.options;if(Pl){for(wn=t;nt(wn,"position")==="static"&&nt(wn,"transform")==="none"&&wn!==document;)wn=wn.parentNode;wn!==document.body&&wn!==document.documentElement?(wn===document&&(wn=Fr()),n.top+=wn.scrollTop,n.left+=wn.scrollLeft):wn=Fr(),qc=yg(wn)}ht=Oe.cloneNode(!0),Yn(ht,r.ghostClass,!1),Yn(ht,r.fallbackClass,!0),Yn(ht,r.dragClass,!0),nt(ht,"transition",""),nt(ht,"transform",""),nt(ht,"box-sizing","border-box"),nt(ht,"margin",0),nt(ht,"top",n.top),nt(ht,"left",n.left),nt(ht,"width",n.width),nt(ht,"height",n.height),nt(ht,"opacity","0.8"),nt(ht,"position",Pl?"absolute":"fixed"),nt(ht,"zIndex","100000"),nt(ht,"pointerEvents","none"),rt.ghost=ht,t.appendChild(ht),nt(ht,"transform-origin",wg/parseInt(ht.style.width)*100+"% "+Tg/parseInt(ht.style.height)*100+"%")}},_onDragStart:function(t,n){var r=this,i=t.dataTransfer,o=r.options;if($n("dragStart",this,{evt:t}),rt.eventCanceled){this._onDrop();return}$n("setupClone",this),rt.eventCanceled||(Ut=_g(Oe),Ut.removeAttribute("id"),Ut.draggable=!1,Ut.style["will-change"]="",this._hideClone(),Yn(Ut,this.options.chosenClass,!1),rt.clone=Ut),r.cloneId=Rl(function(){$n("clone",r),!rt.eventCanceled&&(r.options.removeCloneOnHide||$t.insertBefore(Ut,Oe),r._hideClone(),Ln({sortable:r,name:"clone"}))}),!n&&Yn(Oe,o.dragClass,!0),n?(Sl=!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,Oe)),St(document,"drop",r),nt(Oe,"transform","translateZ(0)")),Fo=!0,r._dragStartId=Rl(r._dragStarted.bind(r,n,t)),St(document,"selectstart",r),Vs=!0,js&&nt(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=rt.active,p=xl===c,y=l.sort,m=mn||d,C,b=this,k=!1;if(zc)return;function L(se,ge){$n(se,b,Nr({evt:t,isOwner:p,axis:C?"vertical":"horizontal",revert:s,dragRect:i,targetRect:o,canSort:y,fromSortable:m,target:r,completed:j,onMove:function(qe,ie){return Dl($t,n,Oe,i,qe,rn(qe),t,ie)},changed:G},ge))}function P(){L("dragOverAnimationCapture"),b.captureAnimationState(),b!==m&&m.captureAnimationState()}function j(se){return L("dragOverCompleted",{insertion:se}),se&&(p?d._hideClone():d._showClone(b),b!==m&&(Yn(Oe,mn?mn.options.ghostClass:d.options.ghostClass,!1),Yn(Oe,l.ghostClass,!0)),mn!==b&&b!==rt.active?mn=b:b===rt.active&&mn&&(mn=null),m===b&&(b._ignoreWhileAnimating=r),b.animateAll(function(){L("dragOverAnimationComplete"),b._ignoreWhileAnimating=null}),b!==m&&(m.animateAll(),m._ignoreWhileAnimating=null)),(r===Oe&&!Oe.animated||r===n&&!r.animated)&&($o=null),!l.dragoverBubble&&!t.rootEl&&r!==document&&(Oe.parentNode[Xn]._isOutsideThisEl(t.target),!se&&zi(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),k=!0}function G(){Jn=dr(Oe),wi=dr(Oe,l.draggable),Ln({sortable:b,name:"change",toEl:n,newIndex:Jn,newDraggableIndex:wi,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),r=Mr(r,l.draggable,n,!0),L("dragOver"),rt.eventCanceled)return k;if(Oe.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||b._ignoreWhileAnimating===r)return j(!1);if(Sl=!1,d&&!l.disabled&&(p?y||(s=qt!==$t):mn===this||(this.lastPutMode=xl.checkPull(this,d,Oe,t))&&c.checkPut(this,d,Oe,t))){if(C=this._getDirection(t,r)==="vertical",i=rn(Oe),L("dragOverValid"),rt.eventCanceled)return k;if(s)return qt=$t,P(),this._hideClone(),L("revert"),rt.eventCanceled||(Vi?$t.insertBefore(Oe,Vi):$t.appendChild(Oe)),j(!0);var x=jc(n,l.draggable);if(!x||rw(t,C,this)&&!x.animated){if(x===Oe)return j(!1);if(x&&n===t.target&&(r=x),r&&(o=rn(r)),Dl($t,n,Oe,i,r,o,t,!!r)!==!1)return P(),x&&x.nextSibling?n.insertBefore(Oe,x.nextSibling):n.appendChild(Oe),qt=n,G(),j(!0)}else if(x&&nw(t,C,this)){var X=Ro(n,0,l,!0);if(X===Oe)return j(!1);if(r=X,o=rn(r),Dl($t,n,Oe,i,r,o,t,!1)!==!1)return P(),n.insertBefore(Oe,X),qt=n,G(),j(!0)}else if(r.parentNode===n){o=rn(r);var g=0,le,I=Oe.parentNode!==n,A=!J1(Oe.animated&&Oe.toRect||i,r.animated&&r.toRect||o,C),D=C?"top":"left",H=vg(r,"top","top")||vg(Oe,"top","top"),K=H?H.scrollTop:void 0;$o!==r&&(le=o[D],zs=!1,El=!A&&l.invertSwap||I),g=iw(t,r,o,C,A?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,El,$o===r);var z;if(g!==0){var de=dr(Oe);do de-=g,z=qt.children[de];while(z&&(nt(z,"display")==="none"||z===ht))}if(g===0||z===r)return j(!1);$o=r,qs=g;var je=r.nextElementSibling,Re=!1;Re=g===1;var Y=Dl($t,n,Oe,i,r,o,t,Re);if(Y!==!1)return(Y===1||Y===-1)&&(Re=Y===1),zc=!0,setTimeout(tw,30),P(),Re&&!je?n.appendChild(Oe):r.parentNode.insertBefore(Oe,Re?je:r),H&&Cg(H,0,K-H.scrollTop),qt=Oe.parentNode,le!==void 0&&!El&&(Ol=Math.abs(le-rn(r)[D])),G(),j(!0)}if(n.contains(Oe))return j(!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",zi),wt(document,"mousemove",zi),wt(document,"touchmove",zi)},_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(Jn=dr(Oe),wi=dr(Oe,r.draggable),$n("drop",this,{evt:t}),qt=Oe&&Oe.parentNode,Jn=dr(Oe),wi=dr(Oe,r.draggable),rt.eventCanceled){this._nulling();return}Fo=!1,El=!1,zs=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Yc(this.cloneId),Yc(this._dragStartId),this.nativeDraggable&&(wt(document,"drop",this),wt(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),js&&nt(document.body,"user-select",""),nt(Oe,"transform",""),t&&(Vs&&(t.cancelable&&t.preventDefault(),!r.dropBubble&&t.stopPropagation()),ht&&ht.parentNode&&ht.parentNode.removeChild(ht),($t===qt||mn&&mn.lastPutMode!=="clone")&&Ut&&Ut.parentNode&&Ut.parentNode.removeChild(Ut),Oe&&(this.nativeDraggable&&wt(Oe,"dragend",this),Gc(Oe),Oe.style["will-change"]="",Vs&&!Fo&&Yn(Oe,mn?mn.options.ghostClass:this.options.ghostClass,!1),Yn(Oe,this.options.chosenClass,!1),Ln({sortable:this,name:"unchoose",toEl:qt,newIndex:null,newDraggableIndex:null,originalEvent:t}),$t!==qt?(Jn>=0&&(Ln({rootEl:qt,name:"add",toEl:qt,fromEl:$t,originalEvent:t}),Ln({sortable:this,name:"remove",toEl:qt,originalEvent:t}),Ln({rootEl:qt,name:"sort",toEl:qt,fromEl:$t,originalEvent:t}),Ln({sortable:this,name:"sort",toEl:qt,originalEvent:t})),mn&&mn.save()):Jn!==Mo&&Jn>=0&&(Ln({sortable:this,name:"update",toEl:qt,originalEvent:t}),Ln({sortable:this,name:"sort",toEl:qt,originalEvent:t})),rt.active&&((Jn==null||Jn===-1)&&(Jn=Mo,wi=Ks),Ln({sortable:this,name:"end",toEl:qt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){$n("nulling",this),$t=Oe=qt=ht=Vi=Ut=kl=_i=qi=xr=Vs=Jn=wi=Mo=Ks=$o=qs=mn=xl=rt.dragged=rt.ghost=rt.clone=rt.active=null,Ll.forEach(function(t){t.checked=!0}),Ll.length=Kc=Vc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Oe&&(this._onDragOver(t),ew(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],Mr(n,s.draggable,this.el,!1)&&t.push(n.getAttribute(s.dataIdAttr)||sw(n));return t},sort:function(t,n){var r={},i=this.el;this.toArray().forEach(function(o,s){var l=i.children[s];Mr(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 Mr(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=Ws.modifyOption(this,t,n);typeof i<"u"?r[t]=i:r[t]=n,t==="group"&&Ag(r)},destroy:function(){$n("destroy",this);var t=this.el;t[Xn]=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(),Al.splice(Al.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_i){if($n("hideClone",this),rt.eventCanceled)return;nt(Ut,"display","none"),this.options.removeCloneOnHide&&Ut.parentNode&&Ut.parentNode.removeChild(Ut),_i=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_i){if($n("showClone",this),rt.eventCanceled)return;Oe.parentNode==$t&&!this.options.group.revertClone?$t.insertBefore(Ut,Oe):Vi?$t.insertBefore(Ut,Vi):$t.appendChild(Ut),this.options.group.revertClone&&this.animate(Oe,Ut),nt(Ut,"display",""),_i=!1}}};function ew(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Dl(e,t,n,r,i,o,s,l){var c,d=e[Xn],p=d.options.onMove,y;return window.CustomEvent&&!Jr&&!Hs?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||rn(t),c.willInsertAfter=l,c.originalEvent=s,e.dispatchEvent(c),p&&(y=p.call(d,c,s)),y}function Gc(e){e.draggable=!1}function tw(){zc=!1}function nw(e,t,n){var r=rn(Ro(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 rw(e,t,n){var r=rn(jc(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 iw(e,t,n,r,i,o,s,l){var c=r?e.clientY:e.clientX,d=r?n.height:n.width,p=r?n.top:n.left,y=r?n.bottom:n.right,m=!1;if(!s){if(l&&Ol<d*i){if(!zs&&(qs===1?c>p+d*o/2:c<y-d*o/2)&&(zs=!0),zs)m=!0;else if(qs===1?c<p+Ol:c>y-Ol)return-qs}else if(c>p+d*(1-i)/2&&c<y-d*(1-i)/2)return ow(t)}return m=m||s,m&&(c<p+d*o/2||c>y-d*o/2)?c>p+d/2?1:-1:0}function ow(e){return dr(Oe)<dr(e)?1:-1}function sw(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 aw(e){Ll.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&Ll.push(r)}}function Rl(e){return setTimeout(e,0)}function Yc(e){return clearTimeout(e)}Il&&St(document,"touchmove",function(e){(rt.active||Fo)&&e.cancelable&&e.preventDefault()}),rt.utils={on:St,off:wt,css:nt,find:mg,is:function(t,n){return!!Mr(t,n,t,!1)},extend:W1,throttle:bg,closest:Mr,toggleClass:Yn,clone:_g,index:dr,nextTick:Rl,cancelNextTick:Yc,detectDirection:Sg,getChild:Ro},rt.get=function(e){return e[Xn]},rt.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&&(rt.utils=Nr(Nr({},rt.utils),r.utils)),Ws.mount(r)})},rt.create=function(e,t){return new rt(e,t)},rt.version=H1;var Jt=[],Gs,Xc,Jc=!1,Zc,Qc,Nl,Ys;function lw(){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(),Ml(),K1()},nulling:function(){Nl=Xc=Gs=Jc=Ys=Zc=Qc=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(Nl=n,r||this.options.forceAutoScrollFallback||Hs||Jr||js){ef(n,this.options,l,r);var c=Ci(l,!0);Jc&&(!Ys||o!==Zc||s!==Qc)&&(Ys&&Lg(),Ys=setInterval(function(){var d=Ci(document.elementFromPoint(o,s),!0);d!==c&&(c=d,Ml()),ef(n,i.options,d,r)},10),Zc=o,Qc=s)}else{if(!this.options.bubbleScroll||Ci(l,!0)===Fr()){Ml();return}ef(n,this.options,Ci(l,!1),!1)}}},Yr(e,{pluginName:"scroll",initializeByDefault:!0})}function Ml(){Jt.forEach(function(e){clearInterval(e.pid)}),Jt=[]}function Lg(){clearInterval(Ys)}var ef=bg(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=Fr(),d=!1,p;Xc!==n&&(Xc=n,Ml(),Gs=t.scroll,p=t.scrollFn,Gs===!0&&(Gs=Ci(n,!0)));var y=0,m=Gs;do{var C=m,b=rn(C),k=b.top,L=b.bottom,P=b.left,j=b.right,G=b.width,x=b.height,X=void 0,g=void 0,le=C.scrollWidth,I=C.scrollHeight,A=nt(C),D=C.scrollLeft,H=C.scrollTop;C===c?(X=G<le&&(A.overflowX==="auto"||A.overflowX==="scroll"||A.overflowX==="visible"),g=x<I&&(A.overflowY==="auto"||A.overflowY==="scroll"||A.overflowY==="visible")):(X=G<le&&(A.overflowX==="auto"||A.overflowX==="scroll"),g=x<I&&(A.overflowY==="auto"||A.overflowY==="scroll"));var K=X&&(Math.abs(j-i)<=s&&D+G<le)-(Math.abs(P-i)<=s&&!!D),z=g&&(Math.abs(L-o)<=s&&H+x<I)-(Math.abs(k-o)<=s&&!!H);if(!Jt[y])for(var de=0;de<=y;de++)Jt[de]||(Jt[de]={});(Jt[y].vx!=K||Jt[y].vy!=z||Jt[y].el!==C)&&(Jt[y].el=C,Jt[y].vx=K,Jt[y].vy=z,clearInterval(Jt[y].pid),(K!=0||z!=0)&&(d=!0,Jt[y].pid=setInterval(function(){r&&this.layer===0&&rt.active._onTouchMove(Nl);var je=Jt[this.layer].vy?Jt[this.layer].vy*l:0,Re=Jt[this.layer].vx?Jt[this.layer].vx*l:0;typeof p=="function"&&p.call(rt.dragged.parentNode[Xn],Re,je,e,Nl,Jt[this.layer].el)!=="continue"||Cg(Jt[this.layer].el,Re,je)}.bind({layer:y}),24))),y++}while(t.bubbleScroll&&m!==c&&(m=Ci(m,!1)));Jc=d}},30),Ig=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 p=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,y=document.elementFromPoint(p.clientX,p.clientY);c(),d&&!d.el.contains(y)&&(s("spill"),this.onSpill({dragEl:i,putSortable:r}))}};function tf(){}tf.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=Ro(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:Ig},Yr(tf,{pluginName:"revertOnSpill"});function nf(){}nf.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:Ig},Yr(nf,{pluginName:"removeOnSpill"}),rt.mount(new lw),rt.mount(nf,tf);const uw=(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,`
|
||
`),e=e.replace(/\>_\</g,"|||EXPRESSION1|||");const r={"(":")","[":"]","<":">","{":"}"},i=Object.keys(r);let o=e.length,s="",l="",c="",d=0,p=[];for(let m=0;m<o;m++){const C=e[m];C===`
|
||
`?l===""?(s.trim()!==""&&p.push(s.trim()),p.push(`
|
||
`),d=0,l="",c="",s=""):s+=" ":C===","?l===""?(p.push(s.trim()),d=0,l="",c="",s=""):s+=C:l===""?i.includes(C)?(d=1,l=C,c=r[C],s+=C):C===" "&&s.trim()==="BREAK"?(p.push(s.trim()),d=0,l="",c="",s=""):(s+=C,s.endsWith(" BREAK")&&(s=s.substring(0,s.length-6),p.push(s.trim()),p.push("BREAK"),d=0,l="",c="",s="")):C===c?(d--,d===0&&(l="",c=""),s+=C):(C===l&&d++,s+=C)}s!==""&&p.push(s.trim());let y=[];for(let m of p){if(m===`
|
||
`){y.push(m);continue}let C=m[0],b=m[m.length-1];if(C==="["&&b==="]"){y.push(m);continue}if(C==="("&&b===")"){y.push(m);continue}let k=/\<lora:[^\>]+\>/,L=null,P=[];for(;L=k.exec(m);){let j=L.index,G=j+L[0].length,x=m.substring(0,j),X=m.substring(G),g=L[0];P.push(x),P.push(g),m=X}P.push(m);for(let j of P)j===""||j.trim()===""||(j=j.replace(/\|\|\|EXPRESSION1\|\|\|/g,">_<"),y.push(j))}return p=y,p},Xs={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",civitaiUrl:"https://civitai.com"};function Fl(e){return Fl=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},Fl(e)}var cw=/^\s+/,fw=/\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=dw(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=Fg(t),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var t=Dg(this._r,this._g,this._b);return{h:t.h*360,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=Dg(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=Pg(this._r,this._g,this._b);return{h:t.h*360,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=Pg(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 Rg(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return mw(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:Ew[Rg(this._r,this._g,this._b,!0)]||!1},toFilter:function(t){var n="#"+Ng(this._r,this._g,this._b,this._a),r=n,i=this._gradientType?"GradientType = 1, ":"";if(t){var o=De(t);r="#"+Ng(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(Cw,arguments)},brighten:function(){return this._applyModification(_w,arguments)},darken:function(){return this._applyModification(ww,arguments)},desaturate:function(){return this._applyModification(vw,arguments)},saturate:function(){return this._applyModification(yw,arguments)},greyscale:function(){return this._applyModification(bw,arguments)},spin:function(){return this._applyModification(Tw,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Sw,arguments)},complement:function(){return this._applyCombination(kw,arguments)},monochromatic:function(){return this._applyCombination(Aw,arguments)},splitcomplement:function(){return this._applyCombination(xw,arguments)},triad:function(){return this._applyCombination(Mg,[3])},tetrad:function(){return this._applyCombination(Mg,[4])}},De.fromRatio=function(e,t){if(Fl(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 dw(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=Pw(e)),Fl(e)=="object"&&(Zr(e.r)&&Zr(e.g)&&Zr(e.b)?(t=pw(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Zr(e.h)&&Zr(e.s)&&Zr(e.v)?(r=Js(e.s),i=Js(e.v),t=gw(e.h,r,i),s=!0,l="hsv"):Zr(e.h)&&Zr(e.s)&&Zr(e.l)&&(r=Js(e.s),o=Js(e.l),t=hw(e.h,r,o),s=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=Fg(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 pw(e,t,n){return{r:Bt(e,255)*255,g:Bt(t,255)*255,b:Bt(n,255)*255}}function Pg(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 hw(e,t,n){var r,i,o;e=Bt(e,360),t=Bt(t,100),n=Bt(n,100);function s(d,p,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?d+(p-d)*6*y:y<1/2?p:y<2/3?d+(p-d)*(2/3-y)*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 Dg(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 gw(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],p=[l,n,n,s,o,o][c],y=[o,o,l,n,n,s][c];return{r:d*255,g:p*255,b:y*255}}function Rg(e,t,n,r){var i=[Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(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 mw(e,t,n,r,i){var o=[Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(Math.round(n).toString(16)),Sr($g(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 Ng(e,t,n,r){var i=[Sr($g(r)),Sr(Math.round(e).toString(16)),Sr(Math.round(t).toString(16)),Sr(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 vw(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.s-=t/100,n.s=$l(n.s),De(n)}function yw(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.s+=t/100,n.s=$l(n.s),De(n)}function bw(e){return De(e).desaturate(100)}function Cw(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.l+=t/100,n.l=$l(n.l),De(n)}function _w(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 ww(e,t){t=t===0?0:t||10;var n=De(e).toHsl();return n.l-=t/100,n.l=$l(n.l),De(n)}function Tw(e,t){var n=De(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,De(n)}function kw(e){var t=De(e).toHsl();return t.h=(t.h+180)%360,De(t)}function Mg(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 xw(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 Sw(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 Aw(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=Dw(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 rf=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"},Ew=De.hexNames=Ow(rf);function Ow(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function Fg(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Bt(e,t){Lw(e)&&(e="100%");var n=Iw(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 $l(e){return Math.min(1,Math.max(0,e))}function Zn(e){return parseInt(e,16)}function Lw(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function Iw(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Sr(e){return e.length==1?"0"+e:""+e}function Js(e){return e<=1&&(e=e*100+"%"),e}function $g(e){return Math.round(parseFloat(e)*255).toString(16)}function Bg(e){return Zn(e)/255}var Ar=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 Zr(e){return!!Ar.CSS_UNIT.exec(e)}function Pw(e){e=e.replace(cw,"").replace(fw,"").toLowerCase();var t=!1;if(rf[e])e=rf[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=Ar.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=Ar.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ar.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=Ar.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ar.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=Ar.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ar.hex8.exec(e))?{r:Zn(n[1]),g:Zn(n[2]),b:Zn(n[3]),a:Bg(n[4]),format:t?"name":"hex8"}:(n=Ar.hex6.exec(e))?{r:Zn(n[1]),g:Zn(n[2]),b:Zn(n[3]),format:t?"name":"hex"}:(n=Ar.hex4.exec(e))?{r:Zn(n[1]+""+n[1]),g:Zn(n[2]+""+n[2]),b:Zn(n[3]+""+n[3]),a:Bg(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=Ar.hex3.exec(e))?{r:Zn(n[1]+""+n[1]),g:Zn(n[2]+""+n[2]),b:Zn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function Dw(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 uw(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 Xs){let r=Xs[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);return t?parseFloat(t[2]):1},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 of=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hg={exports:{}};/* @license
|
||
Papa Parse
|
||
v5.4.1
|
||
https://github.com/mholt/PapaParse
|
||
License: MIT
|
||
*/(function(e,t){(function(n,r){e.exports=r()})(of,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(I,A){var D=(A=A||{}).dynamicTyping||!1;if(le(D)&&(A.dynamicTypingFunction=D,D={}),A.dynamicTyping=D,A.transform=!!le(A.transform)&&A.transform,A.worker&&c.WORKERS_SUPPORTED){var H=function(){if(!c.WORKERS_SUPPORTED)return!1;var z=(je=r.URL||r.webkitURL||null,Re=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; ","(",Re,")();"],{type:"text/javascript"})))),de=new r.Worker(z),je,Re;return de.onmessage=j,de.id=l++,s[de.id]=de}();return H.userStep=A.step,H.userChunk=A.chunk,H.userComplete=A.complete,H.userError=A.error,A.step=le(A.step),A.chunk=le(A.chunk),A.complete=le(A.complete),A.error=le(A.error),delete A.worker,void H.postMessage({input:I,config:A,workerId:H.id})}var K=null;return c.NODE_STREAM_INPUT,typeof I=="string"?(I=function(z){return z.charCodeAt(0)===65279?z.slice(1):z}(I),K=A.download?new y(A):new C(A)):I.readable===!0&&le(I.read)&&le(I.on)?K=new b(A):(r.File&&I instanceof File||I instanceof Object)&&(K=new m(A)),K.stream(I)},unparse:function(I,A){var D=!1,H=!0,K=",",z=`\r
|
||
`,de='"',je=de+de,Re=!1,Y=null,se=!1;(function(){if(typeof A=="object"){if(typeof A.delimiter!="string"||c.BAD_DELIMITERS.filter(function(ie){return A.delimiter.indexOf(ie)!==-1}).length||(K=A.delimiter),(typeof A.quotes=="boolean"||typeof A.quotes=="function"||Array.isArray(A.quotes))&&(D=A.quotes),typeof A.skipEmptyLines!="boolean"&&typeof A.skipEmptyLines!="string"||(Re=A.skipEmptyLines),typeof A.newline=="string"&&(z=A.newline),typeof A.quoteChar=="string"&&(de=A.quoteChar),typeof A.header=="boolean"&&(H=A.header),Array.isArray(A.columns)){if(A.columns.length===0)throw new Error("Option columns is empty");Y=A.columns}A.escapeChar!==void 0&&(je=A.escapeChar+de),(typeof A.escapeFormulae=="boolean"||A.escapeFormulae instanceof RegExp)&&(se=A.escapeFormulae instanceof RegExp?A.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var ge=new RegExp(L(de),"g");if(typeof I=="string"&&(I=JSON.parse(I)),Array.isArray(I)){if(!I.length||Array.isArray(I[0]))return it(null,I,Re);if(typeof I[0]=="object")return it(Y||Object.keys(I[0]),I,Re)}else if(typeof I=="object")return typeof I.data=="string"&&(I.data=JSON.parse(I.data)),Array.isArray(I.data)&&(I.fields||(I.fields=I.meta&&I.meta.fields||Y),I.fields||(I.fields=Array.isArray(I.data[0])?I.fields:typeof I.data[0]=="object"?Object.keys(I.data[0]):[]),Array.isArray(I.data[0])||typeof I.data[0]=="object"||(I.data=[I.data])),it(I.fields||[],I.data||[],Re);throw new Error("Unable to serialize unrecognized input");function it(ie,Ce,ke){var Ee="";typeof ie=="string"&&(ie=JSON.parse(ie)),typeof Ce=="string"&&(Ce=JSON.parse(Ce));var Le=Array.isArray(ie)&&0<ie.length,He=!Array.isArray(Ce[0]);if(Le&&H){for(var Ze=0;Ze<ie.length;Ze++)0<Ze&&(Ee+=K),Ee+=qe(ie[Ze],Ze);0<Ce.length&&(Ee+=z)}for(var Ie=0;Ie<Ce.length;Ie++){var ot=Le?ie.length:Ce[Ie].length,vt=!1,R=Le?Object.keys(Ce[Ie]).length===0:Ce[Ie].length===0;if(ke&&!Le&&(vt=ke==="greedy"?Ce[Ie].join("").trim()==="":Ce[Ie].length===1&&Ce[Ie][0].length===0),ke==="greedy"&&Le){for(var $=[],J=0;J<ot;J++){var ne=He?ie[J]:J;$.push(Ce[Ie][ne])}vt=$.join("").trim()===""}if(!vt){for(var W=0;W<ot;W++){0<W&&!R&&(Ee+=K);var Q=Le&&He?ie[W]:W;Ee+=qe(Ce[Ie][Q],W)}Ie<Ce.length-1&&(!ke||0<ot&&!R)&&(Ee+=z)}}return Ee}function qe(ie,Ce){if(ie==null)return"";if(ie.constructor===Date)return JSON.stringify(ie).slice(1,25);var ke=!1;se&&typeof ie=="string"&&se.test(ie)&&(ie="'"+ie,ke=!0);var Ee=ie.toString().replace(ge,je);return(ke=ke||D===!0||typeof D=="function"&&D(ie,Ce)||Array.isArray(D)&&D[Ce]||function(Le,He){for(var Ze=0;Ze<He.length;Ze++)if(-1<Le.indexOf(He[Ze]))return!0;return!1}(Ee,c.BAD_DELIMITERS)||-1<Ee.indexOf(K)||Ee.charAt(0)===" "||Ee.charAt(Ee.length-1)===" ")?de+Ee+de:Ee}}};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=P,c.ParserHandle=k,c.NetworkStreamer=y,c.FileStreamer=m,c.StringStreamer=C,c.ReadableStreamStreamer=b,r.jQuery){var d=r.jQuery;d.fn.parse=function(I){var A=I.config||{},D=[];return this.each(function(z){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 de=0;de<this.files.length;de++)D.push({file:this.files[de],inputElem:this,instanceConfig:d.extend({},A)})}),H(),this;function H(){if(D.length!==0){var z,de,je,Re,Y=D[0];if(le(I.before)){var se=I.before(Y.file,Y.inputElem);if(typeof se=="object"){if(se.action==="abort")return z="AbortError",de=Y.file,je=Y.inputElem,Re=se.reason,void(le(I.error)&&I.error({name:z},de,je,Re));if(se.action==="skip")return void K();typeof se.config=="object"&&(Y.instanceConfig=d.extend(Y.instanceConfig,se.config))}else if(se==="skip")return void K()}var ge=Y.instanceConfig.complete;Y.instanceConfig.complete=function(it){le(ge)&&ge(it,Y.file,Y.inputElem),K()},c.parse(Y.file,Y.instanceConfig)}else le(I.complete)&&I.complete()}function K(){D.splice(0,1),H()}}}function p(I){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(A){var D=X(A);D.chunkSize=parseInt(D.chunkSize),A.step||A.chunk||(D.chunkSize=null),this._handle=new k(D),(this._handle.streamer=this)._config=D}.call(this,I),this.parseChunk=function(A,D){if(this.isFirstChunk&&le(this._config.beforeFirstChunk)){var H=this._config.beforeFirstChunk(A);H!==void 0&&(A=H)}this.isFirstChunk=!1,this._halted=!1;var K=this._partialLine+A;this._partialLine="";var z=this._handle.parse(K,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var de=z.meta.cursor;this._finished||(this._partialLine=K.substring(de-this._baseIndex),this._baseIndex=de),z&&z.data&&(this._rowCount+=z.data.length);var je=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)r.postMessage({results:z,workerId:c.WORKER_ID,finished:je});else if(le(this._config.chunk)&&!D){if(this._config.chunk(z,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);z=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(z.data),this._completeResults.errors=this._completeResults.errors.concat(z.errors),this._completeResults.meta=z.meta),this._completed||!je||!le(this._config.complete)||z&&z.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),je||z&&z.meta.paused||this._nextChunk(),z}this._halted=!0},this._sendError=function(A){le(this._config.error)?this._config.error(A):o&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:A,finished:!1})}}function y(I){var A;(I=I||{}).chunkSize||(I.chunkSize=c.RemoteChunkSize),p.call(this,I),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(D){this._input=D,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(A=new XMLHttpRequest,this._config.withCredentials&&(A.withCredentials=this._config.withCredentials),i||(A.onload=g(this._chunkLoaded,this),A.onerror=g(this._chunkError,this)),A.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var D=this._config.downloadRequestHeaders;for(var H in D)A.setRequestHeader(H,D[H])}if(this._config.chunkSize){var K=this._start+this._config.chunkSize-1;A.setRequestHeader("Range","bytes="+this._start+"-"+K)}try{A.send(this._config.downloadRequestBody)}catch(z){this._chunkError(z.message)}i&&A.status===0&&this._chunkError()}},this._chunkLoaded=function(){A.readyState===4&&(A.status<200||400<=A.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:A.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(D){var H=D.getResponseHeader("Content-Range");return H===null?-1:parseInt(H.substring(H.lastIndexOf("/")+1))}(A),this.parseChunk(A.responseText)))},this._chunkError=function(D){var H=A.statusText||D;this._sendError(new Error(H))}}function m(I){var A,D;(I=I||{}).chunkSize||(I.chunkSize=c.LocalChunkSize),p.call(this,I);var H=typeof FileReader<"u";this.stream=function(K){this._input=K,D=K.slice||K.webkitSlice||K.mozSlice,H?((A=new FileReader).onload=g(this._chunkLoaded,this),A.onerror=g(this._chunkError,this)):A=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var K=this._input;if(this._config.chunkSize){var z=Math.min(this._start+this._config.chunkSize,this._input.size);K=D.call(K,this._start,z)}var de=A.readAsText(K,this._config.encoding);H||this._chunkLoaded({target:{result:de}})},this._chunkLoaded=function(K){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(K.target.result)},this._chunkError=function(){this._sendError(A.error)}}function C(I){var A;p.call(this,I=I||{}),this.stream=function(D){return A=D,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var D,H=this._config.chunkSize;return H?(D=A.substring(0,H),A=A.substring(H)):(D=A,A=""),this._finished=!A,this.parseChunk(D)}}}function b(I){p.call(this,I=I||{});var A=[],D=!0,H=!1;this.pause=function(){p.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){p.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(K){this._input=K,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){H&&A.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),A.length?this.parseChunk(A.shift()):D=!0},this._streamData=g(function(K){try{A.push(typeof K=="string"?K:K.toString(this._config.encoding)),D&&(D=!1,this._checkIsFinished(),this.parseChunk(A.shift()))}catch(z){this._streamError(z)}},this),this._streamError=g(function(K){this._streamCleanUp(),this._sendError(K)},this),this._streamEnd=g(function(){this._streamCleanUp(),H=!0,this._streamData("")},this),this._streamCleanUp=g(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function k(I){var A,D,H,K=Math.pow(2,53),z=-K,de=/^\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)))$/,Re=this,Y=0,se=0,ge=!1,it=!1,qe=[],ie={data:[],errors:[],meta:{}};if(le(I.step)){var Ce=I.step;I.step=function(Ie){if(ie=Ie,Le())Ee();else{if(Ee(),ie.data.length===0)return;Y+=Ie.data.length,I.preview&&Y>I.preview?D.abort():(ie.data=ie.data[0],Ce(ie,Re))}}}function ke(Ie){return I.skipEmptyLines==="greedy"?Ie.join("").trim()==="":Ie.length===1&&Ie[0].length===0}function Ee(){return ie&&H&&(Ze("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),H=!1),I.skipEmptyLines&&(ie.data=ie.data.filter(function(Ie){return!ke(Ie)})),Le()&&function(){if(!ie)return;function Ie(vt,R){le(I.transformHeader)&&(vt=I.transformHeader(vt,R)),qe.push(vt)}if(Array.isArray(ie.data[0])){for(var ot=0;Le()&&ot<ie.data.length;ot++)ie.data[ot].forEach(Ie);ie.data.splice(0,1)}else ie.data.forEach(Ie)}(),function(){if(!ie||!I.header&&!I.dynamicTyping&&!I.transform)return ie;function Ie(vt,R){var $,J=I.header?{}:[];for($=0;$<vt.length;$++){var ne=$,W=vt[$];I.header&&(ne=$>=qe.length?"__parsed_extra":qe[$]),I.transform&&(W=I.transform(W,ne)),W=He(ne,W),ne==="__parsed_extra"?(J[ne]=J[ne]||[],J[ne].push(W)):J[ne]=W}return I.header&&($>qe.length?Ze("FieldMismatch","TooManyFields","Too many fields: expected "+qe.length+" fields but parsed "+$,se+R):$<qe.length&&Ze("FieldMismatch","TooFewFields","Too few fields: expected "+qe.length+" fields but parsed "+$,se+R)),J}var ot=1;return!ie.data.length||Array.isArray(ie.data[0])?(ie.data=ie.data.map(Ie),ot=ie.data.length):ie.data=Ie(ie.data,0),I.header&&ie.meta&&(ie.meta.fields=qe),se+=ot,ie}()}function Le(){return I.header&&qe.length===0}function He(Ie,ot){return vt=Ie,I.dynamicTypingFunction&&I.dynamicTyping[vt]===void 0&&(I.dynamicTyping[vt]=I.dynamicTypingFunction(vt)),(I.dynamicTyping[vt]||I.dynamicTyping)===!0?ot==="true"||ot==="TRUE"||ot!=="false"&&ot!=="FALSE"&&(function(R){if(de.test(R)){var $=parseFloat(R);if(z<$&&$<K)return!0}return!1}(ot)?parseFloat(ot):je.test(ot)?new Date(ot):ot===""?null:ot):ot;var vt}function Ze(Ie,ot,vt,R){var $={type:Ie,code:ot,message:vt};R!==void 0&&($.row=R),ie.errors.push($)}this.parse=function(Ie,ot,vt){var R=I.quoteChar||'"';if(I.newline||(I.newline=function(ne,W){ne=ne.substring(0,1048576);var Q=new RegExp(L(W)+"([^]*?)"+L(W),"gm"),we=(ne=ne.replace(Q,"")).split("\r"),me=ne.split(`
|
||
`),_e=1<me.length&&me[0].length<we[0].length;if(we.length===1||_e)return`
|
||
`;for(var ue=0,Se=0;Se<we.length;Se++)we[Se][0]===`
|
||
`&&ue++;return ue>=we.length/2?`\r
|
||
`:"\r"}(Ie,R)),H=!1,I.delimiter)le(I.delimiter)&&(I.delimiter=I.delimiter(Ie),ie.meta.delimiter=I.delimiter);else{var $=function(ne,W,Q,we,me){var _e,ue,Se,Te;me=me||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var Me=0;Me<me.length;Me++){var Ae=me[Me],ze=0,pt=0,ut=0;Se=void 0;for(var Ct=new P({comments:we,delimiter:Ae,newline:W,preview:10}).parse(ne),Ft=0;Ft<Ct.data.length;Ft++)if(Q&&ke(Ct.data[Ft]))ut++;else{var ln=Ct.data[Ft].length;pt+=ln,Se!==void 0?0<ln&&(ze+=Math.abs(ln-Se),Se=ln):Se=ln}0<Ct.data.length&&(pt/=Ct.data.length-ut),(ue===void 0||ze<=ue)&&(Te===void 0||Te<pt)&&1.99<pt&&(ue=ze,_e=Ae,Te=pt)}return{successful:!!(I.delimiter=_e),bestDelimiter:_e}}(Ie,I.newline,I.skipEmptyLines,I.comments,I.delimitersToGuess);$.successful?I.delimiter=$.bestDelimiter:(H=!0,I.delimiter=c.DefaultDelimiter),ie.meta.delimiter=I.delimiter}var J=X(I);return I.preview&&I.header&&J.preview++,A=Ie,D=new P(J),ie=D.parse(A,ot,vt),Ee(),ge?{meta:{paused:!0}}:ie||{meta:{paused:!1}}},this.paused=function(){return ge},this.pause=function(){ge=!0,D.abort(),A=le(I.chunk)?"":A.substring(D.getCharIndex())},this.resume=function(){Re.streamer._halted?(ge=!1,Re.streamer.parseChunk(A,!0)):setTimeout(Re.resume,3)},this.aborted=function(){return it},this.abort=function(){it=!0,D.abort(),ie.meta.aborted=!0,le(I.complete)&&I.complete(ie),A=""}}function L(I){return I.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(I){var A,D=(I=I||{}).delimiter,H=I.newline,K=I.comments,z=I.step,de=I.preview,je=I.fastMode,Re=A=I.quoteChar===void 0||I.quoteChar===null?'"':I.quoteChar;if(I.escapeChar!==void 0&&(Re=I.escapeChar),(typeof D!="string"||-1<c.BAD_DELIMITERS.indexOf(D))&&(D=","),K===D)throw new Error("Comment character same as delimiter");K===!0?K="#":(typeof K!="string"||-1<c.BAD_DELIMITERS.indexOf(K))&&(K=!1),H!==`
|
||
`&&H!=="\r"&&H!==`\r
|
||
`&&(H=`
|
||
`);var Y=0,se=!1;this.parse=function(ge,it,qe){if(typeof ge!="string")throw new Error("Input must be a string");var ie=ge.length,Ce=D.length,ke=H.length,Ee=K.length,Le=le(z),He=[],Ze=[],Ie=[],ot=Y=0;if(!ge)return Ht();if(I.header&&!it){var vt=ge.split(H)[0].split(D),R=[],$={},J=!1;for(var ne in vt){var W=vt[ne];le(I.transformHeader)&&(W=I.transformHeader(W,ne));var Q=W,we=$[W]||0;for(0<we&&(J=!0,Q=W+"_"+we),$[W]=we+1;R.includes(Q);)Q=Q+"_"+we;R.push(Q)}if(J){var me=ge.split(H);me[0]=R.join(D),ge=me.join(H)}}if(je||je!==!1&&ge.indexOf(A)===-1){for(var _e=ge.split(H),ue=0;ue<_e.length;ue++){if(Ie=_e[ue],Y+=Ie.length,ue!==_e.length-1)Y+=H.length;else if(qe)return Ht();if(!K||Ie.substring(0,Ee)!==K){if(Le){if(He=[],ut(Ie.split(D)),pn(),se)return Ht()}else ut(Ie.split(D));if(de&&de<=ue)return He=He.slice(0,de),Ht(!0)}}return Ht()}for(var Se=ge.indexOf(D,Y),Te=ge.indexOf(H,Y),Me=new RegExp(L(Re)+L(A),"g"),Ae=ge.indexOf(A,Y);;)if(ge[Y]!==A)if(K&&Ie.length===0&&ge.substring(Y,Y+Ee)===K){if(Te===-1)return Ht();Y=Te+ke,Te=ge.indexOf(H,Y),Se=ge.indexOf(D,Y)}else if(Se!==-1&&(Se<Te||Te===-1))Ie.push(ge.substring(Y,Se)),Y=Se+Ce,Se=ge.indexOf(D,Y);else{if(Te===-1)break;if(Ie.push(ge.substring(Y,Te)),ln(Te+ke),Le&&(pn(),se))return Ht();if(de&&He.length>=de)return Ht(!0)}else for(Ae=Y,Y++;;){if((Ae=ge.indexOf(A,Ae+1))===-1)return qe||Ze.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:He.length,index:Y}),Ft();if(Ae===ie-1)return Ft(ge.substring(Y,Ae).replace(Me,A));if(A!==Re||ge[Ae+1]!==Re){if(A===Re||Ae===0||ge[Ae-1]!==Re){Se!==-1&&Se<Ae+1&&(Se=ge.indexOf(D,Ae+1)),Te!==-1&&Te<Ae+1&&(Te=ge.indexOf(H,Ae+1));var ze=Ct(Te===-1?Se:Math.min(Se,Te));if(ge.substr(Ae+1+ze,Ce)===D){Ie.push(ge.substring(Y,Ae).replace(Me,A)),ge[Y=Ae+1+ze+Ce]!==A&&(Ae=ge.indexOf(A,Y)),Se=ge.indexOf(D,Y),Te=ge.indexOf(H,Y);break}var pt=Ct(Te);if(ge.substring(Ae+1+pt,Ae+1+pt+ke)===H){if(Ie.push(ge.substring(Y,Ae).replace(Me,A)),ln(Ae+1+pt+ke),Se=ge.indexOf(D,Y),Ae=ge.indexOf(A,Y),Le&&(pn(),se))return Ht();if(de&&He.length>=de)return Ht(!0);break}Ze.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:He.length,index:Y}),Ae++}}else Ae++}return Ft();function ut(te){He.push(te),ot=Y}function Ct(te){var Ne=0;if(te!==-1){var $e=ge.substring(Ae+1,te);$e&&$e.trim()===""&&(Ne=$e.length)}return Ne}function Ft(te){return qe||(te===void 0&&(te=ge.substring(Y)),Ie.push(te),Y=ie,ut(Ie),Le&&pn()),Ht()}function ln(te){Y=te,ut(Ie),Ie=[],Te=ge.indexOf(H,Y)}function Ht(te){return{data:He,errors:Ze,meta:{delimiter:D,linebreak:H,aborted:se,truncated:!!te,cursor:ot+(it||0)}}}function pn(){z(Ht()),He=[],Ze=[]}},this.abort=function(){se=!0},this.getCharIndex=function(){return Y}}function j(I){var A=I.data,D=s[A.workerId],H=!1;if(A.error)D.userError(A.error,A.file);else if(A.results&&A.results.data){var K={abort:function(){H=!0,G(A.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(le(D.userStep)){for(var z=0;z<A.results.data.length&&(D.userStep({data:A.results.data[z],errors:A.results.errors,meta:A.results.meta},K),!H);z++);delete A.results}else le(D.userChunk)&&(D.userChunk(A.results,K,A.file),delete A.results)}A.finished&&!H&&G(A.workerId,A.results)}function G(I,A){var D=s[I];le(D.userComplete)&&D.userComplete(A),D.terminate(),delete s[I]}function x(){throw new Error("Not implemented.")}function X(I){if(typeof I!="object"||I===null)return I;var A=Array.isArray(I)?[]:{};for(var D in I)A[D]=X(I[D]);return A}function g(I,A){return function(){I.apply(A,arguments)}}function le(I){return typeof I=="function"}return o&&(r.onmessage=function(I){var A=I.data;if(c.WORKER_ID===void 0&&A&&(c.WORKER_ID=A.workerId),typeof A.input=="string")r.postMessage({workerId:c.WORKER_ID,results:c.parse(A.input,A.config),finished:!0});else if(r.File&&A.input instanceof File||A.input instanceof Object){var D=c.parse(A.input,A.config);D&&r.postMessage({workerId:c.WORKER_ID,results:D,finished:!0})}}),(y.prototype=Object.create(p.prototype)).constructor=y,(m.prototype=Object.create(p.prototype)).constructor=m,(C.prototype=Object.create(C.prototype)).constructor=C,(b.prototype=Object.create(p.prototype)).constructor=b,c})})(Hg);var Rw=Hg.exports;const Nw=Bl(Rw),Qn={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:Xs}},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=Nw.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)})})},_translateToLocalBy(e,t,n=!1){e=e.trim().toLowerCase();let r=i=>{var o;return((o=i.join)==null?void 0:o.call(i," / "))??i};if(t.has(e))return r(t.get(e));{const i=e.split(",").map(l=>l.trim());let o=[],s=[];if(i.forEach(l=>{t.has(l)?o.push(r(t.get(l))):n&&l.length&&s.push(l)}),o.length>0&&!s.length)return o.join(", ")}return""},async translateToLocalByCSV(e,t=null,n=!1,r=!1){let i=await this.getCSV(t,n);return this._translateToLocalBy(e,i.toLocal,r)},async translateToEnByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return this._toEn(e,r.toEn)},async translateToLocalByGroupTags(e,t=!1){return console.log("translateToLocalByGroupTags",e),this._translateToLocalBy(e,this.groupTagsTranslateCache.toLocal,t)},async translateToEnByGroupTags(e){return this._toEn(e,this.groupTagsTranslateCache.toEn)},_toEn(e,t){return e=e.trim().toLowerCase(),t.has(e)?t.get(e):""}}},Gi=Number.isNaN||window.isNaN,Mw=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,Fw=/\.\d*(?:0|9){10}\d*$/,jg=(e,t=1e11)=>Fw.test(String(e))?Math.round(e*t)/t:e,$w=Mn({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 Gi(this.value)||this.value<this.max},decreasable(){return Gi(this.value)||this.value>this.min}},watch:{modelValue:{immediate:!0,handler(e,t){!(Gi(e)&&typeof t>"u")&&e!==this.value&&this.setValue(e)}}},methods:{isNaN:Gi,change(e){this.setValue(e.target.value)},paste(e){const t=e.clipboardData||window.clipboardData;t&&!Mw.test(t.getData("text"))&&e.preventDefault()},decrease(){if(this.decreasable){let{value:e}=this;Gi(e)&&(e=0),this.setValue(jg(e-this.step))}},increase(){if(this.increasable){let{value:e}=this;Gi(e)&&(e=0),this.setValue(jg(e+this.step))}},setValue(e){const t=this.value;let n=typeof e!="number"?parseFloat(e):e;Gi(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)}}}),vn=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},Bw=["disabled"],Hw=["name","value","min","max","step","readonly","disabled","placeholder"],jw=["disabled"];function Uw(e,t,n,r,i,o){return O(),N("div",{class:et(["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?(O(),N("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]=at((...s)=>e.decrease&&e.decrease(...s),["prevent"]))},null,8,Bw)):xe("",!0),T("input",Cl({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,Hw),e.controls?(O(),N("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]=at((...s)=>e.increase&&e.increase(...s),["prevent"]))},null,8,jw)):xe("",!0)],2)}const Ww=vn($w,[["render",Uw]]),Kw={data(){return{autocompleteResults:null,autocompleteResultsParent: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.autocompleteResultsParent&&this.autocompleteResultsParent.style.display==="flex"||this.autocompleteResults.style.display==="none")&&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.autoTranslateByIndexes(r)}}else this.removeAutocompleteResultsSelected()},autoTranslateByIndexes(e){this.updatePrompt(),this.autoTranslateToEnglish||this.autoTranslateToLocal?this.$nextTick(()=>{let t=!(this.tagCompleteFile&&this.onlyCsvOnAuto);this.autoTranslateToEnglish?this.translates(e,!1,t).finally(()=>{this.updateTags()}):this.autoTranslateToLocal&&this.translates(e,!0,t).finally(()=>{this.updateTags()})}):this.updateTags()},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");if(e){this.autocompleteResults=e,this.autocompleteResults.getAttribute("data-mousemove")!=="true"&&(this.autocompleteResults.setAttribute("data-mousemove","true"),this.autocompleteResults.addEventListener("mousemove",n=>{this.bindAutocompleteResultsClick()}));const t=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteParent");t&&(this.autocompleteResultsParent=t)}}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)}})}}},Vw={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)}this.$emit("hideExtraNetworks")},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 sf="__autosizeInputGhost",qw={" ":"nbsp","<":"lt",">":"gt"};function zw(e){return"&"+qw[e]+";"}function Gw(e){return e.replace(/\s|<|>/g,zw)}function Yw(){var e=document.createElement("div");return e.id=sf,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 Xw=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(sf)||Yw();l.style.cssText+=r,l.innerHTML=Gw(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(sf);s&&s.parentNode.removeChild(s)}};const Jw=Bl(Xw),Zw={data(){return{tagClickTimeId:0,showExtendId:""}},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.incWeight=pe.getTagIncWeight(e.value),e.decWeight=pe.getTagDecWeight(e.value),e.originalValue=e.value,!e.value.match(pe.loraRegex)&&!e.value.match(pe.lycoRegex)){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,e.loraName=n[1],this.loraExists(n[1])!==!1&&(e.loraExists=!0)),!e.isLora){const r=e.value.match(pe.lycoRegex);r&&(e.isLyco=!0,e.lycoName=r[1],this.lycoExists(r[1])!==!1&&(e.lycoExists=!0))}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){var t,n,r,i,o;if(typeof e.type=="string"&&e.type==="wrap")return!1;if(e.isLora){if((t=this.blacklist.lora)!=null&&t.includes(e.loraName.toLowerCase()))return!0}else if(e.isLyco){if((n=this.blacklist.lycoris)!=null&&n.includes(e.lycoName.toLowerCase()))return!0}else if(e.isEmbedding){if((r=this.blacklist.embedding)!=null&&r.includes(e.embeddingName.toLowerCase()))return!0}else if(this.neg){if((i=this.blacklist.negative_prompt)!=null&&i.includes(e.originalValue.toLowerCase()))return!0}else if((o=this.blacklist.prompt)!=null&&o.includes(e.originalValue.toLowerCase()))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]&&Jw(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},onLoraPopupUseKeywords(e){let t=[];for(let n of e){let r=n.toLowerCase();if(!this.tags.find(o=>o.value.toLowerCase()===r)){let o=this._appendTag(n,"",!1,-1,"text");o!==-1&&t.push(o)}}t.length&&this.autoTranslateByIndexes(t)},onTagMouseEnter(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;if(t.isFavorite=this.isFavorite(t.id),this.hotkey.hover==="extend"&&(this.showExtendId=e),t.isLora||t.isLyco||t.isEmbedding){let n=t.isLora?t.loraName:t.isLyco?t.lycoName:t.embeddingName;this.$emit("showExtraNetworks",this.$refs["promptTagValue-"+t.id][0],n,this.onLoraPopupUseKeywords)}},onTagMouseMove(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.$refs.highlightPrompt.show(t)},onTagMouseLeave(e){if(!this.tags.find(n=>n.id===e))return!1;this.hotkey.hover==="extend"&&(this.showExtendId=""),this.$emit("hideExtraNetworks")},onTagClick(e){this.tagClickTimeId&&clearTimeout(this.tagClickTimeId),this.tagClickTimeId=setTimeout(()=>{switch(this.hotkey.click){case"edit":this._handleEditTag(e);break;case"disable":this._handleDisableTag(e);break;case"extend":this._handleHoverTag(e);break}clearTimeout(this.tagClickTimeId)},250)},onTagDblclick(e){switch(clearTimeout(this.tagClickTimeId),this.hotkey.dblClick){case"edit":this._handleEditTag(e);break;case"disable":this._handleDisableTag(e);break;case"extend":this._handleHoverTag(e);break}},onTagRightClick(e,t){switch(this.hotkey.rightClick){case"edit":this._handleEditTag(e);break;case"disable":this._handleDisableTag(e);break;case"extend":this._handleHoverTag(e);break}},_handleEditTag(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;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"))})},_handleDisableTag(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.onDisabledTagClick(t.id)},_handleHoverTag(e){if(!this.tags.find(n=>n.id===e))return!1;this.showExtendId=e},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 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()})},onBlacklistClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return;if(!this.cancelBlacklistConfirm){let r=this.getLang("confirm_add_blacklist").replace("{0}",t.value)+`
|
||
`+this.getLang("blacklist_desc");if(!confirm(r))return}let n=JSON.parse(JSON.stringify(this.blacklist));t.isLora?n.lora.push(t.loraName):t.isLyco?n.lycoris.push(t.lycoName):t.isEmbedding?n.embedding.push(t.embeddingName):this.neg?n.negative_prompt.push(t.originalValue):n.prompt.push(t.originalValue),this.gradioAPI.setData("blacklist",n),this.$emit("update:blacklist",n,this.cancelBlacklistConfirm),this.tags.forEach(r=>{r.value===t.value&&this.onDeleteTagClick(r.id)})}}},Qw={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}},mounted(){this.gradioAPI.getData("groupTagsActive-"+this.name).then(e=>{e!==null&&typeof e=="object"&&(this.groupTagsActive=e.groupTagsActive,this.subGroupTagsActive=e.subGroupTagsActive)})},methods:{saveGroupActive(){this.gradioAPI.setData("groupTagsActive-"+this.name,{groupTagsActive:this.groupTagsActive,subGroupTagsActive:this.subGroupTagsActive})},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),this.saveGroupActive();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.saveGroupActive(),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){let n=[];this.tags.forEach((r,i)=>{r.originalValue===t&&n.push(i)}),n.length?n.reverse().forEach(r=>{this.tags.splice(r,1)}):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,n){let r={},i=pe.getTagsColorKey(e,t),o="";this.groupTagsColor[i]&&(o=this.groupTagsColor[i],pe.isColorTransparent(o)&&(o="")),o&&(r={background:o});for(let s of this.tags)if(s.originalValue===n){r.filter="grayscale(1)";break}return r},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}}}},eT={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})}}},tT=["innerHTML"];function nT(e,t,n,r,i,o){return he((O(),N("div",{class:et(["icon-svg","icon-svg-"+n.name]),"data-name":"name",innerHTML:i.svgCode},null,10,tT)),[[Ot,i.svgCode]])}const Bn=vn(eT,[["render",nT]]),rT={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 iT(e,t,n,r,i,o){return O(),N("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:t[0]||(t[0]=(...s)=>o.hide&&o.hide(...s))},null,512)}const oT=vn(rT,[["render",iT]]);function sT(e){return Pp()?(wC(e),!0):!1}function Zs(e){return typeof e=="function"?e():th(e)}const Ug=typeof window<"u",Qs=()=>{},aT=lT();function lT(){var e;return Ug&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function Wg(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 Kg=e=>e();function uT(e,t={}){let n,r,i=Qs;const o=l=>{clearTimeout(l),i(),i=Qs};return l=>{const c=Zs(e),d=Zs(t.maxWait);return n&&o(n),c<=0||d!==void 0&&d<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((p,y)=>{i=t.rejectOnCancel?y:p,d&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,p(l())},d)),n=setTimeout(()=>{r&&o(r),r=null,p(l())},c)})}}function cT(e=Kg){const t=Et(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:fc(t),pause:n,resume:r,eventFilter:i}}function Yi(e,t=200,n={}){return Wg(uT(t,n),e)}function Bo(e,t=!0){Nc()?pl(e):t?e():sl(e)}var Vg=Object.getOwnPropertySymbols,fT=Object.prototype.hasOwnProperty,dT=Object.prototype.propertyIsEnumerable,pT=(e,t)=>{var n={};for(var r in e)fT.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Vg)for(var r of Vg(e))t.indexOf(r)<0&&dT.call(e,r)&&(n[r]=e[r]);return n};function hT(e,t,n={}){const r=n,{eventFilter:i=Kg}=r,o=pT(r,["eventFilter"]);return ur(e,Wg(i,t),o)}var gT=Object.defineProperty,mT=Object.defineProperties,vT=Object.getOwnPropertyDescriptors,Hl=Object.getOwnPropertySymbols,qg=Object.prototype.hasOwnProperty,zg=Object.prototype.propertyIsEnumerable,Gg=(e,t,n)=>t in e?gT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yT=(e,t)=>{for(var n in t||(t={}))qg.call(t,n)&&Gg(e,n,t[n]);if(Hl)for(var n of Hl(t))zg.call(t,n)&&Gg(e,n,t[n]);return e},bT=(e,t)=>mT(e,vT(t)),CT=(e,t)=>{var n={};for(var r in e)qg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Hl)for(var r of Hl(e))t.indexOf(r)<0&&zg.call(e,r)&&(n[r]=e[r]);return n};function _T(e,t,n={}){const r=n,{eventFilter:i}=r,o=CT(r,["eventFilter"]),{eventFilter:s,pause:l,resume:c,isActive:d}=cT(i);return{stop:hT(e,t,bT(yT({},o),{eventFilter:s})),pause:l,resume:c,isActive:d}}function Tn(e,t,n){return ur(e,(r,i,o)=>{r&&t(r,i,o)},n)}function ea(e){var t;const n=Zs(e);return(t=n==null?void 0:n.$el)!=null?t:n}const ta=Ug?window:void 0;function na(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=ta):[t,n,r,i]=e,!t)return Qs;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(p=>p()),o.length=0},l=(p,y,m,C)=>(p.addEventListener(y,m,C),()=>p.removeEventListener(y,m,C)),c=ur(()=>[ea(t),Zs(i)],([p,y])=>{s(),p&&o.push(...n.flatMap(m=>r.map(C=>l(p,m,C,y))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return sT(d),d}let Yg=!1;function wT(e,t,n={}){const{window:r=ta,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return;aT&&!Yg&&(Yg=!0,Array.from(r.document.body.children).forEach(m=>m.addEventListener("click",Qs)),r.document.documentElement.addEventListener("click",Qs));let l=!0;const c=m=>i.some(C=>{if(typeof C=="string")return Array.from(r.document.querySelectorAll(C)).some(b=>b===m.target||m.composedPath().includes(b));{const b=ea(C);return b&&(m.target===b||m.composedPath().includes(b))}}),p=[na(r,"click",m=>{const C=ea(e);if(!(!C||C===m.target||m.composedPath().includes(C))){if(m.detail===0&&(l=!c(m)),!l){l=!0;return}t(m)}},{passive:!0,capture:o}),na(r,"pointerdown",m=>{const C=ea(e);C&&(l=!m.composedPath().includes(C)&&!c(m))},{passive:!0}),s&&na(r,"blur",m=>{setTimeout(()=>{var C;const b=ea(e);((C=r.document.activeElement)==null?void 0:C.tagName)==="IFRAME"&&!(b!=null&&b.contains(r.document.activeElement))&&t(m)},0)})].filter(Boolean);return()=>p.forEach(m=>m())}const jl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ul="__vueuse_ssr_handlers__",TT=kT();function kT(){return Ul in jl||(jl[Ul]=jl[Ul]||{}),jl[Ul]}function xT(e,t){return TT[e]||t}function ST(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 AT=Object.defineProperty,Xg=Object.getOwnPropertySymbols,ET=Object.prototype.hasOwnProperty,OT=Object.prototype.propertyIsEnumerable,Jg=(e,t,n)=>t in e?AT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zg=(e,t)=>{for(var n in t||(t={}))ET.call(t,n)&&Jg(e,n,t[n]);if(Xg)for(var n of Xg(t))OT.call(t,n)&&Jg(e,n,t[n]);return e};const LT={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()}},Qg="vueuse-storage";function IT(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:d=!1,shallow:p,window:y=ta,eventFilter:m,onError:C=I=>{console.error(I)}}=r,b=(p?XC:Et)(t);if(!n)try{n=xT("getDefaultStorage",()=>{var I;return(I=ta)==null?void 0:I.localStorage})()}catch(I){C(I)}if(!n)return b;const k=Zs(t),L=ST(k),P=(i=r.serializer)!=null?i:LT[L],{pause:j,resume:G}=_T(b,()=>x(b.value),{flush:o,deep:s,eventFilter:m});return y&&l&&(na(y,"storage",le),na(y,Qg,g)),le(),b;function x(I){try{if(I==null)n.removeItem(e);else{const A=P.write(I),D=n.getItem(e);D!==A&&(n.setItem(e,A),y&&y.dispatchEvent(new CustomEvent(Qg,{detail:{key:e,oldValue:D,newValue:A,storageArea:n}})))}}catch(A){C(A)}}function X(I){const A=I?I.newValue:n.getItem(e);if(A==null)return c&&k!==null&&n.setItem(e,P.write(k)),k;if(!I&&d){const D=P.read(A);return typeof d=="function"?d(D,k):L==="object"&&!Array.isArray(D)?Zg(Zg({},k),D):D}else return typeof A!="string"?A:P.read(A)}function g(I){le(I.detail)}function le(I){if(!(I&&I.storageArea!==n)){if(I&&I.key==null){b.value=k;return}if(!(I&&I.key!==e)){j();try{b.value=X(I)}catch(A){C(A)}finally{I?sl(G):G()}}}}}function af(e,t,n={}){const{window:r=ta}=n;return IT(e,t,r==null?void 0:r.localStorage,n)}var Xi=Xi||{};Xi.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 Xi=Xi||{};Xi.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(Y){var se=new Error(t+": "+Y);throw se.source=t,se}function r(){var Y=i();return t.length>0&&n("Invalid input not EOF"),Y}function i(){return G(o)}function o(){return s("linear-gradient",e.linearGradient,c)||s("repeating-linear-gradient",e.repeatingLinearGradient,c)||s("radial-gradient",e.radialGradient,y)||s("repeating-radial-gradient",e.repeatingRadialGradient,y)}function s(Y,se,ge){return l(se,function(it){var qe=ge();return qe&&(je(e.comma)||n("Missing comma before color stops")),{type:Y,orientation:qe,colorStops:G(x)}})}function l(Y,se){var ge=je(Y);if(ge){je(e.startCall)||n("Missing (");var it=se(ge);return je(e.endCall)||n("Missing )"),it}}function c(){return d()||p()}function d(){return de("directional",e.sideOrCorner,1)}function p(){return de("angular",e.angleValue,1)}function y(){var Y,se=m(),ge;return se&&(Y=[],Y.push(se),ge=t,je(e.comma)&&(se=m(),se?Y.push(se):t=ge)),Y}function m(){var Y=C()||b();if(Y)Y.at=L();else{var se=k();if(se){Y=se;var ge=L();ge&&(Y.at=ge)}else{var it=P();it&&(Y={type:"default-radial",at:it})}}return Y}function C(){var Y=de("shape",/^(circle)/i,0);return Y&&(Y.style=z()||k()),Y}function b(){var Y=de("shape",/^(ellipse)/i,0);return Y&&(Y.style=H()||k()),Y}function k(){return de("extent-keyword",e.extentKeywords,1)}function L(){if(de("position",/^at/,0)){var Y=P();return Y||n("Missing positioning value"),Y}}function P(){var Y=j();if(Y.x||Y.y)return{type:"position",value:Y}}function j(){return{x:H(),y:H()}}function G(Y){var se=Y(),ge=[];if(se)for(ge.push(se);je(e.comma);)se=Y(),se?ge.push(se):n("One extra comma");return ge}function x(){var Y=X();return Y||n("Expected color definition"),Y.length=H(),Y}function X(){return le()||A()||I()||g()}function g(){return de("literal",e.literalColor,0)}function le(){return de("hex",e.hexColor,1)}function I(){return l(e.rgbColor,function(){return{type:"rgb",value:G(D)}})}function A(){return l(e.rgbaColor,function(){return{type:"rgba",value:G(D)}})}function D(){return je(e.number)[1]}function H(){return de("%",e.percentageValue,1)||K()||z()}function K(){return de("position-keyword",e.positionKeywords,1)}function z(){return de("px",e.pixelValue,1)||de("em",e.emValue,1)}function de(Y,se,ge){var it=je(se);if(it)return{type:Y,value:it[ge]}}function je(Y){var se,ge;return ge=/^[\n\r\t\s]+/.exec(t),ge&&Re(ge[0].length),se=Y.exec(t),se&&Re(se[0].length),se}function Re(Y){t=t.substr(Y)}return function(Y){return t=Y.toString(),r()}}();var PT=Xi.parse,DT=Xi.stringify,Hn="top",pr="bottom",hr="right",jn="left",lf="auto",ra=[Hn,pr,hr,jn],Ho="start",ia="end",RT="clippingParents",em="viewport",oa="popper",NT="reference",tm=ra.reduce(function(e,t){return e.concat([t+"-"+Ho,t+"-"+ia])},[]),nm=[].concat(ra,[lf]).reduce(function(e,t){return e.concat([t,t+"-"+Ho,t+"-"+ia])},[]),MT="beforeRead",FT="read",$T="afterRead",BT="beforeMain",HT="main",jT="afterMain",UT="beforeWrite",WT="write",KT="afterWrite",VT=[MT,FT,$T,BT,HT,jT,UT,WT,KT];function $r(e){return e?(e.nodeName||"").toLowerCase():null}function er(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ji(e){var t=er(e).Element;return e instanceof t||e instanceof Element}function gr(e){var t=er(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function uf(e){if(typeof ShadowRoot>"u")return!1;var t=er(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function qT(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];!gr(o)||!$r(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 zT(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},{});!gr(i)||!$r(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const rm={name:"applyStyles",enabled:!0,phase:"write",fn:qT,effect:zT,requires:["computeStyles"]};function Br(e){return e.split("-")[0]}var Zi=Math.max,Wl=Math.min,jo=Math.round;function cf(){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 im(){return!/^((?!chrome|android).)*safari/i.test(cf())}function Uo(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&gr(e)&&(i=e.offsetWidth>0&&jo(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&jo(r.height)/e.offsetHeight||1);var s=Ji(e)?er(e):window,l=s.visualViewport,c=!im()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,p=(r.top+(c&&l?l.offsetTop:0))/o,y=r.width/i,m=r.height/o;return{width:y,height:m,top:p,right:d+y,bottom:p+m,left:d,x:d,y:p}}function ff(e){var t=Uo(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 om(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&uf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Qr(e){return er(e).getComputedStyle(e)}function GT(e){return["table","td","th"].indexOf($r(e))>=0}function Ti(e){return((Ji(e)?e.ownerDocument:e.document)||window.document).documentElement}function Kl(e){return $r(e)==="html"?e:e.assignedSlot||e.parentNode||(uf(e)?e.host:null)||Ti(e)}function sm(e){return!gr(e)||Qr(e).position==="fixed"?null:e.offsetParent}function YT(e){var t=/firefox/i.test(cf()),n=/Trident/i.test(cf());if(n&&gr(e)){var r=Qr(e);if(r.position==="fixed")return null}var i=Kl(e);for(uf(i)&&(i=i.host);gr(i)&&["html","body"].indexOf($r(i))<0;){var o=Qr(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 sa(e){for(var t=er(e),n=sm(e);n&>(n)&&Qr(n).position==="static";)n=sm(n);return n&&($r(n)==="html"||$r(n)==="body"&&Qr(n).position==="static")?t:n||YT(e)||t}function df(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function aa(e,t,n){return Zi(e,Wl(t,n))}function XT(e,t,n){var r=aa(e,t,n);return r>n?n:r}function am(){return{top:0,right:0,bottom:0,left:0}}function lm(e){return Object.assign({},am(),e)}function um(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var JT=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,lm(typeof t!="number"?t:um(t,ra))};function ZT(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Br(n.placement),c=df(l),d=[jn,hr].indexOf(l)>=0,p=d?"height":"width";if(!(!o||!s)){var y=JT(i.padding,n),m=ff(o),C=c==="y"?Hn:jn,b=c==="y"?pr:hr,k=n.rects.reference[p]+n.rects.reference[c]-s[c]-n.rects.popper[p],L=s[c]-n.rects.reference[c],P=sa(o),j=P?c==="y"?P.clientHeight||0:P.clientWidth||0:0,G=k/2-L/2,x=y[C],X=j-m[p]-y[b],g=j/2-m[p]/2+G,le=aa(x,g,X),I=c;n.modifiersData[r]=(t={},t[I]=le,t.centerOffset=le-g,t)}}function QT(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)||om(t.elements.popper,i)&&(t.elements.arrow=i))}const ek={name:"arrow",enabled:!0,phase:"main",fn:ZT,effect:QT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wo(e){return e.split("-")[1]}var tk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nk(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:jo(n*i)/i||0,y:jo(r*i)/i||0}}function cm(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,p=e.roundOffsets,y=e.isFixed,m=s.x,C=m===void 0?0:m,b=s.y,k=b===void 0?0:b,L=typeof p=="function"?p({x:C,y:k}):{x:C,y:k};C=L.x,k=L.y;var P=s.hasOwnProperty("x"),j=s.hasOwnProperty("y"),G=jn,x=Hn,X=window;if(d){var g=sa(n),le="clientHeight",I="clientWidth";if(g===er(n)&&(g=Ti(n),Qr(g).position!=="static"&&l==="absolute"&&(le="scrollHeight",I="scrollWidth")),g=g,i===Hn||(i===jn||i===hr)&&o===ia){x=pr;var A=y&&g===X&&X.visualViewport?X.visualViewport.height:g[le];k-=A-r.height,k*=c?1:-1}if(i===jn||(i===Hn||i===pr)&&o===ia){G=hr;var D=y&&g===X&&X.visualViewport?X.visualViewport.width:g[I];C-=D-r.width,C*=c?1:-1}}var H=Object.assign({position:l},d&&tk),K=p===!0?nk({x:C,y:k},er(n)):{x:C,y:k};if(C=K.x,k=K.y,c){var z;return Object.assign({},H,(z={},z[x]=j?"0":"",z[G]=P?"0":"",z.transform=(X.devicePixelRatio||1)<=1?"translate("+C+"px, "+k+"px)":"translate3d("+C+"px, "+k+"px, 0)",z))}return Object.assign({},H,(t={},t[x]=j?k+"px":"",t[G]=P?C+"px":"",t.transform="",t))}function rk(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:Br(t.placement),variation:Wo(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,cm(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,cm(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 ik={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rk,data:{}};var Vl={passive:!0};function ok(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=er(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(p){p.addEventListener("scroll",n.update,Vl)}),l&&c.addEventListener("resize",n.update,Vl),function(){o&&d.forEach(function(p){p.removeEventListener("scroll",n.update,Vl)}),l&&c.removeEventListener("resize",n.update,Vl)}}const sk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ok,data:{}};var ak={left:"right",right:"left",bottom:"top",top:"bottom"};function ql(e){return e.replace(/left|right|bottom|top/g,function(t){return ak[t]})}var lk={start:"end",end:"start"};function fm(e){return e.replace(/start|end/g,function(t){return lk[t]})}function pf(e){var t=er(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function hf(e){return Uo(Ti(e)).left+pf(e).scrollLeft}function uk(e,t){var n=er(e),r=Ti(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=im();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+hf(e),y:c}}function ck(e){var t,n=Ti(e),r=pf(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Zi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Zi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+hf(e),c=-r.scrollTop;return Qr(i||n).direction==="rtl"&&(l+=Zi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function gf(e){var t=Qr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function dm(e){return["html","body","#document"].indexOf($r(e))>=0?e.ownerDocument.body:gr(e)&&gf(e)?e:dm(Kl(e))}function la(e,t){var n;t===void 0&&(t=[]);var r=dm(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=er(r),s=i?[o].concat(o.visualViewport||[],gf(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(la(Kl(s)))}function mf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fk(e,t){var n=Uo(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 pm(e,t,n){return t===em?mf(uk(e,n)):Ji(t)?fk(t,n):mf(ck(Ti(e)))}function dk(e){var t=la(Kl(e)),n=["absolute","fixed"].indexOf(Qr(e).position)>=0,r=n&&gr(e)?sa(e):e;return Ji(r)?t.filter(function(i){return Ji(i)&&om(i,r)&&$r(i)!=="body"}):[]}function pk(e,t,n,r){var i=t==="clippingParents"?dk(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var p=pm(e,d,r);return c.top=Zi(p.top,c.top),c.right=Wl(p.right,c.right),c.bottom=Wl(p.bottom,c.bottom),c.left=Zi(p.left,c.left),c},pm(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 hm(e){var t=e.reference,n=e.element,r=e.placement,i=r?Br(r):null,o=r?Wo(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Hn:c={x:s,y:t.y-n.height};break;case pr:c={x:s,y:t.y+t.height};break;case hr:c={x:t.x+t.width,y:l};break;case jn:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?df(i):null;if(d!=null){var p=d==="y"?"height":"width";switch(o){case Ho:c[d]=c[d]-(t[p]/2-n[p]/2);break;case ia:c[d]=c[d]+(t[p]/2-n[p]/2);break}}return c}function ua(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?RT:l,d=n.rootBoundary,p=d===void 0?em:d,y=n.elementContext,m=y===void 0?oa:y,C=n.altBoundary,b=C===void 0?!1:C,k=n.padding,L=k===void 0?0:k,P=lm(typeof L!="number"?L:um(L,ra)),j=m===oa?NT:oa,G=e.rects.popper,x=e.elements[b?j:m],X=pk(Ji(x)?x:x.contextElement||Ti(e.elements.popper),c,p,s),g=Uo(e.elements.reference),le=hm({reference:g,element:G,strategy:"absolute",placement:i}),I=mf(Object.assign({},G,le)),A=m===oa?I:g,D={top:X.top-A.top+P.top,bottom:A.bottom-X.bottom+P.bottom,left:X.left-A.left+P.left,right:A.right-X.right+P.right},H=e.modifiersData.offset;if(m===oa&&H){var K=H[i];Object.keys(D).forEach(function(z){var de=[hr,pr].indexOf(z)>=0?1:-1,je=[Hn,pr].indexOf(z)>=0?"y":"x";D[z]+=K[je]*de})}return D}function hk(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?nm:c,p=Wo(r),y=p?l?tm:tm.filter(function(b){return Wo(b)===p}):ra,m=y.filter(function(b){return d.indexOf(b)>=0});m.length===0&&(m=y);var C=m.reduce(function(b,k){return b[k]=ua(e,{placement:k,boundary:i,rootBoundary:o,padding:s})[Br(k)],b},{});return Object.keys(C).sort(function(b,k){return C[b]-C[k]})}function gk(e){if(Br(e)===lf)return[];var t=ql(e);return[fm(e),t,fm(t)]}function mk(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,p=n.boundary,y=n.rootBoundary,m=n.altBoundary,C=n.flipVariations,b=C===void 0?!0:C,k=n.allowedAutoPlacements,L=t.options.placement,P=Br(L),j=P===L,G=c||(j||!b?[ql(L)]:gk(L)),x=[L].concat(G).reduce(function(ke,Ee){return ke.concat(Br(Ee)===lf?hk(t,{placement:Ee,boundary:p,rootBoundary:y,padding:d,flipVariations:b,allowedAutoPlacements:k}):Ee)},[]),X=t.rects.reference,g=t.rects.popper,le=new Map,I=!0,A=x[0],D=0;D<x.length;D++){var H=x[D],K=Br(H),z=Wo(H)===Ho,de=[Hn,pr].indexOf(K)>=0,je=de?"width":"height",Re=ua(t,{placement:H,boundary:p,rootBoundary:y,altBoundary:m,padding:d}),Y=de?z?hr:jn:z?pr:Hn;X[je]>g[je]&&(Y=ql(Y));var se=ql(Y),ge=[];if(o&&ge.push(Re[K]<=0),l&&ge.push(Re[Y]<=0,Re[se]<=0),ge.every(function(ke){return ke})){A=H,I=!1;break}le.set(H,ge)}if(I)for(var it=b?3:1,qe=function(Ee){var Le=x.find(function(He){var Ze=le.get(He);if(Ze)return Ze.slice(0,Ee).every(function(Ie){return Ie})});if(Le)return A=Le,"break"},ie=it;ie>0;ie--){var Ce=qe(ie);if(Ce==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const vk={name:"flip",enabled:!0,phase:"main",fn:mk,requiresIfExists:["offset"],data:{_skip:!1}};function gm(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 mm(e){return[Hn,hr,pr,jn].some(function(t){return e[t]>=0})}function yk(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ua(t,{elementContext:"reference"}),l=ua(t,{altBoundary:!0}),c=gm(s,r),d=gm(l,i,o),p=mm(c),y=mm(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:p,hasPopperEscaped:y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":y})}const bk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yk};function Ck(e,t,n){var r=Br(e),i=[jn,Hn].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,[jn,hr].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function _k(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=nm.reduce(function(p,y){return p[y]=Ck(y,t.rects,o),p},{}),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 wk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_k};function Tk(e){var t=e.state,n=e.name;t.modifiersData[n]=hm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const kk={name:"popperOffsets",enabled:!0,phase:"read",fn:Tk,data:{}};function xk(e){return e==="x"?"y":"x"}function Sk(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,p=n.altBoundary,y=n.padding,m=n.tether,C=m===void 0?!0:m,b=n.tetherOffset,k=b===void 0?0:b,L=ua(t,{boundary:c,rootBoundary:d,padding:y,altBoundary:p}),P=Br(t.placement),j=Wo(t.placement),G=!j,x=df(P),X=xk(x),g=t.modifiersData.popperOffsets,le=t.rects.reference,I=t.rects.popper,A=typeof k=="function"?k(Object.assign({},t.rects,{placement:t.placement})):k,D=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),H=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,K={x:0,y:0};if(g){if(o){var z,de=x==="y"?Hn:jn,je=x==="y"?pr:hr,Re=x==="y"?"height":"width",Y=g[x],se=Y+L[de],ge=Y-L[je],it=C?-I[Re]/2:0,qe=j===Ho?le[Re]:I[Re],ie=j===Ho?-I[Re]:-le[Re],Ce=t.elements.arrow,ke=C&&Ce?ff(Ce):{width:0,height:0},Ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:am(),Le=Ee[de],He=Ee[je],Ze=aa(0,le[Re],ke[Re]),Ie=G?le[Re]/2-it-Ze-Le-D.mainAxis:qe-Ze-Le-D.mainAxis,ot=G?-le[Re]/2+it+Ze+He+D.mainAxis:ie+Ze+He+D.mainAxis,vt=t.elements.arrow&&sa(t.elements.arrow),R=vt?x==="y"?vt.clientTop||0:vt.clientLeft||0:0,$=(z=H==null?void 0:H[x])!=null?z:0,J=Y+Ie-$-R,ne=Y+ot-$,W=aa(C?Wl(se,J):se,Y,C?Zi(ge,ne):ge);g[x]=W,K[x]=W-Y}if(l){var Q,we=x==="x"?Hn:jn,me=x==="x"?pr:hr,_e=g[X],ue=X==="y"?"height":"width",Se=_e+L[we],Te=_e-L[me],Me=[Hn,jn].indexOf(P)!==-1,Ae=(Q=H==null?void 0:H[X])!=null?Q:0,ze=Me?Se:_e-le[ue]-I[ue]-Ae+D.altAxis,pt=Me?_e+le[ue]+I[ue]-Ae-D.altAxis:Te,ut=C&&Me?XT(ze,_e,pt):aa(C?ze:Se,_e,C?pt:Te);g[X]=ut,K[X]=ut-_e}t.modifiersData[r]=K}}const Ak={name:"preventOverflow",enabled:!0,phase:"main",fn:Sk,requiresIfExists:["offset"]};function Ek(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Ok(e){return e===er(e)||!gr(e)?pf(e):Ek(e)}function Lk(e){var t=e.getBoundingClientRect(),n=jo(t.width)/e.offsetWidth||1,r=jo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ik(e,t,n){n===void 0&&(n=!1);var r=gr(t),i=gr(t)&&Lk(t),o=Ti(t),s=Uo(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&(($r(t)!=="body"||gf(o))&&(l=Ok(t)),gr(t)?(c=Uo(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=hf(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Pk(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 Dk(e){var t=Pk(e);return VT.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Rk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Nk(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 vm={placement:"bottom",modifiers:[],strategy:"absolute"};function ym(){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 Mk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?vm:i;return function(l,c,d){d===void 0&&(d=o);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},vm,o),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},y=[],m=!1,C={state:p,setOptions:function(P){var j=typeof P=="function"?P(p.options):P;k(),p.options=Object.assign({},o,p.options,j),p.scrollParents={reference:Ji(l)?la(l):l.contextElement?la(l.contextElement):[],popper:la(c)};var G=Dk(Nk([].concat(r,p.options.modifiers)));return p.orderedModifiers=G.filter(function(x){return x.enabled}),b(),C.update()},forceUpdate:function(){if(!m){var P=p.elements,j=P.reference,G=P.popper;if(ym(j,G)){p.rects={reference:Ik(j,sa(G),p.options.strategy==="fixed"),popper:ff(G)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(D){return p.modifiersData[D.name]=Object.assign({},D.data)});for(var x=0;x<p.orderedModifiers.length;x++){if(p.reset===!0){p.reset=!1,x=-1;continue}var X=p.orderedModifiers[x],g=X.fn,le=X.options,I=le===void 0?{}:le,A=X.name;typeof g=="function"&&(p=g({state:p,options:I,name:A,instance:C})||p)}}}},update:Rk(function(){return new Promise(function(L){C.forceUpdate(),L(p)})}),destroy:function(){k(),m=!0}};if(!ym(l,c))return C;C.setOptions(d).then(function(L){!m&&d.onFirstUpdate&&d.onFirstUpdate(L)});function b(){p.orderedModifiers.forEach(function(L){var P=L.name,j=L.options,G=j===void 0?{}:j,x=L.effect;if(typeof x=="function"){var X=x({state:p,name:P,instance:C,options:G}),g=function(){};y.push(X||g)}})}function k(){y.forEach(function(L){return L()}),y=[]}return C}}var Fk=[sk,kk,ik,rm,wk,vk,Ak,ek,bk],bm=Mk({defaultModifiers:Fk});/*!
|
||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||
*
|
||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/function Cm(e){return Object.prototype.toString.call(e)==="[object Object]"}function $k(e){var t,n;return Cm(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(Cm(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function ca(){return ca=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},ca.apply(this,arguments)}function _m(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 Bk={silent:!1,logLevel:"warn"},Hk=["validator"],wm=Object.prototype,Tm=wm.toString,jk=wm.hasOwnProperty,km=/^\s*function (\w+)/;function xm(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(km);return r?r[1]:""}return""}const Qi=$k;let kn=e=>e;const Ko=(e,t)=>jk.call(e,t),Uk=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Vo=Array.isArray||function(e){return Tm.call(e)==="[object Array]"},qo=e=>Tm.call(e)==="[object Function]",zl=e=>Qi(e)&&Ko(e,"_vueTypes_name"),Sm=e=>Qi(e)&&(Ko(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>Ko(e,t)));function vf(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function eo(e,t,n=!1){let r,i=!0,o="";r=Qi(e)?e:{type:e};const s=zl(r)?r._vueTypes_name+" - ":"";if(Sm(r)&&r.type!==null){if(r.type===void 0||r.type===!0||!r.required&&t===void 0)return i;Vo(r.type)?(i=r.type.some(l=>eo(l,t,!0)===!0),o=r.type.map(l=>xm(l)).join(" or ")):(o=xm(r),i=o==="Array"?Vo(t):o==="Object"?Qi(t):o==="String"||o==="Number"||o==="Boolean"||o==="Function"?function(l){if(l==null)return"";const c=l.constructor.toString().match(km);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?(kn(l),!1):l}if(Ko(r,"validator")&&qo(r.validator)){const l=kn,c=[];if(kn=d=>{c.push(d)},i=r.validator(t),kn=l,!i){const d=(c.length>1?"* ":"")+c.join(`
|
||
* `);return c.length=0,n===!1?(kn(d),i):d}}return i}function tr(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?(Ko(this,"default")&&delete this.default,this):qo(i)||eo(this,i,!0)===!0?(this.default=Vo(i)?()=>[...i]:Qi(i)?()=>Object.assign({},i):i,this):(kn(`${this._vueTypes_name} - invalid default value: "${i}"`),this)}}}),{validator:r}=n;return qo(r)&&(n.validator=vf(r,n)),n}function Hr(e,t){const n=tr(e,t);return Object.defineProperty(n,"validate",{value(r){return qo(this.validator)&&kn(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
||
${JSON.stringify(this)}`),this.validator=vf(r,this),this}})}function Am(e,t,n){const r=function(c){const d={};return Object.getOwnPropertyNames(c).forEach(p=>{d[p]=Object.getOwnPropertyDescriptor(c,p)}),Object.defineProperties({},d)}(t);if(r._vueTypes_name=e,!Qi(n))return r;const{validator:i}=n,o=_m(n,Hk);if(qo(i)){let{validator:c}=r;c&&(c=(l=(s=c).__original)!==null&&l!==void 0?l:s),r.validator=vf(c?function(d){return c.call(this,d)&&i.call(this,d)}:i,r)}var s,l;return Object.assign(r,o)}function Gl(e){return e.replace(/^(?!\s*$)/gm," ")}const Wk=()=>Hr("any",{}),Kk=()=>Hr("function",{type:Function}),Vk=()=>Hr("boolean",{type:Boolean}),qk=()=>Hr("string",{type:String}),zk=()=>Hr("number",{type:Number}),Gk=()=>Hr("array",{type:Array}),Yk=()=>Hr("object",{type:Object}),Xk=()=>tr("integer",{type:Number,validator:e=>Uk(e)}),Jk=()=>tr("symbol",{validator:e=>typeof e=="symbol"});function Zk(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return tr(e.name||"<<anonymous function>>",{type:null,validator(n){const r=e(n);return r||kn(`${this._vueTypes_name} - ${t}`),r}})}function Qk(e){if(!Vo(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 tr("oneOf",{type:n.length>0?n:void 0,validator(r){const i=e.indexOf(r)!==-1;return i||kn(t),i}})}function ex(e){if(!Vo(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(Sm(o)){if(zl(o)&&o._vueTypes_name==="oneOf"&&o.type){n=n.concat(o.type);continue}if(qo(o.validator)&&(t=!0),o.type===!0||!o.type){kn('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 tr("oneOfType",t?{type:r,validator(i){const o=[],s=e.some(l=>{const c=eo(zl(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,i,!0);return typeof c=="string"&&o.push(c),c===!0});return s||kn(`oneOfType - provided value does not match any of the ${o.length} passed-in validators:
|
||
${Gl(o.join(`
|
||
`))}`),s}}:{type:r})}function tx(e){return tr("arrayOf",{type:Array,validator(t){let n="";const r=t.every(i=>(n=eo(e,i,!0),n===!0));return r||kn(`arrayOf - value validation error:
|
||
${Gl(n)}`),r}})}function nx(e){return tr("instanceOf",{type:e})}function rx(e){return tr("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(i=>(n=eo(e,t[i],!0),n===!0));return r||kn(`objectOf - value validation error:
|
||
${Gl(n)}`),r}})}function ix(e){const t=Object.keys(e),n=t.filter(i=>{var o;return!((o=e[i])===null||o===void 0||!o.required)}),r=tr("shape",{type:Object,validator(i){if(!Qi(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 kn(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||(kn(`shape - shape definition does not include a "${s}" property. Allowed keys: "${t.join('", "')}".`),!1);const l=eo(e[s],i[s],!0);return typeof l=="string"&&kn(`shape - "${s}" property validation error:
|
||
${Gl(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 ox=["name","validate","getter"],sx=(()=>{var e;return(e=class{static get any(){return Wk()}static get func(){return Kk().def(this.defaults.func)}static get bool(){return Vk().def(this.defaults.bool)}static get string(){return qk().def(this.defaults.string)}static get number(){return zk().def(this.defaults.number)}static get array(){return Gk().def(this.defaults.array)}static get object(){return Yk().def(this.defaults.object)}static get integer(){return Xk().def(this.defaults.integer)}static get symbol(){return Jk()}static get nullable(){return{type:null}}static extend(t){if(Vo(t))return t.forEach(c=>this.extend(c)),this;const{name:n,validate:r=!1,getter:i=!1}=t,o=_m(t,ox);if(Ko(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:s}=o;if(zl(s))return delete o.type,Object.defineProperty(this,n,i?{get:()=>Am(n,s,o)}:{value(...c){const d=Am(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?Hr(n,c):tr(n,c)},enumerable:!0}:{value(...c){const d=Object.assign({},o);let p;return p=r?Hr(n,d):tr(n,d),d.validator&&(p.validator=d.validator.bind(p,...c)),p},enumerable:!0},Object.defineProperty(this,n,l)}}).defaults={},e.sensibleDefaults=void 0,e.config=Bk,e.custom=Zk,e.oneOf=Qk,e.instanceOf=nx,e.oneOfType=ex,e.arrayOf=tx,e.objectOf=rx,e.shape=ix,e.utils={validate:(t,n)=>eo(n,t,!0)===!0,toType:(t,n,r=!1)=>r?Hr(t,n):tr(t,n)},e})();function ax(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;return(t=class extends sx{static get sensibleDefaults(){return ca({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?ca({},n!==!0?n:e):{}}}).defaults=ca({},e),t}let lt=class extends ax(){};var Em=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yf(e){var t={exports:{}};return e(t,t.exports),t.exports}var Yl=function(e){return e&&e.Math==Math&&e},on=Yl(typeof globalThis=="object"&&globalThis)||Yl(typeof window=="object"&&window)||Yl(typeof self=="object"&&self)||Yl(typeof Em=="object"&&Em)||function(){return this}()||Function("return this")(),Nt=function(e){try{return!!e()}catch{return!0}},mr=!Nt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Om={}.propertyIsEnumerable,Lm=Object.getOwnPropertyDescriptor,lx={f:Lm&&!Om.call({1:2},1)?function(e){var t=Lm(this,e);return!!t&&t.enumerable}:Om},Xl=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ux={}.toString,ei=function(e){return ux.call(e).slice(8,-1)},cx="".split,Jl=Nt(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return ei(e)=="String"?cx.call(e,""):Object(e)}:Object,ki=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},zo=function(e){return Jl(ki(e))},dn=function(e){return typeof e=="object"?e!==null:typeof e=="function"},bf=function(e,t){if(!dn(e))return e;var n,r;if(t&&typeof(n=e.toString)=="function"&&!dn(r=n.call(e))||typeof(n=e.valueOf)=="function"&&!dn(r=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!dn(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},fx={}.hasOwnProperty,Zt=function(e,t){return fx.call(e,t)},Cf=on.document,dx=dn(Cf)&&dn(Cf.createElement),Im=function(e){return dx?Cf.createElement(e):{}},Pm=!mr&&!Nt(function(){return Object.defineProperty(Im("div"),"a",{get:function(){return 7}}).a!=7}),Dm=Object.getOwnPropertyDescriptor,_f={f:mr?Dm:function(e,t){if(e=zo(e),t=bf(t,!0),Pm)try{return Dm(e,t)}catch{}if(Zt(e,t))return Xl(!lx.f.call(e,t),e[t])}},In=function(e){if(!dn(e))throw TypeError(String(e)+" is not an object");return e},Rm=Object.defineProperty,ti={f:mr?Rm:function(e,t,n){if(In(e),t=bf(t,!0),In(n),Pm)try{return Rm(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}},vr=mr?function(e,t,n){return ti.f(e,t,Xl(1,n))}:function(e,t,n){return e[t]=n,e},wf=function(e,t){try{vr(on,e,t)}catch{on[e]=t}return t},to=on["__core-js_shared__"]||wf("__core-js_shared__",{}),px=Function.toString;typeof to.inspectSource!="function"&&(to.inspectSource=function(e){return px.call(e)});var Zl,fa,Ql,Nm=to.inspectSource,Mm=on.WeakMap,hx=typeof Mm=="function"&&/native code/.test(Nm(Mm)),Fm=yf(function(e){(e.exports=function(t,n){return to[t]||(to[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),gx=0,mx=Math.random(),Tf=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++gx+mx).toString(36)},$m=Fm("keys"),kf=function(e){return $m[e]||($m[e]=Tf(e))},eu={},vx=on.WeakMap;if(hx){var Go=to.state||(to.state=new vx),yx=Go.get,bx=Go.has,Cx=Go.set;Zl=function(e,t){return t.facade=e,Cx.call(Go,e,t),t},fa=function(e){return yx.call(Go,e)||{}},Ql=function(e){return bx.call(Go,e)}}else{var da=kf("state");eu[da]=!0,Zl=function(e,t){return t.facade=e,vr(e,da,t),t},fa=function(e){return Zt(e,da)?e[da]:{}},Ql=function(e){return Zt(e,da)}}var xi={set:Zl,get:fa,has:Ql,enforce:function(e){return Ql(e)?fa(e):Zl(e,{})},getterFor:function(e){return function(t){var n;if(!dn(t)||(n=fa(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},Si=yf(function(e){var t=xi.get,n=xi.enforce,r=String(String).split("String");(e.exports=function(i,o,s,l){var c,d=!!l&&!!l.unsafe,p=!!l&&!!l.enumerable,y=!!l&&!!l.noTargetGet;typeof s=="function"&&(typeof o!="string"||Zt(s,"name")||vr(s,"name",o),(c=n(s)).source||(c.source=r.join(typeof o=="string"?o:""))),i!==on?(d?!y&&i[o]&&(p=!0):delete i[o],p?i[o]=s:vr(i,o,s)):p?i[o]=s:wf(o,s)})(Function.prototype,"toString",function(){return typeof this=="function"&&t(this).source||Nm(this)})}),xf=on,Bm=function(e){return typeof e=="function"?e:void 0},tu=function(e,t){return arguments.length<2?Bm(xf[e])||Bm(on[e]):xf[e]&&xf[e][t]||on[e]&&on[e][t]},_x=Math.ceil,wx=Math.floor,Yo=function(e){return isNaN(e=+e)?0:(e>0?wx:_x)(e)},Tx=Math.min,nr=function(e){return e>0?Tx(Yo(e),9007199254740991):0},kx=Math.max,xx=Math.min,nu=function(e,t){var n=Yo(e);return n<0?kx(n+t,0):xx(n,t)},Hm=function(e){return function(t,n,r){var i,o=zo(t),s=nr(o.length),l=nu(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}},jm={includes:Hm(!0),indexOf:Hm(!1)},Sx=jm.indexOf,Um=function(e,t){var n,r=zo(e),i=0,o=[];for(n in r)!Zt(eu,n)&&Zt(r,n)&&o.push(n);for(;t.length>i;)Zt(r,n=t[i++])&&(~Sx(o,n)||o.push(n));return o},ru=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ax=ru.concat("length","prototype"),Ex={f:Object.getOwnPropertyNames||function(e){return Um(e,Ax)}},Ox={f:Object.getOwnPropertySymbols},Lx=tu("Reflect","ownKeys")||function(e){var t=Ex.f(In(e)),n=Ox.f;return n?t.concat(n(e)):t},Ix=function(e,t){for(var n=Lx(t),r=ti.f,i=_f.f,o=0;o<n.length;o++){var s=n[o];Zt(e,s)||r(e,s,i(t,s))}},Px=/#|\.prototype\./,pa=function(e,t){var n=Rx[Dx(e)];return n==Mx||n!=Nx&&(typeof t=="function"?Nt(t):!!t)},Dx=pa.normalize=function(e){return String(e).replace(Px,".").toLowerCase()},Rx=pa.data={},Nx=pa.NATIVE="N",Mx=pa.POLYFILL="P",Sf=pa,Fx=_f.f,xn=function(e,t){var n,r,i,o,s,l=e.target,c=e.global,d=e.stat;if(n=c?on:d?on[l]||wf(l,{}):(on[l]||{}).prototype)for(r in t){if(o=t[r],i=e.noTargetGet?(s=Fx(n,r))&&s.value:n[r],!Sf(c?r:l+(d?".":"#")+r,e.forced)&&i!==void 0){if(typeof o==typeof i)continue;Ix(o,i)}(e.sham||i&&i.sham)&&vr(o,"sham",!0),Si(n,r,o,e)}},Af=function(e,t){var n=[][e];return!!n&&Nt(function(){n.call(null,t||function(){throw 1},1)})},$x=Object.defineProperty,Ef={},Wm=function(e){throw e},Xo=function(e,t){if(Zt(Ef,e))return Ef[e];t||(t={});var n=[][e],r=!!Zt(t,"ACCESSORS")&&t.ACCESSORS,i=Zt(t,0)?t[0]:Wm,o=Zt(t,1)?t[1]:void 0;return Ef[e]=!!n&&!Nt(function(){if(r&&!mr)return!0;var s={length:-1};r?$x(s,1,{enumerable:!0,get:Wm}):s[1]=1,n.call(s,i,o)})},Bx=jm.indexOf,Km=[].indexOf,Vm=!!Km&&1/[1].indexOf(1,-0)<0,Hx=Af("indexOf"),jx=Xo("indexOf",{ACCESSORS:!0,1:0});function no(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qm(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 ro(e,t,n){return t&&qm(e.prototype,t),n&&qm(e,n),e}xn({target:"Array",proto:!0,forced:Vm||!Hx||!jx},{indexOf:function(e){return Vm?Km.apply(this,arguments)||0:Bx(this,e,arguments.length>1?arguments[1]:void 0)}}),function(){function e(){no(this,e)}return ro(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 Ux=[].join,Wx=Jl!=Object,Kx=Af("join",",");xn({target:"Array",proto:!0,forced:Wx||!Kx},{join:function(e){return Ux.call(zo(this),e===void 0?",":e)}});var Jo,iu,ni=function(e){return Object(ki(e))},Zo=Array.isArray||function(e){return ei(e)=="Array"},zm=!!Object.getOwnPropertySymbols&&!Nt(function(){return!String(Symbol())}),Vx=zm&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ou=Fm("wks"),ha=on.Symbol,qx=Vx?ha:ha&&ha.withoutSetter||Tf,zt=function(e){return Zt(ou,e)||(zm&&Zt(ha,e)?ou[e]=ha[e]:ou[e]=qx("Symbol."+e)),ou[e]},zx=zt("species"),su=function(e,t){var n;return Zo(e)&&(typeof(n=e.constructor)!="function"||n!==Array&&!Zo(n.prototype)?dn(n)&&(n=n[zx])===null&&(n=void 0):n=void 0),new(n===void 0?Array:n)(t===0?0:t)},Qo=function(e,t,n){var r=bf(t);r in e?ti.f(e,r,Xl(0,n)):e[r]=n},Of=tu("navigator","userAgent")||"",Gm=on.process,Ym=Gm&&Gm.versions,Xm=Ym&&Ym.v8;Xm?iu=(Jo=Xm.split("."))[0]+Jo[1]:Of&&(!(Jo=Of.match(/Edge\/(\d+)/))||Jo[1]>=74)&&(Jo=Of.match(/Chrome\/(\d+)/))&&(iu=Jo[1]);var au=iu&&+iu,Gx=zt("species"),Lf=function(e){return au>=51||!Nt(function(){var t=[];return(t.constructor={})[Gx]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Yx=Lf("splice"),Xx=Xo("splice",{ACCESSORS:!0,0:0,1:2}),Jx=Math.max,Zx=Math.min;xn({target:"Array",proto:!0,forced:!Yx||!Xx},{splice:function(e,t){var n,r,i,o,s,l,c=ni(this),d=nr(c.length),p=nu(e,d),y=arguments.length;if(y===0?n=r=0:y===1?(n=0,r=d-p):(n=y-2,r=Zx(Jx(Yo(t),0),d-p)),d+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=su(c,r),o=0;o<r;o++)(s=p+o)in c&&Qo(i,o,c[s]);if(i.length=r,n<r){for(o=p;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>p;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+p]=arguments[o+2];return c.length=d-r+n,i}});var Jm={};Jm[zt("toStringTag")]="z";var If=String(Jm)==="[object z]",Qx=zt("toStringTag"),eS=ei(function(){return arguments}())=="Arguments",Zm=If?ei: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),Qx))=="string"?n:eS?ei(t):(r=ei(t))=="Object"&&typeof t.callee=="function"?"Arguments":r},tS=If?{}.toString:function(){return"[object "+Zm(this)+"]"};If||Si(Object.prototype,"toString",tS,{unsafe:!0});var Qm=function(){var e=In(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 ev(e,t){return RegExp(e,t)}var Pf,Df,tv={UNSUPPORTED_Y:Nt(function(){var e=ev("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),BROKEN_CARET:Nt(function(){var e=ev("^r","gy");return e.lastIndex=2,e.exec("str")!=null})},lu=RegExp.prototype.exec,nS=String.prototype.replace,nv=lu,Rf=(Pf=/a/,Df=/b*/g,lu.call(Pf,"a"),lu.call(Df,"a"),Pf.lastIndex!==0||Df.lastIndex!==0),rv=tv.UNSUPPORTED_Y||tv.BROKEN_CARET,Nf=/()??/.exec("")[1]!==void 0;(Rf||Nf||rv)&&(nv=function(e){var t,n,r,i,o=this,s=rv&&o.sticky,l=Qm.call(o),c=o.source,d=0,p=e;return s&&((l=l.replace("y","")).indexOf("g")===-1&&(l+="g"),p=String(e).slice(o.lastIndex),o.lastIndex>0&&(!o.multiline||o.multiline&&e[o.lastIndex-1]!==`
|
||
`)&&(c="(?: "+c+")",p=" "+p,d++),n=new RegExp("^(?:"+c+")",l)),Nf&&(n=new RegExp("^"+c+"$(?!\\s)",l)),Rf&&(t=o.lastIndex),r=lu.call(s?n:o,p),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:Rf&&r&&(o.lastIndex=o.global?r.index+r[0].length:t),Nf&&r&&r.length>1&&nS.call(r[0],n,function(){for(i=1;i<arguments.length-2;i++)arguments[i]===void 0&&(r[i]=void 0)}),r});var ga=nv;xn({target:"RegExp",proto:!0,forced:/./.exec!==ga},{exec:ga});var iv=RegExp.prototype,ov=iv.toString,rS=Nt(function(){return ov.call({source:"a",flags:"b"})!="/a/b"}),iS=ov.name!="toString";(rS||iS)&&Si(RegExp.prototype,"toString",function(){var e=In(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===void 0&&e instanceof RegExp&&!("flags"in iv)?Qm.call(e):n)},{unsafe:!0});var oS=zt("species"),sS=!Nt(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"}),sv="a".replace(/./,"$0")==="$0",av=zt("replace"),lv=!!/./[av]&&/./[av]("a","$0")==="",aS=!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"}),uv=function(e,t,n,r){var i=zt(e),o=!Nt(function(){var y={};return y[i]=function(){return 7},""[e](y)!=7}),s=o&&!Nt(function(){var y=!1,m=/a/;return e==="split"&&((m={}).constructor={},m.constructor[oS]=function(){return m},m.flags="",m[i]=/./[i]),m.exec=function(){return y=!0,null},m[i](""),!y});if(!o||!s||e==="replace"&&(!sS||!sv||lv)||e==="split"&&!aS){var l=/./[i],c=n(i,""[e],function(y,m,C,b,k){return m.exec===ga?o&&!k?{done:!0,value:l.call(m,C,b)}:{done:!0,value:y.call(C,m,b)}:{done:!1}},{REPLACE_KEEPS_$0:sv,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:lv}),d=c[0],p=c[1];Si(String.prototype,e,d),Si(RegExp.prototype,i,t==2?function(y,m){return p.call(y,this,m)}:function(y){return p.call(y,this)})}r&&vr(RegExp.prototype[i],"sham",!0)},lS=zt("match"),cv=function(e){var t;return dn(e)&&((t=e[lS])!==void 0?!!t:ei(e)=="RegExp")},Mf=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e},uS=zt("species"),fv=function(e){return function(t,n){var r,i,o=String(ki(t)),s=Yo(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}},dv={codeAt:fv(!1),charAt:fv(!0)},cS=dv.charAt,pv=function(e,t,n){return t+(n?cS(e,t).length:1)},Ff=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(ei(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return ga.call(e,t)},fS=[].push,dS=Math.min,es=!Nt(function(){return!RegExp(4294967295,"y")});uv("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(ki(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!cv(i))return t.call(s,i,l);for(var c,d,p,y=[],m=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),C=0,b=new RegExp(i.source,m+"g");(c=ga.call(b,s))&&!((d=b.lastIndex)>C&&(y.push(s.slice(C,c.index)),c.length>1&&c.index<s.length&&fS.apply(y,c.slice(1)),p=c[0].length,C=d,y.length>=l));)b.lastIndex===c.index&&b.lastIndex++;return C===s.length?!p&&b.test("")||y.push(""):y.push(s.slice(C)),y.length>l?y.slice(0,l):y}:"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=ki(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=In(i),c=String(this),d=function(x,X){var g,le=In(x).constructor;return le===void 0||(g=In(le)[uS])==null?X:Mf(g)}(l,RegExp),p=l.unicode,y=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(es?"y":"g"),m=new d(es?l:"^(?:"+l.source+")",y),C=o===void 0?4294967295:o>>>0;if(C===0)return[];if(c.length===0)return Ff(m,c)===null?[c]:[];for(var b=0,k=0,L=[];k<c.length;){m.lastIndex=es?k:0;var P,j=Ff(m,es?c:c.slice(k));if(j===null||(P=dS(nr(m.lastIndex+(es?0:k)),c.length))===b)k=pv(c,k,p);else{if(L.push(c.slice(b,k)),L.length===C)return L;for(var G=1;G<=j.length-1;G++)if(L.push(j[G]),L.length===C)return L;k=b=P}}return L.push(c.slice(b)),L}]},!es);var $f=`
|
||
\v\f\r \u2028\u2029\uFEFF`,uu="["+$f+"]",pS=RegExp("^"+uu+uu+"*"),hS=RegExp(uu+uu+"*$"),Bf=function(e){return function(t){var n=String(ki(t));return 1&e&&(n=n.replace(pS,"")),2&e&&(n=n.replace(hS,"")),n}},gS={start:Bf(1),end:Bf(2),trim:Bf(3)},mS=gS.trim;xn({target:"String",proto:!0,forced:function(e){return Nt(function(){return!!$f[e]()||"
"[e]()!="
"||$f[e].name!==e})}("trim")},{trim:function(){return mS(this)}});var vS=Lf("slice"),yS=Xo("slice",{ACCESSORS:!0,0:0,1:2}),bS=zt("species"),CS=[].slice,_S=Math.max;xn({target:"Array",proto:!0,forced:!vS||!yS},{slice:function(e,t){var n,r,i,o=zo(this),s=nr(o.length),l=nu(e,s),c=nu(t===void 0?s:t,s);if(Zo(o)&&(typeof(n=o.constructor)!="function"||n!==Array&&!Zo(n.prototype)?dn(n)&&(n=n[bS])===null&&(n=void 0):n=void 0,n===Array||n===void 0))return CS.call(o,l,c);for(r=new(n===void 0?Array:n)(_S(c-l,0)),i=0;l<c;l++,i++)l in o&&Qo(r,i,o[l]);return r.length=i,r}});var Hf=Object.keys||function(e){return Um(e,ru)},wS=Nt(function(){Hf(1)});xn({target:"Object",stat:!0,forced:wS},{keys:function(e){return Hf(ni(e))}});var jf,TS=function(e){if(cv(e))throw TypeError("The method doesn't accept regular expressions");return e},kS=zt("match"),xS=_f.f,hv="".startsWith,SS=Math.min,gv=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[kS]=!1,"/./"[e](t)}catch{}}return!1}("startsWith"),AS=!(gv||(jf=xS(String.prototype,"startsWith"),!jf||jf.writable));function mv(e){return(mv=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)}xn({target:"String",proto:!0,forced:!AS&&!gv},{startsWith:function(e){var t=String(ki(this));TS(e);var n=nr(SS(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return hv?hv.call(t,r,n):t.slice(n,n+r.length)===r}});var ts=function(e){return typeof e=="string"},ns=function(e){return e!==null&&mv(e)==="object"},rs=function(){function e(){no(this,e)}return ro(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&&ns(t)&&t.nodeType===1?t.getBoundingClientRect():null}},{key:"hasClass",value:function(t,n){return!!(t&&ns(t)&&ts(n)&&t.nodeType===1)&&t.classList.contains(n.trim())}},{key:"addClass",value:function(t,n){if(t&&ns(t)&&ts(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&&ns(t)&&ts(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&&ns(t)&&ts(n)&&t.nodeType===1&&t.classList.toggle(n,r)}},{key:"replaceClass",value:function(t,n,r){t&&ns(t)&&ts(n)&&ts(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),p=Math.floor(180/(Math.PI/d));return n.clientX>i&&n.clientY>o&&(p=180-p),n.clientX==i&&n.clientY>o&&(p=180),n.clientX>i&&n.clientY==o&&(p=90),n.clientX<i&&n.clientY>o&&(p=180+p),n.clientX<i&&n.clientY==o&&(p=270),n.clientX<i&&n.clientY<o&&(p=360-p),p}},{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}(),ES=Math.floor,OS="".replace,LS=/\$([$&'`]|\d\d?|<[^>]*>)/g,IS=/\$([$&'`]|\d\d?)/g,PS=function(e,t,n,r,i,o){var s=n+e.length,l=r.length,c=IS;return i!==void 0&&(i=ni(i),c=LS),OS.call(o,c,function(d,p){var y;switch(p.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":y=i[p.slice(1,-1)];break;default:var m=+p;if(m===0)return d;if(m>l){var C=ES(m/10);return C===0?d:C<=l?r[C-1]===void 0?p.charAt(1):r[C-1]+p.charAt(1):d}y=r[m-1]}return y===void 0?"":y})},DS=Math.max,RS=Math.min;uv("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=ki(this),p=l==null?void 0:l[e];return p!==void 0?p.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 p=In(l),y=String(this),m=typeof c=="function";m||(c=String(c));var C=p.global;if(C){var b=p.unicode;p.lastIndex=0}for(var k=[];;){var L=Ff(p,y);if(L===null||(k.push(L),!C))break;String(L[0])===""&&(p.lastIndex=pv(y,nr(p.lastIndex),b))}for(var P,j="",G=0,x=0;x<k.length;x++){L=k[x];for(var X=String(L[0]),g=DS(RS(Yo(L.index),y.length),0),le=[],I=1;I<L.length;I++)le.push((P=L[I])===void 0?P:String(P));var A=L.groups;if(m){var D=[X].concat(le,g,y);A!==void 0&&D.push(A);var H=String(c.apply(void 0,D))}else H=PS(X,y,g,le,A,c);g>=G&&(j+=y.slice(G,g)+H,G=g+X.length)}return j+y.slice(G)}]}),function(){function e(){no(this,e)}return ro(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(){no(this,e)}return ro(e,null,[{key:"_clone",value:function(){}}]),e}();var vv=zt("isConcatSpreadable"),NS=au>=51||!Nt(function(){var e=[];return e[vv]=!1,e.concat()[0]!==e}),MS=Lf("concat"),FS=function(e){if(!dn(e))return!1;var t=e[vv];return t!==void 0?!!t:Zo(e)};xn({target:"Array",proto:!0,forced:!NS||!MS},{concat:function(e){var t,n,r,i,o,s=ni(this),l=su(s,0),c=0;for(t=-1,r=arguments.length;t<r;t++)if(FS(o=t===-1?s:arguments[t])){if(c+(i=nr(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,c++)n in o&&Qo(l,c,o[n])}else{if(c>=9007199254740991)throw TypeError("Maximum allowed index exceeded");Qo(l,c++,o)}return l.length=c,l}});var Uf,ma=function(e,t,n){if(Mf(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)}},yv=[].push,Ai=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,p,y){for(var m,C,b=ni(c),k=Jl(b),L=ma(d,p,3),P=nr(k.length),j=0,G=y||su,x=t?G(c,P):n||s?G(c,0):void 0;P>j;j++)if((l||j in k)&&(C=L(m=k[j],j,b),e))if(t)x[j]=C;else if(C)switch(e){case 3:return!0;case 5:return m;case 6:return j;case 2:yv.call(x,m)}else switch(e){case 4:return!1;case 7:yv.call(x,m)}return o?-1:r||i?i:x}},bv={forEach:Ai(0),map:Ai(1),filter:Ai(2),some:Ai(3),every:Ai(4),find:Ai(5),findIndex:Ai(6),filterOut:Ai(7)},$S=mr?Object.defineProperties:function(e,t){In(e);for(var n,r=Hf(t),i=r.length,o=0;i>o;)ti.f(e,n=r[o++],t[n]);return e},BS=tu("document","documentElement"),Cv=kf("IE_PROTO"),Wf=function(){},_v=function(e){return"<script>"+e+"<\/script>"},cu=function(){try{Uf=document.domain&&new ActiveXObject("htmlfile")}catch{}var e,t;cu=Uf?function(r){r.write(_v("")),r.close();var i=r.parentWindow.Object;return r=null,i}(Uf):((t=Im("iframe")).style.display="none",BS.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write(_v("document.F=Object")),e.close(),e.F);for(var n=ru.length;n--;)delete cu.prototype[ru[n]];return cu()};eu[Cv]=!0;var Kf=Object.create||function(e,t){var n;return e!==null?(Wf.prototype=In(e),n=new Wf,Wf.prototype=null,n[Cv]=e):n=cu(),t===void 0?n:$S(n,t)},Vf=zt("unscopables"),qf=Array.prototype;qf[Vf]==null&&ti.f(qf,Vf,{configurable:!0,value:Kf(null)});var is=function(e){qf[Vf][e]=!0},HS=bv.find,wv=!0,jS=Xo("find");"find"in[]&&Array(1).find(function(){wv=!1}),xn({target:"Array",proto:!0,forced:wv||!jS},{find:function(e){return HS(this,e,arguments.length>1?arguments[1]:void 0)}}),is("find");var US=bv.findIndex,Tv=!0,WS=Xo("findIndex");"findIndex"in[]&&Array(1).findIndex(function(){Tv=!1}),xn({target:"Array",proto:!0,forced:Tv||!WS},{findIndex:function(e){return US(this,e,arguments.length>1?arguments[1]:void 0)}}),is("findIndex");var kv=function(e,t,n,r,i,o,s,l){for(var c,d=i,p=0,y=!!s&&ma(s,l,3);p<r;){if(p in n){if(c=y?y(n[p],p,t):n[p],o>0&&Zo(c))d=kv(e,t,c,nr(c.length),d,o-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=c}d++}p++}return d},KS=kv;xn({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=ni(this),n=nr(t.length),r=su(t,0);return r.length=KS(r,t,t,n,0,e===void 0?1:Yo(e)),r}});var zf=function(e){var t=e.return;if(t!==void 0)return In(t.call(e)).value},VS=function(e,t,n,r){try{return r?t(In(n)[0],n[1]):t(n)}catch(i){throw zf(e),i}},os={},qS=zt("iterator"),zS=Array.prototype,xv=function(e){return e!==void 0&&(os.Array===e||zS[qS]===e)},GS=zt("iterator"),Sv=function(e){if(e!=null)return e[GS]||e["@@iterator"]||os[Zm(e)]},Av=zt("iterator"),Ev=!1;try{var YS=0,Ov={next:function(){return{done:!!YS++}},return:function(){Ev=!0}};Ov[Av]=function(){return this},Array.from(Ov,function(){throw 2})}catch{}var Lv=function(e,t){if(!t&&!Ev)return!1;var n=!1;try{var r={};r[Av]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},XS=!Lv(function(e){Array.from(e)});xn({target:"Array",stat:!0,forced:XS},{from:function(e){var t,n,r,i,o,s,l=ni(e),c=typeof this=="function"?this:Array,d=arguments.length,p=d>1?arguments[1]:void 0,y=p!==void 0,m=Sv(l),C=0;if(y&&(p=ma(p,d>2?arguments[2]:void 0,2)),m==null||c==Array&&xv(m))for(n=new c(t=nr(l.length));t>C;C++)s=y?p(l[C],C):l[C],Qo(n,C,s);else for(o=(i=m.call(l)).next,n=new c;!(r=o.call(i)).done;C++)s=y?VS(i,p,[r.value,C],!0):r.value,Qo(n,C,s);return n.length=C,n}});var Iv=function(e){return function(t,n,r,i){Mf(n);var o=ni(t),s=Jl(o),l=nr(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}},JS={left:Iv(!1),right:Iv(!0)},ZS=ei(on.process)=="process",QS=JS.left,eA=Af("reduce"),tA=Xo("reduce",{1:0});xn({target:"Array",proto:!0,forced:!eA||!tA||!ZS&&au>79&&au<83},{reduce:function(e){return QS(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}}),is("flat");var io,Pv,Dv,nA=!Nt(function(){return Object.isExtensible(Object.preventExtensions({}))}),Rv=yf(function(e){var t=ti.f,n=Tf("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(!dn(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 nA&&s.REQUIRED&&i(l)&&!Zt(l,n)&&o(l),l}};eu[n]=!0}),va=function(e,t){this.stopped=e,this.result=t},Nv=function(e,t,n){var r,i,o,s,l,c,d,p=n&&n.that,y=!(!n||!n.AS_ENTRIES),m=!(!n||!n.IS_ITERATOR),C=!(!n||!n.INTERRUPTED),b=ma(t,p,1+y+C),k=function(P){return r&&zf(r),new va(!0,P)},L=function(P){return y?(In(P),C?b(P[0],P[1],k):b(P[0],P[1])):C?b(P,k):b(P)};if(m)r=e;else{if(typeof(i=Sv(e))!="function")throw TypeError("Target is not iterable");if(xv(i)){for(o=0,s=nr(e.length);s>o;o++)if((l=L(e[o]))&&l instanceof va)return l;return new va(!1)}r=i.call(e)}for(c=r.next;!(d=c.call(r)).done;){try{l=L(d.value)}catch(P){throw zf(r),P}if(typeof l=="object"&&l&&l instanceof va)return l}return new va(!1)},Mv=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e},rA=ti.f,Fv=zt("toStringTag"),Gf=function(e,t,n){e&&!Zt(e=n?e:e.prototype,Fv)&&rA(e,Fv,{configurable:!0,value:t})},fu=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 In(r),function(o){if(!dn(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),$v=function(e,t,n){for(var r in t)Si(e,r,t[r],n);return e},iA=!Nt(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Bv=kf("IE_PROTO"),oA=Object.prototype,du=iA?Object.getPrototypeOf:function(e){return e=ni(e),Zt(e,Bv)?e[Bv]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?oA:null},Yf=zt("iterator"),Hv=!1;[].keys&&("next"in(Dv=[].keys())?(Pv=du(du(Dv)))!==Object.prototype&&(io=Pv):Hv=!0),(io==null||Nt(function(){var e={};return io[Yf].call(e)!==e}))&&(io={}),Zt(io,Yf)||vr(io,Yf,function(){return this});var Xf={IteratorPrototype:io,BUGGY_SAFARI_ITERATORS:Hv},sA=Xf.IteratorPrototype,aA=function(){return this},Jf=Xf.IteratorPrototype,pu=Xf.BUGGY_SAFARI_ITERATORS,ya=zt("iterator"),lA=function(){return this},Zf=function(e,t,n,r,i,o,s){(function(P,j,G){var x=j+" Iterator";P.prototype=Kf(sA,{next:Xl(1,G)}),Gf(P,x,!1),os[x]=aA})(n,t,r);var l,c,d,p=function(P){if(P===i&&k)return k;if(!pu&&P in C)return C[P];switch(P){case"keys":case"values":case"entries":return function(){return new n(this,P)}}return function(){return new n(this)}},y=t+" Iterator",m=!1,C=e.prototype,b=C[ya]||C["@@iterator"]||i&&C[i],k=!pu&&b||p(i),L=t=="Array"&&C.entries||b;if(L&&(l=du(L.call(new e)),Jf!==Object.prototype&&l.next&&(du(l)!==Jf&&(fu?fu(l,Jf):typeof l[ya]!="function"&&vr(l,ya,lA)),Gf(l,y,!0))),i=="values"&&b&&b.name!=="values"&&(m=!0,k=function(){return b.call(this)}),C[ya]!==k&&vr(C,ya,k),os[t]=k,i)if(c={values:p("values"),keys:o?k:p("keys"),entries:p("entries")},s)for(d in c)(pu||m||!(d in C))&&Si(C,d,c[d]);else xn({target:t,proto:!0,forced:pu||m},c);return c},jv=zt("species"),uA=ti.f,Uv=Rv.fastKey,Wv=xi.set,Qf=xi.getterFor;(function(e,t,n){var r=e.indexOf("Map")!==-1,i=e.indexOf("Weak")!==-1,o=r?"set":"add",s=on[e],l=s&&s.prototype,c=s,d={},p=function(L){var P=l[L];Si(l,L,L=="add"?function(j){return P.call(this,j===0?0:j),this}:L=="delete"?function(j){return!(i&&!dn(j))&&P.call(this,j===0?0:j)}:L=="get"?function(j){return i&&!dn(j)?void 0:P.call(this,j===0?0:j)}:L=="has"?function(j){return!(i&&!dn(j))&&P.call(this,j===0?0:j)}:function(j,G){return P.call(this,j===0?0:j,G),this})};if(Sf(e,typeof s!="function"||!(i||l.forEach&&!Nt(function(){new s().entries().next()}))))c=n.getConstructor(t,e,r,o),Rv.REQUIRED=!0;else if(Sf(e,!0)){var y=new c,m=y[o](i?{}:-0,1)!=y,C=Nt(function(){y.has(1)}),b=Lv(function(L){new s(L)}),k=!i&&Nt(function(){for(var L=new s,P=5;P--;)L[o](P,P);return!L.has(-0)});b||((c=t(function(L,P){Mv(L,c,e);var j=function(G,x,X){var g,le;return fu&&typeof(g=x.constructor)=="function"&&g!==X&&dn(le=g.prototype)&&le!==X.prototype&&fu(G,le),G}(new s,L,c);return P!=null&&Nv(P,j[o],{that:j,AS_ENTRIES:r}),j})).prototype=l,l.constructor=c),(C||k)&&(p("delete"),p("has"),r&&p("get")),(k||m)&&p(o),i&&l.clear&&delete l.clear}d[e]=c,xn({global:!0,forced:c!=s},d),Gf(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){Mv(c,i,t),Wv(c,{type:t,index:Kf(null),first:void 0,last:void 0,size:0}),mr||(c.size=0),d!=null&&Nv(d,c[r],{that:c,AS_ENTRIES:n})}),o=Qf(t),s=function(c,d,p){var y,m,C=o(c),b=l(c,d);return b?b.value=p:(C.last=b={index:m=Uv(d,!0),key:d,value:p,previous:y=C.last,next:void 0,removed:!1},C.first||(C.first=b),y&&(y.next=b),mr?C.size++:c.size++,m!=="F"&&(C.index[m]=b)),c},l=function(c,d){var p,y=o(c),m=Uv(d);if(m!=="F")return y.index[m];for(p=y.first;p;p=p.next)if(p.key==d)return p};return $v(i.prototype,{clear:function(){for(var c=o(this),d=c.index,p=c.first;p;)p.removed=!0,p.previous&&(p.previous=p.previous.next=void 0),delete d[p.index],p=p.next;c.first=c.last=void 0,mr?c.size=0:this.size=0},delete:function(c){var d=this,p=o(d),y=l(d,c);if(y){var m=y.next,C=y.previous;delete p.index[y.index],y.removed=!0,C&&(C.next=m),m&&(m.previous=C),p.first==y&&(p.first=m),p.last==y&&(p.last=C),mr?p.size--:d.size--}return!!y},forEach:function(c){for(var d,p=o(this),y=ma(c,arguments.length>1?arguments[1]:void 0,3);d=d?d.next:p.first;)for(y(d.value,d.key,this);d&&d.removed;)d=d.previous},has:function(c){return!!l(this,c)}}),$v(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)}}),mr&&uA(i.prototype,"size",{get:function(){return o(this).size}}),i},setStrong:function(e,t,n){var r=t+" Iterator",i=Qf(t),o=Qf(r);Zf(e,t,function(s,l){Wv(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=tu(s),c=ti.f;mr&&l&&!l[jv]&&c(l,jv,{configurable:!0,get:function(){return this}})}(t)}});var cA=dv.charAt,fA=xi.set,dA=xi.getterFor("String Iterator");Zf(String,"String",function(e){fA(this,{type:"String Iterator",string:String(e),index:0})},function(){var e,t=dA(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=cA(n,r),t.index+=e.length,{value:e,done:!1})});var Kv={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},pA=xi.set,hA=xi.getterFor("Array Iterator"),ba=Zf(Array,"Array",function(e,t){pA(this,{type:"Array Iterator",target:zo(e),index:0,kind:t})},function(){var e=hA(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");os.Arguments=os.Array,is("keys"),is("values"),is("entries");var ed=zt("iterator"),Vv=zt("toStringTag"),td=ba.values;for(var nd in Kv){var qv=on[nd],ri=qv&&qv.prototype;if(ri){if(ri[ed]!==td)try{vr(ri,ed,td)}catch{ri[ed]=td}if(ri[Vv]||vr(ri,Vv,nd),Kv[nd]){for(var ss in ba)if(ri[ss]!==ba[ss])try{vr(ri,ss,ba[ss])}catch{ri[ss]=ba[ss]}}}}(function(){function e(){no(this,e)}return ro(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(){no(this,e)}return ro(e,null,[{key:"today",value:function(){return new Date}}]),e}(),function(){function e(){no(this,e)}return ro(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 gA=typeof global=="object"&&global&&global.Object===Object&&global;const zv=gA;var mA=typeof self=="object"&&self&&self.Object===Object&&self,vA=zv||mA||Function("return this")();const as=vA;var yA=as.Symbol;const hu=yA;var Gv=Object.prototype,bA=Gv.hasOwnProperty,CA=Gv.toString,Ca=hu?hu.toStringTag:void 0;function _A(e){var t=bA.call(e,Ca),n=e[Ca];try{e[Ca]=void 0;var r=!0}catch{}var i=CA.call(e);return r&&(t?e[Ca]=n:delete e[Ca]),i}var wA=Object.prototype,TA=wA.toString;function kA(e){return TA.call(e)}var xA="[object Null]",SA="[object Undefined]",Yv=hu?hu.toStringTag:void 0;function gu(e){return e==null?e===void 0?SA:xA:Yv&&Yv in Object(e)?_A(e):kA(e)}function _a(e){return e!=null&&typeof e=="object"}var AA=Array.isArray;const rd=AA;function oo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Xv(e){return e}var EA="[object AsyncFunction]",OA="[object Function]",LA="[object GeneratorFunction]",IA="[object Proxy]";function id(e){if(!oo(e))return!1;var t=gu(e);return t==OA||t==LA||t==EA||t==IA}var PA=as["__core-js_shared__"];const od=PA;var Jv=function(){var e=/[^.]+$/.exec(od&&od.keys&&od.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function DA(e){return!!Jv&&Jv in e}var RA=Function.prototype,NA=RA.toString;function MA(e){if(e!=null){try{return NA.call(e)}catch{}try{return e+""}catch{}}return""}var FA=/[\\^$.*+?()[\]{}|]/g,$A=/^\[object .+?Constructor\]$/,BA=Function.prototype,HA=Object.prototype,jA=BA.toString,UA=HA.hasOwnProperty,WA=RegExp("^"+jA.call(UA).replace(FA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function KA(e){if(!oo(e)||DA(e))return!1;var t=id(e)?WA:$A;return t.test(MA(e))}function VA(e,t){return e==null?void 0:e[t]}function sd(e,t){var n=VA(e,t);return KA(n)?n:void 0}var Zv=Object.create,qA=function(){function e(){}return function(t){if(!oo(t))return{};if(Zv)return Zv(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const zA=qA;function GA(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 YA(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var XA=800,JA=16,ZA=Date.now;function QA(e){var t=0,n=0;return function(){var r=ZA(),i=JA-(r-n);if(n=r,i>0){if(++t>=XA)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function eE(e){return function(){return e}}var tE=function(){try{var e=sd(Object,"defineProperty");return e({},"",{}),e}catch{}}();const mu=tE;var nE=mu?function(e,t){return mu(e,"toString",{configurable:!0,enumerable:!1,value:eE(t),writable:!0})}:Xv,rE=QA(nE);const iE=rE;var oE=9007199254740991,sE=/^(?:0|[1-9]\d*)$/;function Qv(e,t){var n=typeof e;return t=t??oE,!!t&&(n=="number"||n!="symbol"&&sE.test(e))&&e>-1&&e%1==0&&e<t}function ad(e,t,n){t=="__proto__"&&mu?mu(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function vu(e,t){return e===t||e!==e&&t!==t}var aE=Object.prototype,lE=aE.hasOwnProperty;function uE(e,t,n){var r=e[t];(!(lE.call(e,t)&&vu(r,n))||n===void 0&&!(t in e))&&ad(e,t,n)}function cE(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?ad(n,l,c):uE(n,l,c)}return n}var ey=Math.max;function fE(e,t,n){return t=ey(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=ey(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),GA(e,this,l)}}function dE(e,t){return iE(fE(e,t,Xv),e+"")}var pE=9007199254740991;function ty(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=pE}function ld(e){return e!=null&&ty(e.length)&&!id(e)}function hE(e,t,n){if(!oo(n))return!1;var r=typeof t;return(r=="number"?ld(n)&&Qv(t,n.length):r=="string"&&t in n)?vu(n[t],e):!1}function gE(e){return dE(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&&hE(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 mE=Object.prototype;function ny(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||mE;return e===n}function vE(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var yE="[object Arguments]";function ry(e){return _a(e)&&gu(e)==yE}var iy=Object.prototype,bE=iy.hasOwnProperty,CE=iy.propertyIsEnumerable,_E=ry(function(){return arguments}())?ry:function(e){return _a(e)&&bE.call(e,"callee")&&!CE.call(e,"callee")};const ud=_E;function wE(){return!1}var oy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,sy=oy&&typeof module=="object"&&module&&!module.nodeType&&module,TE=sy&&sy.exports===oy,ay=TE?as.Buffer:void 0,kE=ay?ay.isBuffer:void 0,xE=kE||wE;const ly=xE;var SE="[object Arguments]",AE="[object Array]",EE="[object Boolean]",OE="[object Date]",LE="[object Error]",IE="[object Function]",PE="[object Map]",DE="[object Number]",RE="[object Object]",NE="[object RegExp]",ME="[object Set]",FE="[object String]",$E="[object WeakMap]",BE="[object ArrayBuffer]",HE="[object DataView]",jE="[object Float32Array]",UE="[object Float64Array]",WE="[object Int8Array]",KE="[object Int16Array]",VE="[object Int32Array]",qE="[object Uint8Array]",zE="[object Uint8ClampedArray]",GE="[object Uint16Array]",YE="[object Uint32Array]",Mt={};Mt[jE]=Mt[UE]=Mt[WE]=Mt[KE]=Mt[VE]=Mt[qE]=Mt[zE]=Mt[GE]=Mt[YE]=!0,Mt[SE]=Mt[AE]=Mt[BE]=Mt[EE]=Mt[HE]=Mt[OE]=Mt[LE]=Mt[IE]=Mt[PE]=Mt[DE]=Mt[RE]=Mt[NE]=Mt[ME]=Mt[FE]=Mt[$E]=!1;function XE(e){return _a(e)&&ty(e.length)&&!!Mt[gu(e)]}function JE(e){return function(t){return e(t)}}var uy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wa=uy&&typeof module=="object"&&module&&!module.nodeType&&module,ZE=wa&&wa.exports===uy,cd=ZE&&zv.process,QE=function(){try{var e=wa&&wa.require&&wa.require("util").types;return e||cd&&cd.binding&&cd.binding("util")}catch{}}();const cy=QE;var fy=cy&&cy.isTypedArray,eO=fy?JE(fy):XE;const dy=eO;var tO=Object.prototype,nO=tO.hasOwnProperty;function rO(e,t){var n=rd(e),r=!n&&ud(e),i=!n&&!r&&ly(e),o=!n&&!r&&!i&&dy(e),s=n||r||i||o,l=s?vE(e.length,String):[],c=l.length;for(var d in e)(t||nO.call(e,d))&&!(s&&(d=="length"||i&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Qv(d,c)))&&l.push(d);return l}function iO(e,t){return function(n){return e(t(n))}}function oO(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var sO=Object.prototype,aO=sO.hasOwnProperty;function lO(e){if(!oo(e))return oO(e);var t=ny(e),n=[];for(var r in e)r=="constructor"&&(t||!aO.call(e,r))||n.push(r);return n}function py(e){return ld(e)?rO(e,!0):lO(e)}var uO=sd(Object,"create");const Ta=uO;function cO(){this.__data__=Ta?Ta(null):{},this.size=0}function fO(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dO="__lodash_hash_undefined__",pO=Object.prototype,hO=pO.hasOwnProperty;function gO(e){var t=this.__data__;if(Ta){var n=t[e];return n===dO?void 0:n}return hO.call(t,e)?t[e]:void 0}var mO=Object.prototype,vO=mO.hasOwnProperty;function yO(e){var t=this.__data__;return Ta?t[e]!==void 0:vO.call(t,e)}var bO="__lodash_hash_undefined__";function CO(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ta&&t===void 0?bO:t,this}function so(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])}}so.prototype.clear=cO,so.prototype.delete=fO,so.prototype.get=gO,so.prototype.has=yO,so.prototype.set=CO;function _O(){this.__data__=[],this.size=0}function yu(e,t){for(var n=e.length;n--;)if(vu(e[n][0],t))return n;return-1}var wO=Array.prototype,TO=wO.splice;function kO(e){var t=this.__data__,n=yu(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():TO.call(t,n,1),--this.size,!0}function xO(e){var t=this.__data__,n=yu(t,e);return n<0?void 0:t[n][1]}function SO(e){return yu(this.__data__,e)>-1}function AO(e,t){var n=this.__data__,r=yu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ii(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])}}ii.prototype.clear=_O,ii.prototype.delete=kO,ii.prototype.get=xO,ii.prototype.has=SO,ii.prototype.set=AO;var EO=sd(as,"Map");const hy=EO;function OO(){this.size=0,this.__data__={hash:new so,map:new(hy||ii),string:new so}}function LO(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function bu(e,t){var n=e.__data__;return LO(t)?n[typeof t=="string"?"string":"hash"]:n.map}function IO(e){var t=bu(this,e).delete(e);return this.size-=t?1:0,t}function PO(e){return bu(this,e).get(e)}function DO(e){return bu(this,e).has(e)}function RO(e,t){var n=bu(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function ls(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])}}ls.prototype.clear=OO,ls.prototype.delete=IO,ls.prototype.get=PO,ls.prototype.has=DO,ls.prototype.set=RO;var NO=iO(Object.getPrototypeOf,Object);const gy=NO;var MO="[object Object]",FO=Function.prototype,$O=Object.prototype,my=FO.toString,BO=$O.hasOwnProperty,HO=my.call(Object);function jO(e){if(!_a(e)||gu(e)!=MO)return!1;var t=gy(e);if(t===null)return!0;var n=BO.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&my.call(n)==HO}function UO(){this.__data__=new ii,this.size=0}function WO(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KO(e){return this.__data__.get(e)}function VO(e){return this.__data__.has(e)}var qO=200;function zO(e,t){var n=this.__data__;if(n instanceof ii){var r=n.__data__;if(!hy||r.length<qO-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new ls(r)}return n.set(e,t),this.size=n.size,this}function us(e){var t=this.__data__=new ii(e);this.size=t.size}us.prototype.clear=UO,us.prototype.delete=WO,us.prototype.get=KO,us.prototype.has=VO,us.prototype.set=zO;var vy=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yy=vy&&typeof module=="object"&&module&&!module.nodeType&&module,GO=yy&&yy.exports===vy,by=GO?as.Buffer:void 0,Cy=by?by.allocUnsafe:void 0;function YO(e,t){if(t)return e.slice();var n=e.length,r=Cy?Cy(n):new e.constructor(n);return e.copy(r),r}var XO=as.Uint8Array;const _y=XO;function JO(e){var t=new e.constructor(e.byteLength);return new _y(t).set(new _y(e)),t}function ZO(e,t){var n=t?JO(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function QO(e){return typeof e.constructor=="function"&&!ny(e)?zA(gy(e)):{}}function eL(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 tL=eL();const nL=tL;function fd(e,t,n){(n!==void 0&&!vu(e[t],n)||n===void 0&&!(t in e))&&ad(e,t,n)}function rL(e){return _a(e)&&ld(e)}function dd(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function iL(e){return cE(e,py(e))}function oL(e,t,n,r,i,o,s){var l=dd(e,n),c=dd(t,n),d=s.get(c);if(d){fd(e,n,d);return}var p=o?o(l,c,n+"",e,t,s):void 0,y=p===void 0;if(y){var m=rd(c),C=!m&&ly(c),b=!m&&!C&&dy(c);p=c,m||C||b?rd(l)?p=l:rL(l)?p=YA(l):C?(y=!1,p=YO(c,!0)):b?(y=!1,p=ZO(c,!0)):p=[]:jO(c)||ud(c)?(p=l,ud(l)?p=iL(l):(!oo(l)||id(l))&&(p=QO(c))):y=!1}y&&(s.set(c,p),i(p,c,r,o,s),s.delete(c)),fd(e,n,p)}function wy(e,t,n,r,i){e!==t&&nL(t,function(o,s){if(i||(i=new us),oo(o))oL(e,t,s,n,wy,r,i);else{var l=r?r(dd(e,s),o,s+"",e,t,i):void 0;l===void 0&&(l=o),fd(e,s,l)}},py)}var sL=gE(function(e,t,n){wy(e,t,n)});const Cu=sL;var aL=Object.defineProperty,lL=(e,t,n)=>t in e?aL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sn=(e,t,n)=>(lL(e,typeof t!="symbol"?t+"":t,n),n);const Xt=e=>Math.round(e*100)/100;class Gt{constructor(t){Sn(this,"instance"),Sn(this,"alphaValue",0),Sn(this,"redValue",0),Sn(this,"greenValue",0),Sn(this,"blueValue",0),Sn(this,"hueValue",0),Sn(this,"saturationValue",0),Sn(this,"brightnessValue",0),Sn(this,"hslSaturationValue",0),Sn(this,"lightnessValue",0),Sn(this,"initAlpha",()=>{const n=this.instance.getAlpha();this.alphaValue=Math.min(1,n)*100}),Sn(this,"initLightness",()=>{const{s:n,l:r}=this.instance.toHsl();this.hslSaturationValue=Xt(n),this.lightnessValue=Xt(r)}),Sn(this,"initRgb",()=>{const{r:n,g:r,b:i}=this.instance.toRgb();this.redValue=Xt(n),this.greenValue=Xt(r),this.blueValue=Xt(i)}),Sn(this,"initHsb",()=>{const{h:n,s:r,v:i}=this.instance.toHsv();this.hueValue=Math.min(360,Math.ceil(n)),this.saturationValue=Xt(r),this.brightnessValue=Xt(i)}),Sn(this,"toHexString",()=>this.instance.toHexString()),Sn(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:Xt(t),s:this.saturation,v:this.brightness,a:this.alphaValue/100}),this.initRgb(),this.initLightness(),this.hueValue=Xt(t)}get hue(){return this.hueValue}set saturation(t){this.instance=De({h:this.hue,s:Xt(t),v:this.brightness,a:this.alphaValue/100}),this.initRgb(),this.initLightness(),this.saturationValue=Xt(t)}get saturation(){return this.saturationValue}set brightness(t){this.instance=De({h:this.hue,s:this.saturation,v:Xt(t),a:this.alphaValue/100}),this.initRgb(),this.initLightness(),this.brightnessValue=Xt(t)}get brightness(){return this.brightnessValue}set lightness(t){this.instance=De({h:this.hue,s:this.hslSaturationValue,l:Xt(t),a:this.alphaValue/100}),this.initRgb(),this.initHsb(),this.lightnessValue=Xt(t)}get lightness(){return this.lightnessValue}set red(t){const n=this.instance.toRgb();this.instance=De({...n,r:Xt(t),a:this.alphaValue/100}),this.initHsb(),this.initLightness(),this.redValue=Xt(t)}get red(){return this.redValue}set green(t){const n=this.instance.toRgb();this.instance=De({...n,g:Xt(t),a:this.alphaValue/100}),this.initHsb(),this.initLightness(),this.greenValue=Xt(t)}get green(){return this.greenValue}set blue(t){const n=this.instance.toRgb();this.instance=De({...n,b:Xt(t),a:this.alphaValue/100}),this.initHsb(),this.initLightness(),this.blueValue=Xt(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 pd=(e,t,n)=>t<n?e<t?t:e>n?n:e:e<n?n:e>t?t:e,hd="color-history",gd=8,yr=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},uL=Mn({name:"Alpha",props:{color:lt.instanceOf(Gt),size:lt.oneOf(["small","default"]).def("default")},emits:["change"],setup(e,{emit:t}){const n=Et(null),r=Et(null);let i=e.color||new Gt;const o=Nn({red:i.red,green:i.green,blue:i.blue,alpha:i.alpha});ur(()=>e.color,y=>{y&&(i=y,Cu(o,{red:y.red,green:y.green,blue:y.blue,alpha:y.alpha}))},{deep:!0});const s=nn(()=>{const y=Ty(o.red,o.green,o.blue,0),m=Ty(o.red,o.green,o.blue,100);return{background:`linear-gradient(to right, ${y} , ${m})`}}),l=()=>{if(n.value&&r.value){const y=o.alpha/100,m=n.value.getBoundingClientRect(),C=r.value.offsetWidth;return Math.round(y*(m.width-C)+C/2)}return 0},c=nn(()=>({left:l()+"px",top:0})),d=y=>{y.target!==n.value&&p(y)},p=y=>{if(y.stopPropagation(),n.value&&r.value){const m=n.value.getBoundingClientRect(),C=r.value.offsetWidth;let b=y.clientX-m.left;b=Math.max(C/2,b),b=Math.min(b,m.width-C/2);const k=Math.round((b-C/2)/(m.width-C)*100);i.alpha=k,o.alpha=k,t("change",k)}};return Bo(()=>{const y={drag:m=>{p(m)},end:m=>{p(m)}};n.value&&r.value&&rs.triggerDragEvent(n.value,y)}),{barElement:n,cursorElement:r,getCursorStyle:c,getBackgroundStyle:s,onClickSider:d}}}),cL=e=>(So("data-v-18925ba6"),e=e(),Ao(),e),fL=cL(()=>T("div",{class:"vc-alpha-slider__bar-handle"},null,-1)),dL=[fL];function pL(e,t,n,r,i,o){return O(),N("div",{class:et(["vc-alpha-slider","transparent",{"small-slider":e.size==="small"}])},[T("div",{ref:"barElement",class:"vc-alpha-slider__bar",style:mt(e.getBackgroundStyle),onClick:t[0]||(t[0]=(...s)=>e.onClickSider&&e.onClickSider(...s))},[T("div",{class:et(["vc-alpha-slider__bar-pointer",{"small-bar":e.size==="small"}]),ref:"cursorElement",style:mt(e.getCursorStyle)},dL,6)],4)],2)}const md=yr(uL,[["render",pL],["__scopeId","data-v-18925ba6"]]),hL=[["#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"]],gL=Mn({name:"Palette",emits:["change"],setup(e,{emit:t}){return{palettes:hL,computedBgStyle:n=>n==="transparent"?n:n==="advance"?{}:{background:De(n).toRgbString()},onColorChange:n=>{t("change",n)}}}}),mL={class:"vc-compact"},vL=["onClick"];function yL(e,t,n,r,i,o){return O(),N("div",mL,[(O(!0),N(Fe,null,ct(e.palettes,(s,l)=>(O(),N("div",{key:l,class:"vc-compact__row"},[(O(!0),N(Fe,null,ct(s,(c,d)=>(O(),N("div",{key:d,class:"vc-compact__color-cube--wrap",onClick:p=>e.onColorChange(c)},[T("div",{class:et(["vc-compact__color_cube",{advance:c==="advance",transparent:c==="transparent"}]),style:mt(e.computedBgStyle(c))},null,6)],8,vL))),128))]))),128))])}const ky=yr(gL,[["render",yL],["__scopeId","data-v-b969fd48"]]),bL=Mn({name:"Board",props:{color:lt.instanceOf(Gt),round:lt.bool.def(!1),hide:lt.bool.def(!0)},emits:["change"],setup(e,{emit:t}){var n,r,i;const o=Nc(),s={h:((n=e.color)==null?void 0:n.hue)||0,s:1,v:1},l=new Gt(s).toHexString(),c=Nn({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),p=Et(0),y=Et(),m=Et(),C=nn(()=>({top:d.value+"px",left:p.value+"px"})),b=()=>{if(o){const P=o.vnode.el;p.value=c.saturation*(P==null?void 0:P.clientWidth),d.value=(1-c.brightness)*(P==null?void 0:P.clientHeight)}},k=P=>{P.target!==m.value&&L(P)},L=P=>{if(o){const j=o.vnode.el,G=j==null?void 0:j.getBoundingClientRect();let x=P.clientX-G.left,X=P.clientY-G.top;x=pd(x,0,G.width),X=pd(X,0,G.height);const g=x/G.width,le=pd(-(X/G.height)+1,0,1);p.value=x,d.value=X,c.saturation=g,c.brightness=le,t("change",g,le)}};return Bo(()=>{o&&o.vnode.el&&y.value&&(rs.triggerDragEvent(y.value,{drag:P=>{L(P)},end:P=>{L(P)}}),sl(()=>{b()}))}),Tn(()=>e.color,P=>{Cu(c,{hueColor:new Gt({h:P.hue,s:1,v:1}).toHexString(),saturation:P.saturation,brightness:P.brightness}),b()},{deep:!0}),{state:c,cursorElement:y,getCursorStyle:C,onClickBoard:k}}}),vd=e=>(So("data-v-058e5db2"),e=e(),Ao(),e),CL=vd(()=>T("div",{class:"vc-saturation__white"},null,-1)),_L=vd(()=>T("div",{class:"vc-saturation__black"},null,-1)),wL=vd(()=>T("div",null,null,-1)),TL=[wL];function kL(e,t,n,r,i,o){return O(),N("div",{ref:"boardElement",class:et(["vc-saturation",{"vc-saturation__chrome":e.round,"vc-saturation__hidden":e.hide}]),style:mt({backgroundColor:e.state.hueColor}),onClick:t[0]||(t[0]=(...s)=>e.onClickBoard&&e.onClickBoard(...s))},[CL,_L,T("div",{class:"vc-saturation__cursor",ref:"cursorElement",style:mt(e.getCursorStyle)},TL,4)],6)}const yd=yr(bL,[["render",kL],["__scopeId","data-v-058e5db2"]]),xL=Mn({name:"Hue",props:{color:lt.instanceOf(Gt),size:lt.oneOf(["small","default"]).def("default")},emits:["change"],setup(e,{emit:t}){const n=Et(null),r=Et(null);let i=e.color||new Gt;const o=Nn({hue:i.hue||0});ur(()=>e.color,p=>{p&&(i=p,Cu(o,{hue:i.hue}))},{deep:!0});const s=()=>{if(n.value&&r.value){const p=n.value.getBoundingClientRect(),y=r.value.offsetWidth;return o.hue===360?p.width-y/2:o.hue%360*(p.width-y)/360+y/2}return 0},l=nn(()=>({left:s()+"px",top:0})),c=p=>{p.target!==n.value&&d(p)},d=p=>{if(p.stopPropagation(),n.value&&r.value){const y=n.value.getBoundingClientRect(),m=r.value.offsetWidth;let C=p.clientX-y.left;C=Math.min(C,y.width-m/2),C=Math.max(m/2,C);const b=Math.round((C-m/2)/(y.width-m)*360);i.hue=b,o.hue=b,t("change",b)}};return Bo(()=>{const p={drag:y=>{d(y)},end:y=>{d(y)}};n.value&&r.value&&rs.triggerDragEvent(n.value,p)}),{barElement:n,cursorElement:r,getCursorStyle:l,onClickSider:c}}}),SL=e=>(So("data-v-e1a08576"),e=e(),Ao(),e),AL=SL(()=>T("div",{class:"vc-hue-slider__bar-handle"},null,-1)),EL=[AL];function OL(e,t,n,r,i,o){return O(),N("div",{class:et(["vc-hue-slider",{"small-slider":e.size==="small"}])},[T("div",{ref:"barElement",class:"vc-hue-slider__bar",onClick:t[0]||(t[0]=(...s)=>e.onClickSider&&e.onClickSider(...s))},[T("div",{class:et(["vc-hue-slider__bar-pointer",{"small-bar":e.size==="small"}]),ref:"cursorElement",style:mt(e.getCursorStyle)},EL,6)],512)],2)}const bd=yr(xL,[["render",OL],["__scopeId","data-v-e1a08576"]]),LL=Mn({name:"Lightness",props:{color:lt.instanceOf(Gt),size:lt.oneOf(["small","default"]).def("default")},emits:["change"],setup(e,{emit:t}){const n=Et(null),r=Et(null);let i=e.color||new Gt;const[o,s,l]=i.HSL,c=Nn({hue:o,saturation:s,lightness:l});ur(()=>e.color,b=>{if(b){i=b;const[k,L,P]=i.HSL;Cu(c,{hue:k,saturation:L,lightness:P})}},{deep:!0});const d=nn(()=>{const b=De({h:c.hue,s:c.saturation,l:.8}).toPercentageRgbString(),k=De({h:c.hue,s:c.saturation,l:.6}).toPercentageRgbString(),L=De({h:c.hue,s:c.saturation,l:.4}).toPercentageRgbString(),P=De({h:c.hue,s:c.saturation,l:.2}).toPercentageRgbString();return{background:[`linear-gradient(to right, rgb(255, 255, 255), ${b}, ${k}, ${L}, ${P}, rgb(0, 0, 0))`,`-webkit-linear-gradient(left, rgb(255, 255, 255), ${b}, ${k}, ${L}, ${P}, rgb(0, 0, 0))`,`-moz-linear-gradient(left, rgb(255, 255, 255), ${b}, ${k}, ${L}, ${P}, rgb(0, 0, 0))`,`-ms-linear-gradient(left, rgb(255, 255, 255), ${b}, ${k}, ${L}, ${P}, rgb(0, 0, 0))`]}}),p=()=>{if(n.value&&r.value){const b=c.lightness,k=n.value.getBoundingClientRect(),L=r.value.offsetWidth;return(1-b)*(k.width-L)+L/2}return 0},y=nn(()=>({left:p()+"px",top:0})),m=b=>{b.target!==n.value&&C(b)},C=b=>{if(b.stopPropagation(),n.value&&r.value){const k=n.value.getBoundingClientRect(),L=r.value.offsetWidth;let P=b.clientX-k.left;P=Math.max(L/2,P),P=Math.min(P,k.width-L/2);const j=1-(P-L/2)/(k.width-L);i.lightness=j,t("change",j)}};return Bo(()=>{const b={drag:k=>{C(k)},end:k=>{C(k)}};n.value&&r.value&&rs.triggerDragEvent(n.value,b)}),{barElement:n,cursorElement:r,getCursorStyle:y,getBackgroundStyle:d,onClickSider:m}}}),IL=e=>(So("data-v-94a50a9e"),e=e(),Ao(),e),PL=IL(()=>T("div",{class:"vc-lightness-slider__bar-handle"},null,-1)),DL=[PL];function RL(e,t,n,r,i,o){return O(),N("div",{class:et(["vc-lightness-slider",{"small-slider":e.size==="small"}])},[T("div",{ref:"barElement",class:"vc-lightness-slider__bar",style:mt(e.getBackgroundStyle),onClick:t[0]||(t[0]=(...s)=>e.onClickSider&&e.onClickSider(...s))},[T("div",{class:et(["vc-lightness-slider__bar-pointer",{"small-bar":e.size==="small"}]),ref:"cursorElement",style:mt(e.getCursorStyle)},DL,6)],4)],2)}const xy=yr(LL,[["render",RL],["__scopeId","data-v-94a50a9e"]]),NL=Mn({name:"History",props:{colors:lt.arrayOf(String).def(()=>[]),round:lt.bool.def(!1)},emits:["change"],setup(e,{emit:t}){return{onColorSelect:n=>{t("change",n)}}}}),ML={key:0,class:"vc-colorPicker__record"},FL={class:"color-list"},$L=["onClick"];function BL(e,t,n,r,i,o){return e.colors&&e.colors.length>0?(O(),N("div",ML,[T("div",FL,[(O(!0),N(Fe,null,ct(e.colors,(s,l)=>(O(),N("div",{key:l,class:et(["color-item","transparent",{"color-item__round":e.round}]),onClick:c=>e.onColorSelect(s)},[T("div",{class:"color-item__display",style:mt({backgroundColor:s})},null,4)],10,$L))),128))])])):xe("",!0)}const Cd=yr(NL,[["render",BL],["__scopeId","data-v-0f657238"]]),HL=Mn({name:"Display",props:{color:lt.instanceOf(Gt),disableAlpha:lt.bool.def(!1)},emits:["update:color","change"],setup(e,{emit:t}){var n,r,i,o;const s=Et("hex"),l=Nn({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=nn(()=>({background:l.previewBgColor})),d=()=>{s.value=s.value==="rgba"?"hex":"rgba"},p=Yi(m=>{if(!m.target.value)return;let C=parseInt(m.target.value.replace("%",""));C>100&&(m.target.value="100%",C=100),C<0&&(m.target.value="0%",C=0),isNaN(C)&&(m.target.value="100%",C=100),!isNaN(C)&&l.color&&(l.color.alpha=C),t("update:color",l.color),t("change",l.color)},300),y=Yi((m,C)=>{if(console.log(m.target.value),!!m.target.value){if(s.value==="hex"){const b=m.target.value.replace("#","");De(b).isValid()&&l.color&&(l.color.hex=b)}else if(C!==void 0&&l.rgba&&l.color){m.target.value<0&&(m.target.value=0),C===3&&m.target.value>1&&(m.target.value=1),C<3&&m.target.value>255&&(m.target.value=255),l.rgba[C]=Number(m.target.value);const[b,k,L,P]=l.rgba;l.color.hex=De({r:b,g:k,b:L}).toHex(),l.color.alpha=Math.floor(P*100)}t("update:color",l.color),t("change",l.color)}},300);return Tn(()=>e.color,m=>{m&&(l.color=m,l.alpha=Math.floor(l.color.alpha)+"%",l.hex=l.color.hex,l.rgba=l.color.RGB)},{deep:!0}),Tn(()=>l.color,()=>{l.color&&(l.previewBgColor=l.color.toRgbString())},{deep:!0}),{state:l,getBgColorStyle:c,inputType:s,onInputTypeChange:d,onAlphaBlur:p,onInputChange:y}}}),jL={class:"vc-display"},UL={class:"vc-current-color vc-transparent"},WL={key:0,style:{display:"flex",flex:"1",gap:"4px",height:"100%"}},KL={class:"vc-color-input"},VL=["value"],qL={key:0,class:"vc-alpha-input"},zL=["value"],GL={key:1,style:{display:"flex",flex:"1",gap:"4px",height:"100%"}},YL=["value","onInput"];function XL(e,t,n,r,i,o){return O(),N("div",jL,[T("div",UL,[T("div",{class:"color-cube",style:mt(e.getBgColorStyle)},null,4)]),e.inputType==="hex"?(O(),N("div",WL,[T("div",KL,[T("input",{value:e.state.hex,onInput:t[0]||(t[0]=(...s)=>e.onInputChange&&e.onInputChange(...s))},null,40,VL)]),e.disableAlpha?xe("",!0):(O(),N("div",qL,[T("input",{class:"vc-alpha-input__inner",value:e.state.alpha,onInput:t[1]||(t[1]=(...s)=>e.onAlphaBlur&&e.onAlphaBlur(...s))},null,40,zL)]))])):e.state.rgba?(O(),N("div",GL,[(O(!0),N(Fe,null,ct(e.state.rgba,(s,l)=>(O(),N("div",{class:"vc-rgb-input",key:l},[T("div",null,[T("input",{value:s,onInput:c=>e.onInputChange(c,l)},null,40,YL)]),T("div",null,re(["R","G","B","A"][l]),1)]))),128))])):xe("",!0),T("div",{class:"vc-input-toggle",onClick:t[2]||(t[2]=(...s)=>e.onInputTypeChange&&e.onInputTypeChange(...s))})])}const _d=yr(HL,[["render",XL],["__scopeId","data-v-f6f511ec"]]),JL=Mn({name:"FkColorPicker",components:{Display:_d,Alpha:md,Palette:ky,Board:yd,Hue:bd,Lightness:xy,History:Cd},props:{color:lt.instanceOf(Gt),disableHistory:lt.bool.def(!1),roundHistory:lt.bool.def(!1),disableAlpha:lt.bool.def(!1)},emits:["update:color","change","advanceChange"],setup(e,{emit:t}){const n=e.color||new Gt,r=Nn({color:n,hex:n.toHexString(),rgb:n.toRgbString()}),i=Et(!1),o=nn(()=>({background:r.rgb})),s=()=>{i.value=!1,t("advanceChange",!1)},l=af(hd,[],{}),c=Yi(()=>{if(e.disableHistory)return;const k=r.color.toRgbString();if(l.value=l.value.filter(L=>!De.equals(L,k)),!l.value.includes(k)){for(;l.value.length>gd;)l.value.pop();l.value.unshift(k)}},500),d=k=>{k==="advance"?(i.value=!0,t("advanceChange",!0)):(r.color.hex=k,t("advanceChange",!1))},p=k=>{r.color.alpha=k},y=k=>{r.color.hue=k},m=(k,L)=>{r.color.saturation=k,r.color.brightness=L},C=k=>{r.color.lightness=k},b=k=>{const L=k.target.value.replace("#","");De(L).isValid()&&(r.color.hex=L)};return Tn(()=>e.color,k=>{k&&(r.color=k)},{deep:!0}),Tn(()=>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:p,onHueChange:y,onBoardChange:m,onLightChange:C,onInputChange:b,previewStyle:o,historyColors:l}}}),ZL=e=>(So("data-v-0d5bef46"),e=e(),Ao(),e),QL={class:"vc-fk-colorPicker"},eI={class:"vc-fk-colorPicker__inner"},tI={class:"vc-fk-colorPicker__header"},nI=ZL(()=>T("div",{class:"back"},null,-1)),rI=[nI];function iI(e,t,n,r,i,o){const s=tt("Palette"),l=tt("Board"),c=tt("Hue"),d=tt("Lightness"),p=tt("Alpha"),y=tt("Display"),m=tt("History");return O(),N("div",QL,[T("div",eI,[T("div",tI,[e.advancePanelShow?(O(),N("span",{key:0,style:{cursor:"pointer"},onClick:t[0]||(t[0]=(...C)=>e.onBack&&e.onBack(...C))},rI)):xe("",!0)]),e.advancePanelShow?xe("",!0):(O(),Ue(s,{key:0,onChange:e.onCompactChange},null,8,["onChange"])),e.advancePanelShow?(O(),Ue(l,{key:1,color:e.state.color,onChange:e.onBoardChange},null,8,["color","onChange"])):xe("",!0),e.advancePanelShow?(O(),Ue(c,{key:2,color:e.state.color,onChange:e.onHueChange},null,8,["color","onChange"])):xe("",!0),e.advancePanelShow?xe("",!0):(O(),Ue(d,{key:3,color:e.state.color,onChange:e.onLightChange},null,8,["color","onChange"])),e.disableAlpha?xe("",!0):(O(),Ue(p,{key:4,color:e.state.color,onChange:e.onAlphaChange},null,8,["color","onChange"])),be(y,{color:e.state.color,"disable-alpha":e.disableAlpha},null,8,["color","disable-alpha"]),e.disableHistory?xe("",!0):(O(),Ue(m,{key:5,round:e.roundHistory,colors:e.historyColors,onChange:e.onCompactChange},null,8,["round","colors","onChange"]))])])}const Sy=yr(JL,[["render",iI],["__scopeId","data-v-0d5bef46"]]),oI=Mn({name:"ChromeColorPicker",components:{Display:_d,Alpha:md,Board:yd,Hue:bd,History:Cd},props:{color:lt.instanceOf(Gt),disableHistory:lt.bool.def(!1),roundHistory:lt.bool.def(!1),disableAlpha:lt.bool.def(!1)},emits:["update:color","change"],setup(e,{emit:t}){const n=e.color||new Gt,r=Nn({color:n,hex:n.toHexString(),rgb:n.toRgbString()}),i=nn(()=>({background:r.rgb})),o=af(hd,[],{}),s=Yi(()=>{if(e.disableHistory)return;const y=r.color.toRgbString();if(o.value=o.value.filter(m=>!De.equals(m,y)),!o.value.includes(y)){for(;o.value.length>gd;)o.value.pop();o.value.unshift(y)}},500),l=y=>{r.color.alpha=y},c=y=>{r.color.hue=y},d=(y,m)=>{r.color.saturation=y,r.color.brightness=m},p=y=>{y!=="advance"&&(r.color.hex=y)};return Tn(()=>e.color,y=>{y&&(r.color=y)},{deep:!0}),Tn(()=>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:p}}}),sI={class:"vc-chrome-colorPicker"},aI={class:"vc-chrome-colorPicker-body"},lI={class:"chrome-controls"},uI={class:"chrome-sliders"};function cI(e,t,n,r,i,o){const s=tt("Board"),l=tt("Hue"),c=tt("Alpha"),d=tt("Display"),p=tt("History");return O(),N("div",sI,[be(s,{round:!0,hide:!1,color:e.state.color,onChange:e.onBoardChange},null,8,["color","onChange"]),T("div",aI,[T("div",lI,[T("div",uI,[be(l,{size:"small",color:e.state.color,onChange:e.onHueChange},null,8,["color","onChange"]),e.disableAlpha?xe("",!0):(O(),Ue(c,{key:0,size:"small",color:e.state.color,onChange:e.onAlphaChange},null,8,["color","onChange"]))])]),be(d,{color:e.state.color,"disable-alpha":e.disableAlpha},null,8,["color","disable-alpha"]),e.disableHistory?xe("",!0):(O(),Ue(p,{key:0,round:e.roundHistory,colors:e.historyColors,onChange:e.onCompactChange},null,8,["round","colors","onChange"]))])])}const Ay=yr(oI,[["render",cI],["__scopeId","data-v-33636434"]]),wd="Vue3ColorPickerProvider",fI=(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 p=Math.floor(180/(Math.PI/d));return t.clientX>r&&t.clientY>i&&(p=180-p),t.clientX==r&&t.clientY>i&&(p=180),t.clientX>r&&t.clientY==i&&(p=90),t.clientX<r&&t.clientY>i&&(p=180+p),t.clientX<r&&t.clientY==i&&(p=270),t.clientX<r&&t.clientY<i&&(p=360-p),p};let Td=!1;const dI=(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,Td=!1,(o=t.end)==null||o.call(t,i)};e&&e.addEventListener("mousedown",i=>{var o;Td||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n,!1),document.addEventListener("mouseup",r,!1),Td=!0,(o=t.start)==null||o.call(t,i))})},pI={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"}},hI=Mn({name:"Angle",props:pI,emits:["update:angle","change"],setup(e,{emit:t}){const n=Et(null),r=Et(0);ur(()=>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=nn(()=>({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=fI(n.value,l)%360,i())};return pl(()=>{const l={drag:c=>{s(c)},end:c=>{s(c)}};n.value&&dI(n.value,l)}),()=>be("div",{class:"bee-angle"},[be("div",{class:"bee-angle__round",ref:n,style:o.value},null)])}}),gI=Mn({name:"GradientColorPicker",components:{Angle:hI,Display:_d,Alpha:md,Palette:ky,Board:yd,Hue:bd,Lightness:xy,History:Cd},props:{startColor:lt.instanceOf(Gt).isRequired,endColor:lt.instanceOf(Gt).isRequired,startColorStop:lt.number.def(0),endColorStop:lt.number.def(100),angle:lt.number.def(0),type:lt.oneOf(["linear","radial"]).def("linear"),disableHistory:lt.bool.def(!1),roundHistory:lt.bool.def(!1),disableAlpha:lt.bool.def(!1),pickerType:lt.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=Nn({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=Eo(wd),i=Et(e.pickerType==="chrome"),o=Et(),s=Et(),l=Et();ur(()=>[e.startColor,e.endColor,e.angle],H=>{n.startColor=H[0],n.endColor=H[1],n.angle=H[2]}),ur(()=>e.type,H=>{n.type=H});const c=nn({get:()=>n.startActive?n.startColor:n.endColor,set:H=>{if(n.startActive){n.startColor=H;return}n.endColor=H}}),d=nn(()=>{if(l.value&&o.value){const H=n.startColorStop/100,K=l.value.getBoundingClientRect(),z=o.value.offsetWidth;return Math.round(H*(K.width-z)+z/2)}return 0}),p=nn(()=>{if(l.value&&s.value){const H=n.endColorStop/100,K=l.value.getBoundingClientRect(),z=s.value.offsetWidth;return Math.round(H*(K.width-z)+z/2)}return 0}),y=nn(()=>{let H=`background: linear-gradient(${n.angle}deg, ${n.startColorRgba} ${n.startColorStop}%, ${n.endColorRgba} ${n.endColorStop}%)`;return n.type==="radial"&&(H=`background: radial-gradient(circle, ${n.startColorRgba} ${n.startColorStop}%, ${n.endColorRgba} ${n.endColorStop}%)`),H}),m=H=>{var K;if(n.startActive=!0,l.value&&o.value){const z=(K=l.value)==null?void 0:K.getBoundingClientRect();let de=H.clientX-z.left;de=Math.max(o.value.offsetWidth/2,de),de=Math.min(de,z.width-o.value.offsetWidth/2),n.startColorStop=Math.round((de-o.value.offsetWidth/2)/(z.width-o.value.offsetWidth)*100),t("update:startColorStop",n.startColorStop),t("startColorStopChange",n.startColorStop)}},C=H=>{var K;if(n.startActive=!1,l.value&&s.value){const z=(K=l.value)==null?void 0:K.getBoundingClientRect();let de=H.clientX-z.left;de=Math.max(s.value.offsetWidth/2,de),de=Math.min(de,z.width-s.value.offsetWidth/2),n.endColorStop=Math.round((de-s.value.offsetWidth/2)/(z.width-s.value.offsetWidth)*100),t("update:endColorStop",n.endColorStop),t("endColorStopChange",n.endColorStop)}},b=H=>{const K=H.target,z=parseInt(K.value.replace("°",""));isNaN(z)||(n.angle=z%360),t("update:angle",n.angle),t("angleChange",n.angle)},k=H=>{n.angle=H,t("update:angle",n.angle),t("angleChange",n.angle)},L=H=>{H==="advance"?(i.value=!0,t("advanceChange",!0)):(c.value.hex=H,t("advanceChange",!1)),g()},P=H=>{c.value.alpha=H,g()},j=H=>{c.value.hue=H,g()},G=(H,K)=>{c.value.saturation=H,c.value.brightness=K,g()},x=H=>{c.value.lightness=H,g()},X=()=>{g()},g=()=>{n.startActive?(t("update:startColor",n.startColor),t("startColorChange",n.startColor)):(t("update:endColor",n.endColor),t("endColorChange",n.endColor))},le=()=>{i.value=!1,t("advanceChange",!1)},I=()=>{n.type=n.type==="linear"?"radial":"linear",t("typeChange",n.type)},A=af(hd,[],{}),D=Yi(()=>{if(e.disableHistory)return;const H=c.value.toRgbString();if(A.value=A.value.filter(K=>!De.equals(K,H)),!A.value.includes(H)){for(;A.value.length>gd;)A.value.pop();A.value.unshift(H)}},500);return Bo(()=>{s.value&&o.value&&(rs.triggerDragEvent(s.value,{drag:H=>{C(H)},end:H=>{C(H)}}),rs.triggerDragEvent(o.value,{drag:H=>{m(H)},end:H=>{m(H)}}))}),Tn(()=>n.startColor,H=>{n.startColorRgba=H.toRgbString()},{deep:!0}),Tn(()=>n.endColor,H=>{n.endColorRgba=H.toRgbString()},{deep:!0}),Tn(()=>c.value,()=>{D()},{deep:!0}),{startGradientRef:o,stopGradientRef:s,colorRangeRef:l,state:n,currentColor:c,getStartColorLeft:d,getEndColorLeft:p,gradientBg:y,advancePanelShow:i,onDegreeBlur:b,onCompactChange:L,onAlphaChange:P,onHueChange:j,onBoardChange:G,onLightChange:x,historyColors:A,onBack:le,onDegreeChange:k,onDisplayChange:X,onTypeChange:I,lang:r==null?void 0:r.lang}}}),Ey=e=>(So("data-v-1e7e32e5"),e=e(),Ao(),e),mI={class:"vc-gradient-picker"},vI={class:"vc-gradient-picker__header"},yI={class:"vc-gradient__types"},bI={class:"vc-gradient-picker__body"},CI={class:"vc-color-range",ref:"colorRangeRef"},_I={class:"vc-color-range__container"},wI={class:"vc-gradient__stop__container"},TI=["title"],kI=Ey(()=>T("span",{class:"vc-gradient__stop--inner"},null,-1)),xI=[kI],SI=["title"],AI=Ey(()=>T("span",{class:"vc-gradient__stop--inner"},null,-1)),EI=[AI],OI={class:"vc-picker-degree-input vc-degree-input"},LI={class:"vc-degree-input__control"},II=["value"],PI={class:"vc-degree-input__panel"},DI={class:"vc-degree-input__disk"};function RI(e,t,n,r,i,o){var s,l;const c=tt("Angle"),d=tt("Board"),p=tt("Hue"),y=tt("Palette"),m=tt("Lightness"),C=tt("Alpha"),b=tt("Display"),k=tt("History");return O(),N("div",mI,[T("div",vI,[T("div",null,[he(T("div",{class:"back",style:{cursor:"pointer"},onClick:t[0]||(t[0]=(...L)=>e.onBack&&e.onBack(...L))},null,512),[[Ot,e.pickerType==="fk"&&e.advancePanelShow]])]),T("div",yI,[(O(),N(Fe,null,ct(["linear","radial"],L=>T("div",{class:et(["vc-gradient__type",{active:e.state.type===L}]),key:L,onClick:t[1]||(t[1]=(...P)=>e.onTypeChange&&e.onTypeChange(...P))},re(e.lang?e.lang[L]:L),3)),64))])]),T("div",bI,[T("div",CI,[T("div",_I,[T("div",{class:"vc-background",style:mt(e.gradientBg)},null,4),T("div",wI,[T("div",{class:et(["vc-gradient__stop",{"vc-gradient__stop--current":e.state.startActive}]),ref:"startGradientRef",title:(s=e.lang)==null?void 0:s.start,style:mt({left:e.getStartColorLeft+"px"})},xI,14,TI),T("div",{class:et(["vc-gradient__stop",{"vc-gradient__stop--current":!e.state.startActive}]),ref:"stopGradientRef",title:(l=e.lang)==null?void 0:l.end,style:mt({left:e.getEndColorLeft+"px"})},EI,14,SI)])])],512),T("div",OI,[T("div",LI,[T("input",{value:e.state.angle,onBlur:t[2]||(t[2]=(...L)=>e.onDegreeBlur&&e.onDegreeBlur(...L))},null,40,II),Vt("deg ")]),T("div",PI,[T("div",DI,[be(c,{angle:e.state.angle,"onUpdate:angle":t[3]||(t[3]=L=>e.state.angle=L),size:40,onChange:e.onDegreeChange},null,8,["angle","onChange"])])])])]),e.advancePanelShow?(O(),Ue(d,{key:0,color:e.currentColor,onChange:e.onBoardChange},null,8,["color","onChange"])):xe("",!0),e.advancePanelShow?(O(),Ue(p,{key:1,color:e.currentColor,onChange:e.onHueChange},null,8,["color","onChange"])):xe("",!0),e.advancePanelShow?xe("",!0):(O(),Ue(y,{key:2,onChange:e.onCompactChange},null,8,["onChange"])),e.advancePanelShow?xe("",!0):(O(),Ue(m,{key:3,color:e.currentColor,onChange:e.onLightChange},null,8,["color","onChange"])),e.disableAlpha?xe("",!0):(O(),Ue(C,{key:4,color:e.currentColor,onChange:e.onAlphaChange},null,8,["color","onChange"])),be(b,{color:e.currentColor,"disable-alpha":e.disableAlpha,onChange:e.onDisplayChange},null,8,["color","disable-alpha","onChange"]),e.disableHistory?xe("",!0):(O(),Ue(k,{key:5,round:e.roundHistory,colors:e.historyColors,onChange:e.onCompactChange},null,8,["round","colors","onChange"]))])}const Oy=yr(gI,[["render",RI],["__scopeId","data-v-1e7e32e5"]]),NI=Mn({name:"WrapContainer",props:{theme:lt.oneOf(["white","black"]).def("white"),showTab:lt.bool.def(!1),activeKey:lt.oneOf(["pure","gradient"]).def("pure")},emits:["update:activeKey","change"],setup(e,{emit:t}){const n=Nn({activeKey:e.activeKey}),r=Eo(wd),i=o=>{n.activeKey=o,t("update:activeKey",o),t("change",o)};return Tn(()=>e.activeKey,o=>{n.activeKey=o}),{state:n,onActiveKeyChange:i,lang:r==null?void 0:r.lang}}}),MI={class:"vc-colorpicker--container"},FI={key:0,class:"vc-colorpicker--tabs"},$I={class:"vc-colorpicker--tabs__inner"},BI={class:"vc-btn__content"},HI={class:"vc-btn__content"};function jI(e,t,n,r,i,o){var s,l;return O(),N("div",{class:et(["vc-colorpicker",e.theme])},[T("div",MI,[e.showTab?(O(),N("div",FI,[T("div",$I,[T("div",{class:et(["vc-colorpicker--tabs__btn",{"vc-btn-active":e.state.activeKey==="pure"}]),onClick:t[0]||(t[0]=c=>e.onActiveKeyChange("pure"))},[T("button",null,[T("div",BI,re((s=e.lang)==null?void 0:s.pure),1)])],2),T("div",{class:et(["vc-colorpicker--tabs__btn",{"vc-btn-active":e.state.activeKey==="gradient"}]),onClick:t[1]||(t[1]=c=>e.onActiveKeyChange("gradient"))},[T("button",null,[T("div",HI,re((l=e.lang)==null?void 0:l.gradient),1)])],2),T("div",{class:"vc-colorpicker--tabs__bg",style:mt({width:"50%",left:`calc(${e.state.activeKey==="gradient"?50:0}%)`})},null,4)])])):xe("",!0),S_(e.$slots,"default",{},void 0,!0)])],2)}const UI=yr(NI,[["render",jI],["__scopeId","data-v-0492277d"]]),WI={start:"Start",end:"End",pure:"Pure",gradient:"Gradient",linear:"linear",radial:"radial"},KI={start:"开始",end:"结束",pure:"纯色",gradient:"渐变",linear:"线性",radial:"径向"},VI={En:WI,"ZH-cn":KI},qI={isWidget:lt.bool.def(!1),pickerType:lt.oneOf(["fk","chrome"]).def("fk"),shape:lt.oneOf(["circle","square"]).def("square"),pureColor:{type:[String,Object],default:"#000000"},gradientColor:lt.string.def("linear-gradient(90deg, rgba(255, 255, 255, 1) 0%, rgba(0, 0, 0, 1) 100%)"),format:{type:String,default:"rgb"},disableAlpha:lt.bool.def(!1),disableHistory:lt.bool.def(!1),roundHistory:lt.bool.def(!1),useType:lt.oneOf(["pure","gradient","both"]).def("pure"),activeKey:lt.oneOf(["pure","gradient"]).def("pure"),lang:{type:String,default:"ZH-cn"},zIndex:lt.number.def(9999),pickerContainer:{type:String||HTMLElement,default:"body"},debounce:lt.number.def(100),theme:lt.oneOf(["white","black"]).def("white")},zI=Mn({name:"ColorPicker",components:{FkColorPicker:Sy,ChromeColorPicker:Ay,GradientColorPicker:Oy,WrapContainer:UI},inheritAttrs:!1,props:qI,emits:["update:pureColor","pureColorChange","update:gradientColor","gradientColorChange","update:activeKey","activeKeyChange"],setup(e,{emit:t}){fh(wd,{lang:nn(()=>VI[e.lang||"ZH-cn"])});const n=Nn({pureColor:e.pureColor||"",activeKey:e.useType==="gradient"?"gradient":e.activeKey,isAdvanceMode:!1}),r=new Gt("#000"),i=new Gt("#000"),o=new Gt(n.pureColor),s=Nn({startColor:r,endColor:i,startColorStop:0,endColorStop:100,angle:0,type:"linear",gradientColor:e.gradientColor}),l=Et(o),c=Et(!1),d=Et(null),p=Et(null);let y=null;const m=nn(()=>({background:n.activeKey!=="gradient"?De(n.pureColor).toRgbString():s.gradientColor})),C=nn(()=>n.activeKey==="gradient"?Oy.name:e.pickerType==="fk"?Sy.name:Ay.name),b=A=>{n.isAdvanceMode=A},k=nn(()=>{const A={disableAlpha:e.disableAlpha,disableHistory:e.disableHistory,roundHistory:e.roundHistory,pickerType:e.pickerType};return n.activeKey==="gradient"?{...A,startColor:s.startColor,endColor:s.endColor,angle:s.angle,type:s.type,startColorStop:s.startColorStop,endColorStop:s.endColorStop,onStartColorChange:D=>{s.startColor=D,G()},onEndColorChange:D=>{s.endColor=D,G()},onStartColorStopChange:D=>{s.startColorStop=D,G()},onEndColorStopChange:D=>{s.endColorStop=D,G()},onAngleChange:D=>{s.angle=D,G()},onTypeChange:D=>{s.type=D,G()},onAdvanceChange:b}:{...A,disableAlpha:e.disableAlpha,disableHistory:e.disableHistory,roundHistory:e.roundHistory,color:l.value,onChange:g,onAdvanceChange:b}}),L=()=>{c.value=!0,y?y.update():X()},P=()=>{c.value=!1},j=()=>{var A,D,H,K;try{const[z]=PT(s.gradientColor);if(z&&z.type.includes("gradient")&&z.colorStops.length>=2){const de=z.colorStops[0],je=z.colorStops[1];s.startColorStop=Number((A=de.length)==null?void 0:A.value)||0,s.endColorStop=Number((D=je.length)==null?void 0:D.value)||0,z.type==="linear-gradient"&&((H=z.orientation)==null?void 0:H.type)==="angular"&&(s.angle=Number((K=z.orientation)==null?void 0:K.value)||0),s.type=z.type.split("-")[0];const[Re,Y,se,ge]=de.value,[it,qe,ie,Ce]=je.value;s.startColor=new Gt({r:Number(Re),g:Number(Y),b:Number(se),a:Number(ge)}),s.endColor=new Gt({r:Number(it),g:Number(qe),b:Number(ie),a:Number(Ce)})}}catch(z){console.log(`[Parse Color]: ${z}`)}},G=Yi(()=>{const A=x();try{s.gradientColor=DT(A),t("update:gradientColor",s.gradientColor),t("gradientColorChange",s.gradientColor)}catch(D){console.log(D)}},e.debounce),x=()=>{const A=[],D=s.startColor.RGB.map(z=>z.toString()),H=s.endColor.RGB.map(z=>z.toString()),K=[{type:"rgba",value:[D[0],D[1],D[2],D[3]],length:{value:s.startColorStop+"",type:"%"}},{type:"rgba",value:[H[0],H[1],H[2],H[3]],length:{value:s.endColorStop+"",type:"%"}}];return s.type==="linear"?A.push({type:"linear-gradient",orientation:{type:"angular",value:s.angle+""},colorStops:K}):s.type==="radial"&&A.push({type:"radial-gradient",orientation:[{type:"shape",value:"circle"}],colorStops:K}),A},X=()=>{d.value&&p.value&&(y=bm(d.value,p.value,{placement:"auto",modifiers:[{name:"offset",options:{offset:[0,8]}},{name:"flip",options:{allowedAutoPlacements:["top","bottom","left","right"],rootBoundary:"viewport"}}]}))},g=A=>{l.value=A,n.pureColor=A.toString(e.format),le()},le=Yi(()=>{t("update:pureColor",n.pureColor),t("pureColorChange",n.pureColor)},e.debounce);wT(p,()=>{P()});const I=A=>{n.activeKey=A,t("update:activeKey",A),t("activeKeyChange",A)};return Bo(()=>{j()}),Tn(()=>e.gradientColor,A=>{A!=s.gradientColor&&(s.gradientColor=A)}),Tn(()=>s.gradientColor,()=>{j()}),Tn(()=>e.activeKey,A=>{n.activeKey=A}),Tn(()=>e.useType,A=>{n.activeKey!=="gradient"&&A==="gradient"?n.activeKey="gradient":n.activeKey="pure"}),Tn(()=>e.pureColor,A=>{De.equals(A,n.pureColor)||(n.pureColor=A,l.value=new Gt(A))},{deep:!0}),{colorCubeRef:d,pickerRef:p,showPicker:c,colorInstance:l,getBgColorStyle:m,onColorChange:g,onShowPicker:L,onActiveKeyChange:I,getComponentName:C,getBindArgs:k,state:n}}});function GI(e,t,n,r,i,o){const s=tt("WrapContainer");return O(),N(Fe,null,[e.isWidget?(O(),Ue(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:mt({zIndex:e.zIndex}),theme:e.theme},{default:tn(()=>[(O(),Ue(wh(e.getComponentName),Cl({key:e.getComponentName},e.getBindArgs),null,16))]),_:1},8,["active-key","show-tab","onChange","style","theme"])):xe("",!0),e.isWidget?xe("",!0):(O(),N(Fe,{key:1},[T("div",{class:et(["vc-color-wrap transparent",{round:e.shape==="circle"}]),ref:"colorCubeRef"},[T("div",{class:"current-color",style:mt(e.getBgColorStyle),onClick:t[1]||(t[1]=(...l)=>e.onShowPicker&&e.onShowPicker(...l))},null,4)],2),(O(),Ue(q_,{to:e.pickerContainer},[he(T("div",{ref:"pickerRef",style:mt({zIndex:e.zIndex})},[e.showPicker?(O(),Ue(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:tn(()=>[(O(),Ue(wh(e.getComponentName),Cl({key:e.getComponentName},e.getBindArgs),null,16))]),_:1},8,["show-tab","active-key","onChange","theme"])):xe("",!0)],4),[[Ot,e.showPicker]])],8,["to"]))],64))],64)}const YI={name:"PhystonPrompt",components:{HighlightPrompt:oT,VueNumberInput:Ww,IconSvg:Bn,ColorPicker:yr(zI,[["render",GI],["__scopeId","data-v-11de56b7"]])},mixins:[Qn,Kw,Vw,Zw,Qw],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:()=>({})},cancelBlacklistConfirm:{type:Boolean,default:!1},hotkey:{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:hotkey","click:selectTheme","click:switchTheme","click:showAbout","click:selectLanguage","click:showHistory","click:showFavorite","refreshFavorites","click:showChatgpt","update:hideGroupTags","update:groupTagsColor","update:blacklist","showExtraNetworks","hideExtraNetworks"],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();let e=this.textarea.value;setInterval(()=>{let t=this.textarea.value;e!==t&&document.activeElement!==this.textarea&&(e=t,this.onTextareaChange(!0))},500)},onTextareaChange(e){this.onTextareaChangeTimeId&&clearTimeout(this.onTextareaChangeTimeId),this.onTextareaChangeTimeId=setTimeout(()=>{this._onTextareaChange(e)},100)},_onTextareaChange(e){console.log("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 C of s)if(C.value===c){d=C;break}const p=d?d.localValue:"",y=d?d.disabled:!1,m=this._appendTag(c,p,y,-1,"text");!d&&m!==-1&&o.push(m)}}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<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?"":" "),p=null,y=!1;if(o+1<r&&(p=e[o+1],typeof p.type=="string"&&p.type==="wrap"?y=!0:p.value),y){const m=[" BREAK"," ADDCOL"," ADDROW"," ADDCOMM"," ADDBASE"];for(const C of m)i.value.endsWith(C)&&(d="")}i.value==="BREAK"&&(y?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=rt.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(),this.showExtendId=""},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=(C,b)=>{C.forEach(k=>{l(k,b)})},l=(C,b)=>{this.canOneTranslate?(this.loading[C.id+"_local"]=b,this.loading[C.id+"_en"]=b):C.toLocal?this.loading[C.id+"_local"]=b:this.loading[C.id+"_en"]=b},c=(C,b)=>{C.toLocal?C.localValue=b:(C.localValue=C.value,C.value=b),this._setTagById(C.id,C.value,C.localValue)},d=C=>C.isLora&&C.loraExists?this.getExtraNetworkFullName(C.loraName,"lora"):C.isLyco&&C.lycoExists?this.getExtraNetworkFullName(C.lycoName,"lycoris"):C.isEmbedding?this.getExtraNetworkFullName(C.value,"textual inversion"):C.value;e.forEach(C=>{var L,P,j,G;let b=this.tags[C],k=d(b);if(k!==b.value){b.localValue=k;return}if(pe.canTranslate(b.value)){if(b.isLora){if((L=this.blacklist.translate)!=null&&L.includes(b.loraName.toLowerCase()))return}else if(b.isLyco){if((P=this.blacklist.translate)!=null&&P.includes(b.lycoName.toLowerCase()))return}else if(b.isEmbedding){if((j=this.blacklist.translate)!=null&&j.includes(b.embeddingName.toLowerCase()))return}else if((G=this.blacklist.translate)!=null&&G.includes(b.originalValue.toLowerCase()))return;if(b.isEnglish=pe.isEnglishByLangCode(b.value,this.languageCode),b.isEnglish===-1)t?b.toLocal=!0:b.toLocal=!1;else if(b.isEnglish===0)if(t)if(b.localValue==="")b.localValue=b.value,b.toLocal=!1;else{const x=b.value;b.value=b.localValue,b.localValue=x}else b.toLocal=!1;else b.toLocal=!0;l(b,!0),o.push(b)}});const p=C=>{if(C.length<=0){s(C,!1),r();return}let b={};C.forEach((L,P)=>{let j=L.toLocal?"en_US":this.languageCode,G=L.toLocal?this.languageCode:"en_US",x=j+"."+G;b[x]||(b[x]={fromLang:j,toLang:G,tags:[]}),b[x].tags.push(L)});const k=()=>{let L=b[Object.keys(b)[0]];if(!L){r();return}let P=L.tags.map(j=>d(j));this.gradioAPI.translates(P,L.fromLang,L.toLang,this.translateApi,this.translateApiConfig).then(j=>{j.success?(j.translated_text.forEach((x,X)=>{x=x.replace(/\.$/,"").trim(),pe.isEnglish(x)&&x!==x.toUpperCase()&&(x=x.toLowerCase());let g=L.tags[X];x!==""&&c(g,x),l(g,!1)}),delete b[Object.keys(b)[0]],k()):(s(C,!1),this.$toastr.error(j.message),i(j.message))}).catch(j=>{s(C,!1),this.$toastr.error(j.message),i(j.message)})};k()};let y=C=>{console.log("translateByCSV",C.map(k=>k.value),{useNetwork:n});let b=[];C.forEach(k=>{const L=pe.splitTag(k.value);L.value!==k.value&&(k.value=L.value,k.splits=L),k.toLocal?b.push(this.translateToLocalByCSV(k.value,void 0,void 0,n)):b.push(this.translateToEnByCSV(k.value))}),Promise.all(b).then(k=>{let L=[];k.forEach((P,j)=>{let G=C[j];G.splits&&(G.value=G.splits.left+G.value+G.splits.right),P===""?L.push(G):(G.splits&&(P=G.splits.left+P+G.splits.right),l(G,!1),c(G,P))}),console.log("No translated keywords: ",L.map(P=>P.value)),n?p(L):(s(L,!1),r())}).catch(k=>{s(C,!1),this.$toastr.error(k),i(k)})},m=C=>{console.log("translateByGroupTags",C.map(k=>k.value),{useNetwork:n});let b=[];C.forEach(k=>{const L=pe.splitTag(k.value);L.value!==k.value&&(k.value=L.value,k.splits=L),k.toLocal?b.push(this.translateToLocalByGroupTags(k.value,n)):b.push(this.translateToEnByGroupTags(k.value,n))}),Promise.allSettled(b).then(k=>{let L=[],P=[];if(k.forEach((j,G)=>{var X;let x=C[G];x.splits&&(x.value=x.splits.left+x.value+x.splits.right),j.status!=="fulfilled"&&L.push(j.reason),!((X=j.value)!=null&&X.length)||j.status!=="fulfilled"?P.push(x):(x.splits&&(j=x.splits.left+j.value+x.splits.right),l(x,!1),c(x,j.value))}),console.log("No translated keywords: ",P.map(j=>j.value)),this.tagCompleteFile)y(P);else{if(L.length){s(C,!1),this.$toastr.error(L[0]),i(L[0]);return}n?p(P):(s(P,!1),r())}}).catch(k=>{s(C,!1),this.$toastr.error(k),i(k)})};this.groupTagsTranslate?m(o):this.tagCompleteFile?y(o):n?p(o):(s(o,!1),r())})}}},XI=["name"],JI={class:"prompt-header"},ZI={class:"prompt-header-title"},QI={class:"prompt-header-extend"},e2={class:"extend-content"},t2={class:"extend-btn-group"},n2={key:0,class:"gradio-checkbox hover-scale-120"},r2=["checked"],i2={class:"gradio-checkbox hover-scale-120"},o2=["checked"],s2={class:"gradio-checkbox hover-scale-120"},a2=["checked"],l2={class:"gradio-checkbox hover-scale-120"},u2=["checked"],c2={class:"gradio-checkbox"},f2={value:"disabled"},d2={value:"last"},p2=["label"],h2=["value"],g2={class:"prompt-header-extend"},m2={class:"extend-content"},v2={class:"extend-btn-group"},y2={key:0,class:"prompt-header-extend"},b2={class:"extend-content"},C2={class:"extend-btn-group"},_2={class:"prompt-header-extend"},w2={class:"extend-content"},T2={class:"extend-btn-group"},k2={key:1,class:"prompt-header-extend"},x2={class:"extend-content"},S2={class:"extend-btn-group"},A2={class:"prompt-header-extend prompt-append"},E2={class:"extend-content"},O2={class:"gradio-checkbox hover-scale-120"},L2={key:0},I2=["checked"],P2={key:1},D2=["checked"],R2=["placeholder"],N2=["onClick"],M2={class:"arrow-right"},F2=["onMouseleave","onMouseenter","onClick"],$2={key:0,class:"tags-name"},B2={key:1,class:"tags-name"},H2={class:"tags-detail"},j2={class:"tags-list"},U2={key:0,class:"item-wrap"},W2={key:1,class:"tags-item"},K2={class:"item-tag-value"},V2={class:"item-tag-local-value"},q2={class:"prompt-tags-list",ref:"promptTagsList"},z2=["data-id"],G2=["onMouseenter","onMousemove","onMouseleave"],Y2={class:"prompt-tag-edit"},X2=["onClick","onDblclick","onContextmenu","innerHTML"],J2=["placeholder","value","onBlur","onKeydown","onChange"],Z2=["onClick"],Q2=["onClick"],eP=["onClick"],tP=["onClick"],nP=["onClick"],rP=["onClick"],iP=["onClick"],oP=["onClick"],sP=["onClick"],aP=["onClick"],lP=["onClick"],uP={class:"prompt-local-language"},cP=["onClick"],fP={class:"local-language"},dP=["data-id"],pP={class:"btns-title"},hP={class:"group-tabs"},gP={class:"group-header",ref:"groupTabsHeader"},mP=["onClick","data-name"],vP={class:"group-body"},yP={key:0,class:"sub-group-header"},bP=["onClick","data-name"],CP={key:1,class:"sub-group-body"},_P={key:0,class:"group-tags"},wP=["onClick"],TP={class:"tag-local"},kP={class:"tag-en"},xP={key:0,class:"sub-group-header"},SP=["onClick","data-name"],AP={key:1,class:"sub-group-body"},EP={key:0,class:"group-tags"},OP=["onClick"],LP={class:"tag-en"},IP={class:"tags-footer"},PP={class:"tags-color"},DP={class:"tags-color-picker hover-scale-120",unaffected:"true"},RP=["onClick"],NP=["onClick"],MP={class:"tags-copyright"};function FP(e,t,n,r,i,o){const s=tt("icon-svg"),l=tt("vue-number-input"),c=tt("color-picker"),d=tt("highlight-prompt"),p=Oo("tooltip"),y=Oo("animate");return O(),N("div",{class:"physton-prompt",name:n.name},[T("div",{class:et(["prompt-main",n.hidePanel?"fold":""]),onClick:t[59]||(t[59]=(...m)=>o.onPromptMainClick&&o.onPromptMainClick(...m))},[T("div",JI,[he((O(),N("div",{class:"prompt-unfold",onClick:t[0]||(t[0]=(...m)=>e.onUnfoldClick&&e.onUnfoldClick(...m))},[be(s,{class:"hover-scale-120",name:"unfold"})])),[[p,e.getLang(n.hidePanel?"show_panel":"hide_panel")]]),T("div",ZI,re(n.neg?e.getLang("negative_prompt"):e.getLang("prompt")),1),he(T("div",{class:"prompt-header-counter"},"("+re(i.counterText)+")",513),[[Ot,i.counterText]]),T("div",QI,[T("div",e2,[T("div",t2,[he((O(),N("div",{class:"extend-btn-item",onClick:t[1]||(t[1]=m=>e.$emit("click:selectLanguage",m))},[be(s,{class:"hover-scale-120",name:"i18n"})])),[[p,"Language: "+e.langName]]),T("div",{class:et(["extend-btn-item",n.isLatestVersion?"":"red-dot"])},[he(be(s,{class:"hover-scale-120",name:"setting"},null,512),[[p,e.getLang("setting_desc")]]),he((O(),N("div",{class:"setting-box",onMouseenter:t[15]||(t[15]=(...m)=>e.onSettingBoxMouseEnter&&e.onSettingBoxMouseEnter(...m))},[o.translateApiItem.name&&!o.isEnglish?he((O(),N("div",{key:0,class:"extend-btn-item",onClick:t[2]||(t[2]=m=>e.$emit("click:translateApi",m))},[be(s,{class:"hover-scale-120",name:"api"})])),[[p,e.getLang("translate_api")+": "+o.translateApiItem.name]]):xe("",!0),he((O(),N("div",{class:"extend-btn-item",onClick:t[3]||(t[3]=m=>e.$emit("click:promptFormat",m))},[be(s,{class:"hover-scale-120",name:"format"})])),[[p,e.getLang("prompt_format")]]),he((O(),N("div",{class:"extend-btn-item",onClick:t[4]||(t[4]=m=>e.$emit("click:blacklist",m))},[be(s,{class:"hover-scale-120",name:"blacklist"})])),[[p,e.getLang("keywords_blacklist")]]),he((O(),N("div",{class:"extend-btn-item",onClick:t[5]||(t[5]=m=>e.$emit("click:hotkey",m))},[be(s,{class:"hover-scale-120",name:"hotkey"})])),[[p,e.getLang("hotkey_setting")]]),he((O(),N("div",{class:"extend-btn-item",onClick:t[6]||(t[6]=m=>e.$emit("click:selectTheme",m))},[be(s,{class:"hover-scale-120",name:"theme"})])),[[p,e.getLang("theme_extension")]]),he((O(),N("div",{class:"extend-btn-item",onClick:t[7]||(t[7]=m=>e.$emit("click:switchTheme",m))},[be(s,{class:"hover-scale-120",name:n.theme==="dark"?"sun":"moon"},null,8,["name"])])),[[p,e.getLang(n.theme==="dark"?"switch_to_light_theme":"switch_to_dark_theme")]]),he((O(),N("div",{class:et(["extend-btn-item",n.isLatestVersion?"":"red-dot"]),onClick:t[8]||(t[8]=m=>e.$emit("click:showAbout",m))},[be(s,{class:"hover-scale-120",name:"about"})],2)),[[p,e.getLang("about_desc")]]),o.isEnglish?xe("",!0):(O(),N(Fe,{key:1},[n.canOneTranslate?(O(),N("div",n2,[he((O(),N("label",null,[T("input",{type:"checkbox",name:"auto_translate",value:"1",checked:n.autoTranslate,onChange:t[9]||(t[9]=m=>e.$emit("update:autoTranslate",m.target.checked))},null,40,r2),be(s,{name:"translate"})])),[[p,e.getLang("auto_translate")]])])):(O(),N(Fe,{key:1},[T("div",i2,[he((O(),N("label",null,[T("input",{type:"checkbox",name:"auto_translate_to_local_language",value:"1",checked:n.autoTranslateToLocal,onChange:t[10]||(t[10]=m=>e.$emit("update:autoTranslateToLocal",m.target.checked))},null,40,o2),be(s,{name:"translate"})])),[[p,e.getLang("auto_translate_to_local_language")]])]),T("div",s2,[he((O(),N("label",null,[T("input",{type:"checkbox",name:"auto_translate_to_english",value:"1",checked:n.autoTranslateToEnglish,onChange:t[11]||(t[11]=m=>e.$emit("update:autoTranslateToEnglish",m.target.checked))},null,40,a2),be(s,{name:"english"})])),[[p,e.getLang("auto_translate_to_english")]])])],64))],64)),T("div",l2,[he((O(),N("label",null,[T("input",{type:"checkbox",name:"enable_tooltip",value:"1",checked:n.enableTooltip,onChange:t[12]||(t[12]=m=>e.$emit("update:enableTooltip",m.target.checked))},null,40,u2),be(s,{name:"tooltip"})])),[[p,e.getLang("whether_to_enable_tooltip")]])]),T("div",c2,[he((O(),N("label",null,[he(T("select",{"onUpdate:modelValue":t[13]||(t[13]=m=>e.autoInputPrompt=m),onChange:t[14]||(t[14]=(...m)=>e.onAutoInputPromptChange&&e.onAutoInputPromptChange(...m))},[T("option",f2,re(e.getLang("auto_input_prompt"))+": "+re(e.getLang("disabled")),1),T("option",d2,re(e.getLang("last_input_prompt")),1),(O(!0),N(Fe,null,ct(e.getCurrentTypeFavorites(),m=>(O(),N("optgroup",{key:m.key,label:e.getLang("favorite")+" / "+e.getLang(m.name)},[(O(!0),N(Fe,null,ct(m.list,C=>(O(),N("option",{value:C.id},re(C.name||C.prompt.substring(0,40)),9,h2))),256))],8,p2))),128))],544),[[Po,e.autoInputPrompt]])])),[[p,e.getLang("auto_input_prompt")]])])],32)),[[y,"fadeIn"]])],2)])])]),T("div",g2,[T("div",m2,[T("div",v2,[he((O(),N("div",{class:"extend-btn-item",ref:"historyButton",onClick:t[16]||(t[16]=m=>e.$emit("click:showHistory",m))},[be(s,{class:"hover-scale-120",name:"history"})])),[[p,e.getLang("history")]]),he((O(),N("div",{class:"extend-btn-item",ref:"favoriteButton",onClick:t[17]||(t[17]=m=>e.$emit("click:showFavorite",m))},[be(s,{class:"hover-scale-120",name:"favorite"})])),[[p,e.getLang("favorite")]])])])]),o.isEnglish?xe("",!0):(O(),N("div",y2,[T("div",b2,[T("div",C2,[n.canOneTranslate?he((O(),N("div",{key:0,class:"extend-btn-item",onClick:t[18]||(t[18]=(...m)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...m))},[i.loading.all_local?xe("",!0):(O(),Ue(s,{key:0,class:"hover-scale-120",name:"translate"})),i.loading.all_local?(O(),Ue(s,{key:1,class:"hover-scale-120",name:"loading"})):xe("",!0)])),[[p,e.getLang("one_translate_all_keywords")]]):(O(),N(Fe,{key:1},[he((O(),N("div",{class:"extend-btn-item",onClick:t[19]||(t[19]=(...m)=>e.onTranslatesToLocalClick&&e.onTranslatesToLocalClick(...m))},[i.loading.all_local?xe("",!0):(O(),Ue(s,{key:0,class:"hover-scale-120",name:"translate"})),i.loading.all_local?(O(),Ue(s,{key:1,class:"hover-scale-120",name:"loading"})):xe("",!0)])),[[p,e.getLang("translate_keywords_to_local_language")]]),he((O(),N("div",{class:"extend-btn-item",onClick:t[20]||(t[20]=(...m)=>e.onTranslatesToEnglishClick&&e.onTranslatesToEnglishClick(...m))},[i.loading.all_en?xe("",!0):(O(),Ue(s,{key:0,class:"hover-scale-120",name:"english"})),i.loading.all_en?(O(),Ue(s,{key:1,class:"hover-scale-120",name:"loading"})):xe("",!0)])),[[p,e.getLang("translate_all_keywords_to_english")]])],64))])])])),T("div",_2,[T("div",w2,[T("div",T2,[he((O(),N("div",{class:"extend-btn-item",onClick:t[21]||(t[21]=(...m)=>e.onCopyAllTagsClick&&e.onCopyAllTagsClick(...m))},[be(s,{class:"hover-scale-120",name:"copy"})])),[[p,e.getLang("copy_keywords_to_clipboard")]]),he((O(),N("div",{class:"extend-btn-item",onClick:t[22]||(t[22]=(...m)=>e.onDeleteAllTagsClick&&e.onDeleteAllTagsClick(...m))},[be(s,{class:"hover-scale-120",name:"remove"})])),[[p,e.getLang("delete_all_keywords")]])])])]),n.neg?xe("",!0):(O(),N("div",k2,[T("div",x2,[T("div",S2,[he((O(),N("div",{class:"extend-btn-item",onClick:t[23]||(t[23]=m=>e.$emit("click:showChatgpt",m))},[be(s,{class:"hover-scale-120",name:"chatgpt"})])),[[p,e.getLang("use_chatgpt_gen_prompts")]])])])])),T("div",A2,[T("div",E2,[T("div",O2,[n.hideDefaultInput?he((O(),N("label",L2,[T("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[24]||(t[24]=m=>e.$emit("update:hideDefaultInput",!m.target.checked))},null,40,I2),be(s,{name:"input"})])),[[p,e.getLang("show_default_input_box")]]):he((O(),N("label",P2,[T("input",{type:"checkbox",name:"hide_default_input",value:"1",checked:!n.hideDefaultInput,onChange:t[25]||(t[25]=m=>e.$emit("update:hideDefaultInput",!m.target.checked))},null,40,D2),be(s,{name:"input"})])),[[p,e.getLang("hide_default_input_box")]])]),he(T("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-append",ref:"promptTagAppend",placeholder:e.getLang("please_enter_new_keyword"),onFocus:t[26]||(t[26]=(...m)=>e.onAppendTagFocus&&e.onAppendTagFocus(...m)),onBlur:t[27]||(t[27]=(...m)=>e.onAppendTagBlur&&e.onAppendTagBlur(...m)),onKeyup:t[28]||(t[28]=(...m)=>e.onAppendTagKeyUp&&e.onAppendTagKeyUp(...m)),onKeydown:t[29]||(t[29]=(...m)=>e.onAppendTagKeyDown&&e.onAppendTagKeyDown(...m))},null,40,R2),[[p,e.getLang("enter_to_add")]]),he(T("div",{class:"prompt-append-list",ref:"promptAppendList",style:mt(e.appendListStyle)},[(O(!0),N(Fe,null,ct(e.appendList,(m,C)=>(O(),N("div",{key:m.type,class:et(["prompt-append-group",e.appendListSelected===C?"selected":""])},[T("div",{class:"append-group-name",onClick:b=>e.onAppendGroupClick(C,null,b)},[m.icon==="wrap"?(O(),Ue(s,{key:0,class:"name-icon",name:"wrap"})):m.icon==="history"?(O(),Ue(s,{key:1,class:"name-icon",name:"history"})):m.icon==="favorite"?(O(),Ue(s,{key:2,class:"name-icon",name:"favorite"})):xe("",!0),Vt(" "+re(e.appendListItemName(m))+" ",1),he(T("span",M2,null,512),[[Ot,m.children.length>0]])],8,N2),be(fn,{name:"fade"},{default:tn(()=>[he(T("div",{class:"append-group-list",ref_for:!0,ref:"promptAppendListChildren"},[(O(!0),N(Fe,null,ct(m.children,(b,k)=>(O(),N("div",{key:k,ref_for:!0,ref:"promptAppendListChild",class:et(["append-item",e.appendListChildSelected===k?"selected":""]),onMouseleave:L=>e.onAppendListChildMouseLeave(C,k,L),onMouseenter:L=>e.onAppendListChildMouseEnter(C,k,L),onClick:L=>e.onAppendGroupClick(C,k,L)},[m.type==="favorite"||m.type==="history"?(O(),N(Fe,{key:0},[b.name?(O(),N("div",$2,re(b.name),1)):(O(),N("div",B2,re(b.prompt),1))],64)):xe("",!0)],42,F2))),128))],512),[[Ot,m.children.length>0]])]),_:2},1024),be(fn,{name:"fade"},{default:tn(()=>[he(T("div",H2,[T("div",j2,[(O(!0),N(Fe,null,ct(e.appendListChildItemTags,(b,k)=>(O(),N(Fe,{key:k},[b.type&&b.type==="wrap"?(O(),N("div",U2)):(O(),N("div",W2,[T("div",K2,re(b.value),1),T("div",V2,re(b.localValue),1)]))],64))),128))])],512),[[Ot,e.appendListSelected!==null&&e.appendListChildSelected!==null&&e.appendListSelected===C&&(m.type==="favorite"||m.type==="history")]])]),_:2},1024)],2))),128))],4),[[Ot,e.showAppendList]])])])]),T("div",{class:et(["prompt-tags",i.droping?"droping":"",e.dropIsSelecting||e.dropIsEnd&&e.dropTags.length?"selecting":""]),ref:"promptTags",onMousedown:t[54]||(t[54]=(...m)=>e.onDropMouseDown&&e.onDropMouseDown(...m)),onMousemove:t[55]||(t[55]=(...m)=>e.onDropMouseMove&&e.onDropMouseMove(...m)),onMouseup:t[56]||(t[56]=(...m)=>e.onDropMouseUp&&e.onDropMouseUp(...m))},[T("div",q2,[(O(!0),N(Fe,null,ct(i.tags,(m,C)=>(O(),N("div",{key:m.id,class:et(["prompt-tag",m.disabled?"disabled":"",m.type==="wrap"?"wrap-tag":""]),ref_for:!0,ref:"promptTag-"+m.id,"data-id":m.id},[T("div",{class:"prompt-tag-main",onMouseenter:b=>e.onTagMouseEnter(m.id),onMousemove:at(b=>e.onTagMouseMove(m.id),["stop"]),onMouseleave:at(b=>e.onTagMouseLeave(m.id),["stop"])},[T("div",Y2,[m.type==="wrap"?he((O(),N("div",{key:0,class:"prompt-tag-value",ref_for:!0,ref:"promptTagValue-"+m.id,style:{width:"100%"}},[be(s,{name:"wrap"})])),[[p,e.getLang("line_break_character")+"<br/>"+e.getLang("drop_to_order")]]):(O(),N(Fe,{key:1},[he(T("div",{class:et(m.classes),style:mt(e.getTagColorStyle(m)),ref_for:!0,ref:"promptTagValue-"+m.id,onClick:b=>e.onTagClick(m.id,b),onDblclick:b=>e.onTagDblclick(m.id),onContextmenu:at(b=>e.onTagRightClick(m.id,b),["right","prevent"]),innerHTML:e.renderTag(m.id)},null,46,X2),[[Ot,!i.editing[m.id]],[p,m.isLora||m.isLyco?"":e.getLang("click_to_edit")+"<br/>"+e.getLang("dblclick_to_disable")+"<br/>"+e.getLang("drop_to_order")]]),he(T("textarea",{type:"text",class:"scroll-hide svelte-4xt1ch input-tag-edit",ref_for:!0,ref:"promptTagEdit-"+m.id,placeholder:e.getLang("enter_to_save"),value:m.value,onMousedown:t[30]||(t[30]=at(()=>{},["stop"])),onMousemove:t[31]||(t[31]=at(()=>{},["stop"])),onMouseup:t[32]||(t[32]=at(()=>{},["stop"])),onBlur:b=>e.onTagInputBlur(m.id),onKeydown:b=>e.onTagInputKeyDown(m.id,b),onChange:b=>e.onTagInputChange(m.id,b)},null,40,J2),[[Ot,i.editing[m.id]]])],64)),T("div",{class:"btn-tag-delete",ref_for:!0,ref:"promptTagDelete-"+m.id,onClick:b=>e.onDeleteTagClick(m.id),onMousedown:t[33]||(t[33]=at(()=>{},["stop"])),onMousemove:t[34]||(t[34]=at(()=>{},["stop"])),onMouseup:t[35]||(t[35]=at(()=>{},["stop"]))},[be(s,{name:"close"})],40,Z2)]),he((O(),N("div",{class:"btn-tag-extend",style:mt({display:(m.type==="text"||!m.type)&&e.showExtendId===m.id?"flex":"none"}),onClick:t[36]||(t[36]=at(()=>{},["stop"])),onMousedown:t[37]||(t[37]=at(()=>{},["stop"])),onMousemove:t[38]||(t[38]=at(()=>{},["stop"])),onMouseup:t[39]||(t[39]=at(()=>{},["stop"]))},[be(l,{class:"input-number",name:"input-number","model-value":m.weightNum,center:"",controls:"",min:-100,step:.1,size:"small","onUpdate:modelValue":b=>e.onTagWeightNumChange(m.id,b)},null,8,["model-value","step","onUpdate:modelValue"]),he((O(),N("button",{type:"button",name:"weight-parentheses-inc",onClick:b=>e.onIncWeightClick(m.id,1)},[be(s,{name:"weight-parentheses-inc"})],8,Q2)),[[p,e.getLang("increase_weight_add_parentheses")]]),he((O(),N("button",{type:"button",name:"weight-parentheses-dec",onClick:b=>e.onIncWeightClick(m.id,-1)},[be(s,{name:"weight-parentheses-dec"})],8,eP)),[[p,e.getLang("increase_weight_subtract_parentheses")]]),he((O(),N("button",{type:"button",name:"weight-brackets-inc",onClick:b=>e.onDecWeightClick(m.id,1)},[be(s,{name:"weight-brackets-inc"})],8,tP)),[[p,e.getLang("decrease_weight_add_brackets")]]),he((O(),N("button",{type:"button",name:"weight-brackets-dec",onClick:b=>e.onDecWeightClick(m.id,-1)},[be(s,{name:"weight-brackets-dec"})],8,nP)),[[p,e.getLang("decrease_weight_subtract_brackets")]]),he((O(),N("button",{type:"button",name:"wrap",onClick:b=>e.onWrapTagClick(m.id)},[be(s,{name:"wrap"})],8,rP)),[[p,e.getLang("line_break_character")]]),he((O(),N("button",{type:"button",name:"translate",onClick:b=>e.onTranslateToEnglishClick(m.id)},[i.loading[m.id+"_en"]?xe("",!0):(O(),Ue(s,{key:0,name:"english"})),i.loading[m.id+"_en"]?(O(),Ue(s,{key:1,name:"loading"})):xe("",!0)],8,iP)),[[p,e.getLang("translate_keyword_to_english")],[Ot,!o.isEnglish]]),he((O(),N("button",{type:"button",name:"copy",onClick:b=>o.copy(m.value)},[be(s,{name:"copy"})],8,oP)),[[p,e.getLang("copy_to_clipboard")]]),he((O(),N("button",{type:"button",name:"favorite",onClick:b=>e.onFavoriteTagClick(m.id)},[m.isFavorite?(O(),Ue(s,{key:0,name:"favorite-yes"})):xe("",!0),m.isFavorite?xe("",!0):(O(),Ue(s,{key:1,name:"favorite-no"}))],8,sP)),[[p,e.getLang(m.isFavorite?"remove_from_favorite":"add_to_favorite")]]),he((O(),N("button",{type:"button",name:"blacklist",onClick:b=>e.onBlacklistClick(m.id)},[be(s,{name:"blacklist"})],8,aP)),[[p,e.getLang("add_blacklist")]]),he((O(),N("button",{type:"button",name:"enable",onClick:b=>e.onDisabledTagClick(m.id)},[m.disabled?xe("",!0):(O(),Ue(s,{key:0,name:"disabled"})),m.disabled?(O(),Ue(s,{key:1,name:"enable"})):xe("",!0)],8,lP)),[[p,e.getLang(m.disabled?"enable_keyword":"disable_keyword")]])],36)),[[y,"fadeIn"]])],40,G2),he(T("div",uP,[he((O(),N("div",{class:"translate-to-local hover-scale-120",onClick:b=>e.onTranslateToLocalClick(m.id),onMousedown:t[40]||(t[40]=at(()=>{},["stop"])),onMousemove:t[41]||(t[41]=at(()=>{},["stop"])),onMouseup:t[42]||(t[42]=at(()=>{},["stop"]))},[i.loading[m.id+"_local"]?xe("",!0):(O(),Ue(s,{key:0,name:"translate"})),i.loading[m.id+"_local"]?(O(),Ue(s,{key:1,name:"loading"})):xe("",!0)],40,cP)),[[p,e.getLang("translate_keyword_to_local_language")]]),T("div",fP,re(m.localValue),1)],512),[[Ot,!o.isEnglish&&(m.type==="text"||!m.type)]])],10,z2))),128)),(O(!0),N(Fe,null,ct(i.tags,(m,C)=>(O(),N("div",{key:m.id,class:et(["prompt-wrap",m.type==="wrap"?"wrap-tag":""]),"data-id":m.id,ref_for:!0,ref:"promptTagWrap",onMousedown:t[43]||(t[43]=at(()=>{},["stop"])),onMousemove:t[44]||(t[44]=at(()=>{},["stop"])),onMouseup:t[45]||(t[45]=at(()=>{},["stop"]))},null,42,dP))),128))],512),T("div",{class:"drop-select-bg",ref:"dropSelectBg",style:mt({display:e.dropIsStart?"block":"none"})},null,4),T("div",{class:"drop-select-box",ref:"dropSelectBox",style:mt({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),T("div",{class:"drop-select-btns",ref:"dropSelectBtns",style:mt({display:e.dropIsEnd&&e.dropTags.length?"flex":"none",top:e.dropEndY-32+"px",left:e.dropEndX+"px"}),onMousedown:t[51]||(t[51]=at(()=>{},["stop"])),onMousemove:t[52]||(t[52]=at(()=>{},["stop"])),onMouseup:t[53]||(t[53]=at(()=>{},["stop"]))},[T("div",pP,re(e.getLang("batch_operation")),1),he((O(),N("button",{type:"button",onClick:t[46]||(t[46]=(...m)=>e.onDropCopy&&e.onDropCopy(...m))},[be(s,{name:"copy"})])),[[p,e.getLang("copy_to_clipboard")]]),he((O(),N("button",{type:"button",onClick:t[47]||(t[47]=(...m)=>e.onDropFavorite&&e.onDropFavorite(...m))},[be(s,{name:"favorite-no"})])),[[p,e.getLang("add_to_favorite")]]),he((O(),N("button",{type:"button",onClick:t[48]||(t[48]=(...m)=>e.onDropDisable&&e.onDropDisable(...m))},[be(s,{name:"disabled"})])),[[p,e.getLang("disable_keyword")]]),he((O(),N("button",{type:"button",onClick:t[49]||(t[49]=(...m)=>e.onDropEnable&&e.onDropEnable(...m))},[be(s,{name:"enable"})])),[[p,e.getLang("enable_keyword")]]),T("button",{type:"button",onClick:t[50]||(t[50]=(...m)=>e.onDropDelete&&e.onDropDelete(...m))},[be(s,{name:"remove"})])],36)],34),n.groupTags.length?he((O(),N("div",{key:0,class:et(["show-group-tags",n.hideGroupTags?"hided":""]),onClick:t[57]||(t[57]=(...m)=>e.onClickHideGroupTags&&e.onClickHideGroupTags(...m))},[be(s,{class:"hover-scale-120",name:"unfold"})],2)),[[p,e.getLang(n.hideGroupTags?"show_group_tags":"hide_group_tags")]]):xe("",!0),be(fn,{name:"fade"},{default:tn(()=>[he(T("div",hP,[T("div",gP,[T("div",{class:et(["group-tab",e.groupTagsActive=="favorite"?"active":""]),onClick:t[58]||(t[58]=m=>e.activeGroupTab("favorite")),"data-name":"favorite"},re(e.getLang("favorite")),3),(O(!0),N(Fe,null,ct(n.groupTags,(m,C)=>(O(),N("div",{key:C,class:et(["group-tab",m.tabKey==e.groupTagsActive?"active":""]),onClick:b=>e.activeGroupTab(C),"data-name":m.name},re(m.name),11,mP))),128))],512),T("div",vP,[T("div",{class:et(["group-main",e.groupTagsActive=="favorite"?"active":""])},[e.groupTagsActive=="favorite"?(O(),N("div",yP,[(O(!0),N(Fe,null,ct(e.getCurrentTypeFavorites(),m=>(O(),N("div",{key:m.key,class:et(["sub-group-tab","favorite-"+m.key==e.subGroupTagsActive?"active":""]),onClick:C=>e.activeSubGroupTab("favorite",m.key),"data-name":m.name},re(e.getLang(m.name)),11,bP))),128))])):xe("",!0),e.groupTagsActive=="favorite"?(O(),N("div",CP,[(O(!0),N(Fe,null,ct(e.getCurrentTypeFavorites(),m=>(O(),N("div",{key:m.key,class:et(["sub-group-main","favorite-"+m.key==e.subGroupTagsActive?"active":""])},[be(fn,{name:"fade"},{default:tn(()=>["favorite-"+m.key==e.subGroupTagsActive?(O(),N("div",_P,[(O(!0),N(Fe,null,ct(m.list,C=>he((O(),N("div",{class:"tag-item",ref_for:!0,ref:"groupTagItem",onClick:b=>e.onClickGroupTagFavorite(C)},[T("div",TP,re(C.name==""?C.prompt:C.name),1),T("div",kP,re(C.prompt),1)],8,wP)),[[p,e.getGroupTagTooltip(C.name,C.prompt)]])),256))])):xe("",!0)]),_:2},1024)],2))),128))])):xe("",!0)],2),(O(!0),N(Fe,null,ct(n.groupTags,(m,C)=>(O(),N("div",{key:C,class:et(["group-main",m.tabKey==e.groupTagsActive?"active":""])},[m.tabKey==e.groupTagsActive?(O(),N("div",xP,[(O(!0),N(Fe,null,ct(m.groups,(b,k)=>(O(),N("div",{key:k,class:et([b.type&&b.type==="wrap"?"sub-group-tag-wrap":"sub-group-tab",b.tabKey==e.subGroupTagsActive?"active":""]),onClick:L=>e.activeSubGroupTab(C,k),"data-name":b.name},re(b.name),11,SP))),128))])):xe("",!0),m.tabKey==e.groupTagsActive?(O(),N("div",AP,[(O(!0),N(Fe,null,ct(m.groups,(b,k)=>(O(),N("div",{key:k,class:et(["sub-group-main",b.tabKey==e.subGroupTagsActive?"active":""])},[be(fn,{name:"fade"},{default:tn(()=>[b.tabKey==e.subGroupTagsActive?(O(),N("div",EP,[(O(!0),N(Fe,null,ct(b.tags,(L,P)=>he((O(),N("div",{class:"tag-item",ref_for:!0,ref:"groupTagItem",onClick:j=>e.onClickGroupTag(L,P)},[L&&L!=P?(O(),N(Fe,{key:0},[T("div",{class:"tag-local",style:mt(e.getGroupTagStyle(m.name,b.name,P))},re(L),5),T("div",LP,re(P),1)],64)):(O(),N("div",{key:1,class:"tag-local",style:mt(e.getGroupTagStyle(m.name,b.name,P))},re(P),5))],8,OP)),[[p,e.getGroupTagTooltip(L,P)]])),256))])):xe("",!0)]),_:2},1024),T("div",IP,[T("div",PP,[T("div",null,re(e.getLang("tags_color"))+":",1),he((O(),N("div",DP,[be(c,{theme:n.theme=="dark"?"black":"white",pureColor:n.groupTagsColor[e.getTagsColorKey(m.name,b.name)],"onUpdate:pureColor":L=>n.groupTagsColor[e.getTagsColorKey(m.name,b.name)]=L,onPureColorChange:L=>e.onTagsColorChange(e.getTagsColorKey(m.name,b.name))},null,8,["theme","pureColor","onUpdate:pureColor","onPureColorChange"])])),[[p,n.groupTagsColor[e.getTagsColorKey(m.name,b.name)]]]),he((O(),N("div",{class:"tags-color-reset hover-scale-120",onClick:L=>e.onClickResetTagsColor(e.getTagsColorKey(m.name,b.name))},[be(s,{name:"reset"})],8,RP)),[[p,e.getLang("reset_default_color")]]),he((O(),N("div",{class:"tags-color-clear hover-scale-120",onClick:L=>e.onClickClearTagsColor(e.getTagsColorKey(m.name,b.name))},[be(s,{name:"clear"})],8,NP)),[[p,e.getLang("clear_color")]])]),T("div",MP,re(e.getLang("tags-copyright")),1)])],2))),128))])):xe("",!0)],2))),128))])],512),[[Ot,!n.hideGroupTags&&n.groupTags.length]])]),_:1})],2),be(d,{ref:"highlightPrompt",textarea:n.textarea,"hide-default-input":n.hideDefaultInput},null,8,["textarea","hide-default-input"])],8,XI)}const $P=vn(YI,[["render",FP]]),BP={name:"TranslateSetting",components:{IconSvg:Bn},mixins:[Qn],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})}}},HP={key:0,class:"physton-prompt-translate-setting"},jP={class:"translate-setting-main"},UP={class:"translate-setting-content"},WP={class:"setting-line"},KP={class:"line-title"},VP={class:"line-content"},qP=["label"],zP=["value","disabled"],GP={key:0,class:"setting-line"},YP=T("div",{class:"line-title"},null,-1),XP={class:"line-content"},JP={class:"common-red"},ZP={key:1,class:"setting-line"},QP=T("div",{class:"line-title"},null,-1),eD={class:"line-content"},tD={class:"help-list"},nD={class:"help-item"},rD=["href"],iD={class:"setting-line"},oD={class:"line-title"},sD={class:"line-content"},aD=["onUpdate:modelValue","onChange"],lD=["onUpdate:modelValue"],uD=["value"],cD=["innerHTML"],fD={key:2,class:"setting-line"},dD={class:"line-title"},pD={class:"line-content"},hD=["innerHTML"],gD=["innerHTML"],mD={key:3,class:"setting-line"},vD=T("div",{class:"line-title"},null,-1),yD={class:"line-content"},bD={class:"setting-line"},CD={class:"line-title"},_D={class:"line-content"},wD={class:"setting-line"},TD=T("div",{class:"line-title"},null,-1),kD={class:"line-content"},xD={class:"setting-line"},SD=T("div",{class:"line-title"},null,-1),AD={class:"line-content"},ED={key:0,class:"translate-error"},OD={class:"setting-line"},LD={class:"line-title"},ID={class:"line-content"},PD=["innerHTML"],DD={class:"onlyCsvOnAuto"},RD={class:"setting-line"},ND=T("div",{class:"line-title"},"TagComplete",-1),MD={class:"line-content"},FD={class:"help-list"},$D={class:"help-item"},BD=["href"],HD=["innerHTML"],jD=["innerHTML"],UD={class:"line-row"},WD=["value"],KD={class:"setting-line"},VD=T("div",{class:"line-title"},null,-1),qD={class:"line-content"},zD={ref:"tagCompleteResults"},GD={class:"setting-btns"};function YD(e,t,n,r,i,o){const s=tt("icon-svg"),l=Oo("tooltip");return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",HP,[T("div",jP,[T("div",UP,[T("div",WP,[T("div",KP,re(e.getLang("translate_api")),1),T("div",VP,[he(T("select",{"onUpdate:modelValue":t[0]||(t[0]=c=>i.apiKey=c)},[(O(!0),N(Fe,null,ct(o.supportApi,c=>(O(),N("optgroup",{key:c.type,label:e.getLang(c.type)},[(O(!0),N(Fe,null,ct(c.children,d=>(O(),N("option",{key:d.key,value:d.key,disabled:d.disabled},re(o.getItemName(d)),9,zP))),128))],8,qP))),128))],512),[[Po,i.apiKey]])])]),o.apiItem&&o.apiItem.type=="translators"?(O(),N("div",GP,[YP,T("div",XP,[T("span",JP,"*"+re(e.getLang("not_api_key_desc")),1)])])):xe("",!0),o.apiItem.help?(O(),N("div",ZP,[QP,T("div",eD,[(O(!0),N(Fe,null,ct(o.apiItem.help,c=>(O(),N("div",tD,[T("div",nD,[Vt("[?] "),T("a",{href:c.url,target:"_blank"},re(c.title),9,rD)])]))),256))])])):xe("",!0),(O(!0),N(Fe,null,ct(i.configs,c=>(O(),N("div",iD,[T("div",oD,re(c.title),1),T("div",sD,[c.type=="input"?he((O(),N("input",{key:0,type:"text","onUpdate:modelValue":d=>c.value=d,onChange:d=>o.onChangeConfigValue(c)},null,40,aD)),[[Gn,c.value]]):xe("",!0),c.type=="select"?he((O(),N("select",{key:1,"onUpdate:modelValue":d=>c.value=d},[(O(!0),N(Fe,null,ct(c.options,d=>(O(),N("option",{value:d},re(d),9,uD))),256))],8,lD)),[[Po,c.value]]):xe("",!0),c.desc?(O(),N("div",{key:2,innerHTML:c.desc},null,8,cD)):xe("",!0)])]))),256)),o.apiItem.key==="mbart50"?(O(),N("div",fD,[T("div",dD,re(e.getLang("initialize")),1),T("div",pD,[T("div",{class:"hover-scale-120 test-btn",onClick:t[1]||(t[1]=(...c)=>o.onMbart50Initialize&&o.onMbart50Initialize(...c))},[i.mbart50Loading?(O(),Ue(s,{key:0,name:"loading"})):(O(),N(Fe,{key:1},[Vt(re(e.getLang("initialize")),1)],64))]),T("p",{class:"common-red",innerHTML:e.getLang("download_model_desc")},null,8,hD),T("p",{class:"common-red",innerHTML:e.getLang("download_model_desc2")},null,8,gD)])])):xe("",!0),o.apiItem.key==="mbart50"&&i.mbart50Message?(O(),N("div",mD,[vD,T("div",yD,[T("div",{class:et([i.mbart50Success?"":"common-red"])},re(i.mbart50Message),3)])])):xe("",!0),T("div",bD,[T("div",CD,re(e.getLang("translate_test")),1),T("div",_D,[he(T("textarea",{class:"test-input","onUpdate:modelValue":t[2]||(t[2]=c=>i.testText=c)},null,512),[[Gn,i.testText]])])]),T("div",wD,[TD,T("div",kD,[T("div",{class:"hover-scale-120 test-btn",onClick:t[3]||(t[3]=(...c)=>o.onTestClick&&o.onTestClick(...c))},[i.loading?(O(),Ue(s,{key:0,name:"loading"})):(O(),N(Fe,{key:1},[Vt(re(e.getLang("test")),1)],64))])])]),T("div",xD,[SD,T("div",AD,[!i.translateSuccess&&i.errorMessage?(O(),N("div",ED,re(i.errorMessage),1)):xe("",!0),i.translatedText?he((O(),N("textarea",{key:1,class:"test-input","onUpdate:modelValue":t[4]||(t[4]=c=>i.translatedText=c)},null,512)),[[Gn,i.translatedText]]):xe("",!0)])]),T("div",OD,[T("div",LD,re(e.getLang("Keyword_group")),1),T("div",ID,[T("div",{innerHTML:e.getLang("enhance_translation_use_Keyword_group_desc")},null,8,PD),T("label",DD,[he(T("input",{class:"hover-scale-120",type:"checkbox",value:"1","onUpdate:modelValue":t[5]||(t[5]=c=>i.groupTagsTranslateValue=c)},null,512),[[Hc,i.groupTagsTranslateValue]]),T("span",null,re(e.getLang("enhance_translation_use_keyword_group")),1)])])]),T("div",RD,[ND,T("div",MD,[T("div",FD,[T("div",$D,[Vt("[?] "),T("a",{href:e.globals.docs+"/TranslationApiConfiguration.html#tagcomplete-translation-enhancement",target:"_blank"},"[Wiki] TagComplete Translation enhancement",8,BD)])]),T("div",{innerHTML:e.getLang("tagcomplete_translate_desc")},null,8,HD),T("div",{class:"common-red",innerHTML:e.getLang("tagcomplete_translate_desc2")},null,8,jD),T("div",UD,[he(T("select",{"onUpdate:modelValue":t[6]||(t[6]=c=>i.tagCompleteFileKey=c),onChange:t[7]||(t[7]=c=>i.tagCompleteResults=[])},[(O(!0),N(Fe,null,ct(i.tagCompleteFiles,c=>(O(),N("option",{value:c.key},re(c.name),9,WD))),256))],544),[[Po,i.tagCompleteFileKey]]),he((O(),N("div",{class:"refresh-btn hover-scale-120",onClick:t[8]||(t[8]=(...c)=>o.refreshCSVs&&o.refreshCSVs(...c))},[i.tagCompleteFilesLoading?(O(),Ue(s,{key:0,name:"loading"})):(O(),Ue(s,{key:1,name:"refresh"}))])),[[l,e.getLang("refresh")]])]),T("label",{class:"onlyCsvOnAuto",style:mt({display:i.tagCompleteFileKey?"flex":"none"})},[he(T("input",{class:"hover-scale-120",type:"checkbox",value:"1","onUpdate:modelValue":t[9]||(t[9]=c=>i.onlyCsvOnAutoValue=c)},null,512),[[Hc,i.onlyCsvOnAutoValue]]),T("span",null,re(e.getLang("only_csv_on_auto")),1)],4)])]),he(T("div",KD,[VD,T("div",qD,[T("div",{class:"hover-scale-120 test-btn",onClick:t[10]||(t[10]=(...c)=>o.onTagCompleteTestClick&&o.onTagCompleteTestClick(...c))},re(e.getLang("test")),1),he(T("div",zD,[(O(!0),N(Fe,null,ct(i.tagCompleteResults,c=>(O(),N("p",{key:c},re(c),1))),128))],512),[[Ot,i.tagCompleteResults.length>0]])])],512),[[Ot,i.tagCompleteFileKey]])]),T("div",GD,[T("div",{class:"translate-save hover-scale-120",onClick:t[11]||(t[11]=(...c)=>o.onSaveClick&&o.onSaveClick(...c))},re(e.getLang("save")),1),T("div",{class:"translate-close hover-scale-120",onClick:t[12]||(t[12]=(...c)=>o.onCloseClick&&o.onCloseClick(...c))},re(e.getLang("close")),1)])])])):xe("",!0)]),_:1})}const XD=vn(BP,[["render",YD]]),JD={name:"SelectLanguage",components:{IconSvg:Bn},mixins:[Qn],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}}}},ZD=["onClick"];function QD(e,t,n,r,i,o){const s=tt("icon-svg");return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-prompt-select-language",onClick:t[3]||(t[3]=(...l)=>o.close&&o.close(...l))},[T("div",{class:"language-main",onClick:t[2]||(t[2]=at(()=>{},["stop"]))},[T("div",{class:"language-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[be(s,{name:"close"})]),T("div",{class:"language-list",onClick:t[1]||(t[1]=at(()=>{},["stop"]))},[(O(!0),N(Fe,null,ct(e.languages,l=>(O(),N("div",{key:l.code,class:et(["language-item",l.code==e.languageCode?"selected":""]),ref_for:!0,ref:"items",onClick:c=>o.onLanguageClick(l)},re(l.code)+" - "+re(l.name),11,ZD))),128))])])])):xe("",!0)]),_:1})}const eR=vn(JD,[["render",QD]]),tR={components:{IconSvg:Bn},props:{},mixins:[Qn],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),this.$nextTick(()=>{let n=this.$refs.favorite.getBoundingClientRect();n.right>window.innerWidth&&(this.$refs.favorite.style.left=window.innerWidth-n.width-2+"px")}),setTimeout(()=>{this.mouseEnter||this.hide()},3e3)}},hide(){this.mouseEnter=!1,this.isShow=!1},onMouseEnter(){this.mouseEnter=!0},onMouseLeave(e){e.relatedTarget&&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],this.$nextTick(()=>{let n=this.$refs.favoriteDetail.getBoundingClientRect();n.right>window.innerWidth&&(this.$refs.favoriteDetail.style.left=0-n.width-2+"px")}))},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]))}}},nR={class:"popup-tabs"},rR=["onClick"],iR={class:"tab-name"},oR={class:"tab-type"},sR={class:"tab-count"},aR={class:"popup-detail",ref:"favoriteDetail"},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"],kR=["onClick"],xR=["onClick"],SR={class:"item-prompt"},AR={class:"content-empty"},ER={key:1};function OR(e,t,n,r,i,o){const s=tt("icon-svg"),l=Oo("tooltip");return O(),Ue(fn,{name:"fade"},{default:tn(()=>[he(T("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]=at(()=>{},["stop"]))},[T("div",nR,[(O(!0),N(Fe,null,ct(i.favorites,c=>(O(),N("div",{key:c.key,class:et(["popup-tab",c.key===i.favoriteKey?"active":""]),onClick:d=>o.onTabClick(c.key)},[T("div",iR,re(e.getLang(c.name)),1),T("div",oR,re(e.getLang(c.type)),1),T("div",sR,re(c.list.length),1)],10,rR))),128))]),he(T("div",aR,[T("div",lR,[(O(!0),N(Fe,null,ct(i.currentItem.tags,(c,d)=>(O(),N(Fe,{key:d},[c.type&&c.type==="wrap"?(O(),N("div",uR)):(O(),N("div",cR,[T("div",fR,re(c.value),1),T("div",dR,re(c.localValue),1)]))],64))),128))])],512),[[Ot,i.currentItem&&i.currentItem.tags]]),(O(!0),N(Fe,null,ct(i.favorites,c=>(O(),N("div",{key:c.key,class:et(["popup-tab-content",c.key===i.favoriteKey?"active":""])},[he(T("div",pR,[(O(!0),N(Fe,null,ct(c.list,(d,p)=>(O(),N("div",{class:"content-item",key:d.id,onMouseenter:y=>o.onItemMouseEnter(p),onMouseleave:y=>o.onItemMouseLeave(p)},[T("div",gR,[T("div",mR,[T("div",vR,re(c.list.length-p),1),T("div",yR,re(o.formatTime(d.time)),1),T("div",bR,[T("input",{class:"header-name-input",value:d.name,onKeydown:y=>o.onNameKeyDown(p,y),onChange:y=>o.onNameChange(p,y),placeholder:e.getLang("unset_name")},null,40,CR)])]),T("div",_R,[he((O(),N("div",{class:"header-btn-favorite hover-scale-140",onClick:y=>o.onFavoriteClick(p)},[be(s,{name:"favorite-yes"})],8,wR)),[[Ot,d.is_favorite],[l,e.getLang("remove_from_favorite")]]),he((O(),N("div",{class:"header-btn-favorite hover-scale-140",onClick:y=>o.onFavoriteClick(p)},[be(s,{name:"favorite-no"})],8,TR)),[[Ot,!d.is_favorite],[l,e.getLang("add_to_favorite")]]),he((O(),N("div",{class:"header-btn-copy hover-scale-140",onClick:y=>o.onCopyClick(p)},[be(s,{name:"copy"})],8,kR)),[[l,e.getLang("copy_to_clipboard")]]),he((O(),N("div",{class:"header-btn-use hover-scale-140",onClick:y=>o.onUseClick(p)},[be(s,{name:"use"})],8,xR)),[[l,e.getLang("use")]])])]),T("div",SR,re(d.prompt),1)],40,hR))),128))],512),[[Ot,c.list.length>0]]),he(T("div",AR,[i.loading?(O(),Ue(s,{key:0,name:"loading"})):(O(),N("span",ER,re(i.emptyMsg),1))],512),[[Ot,c.list.length===0]])],2))),128))],544),[[Ot,i.isShow]])]),_:1})}const LR=vn(tR,[["render",OR]]),IR={components:{IconSvg:Bn},props:{},mixins:[Qn],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),this.$nextTick(()=>{let n=this.$refs.history.getBoundingClientRect();n.right>window.innerWidth&&(this.$refs.history.style.left=window.innerWidth-n.width-2+"px")}),setTimeout(()=>{this.mouseEnter||this.hide()},3e3)}},hide(){this.mouseEnter=!1,this.isShow=!1},onMouseEnter(){this.mouseEnter=!0},onMouseLeave(e){e.relatedTarget&&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],this.$nextTick(()=>{let n=this.$refs.historyDetail.getBoundingClientRect();n.right>window.innerWidth&&(this.$refs.historyDetail.style.left=0-n.width-2+"px")}))},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=>{})}}},PR={class:"popup-tabs"},DR=["onClick"],RR={class:"tab-name"},NR={class:"tab-type"},MR={class:"tab-count"},FR={class:"popup-detail",ref:"historyDetail"},$R={class:"popup-item-tags"},BR={key:0,class:"item-wrap"},HR={key:1,class:"item-tag"},jR={class:"item-tag-value"},UR={class:"item-tag-local-value"},WR={class:"content-list"},KR=["onMouseenter","onMouseleave"],VR={class:"item-header"},qR={class:"item-header-left"},zR={class:"item-header-index"},GR={class:"item-header-time"},YR={class:"item-header-name"},XR=["value","onKeydown","onChange","placeholder"],JR={class:"item-header-right"},ZR=["onClick"],QR=["onClick"],eN=["onClick"],tN=["onClick"],nN=["onClick"],rN={class:"item-prompt"},iN={class:"content-empty"},oN={key:1};function sN(e,t,n,r,i,o){const s=tt("icon-svg"),l=Oo("tooltip");return O(),Ue(fn,{name:"fade"},{default:tn(()=>[he(T("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]=at(()=>{},["stop"]))},[T("div",PR,[(O(!0),N(Fe,null,ct(i.histories,c=>(O(),N("div",{key:c.key,class:et(["popup-tab",c.key===i.historyKey?"active":""]),onClick:d=>o.onTabClick(c.key)},[T("div",RR,re(e.getLang(c.name)),1),T("div",NR,re(e.getLang(c.type)),1),T("div",MR,re(c.list.length),1)],10,DR))),128))]),he(T("div",FR,[T("div",$R,[(O(!0),N(Fe,null,ct(i.currentItem.tags,(c,d)=>(O(),N(Fe,{key:d},[c.type&&c.type==="wrap"?(O(),N("div",BR)):(O(),N("div",HR,[T("div",jR,re(c.value),1),T("div",UR,re(c.localValue),1)]))],64))),128))])],512),[[Ot,i.currentItem&&i.currentItem.tags]]),(O(!0),N(Fe,null,ct(i.histories,c=>(O(),N("div",{key:c.key,class:et(["popup-tab-content",c.key===i.historyKey?"active":""])},[he(T("div",WR,[T("div",{class:"clear-btn",onClick:t[0]||(t[0]=(...d)=>o.onDeleteAllHistoryClick&&o.onDeleteAllHistoryClick(...d))},[be(s,{name:"remove"}),Vt(" "+re(e.getLang("delete_all_history")),1)]),(O(!0),N(Fe,null,ct(c.list,(d,p)=>(O(),N("div",{class:"content-item",key:d.id,onMouseenter:y=>o.onItemMouseEnter(p),onMouseleave:y=>o.onItemMouseLeave(p)},[T("div",VR,[T("div",qR,[T("div",zR,re(c.list.length-p),1),T("div",GR,re(o.formatTime(d.time)),1),T("div",YR,[T("input",{class:"header-name-input",value:d.name,onKeydown:y=>o.onNameKeyDown(p,y),onChange:y=>o.onNameChange(p,y),placeholder:e.getLang("unset_name")},null,40,XR)])]),T("div",JR,[T("div",{class:"header-btn-favorite hover-scale-140",onClick:y=>o.onDeleteClick(p)},[be(s,{name:"remove"})],8,ZR),he((O(),N("div",{class:"header-btn-favorite hover-scale-140",onClick:y=>o.onFavoriteClick(p)},[be(s,{name:"favorite-yes"})],8,QR)),[[Ot,d.is_favorite],[l,e.getLang("remove_from_favorite")]]),he((O(),N("div",{class:"header-btn-favorite hover-scale-140",onClick:y=>o.onFavoriteClick(p)},[be(s,{name:"favorite-no"})],8,eN)),[[Ot,!d.is_favorite],[l,e.getLang("add_to_favorite")]]),he((O(),N("div",{class:"header-btn-copy hover-scale-140",onClick:y=>o.onCopyClick(p)},[be(s,{name:"copy"})],8,tN)),[[l,e.getLang("copy_to_clipboard")]]),he((O(),N("div",{class:"header-btn-use hover-scale-140",onClick:y=>o.onUseClick(p)},[be(s,{name:"use"})],8,nN)),[[l,e.getLang("use")]])])]),T("div",rN,re(d.prompt),1)],40,KR))),128))],512),[[Ot,c.list.length>0]]),he(T("div",iN,[i.loading?(O(),Ue(s,{key:0,name:"loading"})):(O(),N("span",oN,re(i.emptyMsg),1))],512),[[Ot,c.list.length===0]])],2))),128))],544),[[Ot,i.isShow]])]),_:1})}const aN=vn(IR,[["render",sN]]),lN={name:"ExtensionCss",components:{IconSvg:Bn},mixins:[Qn],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}}},uN={class:"extension-table"},cN=["checked","onChange"],fN={class:"extension-name"},dN={class:"extension-type"},pN={class:"extension-dir"},hN={class:"extension-author"};function gN(e,t,n,r,i,o){const s=tt("icon-svg");return O(),Ue(fn,{name:"slideRight"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-prompt-extension-css",onClick:t[3]||(t[3]=(...l)=>o.close&&o.close(...l))},[T("div",{class:"extension-main",onClick:t[2]||(t[2]=at(()=>{},["stop"]))},[T("div",{class:"extension-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[be(s,{name:"close"})]),T("div",{class:"extension-list",onClick:t[1]||(t[1]=at(()=>{},["stop"]))},[T("table",uN,[(O(!0),N(Fe,null,ct(i.list,(l,c)=>(O(),N("tr",{key:l.dir,class:"extension-item",ref_for:!0,ref:"items"},[T("td",null,[T("input",{class:"extension-checkbox",type:"checkbox",name:"extension-item",checked:l.selected,onChange:d=>o.onChangeSelect(l.id)},null,40,cN)]),T("td",fN,re(o.getName(l)),1),T("td",dN,re(e.getLang(l.manifest.type)),1),T("td",pN,re(l.dir),1),T("td",hN,[l.manifest.author?(O(),N(Fe,{key:0},[Vt("By: "+re(l.manifest.author),1)],64)):xe("",!0)])]))),128))])])])])):xe("",!0)]),_:1})}const mN=vn(lN,[["render",gN]]),vN={name:"PromptFormat",components:{IconSvg:Bn},mixins:[Qn],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}}},yN={class:"format-item"},bN=["checked"],CN=["innerHTML"],_N={class:"format-item"},wN=["checked"],TN=["innerHTML"],kN={class:"format-item"},xN=["checked"],SN=["innerHTML"],AN={class:"format-item"},EN=["checked"],ON=["innerHTML"],LN={class:"format-item"},IN=["checked"],PN=["innerHTML"];function DN(e,t,n,r,i,o){const s=tt("icon-svg");return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-prompt-format",onClick:t[8]||(t[8]=(...l)=>o.close&&o.close(...l))},[T("div",{class:"format-main",onClick:t[7]||(t[7]=at(()=>{},["stop"]))},[T("div",{class:"format-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[be(s,{name:"close"})]),T("div",{class:"format-list",onClick:t[6]||(t[6]=at(()=>{},["stop"]))},[T("div",yN,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveSpace,onChange:t[1]||(t[1]=l=>e.$emit("update:autoRemoveSpace",l.target.checked))},null,40,bN),T("div",{class:"format-desc",innerHTML:e.getLang("is_remove_space")},null,8,CN)]),T("div",_N,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoRemoveLastComma,onChange:t[2]||(t[2]=l=>e.$emit("update:autoRemoveLastComma",l.target.checked))},null,40,wN),T("div",{class:"format-desc",innerHTML:e.getLang("is_remove_last_comma")},null,8,TN)]),T("div",kN,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoKeepWeightZero,onChange:t[3]||(t[3]=l=>e.$emit("update:autoKeepWeightZero",l.target.checked))},null,40,xN),T("div",{class:"format-desc",innerHTML:e.getLang("is_keep_weight_zero")},null,8,SN)]),T("div",AN,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoBreakBeforeWrap,onChange:t[4]||(t[4]=l=>e.$emit("update:autoBreakBeforeWrap",l.target.checked))},null,40,EN),T("div",{class:"format-desc",innerHTML:e.getLang("is_break_before_wrap")},null,8,ON)]),T("div",LN,[T("input",{class:"format-checkbox",type:"checkbox",checked:n.autoBreakAfterWrap,onChange:t[5]||(t[5]=l=>e.$emit("update:autoBreakAfterWrap",l.target.checked))},null,40,IN),T("div",{class:"format-desc",innerHTML:e.getLang("is_break_after_wrap")},null,8,PN)])])])])):xe("",!0)]),_:1})}const RN=vn(vN,[["render",DN]]),NN={name:"Blacklist",components:{IconSvg:Bn},mixins:[Qn],props:{},data(){return{isOpen:!1,data:{prompt:[],negative_prompt:[],lora:[],lycoris:[],embedding:[],translate:[]},cancelBlacklistConfirm:!1,textarea:{prompt:"",negative_prompt:"",lora:"",lycoris:"",embedding:"",translate:""}}},emits:["update:blacklist"],computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.data={prompt:[],negative_prompt:[],lora:[],lycoris:[],embedding:[],translate:[]},this.textarea={prompt:"",negative_prompt:"",lora:"",lycoris:"",embedding:"",translate:""},this.gradioAPI.getDatas(["blacklist","cancelBlacklistConfirm"]).then(e=>{e.blacklist&&(this.data.prompt=e.blacklist.prompt||[],this.data.negative_prompt=e.blacklist.negative_prompt||[],this.data.lora=e.blacklist.lora||[],this.data.lycoris=e.blacklist.lycoris||[],this.data.embedding=e.blacklist.embedding||[],this.data.translate=e.blacklist.translate||[]),e.cancelBlacklistConfirm&&(this.cancelBlacklistConfirm=e.cancelBlacklistConfirm),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(`
|
||
`),this.textarea.translate=this.data.translate.join(`
|
||
`)})},close(){this.isOpen=!1},onCloseClick(){this.close()},onSaveClick(){this.data.prompt=this.textarea.prompt.split(/\s*\n\s*/).filter(e=>e==null?void 0:e.trim().length),this.data.negative_prompt=this.textarea.negative_prompt.split(/\s*\n\s*/).filter(e=>e==null?void 0:e.trim().length),this.data.lora=this.textarea.lora.split(/\s*\n\s*/).filter(e=>e==null?void 0:e.trim().length),this.data.lycoris=this.textarea.lycoris.split(/\s*\n\s*/).filter(e=>e==null?void 0:e.trim().length),this.data.embedding=this.textarea.embedding.split(/\s*\n\s*/).filter(e=>e==null?void 0:e.trim().length),this.data.translate=this.textarea.translate.split(/\s*\n\s*/).filter(e=>e==null?void 0:e.trim().length),this.gradioAPI.setData("blacklist",this.data),this.gradioAPI.setData("cancelBlacklistConfirm",this.cancelBlacklistConfirm),this.close(),this.$emit("update:blacklist",this.data,this.cancelBlacklistConfirm)}}},MN={class:"blacklist-desc"},FN={class:"blacklist-group"},$N={class:"group-title"},BN=["placeholder"],HN={class:"blacklist-group"},jN={class:"group-title"},UN=["placeholder"],WN=T("div",{class:"blacklist-wrap"},null,-1),KN={class:"blacklist-group"},VN={class:"group-title"},qN=["placeholder"],zN={class:"blacklist-group"},GN={class:"group-title"},YN=["placeholder"],XN={class:"blacklist-group"},JN={class:"group-title"},ZN=["placeholder"],QN=T("div",{class:"blacklist-wrap"},null,-1),eM={class:"blacklist-group"},tM={class:"group-title"},nM=T("div",{class:"blacklist-wrap"},null,-1),rM={class:"blacklist-desc"},iM={class:"blacklist-group"},oM={class:"group-title"},sM=["placeholder"],aM=T("div",{class:"blacklist-wrap"},null,-1),lM={class:"setting-btns"};function uM(e,t,n,r,i,o){return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-prompt-blacklist",onClick:t[11]||(t[11]=()=>{})},[T("div",{class:"blacklist-main",onClick:t[10]||(t[10]=at(()=>{},["stop"]))},[T("div",{class:"blacklist-body",onClick:t[9]||(t[9]=at(()=>{},["stop"]))},[T("div",MN,"1. "+re(e.getLang("blacklist_desc")),1),T("div",FN,[T("div",$N,re(e.getLang("prompt_blacklist_list"))+":",1),he(T("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[0]||(t[0]=s=>i.textarea.prompt=s)},null,8,BN),[[Gn,i.textarea.prompt]])]),T("div",HN,[T("div",jN,re(e.getLang("negative_prompt_blacklist_list"))+":",1),he(T("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,UN),[[Gn,i.textarea.negative_prompt]])]),WN,T("div",KN,[T("div",VN,re(e.getLang("lora_blacklist_list"))+":",1),he(T("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[2]||(t[2]=s=>i.textarea.lora=s)},null,8,qN),[[Gn,i.textarea.lora]])]),T("div",zN,[T("div",GN,re(e.getLang("lycoris_blacklist_list"))+":",1),he(T("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[3]||(t[3]=s=>i.textarea.lycoris=s)},null,8,YN),[[Gn,i.textarea.lycoris]])]),T("div",XN,[T("div",JN,re(e.getLang("embedding_blacklist_list"))+":",1),he(T("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[4]||(t[4]=s=>i.textarea.embedding=s)},null,8,ZN),[[Gn,i.textarea.embedding]])]),QN,T("div",eM,[T("div",tM,[T("label",null,[he(T("input",{type:"checkbox","onUpdate:modelValue":t[5]||(t[5]=s=>i.cancelBlacklistConfirm=s)},null,512),[[Hc,i.cancelBlacklistConfirm]]),Vt(" "+re(e.getLang("cancel_confirm_add_blacklist")),1)])])]),nM,T("div",rM,"2. "+re(e.getLang("translate_blacklist_desc")),1),T("div",iM,[T("div",oM,re(e.getLang("disable_translate_prompt_blacklist_list"))+":",1),he(T("textarea",{class:"group-content",placeholder:e.getLang("one_keyword_per_line"),"onUpdate:modelValue":t[6]||(t[6]=s=>i.textarea.translate=s)},null,8,sM),[[Gn,i.textarea.translate]])]),aM,T("div",lM,[T("div",{class:"blacklist-save hover-scale-120",onClick:t[7]||(t[7]=(...s)=>o.onSaveClick&&o.onSaveClick(...s))},re(e.getLang("save")),1),T("div",{class:"blacklist-close hover-scale-120",onClick:t[8]||(t[8]=(...s)=>o.onCloseClick&&o.onCloseClick(...s))},re(e.getLang("close")),1)])])])])):xe("",!0)]),_:1})}const cM=vn(NN,[["render",uM]]),fM={name:"PackagesState",components:{IconSvg:Bn},mixins:[Qn],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}}},dM={class:"today-now-show"},pM=["value"],hM={class:"state-body-name"},gM=["innerHTML"],mM={class:"package-list"},vM={class:"package-name"},yM={class:"package-command"},bM={key:0,class:"install-result"};function CM(e,t,n,r,i,o){const s=tt("icon-svg");return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-packages-state",onClick:t[6]||(t[6]=(...l)=>o.close&&o.close(...l))},[T("div",{class:"state-main",onClick:t[5]||(t[5]=at(()=>{},["stop"]))},[T("div",{class:"state-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[be(s,{name:"close"})]),T("div",{class:"state-body",onClick:t[4]||(t[4]=at(()=>{},["stop"]))},[T("div",dM,[T("label",null,[T("input",{type:"checkbox",value:i.todayNotShow,onChange:t[1]||(t[1]=(...l)=>o.onTodayNotShowChange&&o.onTodayNotShowChange(...l))},null,40,pM),Vt(" "+re(e.getLang("today_not_show")),1)])]),T("div",hM,re(e.globals.shortName),1),T("div",{class:"state-body-language",onClick:t[2]||(t[2]=l=>e.$emit("click:selectLanguage",l))},[be(s,{name:"i18n"}),T("div",null,"Language: "+re(e.langName),1)]),T("div",{class:"state-body-desc",innerHTML:e.getLang("packages_desc")},null,8,gM),T("div",mM,[(O(!0),N(Fe,null,ct(n.packagesState,l=>(O(),N("div",{key:l.name,class:"package-item"},[T("div",vM,re(l.name),1),T("div",{class:et(["package-state",l.state?"installed":"not_install"])},re(e.getLang(l.state?"installed":"not_install")),3),T("div",yM,re(o.getCommand(l)),1)]))),128))]),T("div",{class:"btn-packages-install hover-scale-120",onClick:t[3]||(t[3]=(...l)=>o.onInstallClick&&o.onInstallClick(...l))},[i.loading?(O(),Ue(s,{key:0,name:"loading"})):(O(),N(Fe,{key:1},[Vt(re(e.getLang("install")),1)],64))]),i.showResult?(O(),N("div",bM,[Vt(re(e.getLang("packages_installing"))+" ",1),i.result?(O(),N("div",{key:0,class:"result-content",ref:"result"},re(i.result),513)):xe("",!0)])):xe("",!0)])])])):xe("",!0)]),_:1})}const _M=vn(fM,[["render",CM]]),wM={name:"ChatgptPrompt",components:{IconSvg:Bn},mixins:[Qn],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()}}},TM={class:"panel-header"},kM={class:"panel-title"},xM={class:"panel-content"},SM={class:"body-line"},AM={class:"line-title"},EM={class:"line-content"},OM=["onUpdate:modelValue"],LM=["onUpdate:modelValue"],IM=["value"],PM=["innerHTML"],DM={class:"body-line"},RM=T("div",{class:"line-title"},null,-1),NM={class:"line-content text-right"},MM={class:"panel-header"},FM={class:"panel-title"},$M={class:"panel-content"},BM={class:"body-line"},HM={class:"line-title"},jM={class:"line-subtitle"},UM={class:"line-content"},WM=["value"],KM={class:"body-line"},VM=T("div",{class:"line-title"},null,-1),qM={class:"line-content text-right"},zM={class:"body-line"},GM={class:"line-title"},YM={class:"line-subtitle"},XM={class:"line-content"},JM=["placeholder"],ZM={class:"body-line"},QM=T("div",{class:"line-title"},null,-1),eF={class:"line-content text-right"},tF={class:"panel-header"},nF={class:"panel-title"},rF={class:"panel-content"},iF={class:"body-line"},oF={class:"line-title"},sF={class:"line-content"},aF={key:0,class:"body-line"},lF=T("div",{class:"line-title"},null,-1),uF={class:"line-content text-right"};function cF(e,t,n,r,i,o){const s=tt("icon-svg");return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-chatgpt-prompt",onClick:t[13]||(t[13]=(...l)=>o.close&&o.close(...l))},[T("div",{class:"chatgpt-main",onClick:t[12]||(t[12]=at(()=>{},["stop"]))},[T("div",{class:"chatgpt-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[be(s,{name:"close"})]),T("div",{class:"chatgpt-body",onClick:t[11]||(t[11]=at(()=>{},["stop"]))},[T("div",{class:et(["body-panel",i.hidePanels.api?"fold":""])},[T("div",TM,[T("div",{class:"panel-unfold",onClick:t[1]||(t[1]=l=>o.onUnfoldClick("api"))},[be(s,{class:"hover-scale-120",name:"unfold"})]),T("div",kM,re(e.getLang("api_config")),1)]),T("div",xM,[(O(!0),N(Fe,null,ct(i.configs,l=>(O(),N("div",SM,[T("div",AM,re(l.title),1),T("div",EM,[l.type=="input"?he((O(),N("input",{key:0,type:"text","onUpdate:modelValue":c=>l.value=c},null,8,OM)),[[Gn,l.value]]):xe("",!0),l.type=="select"?he((O(),N("select",{key:1,"onUpdate:modelValue":c=>l.value=c},[(O(!0),N(Fe,null,ct(l.options,c=>(O(),N("option",{value:c},re(c),9,IM))),256))],8,LM)),[[Po,l.value]]):xe("",!0),l.desc?(O(),N("div",{key:2,innerHTML:l.desc},null,8,PM)):xe("",!0)])]))),256)),T("div",DM,[RM,T("div",NM,[T("div",{class:"common-btn hover-scale-120",onClick:t[2]||(t[2]=(...l)=>o.onSaveConfigClick&&o.onSaveConfigClick(...l))},[i.saveConfigIng?(O(),Ue(s,{key:0,name:"loading"})):(O(),N(Fe,{key:1},[Vt(re(e.getLang("save")),1)],64))])])])])],2),T("div",{class:et(["body-panel",i.hidePanels.send?"fold":""])},[T("div",MM,[T("div",{class:"panel-unfold",onClick:t[3]||(t[3]=l=>o.onUnfoldClick("send"))},[be(s,{class:"hover-scale-120",name:"unfold"})]),T("div",FM,re(e.getLang("image_desc")),1)]),T("div",$M,[T("div",BM,[T("div",HM,[Vt(re(e.getLang("preset"))+" ",1),T("div",jM,re(e.getLang("ai_one")),1)]),T("div",UM,[T("textarea",{value:i.chatPreset,onChange:t[4]||(t[4]=(...l)=>o.onPresetChange&&o.onPresetChange(...l)),style:{height:"100px"}},null,40,WM)])]),T("div",KM,[VM,T("div",qM,[T("a",{href:"javascript:",onClick:t[5]||(t[5]=(...l)=>o.onRestoreClick&&o.onRestoreClick(...l))},re(e.getLang("restore_to_default")),1)])]),T("div",zM,[T("div",GM,[Vt(re(e.getLang("image_desc"))+" ",1),T("div",YM,re(e.getLang("ai_two")),1)]),T("div",XM,[he(T("textarea",{style:{height:"100px"},ref:"imageDesc","onUpdate:modelValue":t[6]||(t[6]=l=>i.imageDesc=l),placeholder:e.getLang("input_image_desc")},null,8,JM),[[Gn,i.imageDesc]])])]),T("div",ZM,[QM,T("div",eF,[T("div",{class:"common-btn hover-scale-120",onClick:t[7]||(t[7]=(...l)=>o.onGenClick&&o.onGenClick(...l))},[i.genIng?(O(),Ue(s,{key:0,name:"loading"})):(O(),N(Fe,{key:1},[Vt(re(e.getLang("generate")),1)],64))])])])])],2),T("div",{class:et(["body-panel",i.hidePanels.result?"fold":""])},[T("div",tF,[T("div",{class:"panel-unfold",onClick:t[8]||(t[8]=l=>o.onUnfoldClick("result"))},[be(s,{class:"hover-scale-120",name:"unfold"})]),T("div",nF,re(e.getLang("generate_result")),1)]),T("div",rF,[T("div",iF,[T("div",oF,re(e.getLang("generate_result")),1),T("div",sF,[he(T("textarea",{style:{height:"100px"},"onUpdate:modelValue":t[9]||(t[9]=l=>i.promptResult=l)},null,512),[[Gn,i.promptResult]])])]),i.promptResult?(O(),N("div",aF,[lF,T("div",uF,[T("div",{class:"common-btn hover-scale-120",onClick:t[10]||(t[10]=(...l)=>o.onUseClick&&o.onUseClick(...l))},re(e.getLang("use")),1)])])):xe("",!0)])],2)])])])):xe("",!0)]),_:1})}const fF=vn(wM,[["render",cF]]),dF={name:"About",components:{IconSvg:Bn},mixins:[Qn],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}}},pF={class:"body-title"},hF=["href"],gF=["href"],mF=["src","alt"],vF={key:0},yF=["href"],bF={key:0,class:"has-new-version"},CF=["href"],_F=["href"],wF={class:"version-list"},TF={class:"item-header"},kF={class:"version-sha"},xF=["href"],SF={class:"version-date"},AF=["innerHTML"];function EF(e,t,n,r,i,o){const s=tt("icon-svg");return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-about-prompt",onClick:t[3]||(t[3]=(...l)=>o.close&&o.close(...l))},[T("div",{class:"about-main",onClick:t[2]||(t[2]=at(()=>{},["stop"]))},[T("div",{class:"about-close",onClick:t[0]||(t[0]=(...l)=>o.close&&o.close(...l))},[be(s,{name:"close"})]),T("div",{class:"about-body",onClick:t[1]||(t[1]=at(()=>{},["stop"]))},[T("p",pF,[T("a",{href:e.globals.github,target:"_blank"},re(e.globals.name),9,hF)]),T("p",null,[(O(!0),N(Fe,null,ct(i.icons,l=>(O(),N("a",{key:l.title,href:l.url,target:"_blank"},[T("img",{src:l.image,alt:l.title},null,8,mF)],8,gF))),128))]),i.loading?xe("",!0):(O(),N("p",vF,[T("span",null,[Vt(re(e.getLang("version"))+": ",1),T("a",{href:o.commitUrl(i.version),target:"_blank"},re(o.formatVersion(i.version)),9,yF)]),!i.isLatestVersion&&i.latestVersion?(O(),N("span",bF,[Vt(" ("+re(e.getLang("has_new_version"))+": ",1),T("a",{href:o.commitUrl(i.latestVersion),target:"_blank"},re(o.formatVersion(i.latestVersion)),9,CF),Vt(")")])):xe("",!0)])),T("p",null,[Vt(re(e.getLang("wiki_desc"))+" ",1),T("a",{href:e.replaceGlobals("{{docs}}"),target:"_blank"},"Wiki",8,_F)]),T("div",wF,[i.loading?(O(),Ue(s,{key:0,name:"loading"})):xe("",!0),(O(!0),N(Fe,null,ct(i.versions,l=>(O(),N("div",{class:"version-item",key:l.version},[T("div",TF,[T("div",kF,[T("a",{href:o.commitUrl(l.version),target:"_blank"},re(o.formatVersion(l.version)),9,xF)]),T("div",SF,re(l.date),1)]),T("div",{class:"version-msg",innerHTML:o.message(l.message)},null,8,AF)]))),128))])])])])):xe("",!0)]),_:1})}const OF=vn(dF,[["render",EF]]);/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Ly(e){return typeof e>"u"||e===null}function LF(e){return typeof e=="object"&&e!==null}function IF(e){return Array.isArray(e)?e:Ly(e)?[]:[e]}function PF(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 DF(e,t){var n="",r;for(r=0;r<t;r+=1)n+=e;return n}function RF(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var NF=Ly,MF=LF,FF=IF,$F=DF,BF=RF,HF=PF,sn={isNothing:NF,isObject:MF,toArray:FF,repeat:$F,isNegativeZero:BF,extend:HF};function Iy(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 ka(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Iy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ka.prototype=Object.create(Error.prototype),ka.prototype.constructor=ka,ka.prototype.toString=function(t){return this.name+": "+Iy(this,t)};var Pn=ka;function kd(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 xd(e,t){return sn.repeat(" ",t-e.length)+e}function jF(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,p=Math.min(e.line+t.linesAfter,i.length).toString().length,y=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore&&!(s-c<0);c++)d=kd(e.buffer,r[s-c],i[s-c],e.position-(r[s]-r[s-c]),y),l=sn.repeat(" ",t.indent)+xd((e.line-c+1).toString(),p)+" | "+d.str+`
|
||
`+l;for(d=kd(e.buffer,r[s],i[s],e.position,y),l+=sn.repeat(" ",t.indent)+xd((e.line+1).toString(),p)+" | "+d.str+`
|
||
`,l+=sn.repeat("-",t.indent+p+3+d.pos)+`^
|
||
`,c=1;c<=t.linesAfter&&!(s+c>=i.length);c++)d=kd(e.buffer,r[s+c],i[s+c],e.position-(r[s]-r[s+c]),y),l+=sn.repeat(" ",t.indent)+xd((e.line+c+1).toString(),p)+" | "+d.str+`
|
||
`;return l.replace(/\n$/,"")}var UF=jF,WF=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],KF=["scalar","sequence","mapping"];function VF(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(r){t[String(r)]=n})}),t}function qF(e,t){if(t=t||{},Object.keys(t).forEach(function(n){if(WF.indexOf(n)===-1)throw new Pn('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=VF(t.styleAliases||null),KF.indexOf(this.kind)===-1)throw new Pn('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var yn=qF;function Py(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 zF(){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 Sd(e){return this.extend(e)}Sd.prototype.extend=function(t){var n=[],r=[];if(t instanceof yn)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 Pn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(o){if(!(o instanceof yn))throw new Pn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Pn("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 Pn("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 yn))throw new Pn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Sd.prototype);return i.implicit=(this.implicit||[]).concat(n),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=Py(i,"implicit"),i.compiledExplicit=Py(i,"explicit"),i.compiledTypeMap=zF(i.compiledImplicit,i.compiledExplicit),i};var Dy=Sd,Ry=new yn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),Ny=new yn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),My=new yn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Fy=new Dy({explicit:[Ry,Ny,My]});function GF(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function YF(){return null}function XF(e){return e===null}var $y=new yn("tag:yaml.org,2002:null",{kind:"scalar",resolve:GF,construct:YF,predicate:XF,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function JF(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 ZF(e){return e==="true"||e==="True"||e==="TRUE"}function QF(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var By=new yn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:JF,construct:ZF,predicate:QF,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 e$(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function t$(e){return 48<=e&&e<=55}function n$(e){return 48<=e&&e<=57}function r$(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(!e$(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}if(i==="o"){for(n++;n<t;n++)if(i=e[n],i!=="_"){if(!t$(e.charCodeAt(n)))return!1;r=!0}return r&&i!=="_"}}if(i==="_")return!1;for(;n<t;n++)if(i=e[n],i!=="_"){if(!n$(e.charCodeAt(n)))return!1;r=!0}return!(!r||i==="_")}function i$(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 o$(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!sn.isNegativeZero(e)}var Hy=new yn("tag:yaml.org,2002:int",{kind:"scalar",resolve:r$,construct:i$,predicate:o$,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"]}}),s$=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function a$(e){return!(e===null||!s$.test(e)||e[e.length-1]==="_")}function l$(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 u$=/^[-+]?[0-9]+e/;function c$(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(sn.isNegativeZero(e))return"-0.0";return n=e.toString(10),u$.test(n)?n.replace("e",".e"):n}function f$(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||sn.isNegativeZero(e))}var jy=new yn("tag:yaml.org,2002:float",{kind:"scalar",resolve:a$,construct:l$,predicate:f$,represent:c$,defaultStyle:"lowercase"}),Uy=Fy.extend({implicit:[$y,By,Hy,jy]}),Wy=Uy,Ky=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Vy=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 d$(e){return e===null?!1:Ky.exec(e)!==null||Vy.exec(e)!==null}function p$(e){var t,n,r,i,o,s,l,c=0,d=null,p,y,m;if(t=Ky.exec(e),t===null&&(t=Vy.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]&&(p=+t[10],y=+(t[11]||0),d=(p*60+y)*6e4,t[9]==="-"&&(d=-d)),m=new Date(Date.UTC(n,r,i,o,s,l,c)),d&&m.setTime(m.getTime()-d),m}function h$(e){return e.toISOString()}var qy=new yn("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:d$,construct:p$,instanceOf:Date,represent:h$});function g$(e){return e==="<<"||e===null}var zy=new yn("tag:yaml.org,2002:merge",{kind:"scalar",resolve:g$}),Ad=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
||
\r`;function m$(e){if(e===null)return!1;var t,n,r=0,i=e.length,o=Ad;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 v$(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=Ad,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 y$(e){var t="",n=0,r,i,o=e.length,s=Ad;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 b$(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Gy=new yn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:m$,construct:v$,predicate:b$,represent:y$}),C$=Object.prototype.hasOwnProperty,_$=Object.prototype.toString;function w$(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,_$.call(i)!=="[object Object]")return!1;for(o in i)if(C$.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 T$(e){return e!==null?e:[]}var Yy=new yn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:w$,construct:T$}),k$=Object.prototype.toString;function x$(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],k$.call(r)!=="[object Object]"||(i=Object.keys(r),i.length!==1))return!1;o[t]=[i[0],r[i[0]]]}return!0}function S$(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 Xy=new yn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:x$,construct:S$}),A$=Object.prototype.hasOwnProperty;function E$(e){if(e===null)return!0;var t,n=e;for(t in n)if(A$.call(n,t)&&n[t]!==null)return!1;return!0}function O$(e){return e!==null?e:{}}var Jy=new yn("tag:yaml.org,2002:set",{kind:"mapping",resolve:E$,construct:O$}),Ed=Wy.extend({implicit:[qy,zy],explicit:[Gy,Yy,Xy,Jy]}),Ei=Object.prototype.hasOwnProperty,_u=1,Zy=2,Qy=3,wu=4,Od=1,L$=2,e0=3,I$=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,P$=/[\x85\u2028\u2029]/,D$=/[,\[\]\{\}]/,t0=/^(?:!|!!|![a-z\-]+!)$/i,n0=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function r0(e){return Object.prototype.toString.call(e)}function jr(e){return e===10||e===13}function ao(e){return e===9||e===32}function Un(e){return e===9||e===32||e===10||e===13}function cs(e){return e===44||e===91||e===93||e===123||e===125}function R$(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function N$(e){return e===120?2:e===117?4:e===85?8:0}function M$(e){return 48<=e&&e<=57?e-48:-1}function i0(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 F$(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}for(var o0=new Array(256),s0=new Array(256),fs=0;fs<256;fs++)o0[fs]=i0(fs)?1:0,s0[fs]=i0(fs);function $$(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Ed,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 a0(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=UF(n),new Pn(t,n)}function Ve(e,t){throw a0(e,t)}function Tu(e,t){e.onWarning&&e.onWarning.call(null,a0(e,t))}var l0={YAML:function(t,n,r){var i,o,s;t.version!==null&&Ve(t,"duplication of %YAML directive"),r.length!==1&&Ve(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Ve(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),s=parseInt(i[2],10),o!==1&&Ve(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Tu(t,"unsupported YAML version of the document")},TAG:function(t,n,r){var i,o;r.length!==2&&Ve(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],t0.test(i)||Ve(t,"ill-formed tag handle (first argument) of the TAG directive"),Ei.call(t.tagMap,i)&&Ve(t,'there is a previously declared suffix for "'+i+'" tag handle'),n0.test(o)||Ve(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{Ve(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o}};function Oi(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||Ve(e,"expected valid JSON character");else I$.test(l)&&Ve(e,"the stream contains non-printable characters");e.result+=l}}function u0(e,t,n,r){var i,o,s,l;for(sn.isObject(n)||Ve(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],Ei.call(t,o)||(t[o]=n[o],r[o]=!0)}function ds(e,t,n,r,i,o,s,l,c){var d,p;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),d=0,p=i.length;d<p;d+=1)Array.isArray(i[d])&&Ve(e,"nested arrays are not supported inside keys"),typeof i=="object"&&r0(i[d])==="[object Object]"&&(i[d]="[object Object]");if(typeof i=="object"&&r0(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,p=o.length;d<p;d+=1)u0(e,t,o[d],n);else u0(e,t,o,n);else!e.json&&!Ei.call(n,i)&&Ei.call(t,i)&&(e.line=s||e.line,e.lineStart=l||e.lineStart,e.position=c||e.position,Ve(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 Ld(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++):Ve(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(;ao(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(jr(i))for(Ld(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&&Tu(e,"deficient indentation"),r}function ku(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||Un(n)))}function Id(e,t){t===1?e.result+=" ":t>1&&(e.result+=sn.repeat(`
|
||
`,t-1))}function B$(e,t,n){var r,i,o,s,l,c,d,p,y=e.kind,m=e.result,C;if(C=e.input.charCodeAt(e.position),Un(C)||cs(C)||C===35||C===38||C===42||C===33||C===124||C===62||C===39||C===34||C===37||C===64||C===96||(C===63||C===45)&&(i=e.input.charCodeAt(e.position+1),Un(i)||n&&cs(i)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,l=!1;C!==0;){if(C===58){if(i=e.input.charCodeAt(e.position+1),Un(i)||n&&cs(i))break}else if(C===35){if(r=e.input.charCodeAt(e.position-1),Un(r))break}else{if(e.position===e.lineStart&&ku(e)||n&&cs(C))break;if(jr(C))if(c=e.line,d=e.lineStart,p=e.lineIndent,Qt(e,!1,-1),e.lineIndent>=t){l=!0,C=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=c,e.lineStart=d,e.lineIndent=p;break}}l&&(Oi(e,o,s,!1),Id(e,e.line-c),o=s=e.position,l=!1),ao(C)||(s=e.position+1),C=e.input.charCodeAt(++e.position)}return Oi(e,o,s,!1),e.result?!0:(e.kind=y,e.result=m,!1)}function H$(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(Oi(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 jr(n)?(Oi(e,r,i,!0),Id(e,Qt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&ku(e)?Ve(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);Ve(e,"unexpected end of the stream within a single quoted scalar")}function j$(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 Oi(e,n,e.position,!0),e.position++,!0;if(l===92){if(Oi(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),jr(l))Qt(e,!1,t);else if(l<256&&o0[l])e.result+=s0[l],e.position++;else if((s=N$(l))>0){for(i=s,o=0;i>0;i--)l=e.input.charCodeAt(++e.position),(s=R$(l))>=0?o=(o<<4)+s:Ve(e,"expected hexadecimal character");e.result+=F$(o),e.position++}else Ve(e,"unknown escape sequence");n=r=e.position}else jr(l)?(Oi(e,n,r,!0),Id(e,Qt(e,!1,t)),n=r=e.position):e.position===e.lineStart&&ku(e)?Ve(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}Ve(e,"unexpected end of the stream within a double quoted scalar")}function U$(e,t){var n=!0,r,i,o,s=e.tag,l,c=e.anchor,d,p,y,m,C,b=Object.create(null),k,L,P,j;if(j=e.input.charCodeAt(e.position),j===91)p=93,C=!1,l=[];else if(j===123)p=125,C=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),j=e.input.charCodeAt(++e.position);j!==0;){if(Qt(e,!0,t),j=e.input.charCodeAt(e.position),j===p)return e.position++,e.tag=s,e.anchor=c,e.kind=C?"mapping":"sequence",e.result=l,!0;n?j===44&&Ve(e,"expected the node content, but found ','"):Ve(e,"missed comma between flow collection entries"),L=k=P=null,y=m=!1,j===63&&(d=e.input.charCodeAt(e.position+1),Un(d)&&(y=m=!0,e.position++,Qt(e,!0,t))),r=e.line,i=e.lineStart,o=e.position,ps(e,t,_u,!1,!0),L=e.tag,k=e.result,Qt(e,!0,t),j=e.input.charCodeAt(e.position),(m||e.line===r)&&j===58&&(y=!0,j=e.input.charCodeAt(++e.position),Qt(e,!0,t),ps(e,t,_u,!1,!0),P=e.result),C?ds(e,l,b,L,k,P,r,i,o):y?l.push(ds(e,null,b,L,k,P,r,i,o)):l.push(k),Qt(e,!0,t),j=e.input.charCodeAt(e.position),j===44?(n=!0,j=e.input.charCodeAt(++e.position)):n=!1}Ve(e,"unexpected end of the stream within a flow collection")}function W$(e,t){var n,r,i=Od,o=!1,s=!1,l=t,c=0,d=!1,p,y;if(y=e.input.charCodeAt(e.position),y===124)r=!1;else if(y===62)r=!0;else return!1;for(e.kind="scalar",e.result="";y!==0;)if(y=e.input.charCodeAt(++e.position),y===43||y===45)Od===i?i=y===43?e0:L$:Ve(e,"repeat of a chomping mode identifier");else if((p=M$(y))>=0)p===0?Ve(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Ve(e,"repeat of an indentation width identifier"):(l=t+p-1,s=!0);else break;if(ao(y)){do y=e.input.charCodeAt(++e.position);while(ao(y));if(y===35)do y=e.input.charCodeAt(++e.position);while(!jr(y)&&y!==0)}for(;y!==0;){for(Ld(e),e.lineIndent=0,y=e.input.charCodeAt(e.position);(!s||e.lineIndent<l)&&y===32;)e.lineIndent++,y=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>l&&(l=e.lineIndent),jr(y)){c++;continue}if(e.lineIndent<l){i===e0?e.result+=sn.repeat(`
|
||
`,o?1+c:c):i===Od&&o&&(e.result+=`
|
||
`);break}for(r?ao(y)?(d=!0,e.result+=sn.repeat(`
|
||
`,o?1+c:c)):d?(d=!1,e.result+=sn.repeat(`
|
||
`,c+1)):c===0?o&&(e.result+=" "):e.result+=sn.repeat(`
|
||
`,c):e.result+=sn.repeat(`
|
||
`,o?1+c:c),o=!0,s=!0,c=0,n=e.position;!jr(y)&&y!==0;)y=e.input.charCodeAt(++e.position);Oi(e,n,e.position,!1)}return!0}function c0(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,Ve(e,"tab characters must not be used in indentation")),!(c!==45||(s=e.input.charCodeAt(e.position+1),!Un(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,ps(e,t,Qy,!1,!0),o.push(e.result),Qt(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)Ve(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 K$(e,t,n){var r,i,o,s,l,c,d=e.tag,p=e.anchor,y={},m=Object.create(null),C=null,b=null,k=null,L=!1,P=!1,j;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=y),j=e.input.charCodeAt(e.position);j!==0;){if(!L&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ve(e,"tab characters must not be used in indentation")),r=e.input.charCodeAt(e.position+1),o=e.line,(j===63||j===58)&&Un(r))j===63?(L&&(ds(e,y,m,C,b,null,s,l,c),C=b=k=null),P=!0,L=!0,i=!0):L?(L=!1,i=!0):Ve(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,j=r;else{if(s=e.line,l=e.lineStart,c=e.position,!ps(e,n,Zy,!1,!0))break;if(e.line===o){for(j=e.input.charCodeAt(e.position);ao(j);)j=e.input.charCodeAt(++e.position);if(j===58)j=e.input.charCodeAt(++e.position),Un(j)||Ve(e,"a whitespace character is expected after the key-value separator within a block mapping"),L&&(ds(e,y,m,C,b,null,s,l,c),C=b=k=null),P=!0,L=!1,i=!1,C=e.tag,b=e.result;else if(P)Ve(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=d,e.anchor=p,!0}else if(P)Ve(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=d,e.anchor=p,!0}if((e.line===o||e.lineIndent>t)&&(L&&(s=e.line,l=e.lineStart,c=e.position),ps(e,t,wu,!0,i)&&(L?b=e.result:k=e.result),L||(ds(e,y,m,C,b,k,s,l,c),C=b=k=null),Qt(e,!0,-1),j=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&j!==0)Ve(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return L&&ds(e,y,m,C,b,null,s,l,c),P&&(e.tag=d,e.anchor=p,e.kind="mapping",e.result=y),P}function V$(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&&Ve(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)):Ve(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Un(s);)s===33&&(r?Ve(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(t-1,e.position+1),t0.test(i)||Ve(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),D$.test(o)&&Ve(e,"tag suffix cannot contain flow indicator characters")}o&&!n0.test(o)&&Ve(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{Ve(e,"tag name is malformed: "+o)}return n?e.tag=o:Ei.call(e.tagMap,i)?e.tag=e.tagMap[i]+o:i==="!"?e.tag="!"+o:i==="!!"?e.tag="tag:yaml.org,2002:"+o:Ve(e,'undeclared tag handle "'+i+'"'),!0}function q$(e){var t,n;if(n=e.input.charCodeAt(e.position),n!==38)return!1;for(e.anchor!==null&&Ve(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Un(n)&&!cs(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&Ve(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function z$(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&&!Un(r)&&!cs(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ve(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),Ei.call(e.anchorMap,n)||Ve(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],Qt(e,!0,-1),!0}function ps(e,t,n,r,i){var o,s,l,c=1,d=!1,p=!1,y,m,C,b,k,L;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=l=wu===n||Qy===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(;V$(e)||q$(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||wu===n)&&(_u===n||Zy===n?k=t:k=t+1,L=e.position-e.lineStart,c===1?l&&(c0(e,L)||K$(e,L,k))||U$(e,k)?p=!0:(s&&W$(e,k)||H$(e,k)||j$(e,k)?p=!0:z$(e)?(p=!0,(e.tag!==null||e.anchor!==null)&&Ve(e,"alias node should not have any properties")):B$(e,k,_u===n)&&(p=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(p=l&&c0(e,L))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ve(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),y=0,m=e.implicitTypes.length;y<m;y+=1)if(b=e.implicitTypes[y],b.resolve(e.result)){e.result=b.construct(e.result),e.tag=b.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ei.call(e.typeMap[e.kind||"fallback"],e.tag))b=e.typeMap[e.kind||"fallback"][e.tag];else for(b=null,C=e.typeMap.multi[e.kind||"fallback"],y=0,m=C.length;y<m;y+=1)if(e.tag.slice(0,C[y].tag.length)===C[y].tag){b=C[y];break}b||Ve(e,"unknown tag !<"+e.tag+">"),e.result!==null&&b.kind!==e.kind&&Ve(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+b.kind+'", not "'+e.kind+'"'),b.resolve(e.result,e.tag)?(e.result=b.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ve(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||p}function G$(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&&!Un(s);)s=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&Ve(e,"directive name must not be less than one character in length");s!==0;){for(;ao(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!jr(s));break}if(jr(s))break;for(n=e.position;s!==0&&!Un(s);)s=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}s!==0&&Ld(e),Ei.call(l0,r)?l0[r](e,r,i):Tu(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&&Ve(e,"directives end mark is expected"),ps(e,e.lineIndent-1,wu,!1,!0),Qt(e,!0,-1),e.checkLineBreaks&&P$.test(e.input.slice(t,e.position))&&Tu(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&ku(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Qt(e,!0,-1));return}if(e.position<e.length-1)Ve(e,"end of the stream or a document separator is expected");else return}function f0(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,t),r=e.indexOf("\0");for(r!==-1&&(n.position=r,Ve(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;)G$(n);return n.documents}function Y$(e,t,n){t!==null&&typeof t=="object"&&typeof n>"u"&&(n=t,t=null);var r=f0(e,n);if(typeof t!="function")return r;for(var i=0,o=r.length;i<o;i+=1)t(r[i])}function X$(e,t){var n=f0(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new Pn("expected a single document in the stream, but found more")}}var J$=Y$,Z$=X$,d0={loadAll:J$,load:Z$},p0=Object.prototype.toString,h0=Object.prototype.hasOwnProperty,Pd=65279,Q$=9,xa=10,eB=13,tB=32,nB=33,rB=34,Dd=35,iB=37,oB=38,sB=39,aB=42,g0=44,lB=45,xu=58,uB=61,cB=62,fB=63,dB=64,m0=91,v0=93,pB=96,y0=123,hB=124,b0=125,An={};An[0]="\\0",An[7]="\\a",An[8]="\\b",An[9]="\\t",An[10]="\\n",An[11]="\\v",An[12]="\\f",An[13]="\\r",An[27]="\\e",An[34]='\\"',An[92]="\\\\",An[133]="\\N",An[160]="\\_",An[8232]="\\L",An[8233]="\\P";var gB=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mB=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function vB(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&&h0.call(c.styleAliases,l)&&(l=c.styleAliases[l]),n[s]=l;return n}function yB(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 Pn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+n+sn.repeat("0",r-t.length)+t}var bB=1,Sa=2;function CB(e){this.schema=e.schema||Ed,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=sn.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=vB(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==='"'?Sa:bB,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 C0(e,t){for(var n=sn.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 Rd(e,t){return`
|
||
`+sn.repeat(" ",e.indent*t)}function _B(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 Su(e){return e===tB||e===Q$}function Aa(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Pd||65536<=e&&e<=1114111}function _0(e){return Aa(e)&&e!==Pd&&e!==eB&&e!==xa}function w0(e,t,n){var r=_0(e),i=r&&!Su(e);return(n?r:r&&e!==g0&&e!==m0&&e!==v0&&e!==y0&&e!==b0)&&e!==Dd&&!(t===xu&&!i)||_0(t)&&!Su(t)&&e===Dd||t===xu&&i}function wB(e){return Aa(e)&&e!==Pd&&!Su(e)&&e!==lB&&e!==fB&&e!==xu&&e!==g0&&e!==m0&&e!==v0&&e!==y0&&e!==b0&&e!==Dd&&e!==oB&&e!==aB&&e!==nB&&e!==hB&&e!==uB&&e!==cB&&e!==sB&&e!==rB&&e!==iB&&e!==dB&&e!==pB}function TB(e){return!Su(e)&&e!==xu}function Ea(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 k0=1,Nd=2,x0=3,S0=4,hs=5;function kB(e,t,n,r,i,o,s,l){var c,d=0,p=null,y=!1,m=!1,C=r!==-1,b=-1,k=wB(Ea(e,0))&&TB(Ea(e,e.length-1));if(t||s)for(c=0;c<e.length;d>=65536?c+=2:c++){if(d=Ea(e,c),!Aa(d))return hs;k=k&&w0(d,p,l),p=d}else{for(c=0;c<e.length;d>=65536?c+=2:c++){if(d=Ea(e,c),d===xa)y=!0,C&&(m=m||c-b-1>r&&e[b+1]!==" ",b=c);else if(!Aa(d))return hs;k=k&&w0(d,p,l),p=d}m=m||C&&c-b-1>r&&e[b+1]!==" "}return!y&&!m?k&&!s&&!i(e)?k0:o===Sa?hs:Nd:n>9&&T0(e)?hs:s?o===Sa?hs:Nd:m?S0:x0}function xB(e,t,n,r,i){e.dump=function(){if(t.length===0)return e.quotingType===Sa?'""':"''";if(!e.noCompatMode&&(gB.indexOf(t)!==-1||mB.test(t)))return e.quotingType===Sa?'"'+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 _B(e,d)}switch(kB(t,l,e.indent,s,c,e.quotingType,e.forceQuotes&&!r,i)){case k0:return t;case Nd:return"'"+t.replace(/'/g,"''")+"'";case x0:return"|"+A0(t,e.indent)+E0(C0(t,o));case S0:return">"+A0(t,e.indent)+E0(C0(SB(t,s),o));case hs:return'"'+AB(t)+'"';default:throw new Pn("impossible error: invalid scalar style")}}()}function A0(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 E0(e){return e[e.length-1]===`
|
||
`?e.slice(0,-1):e}function SB(e,t){for(var n=/(\n+)([^\n]*)/g,r=function(){var d=e.indexOf(`
|
||
`);return d=d!==-1?d:e.length,n.lastIndex=d,O0(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!==""?`
|
||
`:"")+O0(c,t),i=o}return r}function O0(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 AB(e){for(var t="",n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=Ea(e,i),r=An[n],!r&&Aa(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||yB(n);return t}function EB(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)),(oi(e,t,l,!1,!1)||typeof l>"u"&&oi(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)),(oi(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&oi(e,t+1,null,!0,!0,!1,!0))&&((!r||i!=="")&&(i+=Rd(e,t)),e.dump&&xa===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=o,e.dump=i||"[]"}function OB(e,t,n){var r="",i=e.tag,o=Object.keys(n),s,l,c,d,p;for(s=0,l=o.length;s<l;s+=1)p="",r!==""&&(p+=", "),e.condenseFlow&&(p+='"'),c=o[s],d=n[c],e.replacer&&(d=e.replacer.call(n,c,d)),oi(e,t,c,!1,!1)&&(e.dump.length>1024&&(p+="? "),p+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),oi(e,t,d,!1,!1)&&(p+=e.dump,r+=p));e.tag=i,e.dump="{"+r+"}"}function LB(e,t,n,r){var i="",o=e.tag,s=Object.keys(n),l,c,d,p,y,m;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Pn("sortKeys must be a boolean or a function");for(l=0,c=s.length;l<c;l+=1)m="",(!r||i!=="")&&(m+=Rd(e,t)),d=s[l],p=n[d],e.replacer&&(p=e.replacer.call(n,d,p)),oi(e,t+1,d,!0,!0,!0)&&(y=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,y&&(e.dump&&xa===e.dump.charCodeAt(0)?m+="?":m+="? "),m+=e.dump,y&&(m+=Rd(e,t)),oi(e,t+1,p,!0,y)&&(e.dump&&xa===e.dump.charCodeAt(0)?m+=":":m+=": ",m+=e.dump,i+=m));e.tag=o,e.dump=i||"{}"}function I0(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,p0.call(l.represent)==="[object Function]")r=l.represent(t,c);else if(h0.call(l.represent,c))r=l.represent[c](t,c);else throw new Pn("!<"+l.tag+'> tag resolver accepts not "'+c+'" style');e.dump=r}return!0}return!1}function oi(e,t,n,r,i,o,s){e.tag=null,e.dump=n,I0(e,n,!1)||I0(e,n,!0);var l=p0.call(e.dump),c=r,d;r&&(r=e.flowLevel<0||e.flowLevel>t);var p=l==="[object Object]"||l==="[object Array]",y,m;if(p&&(y=e.duplicates.indexOf(n),m=y!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(i=!1),m&&e.usedDuplicates[y])e.dump="*ref_"+y;else{if(p&&m&&!e.usedDuplicates[y]&&(e.usedDuplicates[y]=!0),l==="[object Object]")r&&Object.keys(e.dump).length!==0?(LB(e,t,e.dump,i),m&&(e.dump="&ref_"+y+e.dump)):(OB(e,t,e.dump),m&&(e.dump="&ref_"+y+" "+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),m&&(e.dump="&ref_"+y+e.dump)):(EB(e,t,e.dump),m&&(e.dump="&ref_"+y+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&xB(e,e.dump,t,o,c);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Pn("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 IB(e,t){var n=[],r=[],i,o;for(Md(e,n,r),i=0,o=r.length;i<o;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=new Array(o)}function Md(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)Md(e[i],t,n);else for(r=Object.keys(e),i=0,o=r.length;i<o;i+=1)Md(e[r[i]],t,n)}function PB(e,t){t=t||{};var n=new CB(t);n.noRefs||IB(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},"",r)),oi(n,0,r,!0,!0)?n.dump+`
|
||
`:""}var DB=PB,RB={dump:DB};function Fd(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 NB=yn,MB=Dy,FB=Fy,$B=Uy,BB=Wy,HB=Ed,jB=d0.load,UB=d0.loadAll,WB=RB.dump,KB=Pn,VB={binary:Gy,float:jy,map:My,null:$y,pairs:Xy,set:Jy,timestamp:qy,bool:By,int:Hy,merge:zy,omap:Yy,seq:Ny,str:Ry},qB=Fd("safeLoad","load"),zB=Fd("safeLoadAll","loadAll"),GB=Fd("safeDump","dump"),YB={Type:NB,Schema:MB,FAILSAFE_SCHEMA:FB,JSON_SCHEMA:$B,CORE_SCHEMA:BB,DEFAULT_SCHEMA:HB,load:jB,loadAll:UB,dump:WB,YAMLException:KB,types:VB,safeLoad:qB,safeLoadAll:zB,safeDump:GB};const XB={name:"Hotkey",components:{IconSvg:Bn},mixins:[Qn],props:{defaultHotkey:{type:Object,default:()=>({})}},data(){return{isOpen:!1,hotkeys:[{name:"click",title:"left_click_keyword_tag",value:"",options:[{name:"",title:"none"},{name:"edit",title:"edit_keyword"},{name:"disable",title:"disable_enable_keyword"},{name:"extend",title:"show_keyword_extend_panel"}]},{name:"rightClick",title:"right_click_keyword_tag",value:"",options:[{name:"",title:"none"},{name:"edit",title:"edit_keyword"},{name:"disable",title:"disable_enable_keyword"},{name:"extend",title:"show_keyword_extend_panel"}]},{name:"dblClick",title:"dblclick_keyword_tag",value:"",options:[{name:"",title:"none"},{name:"edit",title:"edit_keyword"},{name:"disable",title:"disable_enable_keyword"},{name:"extend",title:"show_keyword_extend_panel"}]},{name:"hover",title:"hover_keyword_tag",value:"",options:[{name:"",title:"none"},{name:"extend",title:"show_keyword_extend_panel"}]}]}},emits:["update:hotkey"],computed:{},mounted(){},methods:{open(){this.isOpen=!0,this.hotkeys.forEach(e=>{this.defaultHotkey[e.name]?e.value=this.defaultHotkey[e.name]:e.value=""})},close(){this.isOpen=!1},onCloseClick(){this.close()},onSaveClick(){let e={};this.hotkeys.forEach(t=>{e[t.name]=t.value}),this.gradioAPI.setData("hotkey",e),this.close(),this.$emit("update:hotkey",e)}}},JB={class:"hotkey-list"},ZB={class:"hotkey-title"},QB=["onUpdate:modelValue"],eH=["value"],tH={class:"setting-btns"};function nH(e,t,n,r,i,o){return O(),Ue(fn,{name:"fadeDown"},{default:tn(()=>[i.isOpen?(O(),N("div",{key:0,class:"physton-prompt-hotkey",onClick:t[4]||(t[4]=()=>{})},[T("div",{class:"hotkey-main",onClick:t[3]||(t[3]=at(()=>{},["stop"]))},[T("div",{class:"hotkey-body",onClick:t[2]||(t[2]=at(()=>{},["stop"]))},[T("div",JB,[(O(!0),N(Fe,null,ct(i.hotkeys,s=>(O(),N("div",{class:"hotkey-item",key:s.name},[T("div",ZB,re(e.getLang(s.title)),1),he(T("select",{class:"hotkey-select","onUpdate:modelValue":l=>s.value=l},[(O(!0),N(Fe,null,ct(s.options,l=>(O(),N("option",{key:l.name,value:l.name},re(e.getLang(l.title)),9,eH))),128))],8,QB),[[Po,s.value]])]))),128))]),T("div",tH,[T("div",{class:"hotkey-save hover-scale-120",onClick:t[0]||(t[0]=(...s)=>o.onSaveClick&&o.onSaveClick(...s))},re(e.getLang("save")),1),T("div",{class:"hotkey-close hover-scale-120",onClick:t[1]||(t[1]=(...s)=>o.onCloseClick&&o.onCloseClick(...s))},re(e.getLang("close")),1)])])])])):xe("",!0)]),_:1})}const rH=vn(XB,[["render",nH]]),iH="lora",oH="lyco",sH="embedding",aH={name:"ExtraNetworksPopup",components:{IconSvg:Bn},mixins:[Qn],props:{extraNetworks:{type:Array,default:()=>[]}},data(){return{isShow:!1,e:null,name:"",useCallback:null,type:"",data:{},style:{},previewStyle:{},mouseIn:!1,eMouseIn:!1}},computed:{},mounted(){},methods:{show(e,t,n){this.mouseIn=!1,this.eMouseIn=!0,this.e=e,this.name=t,this.useCallback=n,this.type="",this.data={},this.style={},this.previewStyle={};let r;t=t.toLowerCase();for(let i of this.extraNetworks)if(i.name==="textual inversion"){for(let o of i.items)if(o.name.toLowerCase()===t){this.type=sH,r=o;break}}else if(i.name==="lora"||i.name==="lycoris"){for(let o of i.items)if(o.name.toLowerCase()===t||o.output_name&&o.output_name.toLowerCase()===t){this.type=i.name==="lora"?iH:oH,r=o;break}}if(!this.type)return this.isShow=!1;this.isShow=!0,this.data.name=r.civitai_info&&r.civitai_info.model&&r.civitai_info.model.name?r.civitai_info.model.name:r.name,this.data.output_name=r.output_name&&r.output_name!==this.data.name?r.output_name:"",this.data.basename=r.basename||"",this.data.dirname=r.dirname||"",this.data.description=r.civitai_info&&r.civitai_info.description?r.civitai_info.description:r.description||"",this.data.description=this.data.description.replace(/<[^>]+>/g,""),this.data.trainedWords=r.civitai_info&&r.civitai_info.trainedWords?r.civitai_info.trainedWords:[],this.data.preview=r.preview||(r.civitai_info&&r.civitai_info.images&&r.civitai_info.images.length?r.civitai_info.images[0]:""),this.data.modelId=r.civitai_info&&r.civitai_info.modelId?r.civitai_info.modelId:"",this.$nextTick(()=>{const i=e.getBoundingClientRect();this.style.top=i.top+e.offsetHeight+4+"px",this.style.left=i.left+"px",this.data.preview&&(this.previewStyle={width:"auto",height:this.$refs.extraNetworks.offsetHeight+"px"}),this.$nextTick(()=>{this.onPreviewLoad()})})},onPreviewLoad(){const e=this.$refs.extraNetworks.getBoundingClientRect();e.right>window.innerWidth&&(this.style.left=window.innerWidth-e.width-10+"px")},_hide(){this.isShow&&(this.hideTimer&&clearTimeout(this.hideTimer),this.hideTimer=setTimeout(()=>{this.hideTimer=null,!this.mouseIn&&!this.eMouseIn&&(this.isShow=!1)},10))},hide(){this.eMouseIn=!1,this._hide()},onMouseEnter(){this.mouseIn=!0},onMouseMove(){this.mouseIn=!0},onMouseLeave(){this.mouseIn=!1,this._hide()},copy(e){this.$copyText(e).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},onOpenCivitaiClick(){if(!this.data.modelId)return;let e=Xs.civitaiUrl+"/models/"+this.data.modelId;window.open(e)},onUseKeywordsClick(){!this.data.trainedWords||!this.data.trainedWords.length||this.useCallback&&typeof this.useCallback=="function"&&(this.useCallback(this.data.trainedWords),this.$toastr.success(this.getLang("success")))}}},lH={class:"popup-main"},uH=["src"],cH={class:"info-raws"},fH={class:"info-raw"},dH={class:"raw-name"},pH={key:0,class:"info-raw"},hH={class:"raw-name"},gH={key:1,class:"info-raw"},mH={class:"raw-name"},vH={key:2,class:"info-raw"},yH={class:"raw-name"},bH={key:3,class:"info-raw"},CH={class:"raw-name"},_H={key:4,class:"info-raw"},wH={class:"raw-name"},TH={class:"info-btns"};function kH(e,t,n,r,i,o){const s=Oo("tooltip");return he((O(),N("div",{class:"physton-prompt-extra-networks-popup",ref:"extraNetworks",onMouseenter:t[9]||(t[9]=at((...l)=>o.onMouseEnter&&o.onMouseEnter(...l),["stop"])),onMousemove:t[10]||(t[10]=at((...l)=>o.onMouseMove&&o.onMouseMove(...l),["stop"])),onMouseleave:t[11]||(t[11]=at((...l)=>o.onMouseLeave&&o.onMouseLeave(...l),["stop"])),style:mt(i.style)},[T("div",lH,[i.data.preview?(O(),N("img",{key:0,class:"info-preview",src:i.data.preview,style:mt(i.previewStyle),onLoad:t[0]||(t[0]=(...l)=>o.onPreviewLoad&&o.onPreviewLoad(...l))},null,44,uH)):xe("",!0),T("div",cH,[T("div",fH,[T("div",dH,re(e.getLang("model_name")),1),T("div",{class:"raw-value",onClick:t[1]||(t[1]=l=>o.copy(i.data.name))},re(i.data.name),1)]),i.data.output_name?(O(),N("div",pH,[T("div",hH,re(e.getLang("output_name")),1),T("div",{class:"raw-value",onClick:t[2]||(t[2]=l=>o.copy(i.data.output_name))},re(i.data.output_name),1)])):xe("",!0),i.data.basename?(O(),N("div",gH,[T("div",mH,re(e.getLang("filename")),1),T("div",{class:"raw-value",onClick:t[3]||(t[3]=l=>o.copy(i.data.basename))},re(i.data.basename),1)])):xe("",!0),i.data.dirname?(O(),N("div",vH,[T("div",yH,re(e.getLang("filepath")),1),T("div",{class:"raw-value",onClick:t[4]||(t[4]=l=>o.copy(i.data.dirname))},re(i.data.dirname),1)])):xe("",!0),i.data.trainedWords&&i.data.trainedWords.length?(O(),N("div",bH,[T("div",CH,re(e.getLang("trained_words")),1),T("div",{class:"raw-value",onClick:t[5]||(t[5]=l=>o.copy(i.data.trainedWords.join(", ")))},re(i.data.trainedWords.join(", ")),1)])):xe("",!0),i.data.description?(O(),N("div",_H,[T("div",wH,re(e.getLang("description")),1),he((O(),N("div",{class:"raw-value description",onClick:t[6]||(t[6]=l=>o.copy(i.data.description))},[Vt(re(i.data.description),1)])),[[s,i.data.description]])])):xe("",!0),T("div",TH,[i.data.modelId?(O(),N("div",{key:0,class:"info-btn hover-scale-120",onClick:t[7]||(t[7]=(...l)=>o.onOpenCivitaiClick&&o.onOpenCivitaiClick(...l))},re(e.getLang("open_civitai")),1)):xe("",!0),i.data.trainedWords&&i.data.trainedWords.length?(O(),N("div",{key:1,class:"info-btn hover-scale-120",onClick:t[8]||(t[8]=(...l)=>o.onUseKeywordsClick&&o.onUseKeywordsClick(...l))},re(e.getLang("use_keywords")),1)):xe("",!0)])])])],36)),[[Ot,i.isShow]])}const xH={name:"App",components:{Hotkey:rH,About:OF,ChatgptPrompt:fF,PackagesState:_M,PromptFormat:RN,Blacklist:cM,ExtensionCss:mN,IconSvg:Bn,History:aN,Favorite:LR,SelectLanguage:eR,TranslateSetting:XD,PhystonPrompt:$P,ExtraNetworksPopup:vn(aH,[["render",kH]])},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:{},cancelBlacklistConfirm:!1,hotkey:{click:"edit",dblClick:"disable",rightClick:"",hover:"extend"}}},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("animate.min.css","physton-prompt-animate",!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(()=>{var i,o,s;let n=!1,r=!1;if(localStorage.getItem("SD-LOBE-SETTING")||localStorage.getItem("SD-KITCHEN-SETTING")||(s=(o=(i=document.querySelector('head > meta[name="application-name"]'))==null?void 0:i.content)==null?void 0:o.includes)!=null&&s.call(o,"Lobe")){let l=document.getElementsByTagName("link");for(let c=0;c<l.length;c++){let d=l[c];if(d.href.includes("lobehub/")){n=!0;break}else d.href.includes("kitchen-theme")&&(r=!0)}}n?pe.gradioApp().classList.add("physton-prompt-lobehub"):r&&pe.gradioApp().classList.add("physton-prompt-kitchen")},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,Xs.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","cancelBlacklistConfirm","hotkey"];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=this._handleBlacklist(t.blacklist)),t.cancelBlacklistConfirm!==null&&(this.cancelBlacklistConfirm=t.cancelBlacklistConfirm),t.hotkey!==null&&(this.hotkey=t.hotkey),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=YB.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)},onHotkeyClick(e){this.$refs.hotkey.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},_handleBlacklist(e){var t,n,r,i,o,s;return e={...e},e.prompt=(t=e.prompt)==null?void 0:t.slice().map(l=>l.toLowerCase()),e.negative_prompt=(n=e.negative_prompt)==null?void 0:n.slice().map(l=>l.toLowerCase()),e.lora=(r=e.lora)==null?void 0:r.slice().map(l=>l.toLowerCase()),e.lycoris=(i=e.lycoris)==null?void 0:i.slice().map(l=>l.toLowerCase()),e.embedding=(o=e.embedding)==null?void 0:o.slice().map(l=>l.toLowerCase()),e.translate=(s=e.translate)==null?void 0:s.slice().map(l=>l.toLowerCase()),e},onUpdateBlacklist(e,t){this.blacklist=this._handleBlacklist(e),typeof t=="boolean"&&(this.cancelBlacklistConfirm=t)},onUpdateHotkey(e){this.hotkey=e},onShowExtraNetworks(e,t,n){this.$refs.extraNetworksPopup.show(e,t,n)},onHideExtraNetworks(){this.$refs.extraNetworksPopup.hide()}}},SH={class:"paste-popup-title"},AH={class:"paste-popup-body"},EH=["placeholder"],OH={key:1,class:"paste-submit"};function LH(e,t,n,r,i,o){const s=tt("physton-prompt"),l=tt("translate-setting"),c=tt("select-language"),d=tt("prompt-format"),p=tt("blacklist"),y=tt("hotkey"),m=tt("history"),C=tt("favorite"),b=tt("extension-css"),k=tt("packages-state"),L=tt("chatgpt-prompt"),P=tt("about"),j=tt("extra-networks-popup"),G=tt("icon-svg");return O(),N("div",null,[(O(!0),N(Fe,null,ct(i.prompts,x=>(O(),N(Fe,{key:x.name},[x.$textarea?(O(),Ue(s,{key:0,id:x.id,ref_for:!0,ref:x.id,name:x.name,neg:x.neg,textarea:x.$textarea,steps:x.$steps,"language-code":i.languageCode,"onUpdate:languageCode":t[0]||(t[0]=X=>i.languageCode=X),"translate-apis":i.translateApis,languages:i.languages,"history-key":x.historyKey,"onClick:showHistory":X=>o.onShowHistory(x.id,X),"favorite-key":x.favoriteKey,onRefreshFavorites:o.onRefreshFavorites,"onClick:showFavorite":X=>o.onShowFavorite(x.id,X),"can-one-translate":i.canOneTranslate,"onUpdate:canOneTranslate":t[1]||(t[1]=X=>i.canOneTranslate=X),"auto-translate":i.autoTranslate,"onUpdate:autoTranslate":t[2]||(t[2]=X=>i.autoTranslate=X),"auto-translate-to-english":i.autoTranslateToEnglish,"onUpdate:autoTranslateToEnglish":t[3]||(t[3]=X=>i.autoTranslateToEnglish=X),"auto-translate-to-local":i.autoTranslateToLocal,"onUpdate:autoTranslateToLocal":t[4]||(t[4]=X=>i.autoTranslateToLocal=X),"auto-remove-space":i.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[5]||(t[5]=X=>i.autoRemoveSpace=X),"auto-remove-last-comma":i.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[6]||(t[6]=X=>i.autoRemoveLastComma=X),"auto-keep-weight-zero":i.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[7]||(t[7]=X=>i.autoKeepWeightZero=X),"auto-keep-weight-one":i.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[8]||(t[8]=X=>i.autoKeepWeightOne=X),"auto-break-before-wrap":i.autoBreakBeforeWrap,"onUpdate:autoBreakBeforeWrap":t[9]||(t[9]=X=>i.autoBreakBeforeWrap=X),"auto-break-after-wrap":i.autoBreakAfterWrap,"onUpdate:autoBreakAfterWrap":t[10]||(t[10]=X=>i.autoBreakAfterWrap=X),"hide-default-input":x.hideDefaultInput,"onUpdate:hideDefaultInput":X=>o.onUpdateHideDefaultInput(x.id,X),"hide-panel":x.hidePanel,"onUpdate:hidePanel":X=>o.onUpdateHidePanel(x.id,X),"enable-tooltip":i.enableTooltip,"onUpdate:enableTooltip":t[11]||(t[11]=X=>i.enableTooltip=X),"translate-api":i.translateApi,"onUpdate:translateApi":t[12]||(t[12]=X=>i.translateApi=X),"translate-api-config":i.translateApiConfig,"onClick:translateApi":o.onTranslateApiClick,"onClick:promptFormat":o.onPromptFormatClick,"onClick:blacklist":o.onBlacklistClick,"onClick:hotkey":o.onHotkeyClick,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[13]||(t[13]=X=>i.tagCompleteFile=X),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[14]||(t[14]=X=>i.onlyCsvOnAuto=X),"group-tags-translate":i.groupTagsTranslate,"onUpdate:groupTagsTranslate":t[15]||(t[15]=X=>i.groupTagsTranslate=X),"onClick:selectLanguage":o.onSelectLanguageClick,"onClick:selectTheme":o.onSelectThemeClick,"onClick:showChatgpt":X=>o.onShowChatgpt(x.id,X),"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":x.hideGroupTags,"group-tags-color":i.groupTagsColor,"onUpdate:groupTagsColor":t[16]||(t[16]=X=>i.groupTagsColor=X),"group-tags-color-key-cache":i.groupTagsColorKeyCache,"onUpdate:hideGroupTags":X=>o.onUpdateHideGroupTags(x.id,X),"group-tags-translate-cache":i.groupTagsTranslateCache,blacklist:i.blacklist,"cancel-blacklist-confirm":i.cancelBlacklistConfirm,"onUpdate:blacklist":o.onUpdateBlacklist,hotkey:i.hotkey,onShowExtraNetworks:o.onShowExtraNetworks,onHideExtraNetworks:o.onHideExtraNetworks},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","onClick:hotkey","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","cancel-blacklist-confirm","onUpdate:blacklist","hotkey","onShowExtraNetworks","onHideExtraNetworks"])):xe("",!0)],64))),128)),be(l,{ref:"translateSetting","language-code":i.languageCode,"onUpdate:languageCode":t[17]||(t[17]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"onForceUpdate:translateApi":o.updateTranslateApiConfig,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[18]||(t[18]=x=>i.tagCompleteFile=x),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[19]||(t[19]=x=>i.onlyCsvOnAuto=x),"group-tags-translate":i.groupTagsTranslate,"onUpdate:groupTagsTranslate":t[20]||(t[20]=x=>i.groupTagsTranslate=x),"translate-api":i.translateApi,"onUpdate:translateApi":t[21]||(t[21]=x=>i.translateApi=x)},null,8,["language-code","translate-apis","languages","onForceUpdate:translateApi","tag-complete-file","only-csv-on-auto","group-tags-translate","translate-api"]),be(c,{ref:"selectLanguage","language-code":i.languageCode,"onUpdate:languageCode":t[22]||(t[22]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"translate-api":i.translateApi,"onUpdate:translateApi":t[23]||(t[23]=x=>i.translateApi=x),"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[24]||(t[24]=x=>i.tagCompleteFile=x),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[25]||(t[25]=x=>i.onlyCsvOnAuto=x)},null,8,["language-code","translate-apis","languages","translate-api","tag-complete-file","only-csv-on-auto"]),be(d,{ref:"promptFormat","language-code":i.languageCode,"onUpdate:languageCode":t[26]||(t[26]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"auto-remove-space":i.autoRemoveSpace,"onUpdate:autoRemoveSpace":t[27]||(t[27]=x=>i.autoRemoveSpace=x),"auto-remove-last-comma":i.autoRemoveLastComma,"onUpdate:autoRemoveLastComma":t[28]||(t[28]=x=>i.autoRemoveLastComma=x),"auto-keep-weight-zero":i.autoKeepWeightZero,"onUpdate:autoKeepWeightZero":t[29]||(t[29]=x=>i.autoKeepWeightZero=x),"auto-keep-weight-one":i.autoKeepWeightOne,"onUpdate:autoKeepWeightOne":t[30]||(t[30]=x=>i.autoKeepWeightOne=x),"auto-break-before-wrap":i.autoBreakBeforeWrap,"onUpdate:autoBreakBeforeWrap":t[31]||(t[31]=x=>i.autoBreakBeforeWrap=x),"auto-break-after-wrap":i.autoBreakAfterWrap,"onUpdate:autoBreakAfterWrap":t[32]||(t[32]=x=>i.autoBreakAfterWrap=x)},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"]),be(p,{ref:"blacklist","language-code":i.languageCode,"onUpdate:languageCode":t[33]||(t[33]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"onUpdate:blacklist":o.onUpdateBlacklist},null,8,["language-code","translate-apis","languages","onUpdate:blacklist"]),be(y,{ref:"hotkey","language-code":i.languageCode,"onUpdate:languageCode":t[34]||(t[34]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"default-hotkey":i.hotkey,"onUpdate:hotkey":o.onUpdateHotkey},null,8,["language-code","translate-apis","languages","default-hotkey","onUpdate:hotkey"]),be(m,{ref:"history","language-code":i.languageCode,"onUpdate:languageCode":t[35]||(t[35]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[36]||(t[36]=x=>i.tagCompleteFile=x),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[37]||(t[37]=x=>i.onlyCsvOnAuto=x),onRefreshFavorites:o.onRefreshFavorites,onUse:o.onUseHistory},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onRefreshFavorites","onUse"]),be(C,{ref:"favorite","language-code":i.languageCode,"onUpdate:languageCode":t[38]||(t[38]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"tag-complete-file":i.tagCompleteFile,"onUpdate:tagCompleteFile":t[39]||(t[39]=x=>i.tagCompleteFile=x),"only-csv-on-auto":i.onlyCsvOnAuto,"onUpdate:onlyCsvOnAuto":t[40]||(t[40]=x=>i.onlyCsvOnAuto=x),onUse:o.onUseFavorite},null,8,["language-code","translate-apis","languages","tag-complete-file","only-csv-on-auto","onUse"]),be(b,{ref:"extensionCss","language-code":i.languageCode,"onUpdate:languageCode":t[41]||(t[41]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages},null,8,["language-code","translate-apis","languages"]),be(k,{ref:"packagesState","language-code":i.languageCode,"onUpdate:languageCode":t[42]||(t[42]=x=>i.languageCode=x),"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"]),be(L,{ref:"chatgptPrompt","language-code":i.languageCode,"onUpdate:languageCode":t[43]||(t[43]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,onUse:o.onUseChatgpt},null,8,["language-code","translate-apis","languages","onUse"]),be(P,{ref:"about","language-code":i.languageCode,"onUpdate:languageCode":t[44]||(t[44]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages},null,8,["language-code","translate-apis","languages"]),be(j,{ref:"extraNetworksPopup","language-code":i.languageCode,"onUpdate:languageCode":t[45]||(t[45]=x=>i.languageCode=x),"translate-apis":i.translateApis,languages:i.languages,"extra-networks":i.extraNetworks},null,8,["language-code","translate-apis","languages","extra-networks"]),i.showPastePopup?(O(),N("div",{key:0,class:"physton-paste-popup",onClick:t[50]||(t[50]=(...x)=>o.closePastePopup&&o.closePastePopup(...x))},[T("div",{class:"paste-popup-main",onClick:t[49]||(t[49]=at(()=>{},["stop"]))},[T("div",{class:"paste-popup-close",onClick:t[46]||(t[46]=(...x)=>o.closePastePopup&&o.closePastePopup(...x))},[be(G,{name:"close"})]),T("div",SH,re(i.pasteTitle),1),T("div",AH,[he(T("textarea",{class:"paste-content","onUpdate:modelValue":t[47]||(t[47]=x=>i.pasteContent=x),placeholder:o.getLang("please_enter_the_content_here")},null,8,EH),[[Gn,i.pasteContent]]),i.pasteLoading?(O(),N("div",OH,[be(G,{name:"loading"})])):(O(),N("div",{key:0,class:"paste-submit",onClick:t[48]||(t[48]=(...x)=>o.onClickPasteSubmit&&o.onClickPasteSubmit(...x))},"Submit"))])])])):xe("",!0)])}const IH=vn(xH,[["render",LH]]);var P0={exports:{}},$d={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 D0;function PH(){return D0||(D0=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:of,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={},p=d.toString,y=d.hasOwnProperty,m=y.toString,C=m.call(Object),b={},k=function(f){return typeof f=="function"&&typeof f.nodeType!="number"&&typeof f.item!="function"},L=function(f){return f!=null&&f===f.window},P=t.document,j={type:!0,src:!0,nonce:!0,noModule:!0};function G(u,f,h){h=h||P;var v,_,w=h.createElement("script");if(w.text=u,f)for(v in j)_=f[v]||f.getAttribute&&f.getAttribute(v),_&&w.setAttribute(v,_);h.head.appendChild(w).parentNode.removeChild(w)}function x(u){return u==null?u+"":typeof u=="object"||typeof u=="function"?d[p.call(u)]||"object":typeof u}var X="3.6.4",g=function(u,f){return new g.fn.init(u,f)};g.fn=g.prototype={jquery:X,constructor:g,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=g.merge(this.constructor(),u);return f.prevObject=this,f},each:function(u){return g.each(this,u)},map:function(u){return this.pushStack(g.map(this,function(f,h){return u.call(f,h,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(g.grep(this,function(u,f){return(f+1)%2}))},odd:function(){return this.pushStack(g.grep(this,function(u,f){return f%2}))},eq:function(u){var f=this.length,h=+u+(u<0?f:0);return this.pushStack(h>=0&&h<f?[this[h]]:[])},end:function(){return this.prevObject||this.constructor()},push:l,sort:r.sort,splice:r.splice},g.extend=g.fn.extend=function(){var u,f,h,v,_,w,S=arguments[0]||{},B=1,M=arguments.length,q=!1;for(typeof S=="boolean"&&(q=S,S=arguments[B]||{},B++),typeof S!="object"&&!k(S)&&(S={}),B===M&&(S=this,B--);B<M;B++)if((u=arguments[B])!=null)for(f in u)v=u[f],!(f==="__proto__"||S===v)&&(q&&v&&(g.isPlainObject(v)||(_=Array.isArray(v)))?(h=S[f],_&&!Array.isArray(h)?w=[]:!_&&!g.isPlainObject(h)?w={}:w=h,_=!1,S[f]=g.extend(q,w,v)):v!==void 0&&(S[f]=v));return S},g.extend({expando:"jQuery"+(X+Math.random()).replace(/\D/g,""),isReady:!0,error:function(u){throw new Error(u)},noop:function(){},isPlainObject:function(u){var f,h;return!u||p.call(u)!=="[object Object]"?!1:(f=i(u),f?(h=y.call(f,"constructor")&&f.constructor,typeof h=="function"&&m.call(h)===C):!0)},isEmptyObject:function(u){var f;for(f in u)return!1;return!0},globalEval:function(u,f,h){G(u,{nonce:f&&f.nonce},h)},each:function(u,f){var h,v=0;if(le(u))for(h=u.length;v<h&&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 h=f||[];return u!=null&&(le(Object(u))?g.merge(h,typeof u=="string"?[u]:u):l.call(h,u)),h},inArray:function(u,f,h){return f==null?-1:c.call(f,u,h)},merge:function(u,f){for(var h=+f.length,v=0,_=u.length;v<h;v++)u[_++]=f[v];return u.length=_,u},grep:function(u,f,h){for(var v,_=[],w=0,S=u.length,B=!h;w<S;w++)v=!f(u[w],w),v!==B&&_.push(u[w]);return _},map:function(u,f,h){var v,_,w=0,S=[];if(le(u))for(v=u.length;w<v;w++)_=f(u[w],w,h),_!=null&&S.push(_);else for(w in u)_=f(u[w],w,h),_!=null&&S.push(_);return s(S)},guid:1,support:b}),typeof Symbol=="function"&&(g.fn[Symbol.iterator]=r[Symbol.iterator]),g.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(u,f){d["[object "+f+"]"]=f.toLowerCase()});function le(u){var f=!!u&&"length"in u&&u.length,h=x(u);return k(u)||L(u)?!1:h==="array"||f===0||typeof f=="number"&&f>0&&f-1 in u}var I=function(u){var f,h,v,_,w,S,B,M,q,ee,ve,Z,oe,Ke,dt,We,un,en,rr,Lt="sizzle"+1*new Date,ft=u.document,Vn=0,kt=0,Wt=zu(),ja=zu(),Ku=zu(),ir=zu(),fo=function(E,F){return E===F&&(ve=!0),0},po={}.hasOwnProperty,qn=[],Ii=qn.pop,Cr=qn.push,Pi=qn.push,Jb=qn.slice,ho=function(E,F){for(var U=0,ae=E.length;U<ae;U++)if(E[U]===F)return U;return-1},vp="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",At="[\\x20\\t\\r\\n\\f]",go="(?:\\\\[\\da-fA-F]{1,6}"+At+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",Zb="\\["+At+"*("+go+")(?:"+At+"*([*^$|!~]?=)"+At+`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(`+go+"))|)"+At+"*\\]",yp=":("+go+`)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|`+Zb+")*)|.*)\\)|)",r5=new RegExp(At+"+","g"),Vu=new RegExp("^"+At+"+|((?:^|[^\\\\])(?:\\\\.)*)"+At+"+$","g"),i5=new RegExp("^"+At+"*,"+At+"*"),Qb=new RegExp("^"+At+"*([>+~]|"+At+")"+At+"*"),o5=new RegExp(At+"|>"),s5=new RegExp(yp),a5=new RegExp("^"+go+"$"),qu={ID:new RegExp("^#("+go+")"),CLASS:new RegExp("^\\.("+go+")"),TAG:new RegExp("^("+go+"|[*])"),ATTR:new RegExp("^"+Zb),PSEUDO:new RegExp("^"+yp),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("^(?:"+vp+")$","i"),needsContext:new RegExp("^"+At+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+At+"*((?:-\\d)?\\d*)"+At+"*\\)|)(?=[^-]|$)","i")},l5=/HTML$/i,u5=/^(?:input|select|textarea|button)$/i,c5=/^h\d$/i,Ua=/^[^{]+\{\s*\[native \w/,f5=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,bp=/[+~]/,ui=new RegExp("\\\\[\\da-fA-F]{1,6}"+At+"?|\\\\([^\\r\\n\\f])","g"),ci=function(E,F){var U="0x"+E.slice(1)-65536;return F||(U<0?String.fromCharCode(U+65536):String.fromCharCode(U>>10|55296,U&1023|56320))},eC=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,tC=function(E,F){return F?E==="\0"?"<22>":E.slice(0,-1)+"\\"+E.charCodeAt(E.length-1).toString(16)+" ":"\\"+E},nC=function(){Z()},d5=Yu(function(E){return E.disabled===!0&&E.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{Pi.apply(qn=Jb.call(ft.childNodes),ft.childNodes),qn[ft.childNodes.length].nodeType}catch{Pi={apply:qn.length?function(F,U){Cr.apply(F,Jb.call(U))}:function(F,U){for(var ae=F.length,V=0;F[ae++]=U[V++];);F.length=ae-1}}}function Pt(E,F,U,ae){var V,fe,ye,Pe,Be,Xe,Ge,Qe=F&&F.ownerDocument,yt=F?F.nodeType:9;if(U=U||[],typeof E!="string"||!E||yt!==1&&yt!==9&&yt!==11)return U;if(!ae&&(Z(F),F=F||oe,dt)){if(yt!==11&&(Be=f5.exec(E)))if(V=Be[1]){if(yt===9)if(ye=F.getElementById(V)){if(ye.id===V)return U.push(ye),U}else return U;else if(Qe&&(ye=Qe.getElementById(V))&&rr(F,ye)&&ye.id===V)return U.push(ye),U}else{if(Be[2])return Pi.apply(U,F.getElementsByTagName(E)),U;if((V=Be[3])&&h.getElementsByClassName&&F.getElementsByClassName)return Pi.apply(U,F.getElementsByClassName(V)),U}if(h.qsa&&!ir[E+" "]&&(!We||!We.test(E))&&(yt!==1||F.nodeName.toLowerCase()!=="object")){if(Ge=E,Qe=F,yt===1&&(o5.test(E)||Qb.test(E))){for(Qe=bp.test(E)&&_p(F.parentNode)||F,(Qe!==F||!h.scope)&&((Pe=F.getAttribute("id"))?Pe=Pe.replace(eC,tC):F.setAttribute("id",Pe=Lt)),Xe=S(E),fe=Xe.length;fe--;)Xe[fe]=(Pe?"#"+Pe:":scope")+" "+Gu(Xe[fe]);Ge=Xe.join(",")}try{return Pi.apply(U,Qe.querySelectorAll(Ge)),U}catch{ir(E,!0)}finally{Pe===Lt&&F.removeAttribute("id")}}}return M(E.replace(Vu,"$1"),F,U,ae)}function zu(){var E=[];function F(U,ae){return E.push(U+" ")>v.cacheLength&&delete F[E.shift()],F[U+" "]=ae}return F}function Lr(E){return E[Lt]=!0,E}function _r(E){var F=oe.createElement("fieldset");try{return!!E(F)}catch{return!1}finally{F.parentNode&&F.parentNode.removeChild(F),F=null}}function Cp(E,F){for(var U=E.split("|"),ae=U.length;ae--;)v.attrHandle[U[ae]]=F}function rC(E,F){var U=F&&E,ae=U&&E.nodeType===1&&F.nodeType===1&&E.sourceIndex-F.sourceIndex;if(ae)return ae;if(U){for(;U=U.nextSibling;)if(U===F)return-1}return E?1:-1}function p5(E){return function(F){var U=F.nodeName.toLowerCase();return U==="input"&&F.type===E}}function h5(E){return function(F){var U=F.nodeName.toLowerCase();return(U==="input"||U==="button")&&F.type===E}}function iC(E){return function(F){return"form"in F?F.parentNode&&F.disabled===!1?"label"in F?"label"in F.parentNode?F.parentNode.disabled===E:F.disabled===E:F.isDisabled===E||F.isDisabled!==!E&&d5(F)===E:F.disabled===E:"label"in F?F.disabled===E:!1}}function mo(E){return Lr(function(F){return F=+F,Lr(function(U,ae){for(var V,fe=E([],U.length,F),ye=fe.length;ye--;)U[V=fe[ye]]&&(U[V]=!(ae[V]=U[V]))})})}function _p(E){return E&&typeof E.getElementsByTagName<"u"&&E}h=Pt.support={},w=Pt.isXML=function(E){var F=E&&E.namespaceURI,U=E&&(E.ownerDocument||E).documentElement;return!l5.test(F||U&&U.nodeName||"HTML")},Z=Pt.setDocument=function(E){var F,U,ae=E?E.ownerDocument||E:ft;return ae==oe||ae.nodeType!==9||!ae.documentElement||(oe=ae,Ke=oe.documentElement,dt=!w(oe),ft!=oe&&(U=oe.defaultView)&&U.top!==U&&(U.addEventListener?U.addEventListener("unload",nC,!1):U.attachEvent&&U.attachEvent("onunload",nC)),h.scope=_r(function(V){return Ke.appendChild(V).appendChild(oe.createElement("div")),typeof V.querySelectorAll<"u"&&!V.querySelectorAll(":scope fieldset div").length}),h.cssHas=_r(function(){try{return oe.querySelector(":has(*,:jqfake)"),!1}catch{return!0}}),h.attributes=_r(function(V){return V.className="i",!V.getAttribute("className")}),h.getElementsByTagName=_r(function(V){return V.appendChild(oe.createComment("")),!V.getElementsByTagName("*").length}),h.getElementsByClassName=Ua.test(oe.getElementsByClassName),h.getById=_r(function(V){return Ke.appendChild(V).id=Lt,!oe.getElementsByName||!oe.getElementsByName(Lt).length}),h.getById?(v.filter.ID=function(V){var fe=V.replace(ui,ci);return function(ye){return ye.getAttribute("id")===fe}},v.find.ID=function(V,fe){if(typeof fe.getElementById<"u"&&dt){var ye=fe.getElementById(V);return ye?[ye]:[]}}):(v.filter.ID=function(V){var fe=V.replace(ui,ci);return function(ye){var Pe=typeof ye.getAttributeNode<"u"&&ye.getAttributeNode("id");return Pe&&Pe.value===fe}},v.find.ID=function(V,fe){if(typeof fe.getElementById<"u"&&dt){var ye,Pe,Be,Xe=fe.getElementById(V);if(Xe){if(ye=Xe.getAttributeNode("id"),ye&&ye.value===V)return[Xe];for(Be=fe.getElementsByName(V),Pe=0;Xe=Be[Pe++];)if(ye=Xe.getAttributeNode("id"),ye&&ye.value===V)return[Xe]}return[]}}),v.find.TAG=h.getElementsByTagName?function(V,fe){if(typeof fe.getElementsByTagName<"u")return fe.getElementsByTagName(V);if(h.qsa)return fe.querySelectorAll(V)}:function(V,fe){var ye,Pe=[],Be=0,Xe=fe.getElementsByTagName(V);if(V==="*"){for(;ye=Xe[Be++];)ye.nodeType===1&&Pe.push(ye);return Pe}return Xe},v.find.CLASS=h.getElementsByClassName&&function(V,fe){if(typeof fe.getElementsByClassName<"u"&&dt)return fe.getElementsByClassName(V)},un=[],We=[],(h.qsa=Ua.test(oe.querySelectorAll))&&(_r(function(V){var fe;Ke.appendChild(V).innerHTML="<a id='"+Lt+"'></a><select id='"+Lt+"-\r\\' msallowcapture=''><option selected=''></option></select>",V.querySelectorAll("[msallowcapture^='']").length&&We.push("[*^$]="+At+`*(?:''|"")`),V.querySelectorAll("[selected]").length||We.push("\\["+At+"*(?:value|"+vp+")"),V.querySelectorAll("[id~="+Lt+"-]").length||We.push("~="),fe=oe.createElement("input"),fe.setAttribute("name",""),V.appendChild(fe),V.querySelectorAll("[name='']").length||We.push("\\["+At+"*name"+At+"*="+At+`*(?:''|"")`),V.querySelectorAll(":checked").length||We.push(":checked"),V.querySelectorAll("a#"+Lt+"+*").length||We.push(".#.+[+~]"),V.querySelectorAll("\\\f"),We.push("[\\r\\n\\f]")}),_r(function(V){V.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var fe=oe.createElement("input");fe.setAttribute("type","hidden"),V.appendChild(fe).setAttribute("name","D"),V.querySelectorAll("[name=d]").length&&We.push("name"+At+"*[*^$|!~]?="),V.querySelectorAll(":enabled").length!==2&&We.push(":enabled",":disabled"),Ke.appendChild(V).disabled=!0,V.querySelectorAll(":disabled").length!==2&&We.push(":enabled",":disabled"),V.querySelectorAll("*,:x"),We.push(",.*:")})),(h.matchesSelector=Ua.test(en=Ke.matches||Ke.webkitMatchesSelector||Ke.mozMatchesSelector||Ke.oMatchesSelector||Ke.msMatchesSelector))&&_r(function(V){h.disconnectedMatch=en.call(V,"*"),en.call(V,"[s!='']:x"),un.push("!=",yp)}),h.cssHas||We.push(":has"),We=We.length&&new RegExp(We.join("|")),un=un.length&&new RegExp(un.join("|")),F=Ua.test(Ke.compareDocumentPosition),rr=F||Ua.test(Ke.contains)?function(V,fe){var ye=V.nodeType===9&&V.documentElement||V,Pe=fe&&fe.parentNode;return V===Pe||!!(Pe&&Pe.nodeType===1&&(ye.contains?ye.contains(Pe):V.compareDocumentPosition&&V.compareDocumentPosition(Pe)&16))}:function(V,fe){if(fe){for(;fe=fe.parentNode;)if(fe===V)return!0}return!1},fo=F?function(V,fe){if(V===fe)return ve=!0,0;var ye=!V.compareDocumentPosition-!fe.compareDocumentPosition;return ye||(ye=(V.ownerDocument||V)==(fe.ownerDocument||fe)?V.compareDocumentPosition(fe):1,ye&1||!h.sortDetached&&fe.compareDocumentPosition(V)===ye?V==oe||V.ownerDocument==ft&&rr(ft,V)?-1:fe==oe||fe.ownerDocument==ft&&rr(ft,fe)?1:ee?ho(ee,V)-ho(ee,fe):0:ye&4?-1:1)}:function(V,fe){if(V===fe)return ve=!0,0;var ye,Pe=0,Be=V.parentNode,Xe=fe.parentNode,Ge=[V],Qe=[fe];if(!Be||!Xe)return V==oe?-1:fe==oe?1:Be?-1:Xe?1:ee?ho(ee,V)-ho(ee,fe):0;if(Be===Xe)return rC(V,fe);for(ye=V;ye=ye.parentNode;)Ge.unshift(ye);for(ye=fe;ye=ye.parentNode;)Qe.unshift(ye);for(;Ge[Pe]===Qe[Pe];)Pe++;return Pe?rC(Ge[Pe],Qe[Pe]):Ge[Pe]==ft?-1:Qe[Pe]==ft?1:0}),oe},Pt.matches=function(E,F){return Pt(E,null,null,F)},Pt.matchesSelector=function(E,F){if(Z(E),h.matchesSelector&&dt&&!ir[F+" "]&&(!un||!un.test(F))&&(!We||!We.test(F)))try{var U=en.call(E,F);if(U||h.disconnectedMatch||E.document&&E.document.nodeType!==11)return U}catch{ir(F,!0)}return Pt(F,oe,null,[E]).length>0},Pt.contains=function(E,F){return(E.ownerDocument||E)!=oe&&Z(E),rr(E,F)},Pt.attr=function(E,F){(E.ownerDocument||E)!=oe&&Z(E);var U=v.attrHandle[F.toLowerCase()],ae=U&&po.call(v.attrHandle,F.toLowerCase())?U(E,F,!dt):void 0;return ae!==void 0?ae:h.attributes||!dt?E.getAttribute(F):(ae=E.getAttributeNode(F))&&ae.specified?ae.value:null},Pt.escape=function(E){return(E+"").replace(eC,tC)},Pt.error=function(E){throw new Error("Syntax error, unrecognized expression: "+E)},Pt.uniqueSort=function(E){var F,U=[],ae=0,V=0;if(ve=!h.detectDuplicates,ee=!h.sortStable&&E.slice(0),E.sort(fo),ve){for(;F=E[V++];)F===E[V]&&(ae=U.push(V));for(;ae--;)E.splice(U[ae],1)}return ee=null,E},_=Pt.getText=function(E){var F,U="",ae=0,V=E.nodeType;if(V){if(V===1||V===9||V===11){if(typeof E.textContent=="string")return E.textContent;for(E=E.firstChild;E;E=E.nextSibling)U+=_(E)}else if(V===3||V===4)return E.nodeValue}else for(;F=E[ae++];)U+=_(F);return U},v=Pt.selectors={cacheLength:50,createPseudo:Lr,match:qu,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(E){return E[1]=E[1].replace(ui,ci),E[3]=(E[3]||E[4]||E[5]||"").replace(ui,ci),E[2]==="~="&&(E[3]=" "+E[3]+" "),E.slice(0,4)},CHILD:function(E){return E[1]=E[1].toLowerCase(),E[1].slice(0,3)==="nth"?(E[3]||Pt.error(E[0]),E[4]=+(E[4]?E[5]+(E[6]||1):2*(E[3]==="even"||E[3]==="odd")),E[5]=+(E[7]+E[8]||E[3]==="odd")):E[3]&&Pt.error(E[0]),E},PSEUDO:function(E){var F,U=!E[6]&&E[2];return qu.CHILD.test(E[0])?null:(E[3]?E[2]=E[4]||E[5]||"":U&&s5.test(U)&&(F=S(U,!0))&&(F=U.indexOf(")",U.length-F)-U.length)&&(E[0]=E[0].slice(0,F),E[2]=U.slice(0,F)),E.slice(0,3))}},filter:{TAG:function(E){var F=E.replace(ui,ci).toLowerCase();return E==="*"?function(){return!0}:function(U){return U.nodeName&&U.nodeName.toLowerCase()===F}},CLASS:function(E){var F=Wt[E+" "];return F||(F=new RegExp("(^|"+At+")"+E+"("+At+"|$)"))&&Wt(E,function(U){return F.test(typeof U.className=="string"&&U.className||typeof U.getAttribute<"u"&&U.getAttribute("class")||"")})},ATTR:function(E,F,U){return function(ae){var V=Pt.attr(ae,E);return V==null?F==="!=":F?(V+="",F==="="?V===U:F==="!="?V!==U:F==="^="?U&&V.indexOf(U)===0:F==="*="?U&&V.indexOf(U)>-1:F==="$="?U&&V.slice(-U.length)===U:F==="~="?(" "+V.replace(r5," ")+" ").indexOf(U)>-1:F==="|="?V===U||V.slice(0,U.length+1)===U+"-":!1):!0}},CHILD:function(E,F,U,ae,V){var fe=E.slice(0,3)!=="nth",ye=E.slice(-4)!=="last",Pe=F==="of-type";return ae===1&&V===0?function(Be){return!!Be.parentNode}:function(Be,Xe,Ge){var Qe,yt,Dt,Je,cn,En,or=fe!==ye?"nextSibling":"previousSibling",jt=Be.parentNode,Wa=Pe&&Be.nodeName.toLowerCase(),Ka=!Ge&&!Pe,sr=!1;if(jt){if(fe){for(;or;){for(Je=Be;Je=Je[or];)if(Pe?Je.nodeName.toLowerCase()===Wa:Je.nodeType===1)return!1;En=or=E==="only"&&!En&&"nextSibling"}return!0}if(En=[ye?jt.firstChild:jt.lastChild],ye&&Ka){for(Je=jt,Dt=Je[Lt]||(Je[Lt]={}),yt=Dt[Je.uniqueID]||(Dt[Je.uniqueID]={}),Qe=yt[E]||[],cn=Qe[0]===Vn&&Qe[1],sr=cn&&Qe[2],Je=cn&&jt.childNodes[cn];Je=++cn&&Je&&Je[or]||(sr=cn=0)||En.pop();)if(Je.nodeType===1&&++sr&&Je===Be){yt[E]=[Vn,cn,sr];break}}else if(Ka&&(Je=Be,Dt=Je[Lt]||(Je[Lt]={}),yt=Dt[Je.uniqueID]||(Dt[Je.uniqueID]={}),Qe=yt[E]||[],cn=Qe[0]===Vn&&Qe[1],sr=cn),sr===!1)for(;(Je=++cn&&Je&&Je[or]||(sr=cn=0)||En.pop())&&!((Pe?Je.nodeName.toLowerCase()===Wa:Je.nodeType===1)&&++sr&&(Ka&&(Dt=Je[Lt]||(Je[Lt]={}),yt=Dt[Je.uniqueID]||(Dt[Je.uniqueID]={}),yt[E]=[Vn,sr]),Je===Be)););return sr-=V,sr===ae||sr%ae===0&&sr/ae>=0}}},PSEUDO:function(E,F){var U,ae=v.pseudos[E]||v.setFilters[E.toLowerCase()]||Pt.error("unsupported pseudo: "+E);return ae[Lt]?ae(F):ae.length>1?(U=[E,E,"",F],v.setFilters.hasOwnProperty(E.toLowerCase())?Lr(function(V,fe){for(var ye,Pe=ae(V,F),Be=Pe.length;Be--;)ye=ho(V,Pe[Be]),V[ye]=!(fe[ye]=Pe[Be])}):function(V){return ae(V,0,U)}):ae}},pseudos:{not:Lr(function(E){var F=[],U=[],ae=B(E.replace(Vu,"$1"));return ae[Lt]?Lr(function(V,fe,ye,Pe){for(var Be,Xe=ae(V,null,Pe,[]),Ge=V.length;Ge--;)(Be=Xe[Ge])&&(V[Ge]=!(fe[Ge]=Be))}):function(V,fe,ye){return F[0]=V,ae(F,null,ye,U),F[0]=null,!U.pop()}}),has:Lr(function(E){return function(F){return Pt(E,F).length>0}}),contains:Lr(function(E){return E=E.replace(ui,ci),function(F){return(F.textContent||_(F)).indexOf(E)>-1}}),lang:Lr(function(E){return a5.test(E||"")||Pt.error("unsupported lang: "+E),E=E.replace(ui,ci).toLowerCase(),function(F){var U;do if(U=dt?F.lang:F.getAttribute("xml:lang")||F.getAttribute("lang"))return U=U.toLowerCase(),U===E||U.indexOf(E+"-")===0;while((F=F.parentNode)&&F.nodeType===1);return!1}}),target:function(E){var F=u.location&&u.location.hash;return F&&F.slice(1)===E.id},root:function(E){return E===Ke},focus:function(E){return E===oe.activeElement&&(!oe.hasFocus||oe.hasFocus())&&!!(E.type||E.href||~E.tabIndex)},enabled:iC(!1),disabled:iC(!0),checked:function(E){var F=E.nodeName.toLowerCase();return F==="input"&&!!E.checked||F==="option"&&!!E.selected},selected:function(E){return E.parentNode&&E.parentNode.selectedIndex,E.selected===!0},empty:function(E){for(E=E.firstChild;E;E=E.nextSibling)if(E.nodeType<6)return!1;return!0},parent:function(E){return!v.pseudos.empty(E)},header:function(E){return c5.test(E.nodeName)},input:function(E){return u5.test(E.nodeName)},button:function(E){var F=E.nodeName.toLowerCase();return F==="input"&&E.type==="button"||F==="button"},text:function(E){var F;return E.nodeName.toLowerCase()==="input"&&E.type==="text"&&((F=E.getAttribute("type"))==null||F.toLowerCase()==="text")},first:mo(function(){return[0]}),last:mo(function(E,F){return[F-1]}),eq:mo(function(E,F,U){return[U<0?U+F:U]}),even:mo(function(E,F){for(var U=0;U<F;U+=2)E.push(U);return E}),odd:mo(function(E,F){for(var U=1;U<F;U+=2)E.push(U);return E}),lt:mo(function(E,F,U){for(var ae=U<0?U+F:U>F?F:U;--ae>=0;)E.push(ae);return E}),gt:mo(function(E,F,U){for(var ae=U<0?U+F:U;++ae<F;)E.push(ae);return E})}},v.pseudos.nth=v.pseudos.eq;for(f in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})v.pseudos[f]=p5(f);for(f in{submit:!0,reset:!0})v.pseudos[f]=h5(f);function oC(){}oC.prototype=v.filters=v.pseudos,v.setFilters=new oC,S=Pt.tokenize=function(E,F){var U,ae,V,fe,ye,Pe,Be,Xe=ja[E+" "];if(Xe)return F?0:Xe.slice(0);for(ye=E,Pe=[],Be=v.preFilter;ye;){(!U||(ae=i5.exec(ye)))&&(ae&&(ye=ye.slice(ae[0].length)||ye),Pe.push(V=[])),U=!1,(ae=Qb.exec(ye))&&(U=ae.shift(),V.push({value:U,type:ae[0].replace(Vu," ")}),ye=ye.slice(U.length));for(fe in v.filter)(ae=qu[fe].exec(ye))&&(!Be[fe]||(ae=Be[fe](ae)))&&(U=ae.shift(),V.push({value:U,type:fe,matches:ae}),ye=ye.slice(U.length));if(!U)break}return F?ye.length:ye?Pt.error(E):ja(E,Pe).slice(0)};function Gu(E){for(var F=0,U=E.length,ae="";F<U;F++)ae+=E[F].value;return ae}function Yu(E,F,U){var ae=F.dir,V=F.next,fe=V||ae,ye=U&&fe==="parentNode",Pe=kt++;return F.first?function(Be,Xe,Ge){for(;Be=Be[ae];)if(Be.nodeType===1||ye)return E(Be,Xe,Ge);return!1}:function(Be,Xe,Ge){var Qe,yt,Dt,Je=[Vn,Pe];if(Ge){for(;Be=Be[ae];)if((Be.nodeType===1||ye)&&E(Be,Xe,Ge))return!0}else for(;Be=Be[ae];)if(Be.nodeType===1||ye)if(Dt=Be[Lt]||(Be[Lt]={}),yt=Dt[Be.uniqueID]||(Dt[Be.uniqueID]={}),V&&V===Be.nodeName.toLowerCase())Be=Be[ae]||Be;else{if((Qe=yt[fe])&&Qe[0]===Vn&&Qe[1]===Pe)return Je[2]=Qe[2];if(yt[fe]=Je,Je[2]=E(Be,Xe,Ge))return!0}return!1}}function wp(E){return E.length>1?function(F,U,ae){for(var V=E.length;V--;)if(!E[V](F,U,ae))return!1;return!0}:E[0]}function g5(E,F,U){for(var ae=0,V=F.length;ae<V;ae++)Pt(E,F[ae],U);return U}function Xu(E,F,U,ae,V){for(var fe,ye=[],Pe=0,Be=E.length,Xe=F!=null;Pe<Be;Pe++)(fe=E[Pe])&&(!U||U(fe,ae,V))&&(ye.push(fe),Xe&&F.push(Pe));return ye}function Tp(E,F,U,ae,V,fe){return ae&&!ae[Lt]&&(ae=Tp(ae)),V&&!V[Lt]&&(V=Tp(V,fe)),Lr(function(ye,Pe,Be,Xe){var Ge,Qe,yt,Dt=[],Je=[],cn=Pe.length,En=ye||g5(F||"*",Be.nodeType?[Be]:Be,[]),or=E&&(ye||!F)?Xu(En,Dt,E,Be,Xe):En,jt=U?V||(ye?E:cn||ae)?[]:Pe:or;if(U&&U(or,jt,Be,Xe),ae)for(Ge=Xu(jt,Je),ae(Ge,[],Be,Xe),Qe=Ge.length;Qe--;)(yt=Ge[Qe])&&(jt[Je[Qe]]=!(or[Je[Qe]]=yt));if(ye){if(V||E){if(V){for(Ge=[],Qe=jt.length;Qe--;)(yt=jt[Qe])&&Ge.push(or[Qe]=yt);V(null,jt=[],Ge,Xe)}for(Qe=jt.length;Qe--;)(yt=jt[Qe])&&(Ge=V?ho(ye,yt):Dt[Qe])>-1&&(ye[Ge]=!(Pe[Ge]=yt))}}else jt=Xu(jt===Pe?jt.splice(cn,jt.length):jt),V?V(null,Pe,jt,Xe):Pi.apply(Pe,jt)})}function kp(E){for(var F,U,ae,V=E.length,fe=v.relative[E[0].type],ye=fe||v.relative[" "],Pe=fe?1:0,Be=Yu(function(Qe){return Qe===F},ye,!0),Xe=Yu(function(Qe){return ho(F,Qe)>-1},ye,!0),Ge=[function(Qe,yt,Dt){var Je=!fe&&(Dt||yt!==q)||((F=yt).nodeType?Be(Qe,yt,Dt):Xe(Qe,yt,Dt));return F=null,Je}];Pe<V;Pe++)if(U=v.relative[E[Pe].type])Ge=[Yu(wp(Ge),U)];else{if(U=v.filter[E[Pe].type].apply(null,E[Pe].matches),U[Lt]){for(ae=++Pe;ae<V&&!v.relative[E[ae].type];ae++);return Tp(Pe>1&&wp(Ge),Pe>1&&Gu(E.slice(0,Pe-1).concat({value:E[Pe-2].type===" "?"*":""})).replace(Vu,"$1"),U,Pe<ae&&kp(E.slice(Pe,ae)),ae<V&&kp(E=E.slice(ae)),ae<V&&Gu(E))}Ge.push(U)}return wp(Ge)}function m5(E,F){var U=F.length>0,ae=E.length>0,V=function(fe,ye,Pe,Be,Xe){var Ge,Qe,yt,Dt=0,Je="0",cn=fe&&[],En=[],or=q,jt=fe||ae&&v.find.TAG("*",Xe),Wa=Vn+=or==null?1:Math.random()||.1,Ka=jt.length;for(Xe&&(q=ye==oe||ye||Xe);Je!==Ka&&(Ge=jt[Je])!=null;Je++){if(ae&&Ge){for(Qe=0,!ye&&Ge.ownerDocument!=oe&&(Z(Ge),Pe=!dt);yt=E[Qe++];)if(yt(Ge,ye||oe,Pe)){Be.push(Ge);break}Xe&&(Vn=Wa)}U&&((Ge=!yt&&Ge)&&Dt--,fe&&cn.push(Ge))}if(Dt+=Je,U&&Je!==Dt){for(Qe=0;yt=F[Qe++];)yt(cn,En,ye,Pe);if(fe){if(Dt>0)for(;Je--;)cn[Je]||En[Je]||(En[Je]=Ii.call(Be));En=Xu(En)}Pi.apply(Be,En),Xe&&!fe&&En.length>0&&Dt+F.length>1&&Pt.uniqueSort(Be)}return Xe&&(Vn=Wa,q=or),cn};return U?Lr(V):V}return B=Pt.compile=function(E,F){var U,ae=[],V=[],fe=Ku[E+" "];if(!fe){for(F||(F=S(E)),U=F.length;U--;)fe=kp(F[U]),fe[Lt]?ae.push(fe):V.push(fe);fe=Ku(E,m5(V,ae)),fe.selector=E}return fe},M=Pt.select=function(E,F,U,ae){var V,fe,ye,Pe,Be,Xe=typeof E=="function"&&E,Ge=!ae&&S(E=Xe.selector||E);if(U=U||[],Ge.length===1){if(fe=Ge[0]=Ge[0].slice(0),fe.length>2&&(ye=fe[0]).type==="ID"&&F.nodeType===9&&dt&&v.relative[fe[1].type]){if(F=(v.find.ID(ye.matches[0].replace(ui,ci),F)||[])[0],F)Xe&&(F=F.parentNode);else return U;E=E.slice(fe.shift().value.length)}for(V=qu.needsContext.test(E)?0:fe.length;V--&&(ye=fe[V],!v.relative[Pe=ye.type]);)if((Be=v.find[Pe])&&(ae=Be(ye.matches[0].replace(ui,ci),bp.test(fe[0].type)&&_p(F.parentNode)||F))){if(fe.splice(V,1),E=ae.length&&Gu(fe),!E)return Pi.apply(U,ae),U;break}}return(Xe||B(E,Ge))(ae,F,!dt,U,!F||bp.test(E)&&_p(F.parentNode)||F),U},h.sortStable=Lt.split("").sort(fo).join("")===Lt,h.detectDuplicates=!!ve,Z(),h.sortDetached=_r(function(E){return E.compareDocumentPosition(oe.createElement("fieldset"))&1}),_r(function(E){return E.innerHTML="<a href='#'></a>",E.firstChild.getAttribute("href")==="#"})||Cp("type|href|height|width",function(E,F,U){if(!U)return E.getAttribute(F,F.toLowerCase()==="type"?1:2)}),(!h.attributes||!_r(function(E){return E.innerHTML="<input/>",E.firstChild.setAttribute("value",""),E.firstChild.getAttribute("value")===""}))&&Cp("value",function(E,F,U){if(!U&&E.nodeName.toLowerCase()==="input")return E.defaultValue}),_r(function(E){return E.getAttribute("disabled")==null})||Cp(vp,function(E,F,U){var ae;if(!U)return E[F]===!0?F.toLowerCase():(ae=E.getAttributeNode(F))&&ae.specified?ae.value:null}),Pt}(t);g.find=I,g.expr=I.selectors,g.expr[":"]=g.expr.pseudos,g.uniqueSort=g.unique=I.uniqueSort,g.text=I.getText,g.isXMLDoc=I.isXML,g.contains=I.contains,g.escapeSelector=I.escape;var A=function(u,f,h){for(var v=[],_=h!==void 0;(u=u[f])&&u.nodeType!==9;)if(u.nodeType===1){if(_&&g(u).is(h))break;v.push(u)}return v},D=function(u,f){for(var h=[];u;u=u.nextSibling)u.nodeType===1&&u!==f&&h.push(u);return h},H=g.expr.match.needsContext;function K(u,f){return u.nodeName&&u.nodeName.toLowerCase()===f.toLowerCase()}var z=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function de(u,f,h){return k(f)?g.grep(u,function(v,_){return!!f.call(v,_,v)!==h}):f.nodeType?g.grep(u,function(v){return v===f!==h}):typeof f!="string"?g.grep(u,function(v){return c.call(f,v)>-1!==h}):g.filter(f,u,h)}g.filter=function(u,f,h){var v=f[0];return h&&(u=":not("+u+")"),f.length===1&&v.nodeType===1?g.find.matchesSelector(v,u)?[v]:[]:g.find.matches(u,g.grep(f,function(_){return _.nodeType===1}))},g.fn.extend({find:function(u){var f,h,v=this.length,_=this;if(typeof u!="string")return this.pushStack(g(u).filter(function(){for(f=0;f<v;f++)if(g.contains(_[f],this))return!0}));for(h=this.pushStack([]),f=0;f<v;f++)g.find(u,_[f],h);return v>1?g.uniqueSort(h):h},filter:function(u){return this.pushStack(de(this,u||[],!1))},not:function(u){return this.pushStack(de(this,u||[],!0))},is:function(u){return!!de(this,typeof u=="string"&&H.test(u)?g(u):u||[],!1).length}});var je,Re=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,Y=g.fn.init=function(u,f,h){var v,_;if(!u)return this;if(h=h||je,typeof u=="string")if(u[0]==="<"&&u[u.length-1]===">"&&u.length>=3?v=[null,u,null]:v=Re.exec(u),v&&(v[1]||!f))if(v[1]){if(f=f instanceof g?f[0]:f,g.merge(this,g.parseHTML(v[1],f&&f.nodeType?f.ownerDocument||f:P,!0)),z.test(v[1])&&g.isPlainObject(f))for(v in f)k(this[v])?this[v](f[v]):this.attr(v,f[v]);return this}else return _=P.getElementById(v[2]),_&&(this[0]=_,this.length=1),this;else return!f||f.jquery?(f||h).find(u):this.constructor(f).find(u);else{if(u.nodeType)return this[0]=u,this.length=1,this;if(k(u))return h.ready!==void 0?h.ready(u):u(g)}return g.makeArray(u,this)};Y.prototype=g.fn,je=g(P);var se=/^(?:parents|prev(?:Until|All))/,ge={children:!0,contents:!0,next:!0,prev:!0};g.fn.extend({has:function(u){var f=g(u,this),h=f.length;return this.filter(function(){for(var v=0;v<h;v++)if(g.contains(this,f[v]))return!0})},closest:function(u,f){var h,v=0,_=this.length,w=[],S=typeof u!="string"&&g(u);if(!H.test(u)){for(;v<_;v++)for(h=this[v];h&&h!==f;h=h.parentNode)if(h.nodeType<11&&(S?S.index(h)>-1:h.nodeType===1&&g.find.matchesSelector(h,u))){w.push(h);break}}return this.pushStack(w.length>1?g.uniqueSort(w):w)},index:function(u){return u?typeof u=="string"?c.call(g(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(g.uniqueSort(g.merge(this.get(),g(u,f))))},addBack:function(u){return this.add(u==null?this.prevObject:this.prevObject.filter(u))}});function it(u,f){for(;(u=u[f])&&u.nodeType!==1;);return u}g.each({parent:function(u){var f=u.parentNode;return f&&f.nodeType!==11?f:null},parents:function(u){return A(u,"parentNode")},parentsUntil:function(u,f,h){return A(u,"parentNode",h)},next:function(u){return it(u,"nextSibling")},prev:function(u){return it(u,"previousSibling")},nextAll:function(u){return A(u,"nextSibling")},prevAll:function(u){return A(u,"previousSibling")},nextUntil:function(u,f,h){return A(u,"nextSibling",h)},prevUntil:function(u,f,h){return A(u,"previousSibling",h)},siblings:function(u){return D((u.parentNode||{}).firstChild,u)},children:function(u){return D(u.firstChild)},contents:function(u){return u.contentDocument!=null&&i(u.contentDocument)?u.contentDocument:(K(u,"template")&&(u=u.content||u),g.merge([],u.childNodes))}},function(u,f){g.fn[u]=function(h,v){var _=g.map(this,f,h);return u.slice(-5)!=="Until"&&(v=h),v&&typeof v=="string"&&(_=g.filter(v,_)),this.length>1&&(ge[u]||g.uniqueSort(_),se.test(u)&&_.reverse()),this.pushStack(_)}});var qe=/[^\x20\t\r\n\f]+/g;function ie(u){var f={};return g.each(u.match(qe)||[],function(h,v){f[v]=!0}),f}g.Callbacks=function(u){u=typeof u=="string"?ie(u):g.extend({},u);var f,h,v,_,w=[],S=[],B=-1,M=function(){for(_=_||u.once,v=f=!0;S.length;B=-1)for(h=S.shift();++B<w.length;)w[B].apply(h[0],h[1])===!1&&u.stopOnFalse&&(B=w.length,h=!1);u.memory||(h=!1),f=!1,_&&(h?w=[]:w="")},q={add:function(){return w&&(h&&!f&&(B=w.length-1,S.push(h)),function ee(ve){g.each(ve,function(Z,oe){k(oe)?(!u.unique||!q.has(oe))&&w.push(oe):oe&&oe.length&&x(oe)!=="string"&&ee(oe)})}(arguments),h&&!f&&M()),this},remove:function(){return g.each(arguments,function(ee,ve){for(var Z;(Z=g.inArray(ve,w,Z))>-1;)w.splice(Z,1),Z<=B&&B--}),this},has:function(ee){return ee?g.inArray(ee,w)>-1:w.length>0},empty:function(){return w&&(w=[]),this},disable:function(){return _=S=[],w=h="",this},disabled:function(){return!w},lock:function(){return _=S=[],!h&&!f&&(w=h=""),this},locked:function(){return!!_},fireWith:function(ee,ve){return _||(ve=ve||[],ve=[ee,ve.slice?ve.slice():ve],S.push(ve),f||M()),this},fire:function(){return q.fireWith(this,arguments),this},fired:function(){return!!v}};return q};function Ce(u){return u}function ke(u){throw u}function Ee(u,f,h,v){var _;try{u&&k(_=u.promise)?_.call(u).done(f).fail(h):u&&k(_=u.then)?_.call(u,f,h):f.apply(void 0,[u].slice(v))}catch(w){h.apply(void 0,[w])}}g.extend({Deferred:function(u){var f=[["notify","progress",g.Callbacks("memory"),g.Callbacks("memory"),2],["resolve","done",g.Callbacks("once memory"),g.Callbacks("once memory"),0,"resolved"],["reject","fail",g.Callbacks("once memory"),g.Callbacks("once memory"),1,"rejected"]],h="pending",v={state:function(){return h},always:function(){return _.done(arguments).fail(arguments),this},catch:function(w){return v.then(null,w)},pipe:function(){var w=arguments;return g.Deferred(function(S){g.each(f,function(B,M){var q=k(w[M[4]])&&w[M[4]];_[M[1]](function(){var ee=q&&q.apply(this,arguments);ee&&k(ee.promise)?ee.promise().progress(S.notify).done(S.resolve).fail(S.reject):S[M[0]+"With"](this,q?[ee]:arguments)})}),w=null}).promise()},then:function(w,S,B){var M=0;function q(ee,ve,Z,oe){return function(){var Ke=this,dt=arguments,We=function(){var en,rr;if(!(ee<M)){if(en=Z.apply(Ke,dt),en===ve.promise())throw new TypeError("Thenable self-resolution");rr=en&&(typeof en=="object"||typeof en=="function")&&en.then,k(rr)?oe?rr.call(en,q(M,ve,Ce,oe),q(M,ve,ke,oe)):(M++,rr.call(en,q(M,ve,Ce,oe),q(M,ve,ke,oe),q(M,ve,Ce,ve.notifyWith))):(Z!==Ce&&(Ke=void 0,dt=[en]),(oe||ve.resolveWith)(Ke,dt))}},un=oe?We:function(){try{We()}catch(en){g.Deferred.exceptionHook&&g.Deferred.exceptionHook(en,un.stackTrace),ee+1>=M&&(Z!==ke&&(Ke=void 0,dt=[en]),ve.rejectWith(Ke,dt))}};ee?un():(g.Deferred.getStackHook&&(un.stackTrace=g.Deferred.getStackHook()),t.setTimeout(un))}}return g.Deferred(function(ee){f[0][3].add(q(0,ee,k(B)?B:Ce,ee.notifyWith)),f[1][3].add(q(0,ee,k(w)?w:Ce)),f[2][3].add(q(0,ee,k(S)?S:ke))}).promise()},promise:function(w){return w!=null?g.extend(w,v):v}},_={};return g.each(f,function(w,S){var B=S[2],M=S[5];v[S[1]]=B.add,M&&B.add(function(){h=M},f[3-w][2].disable,f[3-w][3].disable,f[0][2].lock,f[0][3].lock),B.add(S[3].fire),_[S[0]]=function(){return _[S[0]+"With"](this===_?void 0:this,arguments),this},_[S[0]+"With"]=B.fireWith}),v.promise(_),u&&u.call(_,_),_},when:function(u){var f=arguments.length,h=f,v=Array(h),_=o.call(arguments),w=g.Deferred(),S=function(B){return function(M){v[B]=this,_[B]=arguments.length>1?o.call(arguments):M,--f||w.resolveWith(v,_)}};if(f<=1&&(Ee(u,w.done(S(h)).resolve,w.reject,!f),w.state()==="pending"||k(_[h]&&_[h].then)))return w.then();for(;h--;)Ee(_[h],S(h),w.reject);return w.promise()}});var Le=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;g.Deferred.exceptionHook=function(u,f){t.console&&t.console.warn&&u&&Le.test(u.name)&&t.console.warn("jQuery.Deferred exception: "+u.message,u.stack,f)},g.readyException=function(u){t.setTimeout(function(){throw u})};var He=g.Deferred();g.fn.ready=function(u){return He.then(u).catch(function(f){g.readyException(f)}),this},g.extend({isReady:!1,readyWait:1,ready:function(u){(u===!0?--g.readyWait:g.isReady)||(g.isReady=!0,!(u!==!0&&--g.readyWait>0)&&He.resolveWith(P,[g]))}}),g.ready.then=He.then;function Ze(){P.removeEventListener("DOMContentLoaded",Ze),t.removeEventListener("load",Ze),g.ready()}P.readyState==="complete"||P.readyState!=="loading"&&!P.documentElement.doScroll?t.setTimeout(g.ready):(P.addEventListener("DOMContentLoaded",Ze),t.addEventListener("load",Ze));var Ie=function(u,f,h,v,_,w,S){var B=0,M=u.length,q=h==null;if(x(h)==="object"){_=!0;for(B in h)Ie(u,f,B,h[B],!0,w,S)}else if(v!==void 0&&(_=!0,k(v)||(S=!0),q&&(S?(f.call(u,v),f=null):(q=f,f=function(ee,ve,Z){return q.call(g(ee),Z)})),f))for(;B<M;B++)f(u[B],h,S?v:v.call(u[B],B,f(u[B],h)));return _?u:q?f.call(u):M?f(u[0],h):w},ot=/^-ms-/,vt=/-([a-z])/g;function R(u,f){return f.toUpperCase()}function $(u){return u.replace(ot,"ms-").replace(vt,R)}var J=function(u){return u.nodeType===1||u.nodeType===9||!+u.nodeType};function ne(){this.expando=g.expando+ne.uid++}ne.uid=1,ne.prototype={cache:function(u){var f=u[this.expando];return f||(f={},J(u)&&(u.nodeType?u[this.expando]=f:Object.defineProperty(u,this.expando,{value:f,configurable:!0}))),f},set:function(u,f,h){var v,_=this.cache(u);if(typeof f=="string")_[$(f)]=h;else for(v in f)_[$(v)]=f[v];return _},get:function(u,f){return f===void 0?this.cache(u):u[this.expando]&&u[this.expando][$(f)]},access:function(u,f,h){return f===void 0||f&&typeof f=="string"&&h===void 0?this.get(u,f):(this.set(u,f,h),h!==void 0?h:f)},remove:function(u,f){var h,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(qe)||[]),h=f.length;h--;)delete v[f[h]];(f===void 0||g.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&&!g.isEmptyObject(f)}};var W=new ne,Q=new ne,we=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,me=/[A-Z]/g;function _e(u){return u==="true"?!0:u==="false"?!1:u==="null"?null:u===+u+""?+u:we.test(u)?JSON.parse(u):u}function ue(u,f,h){var v;if(h===void 0&&u.nodeType===1)if(v="data-"+f.replace(me,"-$&").toLowerCase(),h=u.getAttribute(v),typeof h=="string"){try{h=_e(h)}catch{}Q.set(u,f,h)}else h=void 0;return h}g.extend({hasData:function(u){return Q.hasData(u)||W.hasData(u)},data:function(u,f,h){return Q.access(u,f,h)},removeData:function(u,f){Q.remove(u,f)},_data:function(u,f,h){return W.access(u,f,h)},_removeData:function(u,f){W.remove(u,f)}}),g.fn.extend({data:function(u,f){var h,v,_,w=this[0],S=w&&w.attributes;if(u===void 0){if(this.length&&(_=Q.get(w),w.nodeType===1&&!W.get(w,"hasDataAttrs"))){for(h=S.length;h--;)S[h]&&(v=S[h].name,v.indexOf("data-")===0&&(v=$(v.slice(5)),ue(w,v,_[v])));W.set(w,"hasDataAttrs",!0)}return _}return typeof u=="object"?this.each(function(){Q.set(this,u)}):Ie(this,function(B){var M;if(w&&B===void 0)return M=Q.get(w,u),M!==void 0||(M=ue(w,u),M!==void 0)?M:void 0;this.each(function(){Q.set(this,u,B)})},null,f,arguments.length>1,null,!0)},removeData:function(u){return this.each(function(){Q.remove(this,u)})}}),g.extend({queue:function(u,f,h){var v;if(u)return f=(f||"fx")+"queue",v=W.get(u,f),h&&(!v||Array.isArray(h)?v=W.access(u,f,g.makeArray(h)):v.push(h)),v||[]},dequeue:function(u,f){f=f||"fx";var h=g.queue(u,f),v=h.length,_=h.shift(),w=g._queueHooks(u,f),S=function(){g.dequeue(u,f)};_==="inprogress"&&(_=h.shift(),v--),_&&(f==="fx"&&h.unshift("inprogress"),delete w.stop,_.call(u,S,w)),!v&&w&&w.empty.fire()},_queueHooks:function(u,f){var h=f+"queueHooks";return W.get(u,h)||W.access(u,h,{empty:g.Callbacks("once memory").add(function(){W.remove(u,[f+"queue",h])})})}}),g.fn.extend({queue:function(u,f){var h=2;return typeof u!="string"&&(f=u,u="fx",h--),arguments.length<h?g.queue(this[0],u):f===void 0?this:this.each(function(){var v=g.queue(this,u,f);g._queueHooks(this,u),u==="fx"&&v[0]!=="inprogress"&&g.dequeue(this,u)})},dequeue:function(u){return this.each(function(){g.dequeue(this,u)})},clearQueue:function(u){return this.queue(u||"fx",[])},promise:function(u,f){var h,v=1,_=g.Deferred(),w=this,S=this.length,B=function(){--v||_.resolveWith(w,[w])};for(typeof u!="string"&&(f=u,u=void 0),u=u||"fx";S--;)h=W.get(w[S],u+"queueHooks"),h&&h.empty&&(v++,h.empty.add(B));return B(),_.promise(f)}});var Se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Te=new RegExp("^(?:([+-])=|)("+Se+")([a-z%]*)$","i"),Me=["Top","Right","Bottom","Left"],Ae=P.documentElement,ze=function(u){return g.contains(u.ownerDocument,u)},pt={composed:!0};Ae.getRootNode&&(ze=function(u){return g.contains(u.ownerDocument,u)||u.getRootNode(pt)===u.ownerDocument});var ut=function(u,f){return u=f||u,u.style.display==="none"||u.style.display===""&&ze(u)&&g.css(u,"display")==="none"};function Ct(u,f,h,v){var _,w,S=20,B=v?function(){return v.cur()}:function(){return g.css(u,f,"")},M=B(),q=h&&h[3]||(g.cssNumber[f]?"":"px"),ee=u.nodeType&&(g.cssNumber[f]||q!=="px"&&+M)&&Te.exec(g.css(u,f));if(ee&&ee[3]!==q){for(M=M/2,q=q||ee[3],ee=+M||1;S--;)g.style(u,f,ee+q),(1-w)*(1-(w=B()/M||.5))<=0&&(S=0),ee=ee/w;ee=ee*2,g.style(u,f,ee+q),h=h||[]}return h&&(ee=+ee||+M||0,_=h[1]?ee+(h[1]+1)*h[2]:+h[2],v&&(v.unit=q,v.start=ee,v.end=_)),_}var Ft={};function ln(u){var f,h=u.ownerDocument,v=u.nodeName,_=Ft[v];return _||(f=h.body.appendChild(h.createElement(v)),_=g.css(f,"display"),f.parentNode.removeChild(f),_==="none"&&(_="block"),Ft[v]=_,_)}function Ht(u,f){for(var h,v,_=[],w=0,S=u.length;w<S;w++)v=u[w],v.style&&(h=v.style.display,f?(h==="none"&&(_[w]=W.get(v,"display")||null,_[w]||(v.style.display="")),v.style.display===""&&ut(v)&&(_[w]=ln(v))):h!=="none"&&(_[w]="none",W.set(v,"display",h)));for(w=0;w<S;w++)_[w]!=null&&(u[w].style.display=_[w]);return u}g.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(){ut(this)?g(this).show():g(this).hide()})}});var pn=/^(?:checkbox|radio)$/i,te=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ne=/^$|^module$|\/(?:java|ecma)script/i;(function(){var u=P.createDocumentFragment(),f=u.appendChild(P.createElement("div")),h=P.createElement("input");h.setAttribute("type","radio"),h.setAttribute("checked","checked"),h.setAttribute("name","t"),f.appendChild(h),b.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,f.innerHTML="<textarea>x</textarea>",b.noCloneChecked=!!f.cloneNode(!0).lastChild.defaultValue,f.innerHTML="<option></option>",b.option=!!f.lastChild})();var $e={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,"",""]};$e.tbody=$e.tfoot=$e.colgroup=$e.caption=$e.thead,$e.th=$e.td,b.option||($e.optgroup=$e.option=[1,"<select multiple='multiple'>","</select>"]);function st(u,f){var h;return typeof u.getElementsByTagName<"u"?h=u.getElementsByTagName(f||"*"):typeof u.querySelectorAll<"u"?h=u.querySelectorAll(f||"*"):h=[],f===void 0||f&&K(u,f)?g.merge([u],h):h}function bt(u,f){for(var h=0,v=u.length;h<v;h++)W.set(u[h],"globalEval",!f||W.get(f[h],"globalEval"))}var bn=/<|&#?\w+;/;function Dn(u,f,h,v,_){for(var w,S,B,M,q,ee,ve=f.createDocumentFragment(),Z=[],oe=0,Ke=u.length;oe<Ke;oe++)if(w=u[oe],w||w===0)if(x(w)==="object")g.merge(Z,w.nodeType?[w]:w);else if(!bn.test(w))Z.push(f.createTextNode(w));else{for(S=S||ve.appendChild(f.createElement("div")),B=(te.exec(w)||["",""])[1].toLowerCase(),M=$e[B]||$e._default,S.innerHTML=M[1]+g.htmlPrefilter(w)+M[2],ee=M[0];ee--;)S=S.lastChild;g.merge(Z,S.childNodes),S=ve.firstChild,S.textContent=""}for(ve.textContent="",oe=0;w=Z[oe++];){if(v&&g.inArray(w,v)>-1){_&&_.push(w);continue}if(q=ze(w),S=st(ve.appendChild(w),"script"),q&&bt(S),h)for(ee=0;w=S[ee++];)Ne.test(w.type||"")&&h.push(w)}return ve}var ai=/^([^.]*)(?:\.(.+)|)/;function li(){return!0}function Wn(){return!1}function Na(u,f){return u===ys()==(f==="focus")}function ys(){try{return P.activeElement}catch{}}function Vr(u,f,h,v,_,w){var S,B;if(typeof f=="object"){typeof h!="string"&&(v=v||h,h=void 0);for(B in f)Vr(u,B,h,v,f[B],w);return u}if(v==null&&_==null?(_=h,v=h=void 0):_==null&&(typeof h=="string"?(_=v,v=void 0):(_=v,v=h,h=void 0)),_===!1)_=Wn;else if(!_)return u;return w===1&&(S=_,_=function(M){return g().off(M),S.apply(this,arguments)},_.guid=S.guid||(S.guid=g.guid++)),u.each(function(){g.event.add(this,f,_,v,h)})}g.event={global:{},add:function(u,f,h,v,_){var w,S,B,M,q,ee,ve,Z,oe,Ke,dt,We=W.get(u);if(J(u))for(h.handler&&(w=h,h=w.handler,_=w.selector),_&&g.find.matchesSelector(Ae,_),h.guid||(h.guid=g.guid++),(M=We.events)||(M=We.events=Object.create(null)),(S=We.handle)||(S=We.handle=function(un){return typeof g<"u"&&g.event.triggered!==un.type?g.event.dispatch.apply(u,arguments):void 0}),f=(f||"").match(qe)||[""],q=f.length;q--;)B=ai.exec(f[q])||[],oe=dt=B[1],Ke=(B[2]||"").split(".").sort(),oe&&(ve=g.event.special[oe]||{},oe=(_?ve.delegateType:ve.bindType)||oe,ve=g.event.special[oe]||{},ee=g.extend({type:oe,origType:dt,data:v,handler:h,guid:h.guid,selector:_,needsContext:_&&g.expr.match.needsContext.test(_),namespace:Ke.join(".")},w),(Z=M[oe])||(Z=M[oe]=[],Z.delegateCount=0,(!ve.setup||ve.setup.call(u,v,Ke,S)===!1)&&u.addEventListener&&u.addEventListener(oe,S)),ve.add&&(ve.add.call(u,ee),ee.handler.guid||(ee.handler.guid=h.guid)),_?Z.splice(Z.delegateCount++,0,ee):Z.push(ee),g.event.global[oe]=!0)},remove:function(u,f,h,v,_){var w,S,B,M,q,ee,ve,Z,oe,Ke,dt,We=W.hasData(u)&&W.get(u);if(!(!We||!(M=We.events))){for(f=(f||"").match(qe)||[""],q=f.length;q--;){if(B=ai.exec(f[q])||[],oe=dt=B[1],Ke=(B[2]||"").split(".").sort(),!oe){for(oe in M)g.event.remove(u,oe+f[q],h,v,!0);continue}for(ve=g.event.special[oe]||{},oe=(v?ve.delegateType:ve.bindType)||oe,Z=M[oe]||[],B=B[2]&&new RegExp("(^|\\.)"+Ke.join("\\.(?:.*\\.|)")+"(\\.|$)"),S=w=Z.length;w--;)ee=Z[w],(_||dt===ee.origType)&&(!h||h.guid===ee.guid)&&(!B||B.test(ee.namespace))&&(!v||v===ee.selector||v==="**"&&ee.selector)&&(Z.splice(w,1),ee.selector&&Z.delegateCount--,ve.remove&&ve.remove.call(u,ee));S&&!Z.length&&((!ve.teardown||ve.teardown.call(u,Ke,We.handle)===!1)&&g.removeEvent(u,oe,We.handle),delete M[oe])}g.isEmptyObject(M)&&W.remove(u,"handle events")}},dispatch:function(u){var f,h,v,_,w,S,B=new Array(arguments.length),M=g.event.fix(u),q=(W.get(this,"events")||Object.create(null))[M.type]||[],ee=g.event.special[M.type]||{};for(B[0]=M,f=1;f<arguments.length;f++)B[f]=arguments[f];if(M.delegateTarget=this,!(ee.preDispatch&&ee.preDispatch.call(this,M)===!1)){for(S=g.event.handlers.call(this,M,q),f=0;(_=S[f++])&&!M.isPropagationStopped();)for(M.currentTarget=_.elem,h=0;(w=_.handlers[h++])&&!M.isImmediatePropagationStopped();)(!M.rnamespace||w.namespace===!1||M.rnamespace.test(w.namespace))&&(M.handleObj=w,M.data=w.data,v=((g.event.special[w.origType]||{}).handle||w.handler).apply(_.elem,B),v!==void 0&&(M.result=v)===!1&&(M.preventDefault(),M.stopPropagation()));return ee.postDispatch&&ee.postDispatch.call(this,M),M.result}},handlers:function(u,f){var h,v,_,w,S,B=[],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(w=[],S={},h=0;h<M;h++)v=f[h],_=v.selector+" ",S[_]===void 0&&(S[_]=v.needsContext?g(_,this).index(q)>-1:g.find(_,this,null,[q]).length),S[_]&&w.push(v);w.length&&B.push({elem:q,handlers:w})}}return q=this,M<f.length&&B.push({elem:q,handlers:f.slice(M)}),B},addProp:function(u,f){Object.defineProperty(g.Event.prototype,u,{enumerable:!0,configurable:!0,get:k(f)?function(){if(this.originalEvent)return f(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[u]},set:function(h){Object.defineProperty(this,u,{enumerable:!0,configurable:!0,writable:!0,value:h})}})},fix:function(u){return u[g.expando]?u:new g.Event(u)},special:{load:{noBubble:!0},click:{setup:function(u){var f=this||u;return pn.test(f.type)&&f.click&&K(f,"input")&&bs(f,"click",li),!1},trigger:function(u){var f=this||u;return pn.test(f.type)&&f.click&&K(f,"input")&&bs(f,"click"),!0},_default:function(u){var f=u.target;return pn.test(f.type)&&f.click&&K(f,"input")&&W.get(f,"click")||K(f,"a")}},beforeunload:{postDispatch:function(u){u.result!==void 0&&u.originalEvent&&(u.originalEvent.returnValue=u.result)}}}};function bs(u,f,h){if(!h){W.get(u,f)===void 0&&g.event.add(u,f,li);return}W.set(u,f,!1),g.event.add(u,f,{namespace:!1,handler:function(v){var _,w,S=W.get(this,f);if(v.isTrigger&1&&this[f]){if(S.length)(g.event.special[f]||{}).delegateType&&v.stopPropagation();else if(S=o.call(arguments),W.set(this,f,S),_=h(this,f),this[f](),w=W.get(this,f),S!==w||_?W.set(this,f,!1):w={},S!==w)return v.stopImmediatePropagation(),v.preventDefault(),w&&w.value}else S.length&&(W.set(this,f,{value:g.event.trigger(g.extend(S[0],g.Event.prototype),S.slice(1),this)}),v.stopImmediatePropagation())}})}g.removeEvent=function(u,f,h){u.removeEventListener&&u.removeEventListener(f,h)},g.Event=function(u,f){if(!(this instanceof g.Event))return new g.Event(u,f);u&&u.type?(this.originalEvent=u,this.type=u.type,this.isDefaultPrevented=u.defaultPrevented||u.defaultPrevented===void 0&&u.returnValue===!1?li:Wn,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&&g.extend(this,f),this.timeStamp=u&&u.timeStamp||Date.now(),this[g.expando]=!0},g.Event.prototype={constructor:g.Event,isDefaultPrevented:Wn,isPropagationStopped:Wn,isImmediatePropagationStopped:Wn,isSimulated:!1,preventDefault:function(){var u=this.originalEvent;this.isDefaultPrevented=li,u&&!this.isSimulated&&u.preventDefault()},stopPropagation:function(){var u=this.originalEvent;this.isPropagationStopped=li,u&&!this.isSimulated&&u.stopPropagation()},stopImmediatePropagation:function(){var u=this.originalEvent;this.isImmediatePropagationStopped=li,u&&!this.isSimulated&&u.stopImmediatePropagation(),this.stopPropagation()}},g.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},g.event.addProp),g.each({focus:"focusin",blur:"focusout"},function(u,f){g.event.special[u]={setup:function(){return bs(this,u,Na),!1},trigger:function(){return bs(this,u),!0},_default:function(h){return W.get(h.target,u)},delegateType:f}}),g.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(u,f){g.event.special[u]={delegateType:f,bindType:f,handle:function(h){var v,_=this,w=h.relatedTarget,S=h.handleObj;return(!w||w!==_&&!g.contains(_,w))&&(h.type=S.origType,v=S.handler.apply(this,arguments),h.type=f),v}}}),g.fn.extend({on:function(u,f,h,v){return Vr(this,u,f,h,v)},one:function(u,f,h,v){return Vr(this,u,f,h,v,1)},off:function(u,f,h){var v,_;if(u&&u.preventDefault&&u.handleObj)return v=u.handleObj,g(u.delegateTarget).off(v.namespace?v.origType+"."+v.namespace:v.origType,v.selector,v.handler),this;if(typeof u=="object"){for(_ in u)this.off(_,f,u[_]);return this}return(f===!1||typeof f=="function")&&(h=f,f=void 0),h===!1&&(h=Wn),this.each(function(){g.event.remove(this,u,h,f)})}});var Ma=/<script|<style|<link/i,Cs=/checked\s*(?:[^=]|=\s*.checked.)/i,x3=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ab(u,f){return K(u,"table")&&K(f.nodeType!==11?f:f.firstChild,"tr")&&g(u).children("tbody")[0]||u}function S3(u){return u.type=(u.getAttribute("type")!==null)+"/"+u.type,u}function A3(u){return(u.type||"").slice(0,5)==="true/"?u.type=u.type.slice(5):u.removeAttribute("type"),u}function Eb(u,f){var h,v,_,w,S,B,M;if(f.nodeType===1){if(W.hasData(u)&&(w=W.get(u),M=w.events,M)){W.remove(f,"handle events");for(_ in M)for(h=0,v=M[_].length;h<v;h++)g.event.add(f,_,M[_][h])}Q.hasData(u)&&(S=Q.access(u),B=g.extend({},S),Q.set(f,B))}}function E3(u,f){var h=f.nodeName.toLowerCase();h==="input"&&pn.test(u.type)?f.checked=u.checked:(h==="input"||h==="textarea")&&(f.defaultValue=u.defaultValue)}function _s(u,f,h,v){f=s(f);var _,w,S,B,M,q,ee=0,ve=u.length,Z=ve-1,oe=f[0],Ke=k(oe);if(Ke||ve>1&&typeof oe=="string"&&!b.checkClone&&Cs.test(oe))return u.each(function(dt){var We=u.eq(dt);Ke&&(f[0]=oe.call(this,dt,We.html())),_s(We,f,h,v)});if(ve&&(_=Dn(f,u[0].ownerDocument,!1,u,v),w=_.firstChild,_.childNodes.length===1&&(_=w),w||v)){for(S=g.map(st(_,"script"),S3),B=S.length;ee<ve;ee++)M=_,ee!==Z&&(M=g.clone(M,!0,!0),B&&g.merge(S,st(M,"script"))),h.call(u[ee],M,ee);if(B)for(q=S[S.length-1].ownerDocument,g.map(S,A3),ee=0;ee<B;ee++)M=S[ee],Ne.test(M.type||"")&&!W.access(M,"globalEval")&&g.contains(q,M)&&(M.src&&(M.type||"").toLowerCase()!=="module"?g._evalUrl&&!M.noModule&&g._evalUrl(M.src,{nonce:M.nonce||M.getAttribute("nonce")},q):G(M.textContent.replace(x3,""),M,q))}return u}function Ob(u,f,h){for(var v,_=f?g.filter(f,u):u,w=0;(v=_[w])!=null;w++)!h&&v.nodeType===1&&g.cleanData(st(v)),v.parentNode&&(h&&ze(v)&&bt(st(v,"script")),v.parentNode.removeChild(v));return u}g.extend({htmlPrefilter:function(u){return u},clone:function(u,f,h){var v,_,w,S,B=u.cloneNode(!0),M=ze(u);if(!b.noCloneChecked&&(u.nodeType===1||u.nodeType===11)&&!g.isXMLDoc(u))for(S=st(B),w=st(u),v=0,_=w.length;v<_;v++)E3(w[v],S[v]);if(f)if(h)for(w=w||st(u),S=S||st(B),v=0,_=w.length;v<_;v++)Eb(w[v],S[v]);else Eb(u,B);return S=st(B,"script"),S.length>0&&bt(S,!M&&st(u,"script")),B},cleanData:function(u){for(var f,h,v,_=g.event.special,w=0;(h=u[w])!==void 0;w++)if(J(h)){if(f=h[W.expando]){if(f.events)for(v in f.events)_[v]?g.event.remove(h,v):g.removeEvent(h,v,f.handle);h[W.expando]=void 0}h[Q.expando]&&(h[Q.expando]=void 0)}}}),g.fn.extend({detach:function(u){return Ob(this,u,!0)},remove:function(u){return Ob(this,u)},text:function(u){return Ie(this,function(f){return f===void 0?g.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 _s(this,arguments,function(u){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=Ab(this,u);f.appendChild(u)}})},prepend:function(){return _s(this,arguments,function(u){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var f=Ab(this,u);f.insertBefore(u,f.firstChild)}})},before:function(){return _s(this,arguments,function(u){this.parentNode&&this.parentNode.insertBefore(u,this)})},after:function(){return _s(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&&(g.cleanData(st(u,!1)),u.textContent="");return this},clone:function(u,f){return u=u??!1,f=f??u,this.map(function(){return g.clone(this,u,f)})},html:function(u){return Ie(this,function(f){var h=this[0]||{},v=0,_=this.length;if(f===void 0&&h.nodeType===1)return h.innerHTML;if(typeof f=="string"&&!Ma.test(f)&&!$e[(te.exec(f)||["",""])[1].toLowerCase()]){f=g.htmlPrefilter(f);try{for(;v<_;v++)h=this[v]||{},h.nodeType===1&&(g.cleanData(st(h,!1)),h.innerHTML=f);h=0}catch{}}h&&this.empty().append(f)},null,u,arguments.length)},replaceWith:function(){var u=[];return _s(this,arguments,function(f){var h=this.parentNode;g.inArray(this,u)<0&&(g.cleanData(st(this)),h&&h.replaceChild(f,this))},u)}}),g.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(u,f){g.fn[u]=function(h){for(var v,_=[],w=g(h),S=w.length-1,B=0;B<=S;B++)v=B===S?this:this.clone(!0),g(w[B])[f](v),l.apply(_,v.get());return this.pushStack(_)}});var op=new RegExp("^("+Se+")(?!px)[a-z%]+$","i"),sp=/^--/,ju=function(u){var f=u.ownerDocument.defaultView;return(!f||!f.opener)&&(f=t),f.getComputedStyle(u)},Lb=function(u,f,h){var v,_,w={};for(_ in f)w[_]=u.style[_],u.style[_]=f[_];v=h.call(u);for(_ in f)u.style[_]=w[_];return v},O3=new RegExp(Me.join("|"),"i"),Ib="[\\x20\\t\\r\\n\\f]",L3=new RegExp("^"+Ib+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Ib+"+$","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%",Ae.appendChild(M).appendChild(q);var ee=t.getComputedStyle(q);h=ee.top!=="1%",B=f(ee.marginLeft)===12,q.style.right="60%",w=f(ee.right)===36,v=f(ee.width)===36,q.style.position="absolute",_=f(q.offsetWidth/3)===12,Ae.removeChild(M),q=null}}function f(ee){return Math.round(parseFloat(ee))}var h,v,_,w,S,B,M=P.createElement("div"),q=P.createElement("div");q.style&&(q.style.backgroundClip="content-box",q.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle=q.style.backgroundClip==="content-box",g.extend(b,{boxSizingReliable:function(){return u(),v},pixelBoxStyles:function(){return u(),w},pixelPosition:function(){return u(),h},reliableMarginLeft:function(){return u(),B},scrollboxSize:function(){return u(),_},reliableTrDimensions:function(){var ee,ve,Z,oe;return S==null&&(ee=P.createElement("table"),ve=P.createElement("tr"),Z=P.createElement("div"),ee.style.cssText="position:absolute;left:-11111px;border-collapse:separate",ve.style.cssText="border:1px solid",ve.style.height="1px",Z.style.height="9px",Z.style.display="block",Ae.appendChild(ee).appendChild(ve).appendChild(Z),oe=t.getComputedStyle(ve),S=parseInt(oe.height,10)+parseInt(oe.borderTopWidth,10)+parseInt(oe.borderBottomWidth,10)===ve.offsetHeight,Ae.removeChild(ee)),S}}))})();function Fa(u,f,h){var v,_,w,S,B=sp.test(f),M=u.style;return h=h||ju(u),h&&(S=h.getPropertyValue(f)||h[f],B&&S&&(S=S.replace(L3,"$1")||void 0),S===""&&!ze(u)&&(S=g.style(u,f)),!b.pixelBoxStyles()&&op.test(S)&&O3.test(f)&&(v=M.width,_=M.minWidth,w=M.maxWidth,M.minWidth=M.maxWidth=M.width=S,S=h.width,M.width=v,M.minWidth=_,M.maxWidth=w)),S!==void 0?S+"":S}function Pb(u,f){return{get:function(){if(u()){delete this.get;return}return(this.get=f).apply(this,arguments)}}}var Db=["Webkit","Moz","ms"],Rb=P.createElement("div").style,Nb={};function I3(u){for(var f=u[0].toUpperCase()+u.slice(1),h=Db.length;h--;)if(u=Db[h]+f,u in Rb)return u}function ap(u){var f=g.cssProps[u]||Nb[u];return f||(u in Rb?u:Nb[u]=I3(u)||u)}var P3=/^(none|table(?!-c[ea]).+)/,D3={position:"absolute",visibility:"hidden",display:"block"},Mb={letterSpacing:"0",fontWeight:"400"};function Fb(u,f,h){var v=Te.exec(f);return v?Math.max(0,v[2]-(h||0))+(v[3]||"px"):f}function lp(u,f,h,v,_,w){var S=f==="width"?1:0,B=0,M=0;if(h===(v?"border":"content"))return 0;for(;S<4;S+=2)h==="margin"&&(M+=g.css(u,h+Me[S],!0,_)),v?(h==="content"&&(M-=g.css(u,"padding"+Me[S],!0,_)),h!=="margin"&&(M-=g.css(u,"border"+Me[S]+"Width",!0,_))):(M+=g.css(u,"padding"+Me[S],!0,_),h!=="padding"?M+=g.css(u,"border"+Me[S]+"Width",!0,_):B+=g.css(u,"border"+Me[S]+"Width",!0,_));return!v&&w>=0&&(M+=Math.max(0,Math.ceil(u["offset"+f[0].toUpperCase()+f.slice(1)]-w-M-B-.5))||0),M}function $b(u,f,h){var v=ju(u),_=!b.boxSizingReliable()||h,w=_&&g.css(u,"boxSizing",!1,v)==="border-box",S=w,B=Fa(u,f,v),M="offset"+f[0].toUpperCase()+f.slice(1);if(op.test(B)){if(!h)return B;B="auto"}return(!b.boxSizingReliable()&&w||!b.reliableTrDimensions()&&K(u,"tr")||B==="auto"||!parseFloat(B)&&g.css(u,"display",!1,v)==="inline")&&u.getClientRects().length&&(w=g.css(u,"boxSizing",!1,v)==="border-box",S=M in u,S&&(B=u[M])),B=parseFloat(B)||0,B+lp(u,f,h||(w?"border":"content"),S,v,B)+"px"}g.extend({cssHooks:{opacity:{get:function(u,f){if(f){var h=Fa(u,"opacity");return h===""?"1":h}}}},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,h,v){if(!(!u||u.nodeType===3||u.nodeType===8||!u.style)){var _,w,S,B=$(f),M=sp.test(f),q=u.style;if(M||(f=ap(B)),S=g.cssHooks[f]||g.cssHooks[B],h!==void 0){if(w=typeof h,w==="string"&&(_=Te.exec(h))&&_[1]&&(h=Ct(u,f,_),w="number"),h==null||h!==h)return;w==="number"&&!M&&(h+=_&&_[3]||(g.cssNumber[B]?"":"px")),!b.clearCloneStyle&&h===""&&f.indexOf("background")===0&&(q[f]="inherit"),(!S||!("set"in S)||(h=S.set(u,h,v))!==void 0)&&(M?q.setProperty(f,h):q[f]=h)}else return S&&"get"in S&&(_=S.get(u,!1,v))!==void 0?_:q[f]}},css:function(u,f,h,v){var _,w,S,B=$(f),M=sp.test(f);return M||(f=ap(B)),S=g.cssHooks[f]||g.cssHooks[B],S&&"get"in S&&(_=S.get(u,!0,h)),_===void 0&&(_=Fa(u,f,v)),_==="normal"&&f in Mb&&(_=Mb[f]),h===""||h?(w=parseFloat(_),h===!0||isFinite(w)?w||0:_):_}}),g.each(["height","width"],function(u,f){g.cssHooks[f]={get:function(h,v,_){if(v)return P3.test(g.css(h,"display"))&&(!h.getClientRects().length||!h.getBoundingClientRect().width)?Lb(h,D3,function(){return $b(h,f,_)}):$b(h,f,_)},set:function(h,v,_){var w,S=ju(h),B=!b.scrollboxSize()&&S.position==="absolute",M=B||_,q=M&&g.css(h,"boxSizing",!1,S)==="border-box",ee=_?lp(h,f,_,q,S):0;return q&&B&&(ee-=Math.ceil(h["offset"+f[0].toUpperCase()+f.slice(1)]-parseFloat(S[f])-lp(h,f,"border",!1,S)-.5)),ee&&(w=Te.exec(v))&&(w[3]||"px")!=="px"&&(h.style[f]=v,v=g.css(h,f)),Fb(h,v,ee)}}}),g.cssHooks.marginLeft=Pb(b.reliableMarginLeft,function(u,f){if(f)return(parseFloat(Fa(u,"marginLeft"))||u.getBoundingClientRect().left-Lb(u,{marginLeft:0},function(){return u.getBoundingClientRect().left}))+"px"}),g.each({margin:"",padding:"",border:"Width"},function(u,f){g.cssHooks[u+f]={expand:function(h){for(var v=0,_={},w=typeof h=="string"?h.split(" "):[h];v<4;v++)_[u+Me[v]+f]=w[v]||w[v-2]||w[0];return _}},u!=="margin"&&(g.cssHooks[u+f].set=Fb)}),g.fn.extend({css:function(u,f){return Ie(this,function(h,v,_){var w,S,B={},M=0;if(Array.isArray(v)){for(w=ju(h),S=v.length;M<S;M++)B[v[M]]=g.css(h,v[M],!1,w);return B}return _!==void 0?g.style(h,v,_):g.css(h,v)},u,f,arguments.length>1)}});function Kn(u,f,h,v,_){return new Kn.prototype.init(u,f,h,v,_)}g.Tween=Kn,Kn.prototype={constructor:Kn,init:function(u,f,h,v,_,w){this.elem=u,this.prop=h,this.easing=_||g.easing._default,this.options=f,this.start=this.now=this.cur(),this.end=v,this.unit=w||(g.cssNumber[h]?"":"px")},cur:function(){var u=Kn.propHooks[this.prop];return u&&u.get?u.get(this):Kn.propHooks._default.get(this)},run:function(u){var f,h=Kn.propHooks[this.prop];return this.options.duration?this.pos=f=g.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),h&&h.set?h.set(this):Kn.propHooks._default.set(this),this}},Kn.prototype.init.prototype=Kn.prototype,Kn.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=g.css(u.elem,u.prop,""),!f||f==="auto"?0:f)},set:function(u){g.fx.step[u.prop]?g.fx.step[u.prop](u):u.elem.nodeType===1&&(g.cssHooks[u.prop]||u.elem.style[ap(u.prop)]!=null)?g.style(u.elem,u.prop,u.now+u.unit):u.elem[u.prop]=u.now}}},Kn.propHooks.scrollTop=Kn.propHooks.scrollLeft={set:function(u){u.elem.nodeType&&u.elem.parentNode&&(u.elem[u.prop]=u.now)}},g.easing={linear:function(u){return u},swing:function(u){return .5-Math.cos(u*Math.PI)/2},_default:"swing"},g.fx=Kn.prototype.init,g.fx.step={};var ws,Uu,R3=/^(?:toggle|show|hide)$/,N3=/queueHooks$/;function up(){Uu&&(P.hidden===!1&&t.requestAnimationFrame?t.requestAnimationFrame(up):t.setTimeout(up,g.fx.interval),g.fx.tick())}function Bb(){return t.setTimeout(function(){ws=void 0}),ws=Date.now()}function Wu(u,f){var h,v=0,_={height:u};for(f=f?1:0;v<4;v+=2-f)h=Me[v],_["margin"+h]=_["padding"+h]=u;return f&&(_.opacity=_.width=u),_}function Hb(u,f,h){for(var v,_=(Or.tweeners[f]||[]).concat(Or.tweeners["*"]),w=0,S=_.length;w<S;w++)if(v=_[w].call(h,f,u))return v}function M3(u,f,h){var v,_,w,S,B,M,q,ee,ve="width"in f||"height"in f,Z=this,oe={},Ke=u.style,dt=u.nodeType&&ut(u),We=W.get(u,"fxshow");h.queue||(S=g._queueHooks(u,"fx"),S.unqueued==null&&(S.unqueued=0,B=S.empty.fire,S.empty.fire=function(){S.unqueued||B()}),S.unqueued++,Z.always(function(){Z.always(function(){S.unqueued--,g.queue(u,"fx").length||S.empty.fire()})}));for(v in f)if(_=f[v],R3.test(_)){if(delete f[v],w=w||_==="toggle",_===(dt?"hide":"show"))if(_==="show"&&We&&We[v]!==void 0)dt=!0;else continue;oe[v]=We&&We[v]||g.style(u,v)}if(M=!g.isEmptyObject(f),!(!M&&g.isEmptyObject(oe))){ve&&u.nodeType===1&&(h.overflow=[Ke.overflow,Ke.overflowX,Ke.overflowY],q=We&&We.display,q==null&&(q=W.get(u,"display")),ee=g.css(u,"display"),ee==="none"&&(q?ee=q:(Ht([u],!0),q=u.style.display||q,ee=g.css(u,"display"),Ht([u]))),(ee==="inline"||ee==="inline-block"&&q!=null)&&g.css(u,"float")==="none"&&(M||(Z.done(function(){Ke.display=q}),q==null&&(ee=Ke.display,q=ee==="none"?"":ee)),Ke.display="inline-block")),h.overflow&&(Ke.overflow="hidden",Z.always(function(){Ke.overflow=h.overflow[0],Ke.overflowX=h.overflow[1],Ke.overflowY=h.overflow[2]})),M=!1;for(v in oe)M||(We?"hidden"in We&&(dt=We.hidden):We=W.access(u,"fxshow",{display:q}),w&&(We.hidden=!dt),dt&&Ht([u],!0),Z.done(function(){dt||Ht([u]),W.remove(u,"fxshow");for(v in oe)g.style(u,v,oe[v])})),M=Hb(dt?We[v]:0,v,Z),v in We||(We[v]=M.start,dt&&(M.end=M.start,M.start=0))}}function F3(u,f){var h,v,_,w,S;for(h in u)if(v=$(h),_=f[v],w=u[h],Array.isArray(w)&&(_=w[1],w=u[h]=w[0]),h!==v&&(u[v]=w,delete u[h]),S=g.cssHooks[v],S&&"expand"in S){w=S.expand(w),delete u[v];for(h in w)h in u||(u[h]=w[h],f[h]=_)}else f[v]=_}function Or(u,f,h){var v,_,w=0,S=Or.prefilters.length,B=g.Deferred().always(function(){delete M.elem}),M=function(){if(_)return!1;for(var ve=ws||Bb(),Z=Math.max(0,q.startTime+q.duration-ve),oe=Z/q.duration||0,Ke=1-oe,dt=0,We=q.tweens.length;dt<We;dt++)q.tweens[dt].run(Ke);return B.notifyWith(u,[q,Ke,Z]),Ke<1&&We?Z:(We||B.notifyWith(u,[q,1,0]),B.resolveWith(u,[q]),!1)},q=B.promise({elem:u,props:g.extend({},f),opts:g.extend(!0,{specialEasing:{},easing:g.easing._default},h),originalProperties:f,originalOptions:h,startTime:ws||Bb(),duration:h.duration,tweens:[],createTween:function(ve,Z){var oe=g.Tween(u,q.opts,ve,Z,q.opts.specialEasing[ve]||q.opts.easing);return q.tweens.push(oe),oe},stop:function(ve){var Z=0,oe=ve?q.tweens.length:0;if(_)return this;for(_=!0;Z<oe;Z++)q.tweens[Z].run(1);return ve?(B.notifyWith(u,[q,1,0]),B.resolveWith(u,[q,ve])):B.rejectWith(u,[q,ve]),this}}),ee=q.props;for(F3(ee,q.opts.specialEasing);w<S;w++)if(v=Or.prefilters[w].call(q,u,ee,q.opts),v)return k(v.stop)&&(g._queueHooks(q.elem,q.opts.queue).stop=v.stop.bind(v)),v;return g.map(ee,Hb,q),k(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),g.fx.timer(g.extend(M,{elem:u,anim:q,queue:q.opts.queue})),q}g.Animation=g.extend(Or,{tweeners:{"*":[function(u,f){var h=this.createTween(u,f);return Ct(h.elem,u,Te.exec(f),h),h}]},tweener:function(u,f){k(u)?(f=u,u=["*"]):u=u.match(qe);for(var h,v=0,_=u.length;v<_;v++)h=u[v],Or.tweeners[h]=Or.tweeners[h]||[],Or.tweeners[h].unshift(f)},prefilters:[M3],prefilter:function(u,f){f?Or.prefilters.unshift(u):Or.prefilters.push(u)}}),g.speed=function(u,f,h){var v=u&&typeof u=="object"?g.extend({},u):{complete:h||!h&&f||k(u)&&u,duration:u,easing:h&&f||f&&!k(f)&&f};return g.fx.off?v.duration=0:typeof v.duration!="number"&&(v.duration in g.fx.speeds?v.duration=g.fx.speeds[v.duration]:v.duration=g.fx.speeds._default),(v.queue==null||v.queue===!0)&&(v.queue="fx"),v.old=v.complete,v.complete=function(){k(v.old)&&v.old.call(this),v.queue&&g.dequeue(this,v.queue)},v},g.fn.extend({fadeTo:function(u,f,h,v){return this.filter(ut).css("opacity",0).show().end().animate({opacity:f},u,h,v)},animate:function(u,f,h,v){var _=g.isEmptyObject(u),w=g.speed(f,h,v),S=function(){var B=Or(this,g.extend({},u),w);(_||W.get(this,"finish"))&&B.stop(!0)};return S.finish=S,_||w.queue===!1?this.each(S):this.queue(w.queue,S)},stop:function(u,f,h){var v=function(_){var w=_.stop;delete _.stop,w(h)};return typeof u!="string"&&(h=f,f=u,u=void 0),f&&this.queue(u||"fx",[]),this.each(function(){var _=!0,w=u!=null&&u+"queueHooks",S=g.timers,B=W.get(this);if(w)B[w]&&B[w].stop&&v(B[w]);else for(w in B)B[w]&&B[w].stop&&N3.test(w)&&v(B[w]);for(w=S.length;w--;)S[w].elem===this&&(u==null||S[w].queue===u)&&(S[w].anim.stop(h),_=!1,S.splice(w,1));(_||!h)&&g.dequeue(this,u)})},finish:function(u){return u!==!1&&(u=u||"fx"),this.each(function(){var f,h=W.get(this),v=h[u+"queue"],_=h[u+"queueHooks"],w=g.timers,S=v?v.length:0;for(h.finish=!0,g.queue(this,u,[]),_&&_.stop&&_.stop.call(this,!0),f=w.length;f--;)w[f].elem===this&&w[f].queue===u&&(w[f].anim.stop(!0),w.splice(f,1));for(f=0;f<S;f++)v[f]&&v[f].finish&&v[f].finish.call(this);delete h.finish})}}),g.each(["toggle","show","hide"],function(u,f){var h=g.fn[f];g.fn[f]=function(v,_,w){return v==null||typeof v=="boolean"?h.apply(this,arguments):this.animate(Wu(f,!0),v,_,w)}}),g.each({slideDown:Wu("show"),slideUp:Wu("hide"),slideToggle:Wu("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(u,f){g.fn[u]=function(h,v,_){return this.animate(f,h,v,_)}}),g.timers=[],g.fx.tick=function(){var u,f=0,h=g.timers;for(ws=Date.now();f<h.length;f++)u=h[f],!u()&&h[f]===u&&h.splice(f--,1);h.length||g.fx.stop(),ws=void 0},g.fx.timer=function(u){g.timers.push(u),g.fx.start()},g.fx.interval=13,g.fx.start=function(){Uu||(Uu=!0,up())},g.fx.stop=function(){Uu=null},g.fx.speeds={slow:600,fast:200,_default:400},g.fn.delay=function(u,f){return u=g.fx&&g.fx.speeds[u]||u,f=f||"fx",this.queue(f,function(h,v){var _=t.setTimeout(h,u);v.stop=function(){t.clearTimeout(_)}})},function(){var u=P.createElement("input"),f=P.createElement("select"),h=f.appendChild(P.createElement("option"));u.type="checkbox",b.checkOn=u.value!=="",b.optSelected=h.selected,u=P.createElement("input"),u.value="t",u.type="radio",b.radioValue=u.value==="t"}();var jb,$a=g.expr.attrHandle;g.fn.extend({attr:function(u,f){return Ie(this,g.attr,u,f,arguments.length>1)},removeAttr:function(u){return this.each(function(){g.removeAttr(this,u)})}}),g.extend({attr:function(u,f,h){var v,_,w=u.nodeType;if(!(w===3||w===8||w===2)){if(typeof u.getAttribute>"u")return g.prop(u,f,h);if((w!==1||!g.isXMLDoc(u))&&(_=g.attrHooks[f.toLowerCase()]||(g.expr.match.bool.test(f)?jb:void 0)),h!==void 0){if(h===null){g.removeAttr(u,f);return}return _&&"set"in _&&(v=_.set(u,h,f))!==void 0?v:(u.setAttribute(f,h+""),h)}return _&&"get"in _&&(v=_.get(u,f))!==null?v:(v=g.find.attr(u,f),v??void 0)}},attrHooks:{type:{set:function(u,f){if(!b.radioValue&&f==="radio"&&K(u,"input")){var h=u.value;return u.setAttribute("type",f),h&&(u.value=h),f}}}},removeAttr:function(u,f){var h,v=0,_=f&&f.match(qe);if(_&&u.nodeType===1)for(;h=_[v++];)u.removeAttribute(h)}}),jb={set:function(u,f,h){return f===!1?g.removeAttr(u,h):u.setAttribute(h,h),h}},g.each(g.expr.match.bool.source.match(/\w+/g),function(u,f){var h=$a[f]||g.find.attr;$a[f]=function(v,_,w){var S,B,M=_.toLowerCase();return w||(B=$a[M],$a[M]=S,S=h(v,_,w)!=null?M:null,$a[M]=B),S}});var $3=/^(?:input|select|textarea|button)$/i,B3=/^(?:a|area)$/i;g.fn.extend({prop:function(u,f){return Ie(this,g.prop,u,f,arguments.length>1)},removeProp:function(u){return this.each(function(){delete this[g.propFix[u]||u]})}}),g.extend({prop:function(u,f,h){var v,_,w=u.nodeType;if(!(w===3||w===8||w===2))return(w!==1||!g.isXMLDoc(u))&&(f=g.propFix[f]||f,_=g.propHooks[f]),h!==void 0?_&&"set"in _&&(v=_.set(u,h,f))!==void 0?v:u[f]=h:_&&"get"in _&&(v=_.get(u,f))!==null?v:u[f]},propHooks:{tabIndex:{get:function(u){var f=g.find.attr(u,"tabindex");return f?parseInt(f,10):$3.test(u.nodeName)||B3.test(u.nodeName)&&u.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),b.optSelected||(g.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)}}),g.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){g.propFix[this.toLowerCase()]=this});function uo(u){var f=u.match(qe)||[];return f.join(" ")}function co(u){return u.getAttribute&&u.getAttribute("class")||""}function cp(u){return Array.isArray(u)?u:typeof u=="string"?u.match(qe)||[]:[]}g.fn.extend({addClass:function(u){var f,h,v,_,w,S;return k(u)?this.each(function(B){g(this).addClass(u.call(this,B,co(this)))}):(f=cp(u),f.length?this.each(function(){if(v=co(this),h=this.nodeType===1&&" "+uo(v)+" ",h){for(w=0;w<f.length;w++)_=f[w],h.indexOf(" "+_+" ")<0&&(h+=_+" ");S=uo(h),v!==S&&this.setAttribute("class",S)}}):this)},removeClass:function(u){var f,h,v,_,w,S;return k(u)?this.each(function(B){g(this).removeClass(u.call(this,B,co(this)))}):arguments.length?(f=cp(u),f.length?this.each(function(){if(v=co(this),h=this.nodeType===1&&" "+uo(v)+" ",h){for(w=0;w<f.length;w++)for(_=f[w];h.indexOf(" "+_+" ")>-1;)h=h.replace(" "+_+" "," ");S=uo(h),v!==S&&this.setAttribute("class",S)}}):this):this.attr("class","")},toggleClass:function(u,f){var h,v,_,w,S=typeof u,B=S==="string"||Array.isArray(u);return k(u)?this.each(function(M){g(this).toggleClass(u.call(this,M,co(this),f),f)}):typeof f=="boolean"&&B?f?this.addClass(u):this.removeClass(u):(h=cp(u),this.each(function(){if(B)for(w=g(this),_=0;_<h.length;_++)v=h[_],w.hasClass(v)?w.removeClass(v):w.addClass(v);else(u===void 0||S==="boolean")&&(v=co(this),v&&W.set(this,"__className__",v),this.setAttribute&&this.setAttribute("class",v||u===!1?"":W.get(this,"__className__")||""))}))},hasClass:function(u){var f,h,v=0;for(f=" "+u+" ";h=this[v++];)if(h.nodeType===1&&(" "+uo(co(h))+" ").indexOf(f)>-1)return!0;return!1}});var H3=/\r/g;g.fn.extend({val:function(u){var f,h,v,_=this[0];return arguments.length?(v=k(u),this.each(function(w){var S;this.nodeType===1&&(v?S=u.call(this,w,g(this).val()):S=u,S==null?S="":typeof S=="number"?S+="":Array.isArray(S)&&(S=g.map(S,function(B){return B==null?"":B+""})),f=g.valHooks[this.type]||g.valHooks[this.nodeName.toLowerCase()],(!f||!("set"in f)||f.set(this,S,"value")===void 0)&&(this.value=S))})):_?(f=g.valHooks[_.type]||g.valHooks[_.nodeName.toLowerCase()],f&&"get"in f&&(h=f.get(_,"value"))!==void 0?h:(h=_.value,typeof h=="string"?h.replace(H3,""):h??"")):void 0}}),g.extend({valHooks:{option:{get:function(u){var f=g.find.attr(u,"value");return f??uo(g.text(u))}},select:{get:function(u){var f,h,v,_=u.options,w=u.selectedIndex,S=u.type==="select-one",B=S?null:[],M=S?w+1:_.length;for(w<0?v=M:v=S?w:0;v<M;v++)if(h=_[v],(h.selected||v===w)&&!h.disabled&&(!h.parentNode.disabled||!K(h.parentNode,"optgroup"))){if(f=g(h).val(),S)return f;B.push(f)}return B},set:function(u,f){for(var h,v,_=u.options,w=g.makeArray(f),S=_.length;S--;)v=_[S],(v.selected=g.inArray(g.valHooks.option.get(v),w)>-1)&&(h=!0);return h||(u.selectedIndex=-1),w}}}}),g.each(["radio","checkbox"],function(){g.valHooks[this]={set:function(u,f){if(Array.isArray(f))return u.checked=g.inArray(g(u).val(),f)>-1}},b.checkOn||(g.valHooks[this].get=function(u){return u.getAttribute("value")===null?"on":u.value})}),b.focusin="onfocusin"in t;var Ub=/^(?:focusinfocus|focusoutblur)$/,Wb=function(u){u.stopPropagation()};g.extend(g.event,{trigger:function(u,f,h,v){var _,w,S,B,M,q,ee,ve,Z=[h||P],oe=y.call(u,"type")?u.type:u,Ke=y.call(u,"namespace")?u.namespace.split("."):[];if(w=ve=S=h=h||P,!(h.nodeType===3||h.nodeType===8)&&!Ub.test(oe+g.event.triggered)&&(oe.indexOf(".")>-1&&(Ke=oe.split("."),oe=Ke.shift(),Ke.sort()),M=oe.indexOf(":")<0&&"on"+oe,u=u[g.expando]?u:new g.Event(oe,typeof u=="object"&&u),u.isTrigger=v?2:3,u.namespace=Ke.join("."),u.rnamespace=u.namespace?new RegExp("(^|\\.)"+Ke.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,u.result=void 0,u.target||(u.target=h),f=f==null?[u]:g.makeArray(f,[u]),ee=g.event.special[oe]||{},!(!v&&ee.trigger&&ee.trigger.apply(h,f)===!1))){if(!v&&!ee.noBubble&&!L(h)){for(B=ee.delegateType||oe,Ub.test(B+oe)||(w=w.parentNode);w;w=w.parentNode)Z.push(w),S=w;S===(h.ownerDocument||P)&&Z.push(S.defaultView||S.parentWindow||t)}for(_=0;(w=Z[_++])&&!u.isPropagationStopped();)ve=w,u.type=_>1?B:ee.bindType||oe,q=(W.get(w,"events")||Object.create(null))[u.type]&&W.get(w,"handle"),q&&q.apply(w,f),q=M&&w[M],q&&q.apply&&J(w)&&(u.result=q.apply(w,f),u.result===!1&&u.preventDefault());return u.type=oe,!v&&!u.isDefaultPrevented()&&(!ee._default||ee._default.apply(Z.pop(),f)===!1)&&J(h)&&M&&k(h[oe])&&!L(h)&&(S=h[M],S&&(h[M]=null),g.event.triggered=oe,u.isPropagationStopped()&&ve.addEventListener(oe,Wb),h[oe](),u.isPropagationStopped()&&ve.removeEventListener(oe,Wb),g.event.triggered=void 0,S&&(h[M]=S)),u.result}},simulate:function(u,f,h){var v=g.extend(new g.Event,h,{type:u,isSimulated:!0});g.event.trigger(v,null,f)}}),g.fn.extend({trigger:function(u,f){return this.each(function(){g.event.trigger(u,f,this)})},triggerHandler:function(u,f){var h=this[0];if(h)return g.event.trigger(u,f,h,!0)}}),b.focusin||g.each({focus:"focusin",blur:"focusout"},function(u,f){var h=function(v){g.event.simulate(f,v.target,g.event.fix(v))};g.event.special[f]={setup:function(){var v=this.ownerDocument||this.document||this,_=W.access(v,f);_||v.addEventListener(u,h,!0),W.access(v,f,(_||0)+1)},teardown:function(){var v=this.ownerDocument||this.document||this,_=W.access(v,f)-1;_?W.access(v,f,_):(v.removeEventListener(u,h,!0),W.remove(v,f))}}});var Ba=t.location,Kb={guid:Date.now()},fp=/\?/;g.parseXML=function(u){var f,h;if(!u||typeof u!="string")return null;try{f=new t.DOMParser().parseFromString(u,"text/xml")}catch{}return h=f&&f.getElementsByTagName("parsererror")[0],(!f||h)&&g.error("Invalid XML: "+(h?g.map(h.childNodes,function(v){return v.textContent}).join(`
|
||
`):u)),f};var j3=/\[\]$/,Vb=/\r?\n/g,U3=/^(?:submit|button|image|reset|file)$/i,W3=/^(?:input|select|textarea|keygen)/i;function dp(u,f,h,v){var _;if(Array.isArray(f))g.each(f,function(w,S){h||j3.test(u)?v(u,S):dp(u+"["+(typeof S=="object"&&S!=null?w:"")+"]",S,h,v)});else if(!h&&x(f)==="object")for(_ in f)dp(u+"["+_+"]",f[_],h,v);else v(u,f)}g.param=function(u,f){var h,v=[],_=function(w,S){var B=k(S)?S():S;v[v.length]=encodeURIComponent(w)+"="+encodeURIComponent(B??"")};if(u==null)return"";if(Array.isArray(u)||u.jquery&&!g.isPlainObject(u))g.each(u,function(){_(this.name,this.value)});else for(h in u)dp(h,u[h],f,_);return v.join("&")},g.fn.extend({serialize:function(){return g.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var u=g.prop(this,"elements");return u?g.makeArray(u):this}).filter(function(){var u=this.type;return this.name&&!g(this).is(":disabled")&&W3.test(this.nodeName)&&!U3.test(u)&&(this.checked||!pn.test(u))}).map(function(u,f){var h=g(this).val();return h==null?null:Array.isArray(h)?g.map(h,function(v){return{name:f.name,value:v.replace(Vb,`\r
|
||
`)}}):{name:f.name,value:h.replace(Vb,`\r
|
||
`)}}).get()}});var K3=/%20/g,V3=/#.*$/,q3=/([?&])_=[^&]*/,z3=/^(.*?):[ \t]*([^\r\n]*)$/mg,G3=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Y3=/^(?:GET|HEAD)$/,X3=/^\/\//,qb={},pp={},zb="*/".concat("*"),hp=P.createElement("a");hp.href=Ba.href;function Gb(u){return function(f,h){typeof f!="string"&&(h=f,f="*");var v,_=0,w=f.toLowerCase().match(qe)||[];if(k(h))for(;v=w[_++];)v[0]==="+"?(v=v.slice(1)||"*",(u[v]=u[v]||[]).unshift(h)):(u[v]=u[v]||[]).push(h)}}function Yb(u,f,h,v){var _={},w=u===pp;function S(B){var M;return _[B]=!0,g.each(u[B]||[],function(q,ee){var ve=ee(f,h,v);if(typeof ve=="string"&&!w&&!_[ve])return f.dataTypes.unshift(ve),S(ve),!1;if(w)return!(M=ve)}),M}return S(f.dataTypes[0])||!_["*"]&&S("*")}function gp(u,f){var h,v,_=g.ajaxSettings.flatOptions||{};for(h in f)f[h]!==void 0&&((_[h]?u:v||(v={}))[h]=f[h]);return v&&g.extend(!0,u,v),u}function J3(u,f,h){for(var v,_,w,S,B=u.contents,M=u.dataTypes;M[0]==="*";)M.shift(),v===void 0&&(v=u.mimeType||f.getResponseHeader("Content-Type"));if(v){for(_ in B)if(B[_]&&B[_].test(v)){M.unshift(_);break}}if(M[0]in h)w=M[0];else{for(_ in h){if(!M[0]||u.converters[_+" "+M[0]]){w=_;break}S||(S=_)}w=w||S}if(w)return w!==M[0]&&M.unshift(w),h[w]}function Z3(u,f,h,v){var _,w,S,B,M,q={},ee=u.dataTypes.slice();if(ee[1])for(S in u.converters)q[S.toLowerCase()]=u.converters[S];for(w=ee.shift();w;)if(u.responseFields[w]&&(h[u.responseFields[w]]=f),!M&&v&&u.dataFilter&&(f=u.dataFilter(f,u.dataType)),M=w,w=ee.shift(),w){if(w==="*")w=M;else if(M!=="*"&&M!==w){if(S=q[M+" "+w]||q["* "+w],!S){for(_ in q)if(B=_.split(" "),B[1]===w&&(S=q[M+" "+B[0]]||q["* "+B[0]],S)){S===!0?S=q[_]:q[_]!==!0&&(w=B[0],ee.unshift(B[1]));break}}if(S!==!0)if(S&&u.throws)f=S(f);else try{f=S(f)}catch(ve){return{state:"parsererror",error:S?ve:"No conversion from "+M+" to "+w}}}}return{state:"success",data:f}}g.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ba.href,type:"GET",isLocal:G3.test(Ba.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zb,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":g.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(u,f){return f?gp(gp(u,g.ajaxSettings),f):gp(g.ajaxSettings,u)},ajaxPrefilter:Gb(qb),ajaxTransport:Gb(pp),ajax:function(u,f){typeof u=="object"&&(f=u,u=void 0),f=f||{};var h,v,_,w,S,B,M,q,ee,ve,Z=g.ajaxSetup({},f),oe=Z.context||Z,Ke=Z.context&&(oe.nodeType||oe.jquery)?g(oe):g.event,dt=g.Deferred(),We=g.Callbacks("once memory"),un=Z.statusCode||{},en={},rr={},Lt="canceled",ft={readyState:0,getResponseHeader:function(kt){var Wt;if(M){if(!w)for(w={};Wt=z3.exec(_);)w[Wt[1].toLowerCase()+" "]=(w[Wt[1].toLowerCase()+" "]||[]).concat(Wt[2]);Wt=w[kt.toLowerCase()+" "]}return Wt==null?null:Wt.join(", ")},getAllResponseHeaders:function(){return M?_:null},setRequestHeader:function(kt,Wt){return M==null&&(kt=rr[kt.toLowerCase()]=rr[kt.toLowerCase()]||kt,en[kt]=Wt),this},overrideMimeType:function(kt){return M==null&&(Z.mimeType=kt),this},statusCode:function(kt){var Wt;if(kt)if(M)ft.always(kt[ft.status]);else for(Wt in kt)un[Wt]=[un[Wt],kt[Wt]];return this},abort:function(kt){var Wt=kt||Lt;return h&&h.abort(Wt),Vn(0,Wt),this}};if(dt.promise(ft),Z.url=((u||Z.url||Ba.href)+"").replace(X3,Ba.protocol+"//"),Z.type=f.method||f.type||Z.method||Z.type,Z.dataTypes=(Z.dataType||"*").toLowerCase().match(qe)||[""],Z.crossDomain==null){B=P.createElement("a");try{B.href=Z.url,B.href=B.href,Z.crossDomain=hp.protocol+"//"+hp.host!=B.protocol+"//"+B.host}catch{Z.crossDomain=!0}}if(Z.data&&Z.processData&&typeof Z.data!="string"&&(Z.data=g.param(Z.data,Z.traditional)),Yb(qb,Z,f,ft),M)return ft;q=g.event&&Z.global,q&&g.active++===0&&g.event.trigger("ajaxStart"),Z.type=Z.type.toUpperCase(),Z.hasContent=!Y3.test(Z.type),v=Z.url.replace(V3,""),Z.hasContent?Z.data&&Z.processData&&(Z.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Z.data=Z.data.replace(K3,"+")):(ve=Z.url.slice(v.length),Z.data&&(Z.processData||typeof Z.data=="string")&&(v+=(fp.test(v)?"&":"?")+Z.data,delete Z.data),Z.cache===!1&&(v=v.replace(q3,"$1"),ve=(fp.test(v)?"&":"?")+"_="+Kb.guid+++ve),Z.url=v+ve),Z.ifModified&&(g.lastModified[v]&&ft.setRequestHeader("If-Modified-Since",g.lastModified[v]),g.etag[v]&&ft.setRequestHeader("If-None-Match",g.etag[v])),(Z.data&&Z.hasContent&&Z.contentType!==!1||f.contentType)&&ft.setRequestHeader("Content-Type",Z.contentType),ft.setRequestHeader("Accept",Z.dataTypes[0]&&Z.accepts[Z.dataTypes[0]]?Z.accepts[Z.dataTypes[0]]+(Z.dataTypes[0]!=="*"?", "+zb+"; q=0.01":""):Z.accepts["*"]);for(ee in Z.headers)ft.setRequestHeader(ee,Z.headers[ee]);if(Z.beforeSend&&(Z.beforeSend.call(oe,ft,Z)===!1||M))return ft.abort();if(Lt="abort",We.add(Z.complete),ft.done(Z.success),ft.fail(Z.error),h=Yb(pp,Z,f,ft),!h)Vn(-1,"No Transport");else{if(ft.readyState=1,q&&Ke.trigger("ajaxSend",[ft,Z]),M)return ft;Z.async&&Z.timeout>0&&(S=t.setTimeout(function(){ft.abort("timeout")},Z.timeout));try{M=!1,h.send(en,Vn)}catch(kt){if(M)throw kt;Vn(-1,kt)}}function Vn(kt,Wt,ja,Ku){var ir,fo,po,qn,Ii,Cr=Wt;M||(M=!0,S&&t.clearTimeout(S),h=void 0,_=Ku||"",ft.readyState=kt>0?4:0,ir=kt>=200&&kt<300||kt===304,ja&&(qn=J3(Z,ft,ja)),!ir&&g.inArray("script",Z.dataTypes)>-1&&g.inArray("json",Z.dataTypes)<0&&(Z.converters["text script"]=function(){}),qn=Z3(Z,qn,ft,ir),ir?(Z.ifModified&&(Ii=ft.getResponseHeader("Last-Modified"),Ii&&(g.lastModified[v]=Ii),Ii=ft.getResponseHeader("etag"),Ii&&(g.etag[v]=Ii)),kt===204||Z.type==="HEAD"?Cr="nocontent":kt===304?Cr="notmodified":(Cr=qn.state,fo=qn.data,po=qn.error,ir=!po)):(po=Cr,(kt||!Cr)&&(Cr="error",kt<0&&(kt=0))),ft.status=kt,ft.statusText=(Wt||Cr)+"",ir?dt.resolveWith(oe,[fo,Cr,ft]):dt.rejectWith(oe,[ft,Cr,po]),ft.statusCode(un),un=void 0,q&&Ke.trigger(ir?"ajaxSuccess":"ajaxError",[ft,Z,ir?fo:po]),We.fireWith(oe,[ft,Cr]),q&&(Ke.trigger("ajaxComplete",[ft,Z]),--g.active||g.event.trigger("ajaxStop")))}return ft},getJSON:function(u,f,h){return g.get(u,f,h,"json")},getScript:function(u,f){return g.get(u,void 0,f,"script")}}),g.each(["get","post"],function(u,f){g[f]=function(h,v,_,w){return k(v)&&(w=w||_,_=v,v=void 0),g.ajax(g.extend({url:h,type:f,dataType:w,data:v,success:_},g.isPlainObject(h)&&h))}}),g.ajaxPrefilter(function(u){var f;for(f in u.headers)f.toLowerCase()==="content-type"&&(u.contentType=u.headers[f]||"")}),g._evalUrl=function(u,f,h){return g.ajax({url:u,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(v){g.globalEval(v,f,h)}})},g.fn.extend({wrapAll:function(u){var f;return this[0]&&(k(u)&&(u=u.call(this[0])),f=g(u,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&f.insertBefore(this[0]),f.map(function(){for(var h=this;h.firstElementChild;)h=h.firstElementChild;return h}).append(this)),this},wrapInner:function(u){return k(u)?this.each(function(f){g(this).wrapInner(u.call(this,f))}):this.each(function(){var f=g(this),h=f.contents();h.length?h.wrapAll(u):f.append(u)})},wrap:function(u){var f=k(u);return this.each(function(h){g(this).wrapAll(f?u.call(this,h):u)})},unwrap:function(u){return this.parent(u).not("body").each(function(){g(this).replaceWith(this.childNodes)}),this}}),g.expr.pseudos.hidden=function(u){return!g.expr.pseudos.visible(u)},g.expr.pseudos.visible=function(u){return!!(u.offsetWidth||u.offsetHeight||u.getClientRects().length)},g.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch{}};var Q3={0:200,1223:204},Ha=g.ajaxSettings.xhr();b.cors=!!Ha&&"withCredentials"in Ha,b.ajax=Ha=!!Ha,g.ajaxTransport(function(u){var f,h;if(b.cors||Ha&&!u.crossDomain)return{send:function(v,_){var w,S=u.xhr();if(S.open(u.type,u.url,u.async,u.username,u.password),u.xhrFields)for(w in u.xhrFields)S[w]=u.xhrFields[w];u.mimeType&&S.overrideMimeType&&S.overrideMimeType(u.mimeType),!u.crossDomain&&!v["X-Requested-With"]&&(v["X-Requested-With"]="XMLHttpRequest");for(w in v)S.setRequestHeader(w,v[w]);f=function(B){return function(){f&&(f=h=S.onload=S.onerror=S.onabort=S.ontimeout=S.onreadystatechange=null,B==="abort"?S.abort():B==="error"?typeof S.status!="number"?_(0,"error"):_(S.status,S.statusText):_(Q3[S.status]||S.status,S.statusText,(S.responseType||"text")!=="text"||typeof S.responseText!="string"?{binary:S.response}:{text:S.responseText},S.getAllResponseHeaders()))}},S.onload=f(),h=S.onerror=S.ontimeout=f("error"),S.onabort!==void 0?S.onabort=h:S.onreadystatechange=function(){S.readyState===4&&t.setTimeout(function(){f&&h()})},f=f("abort");try{S.send(u.hasContent&&u.data||null)}catch(B){if(f)throw B}},abort:function(){f&&f()}}}),g.ajaxPrefilter(function(u){u.crossDomain&&(u.contents.script=!1)}),g.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 g.globalEval(u),u}}}),g.ajaxPrefilter("script",function(u){u.cache===void 0&&(u.cache=!1),u.crossDomain&&(u.type="GET")}),g.ajaxTransport("script",function(u){if(u.crossDomain||u.scriptAttrs){var f,h;return{send:function(v,_){f=g("<script>").attr(u.scriptAttrs||{}).prop({charset:u.scriptCharset,src:u.url}).on("load error",h=function(w){f.remove(),h=null,w&&_(w.type==="error"?404:200,w.type)}),P.head.appendChild(f[0])},abort:function(){h&&h()}}}});var Xb=[],mp=/(=)\?(?=&|$)|\?\?/;g.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var u=Xb.pop()||g.expando+"_"+Kb.guid++;return this[u]=!0,u}}),g.ajaxPrefilter("json jsonp",function(u,f,h){var v,_,w,S=u.jsonp!==!1&&(mp.test(u.url)?"url":typeof u.data=="string"&&(u.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&mp.test(u.data)&&"data");if(S||u.dataTypes[0]==="jsonp")return v=u.jsonpCallback=k(u.jsonpCallback)?u.jsonpCallback():u.jsonpCallback,S?u[S]=u[S].replace(mp,"$1"+v):u.jsonp!==!1&&(u.url+=(fp.test(u.url)?"&":"?")+u.jsonp+"="+v),u.converters["script json"]=function(){return w||g.error(v+" was not called"),w[0]},u.dataTypes[0]="json",_=t[v],t[v]=function(){w=arguments},h.always(function(){_===void 0?g(t).removeProp(v):t[v]=_,u[v]&&(u.jsonpCallback=f.jsonpCallback,Xb.push(v)),w&&k(_)&&_(w[0]),w=_=void 0}),"script"}),b.createHTMLDocument=function(){var u=P.implementation.createHTMLDocument("").body;return u.innerHTML="<form></form><form></form>",u.childNodes.length===2}(),g.parseHTML=function(u,f,h){if(typeof u!="string")return[];typeof f=="boolean"&&(h=f,f=!1);var v,_,w;return f||(b.createHTMLDocument?(f=P.implementation.createHTMLDocument(""),v=f.createElement("base"),v.href=P.location.href,f.head.appendChild(v)):f=P),_=z.exec(u),w=!h&&[],_?[f.createElement(_[1])]:(_=Dn([u],f,w),w&&w.length&&g(w).remove(),g.merge([],_.childNodes))},g.fn.load=function(u,f,h){var v,_,w,S=this,B=u.indexOf(" ");return B>-1&&(v=uo(u.slice(B)),u=u.slice(0,B)),k(f)?(h=f,f=void 0):f&&typeof f=="object"&&(_="POST"),S.length>0&&g.ajax({url:u,type:_||"GET",dataType:"html",data:f}).done(function(M){w=arguments,S.html(v?g("<div>").append(g.parseHTML(M)).find(v):M)}).always(h&&function(M,q){S.each(function(){h.apply(this,w||[M.responseText,q,M])})}),this},g.expr.pseudos.animated=function(u){return g.grep(g.timers,function(f){return u===f.elem}).length},g.offset={setOffset:function(u,f,h){var v,_,w,S,B,M,q,ee=g.css(u,"position"),ve=g(u),Z={};ee==="static"&&(u.style.position="relative"),B=ve.offset(),w=g.css(u,"top"),M=g.css(u,"left"),q=(ee==="absolute"||ee==="fixed")&&(w+M).indexOf("auto")>-1,q?(v=ve.position(),S=v.top,_=v.left):(S=parseFloat(w)||0,_=parseFloat(M)||0),k(f)&&(f=f.call(u,h,g.extend({},B))),f.top!=null&&(Z.top=f.top-B.top+S),f.left!=null&&(Z.left=f.left-B.left+_),"using"in f?f.using.call(u,Z):ve.css(Z)}},g.fn.extend({offset:function(u){if(arguments.length)return u===void 0?this:this.each(function(_){g.offset.setOffset(this,u,_)});var f,h,v=this[0];if(v)return v.getClientRects().length?(f=v.getBoundingClientRect(),h=v.ownerDocument.defaultView,{top:f.top+h.pageYOffset,left:f.left+h.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var u,f,h,v=this[0],_={top:0,left:0};if(g.css(v,"position")==="fixed")f=v.getBoundingClientRect();else{for(f=this.offset(),h=v.ownerDocument,u=v.offsetParent||h.documentElement;u&&(u===h.body||u===h.documentElement)&&g.css(u,"position")==="static";)u=u.parentNode;u&&u!==v&&u.nodeType===1&&(_=g(u).offset(),_.top+=g.css(u,"borderTopWidth",!0),_.left+=g.css(u,"borderLeftWidth",!0))}return{top:f.top-_.top-g.css(v,"marginTop",!0),left:f.left-_.left-g.css(v,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var u=this.offsetParent;u&&g.css(u,"position")==="static";)u=u.offsetParent;return u||Ae})}}),g.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(u,f){var h=f==="pageYOffset";g.fn[u]=function(v){return Ie(this,function(_,w,S){var B;if(L(_)?B=_:_.nodeType===9&&(B=_.defaultView),S===void 0)return B?B[f]:_[w];B?B.scrollTo(h?B.pageXOffset:S,h?S:B.pageYOffset):_[w]=S},u,v,arguments.length)}}),g.each(["top","left"],function(u,f){g.cssHooks[f]=Pb(b.pixelPosition,function(h,v){if(v)return v=Fa(h,f),op.test(v)?g(h).position()[f]+"px":v})}),g.each({Height:"height",Width:"width"},function(u,f){g.each({padding:"inner"+u,content:f,"":"outer"+u},function(h,v){g.fn[v]=function(_,w){var S=arguments.length&&(h||typeof _!="boolean"),B=h||(_===!0||w===!0?"margin":"border");return Ie(this,function(M,q,ee){var ve;return L(M)?v.indexOf("outer")===0?M["inner"+u]:M.document.documentElement["client"+u]:M.nodeType===9?(ve=M.documentElement,Math.max(M.body["scroll"+u],ve["scroll"+u],M.body["offset"+u],ve["offset"+u],ve["client"+u])):ee===void 0?g.css(M,q,B):g.style(M,q,ee,B)},f,S?_:void 0,S)}})}),g.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(u,f){g.fn[f]=function(h){return this.on(f,h)}}),g.fn.extend({bind:function(u,f,h){return this.on(u,null,f,h)},unbind:function(u,f){return this.off(u,null,f)},delegate:function(u,f,h,v){return this.on(f,u,h,v)},undelegate:function(u,f,h){return arguments.length===1?this.off(u,"**"):this.off(f,u||"**",h)},hover:function(u,f){return this.mouseenter(u).mouseleave(f||u)}}),g.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){g.fn[f]=function(h,v){return arguments.length>0?this.on(f,null,h,v):this.trigger(f)}});var e5=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;g.proxy=function(u,f){var h,v,_;if(typeof f=="string"&&(h=u[f],f=u,u=h),!!k(u))return v=o.call(arguments,2),_=function(){return u.apply(f||this,v.concat(o.call(arguments)))},_.guid=u.guid=u.guid||g.guid++,_},g.holdReady=function(u){u?g.readyWait++:g.ready(!0)},g.isArray=Array.isArray,g.parseJSON=JSON.parse,g.nodeName=K,g.isFunction=k,g.isWindow=L,g.camelCase=$,g.type=x,g.now=Date.now,g.isNumeric=function(u){var f=g.type(u);return(f==="number"||f==="string")&&!isNaN(u-parseFloat(u))},g.trim=function(u){return u==null?"":(u+"").replace(e5,"$1")};var t5=t.jQuery,n5=t.$;return g.noConflict=function(u){return t.$===g&&(t.$=n5),u&&t.jQuery===g&&(t.jQuery=t5),g},typeof n>"u"&&(t.jQuery=t.$=g),g})}($d)),$d.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:k,remove:L,error:d,getContainer:p,info:y,options:{},subscribe:m,success:C,version:"2.1.4",warning:b},c;return l;function d(A,D,H){return g({type:s.error,iconClass:le().iconClasses.error,message:A,optionsOverride:H,title:D})}function p(A,D){return A||(A=le()),r=n("#"+A.containerId),r.length||D&&(r=G(A)),r}function y(A,D,H){return g({type:s.info,iconClass:le().iconClasses.info,message:A,optionsOverride:H,title:D})}function m(A){i=A}function C(A,D,H){return g({type:s.success,iconClass:le().iconClasses.success,message:A,optionsOverride:H,title:D})}function b(A,D,H){return g({type:s.warning,iconClass:le().iconClasses.warning,message:A,optionsOverride:H,title:D})}function k(A,D){var H=le();r||p(H),j(A,H,D)||P(H)}function L(A){var D=le();if(r||p(D),A&&n(":focus",A).length===0){I(A);return}r.children().length&&r.remove()}function P(A){for(var D=r.children(),H=D.length-1;H>=0;H--)j(n(D[H]),A)}function j(A,D,H){var K=H&&H.force?H.force:!1;return A&&(K||n(":focus",A).length===0)?(A[D.hideMethod]({duration:D.hideDuration,easing:D.hideEasing,complete:function(){I(A)}}),!0):!1}function G(A){return r=n("<div/>").attr("id",A.containerId).addClass(A.positionClass),r.appendTo(n(A.target)),r}function x(){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 X(A){i&&i(A)}function g(A){var D=le(),H=A.iconClass||D.iconClass;if(typeof A.optionsOverride<"u"&&(D=n.extend(D,A.optionsOverride),H=A.optionsOverride.iconClass||H),R(D,A))return;o++,r=p(D,!0);var K=null,z=n("<div/>"),de=n("<div/>"),je=n("<div/>"),Re=n("<div/>"),Y=n(D.closeHtml),se={intervalId:null,hideEta:null,maxHideTime:null},ge={toastId:o,state:"visible",startTime:new Date,options:D,map:A};return qe(),ke(),Ce(),X(ge),D.debug&&console&&console.log(ge),z;function it(Q){return Q==null&&(Q=""),Q.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function qe(){Ee(),He(),Ze(),Ie(),ot(),vt(),Le(),ie()}function ie(){var Q="";switch(A.iconClass){case"toast-success":case"toast-info":Q="polite";break;default:Q="assertive"}z.attr("aria-live",Q)}function Ce(){D.closeOnHover&&z.hover(ne,J),!D.onclick&&D.tapToDismiss&&z.click($),D.closeButton&&Y&&Y.click(function(Q){Q.stopPropagation?Q.stopPropagation():Q.cancelBubble!==void 0&&Q.cancelBubble!==!0&&(Q.cancelBubble=!0),D.onCloseClick&&D.onCloseClick(Q),$(!0)}),D.onclick&&z.click(function(Q){D.onclick(Q),$()})}function ke(){z.hide(),z[D.showMethod]({duration:D.showDuration,easing:D.showEasing,complete:D.onShown}),D.timeOut>0&&(K=setTimeout($,D.timeOut),se.maxHideTime=parseFloat(D.timeOut),se.hideEta=new Date().getTime()+se.maxHideTime,D.progressBar&&(se.intervalId=setInterval(W,10)))}function Ee(){A.iconClass&&z.addClass(D.toastClass).addClass(H)}function Le(){D.newestOnTop?r.prepend(z):r.append(z)}function He(){if(A.title){var Q=A.title;D.escapeHtml&&(Q=it(A.title)),de.append(Q).addClass(D.titleClass),z.append(de)}}function Ze(){if(A.message){var Q=A.message;D.escapeHtml&&(Q=it(A.message)),je.append(Q).addClass(D.messageClass),z.append(je)}}function Ie(){D.closeButton&&(Y.addClass(D.closeClass).attr("role","button"),z.prepend(Y))}function ot(){D.progressBar&&(Re.addClass(D.progressClass),z.prepend(Re))}function vt(){D.rtl&&z.addClass("rtl")}function R(Q,we){if(Q.preventDuplicates){if(we.message===c)return!0;c=we.message}return!1}function $(Q){var we=Q&&D.closeMethod!==!1?D.closeMethod:D.hideMethod,me=Q&&D.closeDuration!==!1?D.closeDuration:D.hideDuration,_e=Q&&D.closeEasing!==!1?D.closeEasing:D.hideEasing;if(!(n(":focus",z).length&&!Q))return clearTimeout(se.intervalId),z[we]({duration:me,easing:_e,complete:function(){I(z),clearTimeout(K),D.onHidden&&ge.state!=="hidden"&&D.onHidden(),ge.state="hidden",ge.endTime=new Date,X(ge)}})}function J(){(D.timeOut>0||D.extendedTimeOut>0)&&(K=setTimeout($,D.extendedTimeOut),se.maxHideTime=parseFloat(D.extendedTimeOut),se.hideEta=new Date().getTime()+se.maxHideTime)}function ne(){clearTimeout(K),se.hideEta=0,z.stop(!0,!0)[D.showMethod]({duration:D.showDuration,easing:D.showEasing})}function W(){var Q=(se.hideEta-new Date().getTime())/se.maxHideTime*100;Re.width(Q+"%")}}function le(){return n.extend({},x(),l.options)}function I(A){r||(r=p()),!A.is(":visible")&&(A.remove(),A=null,r.children().length===0&&(r.remove(),c=void 0))}}()})})(function(t,n){e.exports?e.exports=n(PH()):window.toastr=n(window.jQuery)})})(P0);var DH=P0.exports;const RH=Bl(DH);var R0={exports:{}};/*!
|
||
* clipboard.js v2.0.11
|
||
* https://clipboardjs.com/
|
||
*
|
||
* Licensed MIT © Zeno Rocha
|
||
*/(function(e,t){(function(r,i){e.exports=i()})(of,function(){return function(){var n={686:function(o,s,l){l.d(s,{default:function(){return qe}});var c=l(279),d=l.n(c),p=l(370),y=l.n(p),m=l(817),C=l.n(m);function b(ie){try{return document.execCommand(ie)}catch{return!1}}var k=function(Ce){var ke=C()(Ce);return b("cut"),ke},L=k;function P(ie){var Ce=document.documentElement.getAttribute("dir")==="rtl",ke=document.createElement("textarea");ke.style.fontSize="12pt",ke.style.border="0",ke.style.padding="0",ke.style.margin="0",ke.style.position="absolute",ke.style[Ce?"right":"left"]="-9999px";var Ee=window.pageYOffset||document.documentElement.scrollTop;return ke.style.top="".concat(Ee,"px"),ke.setAttribute("readonly",""),ke.value=ie,ke}var j=function(Ce,ke){var Ee=P(Ce);ke.container.appendChild(Ee);var Le=C()(Ee);return b("copy"),Ee.remove(),Le},G=function(Ce){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},Ee="";return typeof Ce=="string"?Ee=j(Ce,ke):Ce instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(Ce==null?void 0:Ce.type)?Ee=j(Ce.value,ke):(Ee=C()(Ce),b("copy")),Ee},x=G;function X(ie){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?X=function(ke){return typeof ke}:X=function(ke){return ke&&typeof Symbol=="function"&&ke.constructor===Symbol&&ke!==Symbol.prototype?"symbol":typeof ke},X(ie)}var g=function(){var Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ke=Ce.action,Ee=ke===void 0?"copy":ke,Le=Ce.container,He=Ce.target,Ze=Ce.text;if(Ee!=="copy"&&Ee!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(He!==void 0)if(He&&X(He)==="object"&&He.nodeType===1){if(Ee==="copy"&&He.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(Ee==="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(Ze)return x(Ze,{container:Le});if(He)return Ee==="cut"?L(He):x(He,{container:Le})},le=g;function I(ie){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?I=function(ke){return typeof ke}:I=function(ke){return ke&&typeof Symbol=="function"&&ke.constructor===Symbol&&ke!==Symbol.prototype?"symbol":typeof ke},I(ie)}function A(ie,Ce){if(!(ie instanceof Ce))throw new TypeError("Cannot call a class as a function")}function D(ie,Ce){for(var ke=0;ke<Ce.length;ke++){var Ee=Ce[ke];Ee.enumerable=Ee.enumerable||!1,Ee.configurable=!0,"value"in Ee&&(Ee.writable=!0),Object.defineProperty(ie,Ee.key,Ee)}}function H(ie,Ce,ke){return Ce&&D(ie.prototype,Ce),ke&&D(ie,ke),ie}function K(ie,Ce){if(typeof Ce!="function"&&Ce!==null)throw new TypeError("Super expression must either be null or a function");ie.prototype=Object.create(Ce&&Ce.prototype,{constructor:{value:ie,writable:!0,configurable:!0}}),Ce&&z(ie,Ce)}function z(ie,Ce){return z=Object.setPrototypeOf||function(Ee,Le){return Ee.__proto__=Le,Ee},z(ie,Ce)}function de(ie){var Ce=Y();return function(){var Ee=se(ie),Le;if(Ce){var He=se(this).constructor;Le=Reflect.construct(Ee,arguments,He)}else Le=Ee.apply(this,arguments);return je(this,Le)}}function je(ie,Ce){return Ce&&(I(Ce)==="object"||typeof Ce=="function")?Ce:Re(ie)}function Re(ie){if(ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ie}function Y(){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 se(ie){return se=Object.setPrototypeOf?Object.getPrototypeOf:function(ke){return ke.__proto__||Object.getPrototypeOf(ke)},se(ie)}function ge(ie,Ce){var ke="data-clipboard-".concat(ie);if(Ce.hasAttribute(ke))return Ce.getAttribute(ke)}var it=function(ie){K(ke,ie);var Ce=de(ke);function ke(Ee,Le){var He;return A(this,ke),He=Ce.call(this),He.resolveOptions(Le),He.listenClick(Ee),He}return H(ke,[{key:"resolveOptions",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Le.action=="function"?Le.action:this.defaultAction,this.target=typeof Le.target=="function"?Le.target:this.defaultTarget,this.text=typeof Le.text=="function"?Le.text:this.defaultText,this.container=I(Le.container)==="object"?Le.container:document.body}},{key:"listenClick",value:function(Le){var He=this;this.listener=y()(Le,"click",function(Ze){return He.onClick(Ze)})}},{key:"onClick",value:function(Le){var He=Le.delegateTarget||Le.currentTarget,Ze=this.action(He)||"copy",Ie=le({action:Ze,container:this.container,target:this.target(He),text:this.text(He)});this.emit(Ie?"success":"error",{action:Ze,text:Ie,trigger:He,clearSelection:function(){He&&He.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Le){return ge("action",Le)}},{key:"defaultTarget",value:function(Le){var He=ge("target",Le);if(He)return document.querySelector(He)}},{key:"defaultText",value:function(Le){return ge("text",Le)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Le){var He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return x(Le,He)}},{key:"cut",value:function(Le){return L(Le)}},{key:"isSupported",value:function(){var Le=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],He=typeof Le=="string"?[Le]:Le,Ze=!!document.queryCommandSupported;return He.forEach(function(Ie){Ze=Ze&&!!document.queryCommandSupported(Ie)}),Ze}}]),ke}(d()),qe=it},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,p){for(;d&&d.nodeType!==s;){if(typeof d.matches=="function"&&d.matches(p))return d;d=d.parentNode}}o.exports=c},438:function(o,s,l){var c=l(828);function d(m,C,b,k,L){var P=y.apply(this,arguments);return m.addEventListener(b,P,L),{destroy:function(){m.removeEventListener(b,P,L)}}}function p(m,C,b,k,L){return typeof m.addEventListener=="function"?d.apply(null,arguments):typeof b=="function"?d.bind(null,document).apply(null,arguments):(typeof m=="string"&&(m=document.querySelectorAll(m)),Array.prototype.map.call(m,function(P){return d(P,C,b,k,L)}))}function y(m,C,b,k){return function(L){L.delegateTarget=c(L.target,C),L.delegateTarget&&k.call(m,L)}}o.exports=p},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 p(b,k,L){if(!b&&!k&&!L)throw new Error("Missing required arguments");if(!c.string(k))throw new TypeError("Second argument must be a String");if(!c.fn(L))throw new TypeError("Third argument must be a Function");if(c.node(b))return y(b,k,L);if(c.nodeList(b))return m(b,k,L);if(c.string(b))return C(b,k,L);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function y(b,k,L){return b.addEventListener(k,L),{destroy:function(){b.removeEventListener(k,L)}}}function m(b,k,L){return Array.prototype.forEach.call(b,function(P){P.addEventListener(k,L)}),{destroy:function(){Array.prototype.forEach.call(b,function(P){P.removeEventListener(k,L)})}}}function C(b,k,L){return d(document.body,b,k,L)}o.exports=p},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 p=window.getSelection(),y=document.createRange();y.selectNodeContents(l),p.removeAllRanges(),p.addRange(y),c=p.toString()}return c}o.exports=s},279:function(o){function s(){}s.prototype={on:function(l,c,d){var p=this.e||(this.e={});return(p[l]||(p[l]=[])).push({fn:c,ctx:d}),this},once:function(l,c,d){var p=this;function y(){p.off(l,y),c.apply(d,arguments)}return y._=c,this.on(l,y,d)},emit:function(l){var c=[].slice.call(arguments,1),d=((this.e||(this.e={}))[l]||[]).slice(),p=0,y=d.length;for(p;p<y;p++)d[p].fn.apply(d[p].ctx,c);return this},off:function(l,c){var d=this.e||(this.e={}),p=d[l],y=[];if(p&&c)for(var m=0,C=p.length;m<C;m++)p[m].fn!==c&&p[m].fn._!==c&&y.push(p[m]);return y.length?d[l]=y: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})})(R0);var NH=R0.exports;const MH=Bl(NH),FH=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 MH(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 N0(e,t){return function(){return e.apply(t,arguments)}}const{toString:$H}=Object.prototype,{getPrototypeOf:Bd}=Object,Au=(e=>t=>{const n=$H.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ur=e=>(e=e.toLowerCase(),t=>Au(t)===e),Eu=e=>t=>typeof t===e,{isArray:gs}=Array,Oa=Eu("undefined");function BH(e){return e!==null&&!Oa(e)&&e.constructor!==null&&!Oa(e.constructor)&&br(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const M0=Ur("ArrayBuffer");function HH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&M0(e.buffer),t}const jH=Eu("string"),br=Eu("function"),F0=Eu("number"),Ou=e=>e!==null&&typeof e=="object",UH=e=>e===!0||e===!1,Lu=e=>{if(Au(e)!=="object")return!1;const t=Bd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},WH=Ur("Date"),KH=Ur("File"),VH=Ur("Blob"),qH=Ur("FileList"),zH=e=>Ou(e)&&br(e.pipe),GH=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||br(e.append)&&((t=Au(e))==="formdata"||t==="object"&&br(e.toString)&&e.toString()==="[object FormData]"))},YH=Ur("URLSearchParams"),XH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function La(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),gs(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 $0(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 B0=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),H0=e=>!Oa(e)&&e!==B0;function Hd(){const{caseless:e}=H0(this)&&this||{},t={},n=(r,i)=>{const o=e&&$0(t,i)||i;Lu(t[o])&&Lu(r)?t[o]=Hd(t[o],r):Lu(r)?t[o]=Hd({},r):gs(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&La(arguments[r],n);return t}const JH=(e,t,n,{allOwnKeys:r}={})=>(La(t,(i,o)=>{n&&br(i)?e[o]=N0(i,n):e[o]=i},{allOwnKeys:r}),e),ZH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QH=(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)},ej=(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&&Bd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tj=(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},nj=e=>{if(!e)return null;if(gs(e))return e;let t=e.length;if(!F0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rj=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bd(Uint8Array)),ij=(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])}},oj=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sj=Ur("HTMLFormElement"),aj=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),j0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lj=Ur("RegExp"),U0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};La(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},uj=e=>{U0(e,(t,n)=>{if(br(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(br(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+"'")})}})},cj=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return gs(e)?r(e):r(String(e).split(t)),n},fj=()=>{},dj=(e,t)=>(e=+e,Number.isFinite(e)?e:t),jd="abcdefghijklmnopqrstuvwxyz",W0="0123456789",K0={DIGIT:W0,ALPHA:jd,ALPHA_DIGIT:jd+jd.toUpperCase()+W0},pj=(e=16,t=K0.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function hj(e){return!!(e&&br(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gj=e=>{const t=new Array(10),n=(r,i)=>{if(Ou(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=gs(r)?[]:{};return La(r,(s,l)=>{const c=n(s,i+1);!Oa(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},mj=Ur("AsyncFunction"),ce={isArray:gs,isArrayBuffer:M0,isBuffer:BH,isFormData:GH,isArrayBufferView:HH,isString:jH,isNumber:F0,isBoolean:UH,isObject:Ou,isPlainObject:Lu,isUndefined:Oa,isDate:WH,isFile:KH,isBlob:VH,isRegExp:lj,isFunction:br,isStream:zH,isURLSearchParams:YH,isTypedArray:rj,isFileList:qH,forEach:La,merge:Hd,extend:JH,trim:XH,stripBOM:ZH,inherits:QH,toFlatObject:ej,kindOf:Au,kindOfTest:Ur,endsWith:tj,toArray:nj,forEachEntry:ij,matchAll:oj,isHTMLForm:sj,hasOwnProperty:j0,hasOwnProp:j0,reduceDescriptors:U0,freezeMethods:uj,toObjectSet:cj,toCamelCase:aj,noop:fj,toFiniteNumber:dj,findKey:$0,global:B0,isContextDefined:H0,ALPHABET:K0,generateString:pj,isSpecCompliantForm:hj,toJSONObject:gj,isAsyncFn:mj,isThenable:e=>e&&(Ou(e)||br(e))&&br(e.then)&&br(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)}ce.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:ce.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const V0=Tt.prototype,q0={};["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=>{q0[e]={value:e}}),Object.defineProperties(Tt,q0),Object.defineProperty(V0,"isAxiosError",{value:!0}),Tt.from=(e,t,n,r,i,o)=>{const s=Object.create(V0);return ce.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 vj=null;function Ud(e){return ce.isPlainObject(e)||ce.isArray(e)}function z0(e){return ce.endsWith(e,"[]")?e.slice(0,-2):e}function G0(e,t,n){return e?e.concat(t).map(function(i,o){return i=z0(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function yj(e){return ce.isArray(e)&&!e.some(Ud)}const bj=ce.toFlatObject(ce,{},null,function(t){return/^is[A-Z]/.test(t)});function Iu(e,t,n){if(!ce.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ce.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,L){return!ce.isUndefined(L[k])});const r=n.metaTokens,i=n.visitor||p,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&ce.isSpecCompliantForm(t);if(!ce.isFunction(i))throw new TypeError("visitor must be a function");function d(b){if(b===null)return"";if(ce.isDate(b))return b.toISOString();if(!c&&ce.isBlob(b))throw new Tt("Blob is not supported. Use a Buffer instead.");return ce.isArrayBuffer(b)||ce.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function p(b,k,L){let P=b;if(b&&!L&&typeof b=="object"){if(ce.endsWith(k,"{}"))k=r?k:k.slice(0,-2),b=JSON.stringify(b);else if(ce.isArray(b)&&yj(b)||(ce.isFileList(b)||ce.endsWith(k,"[]"))&&(P=ce.toArray(b)))return k=z0(k),P.forEach(function(G,x){!(ce.isUndefined(G)||G===null)&&t.append(s===!0?G0([k],x,o):s===null?k:k+"[]",d(G))}),!1}return Ud(b)?!0:(t.append(G0(L,k,o),d(b)),!1)}const y=[],m=Object.assign(bj,{defaultVisitor:p,convertValue:d,isVisitable:Ud});function C(b,k){if(!ce.isUndefined(b)){if(y.indexOf(b)!==-1)throw Error("Circular reference detected in "+k.join("."));y.push(b),ce.forEach(b,function(P,j){(!(ce.isUndefined(P)||P===null)&&i.call(t,P,ce.isString(j)?j.trim():j,k,m))===!0&&C(P,k?k.concat(j):[j])}),y.pop()}}if(!ce.isObject(e))throw new TypeError("data must be an object");return C(e),t}function Y0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wd(e,t){this._pairs=[],e&&Iu(e,this,t)}const X0=Wd.prototype;X0.append=function(t,n){this._pairs.push([t,n])},X0.toString=function(t){const n=t?function(r){return t.call(this,r,Y0)}:Y0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Cj(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function J0(e,t,n){if(!t)return e;const r=n&&n.encode||Cj,i=n&&n.serialize;let o;if(i?o=i(t,n):o=ce.isURLSearchParams(t)?t.toString():new Wd(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class _j{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){ce.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Z0=_j,Q0={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wj=typeof URLSearchParams<"u"?URLSearchParams:Wd,Tj=typeof FormData<"u"?FormData:null,kj=typeof Blob<"u"?Blob:null,xj=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Sj=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Wr={isBrowser:!0,classes:{URLSearchParams:wj,FormData:Tj,Blob:kj},isStandardBrowserEnv:xj,isStandardBrowserWebWorkerEnv:Sj,protocols:["http","https","file","blob","url","data"]};function Aj(e,t){return Iu(e,new Wr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Wr.isNode&&ce.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Ej(e){return ce.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Oj(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 eb(e){function t(n,r,i,o){let s=n[o++];const l=Number.isFinite(+s),c=o>=n.length;return s=!s&&ce.isArray(i)?i.length:s,c?(ce.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!ce.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&ce.isArray(i[s])&&(i[s]=Oj(i[s])),!l)}if(ce.isFormData(e)&&ce.isFunction(e.entries)){const n={};return ce.forEachEntry(e,(r,i)=>{t(Ej(r),i,n,0)}),n}return null}const Lj={"Content-Type":void 0};function Ij(e,t,n){if(ce.isString(e))try{return(t||JSON.parse)(e),ce.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Pu={transitional:Q0,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=ce.isObject(t);if(o&&ce.isHTMLForm(t)&&(t=new FormData(t)),ce.isFormData(t))return i&&i?JSON.stringify(eb(t)):t;if(ce.isArrayBuffer(t)||ce.isBuffer(t)||ce.isStream(t)||ce.isFile(t)||ce.isBlob(t))return t;if(ce.isArrayBufferView(t))return t.buffer;if(ce.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 Aj(t,this.formSerializer).toString();if((l=ce.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Iu(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Ij(t)):t}],transformResponse:[function(t){const n=this.transitional||Pu.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&ce.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:Wr.classes.FormData,Blob:Wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ce.forEach(["delete","get","head"],function(t){Pu.headers[t]={}}),ce.forEach(["post","put","patch"],function(t){Pu.headers[t]=ce.merge(Lj)});const Kd=Pu,Pj=ce.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"]),Dj=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]&&Pj[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},tb=Symbol("internals");function Ia(e){return e&&String(e).trim().toLowerCase()}function Du(e){return e===!1||e==null?e:ce.isArray(e)?e.map(Du):String(e)}function Rj(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 Nj=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vd(e,t,n,r,i){if(ce.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ce.isString(t)){if(ce.isString(r))return t.indexOf(r)!==-1;if(ce.isRegExp(r))return r.test(t)}}function Mj(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Fj(e,t){const n=ce.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 Ru{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(l,c,d){const p=Ia(c);if(!p)throw new Error("header name must be a non-empty string");const y=ce.findKey(i,p);(!y||i[y]===void 0||d===!0||d===void 0&&i[y]!==!1)&&(i[y||c]=Du(l))}const s=(l,c)=>ce.forEach(l,(d,p)=>o(d,p,c));return ce.isPlainObject(t)||t instanceof this.constructor?s(t,n):ce.isString(t)&&(t=t.trim())&&!Nj(t)?s(Dj(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Ia(t),t){const r=ce.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Rj(i);if(ce.isFunction(n))return n.call(this,i,r);if(ce.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ia(t),t){const r=ce.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Vd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Ia(s),s){const l=ce.findKey(r,s);l&&(!n||Vd(r,r[l],l,n))&&(delete r[l],i=!0)}}return ce.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||Vd(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return ce.forEach(this,(i,o)=>{const s=ce.findKey(r,o);if(s){n[s]=Du(i),delete n[o];return}const l=t?Mj(o):String(o).trim();l!==o&&delete n[o],n[l]=Du(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ce.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ce.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[tb]=this[tb]={accessors:{}}).accessors,i=this.prototype;function o(s){const l=Ia(s);r[l]||(Fj(i,s),r[l]=!0)}return ce.isArray(t)?t.forEach(o):o(t),this}}Ru.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ce.freezeMethods(Ru.prototype),ce.freezeMethods(Ru);const si=Ru;function qd(e,t){const n=this||Kd,r=t||n,i=si.from(r.headers);let o=r.data;return ce.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function nb(e){return!!(e&&e.__CANCEL__)}function Pa(e,t,n){Tt.call(this,e??"canceled",Tt.ERR_CANCELED,t,n),this.name="CanceledError"}ce.inherits(Pa,Tt,{__CANCEL__:!0});function $j(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 Bj=Wr.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,l){const c=[];c.push(n+"="+encodeURIComponent(r)),ce.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),ce.isString(o)&&c.push("path="+o),ce.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 Hj(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jj(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function rb(e,t){return e&&!Hj(t)?jj(e,t):t}const Uj=Wr.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=ce.isString(s)?i(s):s;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function Wj(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Kj(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(),p=r[o];s||(s=d),n[i]=c,r[i]=d;let y=o,m=0;for(;y!==i;)m+=n[y++],y=y%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),d-s<t)return;const C=p&&d-p;return C?Math.round(m*1e3/C):void 0}}function ib(e,t){let n=0;const r=Kj(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 p={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};p[t?"download":"upload"]=!0,e(p)}}const Nu={http:vj,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const o=si.from(e.headers).normalize(),s=e.responseType;let l;function c(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}ce.isFormData(i)&&(Wr.isStandardBrowserEnv||Wr.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let d=new XMLHttpRequest;if(e.auth){const C=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(C+":"+b))}const p=rb(e.baseURL,e.url);d.open(e.method.toUpperCase(),J0(p,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function y(){if(!d)return;const C=si.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),k={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:C,config:e,request:d};$j(function(P){n(P),c()},function(P){r(P),c()},k),d=null}if("onloadend"in d?d.onloadend=y:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(y)},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 b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const k=e.transitional||Q0;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),r(new Tt(b,k.clarifyTimeoutError?Tt.ETIMEDOUT:Tt.ECONNABORTED,e,d)),d=null},Wr.isStandardBrowserEnv){const C=(e.withCredentials||Uj(p))&&e.xsrfCookieName&&Bj.read(e.xsrfCookieName);C&&o.set(e.xsrfHeaderName,C)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&ce.forEach(o.toJSON(),function(b,k){d.setRequestHeader(k,b)}),ce.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),s&&s!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",ib(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",ib(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=C=>{d&&(r(!C||C.type?new Pa(null,e,d):C),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const m=Wj(p);if(m&&Wr.protocols.indexOf(m)===-1){r(new Tt("Unsupported protocol "+m+":",Tt.ERR_BAD_REQUEST,e));return}d.send(i||null)})}};ce.forEach(Nu,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Vj={getAdapter:e=>{e=ce.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=ce.isString(n)?Nu[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new Tt(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ce.hasOwnProp(Nu,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!ce.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Nu};function zd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pa(null,e)}function ob(e){return zd(e),e.headers=si.from(e.headers),e.data=qd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Vj.getAdapter(e.adapter||Kd.adapter)(e).then(function(r){return zd(e),r.data=qd.call(e,e.transformResponse,r),r.headers=si.from(r.headers),r},function(r){return nb(r)||(zd(e),r&&r.response&&(r.response.data=qd.call(e,e.transformResponse,r.response),r.response.headers=si.from(r.response.headers))),Promise.reject(r)})}const sb=e=>e instanceof si?e.toJSON():e;function ms(e,t){t=t||{};const n={};function r(d,p,y){return ce.isPlainObject(d)&&ce.isPlainObject(p)?ce.merge.call({caseless:y},d,p):ce.isPlainObject(p)?ce.merge({},p):ce.isArray(p)?p.slice():p}function i(d,p,y){if(ce.isUndefined(p)){if(!ce.isUndefined(d))return r(void 0,d,y)}else return r(d,p,y)}function o(d,p){if(!ce.isUndefined(p))return r(void 0,p)}function s(d,p){if(ce.isUndefined(p)){if(!ce.isUndefined(d))return r(void 0,d)}else return r(void 0,p)}function l(d,p,y){if(y in t)return r(d,p);if(y 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,p)=>i(sb(d),sb(p),!0)};return ce.forEach(Object.keys(Object.assign({},e,t)),function(p){const y=c[p]||i,m=y(e[p],t[p],p);ce.isUndefined(m)&&y!==l||(n[p]=m)}),n}const ab="1.4.0",Gd={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gd[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lb={};Gd.transitional=function(t,n,r){function i(o,s){return"[Axios v"+ab+"] 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&&!lb[s]&&(lb[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 qj(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 Yd={assertOptions:qj,validators:Gd},Li=Yd.validators;class Mu{constructor(t){this.defaults=t,this.interceptors={request:new Z0,response:new Z0}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ms(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yd.assertOptions(r,{silentJSONParsing:Li.transitional(Li.boolean),forcedJSONParsing:Li.transitional(Li.boolean),clarifyTimeoutError:Li.transitional(Li.boolean)},!1),i!=null&&(ce.isFunction(i)?n.paramsSerializer={serialize:i}:Yd.assertOptions(i,{encode:Li.function,serialize:Li.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&ce.merge(o.common,o[n.method]),s&&ce.forEach(["delete","get","head","post","put","patch","common"],b=>{delete o[b]}),n.headers=si.concat(s,o);const l=[];let c=!0;this.interceptors.request.forEach(function(k){typeof k.runWhen=="function"&&k.runWhen(n)===!1||(c=c&&k.synchronous,l.unshift(k.fulfilled,k.rejected))});const d=[];this.interceptors.response.forEach(function(k){d.push(k.fulfilled,k.rejected)});let p,y=0,m;if(!c){const b=[ob.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,d),m=b.length,p=Promise.resolve(n);y<m;)p=p.then(b[y++],b[y++]);return p}m=l.length;let C=n;for(y=0;y<m;){const b=l[y++],k=l[y++];try{C=b(C)}catch(L){k.call(this,L);break}}try{p=ob.call(this,C)}catch(b){return Promise.reject(b)}for(y=0,m=d.length;y<m;)p=p.then(d[y++],d[y++]);return p}getUri(t){t=ms(this.defaults,t);const n=rb(t.baseURL,t.url);return J0(n,t.params,t.paramsSerializer)}}ce.forEach(["delete","get","head","options"],function(t){Mu.prototype[t]=function(n,r){return this.request(ms(r||{},{method:t,url:n,data:(r||{}).data}))}}),ce.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,l){return this.request(ms(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Mu.prototype[t]=n(),Mu.prototype[t+"Form"]=n(!0)});const Fu=Mu;class Xd{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 Pa(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 Xd(function(i){t=i}),cancel:t}}}const zj=Xd;function Gj(e){return function(n){return e.apply(null,n)}}function Yj(e){return ce.isObject(e)&&e.isAxiosError===!0}const Jd={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(Jd).forEach(([e,t])=>{Jd[t]=e});const Xj=Jd;function ub(e){const t=new Fu(e),n=N0(Fu.prototype.request,t);return ce.extend(n,Fu.prototype,t,{allOwnKeys:!0}),ce.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return ub(ms(e,i))},n}const an=ub(Kd);an.Axios=Fu,an.CanceledError=Pa,an.CancelToken=zj,an.isCancel=nb,an.VERSION=ab,an.toFormData=Iu,an.AxiosError=Tt,an.Cancel=an.CanceledError,an.all=function(t){return Promise.all(t)},an.spread=Gj,an.isAxiosError=Yj,an.mergeConfig=ms,an.AxiosHeaders=si,an.formToJSON=e=>eb(ce.isHTMLForm(e)?new FormData(e):e),an.HttpStatusCode=Xj,an.default=an;const Jj=an;class Zj{constructor(){sC(this,"apiBaseURL","");this.apiBaseURL=pe.apiUrl(),this.api=Jj.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 Qj={data(){return{gradioAPI:null}},beforeMount(){this.gradioAPI=new Zj},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[r.name.toLowerCase()]=r.name}),this.embeddings=n}else if(t.name==="lora"||t.name==="lycoris"){let n={};t.items.forEach(r=>{n[r.name.toLowerCase()]=r.name,r.output_name&&(n[r.output_name.toLowerCase()]=r.name)}),t.name==="lora"?this.loras=n:this.lycos=n}}))})},getExtraNetworkFullName(e,t="lora"){var n,r,i;if(typeof this.extraNetworks!="object")return e;for(let o of this.extraNetworks){if(o.name!==t)continue;const s=e.toLowerCase();for(let l of o.items)if(l.name.toLowerCase()===s||((n=l.output_name)==null?void 0:n.toLowerCase())===s)return(r=l.civitai_info)!=null&&r.name?(i=l.civitai_info.model)!=null&&i.name&&l.civitai_info.model.name!==l.civitai_info.name?"["+l.civitai_info.name+"] "+l.civitai_info.model.name:l.civitai_info.name:e}return e},loraExists(e){return typeof this.loras!="object"?e:this.loras[e.toLowerCase()]??!1},lycoExists(e){return typeof this.lycos!="object"?e:this.lycos[e.toLowerCase()]??!1},embeddingExists(e){return typeof this.embeddings!="object"?e:this.embeddings[e.toLowerCase()]??!1}}};var e3="tippy-box",cb="tippy-content",t3="tippy-backdrop",fb="tippy-arrow",db="tippy-svg-arrow",lo={passive:!0,capture:!0},pb=function(){return document.body};function Zd(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Qd(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function hb(e,t){return typeof e=="function"?e.apply(void 0,t):e}function gb(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function n3(e){return e.split(/\s+/).filter(Boolean)}function vs(e){return[].concat(e)}function mb(e,t){e.indexOf(t)===-1&&e.push(t)}function r3(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function i3(e){return e.split("-")[0]}function $u(e){return[].slice.call(e)}function vb(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Da(){return document.createElement("div")}function Bu(e){return["Element","Fragment"].some(function(t){return Qd(e,t)})}function o3(e){return Qd(e,"NodeList")}function s3(e){return Qd(e,"MouseEvent")}function a3(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function l3(e){return Bu(e)?[e]:o3(e)?$u(e):Array.isArray(e)?e:$u(document.querySelectorAll(e))}function ep(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function yb(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function u3(e){var t,n=vs(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function c3(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=i3(s.placement),p=s.modifiersData.offset;if(!p)return!0;var y=d==="bottom"?p.top.y:0,m=d==="top"?p.bottom.y:0,C=d==="right"?p.left.x:0,b=d==="left"?p.right.x:0,k=o.top-r+y>c,L=r-o.bottom-m>c,P=o.left-n+C>c,j=n-o.right-b>c;return k||L||P||j})}function tp(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function bb(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 Kr={isTouch:!1},Cb=0;function f3(){Kr.isTouch||(Kr.isTouch=!0,window.performance&&document.addEventListener("mousemove",_b))}function _b(){var e=performance.now();e-Cb<20&&(Kr.isTouch=!1,document.removeEventListener("mousemove",_b)),Cb=e}function d3(){var e=document.activeElement;if(a3(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function p3(){document.addEventListener("touchstart",f3,lo),window.addEventListener("blur",d3)}var h3=typeof window<"u"&&typeof document<"u",g3=h3?!!window.msCrypto:!1,m3={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},v3={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},Er=Object.assign({appendTo:pb,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},m3,v3),y3=Object.keys(Er),b3=function(t){var n=Object.keys(t);n.forEach(function(r){Er[r]=t[r]})};function wb(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=Er[o])!=null?l:s}return r},{});return Object.assign({},e,n)}function C3(e,t){var n=t?Object.keys(wb(Object.assign({},Er,{plugins:t}))):y3,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:hb(t.content,[e])},t.ignoreAttributes?{}:C3(e,t.plugins));return n.aria=Object.assign({},Er.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 _3=function(){return"innerHTML"};function np(e,t){e[_3()]=t}function kb(e){var t=Da();return e===!0?t.className=fb:(t.className=db,Bu(e)?t.appendChild(e):np(t,e)),t}function xb(e,t){Bu(t.content)?(np(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?np(e,t.content):e.textContent=t.content)}function rp(e){var t=e.firstElementChild,n=$u(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(cb)}),arrow:n.find(function(r){return r.classList.contains(fb)||r.classList.contains(db)}),backdrop:n.find(function(r){return r.classList.contains(t3)})}}function Sb(e){var t=Da(),n=Da();n.className=e3,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Da();r.className=cb,r.setAttribute("data-state","hidden"),xb(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,s){var l=rp(t),c=l.box,d=l.content,p=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)&&xb(d,e.props),s.arrow?p?o.arrow!==s.arrow&&(c.removeChild(p),c.appendChild(kb(s.arrow))):c.appendChild(kb(s.arrow)):p&&c.removeChild(p)}return{popper:t,onUpdate:i}}Sb.$$tippy=!0;var w3=1,Hu=[],ip=[];function T3(e,t){var n=Tb(e,Object.assign({},Er,wb(vb(t)))),r,i,o,s=!1,l=!1,c=!1,d=!1,p,y,m,C=[],b=gb(J,n.interactiveDebounce),k,L=w3++,P=null,j=r3(n.plugins),G={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:L,reference:e,popper:Da(),popperInstance:P,props:n,state:G,plugins:j,clearDelayTimeouts:ze,setProps:pt,setContent:ut,show:Ct,hide:Ft,hideWithInteractivity:ln,enable:Me,disable:Ae,unmount:Ht,destroy:pn};if(!n.render)return x;var X=n.render(x),g=X.popper,le=X.onUpdate;g.setAttribute("data-tippy-root",""),g.id="tippy-"+x.id,x.popper=g,e._tippy=x,g._tippy=x;var I=j.map(function(te){return te.fn(x)}),A=e.hasAttribute("aria-expanded");return vt(),it(),Y(),se("onCreate",[x]),n.showOnCreate&&Se(),g.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),g.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&de().addEventListener("mousemove",b)}),x;function D(){var te=x.props.touch;return Array.isArray(te)?te:[te,0]}function H(){return D()[0]==="hold"}function K(){var te;return!!((te=x.props.render)!=null&&te.$$tippy)}function z(){return k||e}function de(){var te=z().parentNode;return te?u3(te):document}function je(){return rp(g)}function Re(te){return x.state.isMounted&&!x.state.isVisible||Kr.isTouch||p&&p.type==="focus"?0:Zd(x.props.delay,te?0:1,Er.delay)}function Y(te){te===void 0&&(te=!1),g.style.pointerEvents=x.props.interactive&&!te?"":"none",g.style.zIndex=""+x.props.zIndex}function se(te,Ne,$e){if($e===void 0&&($e=!0),I.forEach(function(bt){bt[te]&&bt[te].apply(bt,Ne)}),$e){var st;(st=x.props)[te].apply(st,Ne)}}function ge(){var te=x.props.aria;if(te.content){var Ne="aria-"+te.content,$e=g.id,st=vs(x.props.triggerTarget||e);st.forEach(function(bt){var bn=bt.getAttribute(Ne);if(x.state.isVisible)bt.setAttribute(Ne,bn?bn+" "+$e:$e);else{var Dn=bn&&bn.replace($e,"").trim();Dn?bt.setAttribute(Ne,Dn):bt.removeAttribute(Ne)}})}}function it(){if(!(A||!x.props.aria.expanded)){var te=vs(x.props.triggerTarget||e);te.forEach(function(Ne){x.props.interactive?Ne.setAttribute("aria-expanded",x.state.isVisible&&Ne===z()?"true":"false"):Ne.removeAttribute("aria-expanded")})}}function qe(){de().removeEventListener("mousemove",b),Hu=Hu.filter(function(te){return te!==b})}function ie(te){if(!(Kr.isTouch&&(c||te.type==="mousedown"))){var Ne=te.composedPath&&te.composedPath()[0]||te.target;if(!(x.props.interactive&&bb(g,Ne))){if(vs(x.props.triggerTarget||e).some(function($e){return bb($e,Ne)})){if(Kr.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else se("onClickOutside",[x,te]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),l=!0,setTimeout(function(){l=!1}),x.state.isMounted||Le())}}}function Ce(){c=!0}function ke(){c=!1}function Ee(){var te=de();te.addEventListener("mousedown",ie,!0),te.addEventListener("touchend",ie,lo),te.addEventListener("touchstart",ke,lo),te.addEventListener("touchmove",Ce,lo)}function Le(){var te=de();te.removeEventListener("mousedown",ie,!0),te.removeEventListener("touchend",ie,lo),te.removeEventListener("touchstart",ke,lo),te.removeEventListener("touchmove",Ce,lo)}function He(te,Ne){Ie(te,function(){!x.state.isVisible&&g.parentNode&&g.parentNode.contains(g)&&Ne()})}function Ze(te,Ne){Ie(te,Ne)}function Ie(te,Ne){var $e=je().box;function st(bt){bt.target===$e&&(tp($e,"remove",st),Ne())}if(te===0)return Ne();tp($e,"remove",y),tp($e,"add",st),y=st}function ot(te,Ne,$e){$e===void 0&&($e=!1);var st=vs(x.props.triggerTarget||e);st.forEach(function(bt){bt.addEventListener(te,Ne,$e),C.push({node:bt,eventType:te,handler:Ne,options:$e})})}function vt(){H()&&(ot("touchstart",$,{passive:!0}),ot("touchend",ne,{passive:!0})),n3(x.props.trigger).forEach(function(te){if(te!=="manual")switch(ot(te,$),te){case"mouseenter":ot("mouseleave",ne);break;case"focus":ot(g3?"focusout":"blur",W);break;case"focusin":ot("focusout",W);break}})}function R(){C.forEach(function(te){var Ne=te.node,$e=te.eventType,st=te.handler,bt=te.options;Ne.removeEventListener($e,st,bt)}),C=[]}function $(te){var Ne,$e=!1;if(!(!x.state.isEnabled||Q(te)||l)){var st=((Ne=p)==null?void 0:Ne.type)==="focus";p=te,k=te.currentTarget,it(),!x.state.isVisible&&s3(te)&&Hu.forEach(function(bt){return bt(te)}),te.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||s)&&x.props.hideOnClick!==!1&&x.state.isVisible?$e=!0:Se(te),te.type==="click"&&(s=!$e),$e&&!st&&Te(te)}}function J(te){var Ne=te.target,$e=z().contains(Ne)||g.contains(Ne);if(!(te.type==="mousemove"&&$e)){var st=ue().concat(g).map(function(bt){var bn,Dn=bt._tippy,ai=(bn=Dn.popperInstance)==null?void 0:bn.state;return ai?{popperRect:bt.getBoundingClientRect(),popperState:ai,props:n}:null}).filter(Boolean);c3(st,te)&&(qe(),Te(te))}}function ne(te){var Ne=Q(te)||x.props.trigger.indexOf("click")>=0&&s;if(!Ne){if(x.props.interactive){x.hideWithInteractivity(te);return}Te(te)}}function W(te){x.props.trigger.indexOf("focusin")<0&&te.target!==z()||x.props.interactive&&te.relatedTarget&&g.contains(te.relatedTarget)||Te(te)}function Q(te){return Kr.isTouch?H()!==te.type.indexOf("touch")>=0:!1}function we(){me();var te=x.props,Ne=te.popperOptions,$e=te.placement,st=te.offset,bt=te.getReferenceClientRect,bn=te.moveTransition,Dn=K()?rp(g).arrow:null,ai=bt?{getBoundingClientRect:bt,contextElement:bt.contextElement||z()}:e,li={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ys){var Vr=ys.state;if(K()){var bs=je(),Ma=bs.box;["placement","reference-hidden","escaped"].forEach(function(Cs){Cs==="placement"?Ma.setAttribute("data-placement",Vr.placement):Vr.attributes.popper["data-popper-"+Cs]?Ma.setAttribute("data-"+Cs,""):Ma.removeAttribute("data-"+Cs)}),Vr.attributes.popper={}}}},Wn=[{name:"offset",options:{offset:st}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!bn}},li];K()&&Dn&&Wn.push({name:"arrow",options:{element:Dn,padding:3}}),Wn.push.apply(Wn,(Ne==null?void 0:Ne.modifiers)||[]),x.popperInstance=bm(ai,g,Object.assign({},Ne,{placement:$e,onFirstUpdate:m,modifiers:Wn}))}function me(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function _e(){var te=x.props.appendTo,Ne,$e=z();x.props.interactive&&te===pb||te==="parent"?Ne=$e.parentNode:Ne=hb(te,[$e]),Ne.contains(g)||Ne.appendChild(g),x.state.isMounted=!0,we()}function ue(){return $u(g.querySelectorAll("[data-tippy-root]"))}function Se(te){x.clearDelayTimeouts(),te&&se("onTrigger",[x,te]),Ee();var Ne=Re(!0),$e=D(),st=$e[0],bt=$e[1];Kr.isTouch&&st==="hold"&&bt&&(Ne=bt),Ne?r=setTimeout(function(){x.show()},Ne):x.show()}function Te(te){if(x.clearDelayTimeouts(),se("onUntrigger",[x,te]),!x.state.isVisible){Le();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(te.type)>=0&&s)){var Ne=Re(!1);Ne?i=setTimeout(function(){x.state.isVisible&&x.hide()},Ne):o=requestAnimationFrame(function(){x.hide()})}}function Me(){x.state.isEnabled=!0}function Ae(){x.hide(),x.state.isEnabled=!1}function ze(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function pt(te){if(!x.state.isDestroyed){se("onBeforeUpdate",[x,te]),R();var Ne=x.props,$e=Tb(e,Object.assign({},Ne,vb(te),{ignoreAttributes:!0}));x.props=$e,vt(),Ne.interactiveDebounce!==$e.interactiveDebounce&&(qe(),b=gb(J,$e.interactiveDebounce)),Ne.triggerTarget&&!$e.triggerTarget?vs(Ne.triggerTarget).forEach(function(st){st.removeAttribute("aria-expanded")}):$e.triggerTarget&&e.removeAttribute("aria-expanded"),it(),Y(),le&&le(Ne,$e),x.popperInstance&&(we(),ue().forEach(function(st){requestAnimationFrame(st._tippy.popperInstance.forceUpdate)})),se("onAfterUpdate",[x,te])}}function ut(te){x.setProps({content:te})}function Ct(){var te=x.state.isVisible,Ne=x.state.isDestroyed,$e=!x.state.isEnabled,st=Kr.isTouch&&!x.props.touch,bt=Zd(x.props.duration,0,Er.duration);if(!(te||Ne||$e||st)&&!z().hasAttribute("disabled")&&(se("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,K()&&(g.style.visibility="visible"),Y(),Ee(),x.state.isMounted||(g.style.transition="none"),K()){var bn=je(),Dn=bn.box,ai=bn.content;ep([Dn,ai],0)}m=function(){var Wn;if(!(!x.state.isVisible||d)){if(d=!0,g.offsetHeight,g.style.transition=x.props.moveTransition,K()&&x.props.animation){var Na=je(),ys=Na.box,Vr=Na.content;ep([ys,Vr],bt),yb([ys,Vr],"visible")}ge(),it(),mb(ip,x),(Wn=x.popperInstance)==null||Wn.forceUpdate(),se("onMount",[x]),x.props.animation&&K()&&Ze(bt,function(){x.state.isShown=!0,se("onShown",[x])})}},_e()}}function Ft(){var te=!x.state.isVisible,Ne=x.state.isDestroyed,$e=!x.state.isEnabled,st=Zd(x.props.duration,1,Er.duration);if(!(te||Ne||$e)&&(se("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,d=!1,s=!1,K()&&(g.style.visibility="hidden"),qe(),Le(),Y(!0),K()){var bt=je(),bn=bt.box,Dn=bt.content;x.props.animation&&(ep([bn,Dn],st),yb([bn,Dn],"hidden"))}ge(),it(),x.props.animation?K()&&He(st,x.unmount):x.unmount()}}function ln(te){de().addEventListener("mousemove",b),mb(Hu,b),b(te)}function Ht(){x.state.isVisible&&x.hide(),x.state.isMounted&&(me(),ue().forEach(function(te){te._tippy.unmount()}),g.parentNode&&g.parentNode.removeChild(g),ip=ip.filter(function(te){return te!==x}),x.state.isMounted=!1,se("onHidden",[x]))}function pn(){x.state.isDestroyed||(x.clearDelayTimeouts(),x.unmount(),R(),delete e._tippy,x.state.isDestroyed=!0,se("onDestroy",[x]))}}function Ra(e,t){t===void 0&&(t={});var n=Er.plugins.concat(t.plugins||[]);p3();var r=Object.assign({},t,{plugins:n}),i=l3(e),o=i.reduce(function(s,l){var c=l&&T3(l,r);return c&&s.push(c),s},[]);return Bu(e)?o[0]:o}Ra.defaultProps=Er,Ra.setDefaultProps=b3,Ra.currentInput=Kr,Object.assign({},rm,{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)}}),Ra.setDefaultProps({render:Sb});const{toClipboard:k3}=FH();onUiLoaded(()=>{const e=document.createElement("div");e.id="physton-prompt-all-in-one",pe.gradioApp().appendChild(e);const t=N1(IH);t.config.globalProperties.$toastr=RH,t.config.globalProperties.$copyText=k3,t.config.globalProperties.$tippyList=[],t.mixin(Qj),t.directive("animate",{mounted(n,r){n.classList.add("animate__animated",`animate__${r.value}`,"animate__faster")},updated(n,r){n.classList.remove(`animate__${r.oldValue}`),n.classList.add(`animate__${r.value}`)}}),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=Ra(n,{placement:"bottom",theme:"light",allowHTML:!0,onCreate(s,l){if(!r.value||i)return;s.enable(),localStorage.getItem("phystonPromptEnableTooltip")==="true"||s.disable()}});n.$tippyInstance=o,i||t.config.globalProperties.$tippyList.push(o)},updated(n,r){r.value?(n.setAttribute("data-tippy-content",r.value),n.$tippyInstance.setContent(r.value)):n.$tippyInstance.disable()}}),t.mount(e)})});
|
||
//# sourceMappingURL=main.entry.js.map
|