Files
2026-04-21 23:35:18 +08:00

73 lines
2.5 MiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function pI(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const xn={},nm=[],tn=()=>{},E9=()=>!1,oC=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),vI=t=>t.startsWith("onUpdate:"),Ri=Object.assign,bI=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},lne=Object.prototype.hasOwnProperty,Jt=(t,e)=>lne.call(t,e),Pe=Array.isArray,im=t=>Fb(t)==="[object Map]",sC=t=>Fb(t)==="[object Set]",__=t=>Fb(t)==="[object Date]",Xe=t=>typeof t=="function",ot=t=>typeof t=="string",ua=t=>typeof t=="symbol",_t=t=>t!==null&&typeof t=="object",_v=t=>(_t(t)||Xe(t))&&Xe(t.then)&&Xe(t.catch),x9=Object.prototype.toString,Fb=t=>x9.call(t),une=t=>Fb(t).slice(8,-1),Cv=t=>Fb(t)==="[object Object]",aC=t=>ot(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ip=pI(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),lC=t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))},cne=/-\w/g,Oo=lC(t=>t.replace(cne,e=>e.slice(1).toUpperCase())),dne=/\B([A-Z])/g,bl=lC(t=>t.replace(dne,"-$1").toLowerCase()),$b=lC(t=>t.charAt(0).toUpperCase()+t.slice(1)),Rp=lC(t=>t?`on${$b(t)}`:""),bo=(t,e)=>!Object.is(t,e),gw=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},A9=(t,e,n,i=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},yI=t=>{const e=parseFloat(t);return isNaN(e)?t:e},fne=t=>{const e=ot(t)?Number(t):NaN;return isNaN(e)?t:e};let GL;const uC=()=>GL||(GL=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function mt(t){if(Pe(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],r=ot(i)?pne(i):mt(i);if(r)for(const o in r)e[o]=r[o]}return e}else if(ot(t)||_t(t))return t}const hne=/;(?![^(]*\))/g,mne=/:([^]+)/,gne=/\/\*[^]*?\*\//g;function pne(t){const e={};return t.replace(gne,"").split(hne).forEach(n=>{if(n){const i=n.split(mne);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function $(t){let e="";if(ot(t))e=t;else if(Pe(t))for(let n=0;n<t.length;n++){const i=$(t[n]);i&&(e+=i+" ")}else if(_t(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function pw(t){if(!t)return null;let{class:e,style:n}=t;return e&&!ot(e)&&(t.class=$(e)),n&&(t.style=mt(n)),t}const vne="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",bne=pI(vne);function P9(t){return!!t||t===""}function yne(t,e){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=mf(t[i],e[i]);return n}function mf(t,e){if(t===e)return!0;let n=__(t),i=__(e);if(n||i)return n&&i?t.getTime()===e.getTime():!1;if(n=ua(t),i=ua(e),n||i)return t===e;if(n=Pe(t),i=Pe(e),n||i)return n&&i?yne(t,e):!1;if(n=_t(t),i=_t(e),n||i){if(!n||!i)return!1;const r=Object.keys(t).length,o=Object.keys(e).length;if(r!==o)return!1;for(const s in t){const a=t.hasOwnProperty(s),l=e.hasOwnProperty(s);if(a&&!l||!a&&l||!mf(t[s],e[s]))return!1}}return String(t)===String(e)}function I9(t,e){return t.findIndex(n=>mf(n,e))}const R9=t=>!!(t&&t.__v_isRef===!0),We=t=>ot(t)?t:t==null?"":Pe(t)||_t(t)&&(t.toString===x9||!Xe(t.toString))?R9(t)?We(t.value):JSON.stringify(t,M9,2):String(t),M9=(t,e)=>R9(e)?M9(t,e.value):im(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,r],o)=>(n[tk(i,o)+" =>"]=r,n),{})}:sC(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>tk(n))}:ua(e)?tk(e):_t(e)&&!Pe(e)&&!Cv(e)?String(e):e,tk=(t,e="")=>{var n;return ua(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};let Mr;class O9{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Mr,!e&&Mr&&(this.index=(Mr.scopes||(Mr.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Mr;try{return Mr=this,e()}finally{Mr=n}}}on(){++this._on===1&&(this.prevScope=Mr,Mr=this)}off(){this._on>0&&--this._on===0&&(Mr=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function zb(t){return new O9(t)}function cC(){return Mr}function dC(t,e=!1){Mr&&Mr.cleanups.push(t)}let ei;const nk=new WeakSet;class C_{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Mr&&Mr.active&&Mr.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,nk.has(this)&&(nk.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||D9(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,YL(this),N9(this);const e=ei,n=ta;ei=this,ta=!0;try{return this.fn()}finally{B9(this),ei=e,ta=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)CI(e);this.deps=this.depsTail=void 0,YL(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?nk.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){zx(this)&&this.run()}get dirty(){return zx(this)}}let L9=0,Mp,Op;function D9(t,e=!1){if(t.flags|=8,e){t.next=Op,Op=t;return}t.next=Mp,Mp=t}function wI(){L9++}function _I(){if(--L9>0)return;if(Op){let e=Op;for(Op=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Mp;){let e=Mp;for(Mp=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function N9(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function B9(t){let e,n=t.depsTail,i=n;for(;i;){const r=i.prevDep;i.version===-1?(i===n&&(n=r),CI(i),wne(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=r}t.deps=e,t.depsTail=n}function zx(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(V9(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function V9(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Sv)||(t.globalVersion=Sv,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!zx(t))))return;t.flags|=2;const e=t.dep,n=ei,i=ta;ei=t,ta=!0;try{N9(t);const r=t.fn(t._value);(e.version===0||bo(r,t._value))&&(t.flags|=128,t._value=r,e.version++)}catch(r){throw e.version++,r}finally{ei=n,ta=i,B9(t),t.flags&=-3}}function CI(t,e=!1){const{dep:n,prevSub:i,nextSub:r}=t;if(i&&(i.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)CI(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function wne(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function _ne(t,e){t.effect instanceof C_&&(t=t.effect.fn);const n=new C_(t);e&&Ri(n,e);try{n.run()}catch(r){throw n.stop(),r}const i=n.run.bind(n);return i.effect=n,i}let ta=!0;const F9=[];function du(){F9.push(ta),ta=!1}function fu(){const t=F9.pop();ta=t===void 0?!0:t}function YL(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=ei;ei=void 0;try{e()}finally{ei=n}}}let Sv=0,Cne=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class fC{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!ei||!ta||ei===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ei)n=this.activeLink=new Cne(ei,this),ei.deps?(n.prevDep=ei.depsTail,ei.depsTail.nextDep=n,ei.depsTail=n):ei.deps=ei.depsTail=n,$9(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=ei.depsTail,n.nextDep=void 0,ei.depsTail.nextDep=n,ei.depsTail=n,ei.deps===n&&(ei.deps=i)}return n}trigger(e){this.version++,Sv++,this.notify(e)}notify(e){wI();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{_I()}}}function $9(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)$9(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const S_=new WeakMap,tf=Symbol(""),Hx=Symbol(""),kv=Symbol("");function Dr(t,e,n){if(ta&&ei){let i=S_.get(t);i||S_.set(t,i=new Map);let r=i.get(n);r||(i.set(n,r=new fC),r.map=i,r.key=n),r.track()}}function Kl(t,e,n,i,r,o){const s=S_.get(t);if(!s){Sv++;return}const a=l=>{l&&l.trigger()};if(wI(),e==="clear")s.forEach(a);else{const l=Pe(t),u=l&&aC(n);if(l&&n==="length"){const c=Number(i);s.forEach((d,f)=>{(f==="length"||f===kv||!ua(f)&&f>=c)&&a(d)})}else switch((n!==void 0||s.has(void 0))&&a(s.get(n)),u&&a(s.get(kv)),e){case"add":l?u&&a(s.get("length")):(a(s.get(tf)),im(t)&&a(s.get(Hx)));break;case"delete":l||(a(s.get(tf)),im(t)&&a(s.get(Hx)));break;case"set":im(t)&&a(s.get(tf));break}}_I()}function Sne(t,e){const n=S_.get(t);return n&&n.get(e)}function Qf(t){const e=ln(t);return e===t?e:(Dr(e,"iterate",kv),is(t)?e:e.map(da))}function hC(t){return Dr(t=ln(t),"iterate",kv),t}function tc(t,e){return hu(t)?Cm(na(t)?da(e):e):da(e)}const kne={__proto__:null,[Symbol.iterator](){return ik(this,Symbol.iterator,t=>tc(this,t))},concat(...t){return Qf(this).concat(...t.map(e=>Pe(e)?Qf(e):e))},entries(){return ik(this,"entries",t=>(t[1]=tc(this,t[1]),t))},every(t,e){return xl(this,"every",t,e,void 0,arguments)},filter(t,e){return xl(this,"filter",t,e,n=>n.map(i=>tc(this,i)),arguments)},find(t,e){return xl(this,"find",t,e,n=>tc(this,n),arguments)},findIndex(t,e){return xl(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return xl(this,"findLast",t,e,n=>tc(this,n),arguments)},findLastIndex(t,e){return xl(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return xl(this,"forEach",t,e,void 0,arguments)},includes(...t){return rk(this,"includes",t)},indexOf(...t){return rk(this,"indexOf",t)},join(t){return Qf(this).join(t)},lastIndexOf(...t){return rk(this,"lastIndexOf",t)},map(t,e){return xl(this,"map",t,e,void 0,arguments)},pop(){return Eg(this,"pop")},push(...t){return Eg(this,"push",t)},reduce(t,...e){return XL(this,"reduce",t,e)},reduceRight(t,...e){return XL(this,"reduceRight",t,e)},shift(){return Eg(this,"shift")},some(t,e){return xl(this,"some",t,e,void 0,arguments)},splice(...t){return Eg(this,"splice",t)},toReversed(){return Qf(this).toReversed()},toSorted(t){return Qf(this).toSorted(t)},toSpliced(...t){return Qf(this).toSpliced(...t)},unshift(...t){return Eg(this,"unshift",t)},values(){return ik(this,"values",t=>tc(this,t))}};function ik(t,e,n){const i=hC(t),r=i[e]();return i!==t&&!is(t)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Tne=Array.prototype;function xl(t,e,n,i,r,o){const s=hC(t),a=s!==t&&!is(t),l=s[e];if(l!==Tne[e]){const d=l.apply(t,o);return a?da(d):d}let u=n;s!==t&&(a?u=function(d,f){return n.call(this,tc(t,d),f,t)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,t)}));const c=l.call(s,u,i);return a&&r?r(c):c}function XL(t,e,n,i){const r=hC(t);let o=n;return r!==t&&(is(t)?n.length>3&&(o=function(s,a,l){return n.call(this,s,a,l,t)}):o=function(s,a,l){return n.call(this,s,tc(t,a),l,t)}),r[e](o,...i)}function rk(t,e,n){const i=ln(t);Dr(i,"iterate",kv);const r=i[e](...n);return(r===-1||r===!1)&&mC(n[0])?(n[0]=ln(n[0]),i[e](...n)):r}function Eg(t,e,n=[]){du(),wI();const i=ln(t)[e].apply(t,n);return _I(),fu(),i}const Ene=pI("__proto__,__v_isRef,__isVue"),z9=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(ua));function xne(t){ua(t)||(t=String(t));const e=ln(this);return Dr(e,"has",t),e.hasOwnProperty(t)}class H9{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(r?o?Bne:j9:o?q9:W9).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const s=Pe(e);if(!r){let l;if(s&&(l=kne[n]))return l;if(n==="hasOwnProperty")return xne}const a=Reflect.get(e,n,rn(e)?e:i);if((ua(n)?z9.has(n):Ene(n))||(r||Dr(e,"get",n),o))return a;if(rn(a)){const l=s&&aC(n)?a:a.value;return r&&_t(l)?gf(l):l}return _t(a)?r?gf(a):on(a):a}}class U9 extends H9{constructor(e=!1){super(!1,e)}set(e,n,i,r){let o=e[n];const s=Pe(e)&&aC(n);if(!this._isShallow){const u=hu(o);if(!is(i)&&!hu(i)&&(o=ln(o),i=ln(i)),!s&&rn(o)&&!rn(i))return u||(o.value=i),!0}const a=s?Number(n)<e.length:Jt(e,n),l=Reflect.set(e,n,i,rn(e)?e:r);return e===ln(r)&&(a?bo(i,o)&&Kl(e,"set",n,i):Kl(e,"add",n,i)),l}deleteProperty(e,n){const i=Jt(e,n);e[n];const r=Reflect.deleteProperty(e,n);return r&&i&&Kl(e,"delete",n,void 0),r}has(e,n){const i=Reflect.has(e,n);return(!ua(n)||!z9.has(n))&&Dr(e,"has",n),i}ownKeys(e){return Dr(e,"iterate",Pe(e)?"length":tf),Reflect.ownKeys(e)}}class Ane extends H9{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const Pne=new U9,Ine=new Ane,Rne=new U9(!0);const Ux=t=>t,A0=t=>Reflect.getPrototypeOf(t);function Mne(t,e,n){return function(...i){const r=this.__v_raw,o=ln(r),s=im(o),a=t==="entries"||t===Symbol.iterator&&s,l=t==="keys"&&s,u=r[t](...i),c=n?Ux:e?Cm:da;return!e&&Dr(o,"iterate",l?Hx:tf),Ri(Object.create(u),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:a?[c(d[0]),c(d[1])]:c(d),done:f}}})}}function P0(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function One(t,e){const n={get(r){const o=this.__v_raw,s=ln(o),a=ln(r);t||(bo(r,a)&&Dr(s,"get",r),Dr(s,"get",a));const{has:l}=A0(s),u=e?Ux:t?Cm:da;if(l.call(s,r))return u(o.get(r));if(l.call(s,a))return u(o.get(a));o!==s&&o.get(r)},get size(){const r=this.__v_raw;return!t&&Dr(ln(r),"iterate",tf),r.size},has(r){const o=this.__v_raw,s=ln(o),a=ln(r);return t||(bo(r,a)&&Dr(s,"has",r),Dr(s,"has",a)),r===a?o.has(r):o.has(r)||o.has(a)},forEach(r,o){const s=this,a=s.__v_raw,l=ln(a),u=e?Ux:t?Cm:da;return!t&&Dr(l,"iterate",tf),a.forEach((c,d)=>r.call(o,u(c),u(d),s))}};return Ri(n,t?{add:P0("add"),set:P0("set"),delete:P0("delete"),clear:P0("clear")}:{add(r){!e&&!is(r)&&!hu(r)&&(r=ln(r));const o=ln(this);return A0(o).has.call(o,r)||(o.add(r),Kl(o,"add",r,r)),this},set(r,o){!e&&!is(o)&&!hu(o)&&(o=ln(o));const s=ln(this),{has:a,get:l}=A0(s);let u=a.call(s,r);u||(r=ln(r),u=a.call(s,r));const c=l.call(s,r);return s.set(r,o),u?bo(o,c)&&Kl(s,"set",r,o):Kl(s,"add",r,o),this},delete(r){const o=ln(this),{has:s,get:a}=A0(o);let l=s.call(o,r);l||(r=ln(r),l=s.call(o,r)),a&&a.call(o,r);const u=o.delete(r);return l&&Kl(o,"delete",r,void 0),u},clear(){const r=ln(this),o=r.size!==0,s=r.clear();return o&&Kl(r,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Mne(r,t,e)}),n}function SI(t,e){const n=One(t,e);return(i,r,o)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?i:Reflect.get(Jt(n,r)&&r in i?n:i,r,o)}const Lne={get:SI(!1,!1)},Dne={get:SI(!1,!0)},Nne={get:SI(!0,!1)};const W9=new WeakMap,q9=new WeakMap,j9=new WeakMap,Bne=new WeakMap;function Vne(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Fne(t){return t.__v_skip||!Object.isExtensible(t)?0:Vne(une(t))}function on(t){return hu(t)?t:kI(t,!1,Pne,Lne,W9)}function Lp(t){return kI(t,!1,Rne,Dne,q9)}function gf(t){return kI(t,!0,Ine,Nne,j9)}function kI(t,e,n,i,r){if(!_t(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=Fne(t);if(o===0)return t;const s=r.get(t);if(s)return s;const a=new Proxy(t,o===2?i:n);return r.set(t,a),a}function na(t){return hu(t)?na(t.__v_raw):!!(t&&t.__v_isReactive)}function hu(t){return!!(t&&t.__v_isReadonly)}function is(t){return!!(t&&t.__v_isShallow)}function mC(t){return t?!!t.__v_raw:!1}function ln(t){const e=t&&t.__v_raw;return e?ln(e):t}function ca(t){return!Jt(t,"__v_skip")&&Object.isExtensible(t)&&A9(t,"__v_skip",!0),t}const da=t=>_t(t)?on(t):t,Cm=t=>_t(t)?gf(t):t;function rn(t){return t?t.__v_isRef===!0:!1}function H(t){return K9(t,!1)}function bi(t){return K9(t,!0)}function K9(t,e){return rn(t)?t:new $ne(t,e)}class $ne{constructor(e,n){this.dep=new fC,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:ln(e),this._value=n?e:da(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||is(e)||hu(e);e=i?e:ln(e),bo(e,n)&&(this._rawValue=e,this._value=i?e:da(e),this.dep.trigger())}}function vw(t){t.dep&&t.dep.trigger()}function w(t){return rn(t)?t.value:t}function bw(t){return Xe(t)?t():w(t)}const zne={get:(t,e,n)=>e==="__v_raw"?t:w(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const r=t[e];return rn(r)&&!rn(n)?(r.value=n,!0):Reflect.set(t,e,n,i)}};function G9(t){return na(t)?t:new Proxy(t,zne)}class Hne{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new fC,{get:i,set:r}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function Une(t){return new Hne(t)}function Sr(t){const e=Pe(t)?new Array(t.length):{};for(const n in t)e[n]=Y9(t,n);return e}class Wne{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=ln(e);let r=!0,o=e;if(!Pe(e)||!aC(String(n)))do r=!mC(o)||is(o);while(r&&(o=o.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=w(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&rn(this._raw[this._key])){const n=this._object[this._key];if(rn(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return Sne(this._raw,this._key)}}class qne{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function An(t,e,n){return rn(t)?t:Xe(t)?new qne(t):_t(t)&&arguments.length>1?Y9(t,e,n):H(t)}function Y9(t,e,n){return new Wne(t,e,n)}class jne{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new fC(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Sv-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&ei!==this)return D9(this,!0),!0}get value(){const e=this.dep.track();return V9(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Kne(t,e,n=!1){let i,r;return Xe(t)?i=t:(i=t.get,r=t.set),new jne(i,r,n)}const I0={},k_=new WeakMap;let Dd;function Gne(t,e=!1,n=Dd){if(n){let i=k_.get(n);i||k_.set(n,i=[]),i.push(t)}}function Yne(t,e,n=xn){const{immediate:i,deep:r,once:o,scheduler:s,augmentJob:a,call:l}=n,u=_=>r?_:is(_)||r===!1||r===0?Gl(_,1):Gl(_);let c,d,f,h,m=!1,g=!1;if(rn(t)?(d=()=>t.value,m=is(t)):na(t)?(d=()=>u(t),m=!0):Pe(t)?(g=!0,m=t.some(_=>na(_)||is(_)),d=()=>t.map(_=>{if(rn(_))return _.value;if(na(_))return u(_);if(Xe(_))return l?l(_,2):_()})):Xe(t)?e?d=l?()=>l(t,2):t:d=()=>{if(f){du();try{f()}finally{fu()}}const _=Dd;Dd=c;try{return l?l(t,3,[h]):t(h)}finally{Dd=_}}:d=tn,e&&r){const _=d,C=r===!0?1/0:r;d=()=>Gl(_(),C)}const v=cC(),p=()=>{c.stop(),v&&v.active&&bI(v.effects,c)};if(o&&e){const _=e;e=(...C)=>{_(...C),p()}}let b=g?new Array(t.length).fill(I0):I0;const y=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(e){const C=c.run();if(r||m||(g?C.some((S,k)=>bo(S,b[k])):bo(C,b))){f&&f();const S=Dd;Dd=c;try{const k=[C,b===I0?void 0:g&&b[0]===I0?[]:b,h];b=C,l?l(e,3,k):e(...k)}finally{Dd=S}}}else c.run()};return a&&a(y),c=new C_(d),c.scheduler=s?()=>s(y,!1):y,h=_=>Gne(_,!1,c),f=c.onStop=()=>{const _=k_.get(c);if(_){if(l)l(_,4);else for(const C of _)C();k_.delete(c)}},e?i?y(!0):b=c.run():s?s(y.bind(null,!0),!0):c.run(),p.pause=c.pause.bind(c),p.resume=c.resume.bind(c),p.stop=p,p}function Gl(t,e=1/0,n){if(e<=0||!_t(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,rn(t))Gl(t.value,e,n);else if(Pe(t))for(let i=0;i<t.length;i++)Gl(t[i],e,n);else if(sC(t)||im(t))t.forEach(i=>{Gl(i,e,n)});else if(Cv(t)){for(const i in t)Gl(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Gl(t[i],e,n)}return t}function Hb(t,e,n,i){try{return i?t(...i):t()}catch(r){gC(r,e,n)}}function fa(t,e,n,i){if(Xe(t)){const r=Hb(t,e,n,i);return r&&_v(r)&&r.catch(o=>{gC(o,e,n)}),r}if(Pe(t)){const r=[];for(let o=0;o<t.length;o++)r.push(fa(t[o],e,n,i));return r}}function gC(t,e,n,i=!0){const r=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:s}=e&&e.appContext.config||xn;if(e){let a=e.parent;const l=e.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const c=a.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](t,l,u)===!1)return}a=a.parent}if(o){du(),Hb(o,null,10,[t,l,u]),fu();return}}Xne(t,n,r,i,s)}function Xne(t,e,n,i=!0,r=!1){if(r)throw t;console.error(t)}const Zr=[];let Fa=-1;const rm=[];let nc=null,Mh=0;const X9=Promise.resolve();let T_=null;function Ye(t){const e=T_||X9;return t?e.then(this?t.bind(this):t):e}function Jne(t){let e=Fa+1,n=Zr.length;for(;e<n;){const i=e+n>>>1,r=Zr[i],o=Tv(r);o<t||o===t&&r.flags&2?e=i+1:n=i}return e}function TI(t){if(!(t.flags&1)){const e=Tv(t),n=Zr[Zr.length-1];!n||!(t.flags&2)&&e>=Tv(n)?Zr.push(t):Zr.splice(Jne(e),0,t),t.flags|=1,J9()}}function J9(){T_||(T_=X9.then(Q9))}function Zne(t){Pe(t)?rm.push(...t):nc&&t.id===-1?nc.splice(Mh+1,0,t):t.flags&1||(rm.push(t),t.flags|=1),J9()}function JL(t,e,n=Fa+1){for(;n<Zr.length;n++){const i=Zr[n];if(i&&i.flags&2){if(t&&i.id!==t.uid)continue;Zr.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function Z9(t){if(rm.length){const e=[...new Set(rm)].sort((n,i)=>Tv(n)-Tv(i));if(rm.length=0,nc){nc.push(...e);return}for(nc=e,Mh=0;Mh<nc.length;Mh++){const n=nc[Mh];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}nc=null,Mh=0}}const Tv=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Q9(t){try{for(Fa=0;Fa<Zr.length;Fa++){const e=Zr[Fa];e&&!(e.flags&8)&&(e.flags&4&&(e.flags&=-2),Hb(e,e.i,e.i?15:14),e.flags&4||(e.flags&=-2))}}finally{for(;Fa<Zr.length;Fa++){const e=Zr[Fa];e&&(e.flags&=-2)}Fa=-1,Zr.length=0,Z9(),T_=null,(Zr.length||rm.length)&&Q9()}}let br=null,ez=null;function E_(t){const e=br;return br=t,ez=t&&t.type.__scopeId||null,e}function ce(t,e=br,n){if(!e||t._n)return t;const i=(...r)=>{i._d&&I_(-1);const o=E_(e);let s;try{s=t(...r)}finally{E_(o),i._d&&I_(1)}return s};return i._n=!0,i._c=!0,i._d=!0,i}function Vt(t,e){if(br===null)return t;const n=_C(br),i=t.dirs||(t.dirs=[]);for(let r=0;r<e.length;r++){let[o,s,a,l=xn]=e[r];o&&(Xe(o)&&(o={mounted:o,updated:o}),o.deep&&Gl(s),i.push({dir:o,instance:n,value:s,oldValue:void 0,arg:a,modifiers:l}))}return t}function ed(t,e,n,i){const r=t.dirs,o=e&&e.dirs;for(let s=0;s<r.length;s++){const a=r[s];o&&(a.oldValue=o[s].value);let l=a.dir[i];l&&(du(),fa(l,n,8,[t.el,a,t,e]),fu())}}function qt(t,e){if(Nr){let n=Nr.provides;const i=Nr.parent&&Nr.parent.provides;i===n&&(n=Nr.provides=Object.create(i)),n[t]=e}}function Ne(t,e,n=!1){const i=Ct();if(i||nf){let r=nf?nf._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(r&&t in r)return r[t];if(arguments.length>1)return n&&Xe(e)?e.call(i&&i.proxy):e}}function tz(){return!!(Ct()||nf)}const Qne=Symbol.for("v-scx"),eie=()=>Ne(Qne);function sl(t,e){return pC(t,null,e)}function tie(t,e){return pC(t,null,{flush:"sync"})}function Se(t,e,n){return pC(t,e,n)}function pC(t,e,n=xn){const{immediate:i,deep:r,flush:o,once:s}=n,a=Ri({},n),l=e&&i||!e&&o!=="post";let u;if(Av){if(o==="sync"){const h=eie();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=tn,h.resume=tn,h.pause=tn,h}}const c=Nr;a.call=(h,m,g)=>fa(h,c,m,g);let d=!1;o==="post"?a.scheduler=h=>{Ir(h,c&&c.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(h,m)=>{m?h():TI(h)}),a.augmentJob=h=>{e&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const f=Yne(t,e,a);return Av&&(u?u.push(f):l&&f()),f}function nie(t,e,n){const i=this.proxy,r=ot(t)?t.includes(".")?nz(i,t):()=>i[t]:t.bind(i,i);let o;Xe(e)?o=e:(o=e.handler,n=e);const s=Ub(this),a=pC(r,o.bind(i),n);return s(),a}function nz(t,e){const n=e.split(".");return()=>{let i=t;for(let r=0;r<n.length&&i;r++)i=i[n[r]];return i}}const iz=Symbol("_vte"),rz=t=>t.__isTeleport,Dp=t=>t&&(t.disabled||t.disabled===""),ZL=t=>t&&(t.defer||t.defer===""),QL=t=>typeof SVGElement<"u"&&t instanceof SVGElement,e5=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Wx=(t,e)=>{const n=t&&t.to;return ot(n)?e?e(n):null:n},oz={name:"Teleport",__isTeleport:!0,process(t,e,n,i,r,o,s,a,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:g,createComment:v}}=u,p=Dp(e.props);let{shapeFlag:b,children:y,dynamicChildren:_}=e;if(t==null){const C=e.el=g(""),S=e.anchor=g("");h(C,n,i),h(S,n,i);const k=(E,x)=>{b&16&&c(y,E,x,r,o,s,a,l)},T=()=>{const E=e.target=Wx(e.props,m),x=qx(E,e,g,h);E&&(s!=="svg"&&QL(E)?s="svg":s!=="mathml"&&e5(E)&&(s="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(E),p||(k(E,x),yw(e,!1)))};p&&(k(n,S),yw(e,!0)),ZL(e.props)?(e.el.__isMounted=!1,Ir(()=>{T(),delete e.el.__isMounted},o)):T()}else{if(ZL(e.props)&&t.el.__isMounted===!1){Ir(()=>{oz.process(t,e,n,i,r,o,s,a,l,u)},o);return}e.el=t.el,e.targetStart=t.targetStart;const C=e.anchor=t.anchor,S=e.target=t.target,k=e.targetAnchor=t.targetAnchor,T=Dp(t.props),E=T?n:S,x=T?C:k;if(s==="svg"||QL(S)?s="svg":(s==="mathml"||e5(S))&&(s="mathml"),_?(f(t.dynamicChildren,_,E,r,o,s,a),MI(t,e,!0)):l||d(t,e,E,x,r,o,s,a,!1),p)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):R0(e,n,C,u,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const P=e.target=Wx(e.props,m);P&&R0(e,P,null,u,0)}else T&&R0(e,S,k,u,1);yw(e,p)}},remove(t,e,n,{um:i,o:{remove:r}},o){const{shapeFlag:s,children:a,anchor:l,targetStart:u,targetAnchor:c,target:d,props:f}=t;if(d&&(r(u),r(c)),o&&r(l),s&16){const h=o||!Dp(f);for(let m=0;m<a.length;m++){const g=a[m];i(g,e,n,h,!!g.dynamicChildren)}}},move:R0,hydrate:iie};function R0(t,e,n,{o:{insert:i},m:r},o=2){o===0&&i(t.targetAnchor,e,n);const{el:s,anchor:a,shapeFlag:l,children:u,props:c}=t,d=o===2;if(d&&i(s,e,n),(!d||Dp(c))&&l&16)for(let f=0;f<u.length;f++)r(u[f],e,n,2);d&&i(a,e,n)}function iie(t,e,n,i,r,o,{o:{nextSibling:s,parentNode:a,querySelector:l,insert:u,createText:c}},d){function f(v,p){let b=p;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")e.targetStart=b;else if(b.data==="teleport anchor"){e.targetAnchor=b,v._lpa=e.targetAnchor&&s(e.targetAnchor);break}}b=s(b)}}function h(v,p){p.anchor=d(s(v),p,a(v),n,i,r,o)}const m=e.target=Wx(e.props,l),g=Dp(e.props);if(m){const v=m._lpa||m.firstChild;e.shapeFlag&16&&(g?(h(t,e),f(m,v),e.targetAnchor||qx(m,e,c,u,a(t)===m?t:null)):(e.anchor=s(t),f(m,v),e.targetAnchor||qx(m,e,c,u),d(v&&s(v),e,m,n,i,r,o))),yw(e,g)}else g&&e.shapeFlag&16&&(h(t,e),e.targetStart=t,e.targetAnchor=s(t));return e.anchor&&s(e.anchor)}const sz=oz;function yw(t,e){const n=t.ctx;if(n&&n.ut){let i,r;for(e?(i=t.el,r=t.anchor):(i=t.targetStart,r=t.targetAnchor);i&&i!==r;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function qx(t,e,n,i,r=null){const o=e.targetStart=n(""),s=e.targetAnchor=n("");return o[iz]=s,t&&(i(o,t,r),i(s,t,r)),s}const $a=Symbol("_leaveCb"),xg=Symbol("_enterCb");function az(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pt(()=>{t.isMounted=!0}),Sn(()=>{t.isUnmounting=!0}),t}const gs=[Function,Array],lz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:gs,onEnter:gs,onAfterEnter:gs,onEnterCancelled:gs,onBeforeLeave:gs,onLeave:gs,onAfterLeave:gs,onLeaveCancelled:gs,onBeforeAppear:gs,onAppear:gs,onAfterAppear:gs,onAppearCancelled:gs},uz=t=>{const e=t.subTree;return e.component?uz(e.component):e},rie={name:"BaseTransition",props:lz,setup(t,{slots:e}){const n=Ct(),i=az();return()=>{const r=e.default&&EI(e.default(),!0);if(!r||!r.length)return;const o=cz(r),s=ln(t),{mode:a}=s;if(i.isLeaving)return ok(o);const l=t5(o);if(!l)return ok(o);let u=Ev(l,s,i,n,d=>u=d);l.type!==xi&&pf(l,u);let c=n.subTree&&t5(n.subTree);if(c&&c.type!==xi&&!Bd(c,l)&&uz(n).type!==xi){let d=Ev(c,s,i,n);if(pf(c,d),a==="out-in"&&l.type!==xi)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},ok(o);a==="in-out"&&l.type!==xi?d.delayLeave=(f,h,m)=>{const g=dz(i,c);g[String(c.key)]=c,f[$a]=()=>{h(),f[$a]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{m(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return o}}};function cz(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==xi){e=n;break}}return e}const oie=rie;function dz(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function Ev(t,e,n,i,r){const{appear:o,mode:s,persisted:a=!1,onBeforeEnter:l,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:m,onLeaveCancelled:g,onBeforeAppear:v,onAppear:p,onAfterAppear:b,onAppearCancelled:y}=e,_=String(t.key),C=dz(n,t),S=(E,x)=>{E&&fa(E,i,9,x)},k=(E,x)=>{const P=x[1];S(E,x),Pe(E)?E.every(A=>A.length<=1)&&P():E.length<=1&&P()},T={mode:s,persisted:a,beforeEnter(E){let x=l;if(!n.isMounted)if(o)x=v||l;else return;E[$a]&&E[$a](!0);const P=C[_];P&&Bd(t,P)&&P.el[$a]&&P.el[$a](),S(x,[E])},enter(E){if(C[_]===t)return;let x=u,P=c,A=d;if(!n.isMounted)if(o)x=p||u,P=b||c,A=y||d;else return;let I=!1;E[xg]=q=>{I||(I=!0,q?S(A,[E]):S(P,[E]),T.delayedLeave&&T.delayedLeave(),E[xg]=void 0)};const D=E[xg].bind(null,!1);x?k(x,[E,D]):D()},leave(E,x){const P=String(t.key);if(E[xg]&&E[xg](!0),n.isUnmounting)return x();S(f,[E]);let A=!1;E[$a]=D=>{A||(A=!0,x(),D?S(g,[E]):S(m,[E]),E[$a]=void 0,C[P]===t&&delete C[P])};const I=E[$a].bind(null,!1);C[P]=t,h?k(h,[E,I]):I()},clone(E){const x=Ev(E,e,n,i,r);return r&&r(x),x}};return T}function ok(t){if(vC(t))return t=al(t),t.children=null,t}function t5(t){if(!vC(t))return rz(t.type)&&t.children?cz(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Xe(n.default))return n.default()}}function pf(t,e){t.shapeFlag&6&&t.component?(t.transition=e,pf(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function EI(t,e=!1,n){let i=[],r=0;for(let o=0;o<t.length;o++){let s=t[o];const a=n==null?s.key:String(n)+String(s.key!=null?s.key:o);s.type===rt?(s.patchFlag&128&&r++,i=i.concat(EI(s.children,e,a))):(e||s.type!==xi)&&i.push(a!=null?al(s,{key:a}):s)}if(r>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function le(t,e){return Xe(t)?Ri({name:t.name},e,{setup:t}):t}function fz(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function n5(t,e){let n;return!!((n=Object.getOwnPropertyDescriptor(t,e))&&!n.configurable)}const x_=new WeakMap;function Np(t,e,n,i,r=!1){if(Pe(t)){t.forEach((g,v)=>Np(g,e&&(Pe(e)?e[v]:e),n,i,r));return}if(om(i)&&!r){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Np(t,e,n,i.component.subTree);return}const o=i.shapeFlag&4?_C(i.component):i.el,s=r?null:o,{i:a,r:l}=t,u=e&&e.r,c=a.refs===xn?a.refs={}:a.refs,d=a.setupState,f=ln(d),h=d===xn?E9:g=>n5(c,g)?!1:Jt(f,g),m=(g,v)=>!(v&&n5(c,v));if(u!=null&&u!==l){if(i5(e),ot(u))c[u]=null,h(u)&&(d[u]=null);else if(rn(u)){const g=e;m(u,g.k)&&(u.value=null),g.k&&(c[g.k]=null)}}if(Xe(l))Hb(l,a,12,[s,c]);else{const g=ot(l),v=rn(l);if(g||v){const p=()=>{if(t.f){const b=g?h(l)?d[l]:c[l]:m()||!t.k?l.value:c[t.k];if(r)Pe(b)&&bI(b,o);else if(Pe(b))b.includes(o)||b.push(o);else if(g)c[l]=[o],h(l)&&(d[l]=c[l]);else{const y=[o];m(l,t.k)&&(l.value=y),t.k&&(c[t.k]=y)}}else g?(c[l]=s,h(l)&&(d[l]=s)):v&&(m(l,t.k)&&(l.value=s),t.k&&(c[t.k]=s))};if(s){const b=()=>{p(),x_.delete(t)};b.id=-1,x_.set(t,b),Ir(b,n)}else i5(t),p()}}}function i5(t){const e=x_.get(t);e&&(e.flags|=8,x_.delete(t))}uC().requestIdleCallback;uC().cancelIdleCallback;const om=t=>!!t.type.__asyncLoader,vC=t=>t.type.__isKeepAlive;function hz(t,e){gz(t,"a",e)}function mz(t,e){gz(t,"da",e)}function gz(t,e,n=Nr){const i=t.__wdc||(t.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return t()});if(bC(e,i,n),n){let r=n.parent;for(;r&&r.parent;)vC(r.parent.vnode)&&sie(i,e,n,r),r=r.parent}}function sie(t,e,n,i){const r=bC(e,t,i,!0);Fc(()=>{bI(i[e],r)},n)}function bC(t,e,n=Nr,i=!1){if(n){const r=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...s)=>{du();const a=Ub(n),l=fa(e,n,t,s);return a(),fu(),l});return i?r.unshift(o):r.push(o),o}}const Su=t=>(e,n=Nr)=>{(!Av||t==="sp")&&bC(t,(...i)=>e(...i),n)},yC=Su("bm"),Pt=Su("m"),xI=Su("bu"),ku=Su("u"),Sn=Su("bum"),Fc=Su("um"),aie=Su("sp"),lie=Su("rtg"),uie=Su("rtc");function cie(t,e=Nr){bC("ec",t,e)}const AI="components",die="directives";function Bt(t,e){return PI(AI,t,!0,e)||t}const pz=Symbol.for("v-ndc");function Gt(t){return ot(t)?PI(AI,t,!1)||t:t||pz}function vz(t){return PI(die,t)}function PI(t,e,n=!0,i=!1){const r=br||Nr;if(r){const o=r.type;if(t===AI){const a=Kie(o,!1);if(a&&(a===e||a===Oo(e)||a===$b(Oo(e))))return o}const s=r5(r[t]||o[t],e)||r5(r.appContext[t],e);return!s&&i?o:s}}function r5(t,e){return t&&(t[e]||t[Oo(e)]||t[$b(Oo(e))])}function gn(t,e,n,i){let r;const o=n&&n[i],s=Pe(t);if(s||ot(t)){const a=s&&na(t);let l=!1,u=!1;a&&(l=!is(t),u=hu(t),t=hC(t)),r=new Array(t.length);for(let c=0,d=t.length;c<d;c++)r[c]=e(l?u?Cm(da(t[c])):da(t[c]):t[c],c,void 0,o&&o[c])}else if(typeof t=="number"){r=new Array(t);for(let a=0;a<t;a++)r[a]=e(a+1,a,void 0,o&&o[a])}else if(_t(t))if(t[Symbol.iterator])r=Array.from(t,(a,l)=>e(a,l,void 0,o&&o[l]));else{const a=Object.keys(t);r=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];r[l]=e(t[c],c,l,o&&o[l])}}else r=[];return n&&(n[i]=r),r}function kc(t,e){for(let n=0;n<e.length;n++){const i=e[n];if(Pe(i))for(let r=0;r<i.length;r++)t[i[r].name]=i[r].fn;else i&&(t[i.name]=i.key?(...r)=>{const o=i.fn(...r);return o&&(o.key=i.key),o}:i.fn)}return t}function we(t,e,n={},i,r){if(br.ce||br.parent&&om(br.parent)&&br.parent.ce){const u=Object.keys(n).length>0;return e!=="default"&&(n.name=e),B(),_e(rt,null,[L("slot",n,i&&i())],u?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),B();const s=o&&bz(o(n)),a=n.key||s&&s.key,l=_e(rt,{key:(a&&!ua(a)?a:`_${e}`)+(!s&&i?"_fb":"")},s||(i?i():[]),s&&t._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function bz(t){return t.some(e=>yi(e)?!(e.type===xi||e.type===rt&&!bz(e.children)):!0)?t:null}function fie(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:Rp(i)]=t[i];return n}const jx=t=>t?Fz(t)?_C(t):jx(t.parent):null,Bp=Ri(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>jx(t.parent),$root:t=>jx(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>_z(t),$forceUpdate:t=>t.f||(t.f=()=>{TI(t.update)}),$nextTick:t=>t.n||(t.n=Ye.bind(t.proxy)),$watch:t=>nie.bind(t)}),sk=(t,e)=>t!==xn&&!t.__isScriptSetup&&Jt(t,e),hie={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:r,props:o,accessCache:s,type:a,appContext:l}=t;if(e[0]!=="$"){const f=s[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return r[e];case 4:return n[e];case 3:return o[e]}else{if(sk(i,e))return s[e]=1,i[e];if(r!==xn&&Jt(r,e))return s[e]=2,r[e];if(Jt(o,e))return s[e]=3,o[e];if(n!==xn&&Jt(n,e))return s[e]=4,n[e];Kx&&(s[e]=0)}}const u=Bp[e];let c,d;if(u)return e==="$attrs"&&Dr(t.attrs,"get",""),u(t);if((c=a.__cssModules)&&(c=c[e]))return c;if(n!==xn&&Jt(n,e))return s[e]=4,n[e];if(d=l.config.globalProperties,Jt(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:r,ctx:o}=t;return sk(r,e)?(r[e]=n,!0):i!==xn&&Jt(i,e)?(i[e]=n,!0):Jt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:r,props:o,type:s}},a){let l;return!!(n[a]||t!==xn&&a[0]!=="$"&&Jt(t,a)||sk(e,a)||Jt(o,a)||Jt(i,a)||Jt(Bp,a)||Jt(r.config.globalProperties,a)||(l=s.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Jt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function $o(){return yz().slots}function Rf(){return yz().attrs}function yz(t){const e=Ct();return e.setupContext||(e.setupContext=zz(e))}function A_(t){return Pe(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function o5(t,e){return!t||!e?t||e:Pe(t)&&Pe(e)?t.concat(e):Ri({},A_(t),A_(e))}let Kx=!0;function mie(t){const e=_z(t),n=t.proxy,i=t.ctx;Kx=!1,e.beforeCreate&&s5(e.beforeCreate,t,"bc");const{data:r,computed:o,methods:s,watch:a,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:g,deactivated:v,beforeDestroy:p,beforeUnmount:b,destroyed:y,unmounted:_,render:C,renderTracked:S,renderTriggered:k,errorCaptured:T,serverPrefetch:E,expose:x,inheritAttrs:P,components:A,directives:I,filters:D}=e;if(u&&gie(u,i,null),s)for(const R in s){const O=s[R];Xe(O)&&(i[R]=O.bind(n))}if(r){const R=r.call(n,n);_t(R)&&(t.data=on(R))}if(Kx=!0,o)for(const R in o){const O=o[R],N=Xe(O)?O.bind(n,n):Xe(O.get)?O.get.bind(n,n):tn,F=!Xe(O)&&Xe(O.set)?O.set.bind(n):tn,j=M({get:N,set:F});Object.defineProperty(i,R,{enumerable:!0,configurable:!0,get:()=>j.value,set:U=>j.value=U})}if(a)for(const R in a)wz(a[R],i,n,R);if(l){const R=Xe(l)?l.call(n):l;Reflect.ownKeys(R).forEach(O=>{qt(O,R[O])})}c&&s5(c,t,"c");function z(R,O){Pe(O)?O.forEach(N=>R(N.bind(n))):O&&R(O.bind(n))}if(z(yC,d),z(Pt,f),z(xI,h),z(ku,m),z(hz,g),z(mz,v),z(cie,T),z(uie,S),z(lie,k),z(Sn,b),z(Fc,_),z(aie,E),Pe(x))if(x.length){const R=t.exposed||(t.exposed={});x.forEach(O=>{Object.defineProperty(R,O,{get:()=>n[O],set:N=>n[O]=N,enumerable:!0})})}else t.exposed||(t.exposed={});C&&t.render===tn&&(t.render=C),P!=null&&(t.inheritAttrs=P),A&&(t.components=A),I&&(t.directives=I),E&&fz(t)}function gie(t,e,n=tn){Pe(t)&&(t=Gx(t));for(const i in t){const r=t[i];let o;_t(r)?"default"in r?o=Ne(r.from||i,r.default,!0):o=Ne(r.from||i):o=Ne(r),rn(o)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function s5(t,e,n){fa(Pe(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function wz(t,e,n,i){let r=i.includes(".")?nz(n,i):()=>n[i];if(ot(t)){const o=e[t];Xe(o)&&Se(r,o)}else if(Xe(t))Se(r,t.bind(n));else if(_t(t))if(Pe(t))t.forEach(o=>wz(o,e,n,i));else{const o=Xe(t.handler)?t.handler.bind(n):e[t.handler];Xe(o)&&Se(r,o,t)}}function _z(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:r,optionsCache:o,config:{optionMergeStrategies:s}}=t.appContext,a=o.get(e);let l;return a?l=a:!r.length&&!n&&!i?l=e:(l={},r.length&&r.forEach(u=>P_(l,u,s,!0)),P_(l,e,s)),_t(e)&&o.set(e,l),l}function P_(t,e,n,i=!1){const{mixins:r,extends:o}=e;o&&P_(t,o,n,!0),r&&r.forEach(s=>P_(t,s,n,!0));for(const s in e)if(!(i&&s==="expose")){const a=pie[s]||n&&n[s];t[s]=a?a(t[s],e[s]):e[s]}return t}const pie={data:a5,props:l5,emits:l5,methods:pp,computed:pp,beforeCreate:Gr,created:Gr,beforeMount:Gr,mounted:Gr,beforeUpdate:Gr,updated:Gr,beforeDestroy:Gr,beforeUnmount:Gr,destroyed:Gr,unmounted:Gr,activated:Gr,deactivated:Gr,errorCaptured:Gr,serverPrefetch:Gr,components:pp,directives:pp,watch:bie,provide:a5,inject:vie};function a5(t,e){return e?t?function(){return Ri(Xe(t)?t.call(this,this):t,Xe(e)?e.call(this,this):e)}:e:t}function vie(t,e){return pp(Gx(t),Gx(e))}function Gx(t){if(Pe(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Gr(t,e){return t?[...new Set([].concat(t,e))]:e}function pp(t,e){return t?Ri(Object.create(null),t,e):e}function l5(t,e){return t?Pe(t)&&Pe(e)?[...new Set([...t,...e])]:Ri(Object.create(null),A_(t),A_(e??{})):e}function bie(t,e){if(!t)return e;if(!e)return t;const n=Ri(Object.create(null),t);for(const i in e)n[i]=Gr(t[i],e[i]);return n}function Cz(){return{app:null,config:{isNativeTag:E9,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 yie=0;function wie(t,e){return function(i,r=null){Xe(i)||(i=Ri({},i)),r!=null&&!_t(r)&&(r=null);const o=Cz(),s=new WeakSet,a=[];let l=!1;const u=o.app={_uid:yie++,_component:i,_props:r,_container:null,_context:o,_instance:null,version:LI,get config(){return o.config},set config(c){},use(c,...d){return s.has(c)||(c&&Xe(c.install)?(s.add(c),c.install(u,...d)):Xe(c)&&(s.add(c),c(u,...d))),u},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),u},component(c,d){return d?(o.components[c]=d,u):o.components[c]},directive(c,d){return d?(o.directives[c]=d,u):o.directives[c]},mount(c,d,f){if(!l){const h=u._ceVNode||L(i,r);return h.appContext=o,f===!0?f="svg":f===!1&&(f=void 0),t(h,c,f),l=!0,u._container=c,c.__vue_app__=u,_C(h.component)}},onUnmount(c){a.push(c)},unmount(){l&&(fa(a,u._instance,16),t(null,u._container),delete u._container.__vue_app__)},provide(c,d){return o.provides[c]=d,u},runWithContext(c){const d=nf;nf=u;try{return c()}finally{nf=d}}};return u}}let nf=null;function _ie(t,e,n=xn){const i=Ct(),r=Oo(e),o=bl(e),s=Sz(t,r),a=Une((l,u)=>{let c,d=xn,f;return tie(()=>{const h=t[r];bo(c,h)&&(c=h,u())}),{get(){return l(),n.get?n.get(c):c},set(h){const m=n.set?n.set(h):h;if(!bo(m,c)&&!(d!==xn&&bo(h,d)))return;const g=i.vnode.props;g&&(e in g||r in g||o in g)&&(`onUpdate:${e}`in g||`onUpdate:${r}`in g||`onUpdate:${o}`in g)||(c=h,u()),i.emit(`update:${e}`,m),bo(h,m)&&bo(h,d)&&!bo(m,f)&&u(),d=h,f=m}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||xn:a,done:!1}:{done:!0}}}},a}const Sz=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Oo(e)}Modifiers`]||t[`${bl(e)}Modifiers`];function Cie(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||xn;let r=n;const o=e.startsWith("update:"),s=o&&Sz(i,e.slice(7));s&&(s.trim&&(r=n.map(c=>ot(c)?c.trim():c)),s.number&&(r=n.map(yI)));let a,l=i[a=Rp(e)]||i[a=Rp(Oo(e))];!l&&o&&(l=i[a=Rp(bl(e))]),l&&fa(l,t,6,r);const u=i[a+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,fa(u,t,6,r)}}const Sie=new WeakMap;function kz(t,e,n=!1){const i=n?Sie:e.emitsCache,r=i.get(t);if(r!==void 0)return r;const o=t.emits;let s={},a=!1;if(!Xe(t)){const l=u=>{const c=kz(u,e,!0);c&&(a=!0,Ri(s,c))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(_t(t)&&i.set(t,null),null):(Pe(o)?o.forEach(l=>s[l]=null):Ri(s,o),_t(t)&&i.set(t,s),s)}function wC(t,e){return!t||!oC(e)?!1:(e=e.slice(2).replace(/Once$/,""),Jt(t,e[0].toLowerCase()+e.slice(1))||Jt(t,bl(e))||Jt(t,e))}function u5(t){const{type:e,vnode:n,proxy:i,withProxy:r,propsOptions:[o],slots:s,attrs:a,emit:l,render:u,renderCache:c,props:d,data:f,setupState:h,ctx:m,inheritAttrs:g}=t,v=E_(t);let p,b;try{if(n.shapeFlag&4){const _=r||i,C=_;p=Ua(u.call(C,_,c,d,h,f,m)),b=a}else{const _=e;p=Ua(_.length>1?_(d,{attrs:a,slots:s,emit:l}):_(d,null)),b=e.props?a:kie(a)}}catch(_){Vp.length=0,gC(_,t,1),p=L(xi)}let y=p;if(b&&g!==!1){const _=Object.keys(b),{shapeFlag:C}=y;_.length&&C&7&&(o&&_.some(vI)&&(b=Tie(b,o)),y=al(y,b,!1,!0))}return n.dirs&&(y=al(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition&&pf(y,n.transition),p=y,E_(v),p}const kie=t=>{let e;for(const n in t)(n==="class"||n==="style"||oC(n))&&((e||(e={}))[n]=t[n]);return e},Tie=(t,e)=>{const n={};for(const i in t)(!vI(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function Eie(t,e,n){const{props:i,children:r,component:o}=t,{props:s,children:a,patchFlag:l}=e,u=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?c5(i,s,u):!!s;if(l&8){const c=e.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(Tz(s,i,f)&&!wC(u,f))return!0}}}else return(r||a)&&(!a||!a.$stable)?!0:i===s?!1:i?s?c5(i,s,u):!0:!!s;return!1}function c5(t,e,n){const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!0;for(let r=0;r<i.length;r++){const o=i[r];if(Tz(e,t,o)&&!wC(n,o))return!0}return!1}function Tz(t,e,n){const i=t[n],r=e[n];return n==="style"&&_t(i)&&_t(r)?!mf(i,r):i!==r}function xie({vnode:t,parent:e},n){for(;e;){const i=e.subTree;if(i.suspense&&i.suspense.activeBranch===t&&(i.el=t.el),i===t)(t=e.vnode).el=n,e=e.parent;else break}}const Ez={},xz=()=>Object.create(Ez),Az=t=>Object.getPrototypeOf(t)===Ez;function Aie(t,e,n,i=!1){const r={},o=xz();t.propsDefaults=Object.create(null),Pz(t,e,r,o);for(const s in t.propsOptions[0])s in r||(r[s]=void 0);n?t.props=i?r:Lp(r):t.type.props?t.props=r:t.props=o,t.attrs=o}function Pie(t,e,n,i){const{props:r,attrs:o,vnode:{patchFlag:s}}=t,a=ln(r),[l]=t.propsOptions;let u=!1;if((i||s>0)&&!(s&16)){if(s&8){const c=t.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if(wC(t.emitsOptions,f))continue;const h=e[f];if(l)if(Jt(o,f))h!==o[f]&&(o[f]=h,u=!0);else{const m=Oo(f);r[m]=Yx(l,a,m,h,t,!1)}else h!==o[f]&&(o[f]=h,u=!0)}}}else{Pz(t,e,r,o)&&(u=!0);let c;for(const d in a)(!e||!Jt(e,d)&&((c=bl(d))===d||!Jt(e,c)))&&(l?n&&(n[d]!==void 0||n[c]!==void 0)&&(r[d]=Yx(l,a,d,void 0,t,!0)):delete r[d]);if(o!==a)for(const d in o)(!e||!Jt(e,d))&&(delete o[d],u=!0)}u&&Kl(t.attrs,"set","")}function Pz(t,e,n,i){const[r,o]=t.propsOptions;let s=!1,a;if(e)for(let l in e){if(Ip(l))continue;const u=e[l];let c;r&&Jt(r,c=Oo(l))?!o||!o.includes(c)?n[c]=u:(a||(a={}))[c]=u:wC(t.emitsOptions,l)||(!(l in i)||u!==i[l])&&(i[l]=u,s=!0)}if(o){const l=ln(n),u=a||xn;for(let c=0;c<o.length;c++){const d=o[c];n[d]=Yx(r,l,d,u[d],t,!Jt(u,d))}}return s}function Yx(t,e,n,i,r,o){const s=t[n];if(s!=null){const a=Jt(s,"default");if(a&&i===void 0){const l=s.default;if(s.type!==Function&&!s.skipFactory&&Xe(l)){const{propsDefaults:u}=r;if(n in u)i=u[n];else{const c=Ub(r);i=u[n]=l.call(null,e),c()}}else i=l;r.ce&&r.ce._setProp(n,i)}s[0]&&(o&&!a?i=!1:s[1]&&(i===""||i===bl(n))&&(i=!0))}return i}const Iie=new WeakMap;function Iz(t,e,n=!1){const i=n?Iie:e.propsCache,r=i.get(t);if(r)return r;const o=t.props,s={},a=[];let l=!1;if(!Xe(t)){const c=d=>{l=!0;const[f,h]=Iz(d,e,!0);Ri(s,f),h&&a.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!o&&!l)return _t(t)&&i.set(t,nm),nm;if(Pe(o))for(let c=0;c<o.length;c++){const d=Oo(o[c]);d5(d)&&(s[d]=xn)}else if(o)for(const c in o){const d=Oo(c);if(d5(d)){const f=o[c],h=s[d]=Pe(f)||Xe(f)?{type:f}:Ri({},f),m=h.type;let g=!1,v=!0;if(Pe(m))for(let p=0;p<m.length;++p){const b=m[p],y=Xe(b)&&b.name;if(y==="Boolean"){g=!0;break}else y==="String"&&(v=!1)}else g=Xe(m)&&m.name==="Boolean";h[0]=g,h[1]=v,(g||Jt(h,"default"))&&a.push(d)}}const u=[s,a];return _t(t)&&i.set(t,u),u}function d5(t){return t[0]!=="$"&&!Ip(t)}const II=t=>t==="_"||t==="_ctx"||t==="$stable",RI=t=>Pe(t)?t.map(Ua):[Ua(t)],Rie=(t,e,n)=>{if(e._n)return e;const i=ce((...r)=>RI(e(...r)),n);return i._c=!1,i},Rz=(t,e,n)=>{const i=t._ctx;for(const r in t){if(II(r))continue;const o=t[r];if(Xe(o))e[r]=Rie(r,o,i);else if(o!=null){const s=RI(o);e[r]=()=>s}}},Mz=(t,e)=>{const n=RI(e);t.slots.default=()=>n},Oz=(t,e,n)=>{for(const i in e)(n||!II(i))&&(t[i]=e[i])},Mie=(t,e,n)=>{const i=t.slots=xz();if(t.vnode.shapeFlag&32){const r=e._;r?(Oz(i,e,n),n&&A9(i,"_",r,!0)):Rz(e,i)}else e&&Mz(t,e)},Oie=(t,e,n)=>{const{vnode:i,slots:r}=t;let o=!0,s=xn;if(i.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:Oz(r,e,n):(o=!e.$stable,Rz(e,r)),s=e}else e&&(Mz(t,e),s={default:1});if(o)for(const a in r)!II(a)&&s[a]==null&&delete r[a]},Ir=Vie;function Lie(t){return Die(t)}function Die(t,e){const n=uC();n.__VUE__=!0;const{insert:i,remove:r,patchProp:o,createElement:s,createText:a,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=tn,insertStaticContent:m}=t,g=(V,K,G,ye=null,be=null,Ce=null,Y=void 0,Z=null,ae=!!K.dynamicChildren)=>{if(V===K)return;V&&!Bd(V,K)&&(ye=X(V),U(V,be,Ce,!0),V=null),K.patchFlag===-2&&(ae=!1,K.dynamicChildren=null);const{type:pe,ref:je,shapeFlag:Ie}=K;switch(pe){case Mf:v(V,K,G,ye);break;case xi:p(V,K,G,ye);break;case lk:V==null&&b(K,G,ye,Y);break;case rt:A(V,K,G,ye,be,Ce,Y,Z,ae);break;default:Ie&1?C(V,K,G,ye,be,Ce,Y,Z,ae):Ie&6?I(V,K,G,ye,be,Ce,Y,Z,ae):(Ie&64||Ie&128)&&pe.process(V,K,G,ye,be,Ce,Y,Z,ae,ee)}je!=null&&be?Np(je,V&&V.ref,Ce,K||V,!K):je==null&&V&&V.ref!=null&&Np(V.ref,null,Ce,V,!0)},v=(V,K,G,ye)=>{if(V==null)i(K.el=a(K.children),G,ye);else{const be=K.el=V.el;K.children!==V.children&&u(be,K.children)}},p=(V,K,G,ye)=>{V==null?i(K.el=l(K.children||""),G,ye):K.el=V.el},b=(V,K,G,ye)=>{[V.el,V.anchor]=m(V.children,K,G,ye,V.el,V.anchor)},y=({el:V,anchor:K},G,ye)=>{let be;for(;V&&V!==K;)be=f(V),i(V,G,ye),V=be;i(K,G,ye)},_=({el:V,anchor:K})=>{let G;for(;V&&V!==K;)G=f(V),r(V),V=G;r(K)},C=(V,K,G,ye,be,Ce,Y,Z,ae)=>{if(K.type==="svg"?Y="svg":K.type==="math"&&(Y="mathml"),V==null)S(K,G,ye,be,Ce,Y,Z,ae);else{const pe=V.el&&V.el._isVueCE?V.el:null;try{pe&&pe._beginPatch(),E(V,K,be,Ce,Y,Z,ae)}finally{pe&&pe._endPatch()}}},S=(V,K,G,ye,be,Ce,Y,Z)=>{let ae,pe;const{props:je,shapeFlag:Ie,transition:fe,dirs:Te}=V;if(ae=V.el=s(V.type,Ce,je&&je.is,je),Ie&8?c(ae,V.children):Ie&16&&T(V.children,ae,null,ye,be,ak(V,Ce),Y,Z),Te&&ed(V,null,ye,"created"),k(ae,V,V.scopeId,Y,ye),je){for(const Re in je)Re!=="value"&&!Ip(Re)&&o(ae,Re,null,je[Re],Ce,ye);"value"in je&&o(ae,"value",null,je.value,Ce),(pe=je.onVnodeBeforeMount)&&Ea(pe,ye,V)}Te&&ed(V,null,ye,"beforeMount");const et=Nie(be,fe);et&&fe.beforeEnter(ae),i(ae,K,G),((pe=je&&je.onVnodeMounted)||et||Te)&&Ir(()=>{pe&&Ea(pe,ye,V),et&&fe.enter(ae),Te&&ed(V,null,ye,"mounted")},be)},k=(V,K,G,ye,be)=>{if(G&&h(V,G),ye)for(let Ce=0;Ce<ye.length;Ce++)h(V,ye[Ce]);if(be){let Ce=be.subTree;if(K===Ce||Nz(Ce.type)&&(Ce.ssContent===K||Ce.ssFallback===K)){const Y=be.vnode;k(V,Y,Y.scopeId,Y.slotScopeIds,be.parent)}}},T=(V,K,G,ye,be,Ce,Y,Z,ae=0)=>{for(let pe=ae;pe<V.length;pe++){const je=V[pe]=Z?Ul(V[pe]):Ua(V[pe]);g(null,je,K,G,ye,be,Ce,Y,Z)}},E=(V,K,G,ye,be,Ce,Y)=>{const Z=K.el=V.el;let{patchFlag:ae,dynamicChildren:pe,dirs:je}=K;ae|=V.patchFlag&16;const Ie=V.props||xn,fe=K.props||xn;let Te;if(G&&td(G,!1),(Te=fe.onVnodeBeforeUpdate)&&Ea(Te,G,K,V),je&&ed(K,V,G,"beforeUpdate"),G&&td(G,!0),(Ie.innerHTML&&fe.innerHTML==null||Ie.textContent&&fe.textContent==null)&&c(Z,""),pe?x(V.dynamicChildren,pe,Z,G,ye,ak(K,be),Ce):Y||O(V,K,Z,null,G,ye,ak(K,be),Ce,!1),ae>0){if(ae&16)P(Z,Ie,fe,G,be);else if(ae&2&&Ie.class!==fe.class&&o(Z,"class",null,fe.class,be),ae&4&&o(Z,"style",Ie.style,fe.style,be),ae&8){const et=K.dynamicProps;for(let Re=0;Re<et.length;Re++){const ze=et[Re],Ke=Ie[ze],Dt=fe[ze];(Dt!==Ke||ze==="value")&&o(Z,ze,Ke,Dt,be,G)}}ae&1&&V.children!==K.children&&c(Z,K.children)}else!Y&&pe==null&&P(Z,Ie,fe,G,be);((Te=fe.onVnodeUpdated)||je)&&Ir(()=>{Te&&Ea(Te,G,K,V),je&&ed(K,V,G,"updated")},ye)},x=(V,K,G,ye,be,Ce,Y)=>{for(let Z=0;Z<K.length;Z++){const ae=V[Z],pe=K[Z],je=ae.el&&(ae.type===rt||!Bd(ae,pe)||ae.shapeFlag&198)?d(ae.el):G;g(ae,pe,je,null,ye,be,Ce,Y,!0)}},P=(V,K,G,ye,be)=>{if(K!==G){if(K!==xn)for(const Ce in K)!Ip(Ce)&&!(Ce in G)&&o(V,Ce,K[Ce],null,be,ye);for(const Ce in G){if(Ip(Ce))continue;const Y=G[Ce],Z=K[Ce];Y!==Z&&Ce!=="value"&&o(V,Ce,Z,Y,be,ye)}"value"in G&&o(V,"value",K.value,G.value,be)}},A=(V,K,G,ye,be,Ce,Y,Z,ae)=>{const pe=K.el=V?V.el:a(""),je=K.anchor=V?V.anchor:a("");let{patchFlag:Ie,dynamicChildren:fe,slotScopeIds:Te}=K;Te&&(Z=Z?Z.concat(Te):Te),V==null?(i(pe,G,ye),i(je,G,ye),T(K.children||[],G,je,be,Ce,Y,Z,ae)):Ie>0&&Ie&64&&fe&&V.dynamicChildren&&V.dynamicChildren.length===fe.length?(x(V.dynamicChildren,fe,G,be,Ce,Y,Z),(K.key!=null||be&&K===be.subTree)&&MI(V,K,!0)):O(V,K,G,je,be,Ce,Y,Z,ae)},I=(V,K,G,ye,be,Ce,Y,Z,ae)=>{K.slotScopeIds=Z,V==null?K.shapeFlag&512?be.ctx.activate(K,G,ye,Y,ae):D(K,G,ye,be,Ce,Y,ae):q(V,K,ae)},D=(V,K,G,ye,be,Ce,Y)=>{const Z=V.component=Uie(V,ye,be);if(vC(V)&&(Z.ctx.renderer=ee),Wie(Z,!1,Y),Z.asyncDep){if(be&&be.registerDep(Z,z,Y),!V.el){const ae=Z.subTree=L(xi);p(null,ae,K,G),V.placeholder=ae.el}}else z(Z,V,K,G,be,Ce,Y)},q=(V,K,G)=>{const ye=K.component=V.component;if(Eie(V,K,G))if(ye.asyncDep&&!ye.asyncResolved){R(ye,K,G);return}else ye.next=K,ye.update();else K.el=V.el,ye.vnode=K},z=(V,K,G,ye,be,Ce,Y)=>{const Z=()=>{if(V.isMounted){let{next:Ie,bu:fe,u:Te,parent:et,vnode:Re}=V;{const Je=Lz(V);if(Je){Ie&&(Ie.el=Re.el,R(V,Ie,Y)),Je.asyncDep.then(()=>{Ir(()=>{V.isUnmounted||pe()},be)});return}}let ze=Ie,Ke;td(V,!1),Ie?(Ie.el=Re.el,R(V,Ie,Y)):Ie=Re,fe&&gw(fe),(Ke=Ie.props&&Ie.props.onVnodeBeforeUpdate)&&Ea(Ke,et,Ie,Re),td(V,!0);const Dt=u5(V),Cn=V.subTree;V.subTree=Dt,g(Cn,Dt,d(Cn.el),X(Cn),V,be,Ce),Ie.el=Dt.el,ze===null&&xie(V,Dt.el),Te&&Ir(Te,be),(Ke=Ie.props&&Ie.props.onVnodeUpdated)&&Ir(()=>Ea(Ke,et,Ie,Re),be)}else{let Ie;const{el:fe,props:Te}=K,{bm:et,m:Re,parent:ze,root:Ke,type:Dt}=V,Cn=om(K);td(V,!1),et&&gw(et),!Cn&&(Ie=Te&&Te.onVnodeBeforeMount)&&Ea(Ie,ze,K),td(V,!0);{Ke.ce&&Ke.ce._hasShadowRoot()&&Ke.ce._injectChildStyle(Dt);const Je=V.subTree=u5(V);g(null,Je,G,ye,V,be,Ce),K.el=Je.el}if(Re&&Ir(Re,be),!Cn&&(Ie=Te&&Te.onVnodeMounted)){const Je=K;Ir(()=>Ea(Ie,ze,Je),be)}(K.shapeFlag&256||ze&&om(ze.vnode)&&ze.vnode.shapeFlag&256)&&V.a&&Ir(V.a,be),V.isMounted=!0,K=G=ye=null}};V.scope.on();const ae=V.effect=new C_(Z);V.scope.off();const pe=V.update=ae.run.bind(ae),je=V.job=ae.runIfDirty.bind(ae);je.i=V,je.id=V.uid,ae.scheduler=()=>TI(je),td(V,!0),pe()},R=(V,K,G)=>{K.component=V;const ye=V.vnode.props;V.vnode=K,V.next=null,Pie(V,K.props,ye,G),Oie(V,K.children,G),du(),JL(V),fu()},O=(V,K,G,ye,be,Ce,Y,Z,ae=!1)=>{const pe=V&&V.children,je=V?V.shapeFlag:0,Ie=K.children,{patchFlag:fe,shapeFlag:Te}=K;if(fe>0){if(fe&128){F(pe,Ie,G,ye,be,Ce,Y,Z,ae);return}else if(fe&256){N(pe,Ie,G,ye,be,Ce,Y,Z,ae);return}}Te&8?(je&16&&he(pe,be,Ce),Ie!==pe&&c(G,Ie)):je&16?Te&16?F(pe,Ie,G,ye,be,Ce,Y,Z,ae):he(pe,be,Ce,!0):(je&8&&c(G,""),Te&16&&T(Ie,G,ye,be,Ce,Y,Z,ae))},N=(V,K,G,ye,be,Ce,Y,Z,ae)=>{V=V||nm,K=K||nm;const pe=V.length,je=K.length,Ie=Math.min(pe,je);let fe;for(fe=0;fe<Ie;fe++){const Te=K[fe]=ae?Ul(K[fe]):Ua(K[fe]);g(V[fe],Te,G,null,be,Ce,Y,Z,ae)}pe>je?he(V,be,Ce,!0,!1,Ie):T(K,G,ye,be,Ce,Y,Z,ae,Ie)},F=(V,K,G,ye,be,Ce,Y,Z,ae)=>{let pe=0;const je=K.length;let Ie=V.length-1,fe=je-1;for(;pe<=Ie&&pe<=fe;){const Te=V[pe],et=K[pe]=ae?Ul(K[pe]):Ua(K[pe]);if(Bd(Te,et))g(Te,et,G,null,be,Ce,Y,Z,ae);else break;pe++}for(;pe<=Ie&&pe<=fe;){const Te=V[Ie],et=K[fe]=ae?Ul(K[fe]):Ua(K[fe]);if(Bd(Te,et))g(Te,et,G,null,be,Ce,Y,Z,ae);else break;Ie--,fe--}if(pe>Ie){if(pe<=fe){const Te=fe+1,et=Te<je?K[Te].el:ye;for(;pe<=fe;)g(null,K[pe]=ae?Ul(K[pe]):Ua(K[pe]),G,et,be,Ce,Y,Z,ae),pe++}}else if(pe>fe)for(;pe<=Ie;)U(V[pe],be,Ce,!0),pe++;else{const Te=pe,et=pe,Re=new Map;for(pe=et;pe<=fe;pe++){const ge=K[pe]=ae?Ul(K[pe]):Ua(K[pe]);ge.key!=null&&Re.set(ge.key,pe)}let ze,Ke=0;const Dt=fe-et+1;let Cn=!1,Je=0;const kt=new Array(Dt);for(pe=0;pe<Dt;pe++)kt[pe]=0;for(pe=Te;pe<=Ie;pe++){const ge=V[pe];if(Ke>=Dt){U(ge,be,Ce,!0);continue}let Le;if(ge.key!=null)Le=Re.get(ge.key);else for(ze=et;ze<=fe;ze++)if(kt[ze-et]===0&&Bd(ge,K[ze])){Le=ze;break}Le===void 0?U(ge,be,Ce,!0):(kt[Le-et]=pe+1,Le>=Je?Je=Le:Cn=!0,g(ge,K[Le],G,null,be,Ce,Y,Z,ae),Ke++)}const Et=Cn?Bie(kt):nm;for(ze=Et.length-1,pe=Dt-1;pe>=0;pe--){const ge=et+pe,Le=K[ge],de=K[ge+1],Ve=ge+1<je?de.el||Dz(de):ye;kt[pe]===0?g(null,Le,G,Ve,be,Ce,Y,Z,ae):Cn&&(ze<0||pe!==Et[ze]?j(Le,G,Ve,2):ze--)}}},j=(V,K,G,ye,be=null)=>{const{el:Ce,type:Y,transition:Z,children:ae,shapeFlag:pe}=V;if(pe&6){j(V.component.subTree,K,G,ye);return}if(pe&128){V.suspense.move(K,G,ye);return}if(pe&64){Y.move(V,K,G,ee);return}if(Y===rt){i(Ce,K,G);for(let Ie=0;Ie<ae.length;Ie++)j(ae[Ie],K,G,ye);i(V.anchor,K,G);return}if(Y===lk){y(V,K,G);return}if(ye!==2&&pe&1&&Z)if(ye===0)Z.beforeEnter(Ce),i(Ce,K,G),Ir(()=>Z.enter(Ce),be);else{const{leave:Ie,delayLeave:fe,afterLeave:Te}=Z,et=()=>{V.ctx.isUnmounted?r(Ce):i(Ce,K,G)},Re=()=>{Ce._isLeaving&&Ce[$a](!0),Ie(Ce,()=>{et(),Te&&Te()})};fe?fe(Ce,et,Re):Re()}else i(Ce,K,G)},U=(V,K,G,ye=!1,be=!1)=>{const{type:Ce,props:Y,ref:Z,children:ae,dynamicChildren:pe,shapeFlag:je,patchFlag:Ie,dirs:fe,cacheIndex:Te}=V;if(Ie===-2&&(be=!1),Z!=null&&(du(),Np(Z,null,G,V,!0),fu()),Te!=null&&(K.renderCache[Te]=void 0),je&256){K.ctx.deactivate(V);return}const et=je&1&&fe,Re=!om(V);let ze;if(Re&&(ze=Y&&Y.onVnodeBeforeUnmount)&&Ea(ze,K,V),je&6)ne(V.component,G,ye);else{if(je&128){V.suspense.unmount(G,ye);return}et&&ed(V,null,K,"beforeUnmount"),je&64?V.type.remove(V,K,G,ee,ye):pe&&!pe.hasOnce&&(Ce!==rt||Ie>0&&Ie&64)?he(pe,K,G,!1,!0):(Ce===rt&&Ie&384||!be&&je&16)&&he(ae,K,G),ye&&W(V)}(Re&&(ze=Y&&Y.onVnodeUnmounted)||et)&&Ir(()=>{ze&&Ea(ze,K,V),et&&ed(V,null,K,"unmounted")},G)},W=V=>{const{type:K,el:G,anchor:ye,transition:be}=V;if(K===rt){J(G,ye);return}if(K===lk){_(V);return}const Ce=()=>{r(G),be&&!be.persisted&&be.afterLeave&&be.afterLeave()};if(V.shapeFlag&1&&be&&!be.persisted){const{leave:Y,delayLeave:Z}=be,ae=()=>Y(G,Ce);Z?Z(V.el,Ce,ae):ae()}else Ce()},J=(V,K)=>{let G;for(;V!==K;)G=f(V),r(V),V=G;r(K)},ne=(V,K,G)=>{const{bum:ye,scope:be,job:Ce,subTree:Y,um:Z,m:ae,a:pe}=V;f5(ae),f5(pe),ye&&gw(ye),be.stop(),Ce&&(Ce.flags|=8,U(Y,V,K,G)),Z&&Ir(Z,K),Ir(()=>{V.isUnmounted=!0},K)},he=(V,K,G,ye=!1,be=!1,Ce=0)=>{for(let Y=Ce;Y<V.length;Y++)U(V[Y],K,G,ye,be)},X=V=>{if(V.shapeFlag&6)return X(V.component.subTree);if(V.shapeFlag&128)return V.suspense.next();const K=f(V.anchor||V.el),G=K&&K[iz];return G?f(G):K};let se=!1;const re=(V,K,G)=>{let ye;V==null?K._vnode&&(U(K._vnode,null,null,!0),ye=K._vnode.component):g(K._vnode||null,V,K,null,null,null,G),K._vnode=V,se||(se=!0,JL(ye),Z9(),se=!1)},ee={p:g,um:U,m:j,r:W,mt:D,mc:T,pc:O,pbc:x,n:X,o:t};return{render:re,hydrate:void 0,createApp:wie(re)}}function ak({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function td({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function Nie(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function MI(t,e,n=!1){const i=t.children,r=e.children;if(Pe(i)&&Pe(r))for(let o=0;o<i.length;o++){const s=i[o];let a=r[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=r[o]=Ul(r[o]),a.el=s.el),!n&&a.patchFlag!==-2&&MI(s,a)),a.type===Mf&&(a.patchFlag===-1&&(a=r[o]=Ul(a)),a.el=s.el),a.type===xi&&!a.el&&(a.el=s.el)}}function Bie(t){const e=t.slice(),n=[0];let i,r,o,s,a;const l=t.length;for(i=0;i<l;i++){const u=t[i];if(u!==0){if(r=n[n.length-1],t[r]<u){e[i]=r,n.push(i);continue}for(o=0,s=n.length-1;o<s;)a=o+s>>1,t[n[a]]<u?o=a+1:s=a;u<t[n[o]]&&(o>0&&(e[i]=n[o-1]),n[o]=i)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=e[s];return n}function Lz(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Lz(e)}function f5(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function Dz(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?Dz(e.subTree):null}const Nz=t=>t.__isSuspense;function Vie(t,e){e&&e.pendingBranch?Pe(t)?e.effects.push(...t):e.effects.push(t):Zne(t)}const rt=Symbol.for("v-fgt"),Mf=Symbol.for("v-txt"),xi=Symbol.for("v-cmt"),lk=Symbol.for("v-stc"),Vp=[];let Zo=null;function B(t=!1){Vp.push(Zo=t?null:[])}function Fie(){Vp.pop(),Zo=Vp[Vp.length-1]||null}let xv=1;function I_(t,e=!1){xv+=t,t<0&&Zo&&e&&(Zo.hasOnce=!0)}function Bz(t){return t.dynamicChildren=xv>0?Zo||nm:null,Fie(),xv>0&&Zo&&Zo.push(t),t}function Q(t,e,n,i,r,o){return Bz(ie(t,e,n,i,r,o,!0))}function _e(t,e,n,i,r){return Bz(L(t,e,n,i,r,!0))}function yi(t){return t?t.__v_isVNode===!0:!1}function Bd(t,e){return t.type===e.type&&t.key===e.key}const Vz=({key:t})=>t??null,ww=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?ot(t)||rn(t)||Xe(t)?{i:br,r:t,k:e,f:!!n}:t:null);function ie(t,e=null,n=null,i=0,r=null,o=t===rt?0:1,s=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Vz(e),ref:e&&ww(e),scopeId:ez,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:br};return a?(OI(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=ot(n)?8:16),xv>0&&!s&&Zo&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Zo.push(l),l}const L=$ie;function $ie(t,e=null,n=null,i=0,r=null,o=!1){if((!t||t===pz)&&(t=xi),yi(t)){const a=al(t,e,!0);return n&&OI(a,n),xv>0&&!o&&Zo&&(a.shapeFlag&6?Zo[Zo.indexOf(t)]=a:Zo.push(a)),a.patchFlag=-2,a}if(Gie(t)&&(t=t.__vccOpts),e){e=Fp(e);let{class:a,style:l}=e;a&&!ot(a)&&(e.class=$(a)),_t(l)&&(mC(l)&&!Pe(l)&&(l=Ri({},l)),e.style=mt(l))}const s=ot(t)?1:Nz(t)?128:rz(t)?64:_t(t)?4:Xe(t)?2:0;return ie(t,e,n,i,r,s,o,!0)}function Fp(t){return t?mC(t)||Az(t)?Ri({},t):t:null}function al(t,e,n=!1,i=!1){const{props:r,ref:o,patchFlag:s,children:a,transition:l}=t,u=e?Lt(r||{},e):r,c={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&Vz(u),ref:e&&e.ref?n&&o?Pe(o)?o.concat(ww(e)):[o,ww(e)]:ww(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==rt?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&al(t.ssContent),ssFallback:t.ssFallback&&al(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&pf(c,l.clone(c)),c}function dt(t=" ",e=0){return L(Mf,null,t,e)}function ve(t="",e=!1){return e?(B(),_e(xi,null,t)):L(xi,null,t)}function Ua(t){return t==null||typeof t=="boolean"?L(xi):Pe(t)?L(rt,null,t.slice()):yi(t)?Ul(t):L(Mf,null,String(t))}function Ul(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:al(t)}function OI(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Pe(e))n=16;else if(typeof e=="object")if(i&65){const r=e.default;r&&(r._c&&(r._d=!1),OI(t,r()),r._c&&(r._d=!0));return}else{n=32;const r=e._;!r&&!Az(e)?e._ctx=br:r===3&&br&&(br.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Xe(e)?(e={default:e,_ctx:br},n=32):(e=String(e),i&64?(n=16,e=[dt(e)]):n=8);t.children=e,t.shapeFlag|=n}function Lt(...t){const e={};for(let n=0;n<t.length;n++){const i=t[n];for(const r in i)if(r==="class")e.class!==i.class&&(e.class=$([e.class,i.class]));else if(r==="style")e.style=mt([e.style,i.style]);else if(oC(r)){const o=e[r],s=i[r];s&&o!==s&&!(Pe(o)&&o.includes(s))&&(e[r]=o?[].concat(o,s):s)}else r!==""&&(e[r]=i[r])}return e}function Ea(t,e,n,i=null){fa(t,e,7,[n,i])}const zie=Cz();let Hie=0;function Uie(t,e,n){const i=t.type,r=(e?e.appContext:t.appContext)||zie,o={uid:Hie++,vnode:t,type:i,parent:e,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new O9(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(r.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Iz(i,r),emitsOptions:kz(i,r),emit:null,emitted:null,propsDefaults:xn,inheritAttrs:i.inheritAttrs,ctx:xn,data:xn,props:xn,attrs:xn,slots:xn,refs:xn,setupState:xn,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=e?e.root:o,o.emit=Cie.bind(null,o),t.ce&&t.ce(o),o}let Nr=null;const Ct=()=>Nr||br;let R_,Xx;{const t=uC(),e=(n,i)=>{let r;return(r=t[n])||(r=t[n]=[]),r.push(i),o=>{r.length>1?r.forEach(s=>s(o)):r[0](o)}};R_=e("__VUE_INSTANCE_SETTERS__",n=>Nr=n),Xx=e("__VUE_SSR_SETTERS__",n=>Av=n)}const Ub=t=>{const e=Nr;return R_(t),t.scope.on(),()=>{t.scope.off(),R_(e)}},h5=()=>{Nr&&Nr.scope.off(),R_(null)};function Fz(t){return t.vnode.shapeFlag&4}let Av=!1;function Wie(t,e=!1,n=!1){e&&Xx(e);const{props:i,children:r}=t.vnode,o=Fz(t);Aie(t,i,o,e),Mie(t,r,n||e);const s=o?qie(t,e):void 0;return e&&Xx(!1),s}function qie(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,hie);const{setup:i}=n;if(i){du();const r=t.setupContext=i.length>1?zz(t):null,o=Ub(t),s=Hb(i,t,0,[t.props,r]),a=_v(s);if(fu(),o(),(a||t.sp)&&!om(t)&&fz(t),a){if(s.then(h5,h5),e)return s.then(l=>{m5(t,l)}).catch(l=>{gC(l,t,0)});t.asyncDep=s}else m5(t,s)}else $z(t)}function m5(t,e,n){Xe(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:_t(e)&&(t.setupState=G9(e)),$z(t)}function $z(t,e,n){const i=t.type;t.render||(t.render=i.render||tn);{const r=Ub(t);du();try{mie(t)}finally{fu(),r()}}}const jie={get(t,e){return Dr(t,"get",""),t[e]}};function zz(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,jie),slots:t.slots,emit:t.emit,expose:e}}function _C(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(G9(ca(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Bp)return Bp[n](t)},has(e,n){return n in e||n in Bp}})):t.proxy}function Kie(t,e=!0){return Xe(t)?t.displayName||t.name:t.name||e&&t.__name}function Gie(t){return Xe(t)&&"__vccOpts"in t}const M=(t,e)=>Kne(t,e,Av);function nt(t,e,n){try{I_(-1);const i=arguments.length;return i===2?_t(e)&&!Pe(e)?yi(e)?L(t,null,[e]):L(t,e):L(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&yi(n)&&(n=[n]),L(t,e,n))}finally{I_(1)}}const LI="3.5.29",Yie=tn;let Jx;const g5=typeof window<"u"&&window.trustedTypes;if(g5)try{Jx=g5.createPolicy("vue",{createHTML:t=>t})}catch{}const Hz=Jx?t=>Jx.createHTML(t):t=>t,Xie="http://www.w3.org/2000/svg",Jie="http://www.w3.org/1998/Math/MathML",$l=typeof document<"u"?document:null,p5=$l&&$l.createElement("template"),Zie={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const r=e==="svg"?$l.createElementNS(Xie,t):e==="mathml"?$l.createElementNS(Jie,t):n?$l.createElement(t,{is:n}):$l.createElement(t);return t==="select"&&i&&i.multiple!=null&&r.setAttribute("multiple",i.multiple),r},createText:t=>$l.createTextNode(t),createComment:t=>$l.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>$l.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,r,o){const s=n?n.previousSibling:e.lastChild;if(r&&(r===o||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{p5.innerHTML=Hz(i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t);const a=p5.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[s?s.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Ru="transition",Ag="animation",Sm=Symbol("_vtc"),Uz={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},Wz=Ri({},lz,Uz),Qie=t=>(t.displayName="Transition",t.props=Wz,t),ya=Qie((t,{slots:e})=>nt(oie,qz(t),e)),nd=(t,e=[])=>{Pe(t)?t.forEach(n=>n(...e)):t&&t(...e)},v5=t=>t?Pe(t)?t.some(e=>e.length>1):t.length>1:!1;function qz(t){const e={};for(const A in t)A in Uz||(e[A]=t[A]);if(t.css===!1)return e;const{name:n="v",type:i,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=s,appearToClass:c=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,m=ere(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:p,onEnter:b,onEnterCancelled:y,onLeave:_,onLeaveCancelled:C,onBeforeAppear:S=p,onAppear:k=b,onAppearCancelled:T=y}=e,E=(A,I,D,q)=>{A._enterCancelled=q,Ku(A,I?c:a),Ku(A,I?u:s),D&&D()},x=(A,I)=>{A._isLeaving=!1,Ku(A,d),Ku(A,h),Ku(A,f),I&&I()},P=A=>(I,D)=>{const q=A?k:b,z=()=>E(I,A,D);nd(q,[I,z]),b5(()=>{Ku(I,A?l:o),Va(I,A?c:a),v5(q)||y5(I,i,g,z)})};return Ri(e,{onBeforeEnter(A){nd(p,[A]),Va(A,o),Va(A,s)},onBeforeAppear(A){nd(S,[A]),Va(A,l),Va(A,u)},onEnter:P(!1),onAppear:P(!0),onLeave(A,I){A._isLeaving=!0;const D=()=>x(A,I);Va(A,d),A._enterCancelled?(Va(A,f),Zx(A)):(Zx(A),Va(A,f)),b5(()=>{A._isLeaving&&(Ku(A,d),Va(A,h),v5(_)||y5(A,i,v,D))}),nd(_,[A,D])},onEnterCancelled(A){E(A,!1,void 0,!0),nd(y,[A])},onAppearCancelled(A){E(A,!0,void 0,!0),nd(T,[A])},onLeaveCancelled(A){x(A),nd(C,[A])}})}function ere(t){if(t==null)return null;if(_t(t))return[uk(t.enter),uk(t.leave)];{const e=uk(t);return[e,e]}}function uk(t){return fne(t)}function Va(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[Sm]||(t[Sm]=new Set)).add(e)}function Ku(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[Sm];n&&(n.delete(e),n.size||(t[Sm]=void 0))}function b5(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let tre=0;function y5(t,e,n,i){const r=t._endId=++tre,o=()=>{r===t._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:s,timeout:a,propCount:l}=jz(t,e);if(!s)return i();const u=s+"end";let c=0;const d=()=>{t.removeEventListener(u,f),o()},f=h=>{h.target===t&&++c>=l&&d()};setTimeout(()=>{c<l&&d()},a+1),t.addEventListener(u,f)}function jz(t,e){const n=window.getComputedStyle(t),i=m=>(n[m]||"").split(", "),r=i(`${Ru}Delay`),o=i(`${Ru}Duration`),s=w5(r,o),a=i(`${Ag}Delay`),l=i(`${Ag}Duration`),u=w5(a,l);let c=null,d=0,f=0;e===Ru?s>0&&(c=Ru,d=s,f=o.length):e===Ag?u>0&&(c=Ag,d=u,f=l.length):(d=Math.max(s,u),c=d>0?s>u?Ru:Ag:null,f=c?c===Ru?o.length:l.length:0);const h=c===Ru&&/\b(?:transform|all)(?:,|$)/.test(i(`${Ru}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function w5(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,i)=>_5(n)+_5(t[i])))}function _5(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Zx(t){return(t?t.ownerDocument:document).body.offsetHeight}function nre(t,e,n){const i=t[Sm];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const M_=Symbol("_vod"),Kz=Symbol("_vsh"),On={name:"show",beforeMount(t,{value:e},{transition:n}){t[M_]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Pg(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),Pg(t,!0),i.enter(t)):i.leave(t,()=>{Pg(t,!1)}):Pg(t,e))},beforeUnmount(t,{value:e}){Pg(t,e)}};function Pg(t,e){t.style.display=e?t[M_]:"none",t[Kz]=!e}const ire=Symbol(""),rre=/(?:^|;)\s*display\s*:/;function ore(t,e,n){const i=t.style,r=ot(n);let o=!1;if(n&&!r){if(e)if(ot(e))for(const s of e.split(";")){const a=s.slice(0,s.indexOf(":")).trim();n[a]==null&&_w(i,a,"")}else for(const s in e)n[s]==null&&_w(i,s,"");for(const s in n)s==="display"&&(o=!0),_w(i,s,n[s])}else if(r){if(e!==n){const s=i[ire];s&&(n+=";"+s),i.cssText=n,o=rre.test(n)}}else e&&t.removeAttribute("style");M_ in t&&(t[M_]=o?i.display:"",t[Kz]&&(i.display="none"))}const C5=/\s*!important$/;function _w(t,e,n){if(Pe(n))n.forEach(i=>_w(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=sre(t,e);C5.test(n)?t.setProperty(bl(i),n.replace(C5,""),"important"):t[i]=n}}const S5=["Webkit","Moz","ms"],ck={};function sre(t,e){const n=ck[e];if(n)return n;let i=Oo(e);if(i!=="filter"&&i in t)return ck[e]=i;i=$b(i);for(let r=0;r<S5.length;r++){const o=S5[r]+i;if(o in t)return ck[e]=o}return e}const k5="http://www.w3.org/1999/xlink";function T5(t,e,n,i,r,o=bne(e)){i&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(k5,e.slice(6,e.length)):t.setAttributeNS(k5,e,n):n==null||o&&!P9(n)?t.removeAttribute(e):t.setAttribute(e,o?"":ua(n)?String(n):n)}function E5(t,e,n,i,r){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?Hz(n):n);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let s=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=P9(n):n==null&&a==="string"?(n="",s=!0):a==="number"&&(n=0,s=!0)}try{t[e]=n}catch{}s&&t.removeAttribute(r||e)}function oc(t,e,n,i){t.addEventListener(e,n,i)}function are(t,e,n,i){t.removeEventListener(e,n,i)}const x5=Symbol("_vei");function lre(t,e,n,i,r=null){const o=t[x5]||(t[x5]={}),s=o[e];if(i&&s)s.value=i;else{const[a,l]=ure(e);if(i){const u=o[e]=fre(i,r);oc(t,a,u,l)}else s&&(are(t,a,s,l),o[e]=void 0)}}const A5=/(?:Once|Passive|Capture)$/;function ure(t){let e;if(A5.test(t)){e={};let i;for(;i=t.match(A5);)t=t.slice(0,t.length-i[0].length),e[i[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):bl(t.slice(2)),e]}let dk=0;const cre=Promise.resolve(),dre=()=>dk||(cre.then(()=>dk=0),dk=Date.now());function fre(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;fa(hre(i,n.value),e,5,[i])};return n.value=t,n.attached=dre(),n}function hre(t,e){if(Pe(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>r=>!r._stopped&&i&&i(r))}else return e}const P5=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,mre=(t,e,n,i,r,o)=>{const s=r==="svg";e==="class"?nre(t,i,s):e==="style"?ore(t,n,i):oC(e)?vI(e)||lre(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):gre(t,e,i,s))?(E5(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&T5(t,e,i,s,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!ot(i))?E5(t,Oo(e),i,o,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),T5(t,e,i,s))};function gre(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&P5(e)&&Xe(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return P5(e)&&ot(n)?!1:e in t}const Gz=new WeakMap,Yz=new WeakMap,O_=Symbol("_moveCb"),I5=Symbol("_enterCb"),pre=t=>(delete t.props.mode,t),vre=pre({name:"TransitionGroup",props:Ri({},Wz,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Ct(),i=az();let r,o;return ku(()=>{if(!r.length)return;const s=t.moveClass||`${t.name||"v"}-move`;if(!_re(r[0].el,n.vnode.el,s)){r=[];return}r.forEach(bre),r.forEach(yre);const a=r.filter(wre);Zx(n.vnode.el),a.forEach(l=>{const u=l.el,c=u.style;Va(u,s),c.transform=c.webkitTransform=c.transitionDuration="";const d=u[O_]=f=>{f&&f.target!==u||(!f||f.propertyName.endsWith("transform"))&&(u.removeEventListener("transitionend",d),u[O_]=null,Ku(u,s))};u.addEventListener("transitionend",d)}),r=[]}),()=>{const s=ln(t),a=qz(s);let l=s.tag||rt;if(r=[],o)for(let u=0;u<o.length;u++){const c=o[u];c.el&&c.el instanceof Element&&(r.push(c),pf(c,Ev(c,a,i,n)),Gz.set(c,Jz(c.el)))}o=e.default?EI(e.default()):[];for(let u=0;u<o.length;u++){const c=o[u];c.key!=null&&pf(c,Ev(c,a,i,n))}return L(l,null,o)}}}),Xz=vre;function bre(t){const e=t.el;e[O_]&&e[O_](),e[I5]&&e[I5]()}function yre(t){Yz.set(t,Jz(t.el))}function wre(t){const e=Gz.get(t),n=Yz.get(t),i=e.left-n.left,r=e.top-n.top;if(i||r){const o=t.el,s=o.style,a=o.getBoundingClientRect();let l=1,u=1;return o.offsetWidth&&(l=a.width/o.offsetWidth),o.offsetHeight&&(u=a.height/o.offsetHeight),(!Number.isFinite(l)||l===0)&&(l=1),(!Number.isFinite(u)||u===0)&&(u=1),Math.abs(l-1)<.01&&(l=1),Math.abs(u-1)<.01&&(u=1),s.transform=s.webkitTransform=`translate(${i/l}px,${r/u}px)`,s.transitionDuration="0s",t}}function Jz(t){const e=t.getBoundingClientRect();return{left:e.left,top:e.top}}function _re(t,e,n){const i=t.cloneNode(),r=t[Sm];r&&r.forEach(a=>{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(i);const{hasTransform:s}=jz(i);return o.removeChild(i),s}const km=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Pe(e)?n=>gw(e,n):e};function Cre(t){t.target.composing=!0}function R5(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ru=Symbol("_assign");function M5(t,e,n){return e&&(t=t.trim()),n&&(t=yI(t)),t}const Sre={created(t,{modifiers:{lazy:e,trim:n,number:i}},r){t[ru]=km(r);const o=i||r.props&&r.props.type==="number";oc(t,e?"change":"input",s=>{s.target.composing||t[ru](M5(t.value,n,o))}),(n||o)&&oc(t,"change",()=>{t.value=M5(t.value,n,o)}),e||(oc(t,"compositionstart",Cre),oc(t,"compositionend",R5),oc(t,"change",R5))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:r,number:o}},s){if(t[ru]=km(s),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?yI(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||r&&t.value.trim()===l)||(t.value=l))}},Zz={deep:!0,created(t,e,n){t[ru]=km(n),oc(t,"change",()=>{const i=t._modelValue,r=eH(t),o=t.checked,s=t[ru];if(Pe(i)){const a=I9(i,r),l=a!==-1;if(o&&!l)s(i.concat(r));else if(!o&&l){const u=[...i];u.splice(a,1),s(u)}}else if(sC(i)){const a=new Set(i);o?a.add(r):a.delete(r),s(a)}else s(tH(t,o))})},mounted:O5,beforeUpdate(t,e,n){t[ru]=km(n),O5(t,e,n)}};function O5(t,{value:e,oldValue:n},i){t._modelValue=e;let r;if(Pe(e))r=I9(e,i.props.value)>-1;else if(sC(e))r=e.has(i.props.value);else{if(e===n)return;r=mf(e,tH(t,!0))}t.checked!==r&&(t.checked=r)}const Qz={created(t,{value:e},n){t.checked=mf(e,n.props.value),t[ru]=km(n),oc(t,"change",()=>{t[ru](eH(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[ru]=km(i),e!==n&&(t.checked=mf(e,i.props.value))}};function eH(t){return"_value"in t?t._value:t.value}function tH(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const kre=["ctrl","shift","alt","meta"],Tre={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>kre.some(n=>t[`${n}Key`]&&!e.includes(n))},Ot=(t,e)=>{if(!t)return t;const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=((r,...o)=>{for(let s=0;s<e.length;s++){const a=Tre[e[s]];if(a&&a(r,e))return}return t(r,...o)}))},Ere={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Pi=(t,e)=>{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=(r=>{if(!("key"in r))return;const o=bl(r.key);if(e.some(s=>s===o||Ere[s]===o))return t(r)}))},xre=Ri({patchProp:mre},Zie);let L5;function nH(){return L5||(L5=Lie(xre))}const Tm=((...t)=>{nH().render(...t)}),L_=((...t)=>{const e=nH().createApp(...t),{mount:n}=e;return e.mount=i=>{const r=Pre(i);if(!r)return;const o=e._component;!Xe(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const s=n(r,!1,Are(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},e});function Are(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function Pre(t){return ot(t)?document.querySelector(t):t}let iH;const CC=t=>iH=t,rH=Symbol();function Qx(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var $p;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})($p||($p={}));function Ire(){const t=zb(!0),e=t.run(()=>H({}));let n=[],i=[];const r=ca({install(o){CC(r),r._a=o,o.provide(rH,r),o.config.globalProperties.$pinia=r,i.forEach(s=>n.push(s)),i=[]},use(o){return this._a?n.push(o):i.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return r}const oH=()=>{};function D5(t,e,n,i=oH){t.add(e);const r=()=>{t.delete(e)&&i()};return!n&&cC()&&dC(r),r}function eh(t,...e){t.forEach(n=>{n(...e)})}const Rre=t=>t(),N5=Symbol(),fk=Symbol();function e2(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],r=t[n];Qx(r)&&Qx(i)&&t.hasOwnProperty(n)&&!rn(i)&&!na(i)?t[n]=e2(r,i):t[n]=i}return t}const Mre=Symbol();function Ore(t){return!Qx(t)||!Object.prototype.hasOwnProperty.call(t,Mre)}const{assign:Gu}=Object;function Lre(t){return!!(rn(t)&&t.effect)}function Dre(t,e,n,i){const{state:r,actions:o,getters:s}=e,a=n.state.value[t];let l;function u(){a||(n.state.value[t]=r?r():{});const c=Sr(n.state.value[t]);return Gu(c,o,Object.keys(s||{}).reduce((d,f)=>(d[f]=ca(M(()=>{CC(n);const h=n._s.get(t);return s[f].call(h,h)})),d),{}))}return l=sH(t,u,e,n,i,!0),l}function sH(t,e,n={},i,r,o){let s;const a=Gu({actions:{}},n),l={deep:!0};let u,c,d=new Set,f=new Set,h;const m=i.state.value[t];!o&&!m&&(i.state.value[t]={});let g;function v(T){let E;u=c=!1,typeof T=="function"?(T(i.state.value[t]),E={type:$p.patchFunction,storeId:t,events:h}):(e2(i.state.value[t],T),E={type:$p.patchObject,payload:T,storeId:t,events:h});const x=g=Symbol();Ye().then(()=>{g===x&&(u=!0)}),c=!0,eh(d,E,i.state.value[t])}const p=o?function(){const{state:E}=n,x=E?E():{};this.$patch(P=>{Gu(P,x)})}:oH;function b(){s.stop(),d.clear(),f.clear(),i._s.delete(t)}const y=(T,E="")=>{if(N5 in T)return T[fk]=E,T;const x=function(){CC(i);const P=Array.from(arguments),A=new Set,I=new Set;function D(R){A.add(R)}function q(R){I.add(R)}eh(f,{args:P,name:x[fk],store:C,after:D,onError:q});let z;try{z=T.apply(this&&this.$id===t?this:C,P)}catch(R){throw eh(I,R),R}return z instanceof Promise?z.then(R=>(eh(A,R),R)).catch(R=>(eh(I,R),Promise.reject(R))):(eh(A,z),z)};return x[N5]=!0,x[fk]=E,x},_={_p:i,$id:t,$onAction:D5.bind(null,f),$patch:v,$reset:p,$subscribe(T,E={}){const x=D5(d,T,E.detached,()=>P()),P=s.run(()=>Se(()=>i.state.value[t],A=>{(E.flush==="sync"?c:u)&&T({storeId:t,type:$p.direct,events:h},A)},Gu({},l,E)));return x},$dispose:b},C=on(_);i._s.set(t,C);const k=(i._a&&i._a.runWithContext||Rre)(()=>i._e.run(()=>(s=zb()).run(()=>e({action:y}))));for(const T in k){const E=k[T];if(rn(E)&&!Lre(E)||na(E))o||(m&&Ore(E)&&(rn(E)?E.value=m[T]:e2(E,m[T])),i.state.value[t][T]=E);else if(typeof E=="function"){const x=y(E,T);k[T]=x,a.actions[T]=E}}return Gu(C,k),Gu(ln(C),k),Object.defineProperty(C,"$state",{get:()=>i.state.value[t],set:T=>{v(E=>{Gu(E,T)})}}),i._p.forEach(T=>{Gu(C,s.run(()=>T({store:C,app:i._a,pinia:i,options:a})))}),m&&o&&n.hydrate&&n.hydrate(C.$state,m),u=!0,c=!0,C}function Nre(t,e,n){let i;const r=typeof e=="function";i=r?n:e;function o(s,a){const l=tz();return s=s||(l?Ne(rH,null):null),s&&CC(s),s=iH,s._s.has(t)||(r?sH(t,e,i,s):Dre(t,i,s)),s._s.get(t)}return o.$id=t,o}const Bre="modulepreload",Vre=function(t,e){return new URL(t,e).href},B5={},mn=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){let u=function(c){return Promise.all(c.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};const s=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),l=a?.nonce||a?.getAttribute("nonce");r=u(n.map(c=>{if(c=Vre(c,i),c in B5)return;B5[c]=!0;const d=c.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(i)for(let m=s.length-1;m>=0;m--){const g=s[m];if(g.href===c&&(!d||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${f}`))return;const h=document.createElement("link");if(h.rel=d?"stylesheet":Bre,d||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),d)return new Promise((m,g)=>{h.addEventListener("load",m),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return r.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return e().catch(o)})},aH=Symbol();var lH=typeof global=="object"&&global&&global.Object===Object&&global,Fre=typeof self=="object"&&self&&self.Object===Object&&self,wa=lH||Fre||Function("return this")(),Ns=wa.Symbol,uH=Object.prototype,$re=uH.hasOwnProperty,zre=uH.toString,Ig=Ns?Ns.toStringTag:void 0;function Hre(t){var e=$re.call(t,Ig),n=t[Ig];try{t[Ig]=void 0;var i=!0}catch{}var r=zre.call(t);return i&&(e?t[Ig]=n:delete t[Ig]),r}var Ure=Object.prototype,Wre=Ure.toString;function qre(t){return Wre.call(t)}var jre="[object Null]",Kre="[object Undefined]",V5=Ns?Ns.toStringTag:void 0;function Of(t){return t==null?t===void 0?Kre:jre:V5&&V5 in Object(t)?Hre(t):qre(t)}function ll(t){return t!=null&&typeof t=="object"}var Gre="[object Symbol]";function SC(t){return typeof t=="symbol"||ll(t)&&Of(t)==Gre}function DI(t,e){for(var n=-1,i=t==null?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}var ro=Array.isArray,F5=Ns?Ns.prototype:void 0,$5=F5?F5.toString:void 0;function cH(t){if(typeof t=="string")return t;if(ro(t))return DI(t,cH)+"";if(SC(t))return $5?$5.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var Yre=/\s/;function Xre(t){for(var e=t.length;e--&&Yre.test(t.charAt(e)););return e}var Jre=/^\s+/;function Zre(t){return t&&t.slice(0,Xre(t)+1).replace(Jre,"")}function oo(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var z5=NaN,Qre=/^[-+]0x[0-9a-f]+$/i,eoe=/^0b[01]+$/i,toe=/^0o[0-7]+$/i,noe=parseInt;function zp(t){if(typeof t=="number")return t;if(SC(t))return z5;if(oo(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=oo(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Zre(t);var n=eoe.test(t);return n||toe.test(t)?noe(t.slice(2),n?2:8):Qre.test(t)?z5:+t}function NI(t){return t}var ioe="[object AsyncFunction]",roe="[object Function]",ooe="[object GeneratorFunction]",soe="[object Proxy]";function BI(t){if(!oo(t))return!1;var e=Of(t);return e==roe||e==ooe||e==ioe||e==soe}var hk=wa["__core-js_shared__"],H5=(function(){var t=/[^.]+$/.exec(hk&&hk.keys&&hk.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function aoe(t){return!!H5&&H5 in t}var loe=Function.prototype,uoe=loe.toString;function Lf(t){if(t!=null){try{return uoe.call(t)}catch{}try{return t+""}catch{}}return""}var coe=/[\\^$.*+?()[\]{}|]/g,doe=/^\[object .+?Constructor\]$/,foe=Function.prototype,hoe=Object.prototype,moe=foe.toString,goe=hoe.hasOwnProperty,poe=RegExp("^"+moe.call(goe).replace(coe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function voe(t){if(!oo(t)||aoe(t))return!1;var e=BI(t)?poe:doe;return e.test(Lf(t))}function boe(t,e){return t?.[e]}function Df(t,e){var n=boe(t,e);return voe(n)?n:void 0}var t2=Df(wa,"WeakMap"),U5=Object.create,yoe=(function(){function t(){}return function(e){if(!oo(e))return{};if(U5)return U5(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}})();function woe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function _oe(){}function dH(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var Coe=800,Soe=16,koe=Date.now;function Toe(t){var e=0,n=0;return function(){var i=koe(),r=Soe-(i-n);if(n=i,r>0){if(++e>=Coe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Eoe(t){return function(){return t}}var D_=(function(){try{var t=Df(Object,"defineProperty");return t({},"",{}),t}catch{}})(),xoe=D_?function(t,e){return D_(t,"toString",{configurable:!0,enumerable:!1,value:Eoe(e),writable:!0})}:NI,fH=Toe(xoe);function Aoe(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function hH(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function Poe(t){return t!==t}function Ioe(t,e,n){for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}function Roe(t,e,n){return e===e?Ioe(t,e,n):hH(t,Poe,n)}function Moe(t,e){var n=t==null?0:t.length;return!!n&&Roe(t,e,0)>-1}var Ooe=9007199254740991,Loe=/^(?:0|[1-9]\d*)$/;function kC(t,e){var n=typeof t;return e=e??Ooe,!!e&&(n=="number"||n!="symbol"&&Loe.test(t))&&t>-1&&t%1==0&&t<e}function VI(t,e,n){e=="__proto__"&&D_?D_(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Wb(t,e){return t===e||t!==t&&e!==e}var Doe=Object.prototype,Noe=Doe.hasOwnProperty;function FI(t,e,n){var i=t[e];(!(Noe.call(t,e)&&Wb(i,n))||n===void 0&&!(e in t))&&VI(t,e,n)}function sg(t,e,n,i){var r=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=void 0;l===void 0&&(l=t[a]),r?VI(n,a,l):FI(n,a,l)}return n}var W5=Math.max;function mH(t,e,n){return e=W5(e===void 0?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=W5(i.length-e,0),s=Array(o);++r<o;)s[r]=i[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=i[r];return a[e]=n(s),woe(t,this,a)}}function gH(t,e){return fH(mH(t,e,NI),t+"")}var Boe=9007199254740991;function $I(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Boe}function ag(t){return t!=null&&$I(t.length)&&!BI(t)}function Voe(t,e,n){if(!oo(n))return!1;var i=typeof e;return(i=="number"?ag(n)&&kC(e,n.length):i=="string"&&e in n)?Wb(n[e],t):!1}function Foe(t){return gH(function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,s=r>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(r--,o):void 0,s&&Voe(n[0],n[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++i<r;){var a=n[i];a&&t(e,a,i,o)}return e})}var $oe=Object.prototype;function zI(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||$oe;return t===n}function zoe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var Hoe="[object Arguments]";function q5(t){return ll(t)&&Of(t)==Hoe}var pH=Object.prototype,Uoe=pH.hasOwnProperty,Woe=pH.propertyIsEnumerable,Pv=q5((function(){return arguments})())?q5:function(t){return ll(t)&&Uoe.call(t,"callee")&&!Woe.call(t,"callee")};function qoe(){return!1}var vH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j5=vH&&typeof module=="object"&&module&&!module.nodeType&&module,joe=j5&&j5.exports===vH,K5=joe?wa.Buffer:void 0,Koe=K5?K5.isBuffer:void 0,Iv=Koe||qoe,Goe="[object Arguments]",Yoe="[object Array]",Xoe="[object Boolean]",Joe="[object Date]",Zoe="[object Error]",Qoe="[object Function]",ese="[object Map]",tse="[object Number]",nse="[object Object]",ise="[object RegExp]",rse="[object Set]",ose="[object String]",sse="[object WeakMap]",ase="[object ArrayBuffer]",lse="[object DataView]",use="[object Float32Array]",cse="[object Float64Array]",dse="[object Int8Array]",fse="[object Int16Array]",hse="[object Int32Array]",mse="[object Uint8Array]",gse="[object Uint8ClampedArray]",pse="[object Uint16Array]",vse="[object Uint32Array]",oi={};oi[use]=oi[cse]=oi[dse]=oi[fse]=oi[hse]=oi[mse]=oi[gse]=oi[pse]=oi[vse]=!0;oi[Goe]=oi[Yoe]=oi[ase]=oi[Xoe]=oi[lse]=oi[Joe]=oi[Zoe]=oi[Qoe]=oi[ese]=oi[tse]=oi[nse]=oi[ise]=oi[rse]=oi[ose]=oi[sse]=!1;function bse(t){return ll(t)&&$I(t.length)&&!!oi[Of(t)]}function HI(t){return function(e){return t(e)}}var bH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hp=bH&&typeof module=="object"&&module&&!module.nodeType&&module,yse=Hp&&Hp.exports===bH,mk=yse&&lH.process,Em=(function(){try{var t=Hp&&Hp.require&&Hp.require("util").types;return t||mk&&mk.binding&&mk.binding("util")}catch{}})(),G5=Em&&Em.isTypedArray,UI=G5?HI(G5):bse,wse=Object.prototype,_se=wse.hasOwnProperty;function yH(t,e){var n=ro(t),i=!n&&Pv(t),r=!n&&!i&&Iv(t),o=!n&&!i&&!r&&UI(t),s=n||i||r||o,a=s?zoe(t.length,String):[],l=a.length;for(var u in t)(e||_se.call(t,u))&&!(s&&(u=="length"||r&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||kC(u,l)))&&a.push(u);return a}function wH(t,e){return function(n){return t(e(n))}}var Cse=wH(Object.keys,Object),Sse=Object.prototype,kse=Sse.hasOwnProperty;function Tse(t){if(!zI(t))return Cse(t);var e=[];for(var n in Object(t))kse.call(t,n)&&n!="constructor"&&e.push(n);return e}function qb(t){return ag(t)?yH(t):Tse(t)}function Ese(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var xse=Object.prototype,Ase=xse.hasOwnProperty;function Pse(t){if(!oo(t))return Ese(t);var e=zI(t),n=[];for(var i in t)i=="constructor"&&(e||!Ase.call(t,i))||n.push(i);return n}function jb(t){return ag(t)?yH(t,!0):Pse(t)}var Ise=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rse=/^\w*$/;function WI(t,e){if(ro(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||SC(t)?!0:Rse.test(t)||!Ise.test(t)||e!=null&&t in Object(e)}var Rv=Df(Object,"create");function Mse(){this.__data__=Rv?Rv(null):{},this.size=0}function Ose(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Lse="__lodash_hash_undefined__",Dse=Object.prototype,Nse=Dse.hasOwnProperty;function Bse(t){var e=this.__data__;if(Rv){var n=e[t];return n===Lse?void 0:n}return Nse.call(e,t)?e[t]:void 0}var Vse=Object.prototype,Fse=Vse.hasOwnProperty;function $se(t){var e=this.__data__;return Rv?e[t]!==void 0:Fse.call(e,t)}var zse="__lodash_hash_undefined__";function Hse(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Rv&&e===void 0?zse:e,this}function vf(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}vf.prototype.clear=Mse;vf.prototype.delete=Ose;vf.prototype.get=Bse;vf.prototype.has=$se;vf.prototype.set=Hse;function Use(){this.__data__=[],this.size=0}function TC(t,e){for(var n=t.length;n--;)if(Wb(t[n][0],e))return n;return-1}var Wse=Array.prototype,qse=Wse.splice;function jse(t){var e=this.__data__,n=TC(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():qse.call(e,n,1),--this.size,!0}function Kse(t){var e=this.__data__,n=TC(e,t);return n<0?void 0:e[n][1]}function Gse(t){return TC(this.__data__,t)>-1}function Yse(t,e){var n=this.__data__,i=TC(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Tu(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Tu.prototype.clear=Use;Tu.prototype.delete=jse;Tu.prototype.get=Kse;Tu.prototype.has=Gse;Tu.prototype.set=Yse;var Mv=Df(wa,"Map");function Xse(){this.size=0,this.__data__={hash:new vf,map:new(Mv||Tu),string:new vf}}function Jse(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function EC(t,e){var n=t.__data__;return Jse(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Zse(t){var e=EC(this,t).delete(t);return this.size-=e?1:0,e}function Qse(t){return EC(this,t).get(t)}function eae(t){return EC(this,t).has(t)}function tae(t,e){var n=EC(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function Eu(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}Eu.prototype.clear=Xse;Eu.prototype.delete=Zse;Eu.prototype.get=Qse;Eu.prototype.has=eae;Eu.prototype.set=tae;var nae="Expected a function";function qI(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(nae);var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var s=t.apply(this,i);return n.cache=o.set(r,s)||o,s};return n.cache=new(qI.Cache||Eu),n}qI.Cache=Eu;var iae=500;function rae(t){var e=qI(t,function(i){return n.size===iae&&n.clear(),i}),n=e.cache;return e}var oae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sae=/\\(\\)?/g,aae=rae(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(oae,function(n,i,r,o){e.push(r?o.replace(sae,"$1"):i||n)}),e});function lae(t){return t==null?"":cH(t)}function lg(t,e){return ro(t)?t:WI(t,e)?[t]:aae(lae(t))}function ug(t){if(typeof t=="string"||SC(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function xC(t,e){e=lg(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[ug(e[n++])];return n&&n==i?t:void 0}function to(t,e,n){var i=t==null?void 0:xC(t,e);return i===void 0?n:i}function jI(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}var Y5=Ns?Ns.isConcatSpreadable:void 0;function uae(t){return ro(t)||Pv(t)||!!(Y5&&t&&t[Y5])}function Kb(t,e,n,i,r){var o=-1,s=t.length;for(n||(n=uae),r||(r=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?Kb(a,e-1,n,i,r):jI(r,a):i||(r[r.length]=a)}return r}function N_(t){var e=t==null?0:t.length;return e?Kb(t,1):[]}function _H(t){return fH(mH(t,void 0,N_),t+"")}var KI=wH(Object.getPrototypeOf,Object),cae="[object Object]",dae=Function.prototype,fae=Object.prototype,CH=dae.toString,hae=fae.hasOwnProperty,mae=CH.call(Object);function SH(t){if(!ll(t)||Of(t)!=cae)return!1;var e=KI(t);if(e===null)return!0;var n=hae.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&CH.call(n)==mae}function gae(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),n=n>r?r:n,n<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o}function Co(){if(!arguments.length)return[];var t=arguments[0];return ro(t)?t:[t]}function pae(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function GI(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=zp(n),n=n===n?n:0),e!==void 0&&(e=zp(e),e=e===e?e:0),pae(zp(t),e,n)}function vae(){this.__data__=new Tu,this.size=0}function bae(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function yae(t){return this.__data__.get(t)}function wae(t){return this.__data__.has(t)}var _ae=200;function Cae(t,e){var n=this.__data__;if(n instanceof Tu){var i=n.__data__;if(!Mv||i.length<_ae-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Eu(i)}return n.set(t,e),this.size=n.size,this}function ia(t){var e=this.__data__=new Tu(t);this.size=e.size}ia.prototype.clear=vae;ia.prototype.delete=bae;ia.prototype.get=yae;ia.prototype.has=wae;ia.prototype.set=Cae;function Sae(t,e){return t&&sg(e,qb(e),t)}function kae(t,e){return t&&sg(e,jb(e),t)}var kH=typeof exports=="object"&&exports&&!exports.nodeType&&exports,X5=kH&&typeof module=="object"&&module&&!module.nodeType&&module,Tae=X5&&X5.exports===kH,J5=Tae?wa.Buffer:void 0,Z5=J5?J5.allocUnsafe:void 0;function TH(t,e){if(e)return t.slice();var n=t.length,i=Z5?Z5(n):new t.constructor(n);return t.copy(i),i}function Eae(t,e){for(var n=-1,i=t==null?0:t.length,r=0,o=[];++n<i;){var s=t[n];e(s,n,t)&&(o[r++]=s)}return o}function EH(){return[]}var xae=Object.prototype,Aae=xae.propertyIsEnumerable,Q5=Object.getOwnPropertySymbols,YI=Q5?function(t){return t==null?[]:(t=Object(t),Eae(Q5(t),function(e){return Aae.call(t,e)}))}:EH;function Pae(t,e){return sg(t,YI(t),e)}var Iae=Object.getOwnPropertySymbols,xH=Iae?function(t){for(var e=[];t;)jI(e,YI(t)),t=KI(t);return e}:EH;function Rae(t,e){return sg(t,xH(t),e)}function AH(t,e,n){var i=e(t);return ro(t)?i:jI(i,n(t))}function n2(t){return AH(t,qb,YI)}function PH(t){return AH(t,jb,xH)}var i2=Df(wa,"DataView"),r2=Df(wa,"Promise"),sm=Df(wa,"Set"),eD="[object Map]",Mae="[object Object]",tD="[object Promise]",nD="[object Set]",iD="[object WeakMap]",rD="[object DataView]",Oae=Lf(i2),Lae=Lf(Mv),Dae=Lf(r2),Nae=Lf(sm),Bae=Lf(t2),Js=Of;(i2&&Js(new i2(new ArrayBuffer(1)))!=rD||Mv&&Js(new Mv)!=eD||r2&&Js(r2.resolve())!=tD||sm&&Js(new sm)!=nD||t2&&Js(new t2)!=iD)&&(Js=function(t){var e=Of(t),n=e==Mae?t.constructor:void 0,i=n?Lf(n):"";if(i)switch(i){case Oae:return rD;case Lae:return eD;case Dae:return tD;case Nae:return nD;case Bae:return iD}return e});var Vae=Object.prototype,Fae=Vae.hasOwnProperty;function $ae(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Fae.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var B_=wa.Uint8Array;function XI(t){var e=new t.constructor(t.byteLength);return new B_(e).set(new B_(t)),e}function zae(t,e){var n=e?XI(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Hae=/\w*$/;function Uae(t){var e=new t.constructor(t.source,Hae.exec(t));return e.lastIndex=t.lastIndex,e}var oD=Ns?Ns.prototype:void 0,sD=oD?oD.valueOf:void 0;function Wae(t){return sD?Object(sD.call(t)):{}}function IH(t,e){var n=e?XI(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var qae="[object Boolean]",jae="[object Date]",Kae="[object Map]",Gae="[object Number]",Yae="[object RegExp]",Xae="[object Set]",Jae="[object String]",Zae="[object Symbol]",Qae="[object ArrayBuffer]",ele="[object DataView]",tle="[object Float32Array]",nle="[object Float64Array]",ile="[object Int8Array]",rle="[object Int16Array]",ole="[object Int32Array]",sle="[object Uint8Array]",ale="[object Uint8ClampedArray]",lle="[object Uint16Array]",ule="[object Uint32Array]";function cle(t,e,n){var i=t.constructor;switch(e){case Qae:return XI(t);case qae:case jae:return new i(+t);case ele:return zae(t,n);case tle:case nle:case ile:case rle:case ole:case sle:case ale:case lle:case ule:return IH(t,n);case Kae:return new i;case Gae:case Jae:return new i(t);case Yae:return Uae(t);case Xae:return new i;case Zae:return Wae(t)}}function RH(t){return typeof t.constructor=="function"&&!zI(t)?yoe(KI(t)):{}}var dle="[object Map]";function fle(t){return ll(t)&&Js(t)==dle}var aD=Em&&Em.isMap,hle=aD?HI(aD):fle,mle="[object Set]";function gle(t){return ll(t)&&Js(t)==mle}var lD=Em&&Em.isSet,ple=lD?HI(lD):gle,vle=1,ble=2,yle=4,MH="[object Arguments]",wle="[object Array]",_le="[object Boolean]",Cle="[object Date]",Sle="[object Error]",OH="[object Function]",kle="[object GeneratorFunction]",Tle="[object Map]",Ele="[object Number]",LH="[object Object]",xle="[object RegExp]",Ale="[object Set]",Ple="[object String]",Ile="[object Symbol]",Rle="[object WeakMap]",Mle="[object ArrayBuffer]",Ole="[object DataView]",Lle="[object Float32Array]",Dle="[object Float64Array]",Nle="[object Int8Array]",Ble="[object Int16Array]",Vle="[object Int32Array]",Fle="[object Uint8Array]",$le="[object Uint8ClampedArray]",zle="[object Uint16Array]",Hle="[object Uint32Array]",Qn={};Qn[MH]=Qn[wle]=Qn[Mle]=Qn[Ole]=Qn[_le]=Qn[Cle]=Qn[Lle]=Qn[Dle]=Qn[Nle]=Qn[Ble]=Qn[Vle]=Qn[Tle]=Qn[Ele]=Qn[LH]=Qn[xle]=Qn[Ale]=Qn[Ple]=Qn[Ile]=Qn[Fle]=Qn[$le]=Qn[zle]=Qn[Hle]=!0;Qn[Sle]=Qn[OH]=Qn[Rle]=!1;function am(t,e,n,i,r,o){var s,a=e&vle,l=e&ble,u=e&yle;if(n&&(s=r?n(t,i,r,o):n(t)),s!==void 0)return s;if(!oo(t))return t;var c=ro(t);if(c){if(s=$ae(t),!a)return dH(t,s)}else{var d=Js(t),f=d==OH||d==kle;if(Iv(t))return TH(t,a);if(d==LH||d==MH||f&&!r){if(s=l||f?{}:RH(t),!a)return l?Rae(t,kae(s,t)):Pae(t,Sae(s,t))}else{if(!Qn[d])return r?t:{};s=cle(t,d,a)}}o||(o=new ia);var h=o.get(t);if(h)return h;o.set(t,s),ple(t)?t.forEach(function(v){s.add(am(v,e,n,v,t,o))}):hle(t)&&t.forEach(function(v,p){s.set(p,am(v,e,n,p,t,o))});var m=u?l?PH:n2:l?jb:qb,g=c?void 0:m(t);return Aoe(g||t,function(v,p){g&&(p=v,v=t[p]),FI(s,p,am(v,e,n,p,t,o))}),s}var Ule=4;function gk(t){return am(t,Ule)}var Wle=1,qle=4;function V_(t){return am(t,Wle|qle)}var jle="__lodash_hash_undefined__";function Kle(t){return this.__data__.set(t,jle),this}function Gle(t){return this.__data__.has(t)}function Ov(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Eu;++e<n;)this.add(t[e])}Ov.prototype.add=Ov.prototype.push=Kle;Ov.prototype.has=Gle;function Yle(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function DH(t,e){return t.has(e)}var Xle=1,Jle=2;function NH(t,e,n,i,r,o){var s=n&Xle,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var d=-1,f=!0,h=n&Jle?new Ov:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var m=t[d],g=e[d];if(i)var v=s?i(g,m,d,e,t,o):i(m,g,d,t,e,o);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!Yle(e,function(p,b){if(!DH(h,b)&&(m===p||r(m,p,n,i,o)))return h.push(b)})){f=!1;break}}else if(!(m===g||r(m,g,n,i,o))){f=!1;break}}return o.delete(t),o.delete(e),f}function Zle(t){var e=-1,n=Array(t.size);return t.forEach(function(i,r){n[++e]=[r,i]}),n}function JI(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var Qle=1,eue=2,tue="[object Boolean]",nue="[object Date]",iue="[object Error]",rue="[object Map]",oue="[object Number]",sue="[object RegExp]",aue="[object Set]",lue="[object String]",uue="[object Symbol]",cue="[object ArrayBuffer]",due="[object DataView]",uD=Ns?Ns.prototype:void 0,pk=uD?uD.valueOf:void 0;function fue(t,e,n,i,r,o,s){switch(n){case due:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case cue:return!(t.byteLength!=e.byteLength||!o(new B_(t),new B_(e)));case tue:case nue:case oue:return Wb(+t,+e);case iue:return t.name==e.name&&t.message==e.message;case sue:case lue:return t==e+"";case rue:var a=Zle;case aue:var l=i&Qle;if(a||(a=JI),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;i|=eue,s.set(t,e);var c=NH(a(t),a(e),i,r,o,s);return s.delete(t),c;case uue:if(pk)return pk.call(t)==pk.call(e)}return!1}var hue=1,mue=Object.prototype,gue=mue.hasOwnProperty;function pue(t,e,n,i,r,o){var s=n&hue,a=n2(t),l=a.length,u=n2(e),c=u.length;if(l!=c&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in e:gue.call(e,f)))return!1}var h=o.get(t),m=o.get(e);if(h&&m)return h==e&&m==t;var g=!0;o.set(t,e),o.set(e,t);for(var v=s;++d<l;){f=a[d];var p=t[f],b=e[f];if(i)var y=s?i(b,p,f,e,t,o):i(p,b,f,t,e,o);if(!(y===void 0?p===b||r(p,b,n,i,o):y)){g=!1;break}v||(v=f=="constructor")}if(g&&!v){var _=t.constructor,C=e.constructor;_!=C&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof C=="function"&&C instanceof C)&&(g=!1)}return o.delete(t),o.delete(e),g}var vue=1,cD="[object Arguments]",dD="[object Array]",M0="[object Object]",bue=Object.prototype,fD=bue.hasOwnProperty;function yue(t,e,n,i,r,o){var s=ro(t),a=ro(e),l=s?dD:Js(t),u=a?dD:Js(e);l=l==cD?M0:l,u=u==cD?M0:u;var c=l==M0,d=u==M0,f=l==u;if(f&&Iv(t)){if(!Iv(e))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new ia),s||UI(t)?NH(t,e,n,i,r,o):fue(t,e,l,n,i,r,o);if(!(n&vue)){var h=c&&fD.call(t,"__wrapped__"),m=d&&fD.call(e,"__wrapped__");if(h||m){var g=h?t.value():t,v=m?e.value():e;return o||(o=new ia),r(g,v,n,i,o)}}return f?(o||(o=new ia),pue(t,e,n,i,r,o)):!1}function AC(t,e,n,i,r){return t===e?!0:t==null||e==null||!ll(t)&&!ll(e)?t!==t&&e!==e:yue(t,e,n,i,AC,r)}var wue=1,_ue=2;function Cue(t,e,n,i){var r=n.length,o=r;if(t==null)return!o;for(t=Object(t);r--;){var s=n[r];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++r<o;){s=n[r];var a=s[0],l=t[a],u=s[1];if(s[2]){if(l===void 0&&!(a in t))return!1}else{var c=new ia,d;if(!(d===void 0?AC(u,l,wue|_ue,i,c):d))return!1}}return!0}function BH(t){return t===t&&!oo(t)}function Sue(t){for(var e=qb(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,BH(r)]}return e}function VH(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function kue(t){var e=Sue(t);return e.length==1&&e[0][2]?VH(e[0][0],e[0][1]):function(n){return n===t||Cue(n,t,e)}}function Tue(t,e){return t!=null&&e in Object(t)}function FH(t,e,n){e=lg(e,t);for(var i=-1,r=e.length,o=!1;++i<r;){var s=ug(e[i]);if(!(o=t!=null&&n(t,s)))break;t=t[s]}return o||++i!=r?o:(r=t==null?0:t.length,!!r&&$I(r)&&kC(s,r)&&(ro(t)||Pv(t)))}function $H(t,e){return t!=null&&FH(t,e,Tue)}var Eue=1,xue=2;function Aue(t,e){return WI(t)&&BH(e)?VH(ug(t),e):function(n){var i=to(n,t);return i===void 0&&i===e?$H(n,t):AC(e,i,Eue|xue)}}function Pue(t){return function(e){return e?.[t]}}function Iue(t){return function(e){return xC(e,t)}}function Rue(t){return WI(t)?Pue(ug(t)):Iue(t)}function zH(t){return typeof t=="function"?t:t==null?NI:typeof t=="object"?ro(t)?Aue(t[0],t[1]):kue(t):Rue(t)}function Mue(t){return function(e,n,i){for(var r=-1,o=Object(e),s=i(e),a=s.length;a--;){var l=s[++r];if(n(o[l],l,o)===!1)break}return e}}var HH=Mue();function Oue(t,e){return t&&HH(t,e,qb)}function Lue(t,e){return function(n,i){if(n==null)return n;if(!ag(n))return t(n,i);for(var r=n.length,o=-1,s=Object(n);++o<r&&i(s[o],o,s)!==!1;);return n}}var Due=Lue(Oue),vk=function(){return wa.Date.now()},Nue="Expected a function",Bue=Math.max,Vue=Math.min;function ul(t,e,n){var i,r,o,s,a,l,u=0,c=!1,d=!1,f=!0;if(typeof t!="function")throw new TypeError(Nue);e=zp(e)||0,oo(n)&&(c=!!n.leading,d="maxWait"in n,o=d?Bue(zp(n.maxWait)||0,e):o,f="trailing"in n?!!n.trailing:f);function h(S){var k=i,T=r;return i=r=void 0,u=S,s=t.apply(T,k),s}function m(S){return u=S,a=setTimeout(p,e),c?h(S):s}function g(S){var k=S-l,T=S-u,E=e-k;return d?Vue(E,o-T):E}function v(S){var k=S-l,T=S-u;return l===void 0||k>=e||k<0||d&&T>=o}function p(){var S=vk();if(v(S))return b(S);a=setTimeout(p,g(S))}function b(S){return a=void 0,f&&i?h(S):(i=r=void 0,s)}function y(){a!==void 0&&clearTimeout(a),u=0,i=l=r=a=void 0}function _(){return a===void 0?s:b(vk())}function C(){var S=vk(),k=v(S);if(i=arguments,r=this,l=S,k){if(a===void 0)return m(l);if(d)return clearTimeout(a),a=setTimeout(p,e),h(l)}return a===void 0&&(a=setTimeout(p,e)),s}return C.cancel=y,C.flush=_,C}function o2(t,e,n){(n!==void 0&&!Wb(t[e],n)||n===void 0&&!(e in t))&&VI(t,e,n)}function UH(t){return ll(t)&&ag(t)}function s2(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Fue(t){return sg(t,jb(t))}function $ue(t,e,n,i,r,o,s){var a=s2(t,n),l=s2(e,n),u=s.get(l);if(u){o2(t,n,u);return}var c=o?o(a,l,n+"",t,e,s):void 0,d=c===void 0;if(d){var f=ro(l),h=!f&&Iv(l),m=!f&&!h&&UI(l);c=l,f||h||m?ro(a)?c=a:UH(a)?c=dH(a):h?(d=!1,c=TH(l,!0)):m?(d=!1,c=IH(l,!0)):c=[]:SH(l)||Pv(l)?(c=a,Pv(a)?c=Fue(a):(!oo(a)||BI(a))&&(c=RH(l))):d=!1}d&&(s.set(l,c),r(c,l,i,o,s),s.delete(l)),o2(t,n,c)}function WH(t,e,n,i,r){t!==e&&HH(e,function(o,s){if(r||(r=new ia),oo(o))$ue(t,e,s,n,WH,i,r);else{var a=i?i(s2(t,s),o,s+"",t,e,r):void 0;a===void 0&&(a=o),o2(t,s,a)}},jb)}function zue(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Hue(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var r=i-1;return hH(t,zH(e),r,!0)}function Uue(t,e){var n=-1,i=ag(t)?Array(t.length):[];return Due(t,function(r,o,s){i[++n]=e(r,o,s)}),i}function Wue(t,e){var n=ro(t)?DI:Uue;return n(t,zH(e))}function qH(t,e){return Kb(Wue(t,e),1)}var que=1/0;function jue(t){var e=t==null?0:t.length;return e?Kb(t,que):[]}function Lv(t){for(var e=-1,n=t==null?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i}var Kue=Object.prototype,Gue=Kue.hasOwnProperty;function Yue(t,e){return t!=null&&Gue.call(t,e)}function Xue(t,e){return t!=null&&FH(t,e,Yue)}function Jue(t,e){return e.length<2?t:xC(t,gae(e,0,-1))}function $i(t,e){return AC(t,e)}function ir(t){return t==null}function PC(t){return t===null}function Zue(t){return t===void 0}var jH=Foe(function(t,e,n){WH(t,e,n)}),Que=Object.prototype,ece=Que.hasOwnProperty;function tce(t,e){e=lg(e,t);var n=-1,i=e.length;if(!i)return!0;for(var r=t==null||typeof t!="object"&&typeof t!="function";++n<i;){var o=e[n];if(typeof o=="string"){if(o==="__proto__"&&!ece.call(t,"__proto__"))return!1;if(o==="constructor"&&n+1<i&&typeof e[n+1]=="string"&&e[n+1]==="prototype"){if(r&&n===0)continue;return!1}}}var s=Jue(t,e);return s==null||delete s[ug(zue(e))]}function nce(t){return SH(t)?void 0:t}var ice=1,rce=2,oce=4,IC=_H(function(t,e){var n={};if(t==null)return n;var i=!1;e=DI(e,function(o){return o=lg(o,t),i||(i=o.length>1),o}),sg(t,PH(t),n),i&&(n=am(n,ice|rce|oce,nce));for(var r=e.length;r--;)tce(n,e[r]);return n});function KH(t,e,n,i){if(!oo(t))return t;e=lg(e,t);for(var r=-1,o=e.length,s=o-1,a=t;a!=null&&++r<o;){var l=ug(e[r]),u=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(r!=s){var c=a[l];u=void 0,u===void 0&&(u=oo(c)?c:kC(e[r+1])?[]:{})}FI(a,l,u),a=a[l]}return t}function sce(t,e,n){for(var i=-1,r=e.length,o={};++i<r;){var s=e[i],a=xC(t,s);n(a,s)&&KH(o,lg(s,t),a)}return o}function ace(t,e){return sce(t,e,function(n,i){return $H(t,i)})}var ZI=_H(function(t,e){return t==null?{}:ace(t,e)});function lce(t,e,n){return t==null?t:KH(t,e,n)}var uce="Expected a function";function O0(t,e,n){var i=!0,r=!0;if(typeof t!="function")throw new TypeError(uce);return oo(n)&&(i="leading"in n?!!n.leading:i,r="trailing"in n?!!n.trailing:r),ul(t,e,{leading:i,maxWait:e,trailing:r})}var cce=1/0,dce=sm&&1/JI(new sm([,-0]))[1]==cce?function(t){return new sm(t)}:_oe,fce=200;function hce(t,e,n){var i=-1,r=Moe,o=t.length,s=!0,a=[],l=a;if(o>=fce){var u=dce(t);if(u)return JI(u);s=!1,r=DH,l=new Ov}else l=a;e:for(;++i<o;){var c=t[i],d=c;if(c=c!==0?c:0,s&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;a.push(c)}else r(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}var bk=gH(function(t){return hce(Kb(t,1,UH,!0))}),mce={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const gce=t=>(e,n)=>pce(e,n,w(t)),pce=(t,e,n)=>to(n,t,t).replace(/\{(\w+)\}/g,(i,r)=>{var o;return`${(o=e?.[r])!=null?o:`{${r}}`}`}),vce=t=>({lang:M(()=>w(t).name),locale:rn(t)?t:H(t),t:gce(t)}),GH=Symbol("localeContextKey"),Qt=t=>{const e=t||Ne(GH,H());return vce(M(()=>e.value||mce))},Up="el",bce="is-",id=(t,e,n,i,r)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),r&&(o+=`--${r}`),o},YH=Symbol("namespaceContextKey"),QI=t=>{const e=t||(Ct()?Ne(YH,H(Up)):H(Up));return M(()=>w(e)||Up)},De=(t,e)=>{const n=QI(e);return{namespace:n,b:(g="")=>id(n.value,t,g,"",""),e:g=>g?id(n.value,t,"",g,""):"",m:g=>g?id(n.value,t,"","",g):"",be:(g,v)=>g&&v?id(n.value,t,g,v,""):"",em:(g,v)=>g&&v?id(n.value,t,"",g,v):"",bm:(g,v)=>g&&v?id(n.value,t,g,"",v):"",bem:(g,v,p)=>g&&v&&p?id(n.value,t,g,v,p):"",is:(g,...v)=>{const p=v.length>=1?v[0]:!0;return g&&p?`${bce}${g}`:""},cssVar:g=>{const v={};for(const p in g)g[p]&&(v[`--${n.value}-${p}`]=g[p]);return v},cssVarName:g=>`--${n.value}-${g}`,cssVarBlock:g=>{const v={};for(const p in g)g[p]&&(v[`--${n.value}-${t}-${p}`]=g[p]);return v},cssVarBlockName:g=>`--${n.value}-${t}-${g}`}},pn=t=>t===void 0,vi=t=>typeof t=="boolean",St=t=>typeof t=="number",xm=t=>!t&&t!==0||Pe(t)&&t.length===0||_t(t)&&!Object.keys(t).length,Qo=t=>typeof Element>"u"?!1:t instanceof Element,Is=t=>ir(t),yce=t=>ot(t)?!Number.isNaN(Number(t)):!1,wce=t=>t===window;function XH(t,e){var n;const i=bi();return sl(()=>{i.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),gf(i)}function cg(t){return cC()?(dC(t),!0):!1}function Rs(t){return typeof t=="function"?t():w(t)}function _ce(t){if(!rn(t))return on(t);const e=new Proxy({},{get(n,i,r){return w(Reflect.get(t.value,i,r))},set(n,i,r){return rn(t.value[i])&&!rn(r)?t.value[i].value=r:t.value[i]=r,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return on(e)}function Cce(t){return _ce(M(t))}const Zt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Sce=t=>typeof t<"u",JH=t=>t!=null,kce=Object.prototype.toString,Tce=t=>kce.call(t)==="[object Object]",Ece=(t,e,n)=>Math.min(n,Math.max(e,t)),ra=()=>{},a2=xce();function xce(){var t,e;return Zt&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ZH(t,e){function n(...i){return new Promise((r,o)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(r).catch(o)})}return n}function Ace(t,e={}){let n,i,r=ra;const o=a=>{clearTimeout(a),r(),r=ra};return a=>{const l=Rs(t),u=Rs(e.maxWait);return n&&o(n),l<=0||u!==void 0&&u<=0?(i&&(o(i),i=null),Promise.resolve(a())):new Promise((c,d)=>{r=e.rejectOnCancel?d:c,u&&!i&&(i=setTimeout(()=>{n&&o(n),i=null,c(a())},u)),n=setTimeout(()=>{i&&o(i),i=null,c(a())},l)})}}function Pce(...t){let e=0,n,i=!0,r=ra,o,s,a,l,u;!rn(t[0])&&typeof t[0]=="object"?{delay:s,trailing:a=!0,leading:l=!0,rejectOnCancel:u=!1}=t[0]:[s,a=!0,l=!0,u=!1]=t;const c=()=>{n&&(clearTimeout(n),n=void 0,r(),r=ra)};return f=>{const h=Rs(s),m=Date.now()-e,g=()=>o=f();return c(),h<=0?(e=Date.now(),g()):(m>h&&(l||!i)?(e=Date.now(),g()):a&&(o=new Promise((v,p)=>{r=u?p:v,n=setTimeout(()=>{e=Date.now(),i=!0,v(g()),c()},Math.max(0,h-m))})),!l&&!n&&(n=setTimeout(()=>i=!0,h)),i=!1,o)}}function Ice(t){return Ct()}function eR(t,e=200,n={}){return ZH(Ace(e,n),t)}function Rce(t,e=200,n={}){const i=H(t.value),r=eR(()=>{i.value=t.value},e,n);return Se(t,()=>r()),i}function Mce(t,e=200,n=!1,i=!0,r=!1){return ZH(Pce(e,n,i,r),t)}function Oce(t,e=!0,n){Ice()?Pt(t,n):e?t():Ye(t)}function Dv(t,e,n={}){const{immediate:i=!0}=n,r=H(!1);let o=null;function s(){o&&(clearTimeout(o),o=null)}function a(){r.value=!1,s()}function l(...u){s(),r.value=!0,o=setTimeout(()=>{r.value=!1,o=null,t(...u)},Rs(e))}return i&&(r.value=!0,Zt&&l()),cg(a),{isPending:gf(r),start:l,stop:a}}function Yi(t){var e;const n=Rs(t);return(e=n?.$el)!=null?e:n}const $c=Zt?window:void 0,Lce=Zt?window.document:void 0;function Kn(...t){let e,n,i,r;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,r]=t,e=$c):[e,n,i,r]=t,!e)return ra;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],s=()=>{o.forEach(c=>c()),o.length=0},a=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=Se(()=>[Yi(e),Rs(r)],([c,d])=>{if(s(),!c)return;const f=Tce(d)?{...d}:d;o.push(...n.flatMap(h=>i.map(m=>a(c,h,m,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),s()};return cg(u),u}let hD=!1;function QH(t,e,n={}){const{window:i=$c,ignore:r=[],capture:o=!0,detectIframe:s=!1}=n;if(!i)return ra;a2&&!hD&&(hD=!0,Array.from(i.document.body.children).forEach(f=>f.addEventListener("click",ra)),i.document.documentElement.addEventListener("click",ra));let a=!0;const l=f=>r.some(h=>{if(typeof h=="string")return Array.from(i.document.querySelectorAll(h)).some(m=>m===f.target||f.composedPath().includes(m));{const m=Yi(h);return m&&(f.target===m||f.composedPath().includes(m))}}),c=[Kn(i,"click",f=>{const h=Yi(t);if(!(!h||h===f.target||f.composedPath().includes(h))){if(f.detail===0&&(a=!l(f)),!a){a=!0;return}e(f)}},{passive:!0,capture:o}),Kn(i,"pointerdown",f=>{const h=Yi(t);a=!l(f)&&!!(h&&!f.composedPath().includes(h))},{passive:!0}),s&&Kn(i,"blur",f=>{setTimeout(()=>{var h;const m=Yi(t);((h=i.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!m?.contains(i.document.activeElement)&&e(f)},0)})].filter(Boolean);return()=>c.forEach(f=>f())}function Dce(){const t=H(!1),e=Ct();return e&&Pt(()=>{t.value=!0},e),t}function tR(t){const e=Dce();return M(()=>(e.value,!!t()))}function eU(t,e,n={}){const{window:i=$c,...r}=n;let o;const s=tR(()=>i&&"MutationObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=M(()=>{const f=Rs(t),h=(Array.isArray(f)?f:[f]).map(Yi).filter(JH);return new Set(h)}),u=Se(()=>l.value,f=>{a(),s.value&&f.size&&(o=new MutationObserver(e),f.forEach(h=>o.observe(h,r)))},{immediate:!0,flush:"post"}),c=()=>o?.takeRecords(),d=()=>{a(),u()};return cg(d),{isSupported:s,stop:d,takeRecords:c}}function Nce(t){return JSON.parse(JSON.stringify(t))}function Bce(t,e,n={}){const{window:i=$c,initialValue:r="",observe:o=!1}=n,s=H(r),a=M(()=>{var u;return Yi(e)||((u=i?.document)==null?void 0:u.documentElement)});function l(){var u;const c=Rs(t),d=Rs(a);if(d&&i){const f=(u=i.getComputedStyle(d).getPropertyValue(c))==null?void 0:u.trim();s.value=f||r}}return o&&eU(a,l,{attributeFilter:["style","class"],window:i}),Se([a,()=>Rs(t)],l,{immediate:!0}),Se(s,u=>{var c;(c=a.value)!=null&&c.style&&a.value.style.setProperty(Rs(t),u)}),s}function Vce(t={}){const{document:e=Lce}=t;if(!e)return H("visible");const n=H(e.visibilityState);return Kn(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function nr(t,e,n={}){const{window:i=$c,...r}=n;let o;const s=tR(()=>i&&"ResizeObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=M(()=>Array.isArray(t)?t.map(d=>Yi(d)):[Yi(t)]),u=Se(l,d=>{if(a(),s.value&&i){o=new ResizeObserver(e);for(const f of d)f&&o.observe(f,r)}},{immediate:!0,flush:"post"}),c=()=>{a(),u()};return cg(c),{isSupported:s,stop:c}}function mD(t,e={width:0,height:0},n={}){const{window:i=$c,box:r="content-box"}=n,o=M(()=>{var d,f;return(f=(d=Yi(t))==null?void 0:d.namespaceURI)==null?void 0:f.includes("svg")}),s=H(e.width),a=H(e.height),{stop:l}=nr(t,([d])=>{const f=r==="border-box"?d.borderBoxSize:r==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(i&&o.value){const h=Yi(t);if(h){const m=h.getBoundingClientRect();s.value=m.width,a.value=m.height}}else if(f){const h=Array.isArray(f)?f:[f];s.value=h.reduce((m,{inlineSize:g})=>m+g,0),a.value=h.reduce((m,{blockSize:g})=>m+g,0)}else s.value=d.contentRect.width,a.value=d.contentRect.height},n);Oce(()=>{const d=Yi(t);d&&(s.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const u=Se(()=>Yi(t),d=>{s.value=d?e.width:0,a.value=d?e.height:0});function c(){l(),u()}return{width:s,height:a,stop:c}}function Fce(t,e,n={}){const{root:i,rootMargin:r="0px",threshold:o=.1,window:s=$c,immediate:a=!0}=n,l=tR(()=>s&&"IntersectionObserver"in s),u=M(()=>{const m=Rs(t);return(Array.isArray(m)?m:[m]).map(Yi).filter(JH)});let c=ra;const d=H(a),f=l.value?Se(()=>[u.value,Yi(i),d.value],([m,g])=>{if(c(),!d.value||!m.length)return;const v=new IntersectionObserver(e,{root:Yi(g),rootMargin:r,threshold:o});m.forEach(p=>p&&v.observe(p)),c=()=>{v.disconnect(),c=ra}},{immediate:a,flush:"post"}):ra,h=()=>{c(),f(),d.value=!1};return cg(h),{isSupported:l,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:h}}function $ce(t,e,n,i={}){var r,o,s;const{clone:a=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:f}=i,h=Ct(),m=h?.emit||((r=h?.$emit)==null?void 0:r.bind(h))||((s=(o=h?.proxy)==null?void 0:o.$emit)==null?void 0:s.bind(h?.proxy));let g=u;g=g||`update:${e.toString()}`;const v=y=>a?typeof a=="function"?a(y):Nce(y):y,p=()=>Sce(t[e])?v(t[e]):d,b=y=>{f?f(y)&&m(g,y):m(g,y)};if(l){const y=p(),_=H(y);let C=!1;return Se(()=>t[e],S=>{C||(C=!0,_.value=v(S),Ye(()=>C=!1))}),Se(_,S=>{!C&&(S!==t[e]||c)&&b(S)},{deep:c}),_}else return M({get(){return p()},set(y){b(y)}})}function zce(t={}){const{window:e=$c}=t;if(!e)return H(!1);const n=H(e.document.hasFocus());return Kn(e,"blur",()=>{n.value=!1}),Kn(e,"focus",()=>{n.value=!0}),n}class Hce extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function dr(t,e){throw new Hce(`[${t}] ${e}`)}const gD={current:0},pD=H(0),tU=2e3,vD=Symbol("elZIndexContextKey"),nU=Symbol("zIndexContextKey"),RC=t=>{const e=Ct()?Ne(vD,gD):gD,n=t||(Ct()?Ne(nU,void 0):void 0),i=M(()=>{const s=w(n);return St(s)?s:tU}),r=M(()=>i.value+pD.value),o=()=>(e.current++,pD.value=e.current,r.value);return!Zt&&Ne(vD),{initialZIndex:i,currentZIndex:r,nextZIndex:o}},iU="__epPropKey",me=t=>t,Uce=t=>_t(t)&&!!t[iU],MC=(t,e)=>{if(!_t(t)||Uce(t))return t;const{values:n,required:i,default:r,type:o,validator:s}=t,l={type:o,required:!!i,validator:n||s?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Jt(t,"default")&&d.push(r),c||(c=d.includes(u))),s&&(c||(c=s(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");Yie(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[iU]:!0};return Jt(t,"default")&&(l.default=r),l},qe=t=>Lv(Object.entries(t).map(([e,n])=>[e,MC(n,e)])),yl=["","default","small","large"],$r=MC({type:String,values:yl,required:!1}),rU=Symbol("size"),oU=()=>{const t=Ne(rU,{});return M(()=>w(t.size)||"")},sU=Symbol("emptyValuesContextKey"),Wce=["",void 0,null],qce=void 0,Gb=qe({emptyValues:Array,valueOnClear:{type:me([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=Xe(t)?t():t,Pe(t)?t.every(e=>!e):!t)}}),OC=(t,e)=>{const n=Ct()?Ne(sU,H({})):H({}),i=M(()=>t.emptyValues||n.value.emptyValues||Wce),r=M(()=>Xe(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:Xe(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:qce),o=s=>{let a=!0;return Pe(s)?a=i.value.some(l=>$i(s,l)):a=i.value.includes(s),a};return o(r.value),{emptyValues:i,valueOnClear:r,isEmptyValue:o}},l2=t=>Object.keys(t),jce=t=>Object.entries(t),lm=(t,e,n)=>({get value(){return to(t,e,n)},set value(i){lce(t,e,i)}}),F_=H();function Yb(t,e=void 0){const n=Ct()?Ne(aH,F_):F_;return t?M(()=>{var i,r;return(r=(i=n.value)==null?void 0:i[t])!=null?r:e}):n}function nR(t,e){const n=Yb(),i=De(t,M(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||Up})),r=Qt(M(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=RC(M(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||tU})),s=M(()=>{var a;return w(e)||((a=n.value)==null?void 0:a.size)||""});return aU(M(()=>w(n)||{})),{ns:i,locale:r,zIndex:o,size:s}}const aU=(t,e,n=!1)=>{var i;const r=!!Ct(),o=r?Yb():void 0,s=(i=void 0)!=null?i:r?qt:void 0;if(!s)return;const a=M(()=>{const l=w(t);return o?.value?Kce(o.value,l):l});return s(aH,a),s(GH,M(()=>a.value.locale)),s(YH,M(()=>a.value.namespace)),s(nU,M(()=>a.value.zIndex)),s(rU,{size:M(()=>a.value.size||"")}),s(sU,M(()=>({emptyValues:a.value.emptyValues,valueOnClear:a.value.valueOnClear}))),(n||!F_.value)&&(F_.value=a.value),a},Kce=(t,e)=>{const n=[...new Set([...l2(t),...l2(e)])],i={};for(const r of n)i[r]=e[r]!==void 0?e[r]:t[r];return i},iR=qe({to:{type:me([String,Object]),required:!0},disabled:Boolean}),It="update:modelValue",En="change",rs="input";var Gce=le({__name:"teleport",props:iR,setup(t){return(e,n)=>e.disabled?we(e.$slots,"default",{key:0}):(B(),_e(sz,{key:1,to:e.to},[we(e.$slots,"default")],8,["to"]))}});const sn=(t,e)=>{if(t.install=n=>{for(const i of[t,...Object.values(e??{})])n.component(i.name,i)},e)for(const[n,i]of Object.entries(e))t[n]=i;return t},Yce=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Xce=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Zi=t=>(t.install=tn,t),rR=sn(Gce),oR=t=>Zt?window.requestAnimationFrame(t):setTimeout(t,16),Jce=t=>Zt?window.cancelAnimationFrame(t):clearTimeout(t),lU=(t="")=>t.split(" ").filter(e=>!!e.trim()),Xa=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},Qs=(t,e)=>{!t||!e.trim()||t.classList.add(...lU(e))},os=(t,e)=>{!t||!e.trim()||t.classList.remove(...lU(e))},sc=(t,e)=>{var n;if(!Zt||!t||!e)return"";let i=Oo(e);i==="float"&&(i="cssFloat");try{const r=t.style[i];if(r)return r;const o=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return o?o[i]:""}catch{return t.style[i]}};function zr(t,e="px"){if(!t&&t!==0)return"";if(St(t)||yce(t))return`${t}${e}`;if(ot(t))return t}const Zce=(t,e)=>{if(!Zt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],i=sc(t,n);return["scroll","auto","overlay"].some(r=>i.includes(r))},Qce=(t,e)=>{if(!Zt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Zce(n,e))return n;n=n.parentNode}return n};let L0;const ede=t=>{var e;if(!Zt)return 0;if(L0!==void 0)return L0;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const i=n.offsetWidth;n.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",n.appendChild(r);const o=r.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),L0=i-o,L0};function uU(t,e){if(!Zt)return;if(!e){t.scrollTop=0;return}const n=[];let i=e.offsetParent;for(;i!==null&&t!==i&&t.contains(i);)n.push(i),i=i.offsetParent;const r=e.offsetTop+n.reduce((l,u)=>l+u.offsetTop,0),o=r+e.offsetHeight,s=t.scrollTop,a=s+t.clientHeight;r<s?t.scrollTop=r:o>a&&(t.scrollTop=o-t.clientHeight)}var tde=le({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),zc=tde,nde=le({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),Am=nde,ide=le({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),oa=ide,rde=le({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),sR=rde,ode=le({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),cU=ode,sde=le({name:"Cellphone",__name:"cellphone",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M256 128a64 64 0 0 0-64 64v640a64 64 0 0 0 64 64h512a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h512a128 128 0 0 1 128 128v640a128 128 0 0 1-128 128H256a128 128 0 0 1-128-128V192A128 128 0 0 1 256 64m128 128h256a32 32 0 1 1 0 64H384a32 32 0 0 1 0-64m128 640a64 64 0 1 1 0-128 64 64 0 0 1 0 128"})]))}}),ade=sde,lde=le({name:"Check",__name:"check",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),LC=lde,ude=le({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ie("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),DC=ude,cde=le({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),dU=cde,dde=le({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),ie("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Nf=dde,fde=le({name:"Clock",__name:"clock",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),ie("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),ie("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),hde=fde,mde=le({name:"Close",__name:"close",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),cl=mde,gde=le({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),Tc=gde,pde=le({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),Ec=pde,vde=le({name:"Delete",__name:"delete",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),bde=vde,yde=le({name:"Document",__name:"document",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),wde=yde,_de=le({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Cde=_de,Sde=le({name:"Hide",__name:"hide",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),ie("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),kde=Sde,Tde=le({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),u2=Tde,Ede=le({name:"Loading",__name:"loading",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),xc=Ede,xde=le({name:"Lock",__name:"lock",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),ie("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),Ade=xde,Pde=le({name:"Minus",__name:"minus",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),Ide=Pde,Rde=le({name:"Monitor",__name:"monitor",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M544 768v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768H192A128 128 0 0 1 64 640V256a128 128 0 0 1 128-128h640a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128zM192 192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64z"})]))}}),Mde=Rde,Ode=le({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),bD=Ode,Lde=le({name:"More",__name:"more",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),Dde=Lde,Nde=le({name:"Plus",__name:"plus",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),fU=Nde,Bde=le({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),Vde=Bde,Fde=le({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),$de=Fde,zde=le({name:"Refresh",__name:"refresh",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"})]))}}),Hde=zde,Ude=le({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),Wde=Ude,qde=le({name:"Setting",__name:"setting",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),jde=qde,Kde=le({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),aR=Kde,Gde=le({name:"Switch",__name:"switch",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344M64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32"})]))}}),Yde=Gde,Xde=le({name:"UserFilled",__name:"user-filled",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M288 320a224 224 0 1 0 448 0 224 224 0 1 0-448 0m544 608H160a32 32 0 0 1-32-32v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 0 1-32 32z"})]))}}),Jde=Xde,Zde=le({name:"User",__name:"user",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 512a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m320 320v-96a96 96 0 0 0-96-96H288a96 96 0 0 0-96 96v96a32 32 0 1 1-64 0v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 1 1-64 0"})]))}}),hU=Zde,Qde=le({name:"VideoCamera",__name:"video-camera",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M704 768V256H128v512zm64-416 192-96v512l-192-96v128a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V224a32 32 0 0 1 32-32h640a32 32 0 0 1 32 32zm0 71.552v176.896l128 64V359.552zM192 320h192v64H192z"})]))}}),efe=Qde,tfe=le({name:"View",__name:"view",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),nfe=tfe,ife=le({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),lR=ife,rfe=le({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),mU=rfe,ofe=le({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(B(),Q("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[ie("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),sfe=ofe;const ri=me([String,Object,Function]),afe={Close:cl},lfe={Close:cl,SuccessFilled:aR,InfoFilled:u2,WarningFilled:lR,CircleCloseFilled:dU},$_={primary:u2,success:aR,warning:lR,error:dU,info:u2},gU={validating:xc,success:DC,error:Nf},ufe=qe({size:{type:me([Number,String])},color:{type:String}});var cfe=le({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:ufe,setup(t){const e=t,n=De("icon"),i=M(()=>{const{size:r,color:o}=e,s=zr(r);return!s&&!o?{}:{fontSize:s,"--color":o}});return(r,o)=>(B(),Q("i",Lt({class:w(n).b(),style:i.value},r.$attrs),[we(r.$slots,"default")],16))}});const He=sn(cfe);var Cw=(t=>(t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t))(Cw||{});const cc=t=>{const e=Pe(t)?t:[t],n=[];return e.forEach(i=>{var r;Pe(i)?n.push(...cc(i)):yi(i)&&((r=i.component)!=null&&r.subTree)?n.push(i,...cc(i.component.subTree)):yi(i)&&Pe(i.children)?n.push(...cc(i.children)):yi(i)&&i.shapeFlag===2?n.push(...cc(i.type())):n.push(i)}),n};var To="top",Bs="bottom",Vs="right",Eo="left",uR="auto",Xb=[To,Bs,Vs,Eo],Pm="start",Nv="end",dfe="clippingParents",pU="viewport",Rg="popper",ffe="reference",yD=Xb.reduce(function(t,e){return t.concat([e+"-"+Pm,e+"-"+Nv])},[]),xu=[].concat(Xb,[uR]).reduce(function(t,e){return t.concat([e,e+"-"+Pm,e+"-"+Nv])},[]),hfe="beforeRead",mfe="read",gfe="afterRead",pfe="beforeMain",vfe="main",bfe="afterMain",yfe="beforeWrite",wfe="write",_fe="afterWrite",Cfe=[hfe,mfe,gfe,pfe,vfe,bfe,yfe,wfe,_fe];function dl(t){return t?(t.nodeName||"").toLowerCase():null}function ss(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function bf(t){var e=ss(t).Element;return t instanceof e||t instanceof Element}function Os(t){var e=ss(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function cR(t){if(typeof ShadowRoot>"u")return!1;var e=ss(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function Sfe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},r=e.attributes[n]||{},o=e.elements[n];!Os(o)||!dl(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];a===!1?o.removeAttribute(s):o.setAttribute(s,a===!0?"":a)}))})}function kfe(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],o=e.attributes[i]||{},s=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=s.reduce(function(l,u){return l[u]="",l},{});!Os(r)||!dl(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}}var vU={name:"applyStyles",enabled:!0,phase:"write",fn:Sfe,effect:kfe,requires:["computeStyles"]};function Ja(t){return t.split("-")[0]}var rf=Math.max,z_=Math.min,Im=Math.round;function c2(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function bU(){return!/^((?!chrome|android).)*safari/i.test(c2())}function Rm(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&Os(t)&&(r=t.offsetWidth>0&&Im(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Im(i.height)/t.offsetHeight||1);var s=bf(t)?ss(t):window,a=s.visualViewport,l=!bU()&&n,u=(i.left+(l&&a?a.offsetLeft:0))/r,c=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,f=i.height/o;return{width:d,height:f,top:c,right:u+d,bottom:c+f,left:u,x:u,y:c}}function dR(t){var e=Rm(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function yU(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&cR(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function mu(t){return ss(t).getComputedStyle(t)}function Tfe(t){return["table","td","th"].indexOf(dl(t))>=0}function Hc(t){return((bf(t)?t.ownerDocument:t.document)||window.document).documentElement}function NC(t){return dl(t)==="html"?t:t.assignedSlot||t.parentNode||(cR(t)?t.host:null)||Hc(t)}function wD(t){return!Os(t)||mu(t).position==="fixed"?null:t.offsetParent}function Efe(t){var e=/firefox/i.test(c2()),n=/Trident/i.test(c2());if(n&&Os(t)){var i=mu(t);if(i.position==="fixed")return null}var r=NC(t);for(cR(r)&&(r=r.host);Os(r)&&["html","body"].indexOf(dl(r))<0;){var o=mu(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function Jb(t){for(var e=ss(t),n=wD(t);n&&Tfe(n)&&mu(n).position==="static";)n=wD(n);return n&&(dl(n)==="html"||dl(n)==="body"&&mu(n).position==="static")?e:n||Efe(t)||e}function fR(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Wp(t,e,n){return rf(t,z_(e,n))}function xfe(t,e,n){var i=Wp(t,e,n);return i>n?n:i}function wU(){return{top:0,right:0,bottom:0,left:0}}function _U(t){return Object.assign({},wU(),t)}function CU(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var Afe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,_U(typeof t!="number"?t:CU(t,Xb))};function Pfe(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Ja(n.placement),l=fR(a),u=[Eo,Vs].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!s)){var d=Afe(r.padding,n),f=dR(o),h=l==="y"?To:Eo,m=l==="y"?Bs:Vs,g=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],v=s[l]-n.rects.reference[l],p=Jb(o),b=p?l==="y"?p.clientHeight||0:p.clientWidth||0:0,y=g/2-v/2,_=d[h],C=b-f[c]-d[m],S=b/2-f[c]/2+y,k=Wp(_,S,C),T=l;n.modifiersData[i]=(e={},e[T]=k,e.centerOffset=k-S,e)}}function Ife(t){var e=t.state,n=t.options,i=n.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||yU(e.elements.popper,r)&&(e.elements.arrow=r))}var Rfe={name:"arrow",enabled:!0,phase:"main",fn:Pfe,effect:Ife,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mm(t){return t.split("-")[1]}var Mfe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ofe(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:Im(n*r)/r||0,y:Im(i*r)/r||0}}function _D(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,f=s.x,h=f===void 0?0:f,m=s.y,g=m===void 0?0:m,v=typeof c=="function"?c({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var p=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),y=Eo,_=To,C=window;if(u){var S=Jb(n),k="clientHeight",T="clientWidth";if(S===ss(n)&&(S=Hc(n),mu(S).position!=="static"&&a==="absolute"&&(k="scrollHeight",T="scrollWidth")),S=S,r===To||(r===Eo||r===Vs)&&o===Nv){_=Bs;var E=d&&S===C&&C.visualViewport?C.visualViewport.height:S[k];g-=E-i.height,g*=l?1:-1}if(r===Eo||(r===To||r===Bs)&&o===Nv){y=Vs;var x=d&&S===C&&C.visualViewport?C.visualViewport.width:S[T];h-=x-i.width,h*=l?1:-1}}var P=Object.assign({position:a},u&&Mfe),A=c===!0?Ofe({x:h,y:g},ss(n)):{x:h,y:g};if(h=A.x,g=A.y,l){var I;return Object.assign({},P,(I={},I[_]=b?"0":"",I[y]=p?"0":"",I.transform=(C.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",I))}return Object.assign({},P,(e={},e[_]=b?g+"px":"",e[y]=p?h+"px":"",e.transform="",e))}function Lfe(t){var e=t.state,n=t.options,i=n.gpuAcceleration,r=i===void 0?!0:i,o=n.adaptive,s=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,u={placement:Ja(e.placement),variation:Mm(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,_D(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,_D(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var SU={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Lfe,data:{}},D0={passive:!0};function Dfe(t){var e=t.state,n=t.instance,i=t.options,r=i.scroll,o=r===void 0?!0:r,s=i.resize,a=s===void 0?!0:s,l=ss(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,D0)}),a&&l.addEventListener("resize",n.update,D0),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,D0)}),a&&l.removeEventListener("resize",n.update,D0)}}var kU={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Dfe,data:{}},Nfe={left:"right",right:"left",bottom:"top",top:"bottom"};function Sw(t){return t.replace(/left|right|bottom|top/g,function(e){return Nfe[e]})}var Bfe={start:"end",end:"start"};function CD(t){return t.replace(/start|end/g,function(e){return Bfe[e]})}function hR(t){var e=ss(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function mR(t){return Rm(Hc(t)).left+hR(t).scrollLeft}function Vfe(t,e){var n=ss(t),i=Hc(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var u=bU();(u||!u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+mR(t),y:l}}function Ffe(t){var e,n=Hc(t),i=hR(t),r=(e=t.ownerDocument)==null?void 0:e.body,o=rf(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=rf(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+mR(t),l=-i.scrollTop;return mu(r||n).direction==="rtl"&&(a+=rf(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}function gR(t){var e=mu(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function TU(t){return["html","body","#document"].indexOf(dl(t))>=0?t.ownerDocument.body:Os(t)&&gR(t)?t:TU(NC(t))}function qp(t,e){var n;e===void 0&&(e=[]);var i=TU(t),r=i===((n=t.ownerDocument)==null?void 0:n.body),o=ss(i),s=r?[o].concat(o.visualViewport||[],gR(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(qp(NC(s)))}function d2(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function $fe(t,e){var n=Rm(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function SD(t,e,n){return e===pU?d2(Vfe(t,n)):bf(e)?$fe(e,n):d2(Ffe(Hc(t)))}function zfe(t){var e=qp(NC(t)),n=["absolute","fixed"].indexOf(mu(t).position)>=0,i=n&&Os(t)?Jb(t):t;return bf(i)?e.filter(function(r){return bf(r)&&yU(r,i)&&dl(r)!=="body"}):[]}function Hfe(t,e,n,i){var r=e==="clippingParents"?zfe(t):[].concat(e),o=[].concat(r,[n]),s=o[0],a=o.reduce(function(l,u){var c=SD(t,u,i);return l.top=rf(c.top,l.top),l.right=z_(c.right,l.right),l.bottom=z_(c.bottom,l.bottom),l.left=rf(c.left,l.left),l},SD(t,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function EU(t){var e=t.reference,n=t.element,i=t.placement,r=i?Ja(i):null,o=i?Mm(i):null,s=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(r){case To:l={x:s,y:e.y-n.height};break;case Bs:l={x:s,y:e.y+e.height};break;case Vs:l={x:e.x+e.width,y:a};break;case Eo:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var u=r?fR(r):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Pm:l[u]=l[u]-(e[c]/2-n[c]/2);break;case Nv:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function Bv(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=i===void 0?t.placement:i,o=n.strategy,s=o===void 0?t.strategy:o,a=n.boundary,l=a===void 0?dfe:a,u=n.rootBoundary,c=u===void 0?pU:u,d=n.elementContext,f=d===void 0?Rg:d,h=n.altBoundary,m=h===void 0?!1:h,g=n.padding,v=g===void 0?0:g,p=_U(typeof v!="number"?v:CU(v,Xb)),b=f===Rg?ffe:Rg,y=t.rects.popper,_=t.elements[m?b:f],C=Hfe(bf(_)?_:_.contextElement||Hc(t.elements.popper),l,c,s),S=Rm(t.elements.reference),k=EU({reference:S,element:y,placement:r}),T=d2(Object.assign({},y,k)),E=f===Rg?T:S,x={top:C.top-E.top+p.top,bottom:E.bottom-C.bottom+p.bottom,left:C.left-E.left+p.left,right:E.right-C.right+p.right},P=t.modifiersData.offset;if(f===Rg&&P){var A=P[r];Object.keys(x).forEach(function(I){var D=[Vs,Bs].indexOf(I)>=0?1:-1,q=[To,Bs].indexOf(I)>=0?"y":"x";x[I]+=A[q]*D})}return x}function Ufe(t,e){e===void 0&&(e={});var n=e,i=n.placement,r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?xu:l,c=Mm(i),d=c?a?yD:yD.filter(function(m){return Mm(m)===c}):Xb,f=d.filter(function(m){return u.indexOf(m)>=0});f.length===0&&(f=d);var h=f.reduce(function(m,g){return m[g]=Bv(t,{placement:g,boundary:r,rootBoundary:o,padding:s})[Ja(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function Wfe(t){if(Ja(t)===uR)return[];var e=Sw(t);return[CD(t),e,CD(e)]}function qfe(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,a=s===void 0?!0:s,l=n.fallbackPlacements,u=n.padding,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,m=h===void 0?!0:h,g=n.allowedAutoPlacements,v=e.options.placement,p=Ja(v),b=p===v,y=l||(b||!m?[Sw(v)]:Wfe(v)),_=[v].concat(y).reduce(function(J,ne){return J.concat(Ja(ne)===uR?Ufe(e,{placement:ne,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:g}):ne)},[]),C=e.rects.reference,S=e.rects.popper,k=new Map,T=!0,E=_[0],x=0;x<_.length;x++){var P=_[x],A=Ja(P),I=Mm(P)===Pm,D=[To,Bs].indexOf(A)>=0,q=D?"width":"height",z=Bv(e,{placement:P,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),R=D?I?Vs:Eo:I?Bs:To;C[q]>S[q]&&(R=Sw(R));var O=Sw(R),N=[];if(o&&N.push(z[A]<=0),a&&N.push(z[R]<=0,z[O]<=0),N.every(function(J){return J})){E=P,T=!1;break}k.set(P,N)}if(T)for(var F=m?3:1,j=function(J){var ne=_.find(function(he){var X=k.get(he);if(X)return X.slice(0,J).every(function(se){return se})});if(ne)return E=ne,"break"},U=F;U>0;U--){var W=j(U);if(W==="break")break}e.placement!==E&&(e.modifiersData[i]._skip=!0,e.placement=E,e.reset=!0)}}var jfe={name:"flip",enabled:!0,phase:"main",fn:qfe,requiresIfExists:["offset"],data:{_skip:!1}};function kD(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function TD(t){return[To,Vs,Bs,Eo].some(function(e){return t[e]>=0})}function Kfe(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=Bv(e,{elementContext:"reference"}),a=Bv(e,{altBoundary:!0}),l=kD(s,i),u=kD(a,r,o),c=TD(l),d=TD(u);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var Gfe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kfe};function Yfe(t,e,n){var i=Ja(t),r=[Eo,To].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[Eo,Vs].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}function Xfe(t){var e=t.state,n=t.options,i=t.name,r=n.offset,o=r===void 0?[0,0]:r,s=xu.reduce(function(c,d){return c[d]=Yfe(d,e.rects,o),c},{}),a=s[e.placement],l=a.x,u=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=s}var Jfe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Xfe};function Zfe(t){var e=t.state,n=t.name;e.modifiersData[n]=EU({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}var xU={name:"popperOffsets",enabled:!0,phase:"read",fn:Zfe,data:{}};function Qfe(t){return t==="x"?"y":"x"}function ehe(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=r===void 0?!0:r,s=n.altAxis,a=s===void 0?!1:s,l=n.boundary,u=n.rootBoundary,c=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,v=Bv(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),p=Ja(e.placement),b=Mm(e.placement),y=!b,_=fR(p),C=Qfe(_),S=e.modifiersData.popperOffsets,k=e.rects.reference,T=e.rects.popper,E=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,x=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,A={x:0,y:0};if(S){if(o){var I,D=_==="y"?To:Eo,q=_==="y"?Bs:Vs,z=_==="y"?"height":"width",R=S[_],O=R+v[D],N=R-v[q],F=h?-T[z]/2:0,j=b===Pm?k[z]:T[z],U=b===Pm?-T[z]:-k[z],W=e.elements.arrow,J=h&&W?dR(W):{width:0,height:0},ne=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:wU(),he=ne[D],X=ne[q],se=Wp(0,k[z],J[z]),re=y?k[z]/2-F-se-he-x.mainAxis:j-se-he-x.mainAxis,ee=y?-k[z]/2+F+se+X+x.mainAxis:U+se+X+x.mainAxis,te=e.elements.arrow&&Jb(e.elements.arrow),V=te?_==="y"?te.clientTop||0:te.clientLeft||0:0,K=(I=P?.[_])!=null?I:0,G=R+re-K-V,ye=R+ee-K,be=Wp(h?z_(O,G):O,R,h?rf(N,ye):N);S[_]=be,A[_]=be-R}if(a){var Ce,Y=_==="x"?To:Eo,Z=_==="x"?Bs:Vs,ae=S[C],pe=C==="y"?"height":"width",je=ae+v[Y],Ie=ae-v[Z],fe=[To,Eo].indexOf(p)!==-1,Te=(Ce=P?.[C])!=null?Ce:0,et=fe?je:ae-k[pe]-T[pe]-Te+x.altAxis,Re=fe?ae+k[pe]+T[pe]-Te-x.altAxis:Ie,ze=h&&fe?xfe(et,ae,Re):Wp(h?et:je,ae,h?Re:Ie);S[C]=ze,A[C]=ze-ae}e.modifiersData[i]=A}}var the={name:"preventOverflow",enabled:!0,phase:"main",fn:ehe,requiresIfExists:["offset"]};function nhe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function ihe(t){return t===ss(t)||!Os(t)?hR(t):nhe(t)}function rhe(t){var e=t.getBoundingClientRect(),n=Im(e.width)/t.offsetWidth||1,i=Im(e.height)/t.offsetHeight||1;return n!==1||i!==1}function ohe(t,e,n){n===void 0&&(n=!1);var i=Os(e),r=Os(e)&&rhe(e),o=Hc(e),s=Rm(t,r,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((dl(e)!=="body"||gR(o))&&(a=ihe(e)),Os(e)?(l=Rm(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=mR(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function she(t){var e=new Map,n=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function r(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&r(l)}}),i.push(o)}return t.forEach(function(o){n.has(o.name)||r(o)}),i}function ahe(t){var e=she(t);return Cfe.reduce(function(n,i){return n.concat(e.filter(function(r){return r.phase===i}))},[])}function lhe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function uhe(t){var e=t.reduce(function(n,i){var r=n[i.name];return n[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var ED={placement:"bottom",modifiers:[],strategy:"absolute"};function xD(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function pR(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,r=e.defaultOptions,o=r===void 0?ED:r;return function(s,a,l){l===void 0&&(l=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},ED,o),modifiersData:{},elements:{reference:s,popper:a},attributes:{},styles:{}},c=[],d=!1,f={state:u,setOptions:function(g){var v=typeof g=="function"?g(u.options):g;m(),u.options=Object.assign({},o,u.options,v),u.scrollParents={reference:bf(s)?qp(s):s.contextElement?qp(s.contextElement):[],popper:qp(a)};var p=ahe(uhe([].concat(i,u.options.modifiers)));return u.orderedModifiers=p.filter(function(b){return b.enabled}),h(),f.update()},forceUpdate:function(){if(!d){var g=u.elements,v=g.reference,p=g.popper;if(xD(v,p)){u.rects={reference:ohe(v,Jb(p),u.options.strategy==="fixed"),popper:dR(p)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(T){return u.modifiersData[T.name]=Object.assign({},T.data)});for(var b=0;b<u.orderedModifiers.length;b++){if(u.reset===!0){u.reset=!1,b=-1;continue}var y=u.orderedModifiers[b],_=y.fn,C=y.options,S=C===void 0?{}:C,k=y.name;typeof _=="function"&&(u=_({state:u,options:S,name:k,instance:f})||u)}}}},update:lhe(function(){return new Promise(function(g){f.forceUpdate(),g(u)})}),destroy:function(){m(),d=!0}};if(!xD(s,a))return f;f.setOptions(l).then(function(g){!d&&l.onFirstUpdate&&l.onFirstUpdate(g)});function h(){u.orderedModifiers.forEach(function(g){var v=g.name,p=g.options,b=p===void 0?{}:p,y=g.effect;if(typeof y=="function"){var _=y({state:u,name:v,instance:f,options:b}),C=function(){};c.push(_||C)}})}function m(){c.forEach(function(g){return g()}),c=[]}return f}}pR();var che=[kU,xU,SU,vU];pR({defaultModifiers:che});var dhe=[kU,xU,SU,vU,Jfe,jfe,the,Rfe,Gfe],fhe=pR({defaultModifiers:dhe});const AU=qe({arrowOffset:{type:Number,default:5}}),hhe=qe({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),hs=t=>ZI(hhe,t),mhe=["fixed","absolute"],ghe=qe({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:me(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:xu,default:"bottom"},popperOptions:{type:me(Object),default:()=>({})},strategy:{type:String,values:mhe,default:"absolute"}}),PU=qe({...ghe,...AU,id:String,style:{type:me([String,Array,Object])},className:{type:me([String,Array,Object])},effect:{type:me(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:me([String,Array,Object])},popperStyle:{type:me([String,Array,Object])},referenceEl:{type:me(Object)},triggerTargetEl:{type:me(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...hs(["ariaLabel"]),loop:Boolean}),phe={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0};function AD(){let t;const e=(i,r)=>{n(),t=window.setTimeout(i,r)},n=()=>window.clearTimeout(t);return cg(()=>n()),{registerTimeout:e,cancelTimeout:n}}const vhe=qe({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),bhe=({showAfter:t,hideAfter:e,autoClose:n,open:i,close:r})=>{const{registerTimeout:o}=AD(),{registerTimeout:s,cancelTimeout:a}=AD();return{onOpen:(c,d=w(t))=>{o(()=>{i(c);const f=w(n);St(f)&&f>0&&s(()=>{r(c)},f)},d)},onClose:(c,d=w(e))=>{a(),o(()=>{r(c)},d)}}},Mn=qe({...vhe,...PU,appendTo:{type:iR.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:me(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...hs(["ariaLabel"])}),Fs=t=>t,yhe=qe({id:{type:String,default:void 0},size:$r,disabled:{type:Boolean,default:void 0},modelValue:{type:me([String,Number,Object]),default:""},modelModifiers:{type:me(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:me(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:me([Boolean,Object]),default:!1},autocomplete:{type:me(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:ri,default:Nf},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:ri},prefixIcon:{type:ri},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:me([Object,Array,String]),default:()=>Fs({})},autofocus:Boolean,rows:{type:Number,default:2},...hs(["ariaLabel"]),inputmode:{type:me(String),default:void 0},name:String}),whe={[It]:t=>ot(t),input:t=>ot(t),change:(t,e)=>ot(t)&&(e instanceof Event||e===void 0),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent};ca(Nf);const IU=()=>Zt&&/firefox/i.test(window.navigator.userAgent),_he=()=>Zt&&/android/i.test(window.navigator.userAgent);let fo;const Che={height:"0",visibility:"hidden",overflow:IU()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},She=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],PD=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function khe(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),i=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),r=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:She.map(s=>[s,e.getPropertyValue(s)]),paddingSize:i,borderSize:r,boxSizing:n}}function ID(t,e=1,n){var i,r;fo||(fo=document.createElement("textarea"),((i=t.parentNode)!=null?i:document.body).appendChild(fo));const{paddingSize:o,borderSize:s,boxSizing:a,contextStyle:l}=khe(t);l.forEach(([f,h])=>fo?.style.setProperty(f,h)),Object.entries(Che).forEach(([f,h])=>fo?.style.setProperty(f,h,"important")),fo.value=t.value||t.placeholder||"";let u=fo.scrollHeight;const c={};a==="border-box"?u=u+s:a==="content-box"&&(u=u-o),fo.value="";const d=fo.scrollHeight-o;if(St(e)){let f=d*e;a==="border-box"&&(f=f+o+s),u=Math.max(f,u),c.minHeight=`${f}px`}if(St(n)){let f=d*n;a==="border-box"&&(f=f+o+s),u=Math.min(f,u)}return c.height=`${u}px`,(r=fo.parentNode)==null||r.removeChild(fo),fo=void 0,c}const The=["class","style"],Ehe=/^on[A-Z]/,vR=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,i=M(()=>(n?.value||[]).concat(The)),r=Ct();return M(r?()=>{var o;return Lv(Object.entries((o=r.proxy)==null?void 0:o.$attrs).filter(([s])=>!i.value.includes(s)&&!(e&&Ehe.test(s))))}:()=>({}))},RU=t=>{const e=Ct();return M(()=>{var n,i;return(i=(n=e?.proxy)==null?void 0:n.$props)==null?void 0:i[t]})},Bf=Symbol("formContextKey"),yf=Symbol("formItemContextKey"),fr=(t,e={})=>{const n=H(void 0),i=e.prop?n:RU("size"),r=e.global?n:oU(),o=e.form?{size:void 0}:Ne(Bf,void 0),s=e.formItem?{size:void 0}:Ne(yf,void 0);return M(()=>i.value||w(t)||s?.size||o?.size||r.value||"")},Oi=t=>{const e=RU("disabled"),n=Ne(Bf,void 0);return M(()=>{var i,r,o;return(o=(r=(i=e.value)!=null?i:w(t))!=null?r:n?.disabled)!=null?o:!1})},xhe='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',RD=t=>typeof Element>"u"?!1:t instanceof Element,Ahe=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,MD=t=>Array.from(t.querySelectorAll(xhe)).filter(e=>Vv(e)&&Ahe(e)),Vv=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},kw=function(t,e,...n){let i;e.includes("mouse")||e.includes("click")?i="MouseEvents":e.includes("key")?i="KeyboardEvent":i="HTMLEvents";const r=document.createEvent(i);return r.initEvent(e,...n),t.dispatchEvent(r),t},MU=t=>!t.getAttribute("aria-owns"),OU=(t,e,n)=>{const{parentNode:i}=t;if(!i)return null;const r=i.querySelectorAll(n),o=Array.prototype.indexOf.call(r,t);return r[o+e]||null},Zb=(t,e)=>{if(!t||!t.focus)return;let n=!1;RD(t)&&!Vv(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),RD(t)&&n&&t.removeAttribute("tabindex")},Tw=t=>{t&&(Zb(t),!MU(t)&&t.click())};function dg(t,{disabled:e,beforeFocus:n,afterFocus:i,beforeBlur:r,afterBlur:o}={}){const s=Ct(),{emit:a}=s,l=bi(),u=H(!1),c=h=>{const m=Xe(n)?n(h):!1;w(e)||u.value||m||(u.value=!0,a("focus",h),i?.())},d=h=>{var m;const g=Xe(r)?r(h):!1;w(e)||h.relatedTarget&&((m=l.value)!=null&&m.contains(h.relatedTarget))||g||(u.value=!1,a("blur",h),o?.())},f=h=>{var m,g;w(e)||Vv(h.target)||(m=l.value)!=null&&m.contains(document.activeElement)&&l.value!==document.activeElement||(g=t.value)==null||g.focus()};return Se([l,()=>w(e)],([h,m])=>{h&&(m?h.removeAttribute("tabindex"):h.setAttribute("tabindex","-1"))}),Kn(l,"focus",c,!0),Kn(l,"blur",d,!0),Kn(l,"click",f,!0),{isFocused:u,wrapperRef:l,handleFocus:c,handleBlur:d}}const OD={prefix:Math.floor(Math.random()*1e4),current:0},Phe=Symbol("elIdInjection"),LU=()=>Ct()?Ne(Phe,OD):OD,as=t=>{const e=LU(),n=QI();return XH(()=>w(t)||`${n.value}-id-${e.prefix}-${e.current++}`)},lo=()=>{const t=Ne(Bf,void 0),e=Ne(yf,void 0);return{form:t,formItem:e}},Au=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:i})=>{n||(n=H(!1)),i||(i=H(!1));const r=Ct(),o=()=>{let u=r?.parent;for(;u;){if(u.type.name==="ElFormItem")return!1;if(u.type.name==="ElLabelWrap")return!0;u=u.parent}return!1},s=H();let a;const l=M(()=>{var u;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((u=e.inputIds)==null?void 0:u.length)<=1)});return Pt(()=>{a=Se([An(t,"id"),n],([u,c])=>{const d=u??(c?void 0:as().value);d!==s.value&&(e?.removeInputId&&!o()&&(s.value&&e.removeInputId(s.value),!i?.value&&!c&&d&&e.addInputId(d)),s.value=d)},{immediate:!0})}),Fc(()=>{a&&a(),e?.removeInputId&&s.value&&e.removeInputId(s.value)}),{isLabeledByFormItem:l,inputId:s}},Ihe=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t);function bR({afterComposition:t,emit:e}){const n=H(!1),i=a=>{e?.("compositionstart",a),n.value=!0},r=a=>{var l;e?.("compositionupdate",a);const u=(l=a.target)==null?void 0:l.value,c=u[u.length-1]||"";n.value=!Ihe(c)},o=a=>{e?.("compositionend",a),n.value&&(n.value=!1,Ye(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?o(a):r(a)},handleCompositionStart:i,handleCompositionUpdate:r,handleCompositionEnd:o}}function Rhe(t){let e;function n(){if(t.value==null)return;const{selectionStart:r,selectionEnd:o,value:s}=t.value;if(r==null||o==null)return;const a=s.slice(0,Math.max(0,r)),l=s.slice(Math.max(0,o));e={selectionStart:r,selectionEnd:o,value:s,beforeTxt:a,afterTxt:l}}function i(){if(t.value==null||e==null)return;const{value:r}=t.value,{beforeTxt:o,afterTxt:s,selectionStart:a}=e;if(o==null||s==null||a==null)return;let l=r.length;if(r.endsWith(s))l=r.length-s.length;else if(r.startsWith(o))l=o.length;else{const u=o[a-1],c=r.indexOf(u,a-1);c!==-1&&(l=c+1)}t.value.setSelectionRange(l,l)}return[n,i]}const Mhe=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],Ohe=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role"],Lhe="ElInput";var Dhe=le({name:Lhe,inheritAttrs:!1,__name:"input",props:yhe,emits:whe,setup(t,{expose:e,emit:n}){const i=t,r=n,o=Rf(),s=vR(),a=$o(),l=M(()=>[i.type==="textarea"?v.b():g.b(),g.m(h.value),g.is("disabled",m.value),g.is("exceed",W.value),{[g.b("group")]:a.prepend||a.append,[g.m("prefix")]:a.prefix||i.prefixIcon,[g.m("suffix")]:a.suffix||i.suffixIcon||i.clearable||i.showPassword,[g.bm("suffix","password-clear")]:N.value&&F.value,[g.b("hidden")]:i.type==="hidden"},o.class]),u=M(()=>[g.e("wrapper"),g.is("focus",E.value)]),{form:c,formItem:d}=lo(),{inputId:f}=Au(i,{formItemContext:d}),h=fr(),m=Oi(),g=De("input"),v=De("textarea"),p=bi(),b=bi(),y=H(!1),_=H(!1),C=H(),S=bi(i.inputStyle),k=M(()=>p.value||b.value),{wrapperRef:T,isFocused:E,handleFocus:x,handleBlur:P}=dg(k,{disabled:m,afterBlur(){var Re;i.validateEvent&&((Re=d?.validate)==null||Re.call(d,"blur").catch(ze=>void 0))}}),A=M(()=>{var Re;return(Re=c?.statusIcon)!=null?Re:!1}),I=M(()=>d?.validateState||""),D=M(()=>I.value&&gU[I.value]),q=M(()=>_.value?nfe:kde),z=M(()=>[o.style]),R=M(()=>[i.inputStyle,S.value,{resize:i.resize}]),O=M(()=>ir(i.modelValue)?"":String(i.modelValue)),N=M(()=>i.clearable&&!m.value&&!i.readonly&&!!O.value&&(E.value||y.value)),F=M(()=>i.showPassword&&!m.value&&!!O.value),j=M(()=>i.showWordLimit&&!!i.maxlength&&(i.type==="text"||i.type==="textarea")&&!m.value&&!i.readonly&&!i.showPassword),U=M(()=>O.value.length),W=M(()=>!!j.value&&U.value>Number(i.maxlength)),J=M(()=>!!a.suffix||!!i.suffixIcon||N.value||i.showPassword||j.value||!!I.value&&A.value),ne=M(()=>!!Object.keys(i.modelModifiers).length),[he,X]=Rhe(p);nr(b,Re=>{if(ee(),!j.value||i.resize!=="both"&&i.resize!=="horizontal")return;const ze=Re[0],{width:Ke}=ze.contentRect;C.value={right:`calc(100% - ${Ke+22-10}px)`}});const se=()=>{const{type:Re,autosize:ze}=i;if(!(!Zt||Re!=="textarea"||!b.value))if(ze){const Ke=_t(ze)?ze.minRows:void 0,Dt=_t(ze)?ze.maxRows:void 0,Cn=ID(b.value,Ke,Dt);S.value={overflowY:"hidden",...Cn},Ye(()=>{b.value.offsetHeight,S.value=Cn})}else S.value={minHeight:ID(b.value).minHeight}},ee=(Re=>{let ze=!1;return()=>{var Ke;if(ze||!i.autosize)return;((Ke=b.value)==null?void 0:Ke.offsetParent)===null||(setTimeout(Re),ze=!0)}})(se),te=()=>{const Re=k.value,ze=i.formatter?i.formatter(O.value):O.value;!Re||Re.value===ze||i.type==="file"||(Re.value=ze)},V=Re=>{const{trim:ze,number:Ke}=i.modelModifiers;return ze&&(Re=Re.trim()),Ke&&(Re=`${PD(Re)}`),i.formatter&&i.parser&&(Re=i.parser(Re)),Re},K=async Re=>{if(ye.value)return;const{lazy:ze}=i.modelModifiers;let{value:Ke}=Re.target;if(ze){r(rs,Ke);return}if(Ke=V(Ke),String(Ke)===O.value){i.formatter&&te();return}he(),r(It,Ke),r(rs,Ke),await Ye(),(i.formatter&&i.parser||!ne.value)&&te(),X()},G=async Re=>{let{value:ze}=Re.target;ze=V(ze),i.modelModifiers.lazy&&r(It,ze),r(En,ze,Re),await Ye(),te()},{isComposing:ye,handleCompositionStart:be,handleCompositionUpdate:Ce,handleCompositionEnd:Y}=bR({emit:r,afterComposition:K}),Z=()=>{_.value=!_.value},ae=()=>{var Re;return(Re=k.value)==null?void 0:Re.focus()},pe=()=>{var Re;return(Re=k.value)==null?void 0:Re.blur()},je=Re=>{y.value=!1,r("mouseleave",Re)},Ie=Re=>{y.value=!0,r("mouseenter",Re)},fe=Re=>{r("keydown",Re)},Te=()=>{var Re;(Re=k.value)==null||Re.select()},et=()=>{r(It,""),r(En,""),r("clear"),r(rs,"")};return Se(()=>i.modelValue,()=>{var Re;Ye(()=>se()),i.validateEvent&&((Re=d?.validate)==null||Re.call(d,"change").catch(ze=>void 0))}),Se(O,Re=>{if(!k.value)return;const{trim:ze,number:Ke}=i.modelModifiers,Dt=k.value.value,Cn=(Ke||i.type==="number")&&!/^0\d/.test(Dt)?`${PD(Dt)}`:Dt;Cn!==Re&&(document.activeElement===k.value&&k.value.type!=="range"&&ze&&Cn.trim()===Re||te())}),Se(()=>i.type,async()=>{await Ye(),te(),se()}),Pt(()=>{!i.formatter&&i.parser,te(),Ye(se)}),e({input:p,textarea:b,ref:k,textareaStyle:R,autosize:An(i,"autosize"),isComposing:ye,focus:ae,blur:pe,select:Te,clear:et,resizeTextarea:se}),(Re,ze)=>(B(),Q("div",{class:$([l.value,{[w(g).bm("group","append")]:Re.$slots.append,[w(g).bm("group","prepend")]:Re.$slots.prepend}]),style:mt(z.value),onMouseenter:Ie,onMouseleave:je},[ve(" input "),t.type!=="textarea"?(B(),Q(rt,{key:0},[ve(" prepend slot "),Re.$slots.prepend?(B(),Q("div",{key:0,class:$(w(g).be("group","prepend"))},[we(Re.$slots,"prepend")],2)):ve("v-if",!0),ie("div",{ref_key:"wrapperRef",ref:T,class:$(u.value)},[ve(" prefix slot "),Re.$slots.prefix||t.prefixIcon?(B(),Q("span",{key:0,class:$(w(g).e("prefix"))},[ie("span",{class:$(w(g).e("prefix-inner"))},[we(Re.$slots,"prefix"),t.prefixIcon?(B(),_e(w(He),{key:0,class:$(w(g).e("icon"))},{default:ce(()=>[(B(),_e(Gt(t.prefixIcon)))]),_:1},8,["class"])):ve("v-if",!0)],2)],2)):ve("v-if",!0),ie("input",Lt({id:w(f),ref_key:"input",ref:p,class:w(g).e("inner")},w(s),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?_.value?"text":"password":t.type,disabled:w(m),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:ze[0]||(ze[0]=(...Ke)=>w(be)&&w(be)(...Ke)),onCompositionupdate:ze[1]||(ze[1]=(...Ke)=>w(Ce)&&w(Ce)(...Ke)),onCompositionend:ze[2]||(ze[2]=(...Ke)=>w(Y)&&w(Y)(...Ke)),onInput:K,onChange:G,onKeydown:fe}),null,16,Mhe),ve(" suffix slot "),J.value?(B(),Q("span",{key:1,class:$(w(g).e("suffix"))},[ie("span",{class:$(w(g).e("suffix-inner"))},[!N.value||!F.value||!j.value?(B(),Q(rt,{key:0},[we(Re.$slots,"suffix"),t.suffixIcon?(B(),_e(w(He),{key:0,class:$(w(g).e("icon"))},{default:ce(()=>[(B(),_e(Gt(t.suffixIcon)))]),_:1},8,["class"])):ve("v-if",!0)],64)):ve("v-if",!0),N.value?(B(),_e(w(He),{key:1,class:$([w(g).e("icon"),w(g).e("clear")]),onMousedown:Ot(w(tn),["prevent"]),onClick:et},{default:ce(()=>[(B(),_e(Gt(t.clearIcon)))]),_:1},8,["class","onMousedown"])):ve("v-if",!0),F.value?(B(),_e(w(He),{key:2,class:$([w(g).e("icon"),w(g).e("password")]),onClick:Z,onMousedown:Ot(w(tn),["prevent"]),onMouseup:Ot(w(tn),["prevent"])},{default:ce(()=>[(B(),_e(Gt(q.value)))]),_:1},8,["class","onMousedown","onMouseup"])):ve("v-if",!0),j.value?(B(),Q("span",{key:3,class:$([w(g).e("count"),w(g).is("outside",t.wordLimitPosition==="outside")])},[ie("span",{class:$(w(g).e("count-inner"))},We(U.value)+" / "+We(t.maxlength),3)],2)):ve("v-if",!0),I.value&&D.value&&A.value?(B(),_e(w(He),{key:4,class:$([w(g).e("icon"),w(g).e("validateIcon"),w(g).is("loading",I.value==="validating")])},{default:ce(()=>[(B(),_e(Gt(D.value)))]),_:1},8,["class"])):ve("v-if",!0)],2)],2)):ve("v-if",!0)],2),ve(" append slot "),Re.$slots.append?(B(),Q("div",{key:1,class:$(w(g).be("group","append"))},[we(Re.$slots,"append")],2)):ve("v-if",!0)],64)):(B(),Q(rt,{key:1},[ve(" textarea "),ie("textarea",Lt({id:w(f),ref_key:"textarea",ref:b,class:[w(v).e("inner"),w(g).is("focus",w(E))]},w(s),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:w(m),readonly:t.readonly,autocomplete:t.autocomplete,style:R.value,"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,onCompositionstart:ze[3]||(ze[3]=(...Ke)=>w(be)&&w(be)(...Ke)),onCompositionupdate:ze[4]||(ze[4]=(...Ke)=>w(Ce)&&w(Ce)(...Ke)),onCompositionend:ze[5]||(ze[5]=(...Ke)=>w(Y)&&w(Y)(...Ke)),onInput:K,onFocus:ze[6]||(ze[6]=(...Ke)=>w(x)&&w(x)(...Ke)),onBlur:ze[7]||(ze[7]=(...Ke)=>w(P)&&w(P)(...Ke)),onChange:G,onKeydown:fe}),null,16,Ohe),j.value?(B(),Q("span",{key:0,style:mt(C.value),class:$([w(g).e("count"),w(g).is("outside",t.wordLimitPosition==="outside")])},We(U.value)+" / "+We(t.maxlength),7)):ve("v-if",!0)],64))],38))}});const cr=sn(Dhe),Nhe=qe({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:me([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...hs(["ariaLabel","ariaOrientation"])}),DU={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(St)},Bhe=qe({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),th=4,Vhe={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Fhe=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),$he=qe({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),yR=Symbol("scrollbarContextKey"),zhe="Thumb";var LD=le({__name:"thumb",props:$he,setup(t){const e=t,n=Ne(yR),i=De("scrollbar");n||dr(zhe,"can not inject scrollbar context");const r=H(),o=H(),s=H({}),a=H(!1);let l=!1,u=!1,c=0,d=0,f=Zt?document.onselectstart:null;const h=M(()=>Vhe[e.vertical?"vertical":"horizontal"]),m=M(()=>Fhe({size:e.size,move:e.move,bar:h.value})),g=M(()=>r.value[h.value.offset]**2/n.wrapElement[h.value.scrollSize]/e.ratio/o.value[h.value.offset]),v=T=>{var E;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(E=window.getSelection())==null||E.removeAllRanges(),b(T);const x=T.currentTarget;x&&(s.value[h.value.axis]=x[h.value.offset]-(T[h.value.client]-x.getBoundingClientRect()[h.value.direction]))},p=T=>{if(!o.value||!r.value||!n.wrapElement)return;const E=Math.abs(T.target.getBoundingClientRect()[h.value.direction]-T[h.value.client]),x=o.value[h.value.offset]/2,P=(E-x)*100*g.value/r.value[h.value.offset];n.wrapElement[h.value.scroll]=P*n.wrapElement[h.value.scrollSize]/100},b=T=>{T.stopImmediatePropagation(),l=!0,c=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",y),document.addEventListener("mouseup",_),f=document.onselectstart,document.onselectstart=()=>!1},y=T=>{if(!r.value||!o.value||l===!1)return;const E=s.value[h.value.axis];if(!E)return;const x=(r.value.getBoundingClientRect()[h.value.direction]-T[h.value.client])*-1,P=o.value[h.value.offset]-E,A=(x-P)*100*g.value/r.value[h.value.offset];h.value.scroll==="scrollLeft"?n.wrapElement[h.value.scroll]=A*d/100:n.wrapElement[h.value.scroll]=A*c/100},_=()=>{l=!1,s.value[h.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",_),k(),u&&(a.value=!1)},C=()=>{u=!1,a.value=!!e.size},S=()=>{u=!0,a.value=l};Sn(()=>{k(),document.removeEventListener("mouseup",_)});const k=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return Kn(An(n,"scrollbarElement"),"mousemove",C),Kn(An(n,"scrollbarElement"),"mouseleave",S),(T,E)=>(B(),_e(ya,{name:w(i).b("fade"),persisted:""},{default:ce(()=>[Vt(ie("div",{ref_key:"instance",ref:r,class:$([w(i).e("bar"),w(i).is(h.value.key)]),onMousedown:p,onClick:E[0]||(E[0]=Ot(()=>{},["stop"]))},[ie("div",{ref_key:"thumb",ref:o,class:$(w(i).e("thumb")),style:mt(m.value),onMousedown:v},null,38)],34),[[On,t.always||a.value]])]),_:1},8,["name"]))}}),Hhe=le({__name:"bar",props:Bhe,setup(t,{expose:e}){const n=t,i=Ne(yR),r=H(0),o=H(0),s=H(""),a=H(""),l=H(1),u=H(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-th,m=f.offsetWidth-th;o.value=f.scrollTop*100/h*l.value,r.value=f.scrollLeft*100/m*u.value}},update:()=>{const f=i?.wrapElement;if(!f)return;const h=f.offsetHeight-th,m=f.offsetWidth-th,g=h**2/f.scrollHeight,v=m**2/f.scrollWidth,p=Math.max(g,n.minSize),b=Math.max(v,n.minSize);l.value=g/(h-g)/(p/(h-p)),u.value=v/(m-v)/(b/(m-b)),a.value=p+th<h?`${p}px`:"",s.value=b+th<m?`${b}px`:""}}),(f,h)=>(B(),Q(rt,null,[L(LD,{move:r.value,ratio:u.value,size:s.value,always:t.always},null,8,["move","ratio","size","always"]),L(LD,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}});const Uhe=["tabindex"],Whe="ElScrollbar";var qhe=le({name:Whe,__name:"scrollbar",props:Nhe,emits:DU,setup(t,{expose:e,emit:n}){const i=t,r=n,o=De("scrollbar");let s,a,l,u=0,c=0,d="";const f={bottom:!1,top:!1,right:!1,left:!1},h=H(),m=H(),g=H(),v=H(),p=M(()=>{const A={},I=zr(i.height),D=zr(i.maxHeight);return I&&(A.height=I),D&&(A.maxHeight=D),[i.wrapStyle,A]}),b=M(()=>[i.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!i.native}]),y=M(()=>[o.e("view"),i.viewClass]),_=A=>{var I;return(I=f[A])!=null?I:!1},C={top:"bottom",bottom:"top",left:"right",right:"left"},S=A=>{const I=C[d];if(!I)return;const D=A[d],q=A[I];D&&!f[d]&&(f[d]=!0),!q&&f[I]&&(f[I]=!1)},k=()=>{var A;if(m.value){(A=v.value)==null||A.handleScroll(m.value);const I=u,D=c;u=m.value.scrollTop,c=m.value.scrollLeft;const q={bottom:u+m.value.clientHeight>=m.value.scrollHeight-i.distance,top:u<=i.distance&&I!==0,right:c+m.value.clientWidth>=m.value.scrollWidth-i.distance&&D!==c,left:c<=i.distance&&D!==0};if(r("scroll",{scrollTop:u,scrollLeft:c}),I!==u&&(d=u>I?"bottom":"top"),D!==c&&(d=c>D?"right":"left"),i.distance>0){if(_(d))return;S(q)}q[d]&&r("end-reached",d)}};function T(A,I){_t(A)?m.value.scrollTo(A):St(A)&&St(I)&&m.value.scrollTo(A,I)}const E=A=>{St(A)&&(m.value.scrollTop=A)},x=A=>{St(A)&&(m.value.scrollLeft=A)},P=()=>{var A;(A=v.value)==null||A.update(),f[d]=!1};return Se(()=>i.noresize,A=>{A?(s?.(),a?.(),l?.()):({stop:s}=nr(g,P),{stop:a}=nr(m,P),l=Kn("resize",P))},{immediate:!0}),Se(()=>[i.maxHeight,i.height],()=>{i.native||Ye(()=>{var A;P(),m.value&&((A=v.value)==null||A.handleScroll(m.value))})}),qt(yR,on({scrollbarElement:h,wrapElement:m})),hz(()=>{m.value&&(m.value.scrollTop=u,m.value.scrollLeft=c)}),Pt(()=>{i.native||Ye(()=>{P()})}),ku(()=>P()),e({wrapRef:m,update:P,scrollTo:T,setScrollTop:E,setScrollLeft:x,handleScroll:k}),(A,I)=>(B(),Q("div",{ref_key:"scrollbarRef",ref:h,class:$(w(o).b())},[ie("div",{ref_key:"wrapRef",ref:m,class:$(b.value),style:mt(p.value),tabindex:t.tabindex,onScroll:k},[(B(),_e(Gt(t.tag),{id:t.id,ref_key:"resizeRef",ref:g,class:$(y.value),style:mt(t.viewStyle),role:t.role,"aria-label":t.ariaLabel,"aria-orientation":t.ariaOrientation},{default:ce(()=>[we(A.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,Uhe),t.native?ve("v-if",!0):(B(),_e(Hhe,{key:0,ref_key:"barRef",ref:v,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}});const gu=sn(qhe),NU=qe({virtualRef:{type:me(Object)},virtualTriggering:Boolean,onMouseenter:{type:me(Function)},onMouseleave:{type:me(Function)},onClick:{type:me(Function)},onKeydown:{type:me(Function)},onFocus:{type:me(Function)},onBlur:{type:me(Function)},onContextmenu:{type:me(Function)},id:String,open:Boolean}),Me={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},vc=qe({...NU,disabled:Boolean,trigger:{type:me([String,Array]),default:"hover"},triggerKeys:{type:me(Array),default:()=>[Me.enter,Me.numpadEnter,Me.space]},focusOnTarget:Boolean}),jhe=MC({type:me(Boolean),default:null}),Khe=MC({type:me(Function)}),Ghe=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,i=[e],r={[t]:jhe,[n]:Khe};return{useModelToggle:({indicator:s,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:d})=>{const f=Ct(),{emit:h}=f,m=f.props,g=M(()=>Xe(m[n])),v=M(()=>m[t]===null),p=k=>{s.value!==!0&&(s.value=!0,a&&(a.value=k),Xe(c)&&c(k))},b=k=>{s.value!==!1&&(s.value=!1,a&&(a.value=k),Xe(d)&&d(k))},y=k=>{if(m.disabled===!0||Xe(u)&&!u())return;const T=g.value&&Zt;T&&h(e,!0),(v.value||!T)&&p(k)},_=k=>{if(m.disabled===!0||!Zt)return;const T=g.value&&Zt;T&&h(e,!1),(v.value||!T)&&b(k)},C=k=>{vi(k)&&(m.disabled&&k?g.value&&h(e,!1):s.value!==k&&(k?p():b()))},S=()=>{s.value?_():y()};return Se(()=>m[t],C),l&&f.appContext.config.globalProperties.$route!==void 0&&Se(()=>({...f.proxy.$route}),()=>{l.value&&s.value&&_()}),Pt(()=>{C(m[t])}),{hide:_,show:y,toggle:S,hasUpdateHandler:g}},useModelToggleProps:r,useModelToggleEmits:i}},BU=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],VU=qe({role:{type:String,values:BU,default:"tooltip"}}),{useModelToggleProps:Yhe,useModelToggleEmits:Xhe,useModelToggle:Jhe}=Ghe("visible"),Zhe=qe({...VU,...Yhe,...Mn,...vc,...AU,showArrow:{type:Boolean,default:!0}}),Qhe=[...Xhe,"before-show","before-hide","show","hide","open","close"],wR=Symbol("popper"),FU=Symbol("popperContent");var eme=le({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:VU,setup(t,{expose:e}){const n=t,i=H(),r=H(),o=H(),s=H(),a=M(()=>n.role),l={triggerRef:i,popperInstanceRef:r,contentRef:o,referenceRef:s,role:a};return e(l),qt(wR,l),(u,c)=>we(u.$slots,"default")}}),tme=le({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=De("popper"),{arrowRef:i,arrowStyle:r}=Ne(FU,void 0);return Sn(()=>{i.value=void 0}),e({arrowRef:i}),(o,s)=>(B(),Q("span",{ref_key:"arrowRef",ref:i,class:$(w(n).e("arrow")),style:mt(w(r)),"data-popper-arrow":""},null,6))}});const $U=Symbol("elForwardRef"),nme=t=>{qt($U,{setForwardRef:(n=>{t.value=n})})},ime=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),rme="ElOnlyChild",zU=le({name:rme,setup(t,{slots:e,attrs:n}){var i;const r=Ne($U),o=ime((i=r?.setForwardRef)!=null?i:tn);return()=>{var s;const a=(s=e.default)==null?void 0:s.call(e,n);if(!a)return null;const[l,u]=HU(a);return l?Vt(al(l,n),[[o]]):null}}});function HU(t){if(!t)return[null,0];const e=t,n=e.filter(i=>i.type!==xi).length;for(const i of e){if(_t(i))switch(i.type){case xi:continue;case Mf:case"svg":return[DD(i),n];case rt:return HU(i.children);default:return[i,n]}return[DD(i),n]}return[null,0]}function DD(t){const e=De("only-child");return L("span",{class:e.e("content")},[t])}var ome=le({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:NU,setup(t,{expose:e}){const n=t,{role:i,triggerRef:r}=Ne(wR,void 0);nme(r);const o=M(()=>a.value?n.id:void 0),s=M(()=>{if(i&&i.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=M(()=>{if(i&&i.value!=="tooltip")return i.value}),l=M(()=>a.value?`${n.open}`:void 0);let u;const c=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Pt(()=>{Se(()=>n.virtualRef,d=>{d&&(r.value=Yi(d))},{immediate:!0}),Se(r,(d,f)=>{u?.(),u=void 0,Qo(f)&&c.forEach(h=>{const m=n[h];m&&f.removeEventListener(h.slice(2).toLowerCase(),m,["onFocus","onBlur"].includes(h))}),Qo(d)&&(c.forEach(h=>{const m=n[h];m&&d.addEventListener(h.slice(2).toLowerCase(),m,["onFocus","onBlur"].includes(h))}),Vv(d)&&(u=Se([o,s,a,l],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((m,g)=>{ir(h[g])?d.removeAttribute(m):d.setAttribute(m,h[g])})},{immediate:!0}))),Qo(f)&&Vv(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>f.removeAttribute(h))},{immediate:!0})}),Sn(()=>{if(u?.(),u=void 0,r.value&&Qo(r.value)){const d=r.value;c.forEach(f=>{const h=n[f];h&&d.removeEventListener(f.slice(2).toLowerCase(),h,["onFocus","onBlur"].includes(f))}),r.value=void 0}}),e({triggerRef:r}),(d,f)=>t.virtualTriggering?ve("v-if",!0):(B(),_e(w(zU),Lt({key:0},d.$attrs,{"aria-controls":o.value,"aria-describedby":s.value,"aria-expanded":l.value,"aria-haspopup":a.value}),{default:ce(()=>[we(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});const yk="focus-trap.focus-after-trapped",wk="focus-trap.focus-after-released",sme="focus-trap.focusout-prevented",ND={cancelable:!0,bubbles:!1},ame={cancelable:!0,bubbles:!1},BD="focusAfterTrapped",VD="focusAfterReleased",UU=Symbol("elFocusTrap"),_R=H(),BC=H(0),CR=H(0);let N0=0;const WU=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},FD=(t,e)=>{for(const n of t)if(!lme(n,e))return n},lme=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},ume=t=>{const e=WU(t),n=FD(e,t),i=FD(e.reverse(),t);return[n,i]},cme=t=>t instanceof HTMLInputElement&&"select"in t,Yu=(t,e)=>{if(t){const n=document.activeElement;Zb(t,{preventScroll:!0}),CR.value=window.performance.now(),t!==n&&cme(t)&&e&&t.select()}};function $D(t,e){const n=[...t],i=t.indexOf(e);return i!==-1&&n.splice(i,1),n}const dme=()=>{let t=[];return{push:i=>{const r=t[0];r&&i!==r&&r.pause(),t=$D(t,i),t.unshift(i)},remove:i=>{var r,o;t=$D(t,i),(o=(r=t[0])==null?void 0:r.resume)==null||o.call(r)}}},fme=(t,e=!1)=>{const n=document.activeElement;for(const i of t)if(Yu(i,e),document.activeElement!==n)return},zD=dme(),hme=()=>BC.value>CR.value,B0=()=>{_R.value="pointer",BC.value=window.performance.now()},HD=()=>{_R.value="keyboard",BC.value=window.performance.now()},mme=()=>(Pt(()=>{N0===0&&(document.addEventListener("mousedown",B0),document.addEventListener("touchstart",B0),document.addEventListener("keydown",HD)),N0++}),Sn(()=>{N0--,N0<=0&&(document.removeEventListener("mousedown",B0),document.removeEventListener("touchstart",B0),document.removeEventListener("keydown",HD))}),{focusReason:_R,lastUserFocusTimestamp:BC,lastAutomatedFocusTimestamp:CR}),V0=t=>new CustomEvent(sme,{...ame,detail:t}),ji=(t,e,{checkForDefaultPrevented:n=!0}={})=>r=>{const o=t?.(r);if(n===!1||!o)return e?.(r)},UD=t=>e=>e.pointerType==="mouse"?t(e):void 0,Bn=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=qU(t);return e?Object.values(Me).includes(e)?e:e===" "?Me.space:"":""},qU=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&_he()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e};let Oh=[];const WD=t=>{Bn(t)===Me.esc&&Oh.forEach(n=>n(t))},gme=t=>{Pt(()=>{Oh.length===0&&document.addEventListener("keydown",WD),Zt&&Oh.push(t)}),Sn(()=>{Oh=Oh.filter(e=>e!==t),Oh.length===0&&Zt&&document.removeEventListener("keydown",WD)})};var pme=le({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[BD,VD,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=H();let i,r;const{focusReason:o}=mme();gme(m=>{t.trapped&&!s.paused&&e("release-requested",m)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=m=>{if(!t.loop&&!t.trapped||s.paused)return;const{altKey:g,ctrlKey:v,metaKey:p,currentTarget:b,shiftKey:y}=m,{loop:_}=t,S=Bn(m)===Me.tab&&!g&&!v&&!p,k=document.activeElement;if(S&&k){const T=b,[E,x]=ume(T);if(E&&x){if(!y&&k===x){const A=V0({focusReason:o.value});e("focusout-prevented",A),A.defaultPrevented||(m.preventDefault(),_&&Yu(E,!0))}else if(y&&[E,T].includes(k)){const A=V0({focusReason:o.value});e("focusout-prevented",A),A.defaultPrevented||(m.preventDefault(),_&&Yu(x,!0))}}else if(k===T){const A=V0({focusReason:o.value});e("focusout-prevented",A),A.defaultPrevented||m.preventDefault()}}};qt(UU,{focusTrapRef:n,onKeydown:a}),Se(()=>t.focusTrapEl,m=>{m&&(n.value=m)},{immediate:!0}),Se([n],([m],[g])=>{m&&(m.addEventListener("keydown",a),m.addEventListener("focusin",c),m.addEventListener("focusout",d)),g&&(g.removeEventListener("keydown",a),g.removeEventListener("focusin",c),g.removeEventListener("focusout",d))});const l=m=>{e(BD,m)},u=m=>e(VD,m),c=m=>{const g=w(n);if(!g)return;const v=m.target,p=m.relatedTarget,b=v&&g.contains(v);t.trapped||p&&g.contains(p)||(i=p),b&&e("focusin",m),!s.paused&&t.trapped&&(b?r=v:Yu(r,!0))},d=m=>{const g=w(n);if(!(s.paused||!g))if(t.trapped){const v=m.relatedTarget;!ir(v)&&!g.contains(v)&&setTimeout(()=>{if(!s.paused&&t.trapped){const p=V0({focusReason:o.value});e("focusout-prevented",p),p.defaultPrevented||Yu(r,!0)}},0)}else{const v=m.target;v&&g.contains(v)||e("focusout",m)}};async function f(){await Ye();const m=w(n);if(m){zD.push(s);const g=m.contains(document.activeElement)?i:document.activeElement;if(i=g,!m.contains(g)){const p=new Event(yk,ND);m.addEventListener(yk,l),m.dispatchEvent(p),p.defaultPrevented||Ye(()=>{let b=t.focusStartEl;ot(b)||(Yu(b),document.activeElement!==b&&(b="first")),b==="first"&&fme(WU(m),!0),(document.activeElement===g||b==="container")&&Yu(m)})}}}function h(){const m=w(n);if(m){m.removeEventListener(yk,l);const g=new CustomEvent(wk,{...ND,detail:{focusReason:o.value}});m.addEventListener(wk,u),m.dispatchEvent(g),!g.defaultPrevented&&(o.value=="keyboard"||!hme()||m.contains(document.activeElement))&&Yu(i??document.body),m.removeEventListener(wk,u),zD.remove(s),i=null,r=null}}return Pt(()=>{t.trapped&&f(),Se(()=>t.trapped,m=>{m?f():h()})}),Sn(()=>{t.trapped&&h(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",c),n.value.removeEventListener("focusout",d),n.value=void 0),i=null,r=null}),{onKeydown:a}}}),Tr=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n};function vme(t,e,n,i,r,o){return we(t.$slots,"default",{handleKeydown:t.onKeydown})}var VC=Tr(pme,[["render",vme]]);const bme=(t,e)=>{const n=H(!1),i=H(),r=()=>{e("focus")},o=u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(i.value="first",e("blur"))},s=u=>{t.visible&&!n.value&&(u.target&&(i.value=u.target),n.value=!0)},a=u=>{t.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},l=()=>{n.value=!1,e("close")};return Sn(()=>{i.value=void 0}),{focusStartRef:i,trapped:n,onFocusAfterReleased:o,onFocusAfterTrapped:r,onFocusInTrap:s,onFocusoutPrevented:a,onReleaseRequested:l}},yme=(t,e=[])=>{const{placement:n,strategy:i,popperOptions:r}=t,o={placement:n,strategy:i,...r,modifiers:[..._me(t),...e]};return Cme(o,r?.modifiers),o},wme=t=>{if(Zt)return Yi(t)};function _me(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:i}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:i}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Cme(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const Sme=(t,e,n={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=kme(l);Object.assign(s.value,u)},requires:["computeStyles"]},r=M(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:d}=w(n);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],i,{name:"applyStyles",enabled:!1}]}}),o=bi(),s=H({styles:{popper:{position:w(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return Se(r,l=>{const u=w(o);u&&u.setOptions(l)},{deep:!0}),Se([t,e],([l,u])=>{a(),!(!l||!u)&&(o.value=fhe(l,u,w(r)))}),Sn(()=>{a()}),{state:M(()=>{var l;return{...((l=w(o))==null?void 0:l.state)||{}}}),styles:M(()=>w(s).styles),attributes:M(()=>w(s).attributes),update:()=>{var l;return(l=w(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=w(o))==null?void 0:l.forceUpdate()},instanceRef:M(()=>w(o))}};function kme(t){const e=Object.keys(t.elements),n=Lv(e.map(r=>[r,t.styles[r]||{}])),i=Lv(e.map(r=>[r,t.attributes[r]]));return{styles:n,attributes:i}}const Tme=0,Eme=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:i,role:r}=Ne(wR,void 0),o=H(),s=M(()=>t.arrowOffset),a=M(()=>({name:"eventListeners",enabled:!!t.visible})),l=M(()=>{var p;const b=w(o),y=(p=w(s))!=null?p:Tme;return{name:"arrow",enabled:!Zue(b),options:{element:b,padding:y}}}),u=M(()=>({onFirstUpdate:()=>{m()},...yme(t,[w(l),w(a)])})),c=M(()=>wme(t.referenceEl)||w(i)),{attributes:d,state:f,styles:h,update:m,forceUpdate:g,instanceRef:v}=Sme(c,n,u);return Se(v,p=>e.value=p,{flush:"sync"}),Pt(()=>{Se(()=>{var p,b;return(b=(p=w(c))==null?void 0:p.getBoundingClientRect)==null?void 0:b.call(p)},()=>{m()})}),Sn(()=>{e.value=void 0}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:v,state:f,styles:h,role:r,forceUpdate:g,update:m}},xme=(t,{attributes:e,styles:n,role:i})=>{const{nextZIndex:r}=RC(),o=De("popper"),s=M(()=>w(e).popper),a=H(St(t.zIndex)?t.zIndex:r()),l=M(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),u=M(()=>[{zIndex:w(a)},w(n).popper,t.popperStyle||{}]),c=M(()=>i.value==="dialog"?"false":void 0),d=M(()=>w(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:s,contentClass:l,contentStyle:u,contentZIndex:a,updateZIndex:()=>{a.value=St(t.zIndex)?t.zIndex:r()}}};var Ame=le({name:"ElPopperContent",__name:"content",props:PU,emits:phe,setup(t,{expose:e,emit:n}){const i=n,r=t,{focusStartRef:o,trapped:s,onFocusAfterReleased:a,onFocusAfterTrapped:l,onFocusInTrap:u,onFocusoutPrevented:c,onReleaseRequested:d}=bme(r,i),{attributes:f,arrowRef:h,contentRef:m,styles:g,instanceRef:v,role:p,update:b}=Eme(r),{ariaModal:y,arrowStyle:_,contentAttrs:C,contentClass:S,contentStyle:k,updateZIndex:T}=xme(r,{styles:g,attributes:f,role:p}),E=Ne(yf,void 0);qt(FU,{arrowStyle:_,arrowRef:h}),E&&qt(yf,{...E,addInputId:tn,removeInputId:tn});let x;const P=(I=!0)=>{b(),I&&T()},A=()=>{P(!1),r.visible&&r.focusOnShow?s.value=!0:r.visible===!1&&(s.value=!1)};return Pt(()=>{Se(()=>r.triggerTargetEl,(I,D)=>{x?.(),x=void 0;const q=w(I||m.value),z=w(D||m.value);Qo(q)&&(x=Se([p,()=>r.ariaLabel,y,()=>r.id],R=>{["role","aria-label","aria-modal","id"].forEach((O,N)=>{ir(R[N])?q.removeAttribute(O):q.setAttribute(O,R[N])})},{immediate:!0})),z!==q&&Qo(z)&&["role","aria-label","aria-modal","id"].forEach(R=>{z.removeAttribute(R)})},{immediate:!0}),Se(()=>r.visible,A,{immediate:!0})}),Sn(()=>{x?.(),x=void 0,m.value=void 0}),e({popperContentRef:m,popperInstanceRef:v,updatePopper:P,contentStyle:k}),(I,D)=>(B(),Q("div",Lt({ref_key:"contentRef",ref:m},w(C),{style:w(k),class:w(S),tabindex:"-1",onMouseenter:D[0]||(D[0]=q=>I.$emit("mouseenter",q)),onMouseleave:D[1]||(D[1]=q=>I.$emit("mouseleave",q))}),[L(w(VC),{loop:t.loop,trapped:w(s),"trap-on-focus-in":!0,"focus-trap-el":w(m),"focus-start-el":w(o),onFocusAfterTrapped:w(l),onFocusAfterReleased:w(a),onFocusin:w(u),onFocusoutPrevented:w(c),onReleaseRequested:w(d)},{default:ce(()=>[we(I.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});const Pme=sn(eme),SR=Symbol("elTooltip"),f2=(t,e)=>Pe(t)?t.includes(e):t===e,nh=(t,e,n)=>i=>{f2(w(t),e)&&n(i)};var Ime=le({name:"ElTooltipTrigger",__name:"trigger",props:vc,setup(t,{expose:e}){const n=t,i=De("tooltip"),{controlled:r,id:o,open:s,onOpen:a,onClose:l,onToggle:u}=Ne(SR,void 0),c=H(null),d=()=>{if(w(r)||n.disabled)return!0},f=An(n,"trigger"),h=ji(d,nh(f,"hover",_=>{a(_),n.focusOnTarget&&_.target&&Ye(()=>{Zb(_.target,{preventScroll:!0})})})),m=ji(d,nh(f,"hover",l)),g=ji(d,nh(f,"click",_=>{_.button===0&&u(_)})),v=ji(d,nh(f,"focus",a)),p=ji(d,nh(f,"focus",l)),b=ji(d,nh(f,"contextmenu",_=>{_.preventDefault(),u(_)})),y=ji(d,_=>{const C=Bn(_);n.triggerKeys.includes(C)&&(_.preventDefault(),u(_))});return e({triggerRef:c}),(_,C)=>(B(),_e(w(ome),{id:w(o),"virtual-ref":t.virtualRef,open:w(s),"virtual-triggering":t.virtualTriggering,class:$(w(i).e("trigger")),onBlur:w(p),onClick:w(g),onContextmenu:w(b),onFocus:w(v),onMouseenter:w(h),onMouseleave:w(m),onKeydown:w(y)},{default:ce(()=>[we(_.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});const jU=()=>{const t=QI(),e=LU(),n=M(()=>`${t.value}-popper-container-${e.prefix}`),i=M(()=>`#${n.value}`);return{id:n,selector:i}},Rme=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},Mme=()=>{const{id:t,selector:e}=jU();return yC(()=>{Zt&&(document.body.querySelector(e.value)||Rme(t.value))}),{id:t,selector:e}},qD=t=>[...new Set(t)],Mg=t=>Pe(t)?t[0]:t,Br=t=>!t&&t!==0?[]:Pe(t)?t:[t];var Ome=le({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:Mn,setup(t,{expose:e}){const n=t,{selector:i}=jU(),r=De("tooltip"),o=H(),s=XH(()=>{var O;return(O=o.value)==null?void 0:O.popperContentRef});let a;const{controlled:l,id:u,open:c,trigger:d,onClose:f,onOpen:h,onShow:m,onHide:g,onBeforeShow:v,onBeforeHide:p}=Ne(SR,void 0),b=M(()=>n.transition||`${r.namespace.value}-fade-in-linear`),y=M(()=>n.persistent);Sn(()=>{a?.()});const _=M(()=>w(y)?!0:w(c)),C=M(()=>n.disabled?!1:w(c)),S=M(()=>n.appendTo||i.value),k=M(()=>{var O;return(O=n.style)!=null?O:{}}),T=H(!0),E=()=>{g(),R()&&Zb(document.body,{preventScroll:!0}),T.value=!0},x=()=>{if(w(l))return!0},P=ji(x,()=>{n.enterable&&f2(w(d),"hover")&&h()}),A=ji(x,()=>{f2(w(d),"hover")&&f()}),I=()=>{var O,N;(N=(O=o.value)==null?void 0:O.updatePopper)==null||N.call(O),v?.()},D=()=>{p?.()},q=()=>{m()},z=()=>{n.virtualTriggering||f()},R=O=>{var N;const F=(N=o.value)==null?void 0:N.popperContentRef,j=O?.relatedTarget||document.activeElement;return F?.contains(j)};return Se(()=>w(c),O=>{O?(T.value=!1,a=QH(s,()=>{if(w(l))return;Br(w(d)).every(F=>F!=="hover"&&F!=="focus")&&f()},{detectIframe:!0})):a?.()},{flush:"post"}),Se(()=>n.content,()=>{var O,N;(N=(O=o.value)==null?void 0:O.updatePopper)==null||N.call(O)}),e({contentRef:o,isFocusInsideContent:R}),(O,N)=>(B(),_e(w(rR),{disabled:!t.teleported,to:S.value},{default:ce(()=>[_.value||!T.value?(B(),_e(ya,{key:0,name:b.value,appear:!y.value,onAfterLeave:E,onBeforeEnter:I,onAfterEnter:q,onBeforeLeave:D,persisted:""},{default:ce(()=>[Vt(L(w(Ame),Lt({id:w(u),ref_key:"contentRef",ref:o},O.$attrs,{"aria-label":t.ariaLabel,"aria-hidden":T.value,"boundaries-padding":t.boundariesPadding,"fallback-placements":t.fallbackPlacements,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,strategy:t.strategy,effect:t.effect,enterable:t.enterable,pure:t.pure,"popper-class":t.popperClass,"popper-style":[t.popperStyle,k.value],"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,visible:C.value,"z-index":t.zIndex,loop:t.loop,onMouseenter:w(P),onMouseleave:w(A),onBlur:z,onClose:w(f)}),{default:ce(()=>[we(O.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[On,C.value]])]),_:3},8,["name","appear"])):ve("v-if",!0)]),_:3},8,["disabled","to"]))}});const Lme=["innerHTML"],Dme={key:1};var Nme=le({name:"ElTooltip",__name:"tooltip",props:Zhe,emits:Qhe,setup(t,{expose:e,emit:n}){const i=t,r=n;Mme();const o=De("tooltip"),s=as(),a=H(),l=H(),u=()=>{var _;const C=w(a);C&&((_=C.popperInstanceRef)==null||_.update())},c=H(!1),d=H(),{show:f,hide:h,hasUpdateHandler:m}=Jhe({indicator:c,toggleReason:d}),{onOpen:g,onClose:v}=bhe({showAfter:An(i,"showAfter"),hideAfter:An(i,"hideAfter"),autoClose:An(i,"autoClose"),open:f,close:h}),p=M(()=>vi(i.visible)&&!m.value),b=M(()=>[o.b(),i.popperClass]);qt(SR,{controlled:p,id:s,open:gf(c),trigger:An(i,"trigger"),onOpen:g,onClose:v,onToggle:_=>{w(c)?v(_):g(_)},onShow:()=>{r("show",d.value)},onHide:()=>{r("hide",d.value)},onBeforeShow:()=>{r("before-show",d.value)},onBeforeHide:()=>{r("before-hide",d.value)},updatePopper:u}),Se(()=>i.disabled,_=>{_&&c.value&&(c.value=!1)});const y=_=>{var C;return(C=l.value)==null?void 0:C.isFocusInsideContent(_)};return mz(()=>c.value&&h()),Sn(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:y,updatePopper:u,onOpen:g,onClose:v,hide:h}),(_,C)=>(B(),_e(w(Pme),{ref_key:"popperRef",ref:a,role:t.role},{default:ce(()=>[L(Ime,{disabled:t.disabled,trigger:t.trigger,"trigger-keys":t.triggerKeys,"virtual-ref":t.virtualRef,"virtual-triggering":t.virtualTriggering,"focus-on-target":t.focusOnTarget},{default:ce(()=>[_.$slots.default?we(_.$slots,"default",{key:0}):ve("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),L(Ome,{ref_key:"contentRef",ref:l,"aria-label":t.ariaLabel,"boundaries-padding":t.boundariesPadding,content:t.content,disabled:t.disabled,effect:t.effect,enterable:t.enterable,"fallback-placements":t.fallbackPlacements,"hide-after":t.hideAfter,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,persistent:t.persistent,"popper-class":b.value,"popper-style":t.popperStyle,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,pure:t.pure,"raw-content":t.rawContent,"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,"show-after":t.showAfter,strategy:t.strategy,teleported:t.teleported,transition:t.transition,"virtual-triggering":t.virtualTriggering,"z-index":t.zIndex,"append-to":t.appendTo,loop:t.loop},{default:ce(()=>[we(_.$slots,"content",{},()=>[t.rawContent?(B(),Q("span",{key:0,innerHTML:t.content},null,8,Lme)):(B(),Q("span",Dme,We(t.content),1))]),t.showArrow?(B(),_e(w(tme),{key:0})):ve("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}});const Lo=sn(Nme),Bme=qe({size:{type:[Number,String],values:yl,validator:t=>St(t)},shape:{type:String,values:["circle","square"]},icon:{type:ri},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:me(String),default:"cover"}}),Vme={error:t=>t instanceof Event},KU=Symbol("avatarGroupContextKey"),Fme=["src","alt","srcset"];var GU=le({name:"ElAvatar",__name:"avatar",props:Bme,emits:Vme,setup(t,{emit:e}){const n=t,i=e,r=Ne(KU,void 0),o=De("avatar"),s=H(!1),a=M(()=>{var h;return(h=n.size)!=null?h:r?.size}),l=M(()=>{var h,m;return(m=(h=n.shape)!=null?h:r?.shape)!=null?m:"circle"}),u=M(()=>{const{icon:h}=n,m=[o.b()];return ot(a.value)&&m.push(o.m(a.value)),h&&m.push(o.m("icon")),l.value&&m.push(o.m(l.value)),m}),c=M(()=>St(a.value)?o.cssVarBlock({size:zr(a.value)}):void 0),d=M(()=>({objectFit:n.fit}));Se(()=>[n.src,n.srcSet],()=>s.value=!1);function f(h){s.value=!0,i("error",h)}return(h,m)=>(B(),Q("span",{class:$(u.value),style:mt(c.value)},[(t.src||t.srcSet)&&!s.value?(B(),Q("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:mt(d.value),onError:f},null,44,Fme)):t.icon?(B(),_e(w(He),{key:1},{default:ce(()=>[(B(),_e(Gt(t.icon)))]),_:1})):we(h.$slots,"default",{key:2})],6))}});const $me={size:{type:me([Number,String]),values:yl,validator:t=>St(t)},shape:{type:me(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:me(String),default:"light"},placement:{type:me(String),values:xu,default:"top"},popperClass:Mn.popperClass,popperStyle:Mn.popperStyle,collapseClass:String,collapseStyle:{type:me([String,Array,Object])}};var YU=le({name:"ElAvatarGroup",props:$me,setup(t,{slots:e}){const n=De("avatar-group");return qt(KU,on({size:An(t,"size"),shape:An(t,"shape")})),()=>{var i,r;const o=cc((r=(i=e.default)==null?void 0:i.call(e))!=null?r:[]);let s=o;if(t.collapseAvatars&&o.length>t.maxCollapseAvatars){s=o.slice(0,t.maxCollapseAvatars);const l=o.slice(t.maxCollapseAvatars);s.push(L(Lo,{popperClass:t.popperClass,popperStyle:t.popperStyle,placement:t.placement,effect:t.effect,disabled:!t.collapseAvatarsTooltip},{default:()=>L(GU,{size:t.size,shape:t.shape,class:t.collapseClass,style:t.collapseStyle},{default:()=>[dt("+ "),l.length]}),content:()=>L("div",{class:n.e("collapse-avatars")},[l.map((u,c)=>{var d;return yi(u)?al(u,{key:(d=u.key)!=null?d:c}):u})])}))}return L("div",{class:n.b()},[s])}}});const zme=sn(GU,{AvatarGroup:YU});Zi(YU);const Hme=["default","primary","success","warning","info","danger","text",""],Ume=["button","submit","reset"],h2=qe({size:$r,disabled:{type:Boolean,default:void 0},type:{type:String,values:Hme,default:""},icon:{type:ri},nativeType:{type:String,values:Ume,default:"button"},loading:Boolean,loadingIcon:{type:ri,default:()=>xc},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:me([String,Object]),default:"button"}}),Wme={click:t=>t instanceof MouseEvent},XU=Symbol("buttonGroupContextKey"),of=({from:t,replacement:e,scope:n,version:i,ref:r,type:o="API"},s)=>{Se(()=>w(s),a=>{},{immediate:!0})},qme=(t,e)=>{of({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},M(()=>t.type==="text"));const n=Ne(XU,void 0),i=Yb("button"),{form:r}=lo(),o=fr(M(()=>n?.size)),s=Oi(),a=H(),l=$o(),u=M(()=>{var p;return t.type||n?.type||((p=i.value)==null?void 0:p.type)||""}),c=M(()=>{var p,b,y;return(y=(b=t.autoInsertSpace)!=null?b:(p=i.value)==null?void 0:p.autoInsertSpace)!=null?y:!1}),d=M(()=>{var p,b,y;return(y=(b=t.plain)!=null?b:(p=i.value)==null?void 0:p.plain)!=null?y:!1}),f=M(()=>{var p,b,y;return(y=(b=t.round)!=null?b:(p=i.value)==null?void 0:p.round)!=null?y:!1}),h=M(()=>{var p,b,y;return(y=(b=t.text)!=null?b:(p=i.value)==null?void 0:p.text)!=null?y:!1}),m=M(()=>t.tag==="button"?{ariaDisabled:s.value||t.loading,disabled:s.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),g=M(()=>{var p;const b=(p=l.default)==null?void 0:p.call(l);if(c.value&&b?.length===1){const y=b[0];if(y?.type===Mf){const _=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:s,_size:o,_type:u,_ref:a,_props:m,_plain:d,_round:f,_text:h,shouldAddSpace:g,handleClick:p=>{if(s.value||t.loading){p.stopPropagation();return}t.nativeType==="reset"&&r?.resetFields(),e("click",p)}}};function Cr(t,e){jme(t)&&(t="100%");var n=Kme(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function F0(t){return Math.min(1,Math.max(0,t))}function jme(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Kme(t){return typeof t=="string"&&t.indexOf("%")!==-1}function JU(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function $0(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ud(t){return t.length===1?"0"+t:String(t)}function Gme(t,e,n){return{r:Cr(t,255)*255,g:Cr(e,255)*255,b:Cr(n,255)*255}}function jD(t,e,n){t=Cr(t,255),e=Cr(e,255),n=Cr(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o=0,s=0,a=(i+r)/2;if(i===r)s=0,o=0;else{var l=i-r;switch(s=a>.5?l/(2-i-r):l/(i+r),i){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s,l:a}}function _k(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Yme(t,e,n){var i,r,o;if(t=Cr(t,360),e=Cr(e,100),n=Cr(n,100),e===0)r=n,o=n,i=n;else{var s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=_k(a,s,t+1/3),r=_k(a,s,t),o=_k(a,s,t-1/3)}return{r:i*255,g:r*255,b:o*255}}function KD(t,e,n){t=Cr(t,255),e=Cr(e,255),n=Cr(n,255);var i=Math.max(t,e,n),r=Math.min(t,e,n),o=0,s=i,a=i-r,l=i===0?0:a/i;if(i===r)o=0;else{switch(i){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4;break}o/=6}return{h:o,s:l,v:s}}function Xme(t,e,n){t=Cr(t,360)*6,e=Cr(e,100),n=Cr(n,100);var i=Math.floor(t),r=t-i,o=n*(1-e),s=n*(1-r*e),a=n*(1-(1-r)*e),l=i%6,u=[n,s,o,o,a,n][l],c=[a,n,n,s,o,o][l],d=[o,o,a,n,n,s][l];return{r:u*255,g:c*255,b:d*255}}function GD(t,e,n,i){var r=[Ud(Math.round(t).toString(16)),Ud(Math.round(e).toString(16)),Ud(Math.round(n).toString(16))];return i&&r[0].startsWith(r[0].charAt(1))&&r[1].startsWith(r[1].charAt(1))&&r[2].startsWith(r[2].charAt(1))?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function Jme(t,e,n,i,r){var o=[Ud(Math.round(t).toString(16)),Ud(Math.round(e).toString(16)),Ud(Math.round(n).toString(16)),Ud(Zme(i))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Zme(t){return Math.round(parseFloat(t)*255).toString(16)}function YD(t){return qo(t)/255}function qo(t){return parseInt(t,16)}function Qme(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var m2={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",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:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ege(t){var e={r:0,g:0,b:0},n=1,i=null,r=null,o=null,s=!1,a=!1;return typeof t=="string"&&(t=ige(t)),typeof t=="object"&&(Al(t.r)&&Al(t.g)&&Al(t.b)?(e=Gme(t.r,t.g,t.b),s=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Al(t.h)&&Al(t.s)&&Al(t.v)?(i=$0(t.s),r=$0(t.v),e=Xme(t.h,i,r),s=!0,a="hsv"):Al(t.h)&&Al(t.s)&&Al(t.l)&&(i=$0(t.s),o=$0(t.l),e=Yme(t.h,i,o),s=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=JU(n),{ok:s,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var tge="[-\\+]?\\d+%?",nge="[-\\+]?\\d*\\.\\d+%?",dc="(?:".concat(nge,")|(?:").concat(tge,")"),Ck="[\\s|\\(]+(".concat(dc,")[,|\\s]+(").concat(dc,")[,|\\s]+(").concat(dc,")\\s*\\)?"),Sk="[\\s|\\(]+(".concat(dc,")[,|\\s]+(").concat(dc,")[,|\\s]+(").concat(dc,")[,|\\s]+(").concat(dc,")\\s*\\)?"),Ws={CSS_UNIT:new RegExp(dc),rgb:new RegExp("rgb"+Ck),rgba:new RegExp("rgba"+Sk),hsl:new RegExp("hsl"+Ck),hsla:new RegExp("hsla"+Sk),hsv:new RegExp("hsv"+Ck),hsva:new RegExp("hsva"+Sk),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 ige(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(m2[t])t=m2[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Ws.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Ws.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Ws.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Ws.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Ws.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Ws.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Ws.hex8.exec(t),n?{r:qo(n[1]),g:qo(n[2]),b:qo(n[3]),a:YD(n[4]),format:e?"name":"hex8"}:(n=Ws.hex6.exec(t),n?{r:qo(n[1]),g:qo(n[2]),b:qo(n[3]),format:e?"name":"hex"}:(n=Ws.hex4.exec(t),n?{r:qo(n[1]+n[1]),g:qo(n[2]+n[2]),b:qo(n[3]+n[3]),a:YD(n[4]+n[4]),format:e?"name":"hex8"}:(n=Ws.hex3.exec(t),n?{r:qo(n[1]+n[1]),g:qo(n[2]+n[2]),b:qo(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function Al(t){return!!Ws.CSS_UNIT.exec(String(t))}var Uh=(function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var i;if(e instanceof t)return e;typeof e=="number"&&(e=Qme(e)),this.originalInput=e;var r=ege(e);this.originalInput=e,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=n.format)!==null&&i!==void 0?i:r.format,this.gradientType=n.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.isValid=r.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,i,r,o=e.r/255,s=e.g/255,a=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*r},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=JU(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=KD(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=KD(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(i,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=jD(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=jD(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),r=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(i,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),GD(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),Jme(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(i,")"):"rgba(".concat(e,", ").concat(n,", ").concat(i,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Cr(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Cr(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+GD(this.r,this.g,this.b,!1),n=0,i=Object.entries(m2);n<i.length;n++){var r=i[n],o=r[0],s=r[1];if(e===s)return o}return!1},t.prototype.toString=function(e){var n=!!e;e=e??this.format;var i=!1,r=this.a<1&&this.a>=0,o=!n&&r&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=F0(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=F0(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=F0(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=F0(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var i=this.toRgb(),r=new t(e).toRgb(),o=n/100,s={r:(r.r-i.r)*o+i.r,g:(r.g-i.g)*o+i.g,b:(r.b-i.b)*o+i.b,a:(r.a-i.a)*o+i.a};return new t(s)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var i=this.toHsl(),r=360/n,o=[this];for(i.h=(i.h-(r*e>>1)+720)%360;--e;)i.h=(i.h+r)%360,o.push(new t(i));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),i=n.h,r=n.s,o=n.v,s=[],a=1/e;e--;)s.push(new t({h:i,s:r,v:o})),o=(o+a)%1;return s},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),i=new t(e).toRgb(),r=n.a+i.a*(1-n.a);return new t({r:(n.r*n.a+i.r*i.a*(1-n.a))/r,g:(n.g*n.a+i.g*i.a*(1-n.a))/r,b:(n.b*n.a+i.b*i.a*(1-n.a))/r,a:r})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),i=n.h,r=[this],o=360/e,s=1;s<e;s++)r.push(new t({h:(i+s*o)%360,s:n.s,l:n.l}));return r},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t})();function Mu(t,e=20){return t.mix("#141414",e).toString()}function rge(t){const e=Oi(),n=De("button");return M(()=>{let i={},r=t.color;if(r){const o=r.match(/var\((.*?)\)/);o&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const s=new Uh(r),a=t.dark?s.tint(20).toString():Mu(s,20);if(t.plain)i=n.cssVarBlock({"bg-color":t.dark?Mu(s,90):s.tint(90).toString(),"text-color":r,"border-color":t.dark?Mu(s,50):s.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(i[n.cssVarBlockName("disabled-bg-color")]=t.dark?Mu(s,90):s.tint(90).toString(),i[n.cssVarBlockName("disabled-text-color")]=t.dark?Mu(s,50):s.tint(50).toString(),i[n.cssVarBlockName("disabled-border-color")]=t.dark?Mu(s,80):s.tint(80).toString());else{const l=t.dark?Mu(s,30):s.tint(30).toString(),u=s.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(i=n.cssVarBlock({"bg-color":r,"text-color":u,"border-color":r,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),e.value){const c=t.dark?Mu(s,50):s.tint(50).toString();i[n.cssVarBlockName("disabled-bg-color")]=c,i[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,i[n.cssVarBlockName("disabled-border-color")]=c}}}return i})}var oge=le({name:"ElButton",__name:"button",props:h2,emits:Wme,setup(t,{expose:e,emit:n}){const i=t,r=n,o=rge(i),s=De("button"),{_ref:a,_size:l,_type:u,_disabled:c,_props:d,_plain:f,_round:h,_text:m,shouldAddSpace:g,handleClick:v}=qme(i,r),p=M(()=>[s.b(),s.m(u.value),s.m(l.value),s.is("disabled",c.value),s.is("loading",i.loading),s.is("plain",f.value),s.is("round",h.value),s.is("circle",i.circle),s.is("text",m.value),s.is("link",i.link),s.is("has-bg",i.bg)]);return e({ref:a,size:l,type:u,disabled:c,shouldAddSpace:g}),(b,y)=>(B(),_e(Gt(t.tag),Lt({ref_key:"_ref",ref:a},w(d),{class:p.value,style:w(o),onClick:w(v)}),{default:ce(()=>[t.loading?(B(),Q(rt,{key:0},[b.$slots.loading?we(b.$slots,"loading",{key:0}):(B(),_e(w(He),{key:1,class:$(w(s).is("loading"))},{default:ce(()=>[(B(),_e(Gt(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||b.$slots.icon?(B(),_e(w(He),{key:1},{default:ce(()=>[t.icon?(B(),_e(Gt(t.icon),{key:0})):we(b.$slots,"icon",{key:1})]),_:3})):ve("v-if",!0),b.$slots.default?(B(),Q("span",{key:2,class:$({[w(s).em("text","expand")]:w(g)})},[we(b.$slots,"default")],2)):ve("v-if",!0)]),_:3},16,["class","style","onClick"]))}});const sge={size:h2.size,type:h2.type,direction:{type:me(String),values:["horizontal","vertical"],default:"horizontal"}};var ZU=le({name:"ElButtonGroup",__name:"button-group",props:sge,setup(t){const e=t;qt(XU,on({size:An(e,"size"),type:An(e,"type")}));const n=De("button");return(i,r)=>(B(),Q("div",{class:$([w(n).b("group"),w(n).bm("group",e.direction)])},[we(i.$slots,"default")],2))}});const Hi=sn(oge,{ButtonGroup:ZU});Zi(ZU);function wl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ew={exports:{}},age=Ew.exports,XD;function lge(){return XD||(XD=1,(function(t,e){(function(n,i){t.exports=i()})(age,(function(){var n=1e3,i=6e4,r=36e5,o="millisecond",s="second",a="minute",l="hour",u="day",c="week",d="month",f="quarter",h="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(D){var q=["th","st","nd","rd"],z=D%100;return"["+D+(q[(z-20)%10]||q[z]||q[0])+"]"}},y=function(D,q,z){var R=String(D);return!R||R.length>=q?D:""+Array(q+1-R.length).join(z)+D},_={s:y,z:function(D){var q=-D.utcOffset(),z=Math.abs(q),R=Math.floor(z/60),O=z%60;return(q<=0?"+":"-")+y(R,2,"0")+":"+y(O,2,"0")},m:function D(q,z){if(q.date()<z.date())return-D(z,q);var R=12*(z.year()-q.year())+(z.month()-q.month()),O=q.clone().add(R,d),N=z-O<0,F=q.clone().add(R+(N?-1:1),d);return+(-(R+(z-O)/(N?O-F:F-O))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:d,y:h,w:c,d:u,D:m,h:l,m:a,s,ms:o,Q:f}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},C="en",S={};S[C]=b;var k="$isDayjsObject",T=function(D){return D instanceof A||!(!D||!D[k])},E=function D(q,z,R){var O;if(!q)return C;if(typeof q=="string"){var N=q.toLowerCase();S[N]&&(O=N),z&&(S[N]=z,O=N);var F=q.split("-");if(!O&&F.length>1)return D(F[0])}else{var j=q.name;S[j]=q,O=j}return!R&&O&&(C=O),O||!R&&C},x=function(D,q){if(T(D))return D.clone();var z=typeof q=="object"?q:{};return z.date=D,z.args=arguments,new A(z)},P=_;P.l=E,P.i=T,P.w=function(D,q){return x(D,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var A=(function(){function D(z){this.$L=E(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[k]=!0}var q=D.prototype;return q.parse=function(z){this.$d=(function(R){var O=R.date,N=R.utc;if(O===null)return new Date(NaN);if(P.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var F=O.match(v);if(F){var j=F[2]-1||0,U=(F[7]||"0").substring(0,3);return N?new Date(Date.UTC(F[1],j,F[3]||1,F[4]||0,F[5]||0,F[6]||0,U)):new Date(F[1],j,F[3]||1,F[4]||0,F[5]||0,F[6]||0,U)}}return new Date(O)})(z),this.init()},q.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},q.$utils=function(){return P},q.isValid=function(){return this.$d.toString()!==g},q.isSame=function(z,R){var O=x(z);return this.startOf(R)<=O&&O<=this.endOf(R)},q.isAfter=function(z,R){return x(z)<this.startOf(R)},q.isBefore=function(z,R){return this.endOf(R)<x(z)},q.$g=function(z,R,O){return P.u(z)?this[R]:this.set(O,z)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(z,R){var O=this,N=!!P.u(R)||R,F=P.p(z),j=function(re,ee){var te=P.w(O.$u?Date.UTC(O.$y,ee,re):new Date(O.$y,ee,re),O);return N?te:te.endOf(u)},U=function(re,ee){return P.w(O.toDate()[re].apply(O.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ee)),O)},W=this.$W,J=this.$M,ne=this.$D,he="set"+(this.$u?"UTC":"");switch(F){case h:return N?j(1,0):j(31,11);case d:return N?j(1,J):j(0,J+1);case c:var X=this.$locale().weekStart||0,se=(W<X?W+7:W)-X;return j(N?ne-se:ne+(6-se),J);case u:case m:return U(he+"Hours",0);case l:return U(he+"Minutes",1);case a:return U(he+"Seconds",2);case s:return U(he+"Milliseconds",3);default:return this.clone()}},q.endOf=function(z){return this.startOf(z,!1)},q.$set=function(z,R){var O,N=P.p(z),F="set"+(this.$u?"UTC":""),j=(O={},O[u]=F+"Date",O[m]=F+"Date",O[d]=F+"Month",O[h]=F+"FullYear",O[l]=F+"Hours",O[a]=F+"Minutes",O[s]=F+"Seconds",O[o]=F+"Milliseconds",O)[N],U=N===u?this.$D+(R-this.$W):R;if(N===d||N===h){var W=this.clone().set(m,1);W.$d[j](U),W.init(),this.$d=W.set(m,Math.min(this.$D,W.daysInMonth())).$d}else j&&this.$d[j](U);return this.init(),this},q.set=function(z,R){return this.clone().$set(z,R)},q.get=function(z){return this[P.p(z)]()},q.add=function(z,R){var O,N=this;z=Number(z);var F=P.p(R),j=function(J){var ne=x(N);return P.w(ne.date(ne.date()+Math.round(J*z)),N)};if(F===d)return this.set(d,this.$M+z);if(F===h)return this.set(h,this.$y+z);if(F===u)return j(1);if(F===c)return j(7);var U=(O={},O[a]=i,O[l]=r,O[s]=n,O)[F]||1,W=this.$d.getTime()+z*U;return P.w(W,this)},q.subtract=function(z,R){return this.add(-1*z,R)},q.format=function(z){var R=this,O=this.$locale();if(!this.isValid())return O.invalidDate||g;var N=z||"YYYY-MM-DDTHH:mm:ssZ",F=P.z(this),j=this.$H,U=this.$m,W=this.$M,J=O.weekdays,ne=O.months,he=O.meridiem,X=function(ee,te,V,K){return ee&&(ee[te]||ee(R,N))||V[te].slice(0,K)},se=function(ee){return P.s(j%12||12,ee,"0")},re=he||function(ee,te,V){var K=ee<12?"AM":"PM";return V?K.toLowerCase():K};return N.replace(p,(function(ee,te){return te||(function(V){switch(V){case"YY":return String(R.$y).slice(-2);case"YYYY":return P.s(R.$y,4,"0");case"M":return W+1;case"MM":return P.s(W+1,2,"0");case"MMM":return X(O.monthsShort,W,ne,3);case"MMMM":return X(ne,W);case"D":return R.$D;case"DD":return P.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return X(O.weekdaysMin,R.$W,J,2);case"ddd":return X(O.weekdaysShort,R.$W,J,3);case"dddd":return J[R.$W];case"H":return String(j);case"HH":return P.s(j,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return re(j,U,!0);case"A":return re(j,U,!1);case"m":return String(U);case"mm":return P.s(U,2,"0");case"s":return String(R.$s);case"ss":return P.s(R.$s,2,"0");case"SSS":return P.s(R.$ms,3,"0");case"Z":return F}return null})(ee)||F.replace(":","")}))},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(z,R,O){var N,F=this,j=P.p(R),U=x(z),W=(U.utcOffset()-this.utcOffset())*i,J=this-U,ne=function(){return P.m(F,U)};switch(j){case h:N=ne()/12;break;case d:N=ne();break;case f:N=ne()/3;break;case c:N=(J-W)/6048e5;break;case u:N=(J-W)/864e5;break;case l:N=J/r;break;case a:N=J/i;break;case s:N=J/n;break;default:N=J}return O?N:P.a(N)},q.daysInMonth=function(){return this.endOf(d).$D},q.$locale=function(){return S[this.$L]},q.locale=function(z,R){if(!z)return this.$L;var O=this.clone(),N=E(z,R,!0);return N&&(O.$L=N),O},q.clone=function(){return P.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},D})(),I=A.prototype;return x.prototype=I,[["$ms",o],["$s",s],["$m",a],["$H",l],["$W",u],["$M",d],["$y",h],["$D",m]].forEach((function(D){I[D[1]]=function(q){return this.$g(q,D[0],D[1])}})),x.extend=function(D,q){return D.$i||(D(q,A,x),D.$i=!0),x},x.locale=E,x.isDayjs=T,x.unix=function(D){return x(1e3*D)},x.en=S[C],x.Ls=S,x.p={},x}))})(Ew)),Ew.exports}var uge=lge();const ft=wl(uge),kk=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],QU=t=>Array.from(Array.from({length:t}).keys()),eW=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),tW=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),JD=function(t,e){const n=__(t),i=__(e);return n&&i?t.getTime()===e.getTime():!n&&!i?t===e:!1},nW=function(t,e){const n=Pe(t),i=Pe(e);return n&&i?t.length!==e.length?!1:t.every((r,o)=>JD(r,e[o])):!n&&!i?JD(t,e):!1},ZD=function(t,e,n){const i=xm(e)||e==="x"?ft(t).locale(n):ft(t,e).locale(n);return i.isValid()?i:void 0},QD=function(t,e,n){return xm(e)?t:e==="x"?+t:ft(t).locale(n).format(e)},Tk=(t,e)=>{var n;const i=[],r=e?.();for(let o=0;o<t;o++)i.push((n=r?.includes(o))!=null?n:!1);return i},xw=t=>Pe(t)?t.map(e=>e.toDate()):t.toDate();var Aw={exports:{}},cge=Aw.exports,eN;function dge(){return eN||(eN=1,(function(t,e){(function(n,i){t.exports=i()})(cge,(function(){return function(n,i,r){var o=i.prototype,s=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,f,h,m,g){var v=d.name?d:d.$locale(),p=s(v[f]),b=s(v[h]),y=p||b.map((function(C){return C.slice(0,m)}));if(!g)return y;var _=v.weekStart;return y.map((function(C,S){return y[(S+(_||0))%7]}))},l=function(){return r.Ls[r.locale()]},u=function(d,f){return d.formats[f]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,g,v){return g||v.slice(1)}))})(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):a(d,"months")},monthsShort:function(f){return f?f.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):a(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return u(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return c.bind(this)()},r.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return r.weekdays()},weekdaysShort:function(){return r.weekdaysShort()},weekdaysMin:function(){return r.weekdaysMin()},months:function(){return r.months()},monthsShort:function(){return r.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},r.months=function(){return a(l(),"months")},r.monthsShort=function(){return a(l(),"monthsShort","months",3)},r.weekdays=function(d){return a(l(),"weekdays",null,null,d)},r.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},r.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}}))})(Aw)),Aw.exports}var fge=dge();const hge=wl(fge),mge=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Fv=qe({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:yl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),gge={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},pge=["aria-label"],vge=["aria-label"];var bge=le({name:"ElTag",__name:"tag",props:Fv,emits:gge,setup(t,{emit:e}){const n=t,i=e,r=fr(),{t:o}=Qt(),s=De("tag"),a=M(()=>{const{type:d,hit:f,effect:h,closable:m,round:g}=n;return[s.b(),s.is("closable",m),s.m(d||"primary"),s.m(r.value),s.m(h),s.is("hit",f),s.is("round",g)]}),l=d=>{i("close",d)},u=d=>{i("click",d)},c=d=>{var f,h,m;(m=(h=(f=d?.component)==null?void 0:f.subTree)==null?void 0:h.component)!=null&&m.bum&&(d.component.subTree.component.bum=null)};return(d,f)=>t.disableTransitions?(B(),Q("span",{key:0,class:$(a.value),style:mt({backgroundColor:t.color}),onClick:u},[ie("span",{class:$(w(s).e("content"))},[we(d.$slots,"default")],2),t.closable?(B(),Q("button",{key:0,"aria-label":w(o)("el.tag.close"),class:$(w(s).e("close")),type:"button",onClick:Ot(l,["stop"])},[L(w(He),null,{default:ce(()=>[L(w(cl))]),_:1})],10,pge)):ve("v-if",!0)],6)):(B(),_e(ya,{key:1,name:`${w(s).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:c},{default:ce(()=>[ie("span",{class:$(a.value),style:mt({backgroundColor:t.color}),onClick:u},[ie("span",{class:$(w(s).e("content"))},[we(d.$slots,"default")],2),t.closable?(B(),Q("button",{key:0,"aria-label":w(o)("el.tag.close"),class:$(w(s).e("close")),type:"button",onClick:Ot(l,["stop"])},[L(w(He),null,{default:ce(()=>[L(w(cl))]),_:1})],10,vge)):ve("v-if",!0)],6)]),_:3},8,["name"]))}});const jp=sn(bge),g2={label:"label",value:"value",disabled:"disabled",options:"options"};function yge(t){const e=H({...g2,...t.props});let n={...t.props};return Se(()=>t.props,a=>{$i(a,n)||(e.value={...g2,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>to(a,e.value.label),getValue:a=>to(a,e.value.value),getDisabled:a=>to(a,e.value.disabled),getOptions:a=>to(a,e.value.options)}}const iW=Symbol("ElSelectGroup"),FC=Symbol("ElSelect"),p2="ElOption",wge=qe({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean}),_ge=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),ac=t=>$b(t);function Cge(t,e){const n=Ne(FC);n||dr(p2,"usage: <el-select><el-option /></el-select/>");const i=Ne(iW,{disabled:!1}),r=M(()=>c(Co(n.props.modelValue),t.value)),o=M(()=>{var h;if(n.props.multiple){const m=Co((h=n.props.modelValue)!=null?h:[]);return!r.value&&m.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),s=M(()=>{var h;return(h=t.label)!=null?h:_t(t.value)?"":t.value}),a=M(()=>t.value||t.label||""),l=M(()=>t.disabled||e.groupDisabled||o.value),u=Ct(),c=(h=[],m)=>{if(_t(t.value)){const g=n.props.valueKey;return h&&h.some(v=>ln(to(v,g))===to(m,g))}else return h&&h.includes(m)},d=()=>{l.value||(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=h=>{const m=new RegExp(_ge(h),"i");e.visible=m.test(String(s.value))||t.created};return Se(()=>s.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Se(()=>t.value,(h,m)=>{const{remote:g,valueKey:v}=n.props;if((g?h!==m:!$i(h,m))&&(n.onOptionDestroy(m,u.proxy),n.onOptionCreate(u.proxy)),!t.created&&!g){if(v&&_t(h)&&_t(m)&&h[v]===m[v])return;n.setSelected()}}),Se(()=>i.disabled,()=>{e.groupDisabled=i.disabled},{immediate:!0}),{select:n,currentLabel:s,currentValue:a,itemSelected:r,isDisabled:l,hoverItem:d,updateOption:f}}var Sge=le({name:p2,componentName:p2,props:wge,setup(t){const e=De("select"),n=as(),i=M(()=>[e.be("dropdown","item"),e.is("disabled",w(a)),e.is("selected",w(s)),e.is("hovering",w(f))]),r=on({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:s,isDisabled:a,select:l,hoverItem:u,updateOption:c}=Cge(t,r),{visible:d,hover:f}=Sr(r),h=Ct().proxy;l.onOptionCreate(h),Sn(()=>{const g=h.value;Ye(()=>{const{selected:v}=l.states,p=v.some(b=>b.value===h.value);l.states.cachedOptions.get(g)===h&&!p&&l.states.cachedOptions.delete(g)}),l.onOptionDestroy(g,h)});function m(){a.value||l.handleOptionSelect(h)}return{ns:e,id:n,containerKls:i,currentLabel:o,itemSelected:s,isDisabled:a,select:l,visible:d,hover:f,states:r,hoverItem:u,updateOption:c,selectOptionClick:m}}});const kge=["id","aria-disabled","aria-selected"];function Tge(t,e,n,i,r,o){return Vt((B(),Q("li",{id:t.id,class:$(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:e[0]||(e[0]=(...s)=>t.hoverItem&&t.hoverItem(...s)),onClick:e[1]||(e[1]=Ot((...s)=>t.selectOptionClick&&t.selectOptionClick(...s),["stop"]))},[we(t.$slots,"default",{},()=>[ie("span",null,We(t.currentLabel),1)])],42,kge)),[[On,t.visible]])}var kR=Tr(Sge,[["render",Tge]]);const rW=11,Ege=2;var xge=le({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=Ne(FC),e=De("select"),n=M(()=>t.props.popperClass),i=M(()=>t.props.multiple),r=M(()=>t.props.fitInputWidth),o=H("");function s(){var a;const l=(a=t.selectRef)==null?void 0:a.offsetWidth;l?o.value=`${l-Ege}px`:o.value=""}return Pt(()=>{s(),nr(t.selectRef,s)}),{ns:e,minWidth:o,popperClass:n,isMultiple:i,isFitInputWidth:r}}});function Age(t,e,n,i,r,o){return B(),Q("div",{class:$([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:mt({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(B(),Q("div",{key:0,class:$(t.ns.be("dropdown","header"))},[we(t.$slots,"header")],2)):ve("v-if",!0),we(t.$slots,"default"),t.$slots.footer?(B(),Q("div",{key:1,class:$(t.ns.be("dropdown","footer"))},[we(t.$slots,"footer")],2)):ve("v-if",!0)],6)}var Pge=Tr(xge,[["render",Age]]);const Ige=(t,e)=>{const{t:n}=Qt(),i=$o(),r=as(),o=De("select"),s=De("input"),a=on({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=H(),u=H(),c=H(),d=H(),f=H(),h=H(),m=H(),g=H(),v=H(),p=H(),b=H(),y=H(!1),_=H(),C=H(!1),{form:S,formItem:k}=lo(),{inputId:T}=Au(t,{formItemContext:k}),{valueOnClear:E,isEmptyValue:x}=OC(t),{isComposing:P,handleCompositionStart:A,handleCompositionUpdate:I,handleCompositionEnd:D}=bR({afterComposition:ke=>Dt(ke)}),q=Oi(),{wrapperRef:z,isFocused:R,handleBlur:O}=dg(f,{disabled:q,afterFocus(){t.automaticDropdown&&!y.value&&(y.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(ke){var Ze,xt;return((Ze=c.value)==null?void 0:Ze.isFocusInsideContent(ke))||((xt=d.value)==null?void 0:xt.isFocusInsideContent(ke))},afterBlur(){var ke;y.value=!1,a.menuVisibleOnFocus=!1,t.validateEvent&&((ke=k?.validate)==null||ke.call(k,"blur").catch(Ze=>void 0))}}),N=M(()=>Pe(t.modelValue)?t.modelValue.length>0:!x(t.modelValue)),F=M(()=>{var ke;return(ke=S?.statusIcon)!=null?ke:!1}),j=M(()=>t.clearable&&!q.value&&N.value&&(R.value||a.inputHovering)),U=M(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),W=M(()=>o.is("reverse",!!(U.value&&y.value))),J=M(()=>k?.validateState||""),ne=M(()=>J.value&&gU[J.value]),he=M(()=>t.remote?t.debounce:0),X=M(()=>t.remote&&!a.inputValue&&a.options.size===0),se=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&a.inputValue&&a.options.size>0&&re.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),re=M(()=>ee.value.filter(ke=>ke.visible).length),ee=M(()=>{const ke=Array.from(a.options.values()),Ze=[];return a.optionValues.forEach(xt=>{const $n=ke.findIndex(ui=>ui.value===xt);$n>-1&&Ze.push(ke[$n])}),Ze.length>=ke.length?Ze:ke}),te=M(()=>Array.from(a.cachedOptions.values())),V=M(()=>{const ke=ee.value.filter(Ze=>!Ze.created).some(Ze=>Ze.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!ke}),K=()=>{t.filterable&&Xe(t.filterMethod)||t.filterable&&t.remote&&Xe(t.remoteMethod)||ee.value.forEach(ke=>{var Ze;(Ze=ke.updateOption)==null||Ze.call(ke,a.inputValue)})},G=fr(),ye=M(()=>["small"].includes(G.value)?"small":"default"),be=M({get(){return y.value&&(t.loading||!X.value||t.remote&&!!i.empty)&&(!C.value||!xm(a.previousQuery))},set(ke){y.value=ke}}),Ce=M(()=>{if(t.multiple&&!pn(t.modelValue))return Co(t.modelValue).length===0&&!a.inputValue;const ke=Pe(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||pn(ke)?!a.inputValue:!0}),Y=M(()=>{var ke;const Ze=(ke=t.placeholder)!=null?ke:n("el.select.placeholder");return t.multiple||!N.value?Ze:a.selectedLabel}),Z=M(()=>a2?null:"mouseenter");Se(()=>t.modelValue,(ke,Ze)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",ae("")),je(),!$i(ke,Ze)&&t.validateEvent&&k?.validate("change").catch(xt=>void 0)},{flush:"post",deep:!0}),Se(()=>y.value,ke=>{ke?ae(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0,a.menuVisibleOnFocus=!1)}),Se(()=>a.options.entries(),()=>{Zt&&(je(),t.defaultFirstOption&&(t.filterable||t.remote)&&re.value&&pe())},{flush:"post"}),Se([()=>a.hoveringIndex,ee],([ke])=>{St(ke)&&ke>-1?_.value=ee.value[ke]||{}:_.value={},ee.value.forEach(Ze=>{Ze.hover=_.value===Ze})}),sl(()=>{a.isBeforeHide||K()});const ae=ke=>{a.previousQuery===ke||P.value||(a.previousQuery=ke,t.filterable&&Xe(t.filterMethod)?t.filterMethod(ke):t.filterable&&t.remote&&Xe(t.remoteMethod)&&t.remoteMethod(ke),t.defaultFirstOption&&(t.filterable||t.remote)&&re.value?Ye(pe):Ye(fe))},pe=()=>{const ke=ee.value.filter(ui=>ui.visible&&!ui.disabled&&!ui.states.groupDisabled),Ze=ke.find(ui=>ui.created),xt=ke[0],$n=ee.value.map(ui=>ui.value);a.hoveringIndex=Ve($n,Ze||xt)},je=()=>{if(t.multiple)a.selectedLabel="";else{const Ze=Pe(t.modelValue)?t.modelValue[0]:t.modelValue,xt=Ie(Ze);a.selectedLabel=xt.currentLabel,a.selected=[xt];return}const ke=[];pn(t.modelValue)||Co(t.modelValue).forEach(Ze=>{ke.push(Ie(Ze))}),a.selected=ke},Ie=ke=>{let Ze;const xt=Cv(ke);for(let co=a.cachedOptions.size-1;co>=0;co--){const Wo=te.value[co];if(xt?to(Wo.value,t.valueKey)===to(ke,t.valueKey):Wo.value===ke){Ze={index:ee.value.filter(Qc=>!Qc.created).indexOf(Wo),value:ke,currentLabel:Wo.currentLabel,get isDisabled(){return Wo.isDisabled}};break}}if(Ze)return Ze;const $n=xt?ke.label:ke??"";return{index:-1,value:ke,currentLabel:$n}},fe=()=>{const ke=a.selected.length;if(ke>0){const Ze=a.selected[ke-1];a.hoveringIndex=ee.value.findIndex(xt=>jr(Ze)===jr(xt))}else a.hoveringIndex=-1},Te=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(u.value).width)},et=()=>{a.collapseItemWidth=p.value.getBoundingClientRect().width},Re=()=>{var ke,Ze;(Ze=(ke=c.value)==null?void 0:ke.updatePopper)==null||Ze.call(ke)},ze=()=>{var ke,Ze;(Ze=(ke=d.value)==null?void 0:ke.updatePopper)==null||Ze.call(ke)},Ke=()=>{a.inputValue.length>0&&!y.value&&(y.value=!0),ae(a.inputValue)},Dt=ke=>{if(a.inputValue=ke.target.value,t.remote)C.value=!0,Cn();else return Ke()},Cn=eR(()=>{Ke(),C.value=!1},he),Je=ke=>{$i(t.modelValue,ke)||e(En,ke)},kt=ke=>Hue(ke,Ze=>{const xt=a.cachedOptions.get(Ze);return!xt?.disabled&&!xt?.states.groupDisabled}),Et=ke=>{const Ze=Bn(ke);if(t.multiple&&Ze!==Me.delete&&ke.target.value.length<=0){const xt=Co(t.modelValue).slice(),$n=kt(xt);if($n<0)return;const ui=xt[$n];xt.splice($n,1),e(It,xt),Je(xt),e("remove-tag",ui)}},ge=(ke,Ze)=>{const xt=a.selected.indexOf(Ze);if(xt>-1&&!q.value){const $n=Co(t.modelValue).slice();$n.splice(xt,1),e(It,$n),Je($n),e("remove-tag",Ze.value)}ke.stopPropagation(),Fe()},Le=ke=>{ke.stopPropagation();const Ze=t.multiple?[]:E.value;if(t.multiple)for(const xt of a.selected)xt.isDisabled&&Ze.push(xt.value);e(It,Ze),Je(Ze),a.hoveringIndex=-1,y.value=!1,e("clear"),Fe()},de=ke=>{var Ze;if(t.multiple){const xt=Co((Ze=t.modelValue)!=null?Ze:[]).slice(),$n=Ve(xt,ke);$n>-1?xt.splice($n,1):(t.multipleLimit<=0||xt.length<t.multipleLimit)&&xt.push(ke.value),e(It,xt),Je(xt),ke.created&&ae(""),t.filterable&&!t.reserveKeyword&&(a.inputValue="")}else!$i(t.modelValue,ke.value)&&e(It,ke.value),Je(ke.value),y.value=!1;Fe(),!y.value&&Ye(()=>{gt(ke)})},Ve=(ke,Ze)=>pn(Ze)?-1:_t(Ze.value)?ke.findIndex(xt=>$i(to(xt,t.valueKey),jr(Ze))):ke.indexOf(Ze.value),gt=ke=>{var Ze,xt,$n,ui,co;const Wo=Pe(ke)?ke[ke.length-1]:ke;let Zc=null;if(!ir(Wo?.value)){const Qc=ee.value.filter(ane=>ane.value===Wo.value);Qc.length>0&&(Zc=Qc[0].$el)}if(c.value&&Zc){const Qc=(ui=($n=(xt=(Ze=c.value)==null?void 0:Ze.popperRef)==null?void 0:xt.contentRef)==null?void 0:$n.querySelector)==null?void 0:ui.call($n,`.${o.be("dropdown","wrap")}`);Qc&&uU(Qc,Zc)}(co=b.value)==null||co.handleScroll()},an=ke=>{a.options.set(ke.value,ke),a.cachedOptions.set(ke.value,ke)},Si=(ke,Ze)=>{a.options.get(ke)===Ze&&a.options.delete(ke)},uo=M(()=>{var ke,Ze;return(Ze=(ke=c.value)==null?void 0:ke.popperRef)==null?void 0:Ze.contentRef}),Oe=()=>{a.isBeforeHide=!1,Ye(()=>{var ke;(ke=b.value)==null||ke.update(),gt(a.selected)})},Fe=()=>{var ke;(ke=f.value)==null||ke.focus()},st=()=>{var ke;if(y.value){y.value=!1,Ye(()=>{var Ze;return(Ze=f.value)==null?void 0:Ze.blur()});return}(ke=f.value)==null||ke.blur()},Vn=ke=>{Le(ke)},en=ke=>{if(y.value=!1,R.value){const Ze=new FocusEvent("blur",ke);Ye(()=>O(Ze))}},Ue=()=>{a.inputValue.length>0?a.inputValue="":y.value=!1},tt=ke=>{var Ze;q.value||t.filterable&&y.value&&ke&&!((Ze=m.value)!=null&&Ze.contains(ke.target))||(a2&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:y.value=!y.value)},pt=()=>{if(!y.value)tt();else{const ke=ee.value[a.hoveringIndex];ke&&!ke.isDisabled&&de(ke)}},jr=ke=>_t(ke.value)?to(ke.value,t.valueKey):ke.value,Uo=M(()=>ee.value.filter(ke=>ke.visible).every(ke=>ke.isDisabled)),Jc=M(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),tne=M(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),T0=ke=>{if(!y.value){y.value=!0;return}if(!(a.options.size===0||re.value===0||P.value)&&!Uo.value){ke==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):ke==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Ze=ee.value[a.hoveringIndex];(Ze.isDisabled||!Ze.visible)&&T0(ke),Ye(()=>gt(_.value))}},KL=(ke,Ze,xt,$n)=>{for(let ui=Ze;ui>=0&&ui<$n;ui+=xt){const co=ke[ui];if(!co?.isDisabled&&co?.visible)return ui}return null},E0=(ke,Ze)=>{var xt;const $n=a.options.size;if($n===0)return;const ui=GI(ke,0,$n-1),co=ee.value,Wo=Ze==="up"?-1:1,Zc=(xt=KL(co,ui,Wo,$n))!=null?xt:KL(co,ui-Wo,-Wo,$n);Zc!=null&&(a.hoveringIndex=Zc,Ye(()=>gt(_.value)))},nne=ke=>{const Ze=Bn(ke);let xt=!0;switch(Ze){case Me.up:T0("prev");break;case Me.down:T0("next");break;case Me.enter:case Me.numpadEnter:P.value||pt();break;case Me.esc:Ue();break;case Me.backspace:xt=!1,Et(ke);return;case Me.home:if(!y.value)return;E0(0,"down");break;case Me.end:if(!y.value)return;E0(a.options.size-1,"up");break;case Me.pageUp:if(!y.value)return;E0(a.hoveringIndex-10,"up");break;case Me.pageDown:if(!y.value)return;E0(a.hoveringIndex+10,"down");break;default:xt=!1;break}xt&&(ke.preventDefault(),ke.stopPropagation())},ine=()=>{if(!u.value)return 0;const ke=window.getComputedStyle(u.value);return Number.parseFloat(ke.gap||"6px")},rne=M(()=>{const ke=ine(),Ze=t.filterable?ke+rW:0;return{maxWidth:`${p.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-ke-Ze:a.selectionWidth-Ze}px`}}),one=M(()=>({maxWidth:`${a.selectionWidth}px`})),sne=ke=>{e("popup-scroll",ke)};nr(u,Te),nr(z,Re),nr(v,ze),nr(p,et);let x0;return Se(()=>be.value,ke=>{ke?x0=nr(g,Re).stop:(x0?.(),x0=void 0),e("visible-change",ke)}),Pt(()=>{je()}),{inputId:T,contentId:r,nsSelect:o,nsInput:s,states:a,isFocused:R,expanded:y,optionsArray:ee,hoverOption:_,selectSize:G,filteredOptionsCount:re,updateTooltip:Re,updateTagTooltip:ze,debouncedOnInputChange:Cn,onInput:Dt,deletePrevTag:Et,deleteTag:ge,deleteSelected:Le,handleOptionSelect:de,scrollToOption:gt,hasModelValue:N,shouldShowPlaceholder:Ce,currentPlaceholder:Y,mouseEnterEventName:Z,needStatusIcon:F,showClearBtn:j,iconComponent:U,iconReverse:W,validateState:J,validateIcon:ne,showNewOption:V,updateOptions:K,collapseTagSize:ye,setSelected:je,selectDisabled:q,emptyText:se,handleCompositionStart:A,handleCompositionUpdate:I,handleCompositionEnd:D,handleKeydown:nne,onOptionCreate:an,onOptionDestroy:Si,handleMenuEnter:Oe,focus:Fe,blur:st,handleClearClick:Vn,handleClickOutside:en,handleEsc:Ue,toggleMenu:tt,selectOption:pt,getValueKey:jr,navigateOptions:T0,dropdownMenuVisible:be,showTagList:Jc,collapseTagList:tne,popupScroll:sne,getOption:Ie,tagStyle:rne,collapseTagStyle:one,popperRef:uo,inputRef:f,tooltipRef:c,tagTooltipRef:d,prefixRef:h,suffixRef:m,selectRef:l,wrapperRef:z,selectionRef:u,scrollbarRef:b,menuRef:g,tagMenuRef:v,collapseItemRef:p}};var Rge=le({name:"ElOptions",setup(t,{slots:e}){const n=Ne(FC);let i=[];return()=>{var r,o;const s=(r=e.default)==null?void 0:r.call(e),a=[];function l(u){Pe(u)&&u.forEach(c=>{var d,f,h,m;const g=(d=c?.type||{})==null?void 0:d.name;g==="ElOptionGroup"?l(!ot(c.children)&&!Pe(c.children)&&Xe((f=c.children)==null?void 0:f.default)?(h=c.children)==null?void 0:h.default():c.children):g==="ElOption"?a.push((m=c.props)==null?void 0:m.value):Pe(c.children)&&l(c.children)})}return s.length&&l((o=s[0])==null?void 0:o.children),$i(a,i)||(i=a,n&&(n.states.optionValues=a)),s}}});const Mge=qe({name:String,id:String,modelValue:{type:me([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:$r,effect:{type:me(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:me([String,Object])},popperOptions:{type:me(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:me(Function)},filterMethod:{type:me(Function)},multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:Mn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ri,default:Nf},fitInputWidth:Boolean,suffixIcon:{type:ri,default:zc},tagType:{...Fv.type,default:"info"},tagEffect:{...Fv.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:me(String),values:xu,default:"bottom-start"},fallbackPlacements:{type:me(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:Mn.appendTo,options:{type:me(Array)},props:{type:me(Object),default:()=>g2},...Gb,...hs(["ariaLabel"])});DU.scroll;var Oge=le({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=De("select"),n=H(),i=Ct(),r=H([]);qt(iW,on({...Sr(t)}));const o=M(()=>r.value.some(u=>u.visible===!0)),s=u=>{var c;return u.type.name==="ElOption"&&!!((c=u.component)!=null&&c.proxy)},a=u=>{const c=Co(u),d=[];return c.forEach(f=>{var h;yi(f)&&(s(f)?d.push(f.component.proxy):Pe(f.children)&&f.children.length?d.push(...a(f.children)):(h=f.component)!=null&&h.subTree&&d.push(...a(f.component.subTree)))}),d},l=()=>{r.value=a(i.subTree)};return Pt(()=>{l()}),eU(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function Lge(t,e,n,i,r,o){return Vt((B(),Q("ul",{ref:"groupRef",class:$(t.ns.be("group","wrap"))},[ie("li",{class:$(t.ns.be("group","title"))},We(t.label),3),ie("li",null,[ie("ul",{class:$(t.ns.b("group"))},[we(t.$slots,"default")],2)])],2)),[[On,t.visible]])}var TR=Tr(Oge,[["render",Lge]]);const Xu=new Map;if(Zt){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Xu.values())for(const{documentHandler:i}of n)i(e,t);t=void 0}})}function tN(t,e){let n=[];return Pe(e.arg)?n=e.arg:Qo(e.arg)&&n.push(e.arg),function(i,r){const o=e.instance.popperRef,s=i.target,a=r?.target,l=!e||!e.instance,u=!s||!a,c=t.contains(s)||t.contains(a),d=t===s,f=n.length&&n.some(m=>m?.contains(s))||n.length&&n.includes(a),h=o&&(o.contains(s)||o.contains(a));l||u||c||d||f||h||e.value(i,r)}}const wf={beforeMount(t,e){Xu.has(t)||Xu.set(t,[]),Xu.get(t).push({documentHandler:tN(t,e),bindingFn:e.value})},updated(t,e){Xu.has(t)||Xu.set(t,[]);const n=Xu.get(t),i=n.findIndex(o=>o.bindingFn===e.oldValue),r={documentHandler:tN(t,e),bindingFn:e.value};i>=0?n.splice(i,1,r):n.push(r)},unmounted(t){Xu.delete(t)}};function Dge(){const t=bi(),e=H(0),n=M(()=>({minWidth:`${Math.max(e.value,rW)}px`}));return nr(t,()=>{var r,o;e.value=(o=(r=t.value)==null?void 0:r.getBoundingClientRect().width)!=null?o:0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}const nN="ElSelect",$v=new WeakMap,Nge=t=>(...e)=>{var n,i;const r=e[0];if(!r||r.includes('Slot "default" invoked outside of the render function')&&((n=e[2])!=null&&n.includes("ElTreeSelect")))return;const o=(i=$v.get(t))==null?void 0:i.originalWarnHandler;if(o){o(...e);return}console.warn(...e)},Bge=t=>{let e=$v.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:Nge(t),count:0},$v.set(t,e)),e};var Vge=le({name:nN,componentName:nN,components:{ElSelectMenu:Pge,ElOption:kR,ElOptions:Rge,ElOptionGroup:TR,ElTag:jp,ElScrollbar:gu,ElTooltip:Lo,ElIcon:He},directives:{ClickOutside:wf},props:Mge,emits:[It,En,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const i=Ct(),r=Bge(i.appContext);r.count+=1,i.appContext.config.warnHandler=r.handler;const o=M(()=>{const{modelValue:b,multiple:y}=t,_=y?[]:void 0;return Pe(b)?y?b:_:y?_:b}),s=on({...Sr(t),modelValue:o}),a=Ige(s,e),{calculatorRef:l,inputStyle:u}=Dge(),{getLabel:c,getValue:d,getOptions:f,getDisabled:h}=yge(t),m=b=>({label:c(b),value:d(b),disabled:h(b)}),g=b=>b.reduce((y,_)=>(y.push(_),_.children&&_.children.length>0&&y.push(...g(_.children)),y),[]),v=b=>{cc(b||[]).forEach(_=>{var C;if(_t(_)&&(_.type.name==="ElOption"||_.type.name==="ElTree")){const S=_.type.name;if(S==="ElTree"){const k=((C=_.props)==null?void 0:C.data)||[];g(k).forEach(E=>{E.currentLabel=E.label||(_t(E.value)?"":E.value),a.onOptionCreate(E)})}else if(S==="ElOption"){const k={..._.props};k.currentLabel=k.label||(_t(k.value)?"":k.value),a.onOptionCreate(k)}}})};Se(()=>{var b;return[(b=n.default)==null?void 0:b.call(n),o.value]},()=>{var b;t.persistent||a.expanded.value||(a.states.options.clear(),v((b=n.default)==null?void 0:b.call(n)))},{immediate:!0}),qt(FC,on({props:s,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const p=M(()=>t.multiple?a.states.selected.map(b=>b.currentLabel):a.states.selectedLabel);return Sn(()=>{const b=$v.get(i.appContext);b&&(b.count-=1,b.count<=0&&(i.appContext.config.warnHandler=b.originalWarnHandler,$v.delete(i.appContext)))}),{...a,modelValue:o,selectedLabel:p,calculatorRef:l,inputStyle:u,getLabel:c,getValue:d,getOptions:f,getDisabled:h,getOptionProps:m}}});const Fge=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],$ge=["textContent"],zge={key:1};function Hge(t,e,n,i,r,o){const s=Bt("el-tag"),a=Bt("el-tooltip"),l=Bt("el-icon"),u=Bt("el-option"),c=Bt("el-option-group"),d=Bt("el-options"),f=Bt("el-scrollbar"),h=Bt("el-select-menu"),m=vz("click-outside");return Vt((B(),Q("div",Lt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[Rp(t.mouseEnterEventName)]:e[10]||(e[10]=g=>t.states.inputHovering=!0)},{onMouseleave:e[11]||(e[11]=g=>t.states.inputHovering=!1)}),[L(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-style":t.popperStyle,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:e[9]||(e[9]=g=>t.states.isBeforeHide=!1)},{default:ce(()=>{var g;return[ie("div",{ref:"wrapperRef",class:$([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:e[6]||(e[6]=Ot((...v)=>t.toggleMenu&&t.toggleMenu(...v),["prevent"]))},[t.$slots.prefix?(B(),Q("div",{key:0,ref:"prefixRef",class:$(t.nsSelect.e("prefix"))},[we(t.$slots,"prefix")],2)):ve("v-if",!0),ie("div",{ref:"selectionRef",class:$([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?we(t.$slots,"tag",{key:0,data:t.states.selected,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>[(B(!0),Q(rt,null,gn(t.showTagList,v=>(B(),Q("div",{key:t.getValueKey(v),class:$(t.nsSelect.e("selected-item"))},[L(s,{closable:!t.selectDisabled&&!v.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.tagStyle),onClose:p=>t.deleteTag(p,v)},{default:ce(()=>[ie("span",{class:$(t.nsSelect.e("tags-text"))},[we(t.$slots,"label",{index:v.index,label:v.currentLabel,value:v.value},()=>[dt(We(v.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(B(),_e(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom","popper-class":t.popperClass,"popper-style":t.popperStyle,teleported:t.teleported,"popper-options":t.popperOptions},{default:ce(()=>[ie("div",{ref:"collapseItemRef",class:$(t.nsSelect.e("selected-item"))},[L(s,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.collapseTagStyle)},{default:ce(()=>[ie("span",{class:$(t.nsSelect.e("tags-text"))}," + "+We(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:ce(()=>[ie("div",{ref:"tagMenuRef",class:$(t.nsSelect.e("selection"))},[(B(!0),Q(rt,null,gn(t.collapseTagList,v=>(B(),Q("div",{key:t.getValueKey(v),class:$(t.nsSelect.e("selected-item"))},[L(s,{class:"in-tooltip",closable:!t.selectDisabled&&!v.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:p=>t.deleteTag(p,v)},{default:ce(()=>[ie("span",{class:$(t.nsSelect.e("tags-text"))},[we(t.$slots,"label",{index:v.index,label:v.currentLabel,value:v.value},()=>[dt(We(v.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","popper-style","teleported","popper-options"])):ve("v-if",!0)]):ve("v-if",!0),ie("div",{class:$([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable||t.selectDisabled)])},[ie("input",{id:t.inputId,ref:"inputRef",value:t.states.inputValue,type:"text",name:t.name,class:$([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:mt(t.inputStyle),tabindex:t.tabindex,role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((g=t.hoverOption)==null?void 0:g.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:e[0]||(e[0]=(...v)=>t.handleKeydown&&t.handleKeydown(...v)),onCompositionstart:e[1]||(e[1]=(...v)=>t.handleCompositionStart&&t.handleCompositionStart(...v)),onCompositionupdate:e[2]||(e[2]=(...v)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...v)),onCompositionend:e[3]||(e[3]=(...v)=>t.handleCompositionEnd&&t.handleCompositionEnd(...v)),onInput:e[4]||(e[4]=(...v)=>t.onInput&&t.onInput(...v)),onClick:e[5]||(e[5]=Ot((...v)=>t.toggleMenu&&t.toggleMenu(...v),["stop"]))},null,46,Fge),t.filterable?(B(),Q("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:$(t.nsSelect.e("input-calculator")),textContent:We(t.states.inputValue)},null,10,$ge)):ve("v-if",!0)],2),t.shouldShowPlaceholder?(B(),Q("div",{key:1,class:$([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?we(t.$slots,"label",{key:0,index:t.getOption(t.modelValue).index,label:t.currentPlaceholder,value:t.modelValue},()=>[ie("span",null,We(t.currentPlaceholder),1)]):(B(),Q("span",zge,We(t.currentPlaceholder),1))],2)):ve("v-if",!0)],2),ie("div",{ref:"suffixRef",class:$(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(B(),_e(l,{key:0,class:$([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:ce(()=>[(B(),_e(Gt(t.iconComponent)))]),_:1},8,["class"])):ve("v-if",!0),t.showClearBtn&&t.clearIcon?(B(),_e(l,{key:1,class:$([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:ce(()=>[(B(),_e(Gt(t.clearIcon)))]),_:1},8,["class","onClick"])):ve("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(B(),_e(l,{key:2,class:$([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:ce(()=>[(B(),_e(Gt(t.validateIcon)))]),_:1},8,["class"])):ve("v-if",!0)],2)],2)]}),content:ce(()=>[L(h,{ref:"menuRef"},{default:ce(()=>[t.$slots.header?(B(),Q("div",{key:0,class:$(t.nsSelect.be("dropdown","header")),onClick:e[7]||(e[7]=Ot(()=>{},["stop"]))},[we(t.$slots,"header")],2)):ve("v-if",!0),Vt(L(f,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:$([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical",onScroll:t.popupScroll},{default:ce(()=>[t.showNewOption?(B(),_e(u,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):ve("v-if",!0),L(d,null,{default:ce(()=>[we(t.$slots,"default",{},()=>[(B(!0),Q(rt,null,gn(t.options,(g,v)=>{var p;return B(),Q(rt,{key:v},[(p=t.getOptions(g))!=null&&p.length?(B(),_e(c,{key:0,label:t.getLabel(g),disabled:t.getDisabled(g)},{default:ce(()=>[(B(!0),Q(rt,null,gn(t.getOptions(g),b=>(B(),_e(u,Lt({key:t.getValue(b)},{ref_for:!0},t.getOptionProps(b)),null,16))),128))]),_:2},1032,["label","disabled"])):(B(),_e(u,Lt({key:1,ref_for:!0},t.getOptionProps(g)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[On,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(B(),Q("div",{key:1,class:$(t.nsSelect.be("dropdown","loading"))},[we(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(B(),Q("div",{key:2,class:$(t.nsSelect.be("dropdown","empty"))},[we(t.$slots,"empty",{},()=>[ie("span",null,We(t.emptyText),1)])],2)):ve("v-if",!0),t.$slots.footer?(B(),Q("div",{key:3,class:$(t.nsSelect.be("dropdown","footer")),onClick:e[8]||(e[8]=Ot(()=>{},["stop"]))},[we(t.$slots,"footer")],2)):ve("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],16)),[[m,t.handleClickOutside,t.popperRef]])}var Uge=Tr(Vge,[["render",Hge]]);const oW=sn(Uge,{Option:kR,OptionGroup:TR}),sW=Zi(kR);Zi(TR);const Wge=qe({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:me([String,Object,Array]),default:""},headerClass:String,bodyClass:String,footerClass:String,shadow:{type:String,values:["always","hover","never"],default:void 0}});var qge=le({name:"ElCard",__name:"card",props:Wge,setup(t){const e=Yb("card"),n=De("card");return(i,r)=>{var o;return B(),Q("div",{class:$([w(n).b(),w(n).is(`${t.shadow||((o=w(e))==null?void 0:o.shadow)||"always"}-shadow`)])},[i.$slots.header||t.header?(B(),Q("div",{key:0,class:$([w(n).e("header"),t.headerClass])},[we(i.$slots,"header",{},()=>[dt(We(t.header),1)])],2)):ve("v-if",!0),ie("div",{class:$([w(n).e("body"),t.bodyClass]),style:mt(t.bodyStyle)},[we(i.$slots,"default")],6),i.$slots.footer||t.footer?(B(),Q("div",{key:1,class:$([w(n).e("footer"),t.footerClass])},[we(i.$slots,"footer",{},()=>[dt(We(t.footer),1)])],2)):ve("v-if",!0)],2)}}});const aW=sn(qge),jge=(t,e,n)=>cc(t.subTree).filter(o=>{var s;return yi(o)&&((s=o.type)==null?void 0:s.name)===e&&!!o.component}).map(o=>o.component.uid).map(o=>n[o]).filter(o=>!!o),Kge=(t,e)=>{const n=bi({}),i=bi([]),r=new WeakMap,o=c=>{n.value[c.uid]=c,vw(n),Pt(()=>{const d=c.getVnode().el,f=d.parentNode;if(!r.has(f)){r.set(f,[]);const h=f.insertBefore.bind(f);f.insertBefore=(m,g)=>(r.get(f).some(p=>m===p||g===p)&&vw(n),h(m,g))}r.get(f).push(d)})},s=c=>{delete n.value[c.uid],vw(n);const d=c.getVnode().el,f=d.parentNode,h=r.get(f),m=h.indexOf(d);h.splice(m,1)},a=()=>{i.value=jge(t,e,n.value)},l=c=>c.render();return{children:i,addChild:o,removeChild:s,ChildrenSorter:le({setup(c,{slots:d}){return()=>(a(),d.default?nt(l,{render:d.default}):null)}})}},lW=qe({modelValue:{type:me([Number,String,Array,Object])},options:{type:me(Array),default:()=>[]},props:{type:me(Object),default:()=>({})}}),Gge={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:tn,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500,checkOnClickNode:!1,checkOnClickLeaf:!0,showPrefix:!0},Yge=qe({...lW,border:{type:Boolean,default:!0},renderLabel:{type:Function}}),iN=t=>!0,Xge={[It]:iN,[En]:iN,close:()=>!0,"expand-change":t=>t},Jge=t=>M(()=>({...Gge,...t.props})),Zge=qe({...lW,size:$r,placeholder:String,disabled:{type:Boolean,default:void 0},clearable:Boolean,clearIcon:{type:ri,default:Nf},filterable:Boolean,filterMethod:{type:me(Function),default:(t,e)=>t.text.includes(e)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:Boolean,maxCollapseTagsTooltipHeight:{type:[String,Number]},debounce:{type:Number,default:300},beforeFilter:{type:me(Function),default:()=>!0},placement:{type:me(String),values:xu,default:"bottom-start"},fallbackPlacements:{type:me(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:Mn.popperClass,popperStyle:Mn.popperStyle,teleported:Mn.teleported,effect:{type:me(String),default:"light"},tagType:{...Fv.type,default:"info"},tagEffect:{...Fv.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},showCheckedStrategy:{type:String,values:["parent","child"],default:"child"},checkOnClickNode:Boolean,showPrefix:{type:Boolean,default:!0},...Gb}),rN=t=>!0,Qge={[It]:rN,[En]:rN,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,visibleChange:t=>vi(t),expandChange:t=>!!t,removeTag:t=>!!t},uW={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:$r,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...hs(["ariaControls"])},cW={[It]:t=>ot(t)||St(t)||vi(t),change:t=>ot(t)||St(t)||vi(t)},fg=Symbol("checkboxGroupContextKey"),epe=({model:t,isChecked:e})=>{const n=Ne(fg,void 0),i=Ne(Bf,void 0),r=M(()=>{var s,a;const l=(s=n?.max)==null?void 0:s.value,u=(a=n?.min)==null?void 0:a.value;return!pn(l)&&t.value.length>=l&&!e.value||!pn(u)&&t.value.length<=u&&e.value});return{isDisabled:Oi(M(()=>{var s,a;return n===void 0?(s=i?.disabled)!=null?s:r.value:((a=n.disabled)==null?void 0:a.value)||r.value})),isLimitDisabled:r}},tpe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:i,isDisabled:r,isLabeledByFormItem:o})=>{const s=Ne(fg,void 0),{formItem:a}=lo(),{emit:l}=Ct();function u(m){var g,v,p,b;return[!0,t.trueValue,t.trueLabel].includes(m)?(v=(g=t.trueValue)!=null?g:t.trueLabel)!=null?v:!0:(b=(p=t.falseValue)!=null?p:t.falseLabel)!=null?b:!1}function c(m,g){l(En,u(m),g)}function d(m){if(n.value)return;const g=m.target;l(En,u(g.checked),m)}async function f(m){n.value||!i.value&&!r.value&&o.value&&(m.composedPath().some(p=>p.tagName==="LABEL")||(e.value=u([!1,t.falseValue,t.falseLabel].includes(e.value)),await Ye(),c(e.value,m)))}const h=M(()=>s?.validateEvent||t.validateEvent);return Se(()=>t.modelValue,()=>{h.value&&a?.validate("change").catch(m=>void 0)}),{handleChange:d,onClickRoot:f}},npe=t=>{const e=H(!1),{emit:n}=Ct(),i=Ne(fg,void 0),r=M(()=>pn(i)===!1),o=H(!1),s=M({get(){var a,l;return r.value?(a=i?.modelValue)==null?void 0:a.value:(l=t.modelValue)!=null?l:e.value},set(a){var l,u;r.value&&Pe(a)?(o.value=((l=i?.max)==null?void 0:l.value)!==void 0&&a.length>i?.max.value&&a.length>s.value.length,o.value===!1&&((u=i?.changeEvent)==null||u.call(i,a))):(n(It,a),e.value=a)}});return{model:s,isGroup:r,isLimitExceeded:o}},ipe=(t,e,{model:n})=>{const i=Ne(fg,void 0),r=H(!1),o=M(()=>Is(t.value)?t.label:t.value),s=M(()=>{const c=n.value;return vi(c)?c:Pe(c)?_t(o.value)?c.map(ln).some(d=>$i(d,o.value)):c.map(ln).includes(o.value):c!=null?c===t.trueValue||c===t.trueLabel:!!c}),a=fr(M(()=>{var c;return(c=i?.size)==null?void 0:c.value}),{prop:!0}),l=fr(M(()=>{var c;return(c=i?.size)==null?void 0:c.value})),u=M(()=>!!e.default||!Is(o.value));return{checkboxButtonSize:a,isChecked:s,isFocused:r,checkboxSize:l,hasOwnLabel:u,actualValue:o}},dW=(t,e)=>{const{formItem:n}=lo(),{model:i,isGroup:r,isLimitExceeded:o}=npe(t),{isFocused:s,isChecked:a,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,actualValue:d}=ipe(t,e,{model:i}),{isDisabled:f}=epe({model:i,isChecked:a}),{inputId:h,isLabeledByFormItem:m}=Au(t,{formItemContext:n,disableIdGeneration:c,disableIdManagement:r}),{handleChange:g,onClickRoot:v}=tpe(t,{model:i,isLimitExceeded:o,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:m});return(()=>{function b(){var y,_;Pe(i.value)&&!i.value.includes(d.value)?i.value.push(d.value):i.value=(_=(y=t.trueValue)!=null?y:t.trueLabel)!=null?_:!0}t.checked&&b()})(),of({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>r.value&&Is(t.value))),of({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>!!t.trueLabel)),of({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},M(()=>!!t.falseLabel)),{inputId:h,isLabeledByFormItem:m,isChecked:a,isDisabled:f,isFocused:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:i,actualValue:d,handleChange:g,onClickRoot:v}},rpe=["id","indeterminate","name","tabindex","disabled"];var fW=le({name:"ElCheckbox",__name:"checkbox",props:uW,emits:cW,setup(t){const e=t,n=$o(),{inputId:i,isLabeledByFormItem:r,isChecked:o,isDisabled:s,isFocused:a,checkboxSize:l,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:h}=dW(e,n),m=M(()=>{var b,y,_,C;return e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":(y=(b=e.trueValue)!=null?b:e.trueLabel)!=null?y:!0,"false-value":(C=(_=e.falseValue)!=null?_:e.falseLabel)!=null?C:!1}:{value:d.value}}),g=De("checkbox"),v=M(()=>[g.b(),g.m(l.value),g.is("disabled",s.value),g.is("bordered",e.border),g.is("checked",o.value)]),p=M(()=>[g.e("input"),g.is("disabled",s.value),g.is("checked",o.value),g.is("indeterminate",e.indeterminate),g.is("focus",a.value)]);return(b,y)=>(B(),_e(Gt(!w(u)&&w(r)?"span":"label"),{for:!w(u)&&w(r)?null:w(i),class:$(v.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:w(h)},{default:ce(()=>[ie("span",{class:$(p.value)},[Vt(ie("input",Lt({id:w(i),"onUpdate:modelValue":y[0]||(y[0]=_=>rn(c)?c.value=_:null),class:w(g).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:w(s)},m.value,{onChange:y[1]||(y[1]=(..._)=>w(f)&&w(f)(..._)),onFocus:y[2]||(y[2]=_=>a.value=!0),onBlur:y[3]||(y[3]=_=>a.value=!1),onClick:y[4]||(y[4]=Ot(()=>{},["stop"]))}),null,16,rpe),[[Zz,w(c)]]),ie("span",{class:$(w(g).e("inner"))},null,2)],2),w(u)?(B(),Q("span",{key:0,class:$(w(g).e("label"))},[we(b.$slots,"default"),b.$slots.default?ve("v-if",!0):(B(),Q(rt,{key:0},[dt(We(t.label),1)],64))],2)):ve("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}});const ope=["name","tabindex","disabled"];var ER=le({name:"ElCheckboxButton",__name:"checkbox-button",props:uW,emits:cW,setup(t){const e=t,n=$o(),{isFocused:i,isChecked:r,isDisabled:o,checkboxButtonSize:s,model:a,actualValue:l,handleChange:u}=dW(e,n),c=M(()=>{var g,v,p,b;return e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":(v=(g=e.trueValue)!=null?g:e.trueLabel)!=null?v:!0,"false-value":(b=(p=e.falseValue)!=null?p:e.falseLabel)!=null?b:!1}:{value:l.value}}),d=Ne(fg,void 0),f=De("checkbox"),h=M(()=>{var g,v,p,b;const y=(v=(g=d?.fill)==null?void 0:g.value)!=null?v:"";return{backgroundColor:y,borderColor:y,color:(b=(p=d?.textColor)==null?void 0:p.value)!=null?b:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),m=M(()=>[f.b("button"),f.bm("button",s.value),f.is("disabled",o.value),f.is("checked",r.value),f.is("focus",i.value)]);return(g,v)=>(B(),Q("label",{class:$(m.value)},[Vt(ie("input",Lt({"onUpdate:modelValue":v[0]||(v[0]=p=>rn(a)?a.value=p:null),class:w(f).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:w(o)},c.value,{onChange:v[1]||(v[1]=(...p)=>w(u)&&w(u)(...p)),onFocus:v[2]||(v[2]=p=>i.value=!0),onBlur:v[3]||(v[3]=p=>i.value=!1),onClick:v[4]||(v[4]=Ot(()=>{},["stop"]))}),null,16,ope),[[Zz,w(a)]]),g.$slots.default||t.label?(B(),Q("span",{key:0,class:$(w(f).be("button","inner")),style:mt(w(r)?h.value:void 0)},[we(g.$slots,"default",{},()=>[dt(We(t.label),1)])],6)):ve("v-if",!0)],2))}});const spe=qe({modelValue:{type:me(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:$r,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:me(Array)},props:{type:me(Object),default:()=>hW},type:{type:String,values:["checkbox","button"],default:"checkbox"},...hs(["ariaLabel"])}),ape={[It]:t=>Pe(t),change:t=>Pe(t)},hW={label:"label",value:"value",disabled:"disabled"};var mW=le({name:"ElCheckboxGroup",__name:"checkbox-group",props:spe,emits:ape,setup(t,{emit:e}){const n=t,i=e,r=De("checkbox"),o=Oi(),{formItem:s}=lo(),{inputId:a,isLabeledByFormItem:l}=Au(n,{formItemContext:s}),u=async m=>{i(It,m),await Ye(),i(En,m)},c=M({get(){return n.modelValue},set(m){u(m)}}),d=M(()=>({...hW,...n.props})),f=m=>{const{label:g,value:v,disabled:p}=d.value,b={label:m[g],value:m[v],disabled:m[p]};return{...IC(m,[g,v,p]),...b}},h=M(()=>n.type==="button"?ER:fW);return qt(fg,{...ZI(Sr(n),["size","min","max","validateEvent","fill","textColor"]),disabled:o,modelValue:c,changeEvent:u}),Se(()=>n.modelValue,(m,g)=>{n.validateEvent&&!$i(m,g)&&s?.validate("change").catch(v=>void 0)}),(m,g)=>{var v;return B(),_e(Gt(t.tag),{id:w(a),class:$(w(r).b("group")),role:"group","aria-label":w(l)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":w(l)?(v=w(s))==null?void 0:v.labelId:void 0},{default:ce(()=>[we(m.$slots,"default",{},()=>[(B(!0),Q(rt,null,gn(t.options,(p,b)=>(B(),_e(Gt(h.value),Lt({key:b},{ref_for:!0},f(p)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});const Ac=sn(fW,{CheckboxButton:ER,CheckboxGroup:mW});Zi(ER);const gW=Zi(mW),pW=qe({modelValue:{type:[String,Number,Boolean],default:void 0},size:$r,disabled:{type:Boolean,default:void 0},label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),lpe=qe({...pW,border:Boolean}),vW={[It]:t=>ot(t)||St(t)||vi(t),[En]:t=>ot(t)||St(t)||vi(t)},bW=Symbol("radioGroupKey"),yW=(t,e)=>{const n=H(),i=Ne(bW,void 0),r=M(()=>!!i),o=M(()=>Is(t.value)?t.label:t.value),s=M({get(){return r.value?i.modelValue:t.modelValue},set(d){r.value?i.changeEvent(d):e&&e(It,d),n.value.checked=t.modelValue===o.value}}),a=fr(M(()=>i?.size)),l=Oi(M(()=>i?.disabled)),u=H(!1),c=M(()=>l.value||r.value&&s.value!==o.value?-1:0);return of({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},M(()=>r.value&&Is(t.value))),{radioRef:n,isGroup:r,radioGroup:i,focus:u,size:a,disabled:l,tabIndex:c,modelValue:s,actualValue:o}},upe=["value","name","disabled","checked"];var wW=le({name:"ElRadio",__name:"radio",props:lpe,emits:vW,setup(t,{emit:e}){const n=t,i=e,r=De("radio"),{radioRef:o,radioGroup:s,focus:a,size:l,disabled:u,modelValue:c,actualValue:d}=yW(n,i);function f(){Ye(()=>i(En,c.value))}return(h,m)=>{var g;return B(),Q("label",{class:$([w(r).b(),w(r).is("disabled",w(u)),w(r).is("focus",w(a)),w(r).is("bordered",t.border),w(r).is("checked",w(c)===w(d)),w(r).m(w(l))])},[ie("span",{class:$([w(r).e("input"),w(r).is("disabled",w(u)),w(r).is("checked",w(c)===w(d))])},[Vt(ie("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":m[0]||(m[0]=v=>rn(c)?c.value=v:null),class:$(w(r).e("original")),value:w(d),name:t.name||((g=w(s))==null?void 0:g.name),disabled:w(u),checked:w(c)===w(d),type:"radio",onFocus:m[1]||(m[1]=v=>a.value=!0),onBlur:m[2]||(m[2]=v=>a.value=!1),onChange:f,onClick:m[3]||(m[3]=Ot(()=>{},["stop"]))},null,42,upe),[[Qz,w(c)]]),ie("span",{class:$(w(r).e("inner"))},null,2)],2),ie("span",{class:$(w(r).e("label")),onKeydown:m[4]||(m[4]=Ot(()=>{},["stop"]))},[we(h.$slots,"default",{},()=>[dt(We(t.label),1)])],34)],2)}}});const cpe=qe({...pW}),dpe=["value","name","disabled"];var xR=le({name:"ElRadioButton",__name:"radio-button",props:cpe,setup(t){const e=t,n=De("radio"),{radioRef:i,focus:r,size:o,disabled:s,modelValue:a,radioGroup:l,actualValue:u}=yW(e),c=M(()=>({backgroundColor:l?.fill||"",borderColor:l?.fill||"",boxShadow:l?.fill?`-1px 0 0 0 ${l.fill}`:"",color:l?.textColor||""}));return(d,f)=>{var h;return B(),Q("label",{class:$([w(n).b("button"),w(n).is("active",w(a)===w(u)),w(n).is("disabled",w(s)),w(n).is("focus",w(r)),w(n).bm("button",w(o))])},[Vt(ie("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":f[0]||(f[0]=m=>rn(a)?a.value=m:null),class:$(w(n).be("button","original-radio")),value:w(u),type:"radio",name:t.name||((h=w(l))==null?void 0:h.name),disabled:w(s),onFocus:f[1]||(f[1]=m=>r.value=!0),onBlur:f[2]||(f[2]=m=>r.value=!1),onClick:f[3]||(f[3]=Ot(()=>{},["stop"]))},null,42,dpe),[[Qz,w(a)]]),ie("span",{class:$(w(n).be("button","inner")),style:mt(w(a)===w(u)?c.value:{}),onKeydown:f[4]||(f[4]=Ot(()=>{},["stop"]))},[we(d.$slots,"default",{},()=>[dt(We(t.label),1)])],38)],2)}}});const _W={label:"label",value:"value",disabled:"disabled"},fpe=qe({id:{type:String,default:void 0},size:$r,disabled:{type:Boolean,default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},options:{type:me(Array)},props:{type:me(Object),default:()=>_W},type:{type:String,values:["radio","button"],default:"radio"},...hs(["ariaLabel"])}),hpe=vW,mpe=["id","aria-label","aria-labelledby"];var CW=le({name:"ElRadioGroup",__name:"radio-group",props:fpe,emits:hpe,setup(t,{emit:e}){const n=t,i=e,r=De("radio"),o=as(),s=H(),{formItem:a}=lo(),{inputId:l,isLabeledByFormItem:u}=Au(n,{formItemContext:a}),c=g=>{i(It,g),Ye(()=>i(En,g))};Pt(()=>{const g=s.value.querySelectorAll("[type=radio]"),v=g[0];!Array.from(g).some(p=>p.checked)&&v&&(v.tabIndex=0)});const d=M(()=>n.name||o.value),f=M(()=>({..._W,...n.props})),h=g=>{const{label:v,value:p,disabled:b}=f.value,y={label:g[v],value:g[p],disabled:g[b]};return{...IC(g,[v,p,b]),...y}},m=M(()=>n.type==="button"?xR:wW);return qt(bW,on({...Sr(n),changeEvent:c,name:d})),Se(()=>n.modelValue,(g,v)=>{n.validateEvent&&!$i(g,v)&&a?.validate("change").catch(p=>void 0)}),(g,v)=>(B(),Q("div",{id:w(l),ref_key:"radioGroupRef",ref:s,class:$(w(r).b("group")),role:"radiogroup","aria-label":w(u)?void 0:t.ariaLabel||"radio-group","aria-labelledby":w(u)?w(a).labelId:void 0},[we(g.$slots,"default",{},()=>[(B(!0),Q(rt,null,gn(t.options,(p,b)=>(B(),_e(Gt(m.value),Lt({key:b},{ref_for:!0},h(p)),null,16))),128))])],10,mpe))}});const SW=sn(wW,{RadioButton:xR,RadioGroup:CW}),gpe=Zi(CW);Zi(xR);const $C=Symbol();function ppe(t){return!!(Pe(t)?t.every(({type:e})=>e===xi):t?.type===xi)}var vpe=le({name:"NodeContent",props:{node:{type:Object,required:!0}},setup(t){const e=De("cascader-node"),{renderLabelFn:n}=Ne($C),{node:i}=t,{data:r,label:o}=i,s=()=>{const a=n?.({node:i,data:r});return ppe(a)?o:a??o};return()=>L("span",{class:e.e("label")},[s()])}});const bpe=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"];var ype=le({name:"ElCascaderNode",__name:"node",props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(t,{emit:e}){const n=t,i=e,r=Ne($C),o=De("cascader-node"),s=M(()=>r.isHoverMenu),a=M(()=>r.config.multiple),l=M(()=>r.config.checkStrictly),u=M(()=>r.config.showPrefix),c=M(()=>{var E;return(E=r.checkedNodes[0])==null?void 0:E.uid}),d=M(()=>n.node.isDisabled),f=M(()=>n.node.isLeaf),h=M(()=>l.value&&!f.value||!d.value),m=M(()=>v(r.expandingNode)),g=M(()=>l.value&&r.checkedNodes.some(v)),v=E=>{var x;const{level:P,uid:A}=n.node;return((x=E?.pathNodes[P-1])==null?void 0:x.uid)===A},p=()=>{m.value||r.expandNode(n.node)},b=E=>{const{node:x}=n;E!==x.checked&&r.handleCheckChange(x,E)},y=()=>{r.lazyLoad(n.node,()=>{f.value||p()})},_=E=>{s.value&&(C(),!f.value&&i("expand",E))},C=()=>{const{node:E}=n;!h.value||E.loading||(E.loaded?p():y())},S=()=>{f.value&&!d.value&&!l.value&&!a.value?T(!0):(r.config.checkOnClickNode&&(a.value||l.value)||f.value&&r.config.checkOnClickLeaf)&&!d.value?k(!n.node.checked):s.value||C()},k=E=>{l.value?(b(E),n.node.loaded&&p()):T(E)},T=E=>{n.node.loaded?(b(E),!l.value&&p()):y()};return(E,x)=>(B(),Q("li",{id:`${t.menuId}-${t.node.uid}`,role:"menuitem","aria-haspopup":!f.value,"aria-owns":f.value?void 0:t.menuId,"aria-expanded":m.value,tabindex:h.value?-1:void 0,class:$([w(o).b(),w(o).is("selectable",l.value),w(o).is("active",t.node.checked),w(o).is("disabled",!h.value),m.value&&"in-active-path",g.value&&"in-checked-path"]),onMouseenter:_,onFocus:_,onClick:S},[ve(" prefix "),a.value&&u.value?(B(),_e(w(Ac),{key:0,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:d.value,onClick:x[0]||(x[0]=Ot(()=>{},["stop"])),"onUpdate:modelValue":k},null,8,["model-value","indeterminate","disabled"])):l.value&&u.value?(B(),_e(w(SW),{key:1,"model-value":c.value,label:t.node.uid,disabled:d.value,"onUpdate:modelValue":k,onClick:x[1]||(x[1]=Ot(()=>{},["stop"]))},{default:ce(()=>[ve(`
Add an empty element to avoid render label,
do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485
`),x[2]||(x[2]=ie("span",null,null,-1))]),_:1},8,["model-value","label","disabled"])):f.value&&t.node.checked?(B(),_e(w(He),{key:2,class:$(w(o).e("prefix"))},{default:ce(()=>[L(w(LC))]),_:1},8,["class"])):ve("v-if",!0),ve(" content "),L(w(vpe),{node:t.node},null,8,["node"]),ve(" postfix "),f.value?ve("v-if",!0):(B(),Q(rt,{key:3},[t.node.loading?(B(),_e(w(He),{key:0,class:$([w(o).is("loading"),w(o).e("postfix")])},{default:ce(()=>[L(w(xc))]),_:1},8,["class"])):(B(),_e(w(He),{key:1,class:$(["arrow-right",w(o).e("postfix")])},{default:ce(()=>[L(w(oa))]),_:1},8,["class"]))],64))],42,bpe))}}),wpe=le({name:"ElCascaderMenu",__name:"menu",props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(t){const e=t,n=Ct(),i=De("cascader-menu"),{t:r}=Qt(),o=as();let s,a;const l=Ne($C),u=H(),c=M(()=>!e.nodes.length),d=M(()=>!l.initialLoaded),f=M(()=>`${o.value}-${e.index}`),h=p=>{s=p.target},m=p=>{var b;if(!(!l.isHoverMenu||!s||!u.value))if(s.contains(p.target)){g();const y=n.vnode.el,{left:_}=y.getBoundingClientRect(),{offsetWidth:C,offsetHeight:S}=y,k=p.clientX-_,T=s.offsetTop,E=T+s.offsetHeight,x=((b=y.querySelector(`.${i.e("wrap")}`))==null?void 0:b.scrollTop)||0;u.value.innerHTML=`
<path style="pointer-events: auto;" fill="transparent" d="M${k} ${T} L${C} ${x} V${T} Z" />
<path style="pointer-events: auto;" fill="transparent" d="M${k} ${E} L${C} ${S+x} V${E} Z" />
`}else a||(a=window.setTimeout(v,l.config.hoverThreshold))},g=()=>{a&&(clearTimeout(a),a=void 0)},v=()=>{u.value&&(u.value.innerHTML="",g())};return(p,b)=>(B(),_e(w(gu),{key:f.value,tag:"ul",role:"menu",class:$(w(i).b()),"wrap-class":w(i).e("wrap"),"view-class":[w(i).e("list"),w(i).is("empty",c.value)],onMousemove:m,onMouseleave:v},{default:ce(()=>{var y;return[(B(!0),Q(rt,null,gn(t.nodes,_=>(B(),_e(ype,{key:_.uid,node:_,"menu-id":f.value,onExpand:h},null,8,["node","menu-id"]))),128)),d.value?(B(),Q("div",{key:0,class:$(w(i).e("empty-text"))},[L(w(He),{size:"14",class:$(w(i).is("loading"))},{default:ce(()=>[L(w(xc))]),_:1},8,["class"]),dt(" "+We(w(r)("el.cascader.loading")),1)],2)):c.value?(B(),Q("div",{key:1,class:$(w(i).e("empty-text"))},[we(p.$slots,"empty",{},()=>[dt(We(w(r)("el.cascader.noData")),1)])],2)):(y=w(l))!=null&&y.isHoverMenu?(B(),Q(rt,{key:2},[ve(" eslint-disable vue/html-self-closing "),(B(),Q("svg",{ref_key:"hoverZone",ref:u,class:$(w(i).e("hover-zone"))},null,2))],2112)):ve("v-if",!0),ve(" eslint-enable vue/html-self-closing ")]}),_:3},8,["class","wrap-class","view-class"]))}}),_pe=Object.defineProperty,Cpe=(t,e,n)=>e in t?_pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ho=(t,e,n)=>Cpe(t,typeof e!="symbol"?e+"":e,n);let Spe=0;const kpe=t=>{const e=[t];let{parent:n}=t;for(;n;)e.unshift(n),n=n.parent;return e};let v2=class b2{constructor(e,n,i,r=!1){this.data=e,this.config=n,this.parent=i,this.root=r,ho(this,"uid",Spe++),ho(this,"level"),ho(this,"value"),ho(this,"label"),ho(this,"pathNodes"),ho(this,"pathValues"),ho(this,"pathLabels"),ho(this,"childrenData"),ho(this,"children"),ho(this,"text"),ho(this,"loaded"),ho(this,"checked",!1),ho(this,"indeterminate",!1),ho(this,"loading",!1);const{value:o,label:s,children:a}=n,l=e[a],u=kpe(this);this.level=r?0:i?i.level+1:1,this.value=e[o],this.label=e[s],this.pathNodes=u,this.pathValues=u.map(c=>c.value),this.pathLabels=u.map(c=>c.label),this.childrenData=l,this.children=(l||[]).map(c=>new b2(c,n,this)),this.loaded=!n.lazy||this.isLeaf||!xm(l),this.text=""}get isDisabled(){const{data:e,parent:n,config:i}=this,{disabled:r,checkStrictly:o}=i;return(Xe(r)?r(e,this):!!e[r])||!o&&!!n?.isDisabled}get isLeaf(){const{data:e,config:n,childrenData:i,loaded:r}=this,{lazy:o,leaf:s}=n,a=Xe(s)?s(e,this):e[s];return pn(a)?o&&!r?!1:!(Pe(i)&&i.length):!!a}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:n,children:i}=this,r=new b2(e,this.config,this);return Pe(n)?n.push(e):this.childrenData=[e],i.push(r),r}calcText(e,n){const i=e?this.pathLabels.join(n):this.label;return this.text=i,i}broadcast(e){this.children.forEach(n=>{var i;n&&(n.broadcast(e),(i=n.onParentCheck)==null||i.call(n,e))})}emit(){var e;const{parent:n}=this;n&&((e=n.onChildCheck)==null||e.call(n),n.emit())}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,n=e.filter(r=>!r.isDisabled),i=n.length?n.every(r=>r.checked):!1;this.setCheckState(i)}setCheckState(e){const n=this.children.length,i=this.children.reduce((r,o)=>{const s=o.checked?1:o.indeterminate?.5:0;return r+s},0);this.checked=this.loaded&&this.children.filter(r=>!r.isDisabled).every(r=>r.loaded&&r.checked)&&e,this.indeterminate=this.loaded&&i!==n&&i>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:n,multiple:i}=this.config;n||!i?this.checked=e:(this.broadcast(e),this.setCheckState(e),this.emit())}};var Tpe=Object.defineProperty,Epe=(t,e,n)=>e in t?Tpe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ek=(t,e,n)=>Epe(t,typeof e!="symbol"?e+"":e,n);const y2=(t,e)=>t.reduce((n,i)=>(i.isLeaf?n.push(i):(!e&&n.push(i),n=n.concat(y2(i.children,e))),n),[]);class oN{constructor(e,n){this.config=n,Ek(this,"nodes"),Ek(this,"allNodes"),Ek(this,"leafNodes");const i=(e||[]).map(r=>new v2(r,this.config));this.nodes=i,this.allNodes=y2(i,!1),this.leafNodes=y2(i,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,n){const i=n?n.appendChild(e):new v2(e,this.config);n||this.nodes.push(i),this.appendAllNodesAndLeafNodes(i)}appendNodes(e,n){e.length>0?e.forEach(i=>this.appendNode(i,n)):n&&n.isLeaf&&this.leafNodes.push(n)}appendAllNodesAndLeafNodes(e){this.allNodes.push(e),e.isLeaf&&this.leafNodes.push(e),e.children&&e.children.forEach(n=>{this.appendAllNodesAndLeafNodes(n)})}getNodeByValue(e,n=!1){return Is(e)?null:this.getFlattedNodes(n).find(r=>$i(r.value,e)||$i(r.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:i,level:r})=>$i(e.value,i)&&e.level===r)||null}}const sN=t=>{if(!t)return 0;const e=t.id.split("-");return Number(e[e.length-2])},xpe=t=>{if(!t)return;const e=t.querySelector("input");e?e.click():MU(t)&&t.click()},Ape=(t,e)=>{const n=e.slice(0),i=n.map(o=>o.uid),r=t.reduce((o,s)=>{const a=i.indexOf(s.uid);return a>-1&&(o.push(s),n.splice(a,1),i.splice(a,1)),o},[]);return r.push(...n),r};var Ppe=le({name:"ElCascaderPanel",__name:"index",props:Yge,emits:Xge,setup(t,{expose:e,emit:n}){const i=t,r=n;let o=!1;const s=De("cascader"),a=Jge(i),l=$o();let u;const c=H(!0),d=H(!1),f=H([]),h=H(),m=H([]),g=H(),v=H([]),p=M(()=>a.value.expandTrigger==="hover"),b=M(()=>i.renderLabel||l.default),y=()=>{const{options:R}=i,O=a.value;o=!1,u=new oN(R,O),m.value=[u.getNodes()],O.lazy&&xm(i.options)?(c.value=!1,_(void 0,N=>{N&&(u=new oN(N,O),m.value=[u.getNodes()]),c.value=!0,A(!1,!0)})):A(!1,!0)},_=(R,O)=>{const N=a.value;R=R||new v2({},N,void 0,!0),R.loading=!0;const F=U=>{const W=R,J=W.root?null:W;W.loading=!1,W.loaded=!0,W.childrenData=W.childrenData||[],U&&u?.appendNodes(U,J),U&&O?.(U),R.level===0&&(d.value=!0)},j=()=>{R.loading=!1,R.loaded=!1,R.level===0&&(c.value=!0)};N.lazyLoad(R,F,j)},C=(R,O)=>{var N;const{level:F}=R,j=m.value.slice(0,F);let U;R.isLeaf?U=R.pathNodes[F-2]:(U=R,j.push(R.children)),((N=g.value)==null?void 0:N.uid)!==U?.uid&&(g.value=R,m.value=j,!O&&r("expand-change",R?.pathValues||[]))},S=(R,O,N=!0)=>{const{checkStrictly:F,multiple:j}=a.value,U=v.value[0];o=!0,!j&&U?.doCheck(!1),R.doCheck(O),P(),N&&!j&&!F&&r("close"),!N&&!j&&k(R)},k=R=>{R&&(R=R.parent,k(R),R&&C(R))},T=R=>u?.getFlattedNodes(R),E=R=>{var O;return(O=T(R))==null?void 0:O.filter(({checked:N})=>N!==!1)},x=()=>{v.value.forEach(R=>R.doCheck(!1)),P(),m.value=m.value.slice(0,1),g.value=void 0,r("expand-change",[])},P=()=>{var R;const{checkStrictly:O,multiple:N}=a.value,F=v.value,j=E(!O),U=Ape(F,j),W=U.map(J=>J.valueByOption);v.value=U,h.value=N?W:(R=W[0])!=null?R:null},A=(R=!1,O=!1)=>{const{modelValue:N}=i,{lazy:F,multiple:j,checkStrictly:U}=a.value,W=!U;if(!(!c.value||o||!O&&$i(N,h.value)))if(F&&!R){const ne=qD(jue(Br(N))).map(he=>u?.getNodeByValue(he)).filter(he=>!!he&&!he.loaded&&!he.loading);ne.length?ne.forEach(he=>{_(he,()=>A(!1,O))}):A(!0,O)}else{const J=j?Br(N):[N],ne=qD(J.map(he=>u?.getNodeByValue(he,W)));I(ne,O),h.value=V_(N??void 0)}},I=(R,O=!0)=>{const{checkStrictly:N}=a.value,F=v.value,j=R.filter(J=>!!J&&(N||J.isLeaf)),U=u?.getSameNode(g.value),W=O&&U||j[0];W?W.pathNodes.forEach(J=>C(J,!0)):g.value=void 0,F.forEach(J=>J.doCheck(!1)),on(j).forEach(J=>J.doCheck(!0)),v.value=j,Ye(D)},D=()=>{Zt&&f.value.forEach(R=>{const O=R?.$el;if(O){const N=O.querySelector(`.${s.namespace.value}-scrollbar__wrap`);let F=O.querySelector(`.${s.b("node")}.in-active-path`);if(!F){const j=O.querySelectorAll(`.${s.b("node")}.${s.is("active")}`);F=j[j.length-1]}uU(N,F)}})},q=R=>{const O=R.target,N=Bn(R);switch(N){case Me.up:case Me.down:{R.preventDefault();const F=N===Me.up?-1:1;Tw(OU(O,F,`.${s.b("node")}[tabindex="-1"]`));break}case Me.left:{R.preventDefault();const F=f.value[sN(O)-1],j=F?.$el.querySelector(`.${s.b("node")}[aria-expanded="true"]`);Tw(j);break}case Me.right:{R.preventDefault();const F=f.value[sN(O)+1],j=F?.$el.querySelector(`.${s.b("node")}[tabindex="-1"]`);Tw(j);break}case Me.enter:case Me.numpadEnter:xpe(O);break}};qt($C,on({config:a,expandingNode:g,checkedNodes:v,isHoverMenu:p,initialLoaded:c,renderLabelFn:b,lazyLoad:_,expandNode:C,handleCheckChange:S})),Se(a,(R,O)=>{$i(R,O)||y()},{immediate:!0}),Se(()=>i.options,y,{deep:!0}),Se(()=>i.modelValue,()=>{o=!1,A()},{deep:!0}),Se(()=>h.value,R=>{$i(R,i.modelValue)||(r(It,R),r(En,R))});const z=()=>{d.value||y()};return xI(()=>f.value=[]),Pt(()=>!xm(i.modelValue)&&A()),e({menuList:f,menus:m,checkedNodes:v,handleKeyDown:q,handleCheckChange:S,getFlattedNodes:T,getCheckedNodes:E,clearCheckedNodes:x,calculateCheckedValue:P,scrollToExpandingNode:D,loadLazyRootNodes:z}),(R,O)=>(B(),Q("div",{class:$([w(s).b("panel"),w(s).is("bordered",t.border)]),onKeydown:q},[(B(!0),Q(rt,null,gn(m.value,(N,F)=>(B(),_e(wpe,{key:F,ref_for:!0,ref:j=>f.value[F]=j,index:F,nodes:[...N]},{empty:ce(()=>[we(R.$slots,"empty")]),_:3},8,["index","nodes"]))),128))],34))}});const Ipe=sn(Ppe),Rpe=["placeholder"],Mpe=["onClick"];var Ope=le({name:"ElCascader",__name:"cascader",props:Zge,emits:Qge,setup(t,{expose:e,emit:n}){const i={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:Oe})=>{const{modifiersData:Fe,placement:st}=Oe;["right","left","bottom","top"].includes(st)||Fe.arrow&&(Fe.arrow.x=35)},requires:["arrow"]}]},r=t,o=n,s=Rf(),a=$o();let l=0,u=0;const c=De("cascader"),d=De("input"),f={small:7,default:11,large:15},{t:h}=Qt(),{formItem:m}=lo(),g=Oi(),{valueOnClear:v}=OC(r),{isComposing:p,handleComposition:b}=bR({afterComposition(Oe){var Fe;const st=(Fe=Oe.target)==null?void 0:Fe.value;gt(st)}}),y=H(),_=H(),C=H(),S=H(),k=H(),T=H(),E=H(!1),x=H(!1),P=H(!1),A=H(""),I=H(""),D=H([]),q=H([]),z=M(()=>r.props.multiple?r.collapseTags?D.value.slice(0,r.maxCollapseTags):D.value:[]),R=M(()=>r.props.multiple?r.collapseTags?D.value.slice(r.maxCollapseTags):[]:[]),O=M(()=>s.style),N=M(()=>{var Oe;return(Oe=r.placeholder)!=null?Oe:h("el.cascader.placeholder")}),F=M(()=>I.value||D.value.length>0||p.value?"":N.value),j=fr(),U=M(()=>j.value==="small"?"small":"default"),W=M(()=>!!r.props.multiple),J=M(()=>!r.filterable||W.value),ne=M(()=>W.value?I.value:A.value),he=M(()=>{var Oe;return((Oe=k.value)==null?void 0:Oe.checkedNodes)||[]}),{wrapperRef:X,isFocused:se,handleBlur:re}=dg(C,{disabled:g,beforeBlur(Oe){var Fe,st;return((Fe=y.value)==null?void 0:Fe.isFocusInsideContent(Oe))||((st=_.value)==null?void 0:st.isFocusInsideContent(Oe))},afterBlur(){var Oe;r.validateEvent&&((Oe=m?.validate)==null||Oe.call(m,"blur").catch(Fe=>void 0))}}),ee=M(()=>!r.clearable||g.value||P.value||!x.value&&!se.value?!1:!!he.value.length),te=M(()=>{const{showAllLevels:Oe,separator:Fe}=r,st=he.value;return st.length?W.value?"":st[0].calcText(Oe,Fe):""}),V=M(()=>m?.validateState||""),K=M({get(){return V_(r.modelValue)},set(Oe){const Fe=Oe??v.value;o(It,Fe),o(En,Fe),r.validateEvent&&m?.validate("change").catch(st=>void 0)}}),G=M(()=>[c.b(),c.m(j.value),c.is("disabled",g.value),s.class]),ye=M(()=>[d.e("icon"),"icon-arrow-down",c.is("reverse",E.value)]),be=M(()=>c.is("focus",se.value)),Ce=M(()=>{var Oe,Fe;return(Fe=(Oe=y.value)==null?void 0:Oe.popperRef)==null?void 0:Fe.contentRef}),Y=Oe=>{if(se.value){const Fe=new FocusEvent("blur",Oe);re(Fe)}Z(!1)},Z=Oe=>{var Fe,st;g.value||(Oe=Oe??!E.value,Oe!==E.value&&(E.value=Oe,(st=(Fe=C.value)==null?void 0:Fe.input)==null||st.setAttribute("aria-expanded",`${Oe}`),Oe?(ae(),k.value&&Ye(k.value.scrollToExpandingNode)):r.filterable&&kt(),o("visibleChange",Oe)))},ae=()=>{Ye(()=>{var Oe;(Oe=y.value)==null||Oe.updatePopper()})},pe=()=>{P.value=!1},je=Oe=>{const{showAllLevels:Fe,separator:st}=r;return{node:Oe,key:Oe.uid,text:Oe.calcText(Fe,st),hitState:!1,closable:!g.value&&!Oe.isDisabled}},Ie=Oe=>{var Fe;const st=Oe.node;st.doCheck(!1),(Fe=k.value)==null||Fe.calculateCheckedValue(),o("removeTag",st.valueByOption)},fe=()=>{switch(r.showCheckedStrategy){case"child":return he.value;case"parent":{const Oe=Ke(!1),Fe=Oe.map(Vn=>Vn.value);return Oe.filter(Vn=>!Vn.parent||!Fe.includes(Vn.parent.value))}default:return[]}},Te=()=>{if(!W.value)return;const Oe=fe(),Fe=[];Oe.forEach(st=>Fe.push(je(st))),D.value=Fe},et=()=>{var Oe,Fe;const{filterMethod:st,showAllLevels:Vn,separator:en}=r,Ue=(Fe=(Oe=k.value)==null?void 0:Oe.getFlattedNodes(!r.props.checkStrictly))==null?void 0:Fe.filter(tt=>tt.isDisabled?!1:(tt.calcText(Vn,en),st(tt,ne.value)));W.value&&D.value.forEach(tt=>{tt.hitState=!1}),P.value=!0,q.value=Ue,ae()},Re=()=>{var Oe;let Fe;P.value&&T.value?Fe=T.value.$el.querySelector(`.${c.e("suggestion-item")}`):Fe=(Oe=k.value)==null?void 0:Oe.$el.querySelector(`.${c.b("node")}[tabindex="-1"]`),Fe&&(Fe.focus(),!P.value&&Fe.click())},ze=()=>{var Oe,Fe,st;const Vn=(Oe=C.value)==null?void 0:Oe.input,en=S.value,Ue=(Fe=T.value)==null?void 0:Fe.$el;if(!(!Zt||!Vn)){if(Ue){const tt=Ue.querySelector(`.${c.e("suggestion-list")}`);tt.style.minWidth=`${Vn.offsetWidth}px`}if(en){const{offsetHeight:tt}=en,pt=D.value.length>0?`${Math.max(tt,l)-2}px`:`${l}px`;if(Vn.style.height=pt,a.prefix){const jr=(st=C.value)==null?void 0:st.$el.querySelector(`.${d.e("prefix")}`);let Uo=0;jr&&(Uo=jr.offsetWidth,Uo>0&&(Uo+=f[j.value||"default"])),en.style.left=`${Uo}px`}else en.style.left="0";ae()}}},Ke=Oe=>{var Fe;return(Fe=k.value)==null?void 0:Fe.getCheckedNodes(Oe)},Dt=Oe=>{ae(),o("expandChange",Oe)},Cn=Oe=>{if(p.value)return;switch(Bn(Oe)){case Me.enter:case Me.numpadEnter:Z();break;case Me.down:Z(!0),Ye(Re),Oe.preventDefault();break;case Me.esc:E.value===!0&&(Oe.preventDefault(),Oe.stopPropagation(),Z(!1));break;case Me.tab:Z(!1);break}},Je=()=>{var Oe;(Oe=k.value)==null||Oe.clearCheckedNodes(),!E.value&&r.filterable&&kt(),Z(!1),o("clear")},kt=()=>{const{value:Oe}=te;A.value=Oe,I.value=Oe},Et=Oe=>{var Fe,st;const{checked:Vn}=Oe;W.value?(Fe=k.value)==null||Fe.handleCheckChange(Oe,!Vn,!1):(!Vn&&((st=k.value)==null||st.handleCheckChange(Oe,!0,!1)),Z(!1))},ge=Oe=>{const Fe=Oe.target,st=Bn(Oe);switch(st){case Me.up:case Me.down:{Oe.preventDefault();const Vn=st===Me.up?-1:1;Tw(OU(Fe,Vn,`.${c.e("suggestion-item")}[tabindex="-1"]`));break}case Me.enter:case Me.numpadEnter:Fe.click();break}},Le=()=>{const Oe=D.value[D.value.length-1];u=I.value?0:u+1,!(!Oe||!u||r.collapseTags&&D.value.length>1)&&(Oe.hitState?Ie(Oe):Oe.hitState=!0)},de=M(()=>r.debounce),Ve=eR(()=>{const{value:Oe}=ne;if(!Oe)return;const Fe=r.beforeFilter(Oe);_v(Fe)?Fe.then(et).catch(()=>{}):Fe!==!1?et():pe()},de),gt=(Oe,Fe)=>{!E.value&&Z(!0),!Fe?.isComposing&&(Oe?Ve():pe())},an=Oe=>Number.parseFloat(Bce(d.cssVarName("input-height"),Oe).value)-2,Si=()=>{var Oe;(Oe=C.value)==null||Oe.focus()},uo=()=>{var Oe;(Oe=C.value)==null||Oe.blur()};return Se(P,ae),Se([he,g,()=>r.collapseTags,()=>r.maxCollapseTags],Te),Se(D,()=>{Ye(()=>ze())}),Se(j,async()=>{await Ye();const Oe=C.value.input;l=an(Oe)||l,ze()}),Se(te,kt,{immediate:!0}),Se(()=>E.value,Oe=>{var Fe;Oe&&r.props.lazy&&r.props.lazyLoad&&((Fe=k.value)==null||Fe.loadLazyRootNodes())}),Pt(()=>{const Oe=C.value.input,Fe=an(Oe);l=Oe.offsetHeight||Fe,nr(Oe,ze)}),e({getCheckedNodes:Ke,cascaderPanelRef:k,togglePopperVisible:Z,contentRef:Ce,presentText:te,focus:Si,blur:uo}),(Oe,Fe)=>(B(),_e(w(Lo),{ref_key:"tooltipRef",ref:y,visible:E.value,teleported:t.teleported,"popper-class":[w(c).e("dropdown"),t.popperClass],"popper-style":t.popperStyle,"popper-options":i,"fallback-placements":t.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:t.placement,transition:`${w(c).namespace.value}-zoom-in-top`,effect:t.effect,pure:"",persistent:t.persistent,onHide:pe},{default:ce(()=>[Vt((B(),Q("div",{ref_key:"wrapperRef",ref:X,class:$(G.value),style:mt(O.value),onClick:Fe[8]||(Fe[8]=()=>Z(J.value?void 0:!0)),onKeydown:Cn,onMouseenter:Fe[9]||(Fe[9]=st=>x.value=!0),onMouseleave:Fe[10]||(Fe[10]=st=>x.value=!1)},[L(w(cr),{ref_key:"inputRef",ref:C,modelValue:A.value,"onUpdate:modelValue":Fe[1]||(Fe[1]=st=>A.value=st),placeholder:F.value,readonly:J.value,disabled:w(g),"validate-event":!1,size:w(j),class:$(be.value),tabindex:W.value&&t.filterable&&!w(g)?-1:void 0,onCompositionstart:w(b),onCompositionupdate:w(b),onCompositionend:w(b),onInput:gt},kc({suffix:ce(()=>[ee.value?(B(),_e(w(He),{key:"clear",class:$([w(d).e("icon"),"icon-circle-close"]),onClick:Ot(Je,["stop"])},{default:ce(()=>[(B(),_e(Gt(t.clearIcon)))]),_:1},8,["class"])):(B(),_e(w(He),{key:"arrow-down",class:$(ye.value),onClick:Fe[0]||(Fe[0]=Ot(st=>Z(),["stop"]))},{default:ce(()=>[L(w(zc))]),_:1},8,["class"]))]),_:2},[Oe.$slots.prefix?{name:"prefix",fn:ce(()=>[we(Oe.$slots,"prefix")]),key:"0"}:void 0]),1032,["modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),W.value?(B(),Q("div",{key:0,ref_key:"tagWrapper",ref:S,class:$([w(c).e("tags"),w(c).is("validate",!!V.value)])},[we(Oe.$slots,"tag",{data:D.value,deleteTag:Ie},()=>[(B(!0),Q(rt,null,gn(z.value,st=>(B(),_e(w(jp),{key:st.key,type:t.tagType,size:U.value,effect:t.tagEffect,hit:st.hitState,closable:st.closable,"disable-transitions":"",onClose:Vn=>Ie(st)},{default:ce(()=>[ie("span",null,We(st.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128))]),t.collapseTags&&D.value.length>t.maxCollapseTags?(B(),_e(w(Lo),{key:0,ref_key:"tagTooltipRef",ref:_,disabled:E.value||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom","popper-class":t.popperClass,"popper-style":t.popperStyle,effect:t.effect,persistent:t.persistent},{default:ce(()=>[L(w(jp),{closable:!1,size:U.value,type:t.tagType,effect:t.tagEffect,"disable-transitions":""},{default:ce(()=>[ie("span",{class:$(w(c).e("tags-text"))}," + "+We(D.value.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect"])]),content:ce(()=>[L(w(gu),{"max-height":t.maxCollapseTagsTooltipHeight},{default:ce(()=>[ie("div",{class:$(w(c).e("collapse-tags"))},[(B(!0),Q(rt,null,gn(R.value,(st,Vn)=>(B(),Q("div",{key:Vn,class:$(w(c).e("collapse-tag"))},[(B(),_e(w(jp),{key:st.key,class:"in-tooltip",type:t.tagType,size:U.value,effect:t.tagEffect,hit:st.hitState,closable:st.closable,"disable-transitions":"",onClose:en=>Ie(st)},{default:ce(()=>[ie("span",null,We(st.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:1},8,["max-height"])]),_:1},8,["disabled","popper-class","popper-style","effect","persistent"])):ve("v-if",!0),t.filterable&&!w(g)?Vt((B(),Q("input",{key:1,"onUpdate:modelValue":Fe[2]||(Fe[2]=st=>I.value=st),type:"text",class:$(w(c).e("search-input")),placeholder:te.value?"":N.value,onInput:Fe[3]||(Fe[3]=st=>gt(I.value,st)),onClick:Fe[4]||(Fe[4]=Ot(st=>Z(!0),["stop"])),onKeydown:Pi(Le,["delete"]),onCompositionstart:Fe[5]||(Fe[5]=(...st)=>w(b)&&w(b)(...st)),onCompositionupdate:Fe[6]||(Fe[6]=(...st)=>w(b)&&w(b)(...st)),onCompositionend:Fe[7]||(Fe[7]=(...st)=>w(b)&&w(b)(...st))},null,42,Rpe)),[[Sre,I.value]]):ve("v-if",!0)],2)):ve("v-if",!0)],38)),[[w(wf),Y,Ce.value]])]),content:ce(()=>[Oe.$slots.header?(B(),Q("div",{key:0,class:$(w(c).e("header")),onClick:Fe[11]||(Fe[11]=Ot(()=>{},["stop"]))},[we(Oe.$slots,"header")],2)):ve("v-if",!0),Vt(L(w(Ipe),{ref_key:"cascaderPanelRef",ref:k,modelValue:K.value,"onUpdate:modelValue":Fe[12]||(Fe[12]=st=>K.value=st),options:t.options,props:r.props,border:!1,"render-label":Oe.$slots.default,onExpandChange:Dt,onClose:Fe[13]||(Fe[13]=st=>Oe.$nextTick(()=>Z(!1)))},{empty:ce(()=>[we(Oe.$slots,"empty")]),_:3},8,["modelValue","options","props","render-label"]),[[On,!P.value]]),t.filterable?Vt((B(),_e(w(gu),{key:1,ref_key:"suggestionPanel",ref:T,tag:"ul",class:$(w(c).e("suggestion-panel")),"view-class":w(c).e("suggestion-list"),onKeydown:ge},{default:ce(()=>[q.value.length?(B(!0),Q(rt,{key:0},gn(q.value,st=>(B(),Q("li",{key:st.uid,class:$([w(c).e("suggestion-item"),w(c).is("checked",st.checked)]),tabindex:-1,onClick:Vn=>Et(st)},[we(Oe.$slots,"suggestion-item",{item:st},()=>[ie("span",null,We(st.text),1),st.checked?(B(),_e(w(He),{key:0},{default:ce(()=>[L(w(LC))]),_:1})):ve("v-if",!0)])],10,Mpe))),128)):we(Oe.$slots,"empty",{key:1},()=>[ie("li",{class:$(w(c).e("empty-text"))},We(w(h)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[On,P.value]]):ve("v-if",!0),Oe.$slots.footer?(B(),Q("div",{key:2,class:$(w(c).e("footer")),onClick:Fe[14]||(Fe[14]=Ot(()=>{},["stop"]))},[we(Oe.$slots,"footer")],2)):ve("v-if",!0)]),_:3},8,["visible","teleported","popper-class","popper-style","fallback-placements","placement","transition","effect","persistent"]))}});const Lpe=sn(Ope);var Dpe=le({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=De("collapse-transition"),n=r=>{r.style.maxHeight="",r.style.overflow=r.dataset.oldOverflow,r.style.paddingTop=r.dataset.oldPaddingTop,r.style.paddingBottom=r.dataset.oldPaddingBottom},i={beforeEnter(r){r.dataset||(r.dataset={}),r.dataset.oldPaddingTop=r.style.paddingTop,r.dataset.oldPaddingBottom=r.style.paddingBottom,r.style.height&&(r.dataset.elExistsHeight=r.style.height),r.style.maxHeight=0,r.style.paddingTop=0,r.style.paddingBottom=0},enter(r){requestAnimationFrame(()=>{r.dataset.oldOverflow=r.style.overflow,r.dataset.elExistsHeight?r.style.maxHeight=r.dataset.elExistsHeight:r.scrollHeight!==0?r.style.maxHeight=`${r.scrollHeight}px`:r.style.maxHeight=0,r.style.paddingTop=r.dataset.oldPaddingTop,r.style.paddingBottom=r.dataset.oldPaddingBottom,r.style.overflow="hidden"})},afterEnter(r){r.style.maxHeight="",r.style.overflow=r.dataset.oldOverflow},enterCancelled(r){n(r)},beforeLeave(r){r.dataset||(r.dataset={}),r.dataset.oldPaddingTop=r.style.paddingTop,r.dataset.oldPaddingBottom=r.style.paddingBottom,r.dataset.oldOverflow=r.style.overflow,r.style.maxHeight=`${r.scrollHeight}px`,r.style.overflow="hidden"},leave(r){r.scrollHeight!==0&&(r.style.maxHeight=0,r.style.paddingTop=0,r.style.paddingBottom=0)},afterLeave(r){n(r)},leaveCancelled(r){n(r)}};return(r,o)=>(B(),_e(ya,Lt({name:w(e).b()},fie(i)),{default:ce(()=>[we(r.$slots,"default")]),_:3},16,["name"]))}});const Npe=sn(Dpe),kW=qe({modelValue:{type:me(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:String,disabled:Boolean,predefine:{type:me(Array)},validateEvent:{type:Boolean,default:!0}}),Bpe={[It]:t=>ot(t)||ir(t)},TW=Symbol("colorCommonPickerKey"),EW=Symbol("colorPickerPanelContextKey"),xW=qe({color:{type:me(Object),required:!0},vertical:Boolean,disabled:Boolean}),Vpe=xW;let xk=!1;function w2(t,e){if(!Zt)return;const n=function(o){var s;(s=e.drag)==null||s.call(e,o)},i=function(o){var s;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",i),document.onselectstart=null,document.ondragstart=null,xk=!1,(s=e.end)==null||s.call(e,o)},r=function(o){var s;xk||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),xk=!0,(s=e.start)==null||s.call(e,o))};t.addEventListener("mousedown",r),t.addEventListener("touchstart",r,{passive:!1})}const AW=t=>{let e,n;return t.type==="touchend"?(n=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(n=t.touches[0].clientY,e=t.touches[0].clientX):(n=t.clientY,e=t.clientX),{clientX:e,clientY:n}},PW=(t,{key:e,minValue:n,maxValue:i})=>{const r=Ct(),o=bi(),s=bi(),a=M(()=>t.color.get(e));function l(f){var h;if(t.disabled)return;f.target!==o.value&&u(f),(h=o.value)==null||h.focus()}function u(f){if(!s.value||!o.value||t.disabled)return;const m=r.vnode.el.getBoundingClientRect(),{clientX:g,clientY:v}=AW(f);let p;if(t.vertical){let b=v-m.top;b=Math.max(o.value.offsetHeight/2,b),b=Math.min(b,m.height-o.value.offsetHeight/2),p=Math.round((b-o.value.offsetHeight/2)/(m.height-o.value.offsetHeight)*i)}else{let b=g-m.left;b=Math.max(o.value.offsetWidth/2,b),b=Math.min(b,m.width-o.value.offsetWidth/2),p=Math.round((b-o.value.offsetWidth/2)/(m.width-o.value.offsetWidth)*i)}t.color.set(e,p)}function c(f){if(t.disabled)return;const{shiftKey:h}=f,m=Bn(f),g=h?10:1,v=e==="hue"?-1:1;let p=!0;switch(m){case Me.left:case Me.down:d(-g*v);break;case Me.right:case Me.up:d(g*v);break;case Me.home:t.color.set(e,e==="hue"?i:n);break;case Me.end:t.color.set(e,e==="hue"?n:i);break;case Me.pageDown:d(-4*v);break;case Me.pageUp:d(4*v);break;default:p=!1;break}p&&f.preventDefault()}function d(f){let h=a.value+f;h=h<n?n:h>i?i:h,t.color.set(e,h)}return{thumb:o,bar:s,currentValue:a,handleDrag:u,handleClick:l,handleKeydown:c}},IW=(t,{namespace:e,maxValue:n,bar:i,thumb:r,currentValue:o,handleDrag:s,getBackground:a})=>{const l=Ct(),u=De(e),c=H(0),d=H(0),f=H();function h(){if(!r.value||t.vertical)return 0;const C=l.vnode.el,S=o.value;return C?Math.round(S*(C.offsetWidth-r.value.offsetWidth/2)/n):0}function m(){if(!r.value)return 0;const C=l.vnode.el;if(!t.vertical)return 0;const S=o.value;return C?Math.round(S*(C.offsetHeight-r.value.offsetHeight/2)/n):0}function g(){c.value=h(),d.value=m(),f.value=a?.()}Pt(()=>{if(!i.value||!r.value)return;const C={drag:S=>{s(S)},end:S=>{s(S)}};w2(i.value,C),w2(r.value,C),g()}),Se(o,()=>g()),Se(()=>t.color.value,()=>g());const v=M(()=>[u.b(),u.is("vertical",t.vertical),u.is("disabled",t.disabled)]),p=M(()=>u.e("bar")),b=M(()=>u.e("thumb")),y=M(()=>({background:f.value})),_=M(()=>({left:zr(c.value),top:zr(d.value)}));return{rootKls:v,barKls:p,barStyle:y,thumbKls:b,thumbStyle:_,thumbLeft:c,thumbTop:d,update:g}},Fpe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],aN=0,Ak=100;var $pe=le({name:"ElColorAlphaSlider",__name:"alpha-slider",props:xW,setup(t,{expose:e}){const n=t,{currentValue:i,bar:r,thumb:o,handleDrag:s,handleClick:a,handleKeydown:l}=PW(n,{key:"alpha",minValue:aN,maxValue:Ak}),{rootKls:u,barKls:c,barStyle:d,thumbKls:f,thumbStyle:h,update:m}=IW(n,{namespace:"color-alpha-slider",maxValue:Ak,currentValue:i,bar:r,thumb:o,handleDrag:s,getBackground:b}),{t:g}=Qt(),v=M(()=>g("el.colorpicker.alphaLabel")),p=M(()=>g("el.colorpicker.alphaDescription",{alpha:i.value,color:n.color.value}));function b(){if(n.color&&n.color.value){const{r:y,g:_,b:C}=n.color.toRgb();return`linear-gradient(to right, rgba(${y}, ${_}, ${C}, 0) 0%, rgba(${y}, ${_}, ${C}, 1) 100%)`}return""}return e({update:m,bar:r,thumb:o}),(y,_)=>(B(),Q("div",{class:$(w(u))},[ie("div",{ref_key:"bar",ref:r,class:$(w(c)),style:mt(w(d)),onClick:_[0]||(_[0]=(...C)=>w(a)&&w(a)(...C))},null,6),ie("div",{ref_key:"thumb",ref:o,class:$(w(f)),style:mt(w(h)),"aria-label":v.value,"aria-valuenow":w(i),"aria-valuetext":p.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":aN,"aria-valuemax":Ak,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:_[1]||(_[1]=(...C)=>w(l)&&w(l)(...C))},null,46,Fpe)],2))}});const zpe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],lN=0,Pk=360;var Hpe=le({name:"ElColorHueSlider",__name:"hue-slider",props:Vpe,setup(t,{expose:e}){const n=t,{currentValue:i,bar:r,thumb:o,handleDrag:s,handleClick:a,handleKeydown:l}=PW(n,{key:"hue",minValue:lN,maxValue:Pk}),{rootKls:u,barKls:c,thumbKls:d,thumbStyle:f,thumbTop:h,update:m}=IW(n,{namespace:"color-hue-slider",maxValue:Pk,currentValue:i,bar:r,thumb:o,handleDrag:s}),{t:g}=Qt(),v=M(()=>g("el.colorpicker.hueLabel")),p=M(()=>g("el.colorpicker.hueDescription",{hue:i.value,color:n.color.value}));return e({bar:r,thumb:o,thumbTop:h,update:m}),(b,y)=>(B(),Q("div",{class:$(w(u))},[ie("div",{ref_key:"bar",ref:r,class:$(w(c)),onClick:y[0]||(y[0]=(..._)=>w(a)&&w(a)(..._))},null,2),ie("div",{ref_key:"thumb",ref:o,class:$(w(d)),style:mt(w(f)),"aria-label":v.value,"aria-valuenow":w(i),"aria-valuetext":p.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":lN,"aria-valuemax":Pk,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:y[1]||(y[1]=(..._)=>w(l)&&w(l)(..._))},null,46,zpe)],2))}});const Upe=qe({colors:{type:me(Array),required:!0},color:{type:me(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var Wpe=Object.defineProperty,qpe=(t,e,n)=>e in t?Wpe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xa=(t,e,n)=>qpe(t,typeof e!="symbol"?e+"":e,n);class H_{constructor(e={}){xa(this,"_hue",0),xa(this,"_saturation",100),xa(this,"_value",100),xa(this,"_alpha",100),xa(this,"_tiny",new Uh),xa(this,"_isValid",!1),xa(this,"enableAlpha",!1),xa(this,"format",""),xa(this,"value",""),xa(this,"selected");for(const n in e)Jt(e,n)&&(this[n]=e[n]);e.value?this.fromString(e.value):this.doOnChange()}set(e,n){if(arguments.length===1&&typeof e=="object"){for(const i in e)Jt(e,i)&&this.set(i,e[i]);return}this[`_${e}`]=n,this._isValid=!0,this.doOnChange()}get(e){return["hue","saturation","value","alpha"].includes(e)?Math.round(this[`_${e}`]):this[`_${e}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(e){const n=new Uh(e);if(this._isValid=n.isValid,n.isValid){const{h:i,s:r,v:o,a:s}=n.toHsv();this._hue=i,this._saturation=r*100,this._value=o*100,this._alpha=s*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}clear(){this._isValid=!1,this.value="",this._hue=0,this._saturation=100,this._value=100,this._alpha=100}compare(e){const n=new Uh({h:e._hue,s:e._saturation/100,v:e._value/100,a:e._alpha/100});return this._tiny.equals(n)}doOnChange(){const{_hue:e,_saturation:n,_value:i,_alpha:r,format:o,enableAlpha:s}=this;let a=o||(s?"rgb":"hex");o==="hex"&&s&&(a="hex8"),this._tiny=new Uh({h:e,s:n/100,v:i/100,a:r/100}),this.value=this._isValid?this._tiny.toString(a):""}}const jpe=t=>{const{currentColor:e}=Ne(EW),n=H(r(t.colors,t.color));Se(()=>e.value,o=>{const s=new H_({value:o,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=s.compare(a)})}),sl(()=>{n.value=r(t.colors,t.color)});function i(o){t.color.fromString(t.colors[o])}function r(o,s){return o.map(a=>{const l=new H_({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(s),l})}return{rgbaColors:n,handleSelect:i}},Kpe=t=>{const e=De("color-predefine"),n=M(()=>[e.b(),e.is("disabled",t.disabled)]),i=M(()=>e.e("colors"));function r(o){return[e.e("color-selector"),e.is("alpha",o.get("alpha")<100),{selected:o.selected}]}return{rootKls:n,colorsKls:i,colorSelectorKls:r}},Gpe=["disabled","aria-label","onClick"];var Ype=le({name:"ElColorPredefine",__name:"predefine",props:Upe,setup(t){const e=t,{rgbaColors:n,handleSelect:i}=jpe(e),{rootKls:r,colorsKls:o,colorSelectorKls:s}=Kpe(e),{t:a}=Qt(),l=u=>a("el.colorpicker.predefineDescription",{value:u});return(u,c)=>(B(),Q("div",{class:$(w(r))},[ie("div",{class:$(w(o))},[(B(!0),Q(rt,null,gn(w(n),(d,f)=>(B(),Q("button",{key:t.colors[f],type:"button",disabled:t.disabled,"aria-label":l(d.value),class:$(w(s)(d)),onClick:h=>w(i)(f)},[ie("div",{style:mt({backgroundColor:d.value})},null,4)],10,Gpe))),128))],2)],2))}});const Xpe=qe({color:{type:me(Object),required:!0},disabled:Boolean}),Jpe=t=>{const e=Ct(),n=H(),i=H(0),r=H(0),o=H("hsl(0, 100%, 50%)"),s=M(()=>t.color.get("saturation")),a=M(()=>t.color.get("value")),l=M(()=>t.color.get("hue"));function u(m){var g;if(t.disabled)return;m.target!==n.value&&c(m),(g=n.value)==null||g.focus({preventScroll:!0})}function c(m){if(t.disabled)return;const v=e.vnode.el.getBoundingClientRect(),{clientX:p,clientY:b}=AW(m);let y=p-v.left,_=b-v.top;y=Math.max(0,y),y=Math.min(y,v.width),_=Math.max(0,_),_=Math.min(_,v.height),r.value=y,i.value=_,t.color.set({saturation:y/v.width*100,value:100-_/v.height*100})}function d(m){if(t.disabled)return;const{shiftKey:g}=m,v=Bn(m),p=g?10:1;let b=!0;switch(v){case Me.left:f(-p);break;case Me.right:f(p);break;case Me.up:h(p);break;case Me.down:h(-p);break;default:b=!1;break}b&&m.preventDefault()}function f(m){let g=s.value+m;g=g<0?0:g>100?100:g,t.color.set("saturation",g)}function h(m){let g=a.value+m;g=g<0?0:g>100?100:g,t.color.set("value",g)}return{cursorRef:n,cursorTop:i,cursorLeft:r,background:o,saturation:s,brightness:a,hue:l,handleClick:u,handleDrag:c,handleKeydown:d}},Zpe=(t,{cursorTop:e,cursorLeft:n,background:i,handleDrag:r})=>{const o=Ct(),s=De("color-svpanel");function a(){const f=t.color.get("saturation"),h=t.color.get("value"),m=o.vnode.el,{clientWidth:g,clientHeight:v}=m;n.value=f*g/100,e.value=(100-h)*v/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}Pt(()=>{w2(o.vnode.el,{drag:f=>{r(f)},end:f=>{r(f)}}),a()}),Se([()=>t.color.get("hue"),()=>t.color.get("value"),()=>t.color.value],()=>a());const l=M(()=>s.b()),u=M(()=>s.e("cursor")),c=M(()=>({backgroundColor:i.value})),d=M(()=>({top:zr(e.value),left:zr(n.value)}));return{rootKls:l,cursorKls:u,rootStyle:c,cursorStyle:d,update:a}},Qpe=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var eve=le({name:"ElSvPanel",__name:"sv-panel",props:Xpe,setup(t,{expose:e}){const n=t,{cursorRef:i,cursorTop:r,cursorLeft:o,background:s,saturation:a,brightness:l,handleClick:u,handleDrag:c,handleKeydown:d}=Jpe(n),{rootKls:f,cursorKls:h,rootStyle:m,cursorStyle:g,update:v}=Zpe(n,{cursorTop:r,cursorLeft:o,background:s,handleDrag:c}),{t:p}=Qt(),b=M(()=>p("el.colorpicker.svLabel")),y=M(()=>p("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:v}),(_,C)=>(B(),Q("div",{class:$(w(f)),style:mt(w(m)),onClick:C[1]||(C[1]=(...S)=>w(u)&&w(u)(...S))},[ie("div",{ref_key:"cursorRef",ref:i,class:$(w(h)),style:mt(w(g)),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":b.value,"aria-valuenow":`${w(a)},${w(l)}`,"aria-valuetext":y.value,onKeydown:C[0]||(C[0]=(...S)=>w(d)&&w(d)(...S))},null,46,Qpe)],6))}});const RW=(t,e)=>{const n=on(new H_({enableAlpha:t.showAlpha,format:t.colorFormat||"",value:t.modelValue}));return Se(()=>[t.colorFormat,t.showAlpha],()=>{n.enableAlpha=t.showAlpha,n.format=t.colorFormat||n.format,n.doOnChange(),e(It,n.value)}),{color:n}};var tve=le({name:"ElColorPickerPanel",__name:"color-picker-panel",props:kW,emits:Bpe,setup(t,{expose:e,emit:n}){const i=t,r=n,o=De("color-picker-panel"),{formItem:s}=lo(),a=Oi(),l=H(),u=H(),c=H(),d=H(),f=H(""),{color:h}=Ne(TW,()=>RW(i,r),!0);function m(){h.fromString(f.value),h.value!==f.value&&(f.value=h.value)}function g(){var p;i.validateEvent&&((p=s?.validate)==null||p.call(s,"blur").catch(b=>void 0))}function v(){var p,b,y;(p=l.value)==null||p.update(),(b=u.value)==null||b.update(),(y=c.value)==null||y.update()}return Pt(()=>{i.modelValue&&(f.value=h.value),Ye(v)}),Se(()=>i.modelValue,p=>{p!==h.value&&(p?h.fromString(p):h.clear())}),Se(()=>h.value,p=>{r(It,p),f.value=p,i.validateEvent&&s?.validate("change").catch(b=>void 0)}),qt(EW,{currentColor:M(()=>h.value)}),e({color:h,inputRef:d,update:v}),(p,b)=>(B(),Q("div",{class:$([w(o).b(),w(o).is("disabled",w(a)),w(o).is("border",t.border)]),onFocusout:g},[ie("div",{class:$(w(o).e("wrapper"))},[L(Hpe,{ref_key:"hueRef",ref:l,class:"hue-slider",color:w(h),vertical:"",disabled:w(a)},null,8,["color","disabled"]),L(eve,{ref_key:"svRef",ref:u,color:w(h),disabled:w(a)},null,8,["color","disabled"])],2),t.showAlpha?(B(),_e($pe,{key:0,ref_key:"alphaRef",ref:c,color:w(h),disabled:w(a)},null,8,["color","disabled"])):ve("v-if",!0),t.predefine?(B(),_e(Ype,{key:1,ref:"predefine","enable-alpha":t.showAlpha,color:w(h),colors:t.predefine,disabled:w(a)},null,8,["enable-alpha","color","colors","disabled"])):ve("v-if",!0),ie("div",{class:$(w(o).e("footer"))},[L(w(cr),{ref_key:"inputRef",ref:d,modelValue:f.value,"onUpdate:modelValue":b[0]||(b[0]=y=>f.value=y),"validate-event":!1,size:"small",disabled:w(a),onChange:m},null,8,["modelValue","disabled"]),we(p.$slots,"footer")],2)],34))}});const nve=sn(tve),ive=qe({persistent:{type:Boolean,default:!0},modelValue:{type:me(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:String,disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:$r,popperClass:Mn.popperClass,popperStyle:Mn.popperStyle,tabindex:{type:[String,Number],default:0},teleported:Mn.teleported,appendTo:Mn.appendTo,predefine:{type:me(Array)},validateEvent:{type:Boolean,default:!0},...Gb,...hs(["ariaLabel"])}),rve={[It]:t=>ot(t)||ir(t),[En]:t=>ot(t)||ir(t),activeChange:t=>ot(t)||ir(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},ove=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var sve=le({name:"ElColorPicker",__name:"color-picker",props:ive,emits:rve,setup(t,{expose:e,emit:n}){const i=t,r=n,{t:o}=Qt(),s=De("color"),{formItem:a}=lo(),l=fr(),u=Oi(),{valueOnClear:c,isEmptyValue:d}=OC(i,null),f=RW(i,r),{inputId:h,isLabeledByFormItem:m}=Au(i,{formItemContext:a}),g=H(),v=H(),p=H(),b=H(!1),y=H(!1);let _=!0;const{isFocused:C,handleFocus:S,handleBlur:k}=dg(v,{disabled:u,beforeBlur(ee){var te;return(te=g.value)==null?void 0:te.isFocusInsideContent(ee)},afterBlur(){var ee;z(!1),F(),i.validateEvent&&((ee=a?.validate)==null||ee.call(a,"blur").catch(te=>void 0))}}),T=Cce(()=>{var ee,te;return(te=(ee=p.value)==null?void 0:ee.color)!=null?te:f.color}),E=M(()=>ZI(i,Object.keys(kW))),x=M(()=>!i.modelValue&&!y.value?"transparent":q(T,i.showAlpha)),P=M(()=>!i.modelValue&&!y.value?"":T.value),A=M(()=>m.value?void 0:i.ariaLabel||o("el.colorpicker.defaultLabel")),I=M(()=>m.value?a?.labelId:void 0),D=M(()=>[s.b("picker"),s.is("disabled",u.value),s.bm("picker",l.value),s.is("focused",C.value)]);function q(ee,te){const{r:V,g:K,b:G,a:ye}=ee.toRgb();return te?`rgba(${V}, ${K}, ${G}, ${ye})`:`rgb(${V}, ${K}, ${G})`}function z(ee){b.value=ee}const R=ul(z,100,{leading:!0});function O(){u.value||z(!0)}function N(){R(!1),F()}function F(){Ye(()=>{i.modelValue?T.fromString(i.modelValue):(T.value="",Ye(()=>{y.value=!1}))})}function j(){u.value||(b.value&&F(),R(!b.value))}function U(){const ee=d(T.value)?c.value:T.value;r(It,ee),r(En,ee),i.validateEvent&&a?.validate("change").catch(te=>void 0),R(!1),Ye(()=>{const te=new H_({enableAlpha:i.showAlpha,format:i.colorFormat||"",value:i.modelValue});T.compare(te)||F()})}function W(){R(!1),r(It,c.value),r(En,c.value),i.modelValue!==c.value&&i.validateEvent&&a?.validate("change").catch(ee=>void 0),F(),r("clear")}function J(){var ee,te;(te=(ee=p?.value)==null?void 0:ee.inputRef)==null||te.focus()}function ne(){b.value&&(N(),C.value&&se())}function he(ee){ee.preventDefault(),ee.stopPropagation(),z(!1),F()}function X(ee){switch(Bn(ee)){case Me.enter:case Me.numpadEnter:case Me.space:ee.preventDefault(),ee.stopPropagation(),O();break;case Me.esc:he(ee);break}}function se(){v.value.focus()}function re(){v.value.blur()}return Se(()=>P.value,ee=>{_&&r("activeChange",ee),_=!0}),Se(()=>T.value,()=>{!i.modelValue&&!y.value&&(y.value=!0)}),Se(()=>i.modelValue,ee=>{ee?ee&&ee!==T.value&&(_=!1,T.fromString(ee)):y.value=!1}),Se(()=>b.value,()=>{p.value&&Ye(p.value.update)}),qt(TW,f),e({color:T,show:O,hide:N,focus:se,blur:re}),(ee,te)=>(B(),_e(w(Lo),{ref_key:"popper",ref:g,visible:b.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[w(s).be("picker","panel"),t.popperClass],"popper-style":t.popperStyle,"stop-popper-mouse-event":!1,pure:"",loop:"",role:"dialog",effect:"light",trigger:"click",teleported:t.teleported,transition:`${w(s).namespace.value}-zoom-in-top`,persistent:t.persistent,"append-to":t.appendTo,onShow:J,onHide:te[2]||(te[2]=V=>z(!1))},{content:ce(()=>[Vt((B(),_e(w(nve),Lt({ref_key:"pickerPanelRef",ref:p},E.value,{border:!1,"validate-event":!1,onKeydown:Pi(he,["esc"])}),{footer:ce(()=>[ie("div",null,[t.clearable?(B(),_e(w(Hi),{key:0,class:$(w(s).be("footer","link-btn")),text:"",size:"small",onClick:W},{default:ce(()=>[dt(We(w(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):ve("v-if",!0),L(w(Hi),{plain:"",size:"small",class:$(w(s).be("footer","btn")),onClick:U},{default:ce(()=>[dt(We(w(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[w(wf),ne,v.value]])]),default:ce(()=>[ie("div",Lt({id:w(h),ref_key:"triggerRef",ref:v},ee.$attrs,{class:D.value,role:"button","aria-label":A.value,"aria-labelledby":I.value,"aria-description":w(o)("el.colorpicker.description",{color:t.modelValue||""}),"aria-disabled":w(u),tabindex:w(u)?void 0:t.tabindex,onKeydown:X,onFocus:te[0]||(te[0]=(...V)=>w(S)&&w(S)(...V)),onBlur:te[1]||(te[1]=(...V)=>w(k)&&w(k)(...V))}),[ie("div",{class:$(w(s).be("picker","trigger")),onClick:j},[ie("span",{class:$([w(s).be("picker","color"),w(s).is("alpha",t.showAlpha)])},[ie("span",{class:$(w(s).be("picker","color-inner")),style:mt({backgroundColor:x.value})},[Vt(L(w(He),{class:$([w(s).be("picker","icon"),w(s).is("icon-arrow-down")])},{default:ce(()=>[L(w(zc))]),_:1},8,["class"]),[[On,t.modelValue||y.value]]),Vt(L(w(He),{class:$([w(s).be("picker","empty"),w(s).is("icon-close")])},{default:ce(()=>[L(w(cl))]),_:1},8,["class"]),[[On,!t.modelValue&&!y.value]])],6)],2)],2)],16,ove)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}});const ave=sn(sve),lve=qe({a11y:{type:Boolean,default:!0},locale:{type:me(Object)},size:$r,button:{type:me(Object)},card:{type:me(Object)},dialog:{type:me(Object)},link:{type:me(Object)},experimentalFeatures:{type:me(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:me(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Gb}),uve={placement:"top"},cve=le({name:"ElConfigProvider",props:lve,setup(t,{slots:e}){const n=aU(t);return Se(()=>t.message,i=>{var r,o;Object.assign(uve,(o=(r=n?.value)==null?void 0:r.message)!=null?o:{},i??{})},{immediate:!0,deep:!0}),()=>we(e,"default",{config:n?.value})}}),MW=sn(cve);var dve=le({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=$o(),i=De("container"),r=M(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(s=>{const a=s.type.name;return a==="ElHeader"||a==="ElFooter"}):!1);return(o,s)=>(B(),Q("section",{class:$([w(i).b(),w(i).is("vertical",r.value)])},[we(o.$slots,"default")],2))}}),OW=le({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=De("aside"),i=M(()=>e.width?n.cssVarBlock({width:e.width}):{});return(r,o)=>(B(),Q("aside",{class:$(w(n).b()),style:mt(i.value)},[we(r.$slots,"default")],6))}}),LW=le({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=De("footer"),i=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(r,o)=>(B(),Q("footer",{class:$(w(n).b()),style:mt(i.value)},[we(r.$slots,"default")],6))}}),DW=le({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=De("header"),i=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(r,o)=>(B(),Q("header",{class:$(w(n).b()),style:mt(i.value)},[we(r.$slots,"default")],6))}}),NW=le({name:"ElMain",__name:"main",setup(t){const e=De("main");return(n,i)=>(B(),Q("main",{class:$(w(e).b())},[we(n.$slots,"default")],2))}});const uN=sn(dve,{Aside:OW,Footer:LW,Header:DW,Main:NW}),fve=Zi(OW);Zi(LW);const hve=Zi(DW),mve=Zi(NW);var Pw={exports:{}},gve=Pw.exports,cN;function pve(){return cN||(cN=1,(function(t,e){(function(n,i){t.exports=i()})(gve,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},u=function(v){return(v=+v)+(v>68?1900:2e3)},c=function(v){return function(p){this[v]=+p}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(p){if(!p||p==="Z")return 0;var b=p.match(/([+-]|\d\d)/g),y=60*b[1]+(+b[2]||0);return y===0?0:b[0]==="+"?-y:y})(v)}],f=function(v){var p=l[v];return p&&(p.indexOf?p:p.s.concat(p.f))},h=function(v,p){var b,y=l.meridiem;if(y){for(var _=1;_<=24;_+=1)if(v.indexOf(y(_,0,p))>-1){b=_>12;break}}else b=v===(p?"pm":"PM");return b},m={A:[a,function(v){this.afternoon=h(v,!1)}],a:[a,function(v){this.afternoon=h(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[o,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[o,c("day")],Do:[a,function(v){var p=l.ordinal,b=v.match(/\d+/);if(this.day=b[0],p)for(var y=1;y<=31;y+=1)p(y).replace(/\[|\]/g,"")===v&&(this.day=y)}],w:[s,c("week")],ww:[o,c("week")],M:[s,c("month")],MM:[o,c("month")],MMM:[a,function(v){var p=f("months"),b=(f("monthsShort")||p.map((function(y){return y.slice(0,3)}))).indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[a,function(v){var p=f("months").indexOf(v)+1;if(p<1)throw new Error;this.month=p%12||p}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(v){this.year=u(v)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function g(v){var p,b;p=v,b=l&&l.formats;for(var y=(v=p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(x,P,A){var I=A&&A.toUpperCase();return P||b[A]||n[A]||b[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(D,q,z){return q||z.slice(1)}))}))).match(i),_=y.length,C=0;C<_;C+=1){var S=y[C],k=m[S],T=k&&k[0],E=k&&k[1];y[C]=E?{regex:T,parser:E}:S.replace(/^\[|\]$/g,"")}return function(x){for(var P={},A=0,I=0;A<_;A+=1){var D=y[A];if(typeof D=="string")I+=D.length;else{var q=D.regex,z=D.parser,R=x.slice(I),O=q.exec(R)[0];z.call(P,O),x=x.replace(O,"")}}return(function(N){var F=N.afternoon;if(F!==void 0){var j=N.hours;F?j<12&&(N.hours+=12):j===12&&(N.hours=0),delete N.afternoon}})(P),P}}return function(v,p,b){b.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var y=p.prototype,_=y.parse;y.parse=function(C){var S=C.date,k=C.utc,T=C.args;this.$u=k;var E=T[1];if(typeof E=="string"){var x=T[2]===!0,P=T[3]===!0,A=x||P,I=T[2];P&&(I=T[2]),l=this.$locale(),!x&&I&&(l=b.Ls[I]),this.$d=(function(R,O,N,F){try{if(["x","X"].indexOf(O)>-1)return new Date((O==="X"?1e3:1)*R);var j=g(O)(R),U=j.year,W=j.month,J=j.day,ne=j.hours,he=j.minutes,X=j.seconds,se=j.milliseconds,re=j.zone,ee=j.week,te=new Date,V=J||(U||W?1:te.getDate()),K=U||te.getFullYear(),G=0;U&&!W||(G=W>0?W-1:te.getMonth());var ye,be=ne||0,Ce=he||0,Y=X||0,Z=se||0;return re?new Date(Date.UTC(K,G,V,be,Ce,Y,Z+60*re.offset*1e3)):N?new Date(Date.UTC(K,G,V,be,Ce,Y,Z)):(ye=new Date(K,G,V,be,Ce,Y,Z),ee&&(ye=F(ye).week(ee).toDate()),ye)}catch{return new Date("")}})(S,E,k,b),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),A&&S!=this.format(E)&&(this.$d=new Date("")),l={}}else if(E instanceof Array)for(var D=E.length,q=1;q<=D;q+=1){T[1]=E[q-1];var z=b.apply(this,T);if(z.isValid()){this.$d=z.$d,this.$L=z.$L,this.init();break}q===D&&(this.$d=new Date(""))}else _.call(this,C)}}}))})(Pw)),Pw.exports}var vve=pve();const BW=wl(vve),dN=["hours","minutes","seconds"],ha="EP_PICKER_BASE",AR="ElPopperOptions",VW=Symbol("commonPickerContextKey"),Om="HH:mm:ss",lc="YYYY-MM-DD",bve={date:lc,dates:lc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${lc} ${Om}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:lc,datetimerange:`${lc} ${Om}`},FW=(t,e)=>{const{lang:n}=Qt(),i=H(!1),r=H(!1),o=H(null),s=M(()=>{const{modelValue:m}=t;return!m||Pe(m)&&!m.filter(Boolean).length}),a=m=>{if(!nW(t.modelValue,m)){let g;Pe(m)?g=m.map(p=>QD(p,t.valueFormat,n.value)):m&&(g=QD(m,t.valueFormat,n.value)),e(It,m&&g,n.value)}},l=M(()=>{var m;let g;if(s.value?u.value.getDefaultValue&&(g=u.value.getDefaultValue()):Pe(t.modelValue)?g=t.modelValue.map(v=>ZD(v,t.valueFormat,n.value)):g=ZD((m=t.modelValue)!=null?m:"",t.valueFormat,n.value),u.value.getRangeAvailableTime){const v=u.value.getRangeAvailableTime(g);$i(v,g)||(g=v,s.value||a(xw(g)))}return Pe(g)&&g.some(v=>!v)&&(g=[]),g}),u=H({});return{parsedValue:l,pickerActualVisible:r,pickerOptions:u,pickerVisible:i,userInput:o,valueIsEmpty:s,emitInput:a,onCalendarChange:m=>{e("calendar-change",m)},onPanelChange:(m,g,v)=>{e("panel-change",m,g,v)},onPick:(m="",g=!1)=>{i.value=g;let v;Pe(m)?v=m.map(p=>p.toDate()):v=m&&m.toDate(),o.value=null,a(v)},onSetPickerOption:m=>{u.value[m[0]]=m[1],u.value.panelReady=!0}}},PR=qe({disabledHours:{type:me(Function)},disabledMinutes:{type:me(Function)},disabledSeconds:{type:me(Function)}}),$W=qe({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),IR=qe({automaticDropdown:{type:Boolean,default:!0},id:{type:me([Array,String])},name:{type:me([Array,String])},popperClass:Mn.popperClass,popperStyle:Mn.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:me([String,Object]),default:Nf},editable:{type:Boolean,default:!0},prefixIcon:{type:me([String,Object]),default:""},size:$r,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:me(Object),default:()=>({})},modelValue:{type:me([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:me([Date,Array])},defaultTime:{type:me([Date,Array])},isRange:Boolean,...PR,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:me([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:me(String),values:xu,default:"bottom"},fallbackPlacements:{type:me(Array),default:["bottom","top","right","left"]},...Gb,...hs(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),yve=qe({id:{type:me(Array)},name:{type:me(Array)},modelValue:{type:me([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),wve=["id","name","placeholder","value","disabled"],_ve=["id","name","placeholder","value","disabled"];var Cve=le({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:yve,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const i=t,r=n,{formItem:o}=lo(),{inputId:s}=Au(on({id:M(()=>{var T;return(T=i.id)==null?void 0:T[0]})}),{formItemContext:o}),a=vR(),l=De("date"),u=De("range"),c=H(),d=H(),{wrapperRef:f,isFocused:h}=dg(c,{disabled:M(()=>i.disabled)}),m=T=>{r("click",T)},g=T=>{r("mouseenter",T)},v=T=>{r("mouseleave",T)},p=T=>{r("touchstart",T)},b=T=>{r("startInput",T)},y=T=>{r("endInput",T)},_=T=>{r("startChange",T)},C=T=>{r("endChange",T)};return e({focus:()=>{var T;(T=c.value)==null||T.focus()},blur:()=>{var T,E;(T=c.value)==null||T.blur(),(E=d.value)==null||E.blur()}}),(T,E)=>(B(),Q("div",{ref_key:"wrapperRef",ref:f,class:$([w(l).is("active",w(h)),T.$attrs.class]),style:mt(T.$attrs.style),onClick:m,onMouseenter:g,onMouseleave:v,onTouchstartPassive:p},[we(T.$slots,"prefix"),ie("input",Lt(w(a),{id:w(s),ref_key:"inputRef",ref:c,name:T.name&&T.name[0],placeholder:T.startPlaceholder,value:T.modelValue&&T.modelValue[0],class:w(u).b("input"),disabled:T.disabled,onInput:b,onChange:_}),null,16,wve),we(T.$slots,"range-separator"),ie("input",Lt(w(a),{id:T.id&&T.id[1],ref_key:"endInputRef",ref:d,name:T.name&&T.name[1],placeholder:T.endPlaceholder,value:T.modelValue&&T.modelValue[1],class:w(u).b("input"),disabled:T.disabled,onInput:y,onChange:C}),null,16,_ve),we(T.$slots,"suffix")],38))}}),zW=le({name:"Picker",__name:"picker",props:IR,emits:[It,En,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const i=t,r=n,o=Rf(),s=De("date"),a=De("input"),l=De("range"),{formItem:u}=lo(),c=Ne(AR,{}),d=OC(i,null),f=H(),h=H(),m=H(null);let g=!1;const v=Oi(),p=FW(i,r),{parsedValue:b,pickerActualVisible:y,userInput:_,pickerVisible:C,pickerOptions:S,valueIsEmpty:k,emitInput:T,onPick:E,onSetPickerOption:x,onCalendarChange:P,onPanelChange:A}=p,{isFocused:I,handleFocus:D,handleBlur:q}=dg(h,{disabled:v,beforeFocus(){return i.readonly},afterFocus(){i.automaticDropdown&&(C.value=!0)},beforeBlur(de){var Ve;return!g&&((Ve=f.value)==null?void 0:Ve.isFocusInsideContent(de))},afterBlur(){Te(),C.value=!1,g=!1,i.validateEvent&&u?.validate("blur").catch(de=>void 0)}}),z=H(!1),R=M(()=>[s.b("editor"),s.bm("editor",i.type),a.e("wrapper"),s.is("disabled",v.value),s.is("active",C.value),l.b("editor"),je?l.bm("editor",je.value):"",o.class]),O=M(()=>[a.e("icon"),l.e("close-icon"),ye.value?"":l.em("close-icon","hidden")]);Se(C,de=>{de?Ye(()=>{de&&(m.value=i.modelValue)}):(_.value=null,Ye(()=>{N(i.modelValue)}))});const N=(de,Ve)=>{(Ve||!nW(de,m.value))&&(r(En,de),Ve&&(m.value=de),i.validateEvent&&u?.validate("change").catch(gt=>void 0))},F=de=>{r("keydown",de)},j=M(()=>h.value?Array.from(h.value.$el.querySelectorAll("input")):[]),U=(de,Ve,gt)=>{const an=j.value;an.length&&(!gt||gt==="min"?(an[0].setSelectionRange(de,Ve),an[0].focus()):gt==="max"&&(an[1].setSelectionRange(de,Ve),an[1].focus()))},W=()=>{y.value=!0},J=()=>{r("visible-change",!0)},ne=()=>{y.value=!1,C.value=!1,r("visible-change",!1)},he=()=>{C.value=!0},X=()=>{C.value=!1},se=M(()=>{const de=Re(b.value);return Pe(_.value)?[_.value[0]||de&&de[0]||"",_.value[1]||de&&de[1]||""]:_.value!==null?_.value:!ee.value&&k.value||!C.value&&k.value?"":de?te.value||V.value||K.value?de.join(", "):de:""}),re=M(()=>i.type.includes("time")),ee=M(()=>i.type.startsWith("time")),te=M(()=>i.type==="dates"),V=M(()=>i.type==="months"),K=M(()=>i.type==="years"),G=M(()=>i.prefixIcon||(re.value?hde:cU)),ye=M(()=>i.clearable&&!v.value&&!i.readonly&&!k.value&&(z.value||I.value)),be=de=>{i.readonly||v.value||(ye.value&&(de?.stopPropagation(),S.value.handleClear?S.value.handleClear():T(d.valueOnClear.value),N(d.valueOnClear.value,!0),ne()),r("clear"))},Ce=async de=>{var Ve;i.readonly||v.value||(((Ve=de.target)==null?void 0:Ve.tagName)!=="INPUT"||I.value||!i.automaticDropdown)&&(C.value=!0)},Y=()=>{i.readonly||v.value||!k.value&&i.clearable&&(z.value=!0)},Z=()=>{z.value=!1},ae=de=>{var Ve;i.readonly||v.value||(((Ve=de.touches[0].target)==null?void 0:Ve.tagName)!=="INPUT"||I.value||!i.automaticDropdown)&&(C.value=!0)},pe=M(()=>i.type.includes("range")),je=fr(),Ie=M(()=>{var de,Ve;return(Ve=(de=w(f))==null?void 0:de.popperRef)==null?void 0:Ve.contentRef}),fe=QH(h,de=>{const Ve=w(Ie),gt=Yi(h);Ve&&(de.target===Ve||de.composedPath().includes(Ve))||de.target===gt||gt&&de.composedPath().includes(gt)||(C.value=!1)});Sn(()=>{fe?.()});const Te=()=>{if(_.value){const de=et(se.value);de&&(ze(de)&&T(xw(de)),_.value=null)}_.value===""&&(T(d.valueOnClear.value),N(d.valueOnClear.value,!0),_.value=null)},et=de=>de?S.value.parseUserInput(de):null,Re=de=>de?Pe(de)?de.map(gt=>gt.format(i.format)):de.format(i.format):null,ze=de=>S.value.isValidValue(de),Ke=async de=>{if(i.readonly||v.value)return;const Ve=Bn(de);if(F(de),Ve===Me.esc){C.value===!0&&(C.value=!1,de.preventDefault(),de.stopPropagation());return}if(Ve===Me.down&&(S.value.handleFocusPicker&&(de.preventDefault(),de.stopPropagation()),C.value===!1&&(C.value=!0,await Ye()),S.value.handleFocusPicker)){S.value.handleFocusPicker();return}if(Ve===Me.tab){g=!0;return}if(Ve===Me.enter||Ve===Me.numpadEnter){C.value?(_.value===null||_.value===""||ze(et(se.value)))&&(Te(),C.value=!1):C.value=!0,de.preventDefault(),de.stopPropagation();return}if(_.value){de.stopPropagation();return}S.value.handleKeydownInput&&S.value.handleKeydownInput(de)},Dt=de=>{_.value=de,C.value||(C.value=!0)},Cn=de=>{const Ve=de.target;_.value?_.value=[Ve.value,_.value[1]]:_.value=[Ve.value,null]},Je=de=>{const Ve=de.target;_.value?_.value=[_.value[0],Ve.value]:_.value=[null,Ve.value]},kt=()=>{var de;const Ve=_.value,gt=et(Ve&&Ve[0]),an=w(b);if(gt&&gt.isValid()){_.value=[Re(gt),((de=se.value)==null?void 0:de[1])||null];const Si=[gt,an&&(an[1]||null)];ze(Si)&&(T(xw(Si)),_.value=null)}},Et=()=>{var de;const Ve=w(_),gt=et(Ve&&Ve[1]),an=w(b);if(gt&&gt.isValid()){_.value=[((de=w(se))==null?void 0:de[0])||null,Re(gt)];const Si=[an&&an[0],gt];ze(Si)&&(T(xw(Si)),_.value=null)}},ge=()=>{var de;(de=h.value)==null||de.focus()},Le=()=>{var de;(de=h.value)==null||de.blur()};return qt(ha,{props:i,emptyValues:d}),qt(VW,p),e({focus:ge,blur:Le,handleOpen:he,handleClose:X,onPick:E}),(de,Ve)=>(B(),_e(w(Lo),Lt({ref_key:"refPopper",ref:f,visible:w(C),effect:"light",pure:"",trigger:"click"},de.$attrs,{role:"dialog",teleported:"",transition:`${w(s).namespace.value}-zoom-in-top`,"popper-class":[`${w(s).namespace.value}-picker__popper`,de.popperClass],"popper-style":de.popperStyle,"popper-options":w(c),"fallback-placements":de.fallbackPlacements,"gpu-acceleration":!1,placement:de.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:W,onShow:J,onHide:ne}),{default:ce(()=>[pe.value?(B(),_e(Cve,{key:1,id:de.id,ref_key:"inputRef",ref:h,"model-value":se.value,name:de.name,disabled:w(v),readonly:!de.editable||de.readonly,"start-placeholder":de.startPlaceholder,"end-placeholder":de.endPlaceholder,class:$(R.value),style:mt(de.$attrs.style),"aria-label":de.ariaLabel,tabindex:de.tabindex,autocomplete:"off",role:"combobox",onClick:Ce,onFocus:w(D),onBlur:w(q),onStartInput:Cn,onStartChange:kt,onEndInput:Je,onEndChange:Et,onMousedown:Ce,onMouseenter:Y,onMouseleave:Z,onTouchstartPassive:ae,onKeydown:Ke},{prefix:ce(()=>[G.value?(B(),_e(w(He),{key:0,class:$([w(a).e("icon"),w(l).e("icon")])},{default:ce(()=>[(B(),_e(Gt(G.value)))]),_:1},8,["class"])):ve("v-if",!0)]),"range-separator":ce(()=>[we(de.$slots,"range-separator",{},()=>[ie("span",{class:$(w(l).b("separator"))},We(de.rangeSeparator),3)])]),suffix:ce(()=>[de.clearIcon?(B(),_e(w(He),{key:0,class:$(O.value),onMousedown:Ot(w(tn),["prevent"]),onClick:be},{default:ce(()=>[(B(),_e(Gt(de.clearIcon)))]),_:1},8,["class","onMousedown"])):ve("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(B(),_e(w(cr),{key:0,id:de.id,ref_key:"inputRef",ref:h,"container-role":"combobox","model-value":se.value,name:de.name,size:w(je),disabled:w(v),placeholder:de.placeholder,class:$([w(s).b("editor"),w(s).bm("editor",de.type),w(s).is("focus",w(C)),de.$attrs.class]),style:mt(de.$attrs.style),readonly:!de.editable||de.readonly||te.value||V.value||K.value||de.type==="week","aria-label":de.ariaLabel,tabindex:de.tabindex,"validate-event":!1,onInput:Dt,onFocus:w(D),onBlur:w(q),onKeydown:Ke,onChange:Te,onMousedown:Ce,onMouseenter:Y,onMouseleave:Z,onTouchstartPassive:ae,onClick:Ve[0]||(Ve[0]=Ot(()=>{},["stop"]))},{prefix:ce(()=>[G.value?(B(),_e(w(He),{key:0,class:$(w(a).e("icon")),onMousedown:Ot(Ce,["prevent"]),onTouchstartPassive:ae},{default:ce(()=>[(B(),_e(Gt(G.value)))]),_:1},8,["class"])):ve("v-if",!0)]),suffix:ce(()=>[ye.value&&de.clearIcon?(B(),_e(w(He),{key:0,class:$(`${w(a).e("icon")} clear-icon`),onMousedown:Ot(w(tn),["prevent"]),onClick:be},{default:ce(()=>[(B(),_e(Gt(de.clearIcon)))]),_:1},8,["class","onMousedown"])):ve("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:ce(()=>[we(de.$slots,"default",{visible:w(C),actualVisible:w(y),parsedValue:w(b),format:de.format,dateFormat:de.dateFormat,timeFormat:de.timeFormat,unlinkPanels:de.unlinkPanels,type:de.type,defaultValue:de.defaultValue,showNow:de.showNow,showConfirm:de.showConfirm,showFooter:de.showFooter,showWeekNumber:de.showWeekNumber,onPick:Ve[1]||(Ve[1]=(...gt)=>w(E)&&w(E)(...gt)),onSelectRange:U,onSetPickerOption:Ve[2]||(Ve[2]=(...gt)=>w(x)&&w(x)(...gt)),onCalendarChange:Ve[3]||(Ve[3]=(...gt)=>w(P)&&w(P)(...gt)),onClear:be,onPanelChange:Ve[4]||(Ve[4]=(...gt)=>w(A)&&w(A)(...gt)),onMousedown:Ve[5]||(Ve[5]=Ot(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}});const Sve=qe({...$W,datetimeRole:String,parsedValue:{type:me(Object)}}),HW=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const i=(s,a,l,u)=>{const c={hour:t,minute:e,second:n};let d=s;return["hour","minute","second"].forEach(f=>{if(c[f]){let h;const m=c[f];switch(f){case"minute":{h=m(d.hour(),a,u);break}case"second":{h=m(d.hour(),d.minute(),a,u);break}default:{h=m(a,u);break}}if(h?.length&&!h.includes(d[f]())){const g=l?0:h.length-1;d=d[f](h[g])}}}),d},r={};return{timePickerOptions:r,getAvailableTime:i,onSetOption:([s,a])=>{r[s]=a}}},Ik=t=>{const e=(i,r)=>i||r,n=i=>i!==!0;return t.map(e).filter(n)},UW=(t,e,n)=>({getHoursList:(s,a)=>Tk(24,t&&(()=>t?.(s,a))),getMinutesList:(s,a,l)=>Tk(60,e&&(()=>e?.(s,a,l))),getSecondsList:(s,a,l,u)=>Tk(60,n&&(()=>n?.(s,a,l,u)))}),WW=(t,e,n)=>{const{getHoursList:i,getMinutesList:r,getSecondsList:o}=UW(t,e,n);return{getAvailableHours:(u,c)=>Ik(i(u,c)),getAvailableMinutes:(u,c,d)=>Ik(r(u,c,d)),getAvailableSeconds:(u,c,d,f)=>Ik(o(u,c,d,f))}},qW=t=>{const e=H(t.parsedValue);return Se(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},kve=qe({role:{type:String,required:!0},spinnerDate:{type:me(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:me(String),default:""},...PR}),Tve=100,Eve=600,z0="_RepeatClick",U_={beforeMount(t,e){const n=e.value,{interval:i=Tve,delay:r=Eve}=Xe(n)?{}:n;let o,s;const a=()=>Xe(n)?n():n.handler(),l=()=>{s&&(clearTimeout(s),s=void 0),o&&(clearInterval(o),o=void 0)},u=c=>{c.button===0&&(l(),a(),document.addEventListener("mouseup",l,{once:!0}),s=setTimeout(()=>{o=setInterval(()=>{a()},i)},r))};t[z0]={start:u,clear:l},t.addEventListener("mousedown",u)},unmounted(t){if(!t[z0])return;const{start:e,clear:n}=t[z0];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[z0]=null}},xve=["onClick"],Ave=["onMouseenter"];var _2=le({__name:"basic-time-spinner",props:kve,emits:[En,"select-range","set-option"],setup(t,{emit:e}){const n=t,i=Ne(ha),{isRange:r,format:o}=i.props,s=e,a=De("time"),{getHoursList:l,getMinutesList:u,getSecondsList:c}=UW(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let d=!1;const f=H(),v={hours:H(),minutes:H(),seconds:H()},p=M(()=>n.showSeconds?dN:dN.slice(0,2)),b=M(()=>{const{spinnerDate:W}=n,J=W.hour(),ne=W.minute(),he=W.second();return{hours:J,minutes:ne,seconds:he}}),y=M(()=>{const{hours:W,minutes:J}=w(b),{role:ne,spinnerDate:he}=n,X=r?void 0:he;return{hours:l(ne,X),minutes:u(W,ne,X),seconds:c(W,J,ne,X)}}),_=M(()=>{const{hours:W,minutes:J,seconds:ne}=w(b);return{hours:kk(W,23),minutes:kk(J,59),seconds:kk(ne,59)}}),C=ul(W=>{d=!1,T(W)},200),S=W=>{if(!!!n.amPmMode)return"";const ne=n.amPmMode==="A";let he=W<12?" am":" pm";return ne&&(he=he.toUpperCase()),he},k=W=>{let J=[0,0];const ne=o||Om,he=ne.indexOf("HH"),X=ne.indexOf("mm"),se=ne.indexOf("ss");switch(W){case"hours":he!==-1&&(J=[he,he+2]);break;case"minutes":X!==-1&&(J=[X,X+2]);break;case"seconds":se!==-1&&(J=[se,se+2]);break}const[re,ee]=J;s("select-range",re,ee),f.value=W},T=W=>{P(W,w(b)[W])},E=()=>{T("hours"),T("minutes"),T("seconds")},x=W=>W.querySelector(`.${a.namespace.value}-scrollbar__wrap`),P=(W,J)=>{if(n.arrowControl)return;const ne=w(v[W]);ne&&ne.$el&&(x(ne.$el).scrollTop=Math.max(0,J*A(W)))},A=W=>{const J=w(v[W]),ne=J?.$el.querySelector("li");return ne&&Number.parseFloat(sc(ne,"height"))||0},I=()=>{q(1)},D=()=>{q(-1)},q=W=>{f.value||k("hours");const J=f.value,ne=w(b)[J],he=f.value==="hours"?24:60,X=z(J,ne,W,he);R(J,X),P(J,X),Ye(()=>k(J))},z=(W,J,ne,he)=>{let X=(J+ne+he)%he;const se=w(y)[W];for(;se[X]&&X!==J;)X=(X+ne+he)%he;return X},R=(W,J)=>{if(w(y)[W][J])return;const{hours:X,minutes:se,seconds:re}=w(b);let ee;switch(W){case"hours":ee=n.spinnerDate.hour(J).minute(se).second(re);break;case"minutes":ee=n.spinnerDate.hour(X).minute(J).second(re);break;case"seconds":ee=n.spinnerDate.hour(X).minute(se).second(J);break}s(En,ee)},O=(W,{value:J,disabled:ne})=>{ne||(R(W,J),k(W),P(W,J))},N=W=>{const J=w(v[W]);if(!J)return;d=!0,C(W);const ne=Math.min(Math.round((x(J.$el).scrollTop-(F(W)*.5-10)/A(W)+3)/A(W)),W==="hours"?23:59);R(W,ne)},F=W=>w(v[W]).$el.offsetHeight,j=()=>{const W=J=>{const ne=w(v[J]);ne&&ne.$el&&(x(ne.$el).onscroll=()=>{N(J)})};W("hours"),W("minutes"),W("seconds")};Pt(()=>{Ye(()=>{!n.arrowControl&&j(),E(),n.role==="start"&&k("hours")})});const U=(W,J)=>{v[J].value=W??void 0};return s("set-option",[`${n.role}_scrollDown`,q]),s("set-option",[`${n.role}_emitSelectRange`,k]),Se(()=>n.spinnerDate,()=>{d||E()}),(W,J)=>(B(),Q("div",{class:$([w(a).b("spinner"),{"has-seconds":W.showSeconds}])},[W.arrowControl?ve("v-if",!0):(B(!0),Q(rt,{key:0},gn(p.value,ne=>(B(),_e(w(gu),{key:ne,ref_for:!0,ref:he=>U(he,ne),class:$(w(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":w(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:he=>k(ne),onMousemove:he=>T(ne)},{default:ce(()=>[(B(!0),Q(rt,null,gn(y.value[ne],(he,X)=>(B(),Q("li",{key:X,class:$([w(a).be("spinner","item"),w(a).is("active",X===b.value[ne]),w(a).is("disabled",he)]),onClick:se=>O(ne,{value:X,disabled:he})},[ne==="hours"?(B(),Q(rt,{key:0},[dt(We(("0"+(W.amPmMode?X%12||12:X)).slice(-2))+We(S(X)),1)],64)):(B(),Q(rt,{key:1},[dt(We(("0"+X).slice(-2)),1)],64))],10,xve))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),W.arrowControl?(B(!0),Q(rt,{key:1},gn(p.value,ne=>(B(),Q("div",{key:ne,class:$([w(a).be("spinner","wrapper"),w(a).is("arrow")]),onMouseenter:he=>k(ne)},[Vt((B(),_e(w(He),{class:$(["arrow-up",w(a).be("spinner","arrow")])},{default:ce(()=>[L(w(sR))]),_:1},8,["class"])),[[w(U_),D]]),Vt((B(),_e(w(He),{class:$(["arrow-down",w(a).be("spinner","arrow")])},{default:ce(()=>[L(w(zc))]),_:1},8,["class"])),[[w(U_),I]]),ie("ul",{class:$(w(a).be("spinner","list"))},[(B(!0),Q(rt,null,gn(_.value[ne],(he,X)=>(B(),Q("li",{key:X,class:$([w(a).be("spinner","item"),w(a).is("active",he===b.value[ne]),w(a).is("disabled",y.value[ne][he])])},[w(St)(he)?(B(),Q(rt,{key:0},[ne==="hours"?(B(),Q(rt,{key:0},[dt(We(("0"+(W.amPmMode?he%12||12:he)).slice(-2))+We(S(he)),1)],64)):(B(),Q(rt,{key:1},[dt(We(("0"+he).slice(-2)),1)],64))],64)):ve("v-if",!0)],2))),128))],2)],42,Ave))),128)):ve("v-if",!0)],2))}}),W_=le({__name:"panel-time-pick",props:Sve,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,r=Ne(ha),{arrowControl:o,disabledHours:s,disabledMinutes:a,disabledSeconds:l,defaultValue:u}=r.props,{getAvailableHours:c,getAvailableMinutes:d,getAvailableSeconds:f}=WW(s,a,l),h=De("time"),{t:m,lang:g}=Qt(),v=H([0,2]),p=qW(n),b=M(()=>pn(n.actualVisible)?`${h.namespace.value}-zoom-in-top`:""),y=M(()=>n.format.includes("ss")),_=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),C=O=>{const N=ft(O).locale(g.value),F=q(N);return N.isSame(F)},S=()=>{const O=p.value;i("pick",O,!1),Ye(()=>{p.value=O})},k=(O=!1,N=!1)=>{N||i("pick",n.parsedValue,O)},T=O=>{if(!n.visible)return;const N=q(O).millisecond(0);i("pick",N,!0)},E=(O,N)=>{i("select-range",O,N),v.value=[O,N]},x=O=>{const N=n.format,F=N.indexOf("HH"),j=N.indexOf("mm"),U=N.indexOf("ss"),W=[],J=[];F!==-1&&(W.push(F),J.push("hours")),j!==-1&&(W.push(j),J.push("minutes")),U!==-1&&y.value&&(W.push(U),J.push("seconds"));const he=(W.indexOf(v.value[0])+O+W.length)%W.length;A.start_emitSelectRange(J[he])},P=O=>{const N=Bn(O),{left:F,right:j,up:U,down:W}=Me;if([F,j].includes(N)){x(N===F?-1:1),O.preventDefault();return}if([U,W].includes(N)){const J=N===U?-1:1;A.start_scrollDown(J),O.preventDefault();return}},{timePickerOptions:A,onSetOption:I,getAvailableTime:D}=HW({getAvailableHours:c,getAvailableMinutes:d,getAvailableSeconds:f}),q=O=>D(O,n.datetimeRole||"",!0),z=O=>O?ft(O,n.format).locale(g.value):null,R=()=>ft(u).locale(g.value);return i("set-picker-option",["isValidValue",C]),i("set-picker-option",["parseUserInput",z]),i("set-picker-option",["handleKeydownInput",P]),i("set-picker-option",["getRangeAvailableTime",q]),i("set-picker-option",["getDefaultValue",R]),(O,N)=>(B(),_e(ya,{name:b.value},{default:ce(()=>[O.actualVisible||O.visible?(B(),Q("div",{key:0,class:$(w(h).b("panel"))},[ie("div",{class:$([w(h).be("panel","content"),{"has-seconds":y.value}])},[L(_2,{ref:"spinner",role:O.datetimeRole||"start","arrow-control":w(o),"show-seconds":y.value,"am-pm-mode":_.value,"spinner-date":O.parsedValue,"disabled-hours":w(s),"disabled-minutes":w(a),"disabled-seconds":w(l),onChange:T,onSetOption:w(I),onSelectRange:E},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),ie("div",{class:$(w(h).be("panel","footer"))},[ie("button",{type:"button",class:$([w(h).be("panel","btn"),"cancel"]),onClick:S},We(w(m)("el.datepicker.cancel")),3),ie("button",{type:"button",class:$([w(h).be("panel","btn"),"confirm"]),onClick:N[0]||(N[0]=F=>k())},We(w(m)("el.datepicker.confirm")),3)],2)],2)):ve("v-if",!0)]),_:1},8,["name"]))}});const Pve=qe({...$W,parsedValue:{type:me(Array)}}),Ive=["disabled"];var Rve=le({__name:"panel-time-range",props:Pve,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,r=(te,V)=>{const K=[];for(let G=te;G<=V;G++)K.push(G);return K},{t:o,lang:s}=Qt(),a=De("time"),l=De("picker"),u=Ne(ha),{arrowControl:c,disabledHours:d,disabledMinutes:f,disabledSeconds:h,defaultValue:m}=u.props,g=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",c),C.value?"has-seconds":""]),v=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",c),C.value?"has-seconds":""]),p=M(()=>n.parsedValue[0]),b=M(()=>n.parsedValue[1]),y=qW(n),_=()=>{const te=y.value;i("pick",te,!1),Ye(()=>{y.value=te})},C=M(()=>n.format.includes("ss")),S=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),k=(te=!1)=>{i("pick",[p.value,b.value],te)},T=te=>{P(te.millisecond(0),b.value)},E=te=>{P(p.value,te.millisecond(0))},x=te=>{const V=te.map(G=>ft(G).locale(s.value)),K=U(V);return V[0].isSame(K[0])&&V[1].isSame(K[1])},P=(te,V)=>{n.visible&&i("pick",[te,V],!0)},A=M(()=>p.value>b.value),I=H([0,2]),D=(te,V)=>{i("select-range",te,V,"min"),I.value=[te,V]},q=M(()=>C.value?11:8),z=(te,V)=>{i("select-range",te,V,"max");const K=w(q);I.value=[te+K,V+K]},R=te=>{const V=C.value?[0,3,6,11,14,17]:[0,3,8,11],K=["hours","minutes"].concat(C.value?["seconds"]:[]),ye=(V.indexOf(I.value[0])+te+V.length)%V.length,be=V.length/2;ye<be?he.start_emitSelectRange(K[ye]):he.end_emitSelectRange(K[ye-be])},O=te=>{const V=Bn(te),{left:K,right:G,up:ye,down:be}=Me;if([K,G].includes(V)){R(V===K?-1:1),te.preventDefault();return}if([ye,be].includes(V)){const Ce=V===ye?-1:1,Y=I.value[0]<q.value?"start":"end";he[`${Y}_scrollDown`](Ce),te.preventDefault();return}},N=(te,V)=>{const K=d?d(te):[],G=te==="start",be=(V||(G?b.value:p.value)).hour(),Ce=G?r(be+1,23):r(0,be-1);return bk(K,Ce)},F=(te,V,K)=>{const G=f?f(te,V):[],ye=V==="start",be=K||(ye?b.value:p.value),Ce=be.hour();if(te!==Ce)return G;const Y=be.minute(),Z=ye?r(Y+1,59):r(0,Y-1);return bk(G,Z)},j=(te,V,K,G)=>{const ye=h?h(te,V,K):[],be=K==="start",Ce=G||(be?b.value:p.value),Y=Ce.hour(),Z=Ce.minute();if(te!==Y||V!==Z)return ye;const ae=Ce.second(),pe=be?r(ae+1,59):r(0,ae-1);return bk(ye,pe)},U=([te,V])=>[X(te,"start",!0,V),X(V,"end",!1,te)],{getAvailableHours:W,getAvailableMinutes:J,getAvailableSeconds:ne}=WW(N,F,j),{timePickerOptions:he,getAvailableTime:X,onSetOption:se}=HW({getAvailableHours:W,getAvailableMinutes:J,getAvailableSeconds:ne}),re=te=>te?Pe(te)?te.map(V=>ft(V,n.format).locale(s.value)):ft(te,n.format).locale(s.value):null,ee=()=>{if(Pe(m))return m.map(V=>ft(V).locale(s.value));const te=ft(m).locale(s.value);return[te,te.add(60,"m")]};return i("set-picker-option",["parseUserInput",re]),i("set-picker-option",["isValidValue",x]),i("set-picker-option",["handleKeydownInput",O]),i("set-picker-option",["getDefaultValue",ee]),i("set-picker-option",["getRangeAvailableTime",U]),(te,V)=>te.actualVisible?(B(),Q("div",{key:0,class:$([w(a).b("range-picker"),w(l).b("panel")])},[ie("div",{class:$(w(a).be("range-picker","content"))},[ie("div",{class:$(w(a).be("range-picker","cell"))},[ie("div",{class:$(w(a).be("range-picker","header"))},We(w(o)("el.datepicker.startTime")),3),ie("div",{class:$(g.value)},[L(_2,{ref:"minSpinner",role:"start","show-seconds":C.value,"am-pm-mode":S.value,"arrow-control":w(c),"spinner-date":p.value,"disabled-hours":N,"disabled-minutes":F,"disabled-seconds":j,onChange:T,onSetOption:w(se),onSelectRange:D},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),ie("div",{class:$(w(a).be("range-picker","cell"))},[ie("div",{class:$(w(a).be("range-picker","header"))},We(w(o)("el.datepicker.endTime")),3),ie("div",{class:$(v.value)},[L(_2,{ref:"maxSpinner",role:"end","show-seconds":C.value,"am-pm-mode":S.value,"arrow-control":w(c),"spinner-date":b.value,"disabled-hours":N,"disabled-minutes":F,"disabled-seconds":j,onChange:E,onSetOption:w(se),onSelectRange:z},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),ie("div",{class:$(w(a).be("panel","footer"))},[ie("button",{type:"button",class:$([w(a).be("panel","btn"),"cancel"]),onClick:V[0]||(V[0]=K=>_())},We(w(o)("el.datepicker.cancel")),3),ie("button",{type:"button",class:$([w(a).be("panel","btn"),"confirm"]),disabled:A.value,onClick:V[1]||(V[1]=K=>k())},We(w(o)("el.datepicker.confirm")),11,Ive)],2)],2)):ve("v-if",!0)}});ft.extend(BW);var Mve=le({name:"ElTimePicker",install:null,props:{...IR,isRange:Boolean},emits:[It],setup(t,e){const n=H(),[i,r]=t.isRange?["timerange",Rve]:["time",W_],o=s=>e.emit(It,s);return qt(AR,t.popperOptions),e.expose({focus:()=>{var s;(s=n.value)==null||s.focus()},blur:()=>{var s;(s=n.value)==null||s.blur()},handleOpen:()=>{var s;(s=n.value)==null||s.handleOpen()},handleClose:()=>{var s;(s=n.value)==null||s.handleClose()}}),()=>{var s;const a=(s=t.format)!=null?s:Om;return L(zW,Lt(t,{ref:n,type:i,format:a,"onUpdate:modelValue":o}),{default:l=>L(r,l,null)})}}});const Ove=sn(Mve);var Iw={exports:{}},Lve=Iw.exports,fN;function Dve(){return fN||(fN=1,(function(t,e){(function(n,i){t.exports=i()})(Lve,(function(){return function(n,i){var r=i.prototype,o=r.format;r.format=function(s){var a=this,l=this.$locale();if(!this.isValid())return o.bind(this)(s);var u=this.$utils(),c=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return u.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}}));return o.bind(this)(c)}}}))})(Iw)),Iw.exports}var Nve=Dve();const Bve=wl(Nve);var Rw={exports:{}},Vve=Rw.exports,hN;function Fve(){return hN||(hN=1,(function(t,e){(function(n,i){t.exports=i()})(Vve,(function(){var n="week",i="year";return function(r,o,s){var a=o.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var c=s(this).startOf(i).add(1,i).date(u),d=s(this).endOf(n);if(c.isBefore(d))return 1}var f=s(this).startOf(i).date(u).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?s(this).startOf("week").week():Math.ceil(h)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(Rw)),Rw.exports}var $ve=Fve();const zve=wl($ve);var Mw={exports:{}},Hve=Mw.exports,mN;function Uve(){return mN||(mN=1,(function(t,e){(function(n,i){t.exports=i()})(Hve,(function(){return function(n,i){i.prototype.weekYear=function(){var r=this.month(),o=this.week(),s=this.year();return o===1&&r===11?s+1:r===0&&o>=52?s-1:s}}}))})(Mw)),Mw.exports}var Wve=Uve();const qve=wl(Wve);var Ow={exports:{}},jve=Ow.exports,gN;function Kve(){return gN||(gN=1,(function(t,e){(function(n,i){t.exports=i()})(jve,(function(){return function(n,i,r){i.prototype.dayOfYear=function(o){var s=Math.round((r(this).startOf("day")-r(this).startOf("year"))/864e5)+1;return o==null?s:this.add(o-s,"day")}}}))})(Ow)),Ow.exports}var Gve=Kve();const Yve=wl(Gve);var Lw={exports:{}},Xve=Lw.exports,pN;function Jve(){return pN||(pN=1,(function(t,e){(function(n,i){t.exports=i()})(Xve,(function(){return function(n,i){i.prototype.isSameOrAfter=function(r,o){return this.isSame(r,o)||this.isAfter(r,o)}}}))})(Lw)),Lw.exports}var Zve=Jve();const Qve=wl(Zve);var Dw={exports:{}},ebe=Dw.exports,vN;function tbe(){return vN||(vN=1,(function(t,e){(function(n,i){t.exports=i()})(ebe,(function(){return function(n,i){i.prototype.isSameOrBefore=function(r,o){return this.isSame(r,o)||this.isBefore(r,o)}}}))})(Dw)),Dw.exports}var nbe=tbe();const ibe=wl(nbe),rbe=qe({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:me([Date,Array,String,Number]),default:""},defaultValue:{type:me([Date,Array])},defaultTime:{type:me([Date,Array])},isRange:Boolean,...PR,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,unlinkPanels:Boolean,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:Boolean,showWeekNumber:Boolean,type:{type:me(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),RR=Symbol("rootPickerContextKey"),Qb="ElIsDefaultFormat",obe=["date","dates","year","years","month","months","week","range"],MR=qe({cellClassName:{type:me(Function)},disabledDate:{type:me(Function)},date:{type:me(Object),required:!0},minDate:{type:me(Object)},maxDate:{type:me(Object)},parsedValue:{type:me([Object,Array])},rangeState:{type:me(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),jW=qe({type:{type:me(String),required:!0,values:mge},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean,border:Boolean,disabled:Boolean,editable:{type:Boolean,default:!0}}),OR=qe({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:me(Array)}}),LR=t=>({type:String,values:obe,default:t}),sbe=qe({...jW,parsedValue:{type:me([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),zv=t=>{if(!Pe(t))return!1;const[e,n]=t;return ft.isDayjs(e)&&ft.isDayjs(n)&&ft(e).isValid()&&ft(n).isValid()&&e.isSameOrBefore(n)},zC=(t,{lang:e,step:n=1,unit:i,unlinkPanels:r})=>{let o;if(Pe(t)){let[s,a]=t.map(l=>ft(l).locale(e));return r||(a=s.add(n,i)),[s,a]}else t?o=ft(t):o=ft();return o=o.locale(e),[o,o.add(n,i)]},abe=(t,e,{columnIndexOffset:n,startDate:i,nextEndDate:r,now:o,unit:s,relativeDateGetter:a,setCellMetadata:l,setRowMetadata:u})=>{for(let c=0;c<t.row;c++){const d=e[c];for(let f=0;f<t.column;f++){let h=d[f+n];h||(h={row:c,column:f,type:"normal",inRange:!1,start:!1,end:!1});const m=c*t.column+f,g=a(m);h.dayjs=g,h.date=g.toDate(),h.timestamp=g.valueOf(),h.type="normal",h.inRange=!!(i&&g.isSameOrAfter(i,s)&&r&&g.isSameOrBefore(r,s))||!!(i&&g.isSameOrBefore(i,s)&&r&&g.isSameOrAfter(r,s)),i?.isSameOrAfter(r)?(h.start=!!r&&g.isSame(r,s),h.end=i&&g.isSame(i,s)):(h.start=!!i&&g.isSame(i,s),h.end=!!r&&g.isSame(r,s)),g.isSame(o,s)&&(h.type="today"),l?.(h,{rowIndex:c,columnIndex:f}),d[f+n]=h}u?.(d)}},q_=(t,e,n,i)=>{const r=ft().locale(i).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second()),o=r.daysInMonth();return QU(o).map(s=>r.add(s,"day").toDate())},Lm=(t,e,n,i,r)=>{const o=ft().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),s=q_(t,e,n,i).find(a=>!r?.(a));return s?ft(s).locale(i):o.locale(i)},j_=(t,e,n)=>{const i=t.year();if(!n?.(t.toDate()))return t.locale(e);const r=t.month();if(!q_(t,i,r,e).every(n))return Lm(t,i,r,e,n);for(let o=0;o<12;o++)if(!q_(t,i,o,e).every(n))return Lm(t,i,o,e,n);return t},Dm=(t,e,n,i)=>{if(Pe(t))return t.map(r=>Dm(r,e,n,i));if(ot(t)){const r=i?.value?ft(t):ft(t,e);if(!r.isValid())return r}return ft(t,e).locale(n)},lbe=qe({...MR,showWeekNumber:Boolean,selectionMode:LR("date")}),ube=["changerange","pick","select"],K_=(t="")=>["normal","today"].includes(t),cbe=(t,e)=>{const{lang:n}=Qt(),i=H(),r=H(),o=H(),s=H(),a=H([[],[],[],[],[],[]]);let l=!1;const u=t.date.$locale().weekStart||7,c=t.date.locale("en").localeData().weekdaysShort().map(N=>N.toLowerCase()),d=M(()=>u>3?7-u:-u),f=M(()=>{const N=t.date.startOf("month");return N.subtract(N.day()||7,"day")}),h=M(()=>c.concat(c).slice(u,u+7)),m=M(()=>N_(w(_)).some(N=>N.isCurrent)),g=M(()=>{const N=t.date.startOf("month"),F=N.day()||7,j=N.daysInMonth(),U=N.subtract(1,"month").daysInMonth();return{startOfMonthDay:F,dateCountOfMonth:j,dateCountOfLastMonth:U}}),v=M(()=>t.selectionMode==="dates"?Br(t.parsedValue):[]),p=(N,{count:F,rowIndex:j,columnIndex:U})=>{const{startOfMonthDay:W,dateCountOfMonth:J,dateCountOfLastMonth:ne}=w(g),he=w(d);if(j>=0&&j<=1){const X=W+he<0?7+W+he:W+he;if(U+j*7>=X)return N.text=F,!0;N.text=ne-(X-U%7)+1+j*7,N.type="prev-month"}else return F<=J?N.text=F:(N.text=F-J,N.type="next-month"),!0;return!1},b=(N,{columnIndex:F,rowIndex:j},U)=>{const{disabledDate:W,cellClassName:J}=t,ne=w(v),he=p(N,{count:U,rowIndex:j,columnIndex:F}),X=N.dayjs.toDate();return N.selected=ne.find(se=>se.isSame(N.dayjs,"day")),N.isSelected=!!N.selected,N.isCurrent=S(N),N.disabled=W?.(X),N.customClass=J?.(X),he},y=N=>{if(t.selectionMode==="week"){const[F,j]=t.showWeekNumber?[1,7]:[0,6],U=O(N[F+1]);N[F].inRange=U,N[F].start=U,N[j].inRange=U,N[j].end=U}},_=M(()=>{const{minDate:N,maxDate:F,rangeState:j,showWeekNumber:U}=t,W=w(d),J=w(a),ne="day";let he=1;if(abe({row:6,column:7},J,{startDate:N,columnIndexOffset:U?1:0,nextEndDate:j.endDate||F||j.selecting&&N||null,now:ft().locale(w(n)).startOf(ne),unit:ne,relativeDateGetter:X=>w(f).add(X-W,ne),setCellMetadata:(...X)=>{b(...X,he)&&(he+=1)},setRowMetadata:y}),U)for(let X=0;X<6;X++)J[X][1].dayjs&&(J[X][0]={type:"week",text:J[X][1].dayjs.week()});return J});Se(()=>t.date,async()=>{var N;(N=w(i))!=null&&N.contains(document.activeElement)&&(await Ye(),await C())});const C=async()=>{var N;return(N=w(r))==null?void 0:N.focus()},S=N=>t.selectionMode==="date"&&K_(N.type)&&k(N,t.parsedValue),k=(N,F)=>F?ft(F).locale(w(n)).isSame(t.date.date(Number(N.text)),"day"):!1,T=(N,F)=>{const j=w(g).startOfMonthDay,U=w(d),W=j+U<0?7+j+U:j+U,J=N*7+(F-(t.showWeekNumber?1:0));return t.date.startOf("month").subtract(W,"day").add(J,"day")},E=N=>{var F;if(!t.rangeState.selecting)return;let j=N.target;if(j.tagName==="SPAN"&&(j=(F=j.parentNode)==null?void 0:F.parentNode),j.tagName==="DIV"&&(j=j.parentNode),j.tagName!=="TD")return;const U=j.parentNode.rowIndex-1,W=j.cellIndex;w(_)[U][W].disabled||(U!==w(o)||W!==w(s))&&(o.value=U,s.value=W,e("changerange",{selecting:!0,endDate:T(U,W)}))},x=N=>!w(m)&&N?.text===1&&K_(N.type)||N.isCurrent,P=N=>{l||w(m)||t.selectionMode!=="date"||R(N,!0)},A=N=>{N.target.closest("td")&&(l=!0)},I=N=>{N.target.closest("td")&&(l=!1)},D=N=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:N,maxDate:null}),e("select",!0)):(N>=t.minDate?e("pick",{minDate:t.minDate,maxDate:N}):e("pick",{minDate:N,maxDate:t.minDate}),e("select",!1))},q=N=>{const F=N.week(),j=`${N.year()}w${F}`;e("pick",{year:N.year(),week:F,value:j,date:N.startOf("week")})},z=(N,F)=>{const j=F?Br(t.parsedValue).filter(U=>U?.valueOf()!==N.valueOf()):Br(t.parsedValue).concat([N]);e("pick",j)},R=(N,F=!1)=>{if(t.disabled)return;const j=N.target.closest("td");if(!j)return;const U=j.parentNode.rowIndex-1,W=j.cellIndex,J=w(_)[U][W];if(J.disabled||J.type==="week")return;const ne=T(U,W);switch(t.selectionMode){case"range":{D(ne);break}case"date":{e("pick",ne,F);break}case"week":{q(ne);break}case"dates":{z(ne,!!J.selected);break}}},O=N=>{if(t.selectionMode!=="week")return!1;let F=t.date.startOf("day");if(N.type==="prev-month"&&(F=F.subtract(1,"month")),N.type==="next-month"&&(F=F.add(1,"month")),F=F.date(Number.parseInt(N.text,10)),t.parsedValue&&!Pe(t.parsedValue)){const j=(t.parsedValue.day()-u+7)%7-1;return t.parsedValue.subtract(j,"day").isSame(F,"day")}return!1};return{WEEKS:h,rows:_,tbodyRef:i,currentCellRef:r,focus:C,isCurrent:S,isWeekActive:O,isSelectedCell:x,handlePickDate:R,handleMouseUp:I,handleMouseDown:A,handleMouseMove:E,handleFocus:P}},dbe=(t,{isCurrent:e,isWeekActive:n})=>{const i=De("date-table"),{t:r}=Qt(),o=M(()=>[i.b(),i.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),s=M(()=>r("el.datepicker.dateTablePrompt")),a=u=>{const c=[];return K_(u.type)&&!u.disabled?(c.push("available"),u.type==="today"&&c.push("today")):c.push(u.type),e(u)&&c.push("current"),u.inRange&&(K_(u.type)||t.selectionMode==="week")&&(c.push("in-range"),u.start&&c.push("start-date"),u.end&&c.push("end-date")),(u.disabled||t.disabled)&&c.push("disabled"),u.selected&&c.push("selected"),u.customClass&&c.push(u.customClass),c.join(" ")},l=u=>[i.e("row"),{current:n(u)}];return{tableKls:o,tableLabel:s,weekHeaderClass:i.e("week-header"),getCellClasses:a,getRowKls:l,t:r}},fbe=qe({cell:{type:me(Object)}});var DR=le({name:"ElDatePickerCell",props:fbe,setup(t){const e=De("date-table-cell"),{slots:n}=Ne(RR);return()=>{const{cell:i}=t;return we(n,"default",{...i},()=>{var r;return[L("div",{class:e.b()},[L("span",{class:e.e("text")},[(r=i?.renderText)!=null?r:i?.text])])]})}}});const hbe=["aria-label"],mbe=["aria-label"],gbe=["aria-current","aria-selected","tabindex","aria-disabled"];var C2=le({__name:"basic-date-table",props:lbe,emits:ube,setup(t,{expose:e,emit:n}){const i=t,r=n,{WEEKS:o,rows:s,tbodyRef:a,currentCellRef:l,focus:u,isCurrent:c,isWeekActive:d,isSelectedCell:f,handlePickDate:h,handleMouseUp:m,handleMouseDown:g,handleMouseMove:v,handleFocus:p}=cbe(i,r),{tableLabel:b,tableKls:y,getCellClasses:_,getRowKls:C,weekHeaderClass:S,t:k}=dbe(i,{isCurrent:c,isWeekActive:d});let T=!1;return Sn(()=>{T=!0}),e({focus:u}),(E,x)=>(B(),Q("table",{"aria-label":w(b),class:$(w(y)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:x[1]||(x[1]=(...P)=>w(h)&&w(h)(...P)),onMousemove:x[2]||(x[2]=(...P)=>w(v)&&w(v)(...P)),onMousedown:x[3]||(x[3]=(...P)=>w(g)&&w(g)(...P)),onMouseup:x[4]||(x[4]=(...P)=>w(m)&&w(m)(...P))},[ie("tbody",{ref_key:"tbodyRef",ref:a},[ie("tr",null,[E.showWeekNumber?(B(),Q("th",{key:0,scope:"col",class:$(w(S))},null,2)):ve("v-if",!0),(B(!0),Q(rt,null,gn(w(o),(P,A)=>(B(),Q("th",{key:A,"aria-label":w(k)("el.datepicker.weeksFull."+P),scope:"col"},We(w(k)("el.datepicker.weeks."+P)),9,mbe))),128))]),(B(!0),Q(rt,null,gn(w(s),(P,A)=>(B(),Q("tr",{key:A,class:$(w(C)(E.showWeekNumber?P[2]:P[1]))},[(B(!0),Q(rt,null,gn(P,(I,D)=>(B(),Q("td",{key:`${A}.${D}`,ref_for:!0,ref:q=>!w(T)&&w(f)(I)&&(l.value=q),class:$(w(_)(I)),"aria-current":I.isCurrent?"date":void 0,"aria-selected":I.isCurrent,tabindex:E.disabled?void 0:w(f)(I)?0:-1,"aria-disabled":E.disabled,onFocus:x[0]||(x[0]=(...q)=>w(p)&&w(p)(...q))},[L(w(DR),{cell:I},null,8,["cell"])],42,gbe))),128))],2))),128))],512)],42,hbe))}});const pbe=qe({...MR,selectionMode:LR("month")}),vbe=["aria-label"],bbe=["aria-selected","aria-label","tabindex","onKeydown"];var Hv=le({__name:"basic-month-table",props:pbe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=t,r=n,o=De("month-table"),{t:s,lang:a}=Qt(),l=H(),u=H(),c=H(i.date.locale("en").localeData().monthsShort().map(_=>_.toLowerCase())),d=H([[],[],[]]),f=H(),h=H(),m=M(()=>{var _,C,S;const k=d.value,T=ft().locale(a.value).startOf("month");for(let E=0;E<3;E++){const x=k[E];for(let P=0;P<4;P++){const A=x[P]||(x[P]={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0});A.type="normal";const I=E*4+P,D=i.date.startOf("year").month(I),q=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;A.inRange=!!(i.minDate&&D.isSameOrAfter(i.minDate,"month")&&q&&D.isSameOrBefore(q,"month"))||!!(i.minDate&&D.isSameOrBefore(i.minDate,"month")&&q&&D.isSameOrAfter(q,"month")),(_=i.minDate)!=null&&_.isSameOrAfter(q)?(A.start=!!(q&&D.isSame(q,"month")),A.end=i.minDate&&D.isSame(i.minDate,"month")):(A.start=!!(i.minDate&&D.isSame(i.minDate,"month")),A.end=!!(q&&D.isSame(q,"month"))),T.isSame(D)&&(A.type="today");const R=D.toDate();A.text=I,A.disabled=((C=i.disabledDate)==null?void 0:C.call(i,R))||!1,A.date=R,A.customClass=(S=i.cellClassName)==null?void 0:S.call(i,R),A.dayjs=D,A.timestamp=D.valueOf(),A.isSelected=p(A)}}return k}),g=()=>{var _;(_=u.value)==null||_.focus()},v=_=>{const C={},S=i.date.year(),k=new Date,T=_.text;return C.disabled=i.disabled||(i.disabledDate?q_(i.date,S,T,a.value).every(i.disabledDate):!1),C.current=Br(i.parsedValue).some(E=>ft.isDayjs(E)&&E.year()===S&&E.month()===T),C.today=k.getFullYear()===S&&k.getMonth()===T,_.customClass&&(C[_.customClass]=!0),_.inRange&&(C["in-range"]=!0,_.start&&(C["start-date"]=!0),_.end&&(C["end-date"]=!0)),C},p=_=>{const C=i.date.year(),S=_.text;return Br(i.date).some(k=>k.year()===C&&k.month()===S)},b=_=>{var C;if(!i.rangeState.selecting)return;let S=_.target;if(S.tagName==="SPAN"&&(S=(C=S.parentNode)==null?void 0:C.parentNode),S.tagName==="DIV"&&(S=S.parentNode),S.tagName!=="TD")return;const k=S.parentNode.rowIndex,T=S.cellIndex;m.value[k][T].disabled||(k!==f.value||T!==h.value)&&(f.value=k,h.value=T,r("changerange",{selecting:!0,endDate:i.date.startOf("year").month(k*4+T)}))},y=_=>{var C;if(i.disabled)return;const S=(C=_.target)==null?void 0:C.closest("td");if(S?.tagName!=="TD"||Xa(S,"disabled"))return;const k=S.cellIndex,E=S.parentNode.rowIndex*4+k,x=i.date.startOf("year").month(E);if(i.selectionMode==="months"){if(_.type==="keydown"){r("pick",Br(i.parsedValue),!1);return}const P=Lm(i.date,i.date.year(),E,a.value,i.disabledDate),A=Xa(S,"current")?Br(i.parsedValue).filter(I=>I?.year()!==P.year()||I?.month()!==P.month()):Br(i.parsedValue).concat([ft(P)]);r("pick",A)}else i.selectionMode==="range"?i.rangeState.selecting?(i.minDate&&x>=i.minDate?r("pick",{minDate:i.minDate,maxDate:x}):r("pick",{minDate:x,maxDate:i.minDate}),r("select",!1)):(r("pick",{minDate:x,maxDate:null}),r("select",!0)):r("pick",E)};return Se(()=>i.date,async()=>{var _,C;(_=l.value)!=null&&_.contains(document.activeElement)&&(await Ye(),(C=u.value)==null||C.focus())}),e({focus:g}),(_,C)=>(B(),Q("table",{role:"grid","aria-label":w(s)("el.datepicker.monthTablePrompt"),class:$(w(o).b()),onClick:y,onMousemove:b},[ie("tbody",{ref_key:"tbodyRef",ref:l},[(B(!0),Q(rt,null,gn(m.value,(S,k)=>(B(),Q("tr",{key:k},[(B(!0),Q(rt,null,gn(S,(T,E)=>(B(),Q("td",{key:E,ref_for:!0,ref:x=>T.isSelected&&(u.value=x),class:$(v(T)),"aria-selected":!!T.isSelected,"aria-label":w(s)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[Pi(Ot(y,["prevent","stop"]),["space"]),Pi(Ot(y,["prevent","stop"]),["enter"])]},[L(w(DR),{cell:{...T,renderText:w(s)("el.datepicker.months."+c.value[T.text])}},null,8,["cell"])],42,bbe))),128))]))),128))],512)],42,vbe))}});const ybe=qe({...MR,selectionMode:LR("year")}),wbe=["aria-label"],_be=["aria-selected","aria-label","tabindex","onKeydown"];var Uv=le({__name:"basic-year-table",props:ybe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=(C,S)=>{const k=ft(String(C)).locale(S).startOf("year"),E=k.endOf("year").dayOfYear();return QU(E).map(x=>k.add(x,"day").toDate())},r=t,o=n,s=De("year-table"),{t:a,lang:l}=Qt(),u=H(),c=H(),d=M(()=>Math.floor(r.date.year()/10)*10),f=H([[],[],[]]),h=H(),m=H(),g=M(()=>{var C,S,k;const T=f.value,E=ft().locale(l.value).startOf("year");for(let x=0;x<3;x++){const P=T[x];for(let A=0;A<4&&!(x*4+A>=10);A++){let I=P[A];I||(I={row:x,column:A,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0}),I.type="normal";const D=x*4+A+d.value,q=ft().year(D),z=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;I.inRange=!!(r.minDate&&q.isSameOrAfter(r.minDate,"year")&&z&&q.isSameOrBefore(z,"year"))||!!(r.minDate&&q.isSameOrBefore(r.minDate,"year")&&z&&q.isSameOrAfter(z,"year")),(C=r.minDate)!=null&&C.isSameOrAfter(z)?(I.start=!!(z&&q.isSame(z,"year")),I.end=!!(r.minDate&&q.isSame(r.minDate,"year"))):(I.start=!!(r.minDate&&q.isSame(r.minDate,"year")),I.end=!!(z&&q.isSame(z,"year"))),E.isSame(q)&&(I.type="today"),I.text=D;const O=q.toDate();I.disabled=((S=r.disabledDate)==null?void 0:S.call(r,O))||!1,I.date=O,I.customClass=(k=r.cellClassName)==null?void 0:k.call(r,O),I.dayjs=q,I.timestamp=q.valueOf(),I.isSelected=b(I),P[A]=I}}return T}),v=()=>{var C;(C=c.value)==null||C.focus()},p=C=>{const S={},k=ft().locale(l.value),T=C.text;return S.disabled=r.disabled||(r.disabledDate?i(T,l.value).every(r.disabledDate):!1),S.today=k.year()===T,S.current=Br(r.parsedValue).some(E=>E.year()===T),C.customClass&&(S[C.customClass]=!0),C.inRange&&(S["in-range"]=!0,C.start&&(S["start-date"]=!0),C.end&&(S["end-date"]=!0)),S},b=C=>{const S=C.text;return Br(r.date).some(k=>k.year()===S)},y=C=>{var S;if(r.disabled)return;const k=(S=C.target)==null?void 0:S.closest("td");if(!k||!k.textContent||Xa(k,"disabled"))return;const T=k.cellIndex,x=k.parentNode.rowIndex*4+T+d.value,P=ft().year(x);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&P>=r.minDate?o("pick",{minDate:r.minDate,maxDate:P}):o("pick",{minDate:P,maxDate:r.minDate}),o("select",!1)):(o("pick",{minDate:P,maxDate:null}),o("select",!0));else if(r.selectionMode==="years"){if(C.type==="keydown"){o("pick",Br(r.parsedValue),!1);return}const A=j_(P.startOf("year"),l.value,r.disabledDate),I=Xa(k,"current")?Br(r.parsedValue).filter(D=>D?.year()!==x):Br(r.parsedValue).concat([A]);o("pick",I)}else o("pick",x)},_=C=>{var S;if(!r.rangeState.selecting)return;const k=(S=C.target)==null?void 0:S.closest("td");if(!k)return;const T=k.parentNode.rowIndex,E=k.cellIndex;g.value[T][E].disabled||(T!==h.value||E!==m.value)&&(h.value=T,m.value=E,o("changerange",{selecting:!0,endDate:ft().year(d.value).add(T*4+E,"year")}))};return Se(()=>r.date,async()=>{var C,S;(C=u.value)!=null&&C.contains(document.activeElement)&&(await Ye(),(S=c.value)==null||S.focus())}),e({focus:v}),(C,S)=>(B(),Q("table",{role:"grid","aria-label":w(a)("el.datepicker.yearTablePrompt"),class:$(w(s).b()),onClick:y,onMousemove:_},[ie("tbody",{ref_key:"tbodyRef",ref:u},[(B(!0),Q(rt,null,gn(g.value,(k,T)=>(B(),Q("tr",{key:T},[(B(!0),Q(rt,null,gn(k,(E,x)=>(B(),Q("td",{key:`${T}_${x}`,ref_for:!0,ref:P=>E.isSelected&&(c.value=P),class:$(["available",p(E)]),"aria-selected":E.isSelected,"aria-label":String(E.text),tabindex:E.isSelected?0:-1,onKeydown:[Pi(Ot(y,["prevent","stop"]),["space"]),Pi(Ot(y,["prevent","stop"]),["enter"])]},[L(w(DR),{cell:E},null,8,["cell"])],42,_be))),128))]))),128))],512)],42,wbe))}});const Cbe=["disabled","onClick"],Sbe=["aria-label","disabled"],kbe=["aria-label","disabled"],Tbe=["tabindex","aria-disabled"],Ebe=["tabindex","aria-disabled"],xbe=["aria-label","disabled"],Abe=["aria-label","disabled"];var Pbe=le({__name:"panel-date-pick",props:sbe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(ge,Le,de)=>!0,i=t,r=e,o=De("picker-panel"),s=De("date-picker"),a=Rf(),l=$o(),{t:u,lang:c}=Qt(),d=Ne(ha),f=Ne(Qb,void 0),{shortcuts:h,disabledDate:m,cellClassName:g,defaultTime:v}=d.props,p=An(d.props,"defaultValue"),b=H(),y=H(ft().locale(c.value)),_=H(!1);let C=!1;const S=M(()=>ft(v).locale(c.value)),k=M(()=>y.value.month()),T=M(()=>y.value.year()),E=H([]),x=H(null),P=H(null),A=ge=>E.value.length>0?n(ge,E.value,i.format||"HH:mm:ss"):!0,I=ge=>v&&!Y.value&&!_.value&&!C?S.value.year(ge.year()).month(ge.month()).date(ge.date()):re.value?ge.millisecond(0):ge.startOf("day"),D=(ge,...Le)=>{if(!ge)r("pick",ge,...Le);else if(Pe(ge)){const de=ge.map(I);r("pick",de,...Le)}else r("pick",I(ge),...Le);x.value=null,P.value=null,_.value=!1,C=!1},q=async(ge,Le)=>{if(j.value==="date"&&ft.isDayjs(ge)){const de=Mg(i.parsedValue);let Ve=de?de.year(ge.year()).month(ge.month()).date(ge.date()):ge;A(Ve),y.value=Ve,D(Ve,re.value||Le)}else j.value==="week"?D(ge.date):j.value==="dates"&&D(ge,!0)},z=ge=>{const Le=ge?"add":"subtract";y.value=y.value[Le](1,"month"),Et("month")},R=ge=>{const Le=y.value,de=ge?"add":"subtract";y.value=O.value==="year"?Le[de](10,"year"):Le[de](1,"year"),Et("year")},O=H("date"),N=M(()=>{const ge=u("el.datepicker.year");if(O.value==="year"){const Le=Math.floor(T.value/10)*10;return ge?`${Le} ${ge} - ${Le+9} ${ge}`:`${Le} - ${Le+9}`}return`${T.value} ${ge}`}),F=ge=>{const Le=Xe(ge.value)?ge.value():ge.value;if(Le){C=!0,D(ft(Le).locale(c.value));return}ge.onClick&&ge.onClick({attrs:a,slots:l,emit:r})},j=M(()=>{const{type:ge}=i;return["week","month","months","year","years","dates"].includes(ge)?ge:"date"}),U=M(()=>j.value==="dates"||j.value==="months"||j.value==="years"),W=M(()=>j.value==="date"?O.value:j.value),J=M(()=>!!h.length),ne=async(ge,Le)=>{j.value==="month"?(y.value=Lm(y.value,y.value.year(),ge,c.value,m),D(y.value,!1)):j.value==="months"?D(ge,Le??!0):(y.value=Lm(y.value,y.value.year(),ge,c.value,m),O.value="date",["month","year","date","week"].includes(j.value)&&(D(y.value,!0),await Ye(),Dt())),Et("month")},he=async(ge,Le)=>{if(j.value==="year"){const de=y.value.startOf("year").year(ge);y.value=j_(de,c.value,m),D(y.value,!1)}else if(j.value==="years")D(ge,Le??!0);else{const de=y.value.year(ge);y.value=j_(de,c.value,m),O.value="month",["month","year","date","week"].includes(j.value)&&(D(y.value,!0),await Ye(),Dt())}Et("year")},X=Oi(),se=async ge=>{X.value||(O.value=ge,await Ye(),Dt())},re=M(()=>i.type==="datetime"||i.type==="datetimerange"),ee=M(()=>{const ge=re.value||j.value==="dates",Le=j.value==="years",de=j.value==="months",Ve=O.value==="date",gt=O.value==="year",an=O.value==="month";return ge&&Ve||Le&&gt||de&&an}),te=M(()=>!U.value&&i.showNow||i.showConfirm),V=M(()=>m?i.parsedValue?Pe(i.parsedValue)?m(i.parsedValue[0].toDate()):m(i.parsedValue.toDate()):!0:!1),K=()=>{if(U.value)D(i.parsedValue);else{let ge=Mg(i.parsedValue);if(!ge){const Le=ft(v).locale(c.value),de=Ke();ge=Le.year(de.year()).month(de.month()).date(de.date())}y.value=ge,D(ge)}},G=M(()=>m?m(ft().locale(c.value).toDate()):!1),ye=()=>{const Le=ft().locale(c.value).toDate();_.value=!0,(!m||!m(Le))&&A(Le)&&(y.value=ft().locale(c.value),D(y.value))},be=M(()=>i.timeFormat||tW(i.format)||Om),Ce=M(()=>i.dateFormat||eW(i.format)||lc),Y=M(()=>P.value?P.value:!i.parsedValue&&!p.value?void 0:(Mg(i.parsedValue)||y.value).format(be.value)),Z=M(()=>x.value?x.value:!i.parsedValue&&!p.value?void 0:(Mg(i.parsedValue)||y.value).format(Ce.value)),ae=H(!1),pe=()=>{ae.value=!0},je=()=>{ae.value=!1},Ie=ge=>({hour:ge.hour(),minute:ge.minute(),second:ge.second(),year:ge.year(),month:ge.month(),date:ge.date()}),fe=(ge,Le,de)=>{const{hour:Ve,minute:gt,second:an}=Ie(ge),Si=Mg(i.parsedValue),uo=Si?Si.hour(Ve).minute(gt).second(an):ge;y.value=uo,D(y.value,!0),de||(ae.value=Le)},Te=ge=>{const Le=ft(ge,be.value).locale(c.value);if(Le.isValid()&&A(Le)){const{year:de,month:Ve,date:gt}=Ie(y.value);y.value=Le.year(de).month(Ve).date(gt),P.value=null,ae.value=!1,D(y.value,!0)}},et=ge=>{const Le=Dm(ge,Ce.value,c.value,f);if(Le.isValid()){if(m&&m(Le.toDate()))return;const{hour:de,minute:Ve,second:gt}=Ie(y.value);y.value=Le.hour(de).minute(Ve).second(gt),x.value=null,D(y.value,!0)}},Re=ge=>ft.isDayjs(ge)&&ge.isValid()&&(m?!m(ge.toDate()):!0),ze=ge=>Dm(ge,i.format,c.value,f),Ke=()=>{const ge=ft(p.value).locale(c.value);if(!p.value){const Le=S.value;return ft().hour(Le.hour()).minute(Le.minute()).second(Le.second()).locale(c.value)}return ge},Dt=()=>{var ge;["week","month","year","date"].includes(j.value)&&((ge=b.value)==null||ge.focus())},Cn=()=>{Dt(),j.value==="week"&&kt(Me.down)},Je=ge=>{const Le=Bn(ge);[Me.up,Me.down,Me.left,Me.right,Me.home,Me.end,Me.pageUp,Me.pageDown].includes(Le)&&(kt(Le),ge.stopPropagation(),ge.preventDefault()),[Me.enter,Me.space,Me.numpadEnter].includes(Le)&&x.value===null&&P.value===null&&(ge.preventDefault(),D(y.value,!1))},kt=ge=>{var Le;const{up:de,down:Ve,left:gt,right:an,home:Si,end:uo,pageUp:Oe,pageDown:Fe}=Me,st={year:{[de]:-4,[Ve]:4,[gt]:-1,[an]:1,offset:(en,Ue)=>en.setFullYear(en.getFullYear()+Ue)},month:{[de]:-4,[Ve]:4,[gt]:-1,[an]:1,offset:(en,Ue)=>en.setMonth(en.getMonth()+Ue)},week:{[de]:-1,[Ve]:1,[gt]:-1,[an]:1,offset:(en,Ue)=>en.setDate(en.getDate()+Ue*7)},date:{[de]:-7,[Ve]:7,[gt]:-1,[an]:1,[Si]:en=>-en.getDay(),[uo]:en=>-en.getDay()+6,[Oe]:en=>-new Date(en.getFullYear(),en.getMonth(),0).getDate(),[Fe]:en=>new Date(en.getFullYear(),en.getMonth()+1,0).getDate(),offset:(en,Ue)=>en.setDate(en.getDate()+Ue)}},Vn=y.value.toDate();for(;Math.abs(y.value.diff(Vn,"year",!0))<1;){const en=st[W.value];if(!en)return;if(en.offset(Vn,Xe(en[ge])?en[ge](Vn):(Le=en[ge])!=null?Le:0),m&&m(Vn))break;const Ue=ft(Vn).locale(c.value);y.value=Ue,r("pick",Ue,!0);break}},Et=ge=>{r("panel-change",y.value.toDate(),ge,O.value)};return Se(()=>j.value,ge=>{if(["month","year"].includes(ge)){O.value=ge;return}else if(ge==="years"){O.value="year";return}else if(ge==="months"){O.value="month";return}O.value="date"},{immediate:!0}),Se(()=>p.value,ge=>{ge&&(y.value=Ke())},{immediate:!0}),Se(()=>i.parsedValue,ge=>{if(ge){if(U.value||Pe(ge))return;y.value=ge}else y.value=Ke()},{immediate:!0}),r("set-picker-option",["isValidValue",Re]),r("set-picker-option",["parseUserInput",ze]),r("set-picker-option",["handleFocusPicker",Cn]),(ge,Le)=>(B(),Q("div",{class:$([w(o).b(),w(s).b(),w(o).is("border",ge.border),w(o).is("disabled",w(X)),{"has-sidebar":ge.$slots.sidebar||J.value,"has-time":re.value}])},[ie("div",{class:$(w(o).e("body-wrapper"))},[we(ge.$slots,"sidebar",{class:$(w(o).e("sidebar"))}),J.value?(B(),Q("div",{key:0,class:$(w(o).e("sidebar"))},[(B(!0),Q(rt,null,gn(w(h),(de,Ve)=>(B(),Q("button",{key:Ve,type:"button",disabled:w(X),class:$(w(o).e("shortcut")),onClick:gt=>F(de)},We(de.text),11,Cbe))),128))],2)):ve("v-if",!0),ie("div",{class:$(w(o).e("body"))},[re.value?(B(),Q("div",{key:0,class:$(w(s).e("time-header"))},[ie("span",{class:$(w(s).e("editor-wrap"))},[L(w(cr),{placeholder:w(u)("el.datepicker.selectDate"),"model-value":Z.value,size:"small","validate-event":!1,disabled:w(X),readonly:!ge.editable,onInput:Le[0]||(Le[0]=de=>x.value=de),onChange:et},null,8,["placeholder","model-value","disabled","readonly"])],2),Vt((B(),Q("span",{class:$(w(s).e("editor-wrap"))},[L(w(cr),{placeholder:w(u)("el.datepicker.selectTime"),"model-value":Y.value,size:"small","validate-event":!1,disabled:w(X),readonly:!ge.editable,onFocus:pe,onInput:Le[1]||(Le[1]=de=>P.value=de),onChange:Te},null,8,["placeholder","model-value","disabled","readonly"]),L(w(W_),{visible:ae.value,format:be.value,"parsed-value":y.value,onPick:fe},null,8,["visible","format","parsed-value"])],2)),[[w(wf),je]])],2)):ve("v-if",!0),Vt(ie("div",{class:$([w(s).e("header"),(O.value==="year"||O.value==="month")&&w(s).em("header","bordered")])},[ie("span",{class:$(w(s).e("prev-btn"))},[ie("button",{type:"button","aria-label":w(u)("el.datepicker.prevYear"),class:$(["d-arrow-left",w(o).e("icon-btn")]),disabled:w(X),onClick:Le[2]||(Le[2]=de=>R(!1))},[we(ge.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,Sbe),Vt(ie("button",{type:"button","aria-label":w(u)("el.datepicker.prevMonth"),class:$([w(o).e("icon-btn"),"arrow-left"]),disabled:w(X),onClick:Le[3]||(Le[3]=de=>z(!1))},[we(ge.$slots,"prev-month",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Am))]),_:1})])],10,kbe),[[On,O.value==="date"]])],2),ie("span",{role:"button",class:$(w(s).e("header-label")),"aria-live":"polite",tabindex:ge.disabled?void 0:0,"aria-disabled":ge.disabled,onKeydown:Le[4]||(Le[4]=Pi(de=>se("year"),["enter"])),onClick:Le[5]||(Le[5]=de=>se("year"))},We(N.value),43,Tbe),Vt(ie("span",{role:"button","aria-live":"polite",tabindex:ge.disabled?void 0:0,"aria-disabled":ge.disabled,class:$([w(s).e("header-label"),{active:O.value==="month"}]),onKeydown:Le[6]||(Le[6]=Pi(de=>se("month"),["enter"])),onClick:Le[7]||(Le[7]=de=>se("month"))},We(w(u)(`el.datepicker.month${k.value+1}`)),43,Ebe),[[On,O.value==="date"]]),ie("span",{class:$(w(s).e("next-btn"))},[Vt(ie("button",{type:"button","aria-label":w(u)("el.datepicker.nextMonth"),class:$([w(o).e("icon-btn"),"arrow-right"]),disabled:w(X),onClick:Le[8]||(Le[8]=de=>z(!0))},[we(ge.$slots,"next-month",{},()=>[L(w(He),null,{default:ce(()=>[L(w(oa))]),_:1})])],10,xbe),[[On,O.value==="date"]]),ie("button",{type:"button","aria-label":w(u)("el.datepicker.nextYear"),class:$([w(o).e("icon-btn"),"d-arrow-right"]),disabled:w(X),onClick:Le[9]||(Le[9]=de=>R(!0))},[we(ge.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,Abe)],2)],2),[[On,O.value!=="time"]]),ie("div",{class:$(w(o).e("content")),onKeydown:Je},[O.value==="date"?(B(),_e(C2,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":j.value,date:y.value,"parsed-value":ge.parsedValue,"disabled-date":w(m),disabled:w(X),"cell-class-name":w(g),"show-week-number":ge.showWeekNumber,onPick:q},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):ve("v-if",!0),O.value==="year"?(B(),_e(Uv,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":j.value,date:y.value,"disabled-date":w(m),disabled:w(X),"parsed-value":ge.parsedValue,"cell-class-name":w(g),onPick:he},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):ve("v-if",!0),O.value==="month"?(B(),_e(Hv,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":j.value,date:y.value,"parsed-value":ge.parsedValue,"disabled-date":w(m),disabled:w(X),"cell-class-name":w(g),onPick:ne},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):ve("v-if",!0)],34)],2)],2),ge.showFooter&&ee.value&&te.value?(B(),Q("div",{key:0,class:$(w(o).e("footer"))},[Vt(L(w(Hi),{text:"",size:"small",class:$(w(o).e("link-btn")),disabled:G.value,onClick:ye},{default:ce(()=>[dt(We(w(u)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[On,!U.value&&ge.showNow]]),ge.showConfirm?(B(),_e(w(Hi),{key:0,plain:"",size:"small",class:$(w(o).e("link-btn")),disabled:V.value,onClick:K},{default:ce(()=>[dt(We(w(u)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):ve("v-if",!0)],2)):ve("v-if",!0)],2))}});const Ibe=qe({...jW,...OR}),Rbe=t=>{const{emit:e}=Ct(),n=Rf(),i=$o();return o=>{const s=Xe(o.value)?o.value():o.value;if(s){e("pick",[ft(s[0]).locale(t.value),ft(s[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:i,emit:e})}},NR=(t,{defaultValue:e,defaultTime:n,leftDate:i,rightDate:r,step:o,unit:s,sortDates:a})=>{const{emit:l}=Ct(),{pickerNs:u}=Ne(RR),c=De("date-range-picker"),{t:d,lang:f}=Qt(),h=Rbe(f),m=H(),g=H(),v=H({endDate:null,selecting:!1}),p=S=>{v.value=S},b=(S=!1)=>{const k=w(m),T=w(g);zv([k,T])&&l("pick",[k,T],S)},y=S=>{v.value.selecting=S,S||(v.value.endDate=null)},_=S=>{if(Pe(S)&&S.length===2){const[k,T]=S;m.value=k,i.value=k,g.value=T,a(w(m),w(g))}else C()},C=()=>{let[S,k]=zC(w(e),{lang:w(f),step:o,unit:s,unlinkPanels:t.unlinkPanels});const T=x=>x.diff(x.startOf("d"),"ms"),E=w(n);if(E){let x=0,P=0;if(Pe(E)){const[A,I]=E.map(ft);x=T(A),P=T(I)}else{const A=T(ft(E));x=A,P=A}S=S.startOf("d").add(x,"ms"),k=k.startOf("d").add(P,"ms")}m.value=void 0,g.value=void 0,i.value=S,r.value=k};return Se(e,S=>{S&&C()},{immediate:!0}),Se(()=>t.parsedValue,S=>{(!S?.length||!$i(S,[m.value,g.value]))&&_(S)},{immediate:!0}),Se(()=>t.visible,()=>{t.visible&&_(t.parsedValue)},{immediate:!0}),{minDate:m,maxDate:g,rangeState:v,lang:f,ppNs:u,drpNs:c,handleChangeRange:p,handleRangeConfirm:b,handleShortcutClick:h,onSelect:y,parseValue:_,t:d}},Mbe=(t,e,n,i)=>{const r=H("date"),o=H(),s=H("date"),a=H(),l=Ne(ha),{disabledDate:u}=l.props,{t:c,lang:d}=Qt(),f=M(()=>n.value.year()),h=M(()=>n.value.month()),m=M(()=>i.value.year()),g=M(()=>i.value.month());function v(S,k){const T=c("el.datepicker.year");if(S.value==="year"){const E=Math.floor(k.value/10)*10;return T?`${E} ${T} - ${E+9} ${T}`:`${E} - ${E+9}`}return`${k.value} ${T}`}function p(S){S?.focus()}async function b(S,k){if(t.disabled)return;const T=S==="left"?r:s,E=S==="left"?o:a;T.value=k,await Ye(),p(E.value)}async function y(S,k,T){if(t.disabled)return;const E=k==="left",x=E?n:i,P=E?i:n,A=E?r:s,I=E?o:a;if(S==="year"){const D=x.value.year(T);x.value=j_(D,d.value,u)}S==="month"&&(x.value=Lm(x.value,x.value.year(),T,d.value,u)),t.unlinkPanels||(P.value=k==="left"?x.value.add(1,"month"):x.value.subtract(1,"month")),A.value=S==="year"?"month":"date",await Ye(),p(I.value),_(S)}function _(S){e("panel-change",[n.value.toDate(),i.value.toDate()],S)}function C(S,k,T){const E=T?"add":"subtract";return S==="year"?k[E](10,"year"):k[E](1,"year")}return{leftCurrentView:r,rightCurrentView:s,leftCurrentViewRef:o,rightCurrentViewRef:a,leftYear:f,rightYear:m,leftMonth:h,rightMonth:g,leftYearLabel:M(()=>v(r,f)),rightYearLabel:M(()=>v(s,m)),showLeftPicker:S=>b("left",S),showRightPicker:S=>b("right",S),handleLeftYearPick:S=>y("year","left",S),handleRightYearPick:S=>y("year","right",S),handleLeftMonthPick:S=>y("month","left",S),handleRightMonthPick:S=>y("month","right",S),handlePanelChange:_,adjustDateByView:C}},Obe=["disabled","onClick"],Lbe=["aria-label","disabled"],Dbe=["aria-label","disabled"],Nbe=["disabled","aria-label"],Bbe=["disabled","aria-label"],Vbe=["tabindex","aria-disabled"],Fbe=["tabindex","aria-disabled"],$be=["disabled","aria-label"],zbe=["disabled","aria-label"],Hbe=["aria-label","disabled"],Ube=["disabled","aria-label"],Wbe=["tabindex","aria-disabled"],qbe=["tabindex","aria-disabled"],H0="month";var jbe=le({__name:"panel-date-range",props:Ibe,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,i=e,r=Ne(ha),o=Ne(Qb,void 0),{disabledDate:s,cellClassName:a,defaultTime:l,clearable:u}=r.props,c=An(r.props,"format"),d=An(r.props,"shortcuts"),f=An(r.props,"defaultValue"),{lang:h}=Qt(),m=H(ft().locale(h.value)),g=H(ft().locale(h.value).add(1,H0)),{minDate:v,maxDate:p,rangeState:b,ppNs:y,drpNs:_,handleChangeRange:C,handleRangeConfirm:S,handleShortcutClick:k,onSelect:T,parseValue:E,t:x}=NR(n,{defaultValue:f,defaultTime:l,leftDate:m,rightDate:g,unit:H0,sortDates:en});Se(()=>n.visible,Ue=>{!Ue&&b.value.selecting&&(E(n.parsedValue),T(!1))});const P=H({min:null,max:null}),A=H({min:null,max:null}),{leftCurrentView:I,rightCurrentView:D,leftCurrentViewRef:q,rightCurrentViewRef:z,leftYear:R,rightYear:O,leftMonth:N,rightMonth:F,leftYearLabel:j,rightYearLabel:U,showLeftPicker:W,showRightPicker:J,handleLeftYearPick:ne,handleRightYearPick:he,handleLeftMonthPick:X,handleRightMonthPick:se,handlePanelChange:re,adjustDateByView:ee}=Mbe(n,i,m,g),te=M(()=>!!d.value.length),V=M(()=>P.value.min!==null?P.value.min:v.value?v.value.format(Ce.value):""),K=M(()=>P.value.max!==null?P.value.max:p.value||v.value?(p.value||v.value).format(Ce.value):""),G=M(()=>A.value.min!==null?A.value.min:v.value?v.value.format(be.value):""),ye=M(()=>A.value.max!==null?A.value.max:p.value||v.value?(p.value||v.value).format(be.value):""),be=M(()=>n.timeFormat||tW(c.value||"")||Om),Ce=M(()=>n.dateFormat||eW(c.value||"")||lc),Y=Ue=>zv(Ue)&&(s?!s(Ue[0].toDate())&&!s(Ue[1].toDate()):!0),Z=()=>{m.value=ee(I.value,m.value,!1),n.unlinkPanels||(g.value=m.value.add(1,"month")),re("year")},ae=()=>{m.value=m.value.subtract(1,"month"),n.unlinkPanels||(g.value=m.value.add(1,"month")),re("month")},pe=()=>{n.unlinkPanels?g.value=ee(D.value,g.value,!0):(m.value=ee(D.value,m.value,!0),g.value=m.value.add(1,"month")),re("year")},je=()=>{n.unlinkPanels?g.value=g.value.add(1,"month"):(m.value=m.value.add(1,"month"),g.value=m.value.add(1,"month")),re("month")},Ie=()=>{m.value=ee(I.value,m.value,!0),re("year")},fe=()=>{m.value=m.value.add(1,"month"),re("month")},Te=()=>{g.value=ee(D.value,g.value,!1),re("year")},et=()=>{g.value=g.value.subtract(1,"month"),re("month")},Re=M(()=>{const Ue=(N.value+1)%12,tt=N.value+1>=12?1:0;return n.unlinkPanels&&new Date(R.value+tt,Ue)<new Date(O.value,F.value)}),ze=M(()=>n.unlinkPanels&&O.value*12+F.value-(R.value*12+N.value+1)>=12),Ke=Oi(),Dt=M(()=>!(v.value&&p.value&&!b.value.selecting&&zv([v.value,p.value])&&!Ke.value)),Cn=M(()=>n.type==="datetime"||n.type==="datetimerange"),Je=(Ue,tt)=>{if(Ue)return l?ft(l[tt]||l).locale(h.value).year(Ue.year()).month(Ue.month()).date(Ue.date()):Ue},kt=(Ue,tt=!0)=>{const pt=Ue.minDate,jr=Ue.maxDate,Uo=Je(pt,0),Jc=Je(jr,1);p.value===Jc&&v.value===Uo||(i("calendar-change",[pt.toDate(),jr&&jr.toDate()]),p.value=Jc,v.value=Uo,!Cn.value&&tt&&(tt=!Uo||!Jc),S(tt))},Et=H(!1),ge=H(!1),Le=()=>{Et.value=!1},de=()=>{ge.value=!1},Ve=(Ue,tt)=>{P.value[tt]=Ue;const pt=ft(Ue,Ce.value).locale(h.value);if(pt.isValid()){if(s&&s(pt.toDate()))return;tt==="min"?(m.value=pt,v.value=(v.value||m.value).year(pt.year()).month(pt.month()).date(pt.date()),!n.unlinkPanels&&(!p.value||p.value.isBefore(v.value))&&(g.value=pt.add(1,"month"),p.value=v.value.add(1,"month"))):(g.value=pt,p.value=(p.value||g.value).year(pt.year()).month(pt.month()).date(pt.date()),!n.unlinkPanels&&(!v.value||v.value.isAfter(p.value))&&(m.value=pt.subtract(1,"month"),v.value=p.value.subtract(1,"month"))),en(v.value,p.value),S(!0)}},gt=(Ue,tt)=>{P.value[tt]=null},an=(Ue,tt)=>{A.value[tt]=Ue;const pt=ft(Ue,be.value).locale(h.value);pt.isValid()&&(tt==="min"?(Et.value=!0,v.value=(v.value||m.value).hour(pt.hour()).minute(pt.minute()).second(pt.second()),m.value=v.value):(ge.value=!0,p.value=(p.value||g.value).hour(pt.hour()).minute(pt.minute()).second(pt.second()),g.value=p.value))},Si=(Ue,tt)=>{A.value[tt]=null,tt==="min"?(m.value=v.value,Et.value=!1,(!p.value||p.value.isBefore(v.value))&&(p.value=v.value)):(g.value=p.value,ge.value=!1,p.value&&p.value.isBefore(v.value)&&(v.value=p.value)),S(!0)},uo=(Ue,tt,pt)=>{A.value.min||(Ue&&(v.value=(v.value||m.value).hour(Ue.hour()).minute(Ue.minute()).second(Ue.second())),pt||(Et.value=tt),(!p.value||p.value.isBefore(v.value))&&(p.value=v.value,g.value=Ue,Ye(()=>{E(n.parsedValue)})),S(!0))},Oe=(Ue,tt,pt)=>{A.value.max||(Ue&&(p.value=(p.value||g.value).hour(Ue.hour()).minute(Ue.minute()).second(Ue.second())),pt||(ge.value=tt),p.value&&p.value.isBefore(v.value)&&(v.value=p.value),S(!0))},Fe=()=>{st(),i("clear")},st=()=>{let Ue=null;r?.emptyValues&&(Ue=r.emptyValues.valueOnClear.value),m.value=zC(w(f),{lang:w(h),unit:"month",unlinkPanels:n.unlinkPanels})[0],g.value=m.value.add(1,"month"),p.value=void 0,v.value=void 0,S(!0),i("pick",Ue)},Vn=Ue=>Dm(Ue,c.value||"",h.value,o);function en(Ue,tt){if(n.unlinkPanels&&tt){const pt=Ue?.year()||0,jr=Ue?.month()||0,Uo=tt.year(),Jc=tt.month();g.value=pt===Uo&&jr===Jc?tt.add(1,H0):tt}else g.value=m.value.add(1,H0),tt&&(g.value=g.value.hour(tt.hour()).minute(tt.minute()).second(tt.second()))}return i("set-picker-option",["isValidValue",Y]),i("set-picker-option",["parseUserInput",Vn]),i("set-picker-option",["handleClear",st]),(Ue,tt)=>(B(),Q("div",{class:$([w(y).b(),w(_).b(),w(y).is("border",Ue.border),w(y).is("disabled",w(Ke)),{"has-sidebar":Ue.$slots.sidebar||te.value,"has-time":Cn.value}])},[ie("div",{class:$(w(y).e("body-wrapper"))},[we(Ue.$slots,"sidebar",{class:$(w(y).e("sidebar"))}),te.value?(B(),Q("div",{key:0,class:$(w(y).e("sidebar"))},[(B(!0),Q(rt,null,gn(d.value,(pt,jr)=>(B(),Q("button",{key:jr,type:"button",disabled:w(Ke),class:$(w(y).e("shortcut")),onClick:Uo=>w(k)(pt)},We(pt.text),11,Obe))),128))],2)):ve("v-if",!0),ie("div",{class:$(w(y).e("body"))},[Cn.value?(B(),Q("div",{key:0,class:$(w(_).e("time-header"))},[ie("span",{class:$(w(_).e("editors-wrap"))},[ie("span",{class:$(w(_).e("time-picker-wrap"))},[L(w(cr),{size:"small",disabled:w(b).selecting||w(Ke),placeholder:w(x)("el.datepicker.startDate"),class:$(w(_).e("editor")),"model-value":V.value,"validate-event":!1,readonly:!Ue.editable,onInput:tt[0]||(tt[0]=pt=>Ve(pt,"min")),onChange:tt[1]||(tt[1]=pt=>gt(pt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),Vt((B(),Q("span",{class:$(w(_).e("time-picker-wrap"))},[L(w(cr),{size:"small",class:$(w(_).e("editor")),disabled:w(b).selecting||w(Ke),placeholder:w(x)("el.datepicker.startTime"),"model-value":G.value,"validate-event":!1,readonly:!Ue.editable,onFocus:tt[2]||(tt[2]=pt=>Et.value=!0),onInput:tt[3]||(tt[3]=pt=>an(pt,"min")),onChange:tt[4]||(tt[4]=pt=>Si(pt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),L(w(W_),{visible:Et.value,format:be.value,"datetime-role":"start","parsed-value":w(v)||m.value,onPick:uo},null,8,["visible","format","parsed-value"])],2)),[[w(wf),Le]])],2),ie("span",null,[L(w(He),null,{default:ce(()=>[L(w(oa))]),_:1})]),ie("span",{class:$([w(_).e("editors-wrap"),"is-right"])},[ie("span",{class:$(w(_).e("time-picker-wrap"))},[L(w(cr),{size:"small",class:$(w(_).e("editor")),disabled:w(b).selecting||w(Ke),placeholder:w(x)("el.datepicker.endDate"),"model-value":K.value,readonly:!w(v)||!Ue.editable,"validate-event":!1,onInput:tt[5]||(tt[5]=pt=>Ve(pt,"max")),onChange:tt[6]||(tt[6]=pt=>gt(pt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),Vt((B(),Q("span",{class:$(w(_).e("time-picker-wrap"))},[L(w(cr),{size:"small",class:$(w(_).e("editor")),disabled:w(b).selecting||w(Ke),placeholder:w(x)("el.datepicker.endTime"),"model-value":ye.value,readonly:!w(v)||!Ue.editable,"validate-event":!1,onFocus:tt[7]||(tt[7]=pt=>w(v)&&(ge.value=!0)),onInput:tt[8]||(tt[8]=pt=>an(pt,"max")),onChange:tt[9]||(tt[9]=pt=>Si(pt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),L(w(W_),{"datetime-role":"end",visible:ge.value,format:be.value,"parsed-value":w(p)||g.value,onPick:Oe},null,8,["visible","format","parsed-value"])],2)),[[w(wf),de]])],2)],2)):ve("v-if",!0),ie("div",{class:$([[w(y).e("content"),w(_).e("content")],"is-left"])},[ie("div",{class:$(w(_).e("header"))},[ie("button",{type:"button",class:$([w(y).e("icon-btn"),"d-arrow-left"]),"aria-label":w(x)("el.datepicker.prevYear"),disabled:w(Ke),onClick:Z},[we(Ue.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,Lbe),Vt(ie("button",{type:"button",class:$([w(y).e("icon-btn"),"arrow-left"]),"aria-label":w(x)("el.datepicker.prevMonth"),disabled:w(Ke),onClick:ae},[we(Ue.$slots,"prev-month",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Am))]),_:1})])],10,Dbe),[[On,w(I)==="date"]]),Ue.unlinkPanels?(B(),Q("button",{key:0,type:"button",disabled:!ze.value||w(Ke),class:$([[w(y).e("icon-btn"),w(y).is("disabled",!ze.value||w(Ke))],"d-arrow-right"]),"aria-label":w(x)("el.datepicker.nextYear"),onClick:Ie},[we(Ue.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,Nbe)):ve("v-if",!0),Ue.unlinkPanels&&w(I)==="date"?(B(),Q("button",{key:1,type:"button",disabled:!Re.value||w(Ke),class:$([[w(y).e("icon-btn"),w(y).is("disabled",!Re.value||w(Ke))],"arrow-right"]),"aria-label":w(x)("el.datepicker.nextMonth"),onClick:fe},[we(Ue.$slots,"next-month",{},()=>[L(w(He),null,{default:ce(()=>[L(w(oa))]),_:1})])],10,Bbe)):ve("v-if",!0),ie("div",null,[ie("span",{role:"button",class:$(w(_).e("header-label")),"aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,onKeydown:tt[10]||(tt[10]=Pi(pt=>w(W)("year"),["enter"])),onClick:tt[11]||(tt[11]=pt=>w(W)("year"))},We(w(j)),43,Vbe),Vt(ie("span",{role:"button","aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,class:$([w(_).e("header-label"),{active:w(I)==="month"}]),onKeydown:tt[12]||(tt[12]=Pi(pt=>w(W)("month"),["enter"])),onClick:tt[13]||(tt[13]=pt=>w(W)("month"))},We(w(x)(`el.datepicker.month${m.value.month()+1}`)),43,Fbe),[[On,w(I)==="date"]])])],2),w(I)==="date"?(B(),_e(C2,{key:0,ref_key:"leftCurrentViewRef",ref:q,"selection-mode":"range",date:m.value,"min-date":w(v),"max-date":w(p),"range-state":w(b),"disabled-date":w(s),"cell-class-name":w(a),"show-week-number":Ue.showWeekNumber,disabled:w(Ke),onChangerange:w(C),onPick:kt,onSelect:w(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):ve("v-if",!0),w(I)==="year"?(B(),_e(Uv,{key:1,ref_key:"leftCurrentViewRef",ref:q,"selection-mode":"year",date:m.value,"disabled-date":w(s),"parsed-value":Ue.parsedValue,disabled:w(Ke),onPick:w(ne)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):ve("v-if",!0),w(I)==="month"?(B(),_e(Hv,{key:2,ref_key:"leftCurrentViewRef",ref:q,"selection-mode":"month",date:m.value,"parsed-value":Ue.parsedValue,"disabled-date":w(s),disabled:w(Ke),onPick:w(X)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):ve("v-if",!0)],2),ie("div",{class:$([[w(y).e("content"),w(_).e("content")],"is-right"])},[ie("div",{class:$(w(_).e("header"))},[Ue.unlinkPanels?(B(),Q("button",{key:0,type:"button",disabled:!ze.value||w(Ke),class:$([[w(y).e("icon-btn"),w(y).is("disabled",!ze.value||w(Ke))],"d-arrow-left"]),"aria-label":w(x)("el.datepicker.prevYear"),onClick:Te},[we(Ue.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,$be)):ve("v-if",!0),Ue.unlinkPanels&&w(D)==="date"?(B(),Q("button",{key:1,type:"button",disabled:!Re.value||w(Ke),class:$([[w(y).e("icon-btn"),w(y).is("disabled",!Re.value||w(Ke))],"arrow-left"]),"aria-label":w(x)("el.datepicker.prevMonth"),onClick:et},[we(Ue.$slots,"prev-month",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Am))]),_:1})])],10,zbe)):ve("v-if",!0),ie("button",{type:"button","aria-label":w(x)("el.datepicker.nextYear"),class:$([w(y).e("icon-btn"),"d-arrow-right"]),disabled:w(Ke),onClick:pe},[we(Ue.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,Hbe),Vt(ie("button",{type:"button",class:$([w(y).e("icon-btn"),"arrow-right"]),disabled:w(Ke),"aria-label":w(x)("el.datepicker.nextMonth"),onClick:je},[we(Ue.$slots,"next-month",{},()=>[L(w(He),null,{default:ce(()=>[L(w(oa))]),_:1})])],10,Ube),[[On,w(D)==="date"]]),ie("div",null,[ie("span",{role:"button",class:$(w(_).e("header-label")),"aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,onKeydown:tt[14]||(tt[14]=Pi(pt=>w(J)("year"),["enter"])),onClick:tt[15]||(tt[15]=pt=>w(J)("year"))},We(w(U)),43,Wbe),Vt(ie("span",{role:"button","aria-live":"polite",tabindex:Ue.disabled?void 0:0,"aria-disabled":Ue.disabled,class:$([w(_).e("header-label"),{active:w(D)==="month"}]),onKeydown:tt[16]||(tt[16]=Pi(pt=>w(J)("month"),["enter"])),onClick:tt[17]||(tt[17]=pt=>w(J)("month"))},We(w(x)(`el.datepicker.month${g.value.month()+1}`)),43,qbe),[[On,w(D)==="date"]])])],2),w(D)==="date"?(B(),_e(C2,{key:0,ref_key:"rightCurrentViewRef",ref:z,"selection-mode":"range",date:g.value,"min-date":w(v),"max-date":w(p),"range-state":w(b),"disabled-date":w(s),"cell-class-name":w(a),"show-week-number":Ue.showWeekNumber,disabled:w(Ke),onChangerange:w(C),onPick:kt,onSelect:w(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):ve("v-if",!0),w(D)==="year"?(B(),_e(Uv,{key:1,ref_key:"rightCurrentViewRef",ref:z,"selection-mode":"year",date:g.value,"disabled-date":w(s),"parsed-value":Ue.parsedValue,disabled:w(Ke),onPick:w(he)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):ve("v-if",!0),w(D)==="month"?(B(),_e(Hv,{key:2,ref_key:"rightCurrentViewRef",ref:z,"selection-mode":"month",date:g.value,"parsed-value":Ue.parsedValue,"disabled-date":w(s),disabled:w(Ke),onPick:w(se)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):ve("v-if",!0)],2)],2)],2),Ue.showFooter&&Cn.value&&(Ue.showConfirm||w(u))?(B(),Q("div",{key:0,class:$(w(y).e("footer"))},[w(u)?(B(),_e(w(Hi),{key:0,text:"",size:"small",class:$(w(y).e("link-btn")),onClick:Fe},{default:ce(()=>[dt(We(w(x)("el.datepicker.clear")),1)]),_:1},8,["class"])):ve("v-if",!0),Ue.showConfirm?(B(),_e(w(Hi),{key:1,plain:"",size:"small",class:$(w(y).e("link-btn")),disabled:Dt.value,onClick:tt[18]||(tt[18]=pt=>w(S)(!1))},{default:ce(()=>[dt(We(w(x)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):ve("v-if",!0)],2)):ve("v-if",!0)],2))}});const Kbe=qe({...OR}),Gbe=["pick","set-picker-option","calendar-change"],Ybe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:i}=Qt(),r=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},o=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},s=()=>{e.value=e.value.add(1,"year")},a=()=>{n.value=n.value.subtract(1,"year")},l=M(()=>`${e.value.year()} ${i("el.datepicker.year")}`),u=M(()=>`${n.value.year()} ${i("el.datepicker.year")}`),c=M(()=>e.value.year()),d=M(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:r,rightNextYear:o,leftNextYear:s,rightPrevYear:a,leftLabel:l,rightLabel:u,leftYear:c,rightYear:d}},Xbe=["disabled","onClick"],Jbe=["disabled"],Zbe=["disabled"],Qbe=["disabled"],e0e=["disabled"],U0="year";var t0e=le({name:"DatePickerMonthRange",__name:"panel-month-range",props:Kbe,emits:Gbe,setup(t,{emit:e}){const n=t,i=e,{lang:r}=Qt(),o=Ne(ha),s=Ne(Qb,void 0),{shortcuts:a,disabledDate:l,cellClassName:u}=o.props,c=An(o.props,"format"),d=An(o.props,"defaultValue"),f=H(ft().locale(r.value)),h=H(ft().locale(r.value).add(1,U0)),{minDate:m,maxDate:g,rangeState:v,ppNs:p,drpNs:b,handleChangeRange:y,handleRangeConfirm:_,handleShortcutClick:C,onSelect:S,parseValue:k}=NR(n,{defaultValue:d,leftDate:f,rightDate:h,unit:U0,sortDates:j}),T=M(()=>!!a.length),{leftPrevYear:E,rightNextYear:x,leftNextYear:P,rightPrevYear:A,leftLabel:I,rightLabel:D,leftYear:q,rightYear:z}=Ybe({unlinkPanels:An(n,"unlinkPanels"),leftDate:f,rightDate:h}),R=M(()=>n.unlinkPanels&&z.value>q.value+1),O=(W,J=!0)=>{const ne=W.minDate,he=W.maxDate;g.value===he&&m.value===ne||(i("calendar-change",[ne.toDate(),he&&he.toDate()]),g.value=he,m.value=ne,J&&_())},N=()=>{let W=null;o?.emptyValues&&(W=o.emptyValues.valueOnClear.value),f.value=zC(w(d),{lang:w(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],h.value=f.value.add(1,"year"),i("pick",W)},F=W=>Dm(W,c.value,r.value,s);function j(W,J){if(n.unlinkPanels&&J){const ne=W?.year()||0,he=J.year();h.value=ne===he?J.add(1,U0):J}else h.value=f.value.add(1,U0)}const U=Oi();return Se(()=>n.visible,W=>{!W&&v.value.selecting&&(k(n.parsedValue),S(!1))}),i("set-picker-option",["isValidValue",zv]),i("set-picker-option",["parseUserInput",F]),i("set-picker-option",["handleClear",N]),(W,J)=>(B(),Q("div",{class:$([w(p).b(),w(b).b(),w(p).is("border",W.border),w(p).is("disabled",w(U)),{"has-sidebar":!!W.$slots.sidebar||T.value}])},[ie("div",{class:$(w(p).e("body-wrapper"))},[we(W.$slots,"sidebar",{class:$(w(p).e("sidebar"))}),T.value?(B(),Q("div",{key:0,class:$(w(p).e("sidebar"))},[(B(!0),Q(rt,null,gn(w(a),(ne,he)=>(B(),Q("button",{key:he,type:"button",class:$(w(p).e("shortcut")),disabled:w(U),onClick:X=>w(C)(ne)},We(ne.text),11,Xbe))),128))],2)):ve("v-if",!0),ie("div",{class:$(w(p).e("body"))},[ie("div",{class:$([[w(p).e("content"),w(b).e("content")],"is-left"])},[ie("div",{class:$(w(b).e("header"))},[ie("button",{type:"button",class:$([w(p).e("icon-btn"),"d-arrow-left"]),disabled:w(U),onClick:J[0]||(J[0]=(...ne)=>w(E)&&w(E)(...ne))},[we(W.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,Jbe),W.unlinkPanels?(B(),Q("button",{key:0,type:"button",disabled:!R.value||w(U),class:$([[w(p).e("icon-btn"),w(p).is("disabled",!R.value||w(U))],"d-arrow-right"]),onClick:J[1]||(J[1]=(...ne)=>w(P)&&w(P)(...ne))},[we(W.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,Zbe)):ve("v-if",!0),ie("div",null,We(w(I)),1)],2),L(Hv,{"selection-mode":"range",date:f.value,"min-date":w(m),"max-date":w(g),"range-state":w(v),"disabled-date":w(l),disabled:w(U),"cell-class-name":w(u),onChangerange:w(y),onPick:O,onSelect:w(S)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),ie("div",{class:$([[w(p).e("content"),w(b).e("content")],"is-right"])},[ie("div",{class:$(w(b).e("header"))},[W.unlinkPanels?(B(),Q("button",{key:0,type:"button",disabled:!R.value||w(U),class:$([[w(p).e("icon-btn"),w(p).is("disabled",!R.value||w(U))],"d-arrow-left"]),onClick:J[2]||(J[2]=(...ne)=>w(A)&&w(A)(...ne))},[we(W.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,Qbe)):ve("v-if",!0),ie("button",{type:"button",class:$([w(p).e("icon-btn"),"d-arrow-right"]),disabled:w(U),onClick:J[3]||(J[3]=(...ne)=>w(x)&&w(x)(...ne))},[we(W.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,e0e),ie("div",null,We(w(D)),1)],2),L(Hv,{"selection-mode":"range",date:h.value,"min-date":w(m),"max-date":w(g),"range-state":w(v),"disabled-date":w(l),disabled:w(U),"cell-class-name":w(u),onChangerange:w(y),onPick:O,onSelect:w(S)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}});const n0e=qe({...OR}),i0e=["pick","set-picker-option","calendar-change"],r0e=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const i=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},r=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},o=()=>{e.value=e.value.add(10,"year")},s=()=>{n.value=n.value.subtract(10,"year")},a=M(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=M(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),u=M(()=>Math.floor(e.value.year()/10)*10+9),c=M(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:i,rightNextYear:r,leftNextYear:o,rightPrevYear:s,leftLabel:a,rightLabel:l,leftYear:u,rightYear:c}},o0e=["disabled","onClick"],s0e=["disabled"],a0e=["disabled"],l0e=["disabled"],u0e=["disabled"],ih=10,Og="year";var c0e=le({name:"DatePickerYearRange",__name:"panel-year-range",props:n0e,emits:i0e,setup(t,{emit:e}){const n=t,i=e,{lang:r}=Qt(),o=H(ft().locale(r.value)),s=H(ft().locale(r.value).add(ih,Og)),a=Ne(Qb,void 0),l=Ne(ha),{shortcuts:u,disabledDate:c,cellClassName:d}=l.props,f=An(l.props,"format"),h=An(l.props,"defaultValue"),{minDate:m,maxDate:g,rangeState:v,ppNs:p,drpNs:b,handleChangeRange:y,handleRangeConfirm:_,handleShortcutClick:C,onSelect:S,parseValue:k}=NR(n,{defaultValue:h,leftDate:o,rightDate:s,step:ih,unit:Og,sortDates:he}),{leftPrevYear:T,rightNextYear:E,leftNextYear:x,rightPrevYear:P,leftLabel:A,rightLabel:I,leftYear:D,rightYear:q}=r0e({unlinkPanels:An(n,"unlinkPanels"),leftDate:o,rightDate:s}),z=Oi(),R=M(()=>!!u.length),O=M(()=>[p.b(),b.b(),p.is("border",n.border),p.is("disabled",z.value),{"has-sidebar":!!$o().sidebar||R.value}]),N=M(()=>({content:[p.e("content"),b.e("content"),"is-left"],arrowLeftBtn:[p.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[p.e("icon-btn"),p.is("disabled",!j.value||z.value),"d-arrow-right"]})),F=M(()=>({content:[p.e("content"),b.e("content"),"is-right"],arrowLeftBtn:[p.e("icon-btn"),p.is("disabled",!j.value||z.value),"d-arrow-left"],arrowRightBtn:[p.e("icon-btn"),"d-arrow-right"]})),j=M(()=>n.unlinkPanels&&q.value>D.value+1),U=(X,se=!0)=>{const re=X.minDate,ee=X.maxDate;g.value===ee&&m.value===re||(i("calendar-change",[re.toDate(),ee&&ee.toDate()]),g.value=ee,m.value=re,se&&_())},W=X=>Dm(X,f.value,r.value,a),J=X=>zv(X)&&(c?!c(X[0].toDate())&&!c(X[1].toDate()):!0),ne=()=>{let X=null;l?.emptyValues&&(X=l.emptyValues.valueOnClear.value);const se=zC(w(h),{lang:w(r),step:ih,unit:Og,unlinkPanels:n.unlinkPanels});o.value=se[0],s.value=se[1],i("pick",X)};function he(X,se){if(n.unlinkPanels&&se){const re=X?.year()||0,ee=se.year();s.value=re+ih>ee?se.add(ih,Og):se}else s.value=o.value.add(ih,Og)}return Se(()=>n.visible,X=>{!X&&v.value.selecting&&(k(n.parsedValue),S(!1))}),i("set-picker-option",["isValidValue",J]),i("set-picker-option",["parseUserInput",W]),i("set-picker-option",["handleClear",ne]),(X,se)=>(B(),Q("div",{class:$(O.value)},[ie("div",{class:$(w(p).e("body-wrapper"))},[we(X.$slots,"sidebar",{class:$(w(p).e("sidebar"))}),R.value?(B(),Q("div",{key:0,class:$(w(p).e("sidebar"))},[(B(!0),Q(rt,null,gn(w(u),(re,ee)=>(B(),Q("button",{key:ee,type:"button",class:$(w(p).e("shortcut")),disabled:w(z),onClick:te=>w(C)(re)},We(re.text),11,o0e))),128))],2)):ve("v-if",!0),ie("div",{class:$(w(p).e("body"))},[ie("div",{class:$(N.value.content)},[ie("div",{class:$(w(b).e("header"))},[ie("button",{type:"button",class:$(N.value.arrowLeftBtn),disabled:w(z),onClick:se[0]||(se[0]=(...re)=>w(T)&&w(T)(...re))},[we(X.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,s0e),X.unlinkPanels?(B(),Q("button",{key:0,type:"button",disabled:!j.value||w(z),class:$(N.value.arrowRightBtn),onClick:se[1]||(se[1]=(...re)=>w(x)&&w(x)(...re))},[we(X.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,a0e)):ve("v-if",!0),ie("div",null,We(w(A)),1)],2),L(Uv,{"selection-mode":"range",date:o.value,"min-date":w(m),"max-date":w(g),"range-state":w(v),"disabled-date":w(c),disabled:w(z),"cell-class-name":w(d),onChangerange:w(y),onPick:U,onSelect:w(S)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),ie("div",{class:$(F.value.content)},[ie("div",{class:$(w(b).e("header"))},[X.unlinkPanels?(B(),Q("button",{key:0,type:"button",disabled:!j.value||w(z),class:$(F.value.arrowLeftBtn),onClick:se[2]||(se[2]=(...re)=>w(P)&&w(P)(...re))},[we(X.$slots,"prev-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Tc))]),_:1})])],10,l0e)):ve("v-if",!0),ie("button",{type:"button",class:$(F.value.arrowRightBtn),disabled:w(z),onClick:se[3]||(se[3]=(...re)=>w(E)&&w(E)(...re))},[we(X.$slots,"next-year",{},()=>[L(w(He),null,{default:ce(()=>[L(w(Ec))]),_:1})])],10,u0e),ie("div",null,We(w(I)),1)],2),L(Uv,{"selection-mode":"range",date:s.value,"min-date":w(m),"max-date":w(g),"range-state":w(v),"disabled-date":w(c),disabled:w(z),"cell-class-name":w(d),onChangerange:w(y),onPick:U,onSelect:w(S)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}});const d0e=function(t){switch(t){case"daterange":case"datetimerange":return jbe;case"monthrange":return t0e;case"yearrange":return c0e;default:return Pbe}};function f0e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!yi(t)}ft.extend(hge);ft.extend(Bve);ft.extend(BW);ft.extend(zve);ft.extend(qve);ft.extend(Yve);ft.extend(Qve);ft.extend(ibe);var h0e=le({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:rbe,emits:[It,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:i}){const r=De("picker-panel"),o=Ne(ha,void 0);if(pn(o)){const d=on({...Sr(t)});qt(ha,{props:d})}qt(RR,{slots:e,pickerNs:r});const{parsedValue:s,onCalendarChange:a,onPanelChange:l,onSetPickerOption:u,onPick:c}=Ne(VW,()=>FW(t,n),!0);return()=>{const d=d0e(t.type);return L(d,Lt(IC(i,"onPick"),t,{parsedValue:s.value,"onSet-picker-option":u,"onCalendar-change":a,"onPanel-change":l,onClear:()=>n("clear"),onPick:c}),f0e(e)?e:{default:()=>[e]})}}});const m0e=sn(h0e),g0e=qe({...IR,type:{type:me(String),default:"date"}});function p0e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!yi(t)}var v0e=le({name:"ElDatePicker",install:null,props:g0e,emits:[It],setup(t,{expose:e,emit:n,slots:i}){const r=M(()=>!t.format);qt(Qb,r),qt(AR,on(An(t,"popperOptions")));const o=H();e({focus:()=>{var l;(l=o.value)==null||l.focus()},blur:()=>{var l;(l=o.value)==null||l.blur()},handleOpen:()=>{var l;(l=o.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=o.value)==null||l.handleClose()}});const a=l=>{n(It,l)};return()=>{var l;const u=(l=t.format)!=null?l:bve[t.type]||lc;return L(zW,Lt(t,{format:u,type:t.type,ref:o,"onUpdate:modelValue":a}),{default:c=>L(m0e,Lt({disabled:t.disabled,editable:t.editable,border:!1},c),p0e(i)?i:{default:()=>[i]}),"range-separator":i["range-separator"]})}}});const W0=sn(v0e),KW=qe({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:ri},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),b0e={close:()=>!0},y0e=qe({...KW,appendToBody:Boolean,appendTo:{type:iR.to.type,default:"body"},beforeClose:{type:me(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:me([String,Object]),default:void 0}}),w0e={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[It]:t=>vi(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},BR=t=>{if(!t)return{onClick:tn,onMousedown:tn,onMouseup:tn};let e=!1,n=!1;return{onClick:s=>{e&&n&&t(s),e=n=!1},onMousedown:s=>{e=s.target===s.currentTarget},onMouseup:s=>{n=s.target===s.currentTarget}}},_0e=qe({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:me([String,Array,Object])},zIndex:{type:me([String,Number])}}),C0e={click:t=>t instanceof MouseEvent},S0e="overlay";var k0e=le({name:"ElOverlay",props:_0e,emits:C0e,setup(t,{slots:e,emit:n}){const i=De(S0e),r=l=>{n("click",l)},{onClick:o,onMousedown:s,onMouseup:a}=BR(t.customMaskEvent?void 0:r);return()=>t.mask?L("div",{class:[i.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:s,onMouseup:a},[we(e,"default")],Cw.STYLE|Cw.CLASS|Cw.PROPS,["onClick","onMouseup","onMousedown"]):nt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[we(e,"default")])}});const GW=k0e,YW=Symbol("dialogInjectionKey"),bN="dialog-fade",VR=(...t)=>e=>{t.forEach(n=>{n.value=e})},XW=(t,e,n,i)=>{const r={offsetX:0,offsetY:0},o=H(!1),s=(f,h)=>{if(t.value){const{offsetX:m,offsetY:g}=r,v=t.value.getBoundingClientRect(),p=v.left,b=v.top,y=v.width,_=v.height,C=document.documentElement.clientWidth,S=document.documentElement.clientHeight,k=-p+m,T=-b+g,E=C-p-y+m,x=S-b-(_<S?_:0)+g;i?.value||(f=Math.min(Math.max(f,k),E),h=Math.min(Math.max(h,T),x)),r.offsetX=f,r.offsetY=h,t.value.style.transform=`translate(${zr(f)}, ${zr(h)})`}},a=f=>{const h=f.clientX,m=f.clientY,{offsetX:g,offsetY:v}=r,p=y=>{o.value||(o.value=!0);const _=g+y.clientX-h,C=v+y.clientY-m;s(_,C)},b=()=>{o.value=!1,document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",b)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",b)},l=()=>{e.value&&t.value&&(e.value.addEventListener("mousedown",a),window.addEventListener("resize",d))},u=()=>{e.value&&t.value&&(e.value.removeEventListener("mousedown",a),window.removeEventListener("resize",d))},c=()=>{r.offsetX=0,r.offsetY=0,t.value&&(t.value.style.transform="")},d=()=>{const{offsetX:f,offsetY:h}=r;s(f,h)};return Pt(()=>{sl(()=>{n.value?l():u()})}),Sn(()=>{u()}),{isDragging:o,resetPosition:c,updatePosition:d}},T0e=["aria-level"],E0e=["aria-label"],x0e=["id"];var A0e=le({name:"ElDialogContent",__name:"dialog-content",props:KW,emits:b0e,setup(t,{expose:e}){const{t:n}=Qt(),{Close:i}=afe,r=t,{dialogRef:o,headerRef:s,bodyId:a,ns:l,style:u}=Ne(YW),{focusTrapRef:c}=Ne(UU),d=VR(c,o),f=M(()=>!!r.draggable),h=M(()=>!!r.overflow),{resetPosition:m,updatePosition:g,isDragging:v}=XW(o,s,f,h),p=M(()=>[l.b(),l.is("fullscreen",r.fullscreen),l.is("draggable",f.value),l.is("dragging",v.value),l.is("align-center",!!r.alignCenter),{[l.m("center")]:r.center}]);return e({resetPosition:m,updatePosition:g}),(b,y)=>(B(),Q("div",{ref:w(d),class:$(p.value),style:mt(w(u)),tabindex:"-1"},[ie("header",{ref_key:"headerRef",ref:s,class:$([w(l).e("header"),t.headerClass,{"show-close":t.showClose}])},[we(b.$slots,"header",{},()=>[ie("span",{role:"heading","aria-level":t.ariaLevel,class:$(w(l).e("title"))},We(t.title),11,T0e)]),t.showClose?(B(),Q("button",{key:0,"aria-label":w(n)("el.dialog.close"),class:$(w(l).e("headerbtn")),type:"button",onClick:y[0]||(y[0]=_=>b.$emit("close"))},[L(w(He),{class:$(w(l).e("close"))},{default:ce(()=>[(B(),_e(Gt(t.closeIcon||w(i))))]),_:1},8,["class"])],10,E0e)):ve("v-if",!0)],2),ie("div",{id:w(a),class:$([w(l).e("body"),t.bodyClass])},[we(b.$slots,"default")],10,x0e),b.$slots.footer?(B(),Q("footer",{key:0,class:$([w(l).e("footer"),t.footerClass])},[we(b.$slots,"footer")],2)):ve("v-if",!0)],6))}});const FR=(t,e={})=>{rn(t)||dr("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||De("popup"),i=M(()=>n.bm("parent","hidden"));let r=0,o=!1,s="0",a=!1;const l=()=>{a||(a=!0,setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=s,os(document.body,i.value))},200))};Se(t,u=>{if(!u){l();return}a=!1,o=!Xa(document.body,i.value),o&&(s=document.body.style.width,Qs(document.body,i.value)),r=ede(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,d=sc(document.body,"overflowY");r>0&&(c||d==="scroll")&&o&&(document.body.style.width=`calc(100% - ${r}px)`)}),dC(()=>l())},P0e=(t,e)=>{var n;const r=Ct().emit,{nextZIndex:o}=RC();let s="";const a=as(),l=as(),u=H(!1),c=H(!1),d=H(!1),f=H((n=t.zIndex)!=null?n:o()),h=H(!1);let m,g;const v=Yb(),p=M(()=>{var U,W;return(W=(U=v.value)==null?void 0:U.namespace)!=null?W:Up}),b=M(()=>{var U;return(U=v.value)==null?void 0:U.dialog}),y=M(()=>{const U={},W=`--${p.value}-dialog`;if(!t.fullscreen){t.top&&(U[`${W}-margin-top`]=t.top);const J=zr(t.width);J&&(U[`${W}-width`]=J)}return U}),_=M(()=>{var U,W,J;return((J=(W=t.draggable)!=null?W:(U=b.value)==null?void 0:U.draggable)!=null?J:!1)&&!t.fullscreen}),C=M(()=>{var U,W,J;return(J=(W=t.alignCenter)!=null?W:(U=b.value)==null?void 0:U.alignCenter)!=null?J:!1}),S=M(()=>{var U,W,J;return(J=(W=t.overflow)!=null?W:(U=b.value)==null?void 0:U.overflow)!=null?J:!1}),k=M(()=>C.value?{display:"flex"}:{}),T=M(()=>{var U,W,J;const ne=(J=(W=t.transition)!=null?W:(U=b.value)==null?void 0:U.transition)!=null?J:bN,he={name:ne,onAfterEnter:E,onBeforeLeave:P,onAfterLeave:x};if(_t(ne)){const X={...ne},se=(re,ee)=>te=>{Pe(re)?re.forEach(V=>{Xe(V)&&V(te)}):Xe(re)&&re(te),ee()};return X.onAfterEnter=se(X.onAfterEnter,E),X.onBeforeLeave=se(X.onBeforeLeave,P),X.onAfterLeave=se(X.onAfterLeave,x),X.name||(X.name=bN),X}return he});function E(){r("opened")}function x(){r("closed"),r(It,!1),t.destroyOnClose&&(d.value=!1),h.value=!1}function P(){h.value=!0,r("close")}function A(){g?.(),m?.(),t.openDelay&&t.openDelay>0?{stop:m}=Dv(()=>z(),t.openDelay):z()}function I(){m?.(),g?.(),t.closeDelay&&t.closeDelay>0?{stop:g}=Dv(()=>R(),t.closeDelay):R()}function D(){function U(W){W||(c.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(U):I()}function q(){t.closeOnClickModal&&D()}function z(){Zt&&(u.value=!0)}function R(){u.value=!1}function O(){r("openAutoFocus")}function N(){r("closeAutoFocus")}function F(U){var W;((W=U.detail)==null?void 0:W.focusReason)==="pointer"&&U.preventDefault()}t.lockScroll&&FR(u);function j(){t.closeOnPressEscape&&D()}return Se(()=>t.zIndex,()=>{var U;f.value=(U=t.zIndex)!=null?U:o()}),Se(()=>t.modelValue,U=>{var W;U?(c.value=!1,h.value=!1,A(),d.value=!0,f.value=(W=t.zIndex)!=null?W:o(),Ye(()=>{r("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):u.value&&I()}),Se(()=>t.fullscreen,U=>{e.value&&(U?(s=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=s)}),Pt(()=>{t.modelValue&&(u.value=!0,d.value=!0,A())}),{afterEnter:E,afterLeave:x,beforeLeave:P,handleClose:D,onModalClick:q,close:I,doClose:R,onOpenAutoFocus:O,onCloseAutoFocus:N,onCloseRequested:j,onFocusoutPrevented:F,titleId:a,bodyId:l,closed:c,style:y,overlayDialogStyle:k,rendered:d,visible:u,zIndex:f,transitionConfig:T,_draggable:_,_alignCenter:C,_overflow:S,closing:h}},I0e=["aria-label","aria-labelledby","aria-describedby"];var R0e=le({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:y0e,emits:w0e,setup(t,{expose:e}){const n=t,i=$o();of({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},M(()=>!!i.title));const r=De("dialog"),o=H(),s=H(),a=H(),{visible:l,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:h,transitionConfig:m,zIndex:g,_draggable:v,_alignCenter:p,_overflow:b,handleClose:y,onModalClick:_,onOpenAutoFocus:C,onCloseAutoFocus:S,onCloseRequested:k,onFocusoutPrevented:T,closing:E}=P0e(n,o);qt(YW,{dialogRef:o,headerRef:s,bodyId:c,ns:r,rendered:h,style:d});const x=BR(_),P=M(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var I;(I=a.value)==null||I.resetPosition()},handleClose:y}),(I,D)=>(B(),_e(w(rR),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:ce(()=>[L(ya,Lt(w(m),{persisted:""}),{default:ce(()=>{var q;return[Vt(L(w(GW),{"custom-mask-event":"",mask:t.modal,"overlay-class":[(q=t.modalClass)!=null?q:"",`${w(r).namespace.value}-modal-dialog`,w(r).is("penetrable",P.value)],"z-index":w(g)},{default:ce(()=>[ie("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:w(u),"aria-describedby":w(c),class:$([`${w(r).namespace.value}-overlay-dialog`,w(r).is("closing",w(E))]),style:mt(w(f)),onClick:D[0]||(D[0]=(...z)=>w(x).onClick&&w(x).onClick(...z)),onMousedown:D[1]||(D[1]=(...z)=>w(x).onMousedown&&w(x).onMousedown(...z)),onMouseup:D[2]||(D[2]=(...z)=>w(x).onMouseup&&w(x).onMouseup(...z))},[L(w(VC),{loop:"",trapped:w(l),"focus-start-el":"container",onFocusAfterTrapped:w(C),onFocusAfterReleased:w(S),onFocusoutPrevented:w(T),onReleaseRequested:w(k)},{default:ce(()=>[w(h)?(B(),_e(A0e,Lt({key:0,ref_key:"dialogContentRef",ref:a},I.$attrs,{center:t.center,"align-center":w(p),"close-icon":t.closeIcon,draggable:w(v),overflow:w(b),fullscreen:t.fullscreen,"header-class":t.headerClass,"body-class":t.bodyClass,"footer-class":t.footerClass,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:w(y)}),kc({header:ce(()=>[I.$slots.title?we(I.$slots,"title",{key:1}):we(I.$slots,"header",{key:0,close:w(y),titleId:w(u),titleClass:w(r).e("title")})]),default:ce(()=>[we(I.$slots,"default")]),_:2},[I.$slots.footer?{name:"footer",fn:ce(()=>[we(I.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):ve("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,I0e)]),_:3},8,["mask","overlay-class","z-index"]),[[On,w(l)]])]}),_:3},16)]),_:3},8,["to","disabled"]))}});const M0e=sn(R0e),O0e=qe({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:me(String),default:"solid"}});var L0e=le({name:"ElDivider",__name:"divider",props:O0e,setup(t){const e=t,n=De("divider"),i=M(()=>n.cssVar({"border-style":e.borderStyle}));return(r,o)=>(B(),Q("div",{class:$([w(n).b(),w(n).m(t.direction)]),style:mt(i.value),role:"separator"},[r.$slots.default&&t.direction!=="vertical"?(B(),Q("div",{key:0,class:$([w(n).e("text"),w(n).is(t.contentPosition)])},[we(r.$slots,"default")],2)):ve("v-if",!0)],6))}});const yN=sn(L0e);var D0e=le({inheritAttrs:!1});function N0e(t,e,n,i,r,o){return we(t.$slots,"default")}var B0e=Tr(D0e,[["render",N0e]]),V0e=le({name:"ElCollectionItem",inheritAttrs:!1});function F0e(t,e,n,i,r,o){return we(t.$slots,"default")}var $0e=Tr(V0e,[["render",F0e]]);const JW="data-el-collection-item",z0e=t=>{const e=`El${t}Collection`,n=`${e}Item`,i=Symbol(e),r=Symbol(n),o=Object.assign({},B0e,{name:e,setup(){const a=H(),l=new Map;qt(i,{itemMap:l,getItems:(()=>{const c=w(a);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${JW}]`));return[...l.values()].sort((h,m)=>d.indexOf(h.ref)-d.indexOf(m.ref))}),collectionRef:a})}}),s=Object.assign({},$0e,{name:n,setup(a,{attrs:l}){const u=H(),c=Ne(i,void 0);qt(r,{collectionItemRef:u}),Pt(()=>{const d=w(u);d&&c.itemMap.set(d,{ref:d,...l})}),Sn(()=>{const d=w(u);c.itemMap.delete(d)})}});return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:r,ElCollection:o,ElCollectionItem:s}},H0e=qe({style:{type:me([String,Array,Object])},currentTabId:{type:me(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:me(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:U0e,ElCollectionItem:W0e,COLLECTION_INJECTION_KEY:ZW,COLLECTION_ITEM_INJECTION_KEY:q0e}=z0e("RovingFocusGroup"),$R=Symbol("elRovingFocusGroup"),QW=Symbol("elRovingFocusGroupItem"),j0e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},K0e=(t,e)=>t,G0e=(t,e,n)=>{const i=Bn(t),r=K0e(i);return j0e[r]},Y0e=(t,e)=>t.map((n,i)=>t[(i+e)%t.length]),wN=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},_N="currentTabIdChange",CN="rovingFocusGroup.entryFocus",X0e={bubbles:!1,cancelable:!0};var J0e=le({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:H0e,emits:[_N,"entryFocus"],setup(t,{emit:e}){var n;const i=H((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),r=H(!1),o=H(!1),s=H(),{getItems:a}=Ne(ZW,void 0),l=M(()=>[{outline:"none"},t.style]),u=v=>{e(_N,v)},c=()=>{r.value=!0},d=ji(v=>{var p;(p=t.onMousedown)==null||p.call(t,v)},()=>{o.value=!0}),f=ji(v=>{var p;(p=t.onFocus)==null||p.call(t,v)},v=>{const p=!w(o),{target:b,currentTarget:y}=v;if(b===y&&p&&!w(r)){const _=new Event(CN,X0e);if(y?.dispatchEvent(_),!_.defaultPrevented){const C=a().filter(x=>x.focusable),S=C.find(x=>x.active),k=C.find(x=>x.id===w(i)),E=[S,k,...C].filter(Boolean).map(x=>x.ref);wN(E)}}o.value=!1}),h=ji(v=>{var p;(p=t.onBlur)==null||p.call(t,v)},()=>{r.value=!1}),m=(...v)=>{e("entryFocus",...v)},g=v=>{const p=G0e(v);if(p){v.preventDefault();let y=a().filter(_=>_.focusable).map(_=>_.ref);switch(p){case"last":{y.reverse();break}case"prev":case"next":{p==="prev"&&y.reverse();const _=y.indexOf(v.currentTarget);y=t.loop?Y0e(y,_+1):y.slice(_+1);break}}Ye(()=>{wN(y)})}};qt($R,{currentTabbedId:gf(i),loop:An(t,"loop"),tabIndex:M(()=>w(r)?-1:0),rovingFocusGroupRef:s,rovingFocusGroupRootStyle:l,orientation:An(t,"orientation"),dir:An(t,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:h,onFocus:f,onMousedown:d,onKeydown:g}),Se(()=>t.currentTabId,v=>{i.value=v??null}),Kn(s,CN,m)}});function Z0e(t,e,n,i,r,o){return we(t.$slots,"default")}var Q0e=Tr(J0e,[["render",Z0e]]),eye=le({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:U0e,ElRovingFocusGroupImpl:Q0e}});function tye(t,e,n,i,r,o){const s=Bt("el-roving-focus-group-impl"),a=Bt("el-focus-group-collection");return B(),_e(a,null,{default:ce(()=>[L(s,pw(Fp(t.$attrs)),{default:ce(()=>[we(t.$slots,"default")]),_:3},16)]),_:3})}var nye=Tr(eye,[["render",tye]]);const Nw=qe({trigger:{...vc.trigger,type:me([String,Array])},triggerKeys:{type:me(Array),default:()=>[Me.enter,Me.numpadEnter,Me.space,Me.down]},virtualTriggering:vc.virtualTriggering,virtualRef:vc.virtualRef,effect:{...Mn.effect,default:"light"},type:{type:me(String)},placement:{type:me(String),default:"bottom"},popperOptions:{type:me(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:me([Number,String]),default:0},maxHeight:{type:me([Number,String]),default:""},popperClass:Mn.popperClass,popperStyle:Mn.popperStyle,disabled:Boolean,role:{type:String,values:BU,default:"menu"},buttonProps:{type:me(Object)},teleported:Mn.teleported,appendTo:Mn.appendTo,persistent:{type:Boolean,default:!0}}),eq=qe({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ri}}),iye=qe({onKeydown:{type:me(Function)}}),HC=Symbol("elDropdown"),tq="elDropdown",{ButtonGroup:rye}=Hi;var oye=le({name:"ElDropdown",components:{ElButton:Hi,ElButtonGroup:rye,ElScrollbar:gu,ElTooltip:Lo,ElRovingFocusGroup:nye,ElOnlyChild:zU,ElIcon:He,ArrowDown:zc},props:Nw,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=Ct(),i=De("dropdown"),{t:r}=Qt(),o=H(),s=H(),a=H(),l=H(),u=H(null),c=H(null),d=H(!1),f=M(()=>({maxHeight:zr(t.maxHeight)})),h=M(()=>[i.m(_.value)]),m=M(()=>Co(t.trigger)),g=as().value,v=M(()=>t.id||g);function p(){var I;(I=a.value)==null||I.onClose(void 0,0)}function b(){var I;(I=a.value)==null||I.onClose()}function y(){var I;(I=a.value)==null||I.onOpen()}const _=fr();function C(...I){e("command",...I)}function S(){}function k(){const I=w(l);m.value.includes("hover")&&I?.focus({preventScroll:!0}),c.value=null}function T(I){c.value=I}function E(){e("visible-change",!0)}function x(I){var D;d.value=I?.type==="keydown",(D=l.value)==null||D.focus()}function P(){e("visible-change",!1)}return qt(HC,{contentRef:l,role:M(()=>t.role),triggerId:v,isUsingKeyboard:d,onItemEnter:S,onItemLeave:k,handleClose:b}),qt(tq,{instance:n,dropdownSize:_,handleClick:p,commandHandler:C,trigger:An(t,"trigger"),hideOnClick:An(t,"hideOnClick")}),{t:r,ns:i,scrollbar:u,wrapStyle:f,dropdownTriggerKls:h,dropdownSize:_,triggerId:v,currentTabId:c,handleCurrentTabIdChange:T,handlerMainButtonClick:I=>{e("click",I)},handleClose:b,handleOpen:y,handleBeforeShowTooltip:E,handleShowTooltip:x,handleBeforeHideTooltip:P,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:s}}});function sye(t,e,n,i,r,o){var s;const a=Bt("el-roving-focus-group"),l=Bt("el-scrollbar"),u=Bt("el-only-child"),c=Bt("el-tooltip"),d=Bt("el-button"),f=Bt("arrow-down"),h=Bt("el-icon"),m=Bt("el-button-group");return B(),Q("div",{class:$([t.ns.b(),t.ns.is("disabled",t.disabled)])},[L(c,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"popper-style":t.popperStyle,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-arrow":t.showArrow,"show-after":t.trigger==="hover"?t.showTimeout:0,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"virtual-ref":(s=t.virtualRef)!=null?s:t.triggeringElementRef,"virtual-triggering":t.virtualTriggering||t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,"append-to":t.appendTo,pure:"","focus-on-target":"",persistent:t.persistent,onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},kc({content:ce(()=>[L(l,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:ce(()=>[L(a,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange},{default:ce(()=>[we(t.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:ce(()=>[L(u,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:ce(()=>[we(t.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","append-to","persistent","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(B(),_e(m,{key:0},{default:ce(()=>[L(d,Lt({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:ce(()=>[we(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),L(d,Lt({id:t.triggerId,ref:"triggeringElementRef"},t.buttonProps,{role:"button",size:t.dropdownSize,type:t.type,class:t.ns.e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":t.t("el.dropdown.toggleDropdown")}),{default:ce(()=>[L(h,{class:$(t.ns.e("icon"))},{default:ce(()=>[L(f)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):ve("v-if",!0)],2)}var aye=Tr(oye,[["render",sye]]),lye=le({components:{ElRovingFocusCollectionItem:W0e},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,onItemFocus:i,onItemShiftTab:r,onKeydown:o}=Ne($R,void 0),s=as(),a=H(),l=ji(f=>{e("mousedown",f)},f=>{t.focusable?i(w(s)):f.preventDefault()}),u=ji(f=>{e("focus",f)},()=>{i(w(s))}),c=ji(f=>{e("keydown",f)},f=>{const{shiftKey:h,target:m,currentTarget:g}=f;if(Bn(f)===Me.tab&&h){r();return}m===g&&o(f)}),d=M(()=>n.value===w(s));return qt(QW,{rovingFocusGroupItemRef:a,tabIndex:M(()=>w(d)?0:-1),handleMousedown:l,handleFocus:u,handleKeydown:c}),{id:s,handleKeydown:c,handleFocus:u,handleMousedown:l}}});function uye(t,e,n,i,r,o){const s=Bt("el-roving-focus-collection-item");return B(),_e(s,{id:t.id,focusable:t.focusable,active:t.active},{default:ce(()=>[we(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var cye=Tr(lye,[["render",uye]]),dye=le({name:"DropdownItemImpl",components:{ElIcon:He},props:eq,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=De("dropdown"),{role:i}=Ne(HC,void 0),{collectionItemRef:r}=Ne(q0e,void 0),{rovingFocusGroupItemRef:o,tabIndex:s,handleFocus:a,handleKeydown:l,handleMousedown:u}=Ne(QW,void 0),c=VR(r,o),d=M(()=>i.value==="menu"?"menuitem":i.value==="navigation"?"link":"button"),f=ji(h=>{const m=Bn(h);if([Me.enter,Me.numpadEnter,Me.space].includes(m))return h.preventDefault(),h.stopImmediatePropagation(),e("clickimpl",h),!0},l);return{ns:n,itemRef:c,dataset:{[JW]:""},role:d,tabIndex:s,handleFocus:a,handleKeydown:f,handleMousedown:u}}});const fye=["aria-disabled","tabindex","role"];function hye(t,e,n,i,r,o){const s=Bt("el-icon");return B(),Q(rt,null,[t.divided?(B(),Q("li",{key:0,role:"separator",class:$(t.ns.bem("menu","item","divided"))},null,2)):ve("v-if",!0),ie("li",Lt({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:e[0]||(e[0]=a=>t.$emit("clickimpl",a)),onFocus:e[1]||(e[1]=(...a)=>t.handleFocus&&t.handleFocus(...a)),onKeydown:e[2]||(e[2]=Ot((...a)=>t.handleKeydown&&t.handleKeydown(...a),["self"])),onMousedown:e[3]||(e[3]=(...a)=>t.handleMousedown&&t.handleMousedown(...a)),onPointermove:e[4]||(e[4]=a=>t.$emit("pointermove",a)),onPointerleave:e[5]||(e[5]=a=>t.$emit("pointerleave",a))}),[t.icon||t.$slots.icon?(B(),_e(s,{key:0},{default:ce(()=>[we(t.$slots,"icon",{},()=>[(B(),_e(Gt(t.icon)))])]),_:3})):ve("v-if",!0),we(t.$slots,"default")],16,fye)],64)}var mye=Tr(dye,[["render",hye]]);const nq=()=>{const t=Ne(tq,{}),e=M(()=>t?.dropdownSize);return{elDropdown:t,_elDropdownSize:e}};var gye=le({name:"ElDropdownItem",components:{ElRovingFocusItem:cye,ElDropdownItemImpl:mye},inheritAttrs:!1,props:eq,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:i}=nq(),r=Ct(),{onItemEnter:o,onItemLeave:s}=Ne(HC,void 0),a=ji(d=>(e("pointermove",d),d.defaultPrevented),UD(d=>{if(t.disabled){s(d);return}const f=d.currentTarget;f===document.activeElement||f.contains(document.activeElement)||(o(d),d.defaultPrevented||f?.focus({preventScroll:!0}))})),l=ji(d=>(e("pointerleave",d),d.defaultPrevented),UD(s)),u=ji(d=>{if(!t.disabled)return e("click",d),d.type!=="keydown"&&d.defaultPrevented},d=>{var f,h,m;if(t.disabled){d.stopImmediatePropagation();return}(f=i?.hideOnClick)!=null&&f.value&&((h=i.handleClick)==null||h.call(i)),(m=i.commandHandler)==null||m.call(i,t.command,r,d)}),c=M(()=>({...t,...n}));return{handleClick:u,handlePointerMove:a,handlePointerLeave:l,propsAndAttrs:c}}});function pye(t,e,n,i,r,o){const s=Bt("el-dropdown-item-impl"),a=Bt("el-roving-focus-item");return B(),_e(a,{focusable:!t.disabled},{default:ce(()=>[L(s,Lt(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),kc({default:ce(()=>[we(t.$slots,"default")]),_:2},[t.$slots.icon?{name:"icon",fn:ce(()=>[we(t.$slots,"icon")]),key:"0"}:void 0]),1040,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var iq=Tr(gye,[["render",pye]]),vye=le({name:"ElDropdownMenu",props:iye,setup(t){const e=De("dropdown"),{_elDropdownSize:n}=nq(),i=n.value,{contentRef:r,role:o,triggerId:s,isUsingKeyboard:a,handleClose:l}=Ne(HC,void 0),{rovingFocusGroupRef:u,rovingFocusGroupRootStyle:c,onBlur:d,onFocus:f,onKeydown:h,onMousedown:m}=Ne($R,void 0),{collectionRef:g}=Ne(ZW,void 0),v=M(()=>[e.b("menu"),e.bm("menu",i?.value)]),p=VR(r,u,g),b=ji(_=>{var C;(C=t.onKeydown)==null||C.call(t,_)},_=>{const{currentTarget:C,target:S}=_,k=Bn(_);if(C.contains(S),Me.tab===k)return l();h(_)});function y(_){a.value&&f(_)}return{size:i,rovingFocusGroupRootStyle:c,dropdownKls:v,role:o,triggerId:s,dropdownListWrapperRef:p,handleKeydown:b,onBlur:d,handleFocus:y,onMousedown:m}}});const bye=["role","aria-labelledby"];function yye(t,e,n,i,r,o){return B(),Q("ul",{ref:t.dropdownListWrapperRef,class:$(t.dropdownKls),style:mt(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onFocusin:e[0]||(e[0]=(...s)=>t.handleFocus&&t.handleFocus(...s)),onFocusout:e[1]||(e[1]=(...s)=>t.onBlur&&t.onBlur(...s)),onKeydown:e[2]||(e[2]=Ot((...s)=>t.handleKeydown&&t.handleKeydown(...s),["self"])),onMousedown:e[3]||(e[3]=Ot((...s)=>t.onMousedown&&t.onMousedown(...s),["self"]))},[we(t.$slots,"default")],46,bye)}var rq=Tr(vye,[["render",yye]]);const wye=sn(aye,{DropdownItem:iq,DropdownMenu:rq}),_ye=Zi(iq),Cye=Zi(rq),Sye=qe({size:{type:String,values:yl},disabled:Boolean}),kye=qe({...Sye,model:Object,rules:{type:me(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:me([Object,Boolean]),default:!0}}),Tye={validate:(t,e,n)=>(Pe(t)||ot(t))&&vi(e)&&ot(n)};function Eye(){const t=H([]),e=M(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const s=t.value.indexOf(o);return s===-1&&e.value,s}function i(o,s){if(o&&s){const a=n(s);t.value.splice(a,1,o)}else o&&t.value.push(o)}function r(o){const s=n(o);s>-1&&t.value.splice(s,1)}return{autoLabelWidth:e,registerLabelWidth:i,deregisterLabelWidth:r}}const q0=(t,e)=>{const n=Co(e).map(i=>Pe(i)?i.join("."):i);return n.length>0?t.filter(i=>i.propString&&n.includes(i.propString)):t},xye="ElForm";var Aye=le({name:xye,__name:"form",props:kye,emits:Tye,setup(t,{expose:e,emit:n}){const i=t,r=n,o=H(),s=on([]),a=fr(),l=De("form"),u=M(()=>{const{labelPosition:S,inline:k}=i;return[l.b(),l.m(a.value||"default"),{[l.m(`label-${S}`)]:S,[l.m("inline")]:k}]}),c=S=>q0(s,[S])[0],d=S=>{s.push(S)},f=S=>{S.prop&&s.splice(s.indexOf(S),1)},h=S=>{i.model&&S&&s.forEach(k=>{if(k.prop&&Xue(S,k.prop)){const T=lm(S,k.prop).value;k.setInitialValue(T)}})},m=(S=[])=>{i.model&&q0(s,S).forEach(k=>k.resetField())},g=(S=[])=>{q0(s,S).forEach(k=>k.clearValidate())},v=M(()=>!!i.model),p=S=>{if(s.length===0)return[];const k=q0(s,S);return k.length?k:[]},b=async S=>_(void 0,S),y=async(S=[])=>{if(!v.value)return!1;const k=p(S);if(k.length===0)return!0;let T={};for(const E of k)try{await E.validate(""),E.validateState==="error"&&!E.error&&E.resetField()}catch(x){T={...T,...x}}return Object.keys(T).length===0?!0:Promise.reject(T)},_=async(S=[],k)=>{let T=!1;const E=!Xe(k);try{return T=await y(S),T===!0&&await k?.(T),T}catch(x){if(x instanceof Error)throw x;const P=x;if(i.scrollToError&&o.value){const A=o.value.querySelector(`.${l.b()}-item.is-error`);A?.scrollIntoView(i.scrollIntoViewOptions)}return!T&&await k?.(!1,P),E&&Promise.reject(P)}},C=S=>{var k;const T=c(S);T&&((k=T.$el)==null||k.scrollIntoView(i.scrollIntoViewOptions))};return Se(()=>i.rules,()=>{i.validateOnRuleChange&&b().catch(S=>void 0)},{deep:!0,flush:"post"}),qt(Bf,on({...Sr(i),emit:r,resetFields:m,clearValidate:g,validateField:_,getField:c,addField:d,removeField:f,setInitialValues:h,...Eye()})),e({validate:b,validateField:_,resetFields:m,clearValidate:g,scrollToField:C,getField:c,fields:s,setInitialValues:h}),(S,k)=>(B(),Q("form",{ref_key:"formRef",ref:o,class:$(u.value)},[we(S.$slots,"default")],2))}});const Pye=["","error","validating","success"],Iye=qe({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:me([String,Array])},required:{type:Boolean,default:void 0},rules:{type:me([Object,Array])},error:String,validateStatus:{type:String,values:Pye},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:yl}});function Wd(){return Wd=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Wd.apply(this,arguments)}function Rye(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Wv(t,e)}function S2(t){return S2=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},S2(t)}function Wv(t,e){return Wv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},Wv(t,e)}function Mye(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Bw(t,e,n){return Mye()?Bw=Reflect.construct.bind():Bw=function(r,o,s){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(r,a),u=new l;return s&&Wv(u,s.prototype),u},Bw.apply(null,arguments)}function Oye(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function k2(t){var e=typeof Map=="function"?new Map:void 0;return k2=function(i){if(i===null||!Oye(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,r)}function r(){return Bw(i,arguments,S2(this).constructor)}return r.prototype=Object.create(i.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Wv(r,i)},k2(t)}var Lye=/%[sdj%]/g,Dye=function(){};function T2(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function es(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var s=t.replace(Lye,function(a){if(a==="%%")return"%";if(r>=o)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}break;default:return a}});return s}return t}function Nye(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function sr(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||Nye(e)&&typeof t=="string"&&!t)}function Bye(t,e,n){var i=[],r=0,o=t.length;function s(a){i.push.apply(i,a||[]),r++,r===o&&n(i)}t.forEach(function(a){e(a,s)})}function SN(t,e,n){var i=0,r=t.length;function o(s){if(s&&s.length){n(s);return}var a=i;i=i+1,a<r?e(t[a],o):n([])}o([])}function Vye(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var kN=(function(t){Rye(e,t);function e(n,i){var r;return r=t.call(this,"Async Validation Error")||this,r.errors=n,r.fields=i,r}return e})(k2(Error));function Fye(t,e,n,i,r){if(e.first){var o=new Promise(function(f,h){var m=function(p){return i(p),p.length?h(new kN(p,T2(p))):f(r)},g=Vye(t);SN(g,n,m)});return o.catch(function(f){return f}),o}var s=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),l=a.length,u=0,c=[],d=new Promise(function(f,h){var m=function(v){if(c.push.apply(c,v),u++,u===l)return i(c),c.length?h(new kN(c,T2(c))):f(r)};a.length||(i(c),f(r)),a.forEach(function(g){var v=t[g];s.indexOf(g)!==-1?SN(v,n,m):Bye(v,n,m)})});return d.catch(function(f){return f}),d}function $ye(t){return!!(t&&t.message!==void 0)}function zye(t,e){for(var n=t,i=0;i<e.length;i++){if(n==null)return n;n=n[e[i]]}return n}function TN(t,e){return function(n){var i;return t.fullFields?i=zye(e,t.fullFields):i=e[n.field||t.fullField],$ye(n)?(n.field=n.field||t.fullField,n.fieldValue=i,n):{message:typeof n=="function"?n():n,fieldValue:i,field:n.field||t.fullField}}}function EN(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];typeof i=="object"&&typeof t[n]=="object"?t[n]=Wd({},t[n],i):t[n]=i}}return t}var oq=function(e,n,i,r,o,s){e.required&&(!i.hasOwnProperty(e.field)||sr(n,s||e.type))&&r.push(es(o.messages.required,e.fullField))},Hye=function(e,n,i,r,o){(/^\s+$/.test(n)||n==="")&&r.push(es(o.messages.whitespace,e.fullField))},j0,Uye=(function(){if(j0)return j0;var t="[a-fA-F\\d:]",e=function(_){return _&&_.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",r=(`
(?:
(?:`+i+":){7}(?:"+i+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
(?:`+i+":){6}(?:"+n+"|:"+i+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
(?:`+i+":){5}(?::"+n+"|(?::"+i+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
(?:`+i+":){4}(?:(?::"+i+"){0,1}:"+n+"|(?::"+i+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
(?:`+i+":){3}(?:(?::"+i+"){0,2}:"+n+"|(?::"+i+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
(?:`+i+":){2}(?:(?::"+i+"){0,3}:"+n+"|(?::"+i+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
(?:`+i+":){1}(?:(?::"+i+"){0,4}:"+n+"|(?::"+i+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+i+"){0,5}:"+n+"|(?::"+i+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+r+"$)"),s=new RegExp("^"+n+"$"),a=new RegExp("^"+r+"$"),l=function(_){return _&&_.exact?o:new RegExp("(?:"+e(_)+n+e(_)+")|(?:"+e(_)+r+e(_)+")","g")};l.v4=function(y){return y&&y.exact?s:new RegExp(""+e(y)+n+e(y),"g")},l.v6=function(y){return y&&y.exact?a:new RegExp(""+e(y)+r+e(y),"g")};var u="(?:(?:[a-z]+:)?//)",c="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",v="(?::\\d{2,5})?",p='(?:[/?#][^\\s"]*)?',b="(?:"+u+"|www\\.)"+c+"(?:localhost|"+d+"|"+f+"|"+h+m+g+")"+v+p;return j0=new RegExp("(?:^"+b+"$)","i"),j0}),xN={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},vp={integer:function(e){return vp.number(e)&&parseInt(e,10)===e},float:function(e){return vp.number(e)&&!vp.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!vp.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(xN.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Uye())},hex:function(e){return typeof e=="string"&&!!e.match(xN.hex)}},Wye=function(e,n,i,r,o){if(e.required&&n===void 0){oq(e,n,i,r,o);return}var s=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;s.indexOf(a)>-1?vp[a](n)||r.push(es(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&r.push(es(o.messages.types[a],e.fullField,e.type))},qye=function(e,n,i,r,o){var s=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=n,d=null,f=typeof n=="number",h=typeof n=="string",m=Array.isArray(n);if(f?d="number":h?d="string":m&&(d="array"),!d)return!1;m&&(c=n.length),h&&(c=n.replace(u,"_").length),s?c!==e.len&&r.push(es(o.messages[d].len,e.fullField,e.len)):a&&!l&&c<e.min?r.push(es(o.messages[d].min,e.fullField,e.min)):l&&!a&&c>e.max?r.push(es(o.messages[d].max,e.fullField,e.max)):a&&l&&(c<e.min||c>e.max)&&r.push(es(o.messages[d].range,e.fullField,e.min,e.max))},rh="enum",jye=function(e,n,i,r,o){e[rh]=Array.isArray(e[rh])?e[rh]:[],e[rh].indexOf(n)===-1&&r.push(es(o.messages[rh],e.fullField,e[rh].join(", ")))},Kye=function(e,n,i,r,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||r.push(es(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var s=new RegExp(e.pattern);s.test(n)||r.push(es(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},fn={required:oq,whitespace:Hye,type:Wye,range:qye,enum:jye,pattern:Kye},Gye=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n,"string")&&!e.required)return i();fn.required(e,n,r,s,o,"string"),sr(n,"string")||(fn.type(e,n,r,s,o),fn.range(e,n,r,s,o),fn.pattern(e,n,r,s,o),e.whitespace===!0&&fn.whitespace(e,n,r,s,o))}i(s)},Yye=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&fn.type(e,n,r,s,o)}i(s)},Xye=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&(fn.type(e,n,r,s,o),fn.range(e,n,r,s,o))}i(s)},Jye=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&fn.type(e,n,r,s,o)}i(s)},Zye=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),sr(n)||fn.type(e,n,r,s,o)}i(s)},Qye=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&(fn.type(e,n,r,s,o),fn.range(e,n,r,s,o))}i(s)},ewe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&(fn.type(e,n,r,s,o),fn.range(e,n,r,s,o))}i(s)},twe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return i();fn.required(e,n,r,s,o,"array"),n!=null&&(fn.type(e,n,r,s,o),fn.range(e,n,r,s,o))}i(s)},nwe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&fn.type(e,n,r,s,o)}i(s)},iwe="enum",rwe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o),n!==void 0&&fn[iwe](e,n,r,s,o)}i(s)},owe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n,"string")&&!e.required)return i();fn.required(e,n,r,s,o),sr(n,"string")||fn.pattern(e,n,r,s,o)}i(s)},swe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n,"date")&&!e.required)return i();if(fn.required(e,n,r,s,o),!sr(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),fn.type(e,l,r,s,o),l&&fn.range(e,l.getTime(),r,s,o)}}i(s)},awe=function(e,n,i,r,o){var s=[],a=Array.isArray(n)?"array":typeof n;fn.required(e,n,r,s,o,a),i(s)},Rk=function(e,n,i,r,o){var s=e.type,a=[],l=e.required||!e.required&&r.hasOwnProperty(e.field);if(l){if(sr(n,s)&&!e.required)return i();fn.required(e,n,r,a,o,s),sr(n,s)||fn.type(e,n,r,a,o)}i(a)},lwe=function(e,n,i,r,o){var s=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(sr(n)&&!e.required)return i();fn.required(e,n,r,s,o)}i(s)},Kp={string:Gye,method:Yye,number:Xye,boolean:Jye,regexp:Zye,integer:Qye,float:ewe,array:twe,object:nwe,enum:rwe,pattern:owe,date:swe,url:Rk,hex:Rk,email:Rk,required:awe,any:lwe};function E2(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var x2=E2(),e0=(function(){function t(n){this.rules=null,this._messages=x2,this.define(n)}var e=t.prototype;return e.define=function(i){var r=this;if(!i)throw new Error("Cannot configure a schema with no rules");if(typeof i!="object"||Array.isArray(i))throw new Error("Rules must be an object");this.rules={},Object.keys(i).forEach(function(o){var s=i[o];r.rules[o]=Array.isArray(s)?s:[s]})},e.messages=function(i){return i&&(this._messages=EN(E2(),i)),this._messages},e.validate=function(i,r,o){var s=this;r===void 0&&(r={}),o===void 0&&(o=function(){});var a=i,l=r,u=o;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,a),Promise.resolve(a);function c(g){var v=[],p={};function b(_){if(Array.isArray(_)){var C;v=(C=v).concat.apply(C,_)}else v.push(_)}for(var y=0;y<g.length;y++)b(g[y]);v.length?(p=T2(v),u(v,p)):u(null,a)}if(l.messages){var d=this.messages();d===x2&&(d=E2()),EN(d,l.messages),l.messages=d}else l.messages=this.messages();var f={},h=l.keys||Object.keys(this.rules);h.forEach(function(g){var v=s.rules[g],p=a[g];v.forEach(function(b){var y=b;typeof y.transform=="function"&&(a===i&&(a=Wd({},a)),p=a[g]=y.transform(p)),typeof y=="function"?y={validator:y}:y=Wd({},y),y.validator=s.getValidationMethod(y),y.validator&&(y.field=g,y.fullField=y.fullField||g,y.type=s.getType(y),f[g]=f[g]||[],f[g].push({rule:y,value:p,source:a,field:g}))})});var m={};return Fye(f,l,function(g,v){var p=g.rule,b=(p.type==="object"||p.type==="array")&&(typeof p.fields=="object"||typeof p.defaultField=="object");b=b&&(p.required||!p.required&&g.value),p.field=g.field;function y(S,k){return Wd({},k,{fullField:p.fullField+"."+S,fullFields:p.fullFields?[].concat(p.fullFields,[S]):[S]})}function _(S){S===void 0&&(S=[]);var k=Array.isArray(S)?S:[S];!l.suppressWarning&&k.length&&t.warning("async-validator:",k),k.length&&p.message!==void 0&&(k=[].concat(p.message));var T=k.map(TN(p,a));if(l.first&&T.length)return m[p.field]=1,v(T);if(!b)v(T);else{if(p.required&&!g.value)return p.message!==void 0?T=[].concat(p.message).map(TN(p,a)):l.error&&(T=[l.error(p,es(l.messages.required,p.field))]),v(T);var E={};p.defaultField&&Object.keys(g.value).map(function(A){E[A]=p.defaultField}),E=Wd({},E,g.rule.fields);var x={};Object.keys(E).forEach(function(A){var I=E[A],D=Array.isArray(I)?I:[I];x[A]=D.map(y.bind(null,A))});var P=new t(x);P.messages(l.messages),g.rule.options&&(g.rule.options.messages=l.messages,g.rule.options.error=l.error),P.validate(g.value,g.rule.options||l,function(A){var I=[];T&&T.length&&I.push.apply(I,T),A&&A.length&&I.push.apply(I,A),v(I.length?I:null)})}}var C;if(p.asyncValidator)C=p.asyncValidator(p,g.value,_,g.source,l);else if(p.validator){try{C=p.validator(p,g.value,_,g.source,l)}catch(S){console.error?.(S),l.suppressValidatorError||setTimeout(function(){throw S},0),_(S.message)}C===!0?_():C===!1?_(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||(p.fullField||p.field)+" fails"):C instanceof Array?_(C):C instanceof Error&&_(C.message)}C&&C.then&&C.then(function(){return _()},function(S){return _(S)})},function(g){c(g)},a)},e.getType=function(i){if(i.type===void 0&&i.pattern instanceof RegExp&&(i.type="pattern"),typeof i.validator!="function"&&i.type&&!Kp.hasOwnProperty(i.type))throw new Error(es("Unknown rule type %s",i.type));return i.type||"string"},e.getValidationMethod=function(i){if(typeof i.validator=="function")return i.validator;var r=Object.keys(i),o=r.indexOf("message");return o!==-1&&r.splice(o,1),r.length===1&&r[0]==="required"?Kp.required:Kp[this.getType(i)]||void 0},t})();e0.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");Kp[e]=n};e0.warning=Dye;e0.messages=x2;e0.validators=Kp;const AN="ElLabelWrap";var uwe=le({name:AN,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=Ne(Bf,void 0),i=Ne(yf);i||dr(AN,"usage: <el-form-item><label-wrap /></el-form-item>");const r=De("form"),o=H(),s=H(0),a=()=>{var c;if((c=o.value)!=null&&c.firstElementChild){const d=window.getComputedStyle(o.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(c="update")=>{Ye(()=>{e.default&&t.isAutoWidth&&(c==="update"?s.value=a():c==="remove"&&n?.deregisterLabelWidth(s.value))})},u=()=>l("update");return Pt(()=>{u()}),Sn(()=>{l("remove")}),ku(()=>u()),Se(s,(c,d)=>{t.updateAll&&n?.registerLabelWidth(c,d)}),nr(M(()=>{var c,d;return(d=(c=o.value)==null?void 0:c.firstElementChild)!=null?d:null}),u),()=>{var c,d;if(!e)return null;const{isAutoWidth:f}=t;if(f){const h=n?.autoLabelWidth,m=i?.hasLabel,g={};if(m&&h&&h!=="auto"){const v=Math.max(0,Number.parseInt(h,10)-s.value),b=(i.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";v&&(g[b]=`${v}px`)}return L("div",{ref:o,class:[r.be("item","label-wrap")],style:g},[(c=e.default)==null?void 0:c.call(e)])}else return L(rt,{ref:o},[(d=e.default)==null?void 0:d.call(e)])}}});const cwe=["role","aria-labelledby"];var sq=le({name:"ElFormItem",__name:"form-item",props:Iye,setup(t,{expose:e}){const n=t,i=$o(),r=Ne(Bf,void 0),o=Ne(yf,void 0),s=fr(void 0,{formItem:!1}),a=De("form-item"),l=as().value,u=H([]),c=H(""),d=Rce(c,100),f=H(""),h=H();let m,g=!1;const v=M(()=>n.labelPosition||r?.labelPosition),p=M(()=>{var re;return v.value==="top"?{}:{width:zr((re=n.labelWidth)!=null?re:r?.labelWidth)}}),b=M(()=>{var re;if(v.value==="top"||r?.inline)return{};if(!n.label&&!n.labelWidth&&x)return{};const ee=zr((re=n.labelWidth)!=null?re:r?.labelWidth);return!n.label&&!i.label?{marginLeft:ee}:{}}),y=M(()=>[a.b(),a.m(s.value),a.is("error",c.value==="error"),a.is("validating",c.value==="validating"),a.is("success",c.value==="success"),a.is("required",q.value||n.required),a.is("no-asterisk",r?.hideRequiredAsterisk),r?.requireAsteriskPosition==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:r?.statusIcon,[a.m(`label-${v.value}`)]:v.value}]),_=M(()=>vi(n.inlineMessage)?n.inlineMessage:r?.inlineMessage||!1),C=M(()=>[a.e("error"),{[a.em("error","inline")]:_.value}]),S=M(()=>n.prop?Pe(n.prop)?n.prop.join("."):n.prop:""),k=M(()=>!!(n.label||i.label)),T=M(()=>{var re;return(re=n.for)!=null?re:u.value.length===1?u.value[0]:void 0}),E=M(()=>!T.value&&k.value),x=!!o,P=M(()=>{const re=r?.model;if(!(!re||!n.prop))return lm(re,n.prop).value}),A=M(()=>{const{required:re}=n,ee=[];n.rules&&ee.push(...Co(n.rules));const te=r?.rules;if(te&&n.prop){const V=lm(te,n.prop).value;V&&ee.push(...Co(V))}if(re!==void 0){const V=ee.map((K,G)=>[K,G]).filter(([K])=>"required"in K);if(V.length>0)for(const[K,G]of V)K.required!==re&&(ee[G]={...K,required:re});else ee.push({required:re})}return ee}),I=M(()=>A.value.length>0),D=re=>A.value.filter(te=>!te.trigger||!re?!0:Pe(te.trigger)?te.trigger.includes(re):te.trigger===re).map(({trigger:te,...V})=>V),q=M(()=>A.value.some(re=>re.required)),z=M(()=>{var re;return d.value==="error"&&n.showMessage&&((re=r?.showMessage)!=null?re:!0)}),R=M(()=>`${n.label||""}${r?.labelSuffix||""}`),O=re=>{c.value=re},N=re=>{var ee,te;const{errors:V,fields:K}=re;(!V||!K)&&console.error(re),O("error"),f.value=V?(te=(ee=V?.[0])==null?void 0:ee.message)!=null?te:`${n.prop} is required`:"",r?.emit("validate",n.prop,!1,f.value)},F=()=>{O("success"),r?.emit("validate",n.prop,!0,"")},j=async re=>{const ee=S.value;return new e0({[ee]:re}).validate({[ee]:P.value},{firstFields:!0}).then(()=>(F(),!0)).catch(V=>(N(V),Promise.reject(V)))},U=async(re,ee)=>{if(g||!n.prop)return!1;const te=Xe(ee);if(!I.value)return ee?.(!1),!1;const V=D(re);return V.length===0?(ee?.(!0),!0):(O("validating"),j(V).then(()=>(ee?.(!0),!0)).catch(K=>{const{fields:G}=K;return ee?.(!1,G),te?!1:Promise.reject(G)}))},W=()=>{O(""),f.value="",g=!1},J=async()=>{const re=r?.model;if(!re||!n.prop)return;const ee=lm(re,n.prop);g=!0,ee.value=gk(m),await Ye(),W(),g=!1},ne=re=>{u.value.includes(re)||u.value.push(re)},he=re=>{u.value=u.value.filter(ee=>ee!==re)},X=re=>{m=gk(re)};Se(()=>n.error,re=>{f.value=re||"",O(re?"error":"")},{immediate:!0}),Se(()=>n.validateStatus,re=>O(re||""));const se=on({...Sr(n),$el:h,size:s,validateMessage:f,validateState:c,labelId:l,inputIds:u,isGroup:E,hasLabel:k,fieldValue:P,addInputId:ne,removeInputId:he,resetField:J,clearValidate:W,validate:U,propString:S,setInitialValue:X});return qt(yf,se),Pt(()=>{n.prop&&(r?.addField(se),m=gk(P.value))}),Sn(()=>{r?.removeField(se)}),e({size:s,validateMessage:f,validateState:c,validate:U,clearValidate:W,resetField:J,setInitialValue:X}),(re,ee)=>{var te;return B(),Q("div",{ref_key:"formItemRef",ref:h,class:$(y.value),role:E.value?"group":void 0,"aria-labelledby":E.value?w(l):void 0},[L(w(uwe),{"is-auto-width":p.value.width==="auto","update-all":((te=w(r))==null?void 0:te.labelWidth)==="auto"},{default:ce(()=>[t.label||re.$slots.label?(B(),_e(Gt(T.value?"label":"div"),{key:0,id:w(l),for:T.value,class:$(w(a).e("label")),style:mt(p.value)},{default:ce(()=>[we(re.$slots,"label",{label:R.value},()=>[dt(We(R.value),1)])]),_:3},8,["id","for","class","style"])):ve("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),ie("div",{class:$(w(a).e("content")),style:mt(b.value)},[we(re.$slots,"default"),L(Xz,{name:`${w(a).namespace.value}-zoom-in-top`},{default:ce(()=>[z.value?we(re.$slots,"error",{key:0,error:f.value},()=>[ie("div",{class:$(C.value)},We(f.value),3)]):ve("v-if",!0)]),_:3},8,["name"])],6)],10,cwe)}}});const aq=sn(Aye,{FormItem:sq}),Wh=Zi(sq),dwe=qe({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:me([String,Object])},previewSrcList:{type:me(Array),default:()=>Fs([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:me(String)}}),fwe={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>St(t),close:()=>!0,show:()=>!0},hwe=qe({urlList:{type:me(Array),default:()=>Fs([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:me(String)}}),mwe={close:()=>!0,error:t=>t instanceof Event,switch:t=>St(t),rotate:t=>St(t)},gwe=["src","crossorigin"];var pwe=le({name:"ElImageViewer",__name:"image-viewer",props:hwe,emits:mwe,setup(t,{expose:e,emit:n}){var i;const r={CONTAIN:{name:"contain",icon:ca(Cde)},ORIGINAL:{name:"original",icon:ca(Wde)}},o=t,s=n;let a;const{t:l}=Qt(),u=De("image-viewer"),{nextZIndex:c}=RC(),d=H(),f=H(),h=zb(),m=M(()=>{const{scale:ee,minScale:te,maxScale:V}=o;return Ece(ee,te,V)}),g=H(!0),v=H(!1),p=H(!1),b=H(o.initialIndex),y=bi(r.CONTAIN),_=H({scale:m.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),C=H((i=o.zIndex)!=null?i:c());FR(p,{ns:u});const S=M(()=>{const{urlList:ee}=o;return ee.length<=1}),k=M(()=>b.value===0),T=M(()=>b.value===o.urlList.length-1),E=M(()=>o.urlList[b.value]),x=M(()=>[u.e("btn"),u.e("prev"),u.is("disabled",!o.infinite&&k.value)]),P=M(()=>[u.e("btn"),u.e("next"),u.is("disabled",!o.infinite&&T.value)]),A=M(()=>{const{scale:ee,deg:te,offsetX:V,offsetY:K,enableTransition:G}=_.value;let ye=V/ee,be=K/ee;const Ce=te*Math.PI/180,Y=Math.cos(Ce),Z=Math.sin(Ce);ye=ye*Y+be*Z,be=be*Y-V/ee*Z;const ae={transform:`scale(${ee}) rotate(${te}deg) translate(${ye}px, ${be}px)`,transition:G?"transform .3s":""};return y.value.name===r.CONTAIN.name&&(ae.maxWidth=ae.maxHeight="100%"),ae}),I=M(()=>`${b.value+1} / ${o.urlList.length}`);function D(){z(),a?.(),p.value=!1,s("close")}function q(){const ee=O0(V=>{switch(Bn(V)){case Me.esc:o.closeOnPressEscape&&D();break;case Me.space:U();break;case Me.left:J();break;case Me.up:he("zoomIn");break;case Me.right:ne();break;case Me.down:he("zoomOut");break}}),te=O0(V=>{const K=V.deltaY||V.deltaX;he(K<0?"zoomIn":"zoomOut",{zoomRate:o.zoomRate,enableTransition:!1})});h.run(()=>{Kn(document,"keydown",ee),Kn(d,"wheel",te)})}function z(){h.stop()}function R(){g.value=!1}function O(ee){v.value=!0,g.value=!1,s("error",ee),ee.target.alt=l("el.image.error")}function N(ee){if(g.value||ee.button!==0||!d.value)return;_.value.enableTransition=!1;const{offsetX:te,offsetY:V}=_.value,K=ee.pageX,G=ee.pageY,ye=O0(Y=>{_.value={..._.value,offsetX:te+Y.pageX-K,offsetY:V+Y.pageY-G}}),be=Kn(document,"mousemove",ye),Ce=Kn(document,"mouseup",()=>{be(),Ce()});ee.preventDefault()}function F(ee){if(g.value||!d.value||ee.touches.length!==1)return;_.value.enableTransition=!1;const{offsetX:te,offsetY:V}=_.value,{pageX:K,pageY:G}=ee.touches[0],ye=O0(Y=>{const Z=Y.touches[0];_.value={..._.value,offsetX:te+Z.pageX-K,offsetY:V+Z.pageY-G}}),be=Kn(document,"touchmove",ye),Ce=Kn(document,"touchend",()=>{be(),Ce()});ee.preventDefault()}function j(){_.value={scale:m.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function U(){if(g.value||v.value)return;const ee=l2(r),te=Object.values(r),V=y.value.name,G=(te.findIndex(ye=>ye.name===V)+1)%ee.length;y.value=r[ee[G]],j()}function W(ee){v.value=!1;const te=o.urlList.length;b.value=(ee+te)%te}function J(){k.value&&!o.infinite||W(b.value-1)}function ne(){T.value&&!o.infinite||W(b.value+1)}function he(ee,te={}){if(g.value||v.value)return;const{minScale:V,maxScale:K}=o,{zoomRate:G,rotateDeg:ye,enableTransition:be}={zoomRate:o.zoomRate,rotateDeg:90,enableTransition:!0,...te};switch(ee){case"zoomOut":_.value.scale>V&&(_.value.scale=Number.parseFloat((_.value.scale/G).toFixed(3)));break;case"zoomIn":_.value.scale<K&&(_.value.scale=Number.parseFloat((_.value.scale*G).toFixed(3)));break;case"clockwise":_.value.deg+=ye,s("rotate",_.value.deg);break;case"anticlockwise":_.value.deg-=ye,s("rotate",_.value.deg);break}_.value.enableTransition=be}function X(ee){var te;((te=ee.detail)==null?void 0:te.focusReason)==="pointer"&&ee.preventDefault()}function se(){o.closeOnPressEscape&&D()}function re(ee){if(ee.ctrlKey){if(ee.deltaY<0)return ee.preventDefault(),!1;if(ee.deltaY>0)return ee.preventDefault(),!1}}return Se(()=>m.value,ee=>{_.value.scale=ee}),Se(E,()=>{Ye(()=>{const ee=f.value;ee?.complete||(g.value=!0)})}),Se(b,ee=>{j(),s("switch",ee)}),Pt(()=>{p.value=!0,q(),a=Kn("wheel",re,{passive:!1})}),e({setActiveItem:W}),(ee,te)=>(B(),_e(w(rR),{to:"body",disabled:!t.teleported},{default:ce(()=>[L(ya,{name:"viewer-fade",appear:""},{default:ce(()=>[ie("div",{ref_key:"wrapper",ref:d,tabindex:-1,class:$(w(u).e("wrapper")),style:mt({zIndex:C.value})},[L(w(VC),{loop:"",trapped:"","focus-trap-el":d.value,"focus-start-el":"container",onFocusoutPrevented:X,onReleaseRequested:se},{default:ce(()=>[ie("div",{class:$(w(u).e("mask")),onClick:te[0]||(te[0]=Ot(V=>t.hideOnClickModal&&D(),["self"]))},null,2),ve(" CLOSE "),ie("span",{class:$([w(u).e("btn"),w(u).e("close")]),onClick:D},[L(w(He),null,{default:ce(()=>[L(w(cl))]),_:1})],2),ve(" ARROW "),S.value?ve("v-if",!0):(B(),Q(rt,{key:0},[ie("span",{class:$(x.value),onClick:J},[L(w(He),null,{default:ce(()=>[L(w(Am))]),_:1})],2),ie("span",{class:$(P.value),onClick:ne},[L(w(He),null,{default:ce(()=>[L(w(oa))]),_:1})],2)],64)),ee.$slots.progress||t.showProgress?(B(),Q("div",{key:1,class:$([w(u).e("btn"),w(u).e("progress")])},[we(ee.$slots,"progress",{activeIndex:b.value,total:t.urlList.length},()=>[dt(We(I.value),1)])],2)):ve("v-if",!0),ve(" ACTIONS "),ie("div",{class:$([w(u).e("btn"),w(u).e("actions")])},[ie("div",{class:$(w(u).e("actions__inner"))},[we(ee.$slots,"toolbar",{actions:he,prev:J,next:ne,reset:U,activeIndex:b.value,setActiveItem:W},()=>[L(w(He),{onClick:te[1]||(te[1]=V=>he("zoomOut"))},{default:ce(()=>[L(w(sfe))]),_:1}),L(w(He),{onClick:te[2]||(te[2]=V=>he("zoomIn"))},{default:ce(()=>[L(w(mU))]),_:1}),ie("i",{class:$(w(u).e("actions__divider"))},null,2),L(w(He),{onClick:U},{default:ce(()=>[(B(),_e(Gt(y.value.icon)))]),_:1}),ie("i",{class:$(w(u).e("actions__divider"))},null,2),L(w(He),{onClick:te[3]||(te[3]=V=>he("anticlockwise"))},{default:ce(()=>[L(w(Vde))]),_:1}),L(w(He),{onClick:te[4]||(te[4]=V=>he("clockwise"))},{default:ce(()=>[L(w($de))]),_:1})])],2)],2),ve(" CANVAS "),ie("div",{class:$(w(u).e("canvas"))},[v.value&&ee.$slots["viewer-error"]?we(ee.$slots,"viewer-error",{key:0,activeIndex:b.value,src:E.value}):(B(),Q("img",{ref_key:"imgRef",ref:f,key:E.value,src:E.value,style:mt(A.value),class:$(w(u).e("img")),crossorigin:t.crossorigin,onLoad:R,onError:O,onMousedown:N,onTouchstart:F},null,46,gwe))],2),we(ee.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}});const lq=sn(pwe),vwe=["src","loading","crossorigin"],bwe={key:0};var ywe=le({name:"ElImage",inheritAttrs:!1,__name:"image",props:dwe,emits:fwe,setup(t,{expose:e,emit:n}){const i=t,r=n,{t:o}=Qt(),s=De("image"),a=Rf(),l=M(()=>Lv(Object.entries(a).filter(([R])=>/^(data-|on[A-Z])/i.test(R)||["id","style"].includes(R)))),u=vR({excludeListeners:!0,excludeKeys:M(()=>Object.keys(l.value))}),c=H(),d=H(!1),f=H(!0),h=H(!1),m=H(),g=H(),v=Zt&&"loading"in HTMLImageElement.prototype;let p;const b=M(()=>[s.e("inner"),_.value&&s.e("preview"),f.value&&s.is("loading")]),y=M(()=>{const{fit:R}=i;return Zt&&R?{objectFit:R}:{}}),_=M(()=>{const{previewSrcList:R}=i;return Pe(R)&&R.length>0}),C=M(()=>{const{previewSrcList:R,initialIndex:O}=i;let N=O;return O>R.length-1&&(N=0),N}),S=M(()=>i.loading==="eager"?!1:!v&&i.loading==="lazy"||i.lazy),k=()=>{Zt&&(f.value=!0,d.value=!1,c.value=i.src)};function T(R){f.value=!1,d.value=!1,r("load",R)}function E(R){f.value=!1,d.value=!0,r("error",R)}function x(R){R&&(k(),I())}const P=Mce(x,200,!0);async function A(){var R;if(!Zt)return;await Ye();const{scrollContainer:O}=i;if(Qo(O))g.value=O;else if(ot(O)&&O!=="")g.value=(R=document.querySelector(O))!=null?R:void 0;else if(m.value){const F=Qce(m.value);g.value=wce(F)?void 0:F}const{stop:N}=Fce(m,([F])=>{P(F.isIntersecting)},{root:g});p=N}function I(){!Zt||!P||(p?.(),g.value=void 0,p=void 0)}function D(){_.value&&(h.value=!0,r("show"))}function q(){h.value=!1,r("close")}function z(R){r("switch",R)}return Se(()=>i.src,()=>{S.value?(f.value=!0,d.value=!1,I(),A()):k()}),Pt(()=>{S.value?A():k()}),e({showPreview:D}),(R,O)=>(B(),Q("div",Lt({ref_key:"container",ref:m},l.value,{class:[w(s).b(),R.$attrs.class]}),[d.value?we(R.$slots,"error",{key:0},()=>[ie("div",{class:$(w(s).e("error"))},We(w(o)("el.image.error")),3)]):(B(),Q(rt,{key:1},[c.value!==void 0?(B(),Q("img",Lt({key:0},w(u),{src:c.value,loading:t.loading,style:y.value,class:b.value,crossorigin:t.crossorigin,onClick:D,onLoad:T,onError:E}),null,16,vwe)):ve("v-if",!0),f.value?(B(),Q("div",{key:1,class:$(w(s).e("wrapper"))},[we(R.$slots,"placeholder",{},()=>[ie("div",{class:$(w(s).e("placeholder"))},null,2)])],2)):ve("v-if",!0)],64)),_.value?(B(),Q(rt,{key:2},[h.value?(B(),_e(w(lq),{key:0,"z-index":t.zIndex,"initial-index":C.value,infinite:t.infinite,"zoom-rate":t.zoomRate,"min-scale":t.minScale,"max-scale":t.maxScale,"show-progress":t.showProgress,"url-list":t.previewSrcList,scale:t.scale,crossorigin:t.crossorigin,"hide-on-click-modal":t.hideOnClickModal,teleported:t.previewTeleported,"close-on-press-escape":t.closeOnPressEscape,onClose:q,onSwitch:z},kc({toolbar:ce(N=>[we(R.$slots,"toolbar",pw(Fp(N)))]),default:ce(()=>[R.$slots.viewer?(B(),Q("div",bwe,[we(R.$slots,"viewer")])):ve("v-if",!0)]),_:2},[R.$slots.progress?{name:"progress",fn:ce(N=>[we(R.$slots,"progress",pw(Fp(N)))]),key:"0"}:void 0,R.$slots["viewer-error"]?{name:"viewer-error",fn:ce(N=>[we(R.$slots,"viewer-error",pw(Fp(N)))]),key:"1"}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","scale","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):ve("v-if",!0)],64)):ve("v-if",!0)],16))}});const wwe=sn(ywe),_we=qe({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:{type:Boolean,default:void 0},size:$r,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:me([String,Number,null]),validator:t=>t===null||St(t)||["min","max"].includes(t),default:null},name:String,placeholder:String,precision:{type:Number,validator:t=>t>=0&&t===Number.parseInt(`${t}`,10)},validateEvent:{type:Boolean,default:!0},...hs(["ariaLabel"]),inputmode:{type:me(String),default:void 0},align:{type:me(String),default:"center"},disabledScientific:Boolean}),Cwe={[En]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[rs]:t=>St(t)||ir(t),[It]:t=>St(t)||ir(t)},Swe=["aria-label"],kwe=["aria-label"];var Twe=le({name:"ElInputNumber",__name:"input-number",props:_we,emits:Cwe,setup(t,{expose:e,emit:n}){const i=t,r=n,{t:o}=Qt(),s=De("input-number"),a=H(),l=on({currentValue:i.modelValue,userInput:null}),{formItem:u}=lo(),c=M(()=>St(i.modelValue)&&i.modelValue<=i.min),d=M(()=>St(i.modelValue)&&i.modelValue>=i.max),f=M(()=>{const R=b(i.step);return pn(i.precision)?Math.max(b(i.modelValue),R):(R>i.precision,i.precision)}),h=M(()=>i.controls&&i.controlsPosition==="right"),m=fr(),g=Oi(),v=M(()=>{if(l.userInput!==null)return l.userInput;let R=l.currentValue;if(ir(R))return"";if(St(R)){if(Number.isNaN(R))return"";pn(i.precision)||(R=R.toFixed(i.precision))}return R}),p=(R,O)=>{if(pn(O)&&(O=f.value),O===0)return Math.round(R);let N=String(R);const F=N.indexOf(".");if(F===-1||!N.replace(".","").split("")[F+O])return R;const W=N.length;return N.charAt(W-1)==="5"&&(N=`${N.slice(0,Math.max(0,W-1))}6`),Number.parseFloat(Number(N).toFixed(O))},b=R=>{if(ir(R))return 0;const O=R.toString(),N=O.indexOf(".");let F=0;return N!==-1&&(F=O.length-N-1),F},y=(R,O=1)=>St(R)?R>=Number.MAX_SAFE_INTEGER&&O===1||R<=Number.MIN_SAFE_INTEGER&&O===-1?R:p(R+i.step*O):l.currentValue,_=R=>{const O=Bn(R),N=qU(R);if(i.disabledScientific&&["e","E"].includes(N)){R.preventDefault();return}switch(O){case Me.up:{R.preventDefault(),C();break}case Me.down:{R.preventDefault(),S();break}}},C=()=>{if(i.readonly||g.value||d.value)return;const R=Number(v.value)||0,O=y(R);T(O),r(rs,l.currentValue),q()},S=()=>{if(i.readonly||g.value||c.value)return;const R=Number(v.value)||0,O=y(R,-1);T(O),r(rs,l.currentValue),q()},k=(R,O)=>{const{max:N,min:F,step:j,precision:U,stepStrictly:W,valueOnClear:J}=i;N<F&&dr("InputNumber","min should not be greater than max.");let ne=Number(R);if(ir(R)||Number.isNaN(ne))return null;if(R===""){if(J===null)return null;ne=ot(J)?{min:F,max:N}[J]:J}return W&&(ne=p(Math.round(p(ne/j))*j,U),ne!==R&&O&&r(It,ne)),pn(U)||(ne=p(ne,U)),(ne>N||ne<F)&&(ne=ne>N?N:F,O&&r(It,ne)),ne},T=(R,O=!0)=>{var N;const F=l.currentValue,j=k(R);if(!O){r(It,j);return}l.userInput=null,!(F===j&&R)&&(r(It,j),F!==j&&r(En,j,F),i.validateEvent&&((N=u?.validate)==null||N.call(u,"change").catch(U=>void 0)),l.currentValue=j)},E=R=>{l.userInput=R;const O=R===""?null:Number(R);r(rs,O),T(O,!1)},x=R=>{const O=R!==""?Number(R):"";(St(O)&&!Number.isNaN(O)||R==="")&&T(O),q(),l.userInput=null},P=()=>{var R,O;(O=(R=a.value)==null?void 0:R.focus)==null||O.call(R)},A=()=>{var R,O;(O=(R=a.value)==null?void 0:R.blur)==null||O.call(R)},I=R=>{r("focus",R)},D=R=>{var O,N;l.userInput=null,l.currentValue===null&&((O=a.value)!=null&&O.input)&&(a.value.input.value=""),r("blur",R),i.validateEvent&&((N=u?.validate)==null||N.call(u,"blur").catch(F=>void 0))},q=()=>{l.currentValue!==i.modelValue&&(l.currentValue=i.modelValue)},z=R=>{document.activeElement===R.target&&R.preventDefault()};return Se(()=>i.modelValue,(R,O)=>{const N=k(R,!0);l.userInput===null&&N!==O&&(l.currentValue=N)},{immediate:!0}),Se(()=>i.precision,()=>{l.currentValue=k(i.modelValue)}),Pt(()=>{var R;const{min:O,max:N,modelValue:F}=i,j=(R=a.value)==null?void 0:R.input;if(j.setAttribute("role","spinbutton"),Number.isFinite(N)?j.setAttribute("aria-valuemax",String(N)):j.removeAttribute("aria-valuemax"),Number.isFinite(O)?j.setAttribute("aria-valuemin",String(O)):j.removeAttribute("aria-valuemin"),j.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),j.setAttribute("aria-disabled",String(g.value)),!St(F)&&F!=null){let U=Number(F);Number.isNaN(U)&&(U=null),r(It,U)}j.addEventListener("wheel",z,{passive:!1})}),ku(()=>{var R,O;const N=(R=a.value)==null?void 0:R.input;N?.setAttribute("aria-valuenow",`${(O=l.currentValue)!=null?O:""}`)}),e({focus:P,blur:A}),(R,O)=>(B(),Q("div",{class:$([w(s).b(),w(s).m(w(m)),w(s).is("disabled",w(g)),w(s).is("without-controls",!t.controls),w(s).is("controls-right",h.value),w(s).is(t.align,!!t.align)]),onDragstart:O[0]||(O[0]=Ot(()=>{},["prevent"]))},[t.controls?Vt((B(),Q("span",{key:0,role:"button","aria-label":w(o)("el.inputNumber.decrease"),class:$([w(s).e("decrease"),w(s).is("disabled",c.value)]),onKeydown:Pi(S,["enter"])},[we(R.$slots,"decrease-icon",{},()=>[L(w(He),null,{default:ce(()=>[h.value?(B(),_e(w(zc),{key:0})):(B(),_e(w(Ide),{key:1}))]),_:1})])],42,Swe)),[[w(U_),S]]):ve("v-if",!0),t.controls?Vt((B(),Q("span",{key:1,role:"button","aria-label":w(o)("el.inputNumber.increase"),class:$([w(s).e("increase"),w(s).is("disabled",d.value)]),onKeydown:Pi(C,["enter"])},[we(R.$slots,"increase-icon",{},()=>[L(w(He),null,{default:ce(()=>[h.value?(B(),_e(w(sR),{key:0})):(B(),_e(w(fU),{key:1}))]),_:1})])],42,kwe)),[[w(U_),C]]):ve("v-if",!0),L(w(cr),{id:t.id,ref_key:"input",ref:a,type:"number",step:t.step,"model-value":v.value,placeholder:t.placeholder,readonly:t.readonly,disabled:w(g),size:w(m),max:t.max,min:t.min,name:t.name,"aria-label":t.ariaLabel,"validate-event":!1,inputmode:t.inputmode,onKeydown:_,onBlur:D,onFocus:I,onInput:E,onChange:x},kc({_:2},[R.$slots.prefix?{name:"prefix",fn:ce(()=>[we(R.$slots,"prefix")]),key:"0"}:void 0,R.$slots.suffix?{name:"suffix",fn:ce(()=>[we(R.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}});const uq=sn(Twe);var Ewe=Object.defineProperty,xwe=(t,e,n)=>e in t?Ewe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PN=(t,e,n)=>xwe(t,typeof e!="symbol"?e+"":e,n);let Awe=class{constructor(e,n){this.parent=e,this.domNode=n,PN(this,"subMenuItems"),PN(this,"subIndex",0),this.subIndex=0,this.init()}init(){this.subMenuItems=this.domNode.querySelectorAll("li"),this.addListeners()}gotoSubIndex(e){e===this.subMenuItems.length?e=0:e<0&&(e=this.subMenuItems.length-1),this.subMenuItems[e].focus(),this.subIndex=e}addListeners(){const e=this.parent.domNode;Array.prototype.forEach.call(this.subMenuItems,n=>{n.addEventListener("keydown",i=>{const r=Bn(i);let o=!1;switch(r){case Me.down:{this.gotoSubIndex(this.subIndex+1),o=!0;break}case Me.up:{this.gotoSubIndex(this.subIndex-1),o=!0;break}case Me.tab:{kw(e,"mouseleave");break}case Me.enter:case Me.numpadEnter:case Me.space:{o=!0,i.currentTarget.click();break}}return o&&(i.preventDefault(),i.stopPropagation()),!1})})}};var Pwe=Object.defineProperty,Iwe=(t,e,n)=>e in t?Pwe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Rwe=(t,e,n)=>Iwe(t,e+"",n);class Mwe{constructor(e,n){this.domNode=e,Rwe(this,"submenu",null),this.submenu=null,this.init(n)}init(e){this.domNode.setAttribute("tabindex","0");const n=this.domNode.querySelector(`.${e}-menu`);n&&(this.submenu=new Awe(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{const n=Bn(e);let i=!1;switch(n){case Me.down:{kw(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),i=!0;break}case Me.up:{kw(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),i=!0;break}case Me.tab:{kw(e.currentTarget,"mouseleave");break}case Me.enter:case Me.numpadEnter:case Me.space:{i=!0,e.currentTarget.click();break}}i&&e.preventDefault()})}}let Owe=class{constructor(e,n){this.domNode=e,this.init(n)}init(e){const n=this.domNode.childNodes;Array.from(n).forEach(i=>{i.nodeType===1&&new Mwe(i,e)})}};var Lwe=le({name:"ElMenuCollapseTransition",__name:"menu-collapse-transition",setup(t){const e=De("menu"),n={onBeforeEnter:i=>i.style.opacity="0.2",onEnter(i,r){Qs(i,`${e.namespace.value}-opacity-transition`),i.style.opacity="1",r()},onAfterEnter(i){os(i,`${e.namespace.value}-opacity-transition`),i.style.opacity=""},onBeforeLeave(i){i.dataset||(i.dataset={}),Xa(i,e.m("collapse"))?(os(i,e.m("collapse")),i.dataset.oldOverflow=i.style.overflow,i.dataset.scrollWidth=i.clientWidth.toString(),Qs(i,e.m("collapse"))):(Qs(i,e.m("collapse")),i.dataset.oldOverflow=i.style.overflow,i.dataset.scrollWidth=i.clientWidth.toString(),os(i,e.m("collapse"))),i.style.width=`${i.scrollWidth}px`,i.style.overflow="hidden"},onLeave(i){Qs(i,"horizontal-collapse-transition"),i.style.width=`${i.dataset.scrollWidth}px`}};return(i,r)=>(B(),_e(ya,Lt({mode:"out-in"},n),{default:ce(()=>[we(i.$slots,"default")]),_:3},16))}});function cq(t,e){const n=M(()=>{let r=t.parent;const o=[e.value];for(;r.type.name!=="ElMenu";)r.props.index&&o.unshift(r.props.index),r=r.parent;return o});return{parentMenu:M(()=>{let r=t.parent;for(;r&&!["ElMenu","ElSubMenu"].includes(r.type.name);)r=r.parent;return r}),indexPath:n}}function Dwe(t){return M(()=>{const n=t.backgroundColor;return n?new Uh(n).shade(20).toString():""})}const dq=(t,e)=>{const n=De("menu");return M(()=>n.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":Dwe(t).value||"","active-color":t.activeTextColor||"",level:`${e}`}))},zR="rootMenu",G_="subMenu:",Nwe=qe({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,popperStyle:{type:me([String,Object])},disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:ri},expandOpenIcon:{type:ri},collapseCloseIcon:{type:ri},collapseOpenIcon:{type:ri}}),Mk="ElSubMenu";var HR=le({name:Mk,props:Nwe,setup(t,{slots:e,expose:n}){const i=Ct(),{indexPath:r,parentMenu:o}=cq(i,M(()=>t.index)),s=De("menu"),a=De("sub-menu"),l=Ne(zR);l||dr(Mk,"can not inject root menu");const u=Ne(`${G_}${o.value.uid}`);u||dr(Mk,"can not inject sub menu");const c=H({}),d=H({});let f;const h=H(!1),m=H(),g=H(),v=M(()=>u.level===0),p=M(()=>T.value==="horizontal"&&v.value?"bottom-start":"right-start"),b=M(()=>T.value==="horizontal"&&v.value||T.value==="vertical"&&!l.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?S.value?t.expandOpenIcon:t.expandCloseIcon:zc:t.collapseCloseIcon&&t.collapseOpenIcon?S.value?t.collapseOpenIcon:t.collapseCloseIcon:oa),y=M(()=>{const U=t.teleported;return pn(U)?v.value:U}),_=M(()=>l.props.collapse?`${s.namespace.value}-zoom-in-left`:`${s.namespace.value}-zoom-in-top`),C=M(()=>T.value==="horizontal"&&v.value?["bottom-start","bottom-end","top-start","top-end","right-start","left-start"]:["right-start","right","right-end","left-start","bottom-start","bottom-end","top-start","top-end"]),S=M(()=>l.openedMenus.includes(t.index)),k=M(()=>[...Object.values(c.value),...Object.values(d.value)].some(({active:U})=>U)),T=M(()=>l.props.mode),E=M(()=>l.props.persistent),x=on({index:t.index,indexPath:r,active:k}),P=dq(l.props,u.level+1),A=M(()=>{var U;return(U=t.popperOffset)!=null?U:l.props.popperOffset}),I=M(()=>{var U;return(U=t.popperClass)!=null?U:l.props.popperClass}),D=M(()=>{var U;return(U=t.popperStyle)!=null?U:l.props.popperStyle}),q=M(()=>{var U;return(U=t.showTimeout)!=null?U:l.props.showTimeout}),z=M(()=>{var U;return(U=t.hideTimeout)!=null?U:l.props.hideTimeout}),R=()=>{var U,W,J;return(J=(W=(U=g.value)==null?void 0:U.popperRef)==null?void 0:W.popperInstanceRef)==null?void 0:J.destroy()},O=U=>{U||R()},N=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||t.disabled||l.handleSubMenuClick({index:t.index,indexPath:r.value,active:k.value})},F=(U,W=q.value)=>{var J;if(U.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||t.disabled){u.mouseInChild.value=!0;return}u.mouseInChild.value=!0,f?.(),{stop:f}=Dv(()=>{l.openMenu(t.index,r.value)},W),y.value&&((J=o.value.vnode.el)==null||J.dispatchEvent(new MouseEvent("mouseenter"))),U.type==="mouseenter"&&U.target&&Ye(()=>{Zb(U.target,{preventScroll:!0})})}},j=(U=!1)=>{var W;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){u.mouseInChild.value=!1;return}f?.(),u.mouseInChild.value=!1,{stop:f}=Dv(()=>!h.value&&l.closeMenu(t.index,r.value),z.value),y.value&&U&&((W=u.handleMouseleave)==null||W.call(u,!0))};Se(()=>l.props.collapse,U=>O(!!U));{const U=J=>{d.value[J.index]=J},W=J=>{delete d.value[J.index]};qt(`${G_}${i.uid}`,{addSubMenu:U,removeSubMenu:W,handleMouseleave:j,mouseInChild:h,level:u.level+1})}return n({opened:S}),Pt(()=>{l.addSubMenu(x),u.addSubMenu(x)}),Sn(()=>{u.removeSubMenu(x),l.removeSubMenu(x)}),()=>{var U;const W=[(U=e.title)==null?void 0:U.call(e),nt(He,{class:a.e("icon-arrow"),style:{transform:S.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>ot(b.value)?nt(i.appContext.components[b.value]):nt(b.value)})],J=l.isMenuPopup?nt(Lo,{ref:g,visible:S.value,effect:"light",pure:!0,offset:A.value,showArrow:!1,persistent:E.value,popperClass:I.value,popperStyle:D.value,placement:p.value,teleported:y.value,fallbackPlacements:C.value,transition:_.value,gpuAcceleration:!1},{content:()=>{var ne;return nt("div",{class:[s.m(T.value),s.m("popup-container"),I.value],onMouseenter:he=>F(he,100),onMouseleave:()=>j(!0),onFocus:he=>F(he,100)},[nt("ul",{class:[s.b(),s.m("popup"),s.m(`popup-${p.value}`)],style:P.value},[(ne=e.default)==null?void 0:ne.call(e)])])},default:()=>nt("div",{class:a.e("title"),onClick:N},W)}):nt(rt,{},[nt("div",{class:a.e("title"),ref:m,onClick:N},W),nt(Npe,{},{default:()=>{var ne;return Vt(nt("ul",{role:"menu",class:[s.b(),s.m("inline")],style:P.value},[(ne=e.default)==null?void 0:ne.call(e)]),[[On,S.value]])}})]);return nt("li",{class:[a.b(),a.is("active",k.value),a.is("opened",S.value),a.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:S.value,onMouseenter:F,onMouseleave:()=>j(),onFocus:F},[J])}}});const Bwe=qe({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:me(Array),default:()=>Fs([])},uniqueOpened:Boolean,router:Boolean,menuTrigger:{type:String,values:["hover","click"],default:"hover"},collapse:Boolean,backgroundColor:String,textColor:String,activeTextColor:String,closeOnClickOutside:Boolean,collapseTransition:{type:Boolean,default:!0},ellipsis:{type:Boolean,default:!0},popperOffset:{type:Number,default:6},ellipsisIcon:{type:ri,default:()=>Dde},popperEffect:{type:me(String),default:"dark"},popperClass:String,popperStyle:{type:me([String,Object])},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),Ok=t=>Pe(t)&&t.every(e=>ot(e)),Vwe={close:(t,e)=>ot(t)&&Ok(e),open:(t,e)=>ot(t)&&Ok(e),select:(t,e,n,i)=>ot(t)&&Ok(e)&&_t(n)&&(pn(i)||i instanceof Promise)},IN=64;var Fwe=le({name:"ElMenu",props:Bwe,emits:Vwe,setup(t,{emit:e,slots:n,expose:i}){const r=Ct(),o=r.appContext.config.globalProperties.$router,s=H(),a=H(),l=De("menu"),u=De("sub-menu");let c=IN;const d=H(-1),f=H(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),h=H(t.defaultActive),m=H({}),g=H({}),v=M(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),p=()=>{const R=h.value&&m.value[h.value];if(!R||t.mode==="horizontal"||t.collapse)return;R.indexPath.forEach(N=>{const F=g.value[N];F&&b(N,F.indexPath)})},b=(R,O)=>{f.value.includes(R)||(t.uniqueOpened&&(f.value=f.value.filter(N=>O.includes(N))),f.value.push(R),e("open",R,O))},y=R=>{const O=f.value.indexOf(R);O!==-1&&f.value.splice(O,1)},_=(R,O)=>{y(R),e("close",R,O)},C=({index:R,indexPath:O})=>{f.value.includes(R)?_(R,O):b(R,O)},S=R=>{(t.mode==="horizontal"||t.collapse)&&(f.value=[]);const{index:O,indexPath:N}=R;if(!(ir(O)||ir(N)))if(t.router&&o){const F=R.route||O,j=o.push(F).then(U=>(U||(h.value=O),U));e("select",O,N,{index:O,indexPath:N,route:F},j)}else h.value=O,e("select",O,N,{index:O,indexPath:N})},k=R=>{var O;const N=m.value,F=N[R]||h.value&&N[h.value]||N[t.defaultActive];h.value=(O=F?.index)!=null?O:R},T=R=>{const O=getComputedStyle(R),N=Number.parseInt(O.marginLeft,10),F=Number.parseInt(O.marginRight,10);return R.offsetWidth+N+F||0},E=()=>{if(!s.value)return-1;const R=Array.from(s.value.childNodes).filter(J=>J.nodeName!=="#comment"&&(J.nodeName!=="#text"||J.nodeValue)),O=getComputedStyle(s.value),N=Number.parseInt(O.paddingLeft,10),F=Number.parseInt(O.paddingRight,10),j=s.value.clientWidth-N-F;let U=0,W=0;return R.forEach((J,ne)=>{U+=T(J),U<=j-c&&(W=ne+1)}),W===R.length?-1:W},x=R=>g.value[R].indexPath,P=(R,O=33.34)=>{let N;return()=>{N&&clearTimeout(N),N=setTimeout(()=>{R()},O)}};let A=!0;const I=()=>{const R=Yi(a);if(R&&(c=T(R)||IN),d.value===E())return;const O=()=>{d.value=-1,Ye(()=>{d.value=E()})};A?O():P(O)(),A=!1};Se(()=>t.defaultActive,R=>{m.value[R]||(h.value=""),k(R)}),Se(()=>t.collapse,R=>{R&&(f.value=[])}),Se(m.value,p);let D;sl(()=>{t.mode==="horizontal"&&t.ellipsis?D=nr(s,I).stop:D?.()});const q=H(!1);{const R=j=>{g.value[j.index]=j},O=j=>{delete g.value[j.index]};qt(zR,on({props:t,openedMenus:f,items:m,subMenus:g,activeIndex:h,isMenuPopup:v,addMenuItem:j=>{m.value[j.index]=j},removeMenuItem:j=>{delete m.value[j.index]},addSubMenu:R,removeSubMenu:O,openMenu:b,closeMenu:_,handleMenuItemClick:S,handleSubMenuClick:C})),qt(`${G_}${r.uid}`,{addSubMenu:R,removeSubMenu:O,mouseInChild:q,level:0})}Pt(()=>{t.mode==="horizontal"&&new Owe(r.vnode.el,l.namespace.value)}),i({open:O=>{const{indexPath:N}=g.value[O];N.forEach(F=>b(F,N))},close:y,updateActiveIndex:k,handleResize:I});const z=dq(t,0);return()=>{var R,O;let N=(O=(R=n.default)==null?void 0:R.call(n))!=null?O:[];const F=[];if(t.mode==="horizontal"&&s.value){const W=cc(N).filter(he=>he?.shapeFlag!==8),J=d.value===-1?W:W.slice(0,d.value),ne=d.value===-1?[]:W.slice(d.value);ne?.length&&t.ellipsis&&(N=J,F.push(nt(HR,{ref:a,index:"sub-menu-more",class:u.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>nt(He,{class:u.e("icon-more")},{default:()=>nt(t.ellipsisIcon)}),default:()=>ne})))}const j=t.closeOnClickOutside?[[wf,()=>{f.value.length&&(q.value||(f.value.forEach(W=>e("close",W,x(W))),f.value=[]))}]]:[],U=Vt(nt("ul",{key:String(t.collapse),role:"menubar",ref:s,style:z.value,class:{[l.b()]:!0,[l.m(t.mode)]:!0,[l.m("collapse")]:t.collapse}},[...N,...F]),j);return t.collapseTransition&&t.mode==="vertical"?nt(Lwe,()=>U):U}}});const $we=qe({index:{type:me([String,null]),default:null},route:{type:me([String,Object])},disabled:Boolean}),zwe={click:t=>ot(t.index)&&Pe(t.indexPath)},Lk="ElMenuItem";var fq=le({name:Lk,__name:"menu-item",props:$we,emits:zwe,setup(t,{expose:e,emit:n}){const i=t,r=n;Is(i.index)&&void 0;const o=Ct(),s=Ne(zR),a=De("menu"),l=De("menu-item");s||dr(Lk,"can not inject root menu");const{parentMenu:u,indexPath:c}=cq(o,An(i,"index")),d=Ne(`${G_}${u.value.uid}`);d||dr(Lk,"can not inject sub menu");const f=M(()=>i.index===s.activeIndex),h=on({index:i.index,indexPath:c,active:f}),m=()=>{i.disabled||(s.handleMenuItemClick({index:i.index,indexPath:c.value,route:i.route}),r("click",h))};return Pt(()=>{d.addSubMenu(h),s.addMenuItem(h)}),Sn(()=>{d.removeSubMenu(h),s.removeMenuItem(h)}),e({parentMenu:u,rootMenu:s,active:f,nsMenu:a,nsMenuItem:l,handleClick:m}),(g,v)=>(B(),Q("li",{class:$([w(l).b(),w(l).is("active",f.value),w(l).is("disabled",t.disabled)]),role:"menuitem",tabindex:"-1",onClick:m},[w(u).type.name==="ElMenu"&&w(s).props.collapse&&g.$slots.title?(B(),_e(w(Lo),{key:0,effect:w(s).props.popperEffect,placement:"right","fallback-placements":["left"],"popper-class":w(s).props.popperClass,"popper-style":w(s).props.popperStyle,persistent:w(s).props.persistent,"focus-on-target":""},{content:ce(()=>[we(g.$slots,"title")]),default:ce(()=>[ie("div",{class:$(w(a).be("tooltip","trigger"))},[we(g.$slots,"default")],2)]),_:3},8,["effect","popper-class","popper-style","persistent"])):(B(),Q(rt,{key:1},[we(g.$slots,"default"),we(g.$slots,"title")],64))],2))}});const Hwe={title:String};var hq=le({name:"ElMenuItemGroup",__name:"menu-item-group",props:Hwe,setup(t){const e=De("menu-item-group");return(n,i)=>(B(),Q("li",{class:$(w(e).b())},[ie("div",{class:$(w(e).e("title"))},[n.$slots.title?we(n.$slots,"title",{key:1}):(B(),Q(rt,{key:0},[dt(We(t.title),1)],64))],2),ie("ul",null,[we(n.$slots,"default")])],2))}});const Uwe=sn(Fwe,{MenuItem:fq,MenuItemGroup:hq,SubMenu:HR}),Wwe=Zi(fq);Zi(hq);const qwe=Zi(HR),mq=Symbol("elPaginationKey"),jwe=qe({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ri}}),Kwe={click:t=>t instanceof MouseEvent},Gwe=["disabled","aria-label","aria-disabled"],Ywe={key:0};var Xwe=le({name:"ElPaginationPrev",__name:"prev",props:jwe,emits:Kwe,setup(t){const e=t,{t:n}=Qt(),i=M(()=>e.disabled||e.currentPage<=1);return(r,o)=>(B(),Q("button",{type:"button",class:"btn-prev",disabled:i.value,"aria-label":r.prevText||w(n)("el.pagination.prev"),"aria-disabled":i.value,onClick:o[0]||(o[0]=s=>r.$emit("click",s))},[r.prevText?(B(),Q("span",Ywe,We(r.prevText),1)):(B(),_e(w(He),{key:1},{default:ce(()=>[(B(),_e(Gt(r.prevIcon)))]),_:1}))],8,Gwe))}});const Jwe=qe({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ri}}),Zwe=["disabled","aria-label","aria-disabled"],Qwe={key:0};var e_e=le({name:"ElPaginationNext",__name:"next",props:Jwe,emits:["click"],setup(t){const e=t,{t:n}=Qt(),i=M(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(r,o)=>(B(),Q("button",{type:"button",class:"btn-next",disabled:i.value,"aria-label":r.nextText||w(n)("el.pagination.next"),"aria-disabled":i.value,onClick:o[0]||(o[0]=s=>r.$emit("click",s))},[r.nextText?(B(),Q("span",Qwe,We(r.nextText),1)):(B(),_e(w(He),{key:1},{default:ce(()=>[(B(),_e(Gt(r.nextIcon)))]),_:1}))],8,Zwe))}});const UR=()=>Ne(mq,{}),t_e=qe({pageSize:{type:Number,required:!0},pageSizes:{type:me(Array),default:()=>Fs([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:me([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:yl},appendSizeTo:String});var n_e=le({name:"ElPaginationSizes",__name:"sizes",props:t_e,emits:["page-size-change"],setup(t,{emit:e}){const n=t,i=e,{t:r}=Qt(),o=De("pagination"),s=UR(),a=H(n.pageSize);Se(()=>n.pageSizes,(c,d)=>{if(!$i(c,d)&&Pe(c)){const f=c.includes(n.pageSize)?n.pageSize:n.pageSizes[0];i("page-size-change",f)}}),Se(()=>n.pageSize,c=>{a.value=c});const l=M(()=>n.pageSizes);function u(c){var d;c!==a.value&&(a.value=c,(d=s.handleSizeChange)==null||d.call(s,Number(c)))}return(c,d)=>(B(),Q("span",{class:$(w(o).e("sizes"))},[L(w(oW),{"model-value":a.value,disabled:c.disabled,"popper-class":c.popperClass,"popper-style":c.popperStyle,size:c.size,teleported:c.teleported,"validate-event":!1,"append-to":c.appendSizeTo,onChange:u},{default:ce(()=>[(B(!0),Q(rt,null,gn(l.value,f=>(B(),_e(w(sW),{key:f,value:f,label:f+w(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}});const i_e=qe({size:{type:String,values:yl}}),r_e=["disabled"];var o_e=le({name:"ElPaginationJumper",__name:"jumper",props:i_e,setup(t){const{t:e}=Qt(),n=De("pagination"),{pageCount:i,disabled:r,currentPage:o,changeEvent:s}=UR(),a=H(),l=M(()=>{var d;return(d=a.value)!=null?d:o?.value});function u(d){a.value=d?+d:""}function c(d){d=Math.trunc(+d),s?.(d),a.value=void 0}return(d,f)=>(B(),Q("span",{class:$(w(n).e("jump")),disabled:w(r)},[ie("span",{class:$([w(n).e("goto")])},We(w(e)("el.pagination.goto")),3),L(w(cr),{size:d.size,class:$([w(n).e("editor"),w(n).is("in-pagination")]),min:1,max:w(i),disabled:w(r),"model-value":l.value,"validate-event":!1,"aria-label":w(e)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","aria-label"]),ie("span",{class:$([w(n).e("classifier")])},We(w(e)("el.pagination.pageClassifier")),3)],10,r_e))}});const s_e=qe({total:{type:Number,default:1e3}}),a_e=["disabled"];var l_e=le({name:"ElPaginationTotal",__name:"total",props:s_e,setup(t){const{t:e}=Qt(),n=De("pagination"),{disabled:i}=UR();return(r,o)=>(B(),Q("span",{class:$(w(n).e("total")),disabled:w(i)},We(w(e)("el.pagination.total",{total:r.total})),11,a_e))}});const u_e=qe({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),c_e=["aria-current","aria-label","tabindex"],d_e=["tabindex","aria-label"],f_e=["aria-current","aria-label","tabindex"],h_e=["tabindex","aria-label"],m_e=["aria-current","aria-label","tabindex"];var g_e=le({name:"ElPaginationPager",__name:"pager",props:u_e,emits:[En],setup(t,{emit:e}){const n=t,i=e,r=De("pager"),o=De("icon"),{t:s}=Qt(),a=H(!1),l=H(!1),u=H(!1),c=H(!1),d=H(!1),f=H(!1),h=M(()=>{const C=n.pagerCount,S=(C-1)/2,k=Number(n.currentPage),T=Number(n.pageCount);let E=!1,x=!1;T>C&&(k>C-S&&(E=!0),k<T-S&&(x=!0));const P=[];if(E&&!x){const A=T-(C-2);for(let I=A;I<T;I++)P.push(I)}else if(!E&&x)for(let A=2;A<C;A++)P.push(A);else if(E&&x){const A=Math.floor(C/2)-1;for(let I=k-A;I<=k+A;I++)P.push(I)}else for(let A=2;A<T;A++)P.push(A);return P}),m=M(()=>["more","btn-quickprev",o.b(),r.is("disabled",n.disabled)]),g=M(()=>["more","btn-quicknext",o.b(),r.is("disabled",n.disabled)]),v=M(()=>n.disabled?-1:0);Se(()=>[n.pageCount,n.pagerCount,n.currentPage],([C,S,k])=>{const T=(S-1)/2;let E=!1,x=!1;C>S&&(E=k>S-T,x=k<C-T),u.value&&(u.value=E),c.value&&(c.value=x),a.value=E,l.value=x},{immediate:!0});function p(C=!1){n.disabled||(C?u.value=!0:c.value=!0)}function b(C=!1){C?d.value=!0:f.value=!0}function y(C){const S=C.target;if(S.tagName.toLowerCase()==="li"&&Array.from(S.classList).includes("number")){const k=Number(S.textContent);k!==n.currentPage&&i(En,k)}else S.tagName.toLowerCase()==="li"&&Array.from(S.classList).includes("more")&&_(C)}function _(C){const S=C.target;if(S.tagName.toLowerCase()==="ul"||n.disabled)return;let k=Number(S.textContent);const T=n.pageCount,E=n.currentPage,x=n.pagerCount-2;S.className.includes("more")&&(S.className.includes("quickprev")?k=E-x:S.className.includes("quicknext")&&(k=E+x)),Number.isNaN(+k)||(k<1&&(k=1),k>T&&(k=T)),k!==E&&i(En,k)}return(C,S)=>(B(),Q("ul",{class:$(w(r).b()),onClick:_,onKeyup:Pi(y,["enter"])},[C.pageCount>0?(B(),Q("li",{key:0,class:$([[w(r).is("active",C.currentPage===1),w(r).is("disabled",C.disabled)],"number"]),"aria-current":C.currentPage===1,"aria-label":w(s)("el.pagination.currentPage",{pager:1}),tabindex:v.value}," 1 ",10,c_e)):ve("v-if",!0),a.value?(B(),Q("li",{key:1,class:$(m.value),tabindex:v.value,"aria-label":w(s)("el.pagination.prevPages",{pager:C.pagerCount-2}),onMouseenter:S[0]||(S[0]=k=>p(!0)),onMouseleave:S[1]||(S[1]=k=>u.value=!1),onFocus:S[2]||(S[2]=k=>b(!0)),onBlur:S[3]||(S[3]=k=>d.value=!1)},[(u.value||d.value)&&!C.disabled?(B(),_e(w(Tc),{key:0})):(B(),_e(w(bD),{key:1}))],42,d_e)):ve("v-if",!0),(B(!0),Q(rt,null,gn(h.value,k=>(B(),Q("li",{key:k,class:$([[w(r).is("active",C.currentPage===k),w(r).is("disabled",C.disabled)],"number"]),"aria-current":C.currentPage===k,"aria-label":w(s)("el.pagination.currentPage",{pager:k}),tabindex:v.value},We(k),11,f_e))),128)),l.value?(B(),Q("li",{key:2,class:$(g.value),tabindex:v.value,"aria-label":w(s)("el.pagination.nextPages",{pager:C.pagerCount-2}),onMouseenter:S[4]||(S[4]=k=>p()),onMouseleave:S[5]||(S[5]=k=>c.value=!1),onFocus:S[6]||(S[6]=k=>b()),onBlur:S[7]||(S[7]=k=>f.value=!1)},[(c.value||f.value)&&!C.disabled?(B(),_e(w(Ec),{key:0})):(B(),_e(w(bD),{key:1}))],42,h_e)):ve("v-if",!0),C.pageCount>1?(B(),Q("li",{key:3,class:$([[w(r).is("active",C.currentPage===C.pageCount),w(r).is("disabled",C.disabled)],"number"]),"aria-current":C.currentPage===C.pageCount,"aria-label":w(s)("el.pagination.currentPage",{pager:C.pageCount}),tabindex:v.value},We(C.pageCount),11,m_e)):ve("v-if",!0)],34))}});const Kr=t=>typeof t!="number",p_e=qe({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>St(t)&&Math.trunc(t)===t&&t>4&&t<22&&t%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:me(Array),default:()=>Fs([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:me([String,Object])},prevText:{type:String,default:""},prevIcon:{type:ri,default:()=>Am},nextText:{type:String,default:""},nextIcon:{type:ri,default:()=>oa},teleported:{type:Boolean,default:!0},small:Boolean,size:$r,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),v_e={"update:current-page":t=>St(t),"update:page-size":t=>St(t),"size-change":t=>St(t),change:(t,e)=>St(t)&&St(e),"current-change":t=>St(t),"prev-click":t=>St(t),"next-click":t=>St(t)},RN="ElPagination";var b_e=le({name:RN,props:p_e,emits:v_e,setup(t,{emit:e,slots:n}){const{t:i}=Qt(),r=De("pagination"),o=Ct().vnode.props||{},s=oU(),a=M(()=>{var C;return t.small?"small":(C=t.size)!=null?C:s.value});of({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},M(()=>!!t.small));const l="onUpdate:currentPage"in o||"onUpdate:current-page"in o||"onCurrentChange"in o,u="onUpdate:pageSize"in o||"onUpdate:page-size"in o||"onSizeChange"in o,c=M(()=>{if(Kr(t.total)&&Kr(t.pageCount)||!Kr(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Kr(t.pageCount)){if(!Kr(t.total)&&!Kr(t.pageSize)&&!u)return!1}else if(!u)return!1}return!0}),d=H(Kr(t.defaultPageSize)?10:t.defaultPageSize),f=H(Kr(t.defaultCurrentPage)?1:t.defaultCurrentPage),h=M({get(){return Kr(t.pageSize)?d.value:t.pageSize},set(C){Kr(t.pageSize)&&(d.value=C),u&&(e("update:page-size",C),e("size-change",C))}}),m=M(()=>{let C=0;return Kr(t.pageCount)?Kr(t.total)||(C=Math.max(1,Math.ceil(t.total/h.value))):C=t.pageCount,C}),g=M({get(){return Kr(t.currentPage)?f.value:t.currentPage},set(C){let S=C;C<1?S=1:C>m.value&&(S=m.value),Kr(t.currentPage)&&(f.value=S),l&&(e("update:current-page",S),e("current-change",S))}});Se(m,C=>{g.value>C&&(g.value=C)}),Se([g,h],C=>{e(En,...C)},{flush:"post"});function v(C){g.value=C}function p(C){h.value=C;const S=m.value;g.value>S&&(g.value=S)}function b(){t.disabled||(g.value-=1,e("prev-click",g.value))}function y(){t.disabled||(g.value+=1,e("next-click",g.value))}function _(C,S){C&&(C.props||(C.props={}),C.props.class=[C.props.class,S].join(" "))}return qt(mq,{pageCount:m,disabled:M(()=>t.disabled),currentPage:g,changeEvent:v,handleSizeChange:p}),()=>{var C,S;if(!c.value)return i("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&m.value<=1)return null;const k=[],T=[],E=nt("div",{class:r.e("rightwrapper")},T),x={prev:nt(Xwe,{disabled:t.disabled,currentPage:g.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:b}),jumper:nt(o_e,{size:a.value}),pager:nt(g_e,{currentPage:g.value,pageCount:m.value,pagerCount:t.pagerCount,onChange:v,disabled:t.disabled}),next:nt(e_e,{disabled:t.disabled,currentPage:g.value,pageCount:m.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:y}),sizes:nt(n_e,{pageSize:h.value,pageSizes:t.pageSizes,popperClass:t.popperClass,popperStyle:t.popperStyle,disabled:t.disabled,teleported:t.teleported,size:a.value,appendSizeTo:t.appendSizeTo}),slot:(S=(C=n?.default)==null?void 0:C.call(n))!=null?S:null,total:nt(l_e,{total:Kr(t.total)?0:t.total})},P=t.layout.split(",").map(I=>I.trim());let A=!1;return P.forEach(I=>{if(I==="->"){A=!0;return}A?T.push(x[I]):k.push(x[I])}),_(k[0],r.is("first")),_(k[k.length-1],r.is("last")),A&&T.length>0&&(_(T[0],r.is("first")),_(T[T.length-1],r.is("last")),k.push(E)),nt("div",{class:[r.b(),r.is("background",t.background),r.m(a.value)]},k)}}});const y_e=sn(b_e),w_e=qe({trigger:vc.trigger,triggerKeys:vc.triggerKeys,placement:Nw.placement,disabled:vc.disabled,visible:Mn.visible,transition:Mn.transition,popperOptions:Nw.popperOptions,tabindex:Nw.tabindex,content:Mn.content,popperStyle:Mn.popperStyle,popperClass:Mn.popperClass,enterable:{...Mn.enterable,default:!0},effect:{...Mn.effect,default:"light"},teleported:Mn.teleported,appendTo:Mn.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),__e={"update:visible":t=>vi(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},C_e="onUpdate:visible";var S_e=le({name:"ElPopover",__name:"popover",props:w_e,emits:__e,setup(t,{expose:e,emit:n}){const i=t,r=n,o=M(()=>i[C_e]),s=De("popover"),a=H(),l=M(()=>{var p;return(p=w(a))==null?void 0:p.popperRef}),u=M(()=>[{width:zr(i.width)},i.popperStyle]),c=M(()=>[s.b(),i.popperClass,{[s.m("plain")]:!!i.content}]),d=M(()=>i.transition===`${s.namespace.value}-fade-in-linear`),f=()=>{var p;(p=a.value)==null||p.hide()},h=()=>{r("before-enter")},m=()=>{r("before-leave")},g=()=>{r("after-enter")},v=()=>{r("update:visible",!1),r("after-leave")};return e({popperRef:l,hide:f}),(p,b)=>(B(),_e(w(Lo),Lt({ref_key:"tooltipRef",ref:a},p.$attrs,{trigger:t.trigger,"trigger-keys":t.triggerKeys,placement:t.placement,disabled:t.disabled,visible:t.visible,transition:t.transition,"popper-options":t.popperOptions,tabindex:t.tabindex,content:t.content,offset:t.offset,"show-after":t.showAfter,"hide-after":t.hideAfter,"auto-close":t.autoClose,"show-arrow":t.showArrow,"aria-label":t.title,effect:t.effect,enterable:t.enterable,"popper-class":c.value,"popper-style":u.value,teleported:t.teleported,"append-to":t.appendTo,persistent:t.persistent,"gpu-acceleration":d.value,"onUpdate:visible":o.value,onBeforeShow:h,onBeforeHide:m,onShow:g,onHide:v}),{content:ce(()=>[t.title?(B(),Q("div",{key:0,class:$(w(s).e("title")),role:"title"},We(t.title),3)):ve("v-if",!0),we(p.$slots,"default",{},()=>[dt(We(t.content),1)])]),default:ce(()=>[p.$slots.reference?we(p.$slots,"reference",{key:0}):ve("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}});const MN=(t,e)=>{const n=e.arg||e.value,i=n?.popperRef;i&&(i.triggerRef=t)};var k_e={mounted(t,e){MN(t,e)},updated(t,e){MN(t,e)}};const T_e="popover",E_e=Xce(k_e,T_e),x_e=sn(S_e,{directive:E_e}),A_e=qe({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:me(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:me([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:me(Function),default:t=>`${t}%`}}),P_e=["aria-valuenow"],I_e={viewBox:"0 0 100 100"},R_e=["d","stroke","stroke-linecap","stroke-width"],M_e=["d","stroke","opacity","stroke-linecap","stroke-width"],O_e={key:0};var L_e=le({name:"ElProgress",__name:"progress",props:A_e,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,i=De("progress"),r=M(()=>{const y={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},_=b(n.percentage);return _.includes("gradient")?y.background=_:y.backgroundColor=_,y}),o=M(()=>(n.strokeWidth/n.width*100).toFixed(1)),s=M(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=M(()=>{const y=s.value,_=n.type==="dashboard";return`
M 50 50
m 0 ${_?"":"-"}${y}
a ${y} ${y} 0 1 1 0 ${_?"-":""}${y*2}
a ${y} ${y} 0 1 1 0 ${_?"":"-"}${y*2}
`}),l=M(()=>2*Math.PI*s.value),u=M(()=>n.type==="dashboard"?.75:1),c=M(()=>`${-1*l.value*(1-u.value)/2}px`),d=M(()=>({strokeDasharray:`${l.value*u.value}px, ${l.value}px`,strokeDashoffset:c.value})),f=M(()=>({strokeDasharray:`${l.value*u.value*(n.percentage/100)}px, ${l.value}px`,strokeDashoffset:c.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),h=M(()=>{let y;return n.color?y=b(n.percentage):y=e[n.status]||e.default,y}),m=M(()=>n.status==="warning"?lR:n.type==="line"?n.status==="success"?DC:Nf:n.status==="success"?LC:cl),g=M(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),v=M(()=>n.format(n.percentage));function p(y){const _=100/y.length;return y.map((S,k)=>ot(S)?{color:S,percentage:(k+1)*_}:S).sort((S,k)=>S.percentage-k.percentage)}const b=y=>{var _;const{color:C}=n;if(Xe(C))return C(y);if(ot(C))return C;{const S=p(C);for(const k of S)if(k.percentage>y)return k.color;return(_=S[S.length-1])==null?void 0:_.color}};return(y,_)=>(B(),Q("div",{class:$([w(i).b(),w(i).m(t.type),w(i).is(t.status),{[w(i).m("without-text")]:!t.showText,[w(i).m("text-inside")]:t.textInside}]),role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[t.type==="line"?(B(),Q("div",{key:0,class:$(w(i).b("bar"))},[ie("div",{class:$(w(i).be("bar","outer")),style:mt({height:`${t.strokeWidth}px`})},[ie("div",{class:$([w(i).be("bar","inner"),{[w(i).bem("bar","inner","indeterminate")]:t.indeterminate},{[w(i).bem("bar","inner","striped")]:t.striped},{[w(i).bem("bar","inner","striped-flow")]:t.stripedFlow}]),style:mt(r.value)},[(t.showText||y.$slots.default)&&t.textInside?(B(),Q("div",{key:0,class:$(w(i).be("bar","innerText"))},[we(y.$slots,"default",{percentage:t.percentage},()=>[ie("span",null,We(v.value),1)])],2)):ve("v-if",!0)],6)],6)],2)):(B(),Q("div",{key:1,class:$(w(i).b("circle")),style:mt({height:`${t.width}px`,width:`${t.width}px`})},[(B(),Q("svg",I_e,[ie("path",{class:$(w(i).be("circle","track")),d:a.value,stroke:`var(${w(i).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,fill:"none",style:mt(d.value)},null,14,R_e),ie("path",{class:$(w(i).be("circle","path")),d:a.value,stroke:h.value,fill:"none",opacity:t.percentage?1:0,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,style:mt(f.value)},null,14,M_e)]))],6)),(t.showText||y.$slots.default)&&!t.textInside?(B(),Q("div",{key:2,class:$(w(i).e("text")),style:mt({fontSize:`${g.value}px`})},[we(y.$slots,"default",{percentage:t.percentage},()=>[t.status?(B(),_e(w(He),{key:1},{default:ce(()=>[(B(),_e(Gt(m.value)))]),_:1})):(B(),Q("span",O_e,We(v.value),1))])],6)):ve("v-if",!0)],10,P_e))}});const D_e=sn(L_e),N_e="horizontal",B_e=({atEndEdge:t,atStartEdge:e,layout:n},i)=>{let r,o=0;const s=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:s,onWheel:l=>{Jce(r);let{deltaX:u,deltaY:c}=l;l.shiftKey&&c!==0&&(u=c,c=0);const d=n.value===N_e?u:c;s(d)||(o+=d,!IU()&&d!==0&&l.preventDefault(),r=oR(()=>{i(o),o=0}))}}},gq=Symbol("sliderContextKey"),V_e=qe({modelValue:{type:me([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:$r,inputSize:$r,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:me(Function),default:void 0},disabled:{type:Boolean,default:void 0},range:Boolean,vertical:Boolean,height:String,rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:me(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:xu,default:"top"},marks:{type:me(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...hs(["ariaLabel"])}),Dk=t=>St(t)||Pe(t)&&t.every(St),F_e={[It]:Dk,[rs]:Dk,[En]:Dk},$_e=qe({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:xu,default:"top"}}),z_e={[It]:t=>St(t)},H_e=(t,e,n)=>{const i=H(),r=H(!1),o=M(()=>e.value instanceof Function),s=M(()=>o.value&&e.value(t.modelValue)||t.modelValue),a=ul(()=>{n.value&&(r.value=!0)},50),l=ul(()=>{n.value&&(r.value=!1)},50);return{tooltip:i,tooltipVisible:r,formatValue:s,displayTooltip:a,hideTooltip:l}},U_e=(t,e,n)=>{const{disabled:i,min:r,max:o,step:s,showTooltip:a,persistent:l,precision:u,sliderSize:c,formatTooltip:d,emitChange:f,resetSize:h,updateDragging:m}=Ne(gq),{tooltip:g,tooltipVisible:v,formatValue:p,displayTooltip:b,hideTooltip:y}=H_e(t,d,a),_=H(),C=M(()=>`${(t.modelValue-r.value)/(o.value-r.value)*100}%`),S=M(()=>t.vertical?{bottom:C.value}:{left:C.value}),k=()=>{e.hovering=!0,b()},T=()=>{e.hovering=!1,e.dragging||y()},E=W=>{i.value||(W.preventDefault(),N(W),window.addEventListener("mousemove",F),window.addEventListener("touchmove",F),window.addEventListener("mouseup",j),window.addEventListener("touchend",j),window.addEventListener("contextmenu",j),_.value.focus())},x=W=>{i.value||(e.newPosition=Number.parseFloat(C.value)+W/(o.value-r.value)*100,U(e.newPosition),f())},P=()=>{x(-s.value)},A=()=>{x(s.value)},I=()=>{x(-s.value*4)},D=()=>{x(s.value*4)},q=()=>{i.value||(U(0),f())},z=()=>{i.value||(U(100),f())},R=W=>{const J=Bn(W);let ne=!0;switch(J){case Me.left:case Me.down:P();break;case Me.right:case Me.up:A();break;case Me.home:q();break;case Me.end:z();break;case Me.pageDown:I();break;case Me.pageUp:D();break;default:ne=!1;break}ne&&W.preventDefault()},O=W=>{let J,ne;return W.type.startsWith("touch")?(ne=W.touches[0].clientY,J=W.touches[0].clientX):(ne=W.clientY,J=W.clientX),{clientX:J,clientY:ne}},N=W=>{e.dragging=!0,e.isClick=!0;const{clientX:J,clientY:ne}=O(W);t.vertical?e.startY=ne:e.startX=J,e.startPosition=Number.parseFloat(C.value),e.newPosition=e.startPosition},F=W=>{if(e.dragging){e.isClick=!1,b(),h();let J;const{clientX:ne,clientY:he}=O(W);t.vertical?(e.currentY=he,J=(e.startY-e.currentY)/c.value*100):(e.currentX=ne,J=(e.currentX-e.startX)/c.value*100),e.newPosition=e.startPosition+J,U(e.newPosition)}},j=()=>{e.dragging&&(setTimeout(()=>{e.dragging=!1,e.hovering||y(),e.isClick||U(e.newPosition),f()},0),window.removeEventListener("mousemove",F),window.removeEventListener("touchmove",F),window.removeEventListener("mouseup",j),window.removeEventListener("touchend",j),window.removeEventListener("contextmenu",j))},U=async W=>{if(W===null||Number.isNaN(+W))return;W=GI(W,0,100);const J=Math.floor((o.value-r.value)/s.value),ne=J*s.value/(o.value-r.value)*100,he=ne+(100-ne)/2;let X;if(W<ne){const se=ne/J,re=Math.round(W/se);X=r.value+re*s.value}else W<he?X=r.value+J*s.value:X=o.value;X=Number.parseFloat(X.toFixed(u.value)),X!==t.modelValue&&n(It,X),!e.dragging&&t.modelValue!==e.oldValue&&(e.oldValue=t.modelValue),await Ye(),e.dragging&&b(),g.value.updatePopper()};return Se(()=>e.dragging,W=>{m(W)}),Kn(_,"touchstart",E,{passive:!1}),{disabled:i,button:_,tooltip:g,tooltipVisible:v,showTooltip:a,persistent:l,wrapperStyle:S,formatValue:p,handleMouseEnter:k,handleMouseLeave:T,onButtonDown:E,onKeyDown:R,setPosition:U}},W_e=["tabindex"];var ON=le({name:"ElSliderButton",__name:"button",props:$_e,emits:z_e,setup(t,{expose:e,emit:n}){const i=t,r=n,o=De("slider"),s=on({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:i.modelValue}),a=M(()=>d.value?f.value:!1),{disabled:l,button:u,tooltip:c,showTooltip:d,persistent:f,tooltipVisible:h,wrapperStyle:m,formatValue:g,handleMouseEnter:v,handleMouseLeave:p,onButtonDown:b,onKeyDown:y,setPosition:_}=U_e(i,s,r),{hovering:C,dragging:S}=Sr(s);return e({onButtonDown:b,onKeyDown:y,setPosition:_,hovering:C,dragging:S}),(k,T)=>(B(),Q("div",{ref_key:"button",ref:u,class:$([w(o).e("button-wrapper"),{hover:w(C),dragging:w(S)}]),style:mt(w(m)),tabindex:w(l)?void 0:0,onMouseenter:T[0]||(T[0]=(...E)=>w(v)&&w(v)(...E)),onMouseleave:T[1]||(T[1]=(...E)=>w(p)&&w(p)(...E)),onMousedown:T[2]||(T[2]=(...E)=>w(b)&&w(b)(...E)),onFocus:T[3]||(T[3]=(...E)=>w(v)&&w(v)(...E)),onBlur:T[4]||(T[4]=(...E)=>w(p)&&w(p)(...E)),onKeydown:T[5]||(T[5]=(...E)=>w(y)&&w(y)(...E))},[L(w(Lo),{ref_key:"tooltip",ref:c,visible:w(h),placement:k.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":k.tooltipClass,disabled:!w(d),persistent:a.value},{content:ce(()=>[ie("span",null,We(w(g)),1)]),default:ce(()=>[ie("div",{class:$([w(o).e("button"),{hover:w(C),dragging:w(S)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,W_e))}});const q_e=qe({mark:{type:me([String,Object]),default:void 0}});var j_e=le({name:"ElSliderMarker",props:q_e,setup(t){const e=De("slider"),n=M(()=>ot(t.mark)?t.mark:t.mark.label),i=M(()=>ot(t.mark)?void 0:t.mark.style);return()=>nt("div",{class:e.e("marks-text"),style:i.value},n.value)}});const K_e=(t,e,n)=>{const{formItem:i}=lo(),r=bi(),o=H(),s=H(),a={firstButton:o,secondButton:s},l=Oi(),u=M(()=>Math.min(e.firstValue,e.secondValue)),c=M(()=>Math.max(e.firstValue,e.secondValue)),d=M(()=>t.range?`${100*(c.value-u.value)/(t.max-t.min)}%`:`${100*(e.firstValue-t.min)/(t.max-t.min)}%`),f=M(()=>t.range?`${100*(u.value-t.min)/(t.max-t.min)}%`:"0%"),h=M(()=>t.vertical?{height:t.height}:{}),m=M(()=>t.vertical?{height:d.value,bottom:f.value}:{width:d.value,left:f.value}),g=()=>{if(r.value){const P=r.value.getBoundingClientRect();e.sliderSize=P[t.vertical?"height":"width"]}},v=P=>{const A=t.min+P*(t.max-t.min)/100;if(!t.range)return o;let I;return Math.abs(u.value-A)<Math.abs(c.value-A)?I=e.firstValue<e.secondValue?"firstButton":"secondButton":I=e.firstValue>e.secondValue?"firstButton":"secondButton",a[I]},p=P=>{const A=v(P);return A.value.setPosition(P),A},b=P=>{e.firstValue=P??t.min,_(t.range?[u.value,c.value]:P??t.min)},y=P=>{e.secondValue=P,t.range&&_([u.value,c.value])},_=P=>{n(It,P),n(rs,P)},C=async()=>{await Ye(),n(En,t.range?[u.value,c.value]:t.modelValue)},S=P=>{var A,I,D,q,z,R;if(l.value||e.dragging)return;g();let O=0;if(t.vertical){const N=(D=(I=(A=P.touches)==null?void 0:A.item(0))==null?void 0:I.clientY)!=null?D:P.clientY;O=(r.value.getBoundingClientRect().bottom-N)/e.sliderSize*100}else{const N=(R=(z=(q=P.touches)==null?void 0:q.item(0))==null?void 0:z.clientX)!=null?R:P.clientX,F=r.value.getBoundingClientRect().left;O=(N-F)/e.sliderSize*100}if(!(O<0||O>100))return p(O)};return{elFormItem:i,slider:r,firstButton:o,secondButton:s,sliderDisabled:l,minValue:u,maxValue:c,runwayStyle:h,barStyle:m,resetSize:g,setPosition:p,emitChange:C,onSliderWrapperPrevent:P=>{var A,I;((A=a.firstButton.value)!=null&&A.dragging||(I=a.secondButton.value)!=null&&I.dragging)&&P.preventDefault()},onSliderClick:P=>{S(P)&&C()},onSliderDown:async P=>{const A=S(P);A&&(await Ye(),A.value.onButtonDown(P))},onSliderMarkerDown:P=>{if(l.value||e.dragging)return;p(P)&&C()},setFirstValue:b,setSecondValue:y}},G_e=(t,e,n,i)=>({stops:M(()=>{if(!t.showStops||t.min>t.max)return[];if(t.step===0)return[];const s=Math.ceil((t.max-t.min)/t.step),a=100*t.step/(t.max-t.min),l=Array.from({length:s-1}).map((u,c)=>(c+1)*a);return t.range?l.filter(u=>u<100*(n.value-t.min)/(t.max-t.min)||u>100*(i.value-t.min)/(t.max-t.min)):l.filter(u=>u>100*(e.firstValue-t.min)/(t.max-t.min))}),getStopStyle:s=>t.vertical?{bottom:`${s}%`}:{left:`${s}%`}}),Y_e=t=>M(()=>t.marks?Object.keys(t.marks).map(Number.parseFloat).sort((n,i)=>n-i).filter(n=>n<=t.max&&n>=t.min).map(n=>({point:n,position:(n-t.min)*100/(t.max-t.min),mark:t.marks[n]})):[]),X_e=(t,e,n,i,r,o)=>{const s=u=>{r(It,u),r(rs,u)},a=()=>t.range?![n.value,i.value].every((u,c)=>u===e.oldValue[c]):t.modelValue!==e.oldValue,l=()=>{var u,c;t.min>t.max&&dr("Slider","min should not be greater than max.");const d=t.modelValue;t.range&&Pe(d)?d[1]<t.min?s([t.min,t.min]):d[0]>t.max?s([t.max,t.max]):d[0]<t.min?s([t.min,d[1]]):d[1]>t.max?s([d[0],t.max]):(e.firstValue=d[0],e.secondValue=d[1],a()&&(t.validateEvent&&((u=o?.validate)==null||u.call(o,"change").catch(f=>void 0)),e.oldValue=d.slice())):!t.range&&St(d)&&!Number.isNaN(d)&&(d<t.min?s(t.min):d>t.max?s(t.max):(e.firstValue=d,a()&&(t.validateEvent&&((c=o?.validate)==null||c.call(o,"change").catch(f=>void 0)),e.oldValue=d)))};l(),Se(()=>e.dragging,u=>{u||l()}),Se(()=>t.modelValue,(u,c)=>{e.dragging||Pe(u)&&Pe(c)&&u.every((d,f)=>d===c[f])&&e.firstValue===u[0]&&e.secondValue===u[1]||l()},{deep:!0}),Se(()=>[t.min,t.max],()=>{l()})},J_e=(t,e,n)=>{const i=H();return Pt(async()=>{t.range?(Pe(t.modelValue)?(e.firstValue=Math.max(t.min,t.modelValue[0]),e.secondValue=Math.min(t.max,t.modelValue[1])):(e.firstValue=t.min,e.secondValue=t.max),e.oldValue=[e.firstValue,e.secondValue]):(!St(t.modelValue)||Number.isNaN(t.modelValue)?e.firstValue=t.min:e.firstValue=Math.min(t.max,Math.max(t.min,t.modelValue)),e.oldValue=e.firstValue),Kn(window,"resize",n),await Ye(),n()}),{sliderWrapper:i}},Z_e=["id","role","aria-label","aria-labelledby"],Q_e={key:1};var e1e=le({name:"ElSlider",__name:"slider",props:V_e,emits:F_e,setup(t,{expose:e,emit:n}){const i=t,r=n,o=De("slider"),{t:s}=Qt(),a=on({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:l,slider:u,firstButton:c,secondButton:d,sliderDisabled:f,minValue:h,maxValue:m,runwayStyle:g,barStyle:v,resetSize:p,emitChange:b,onSliderWrapperPrevent:y,onSliderClick:_,onSliderDown:C,onSliderMarkerDown:S,setFirstValue:k,setSecondValue:T}=K_e(i,a,r),{stops:E,getStopStyle:x}=G_e(i,a,h,m),{inputId:P,isLabeledByFormItem:A}=Au(i,{formItemContext:l}),I=fr(),D=M(()=>i.inputSize||I.value),q=M(()=>i.ariaLabel||s("el.slider.defaultLabel",{min:i.min,max:i.max})),z=M(()=>i.range?i.rangeStartLabel||s("el.slider.defaultRangeStartLabel"):q.value),R=M(()=>i.formatValueText?i.formatValueText(J.value):`${J.value}`),O=M(()=>i.rangeEndLabel||s("el.slider.defaultRangeEndLabel")),N=M(()=>i.formatValueText?i.formatValueText(ne.value):`${ne.value}`),F=M(()=>[o.b(),o.m(I.value),o.is("vertical",i.vertical),{[o.m("with-input")]:i.showInput}]),j=Y_e(i);X_e(i,a,h,m,r,l);const U=M(()=>{const se=[i.min,i.max,i.step].map(re=>{const ee=`${re}`.split(".")[1];return ee?ee.length:0});return Math.max.apply(null,se)}),{sliderWrapper:W}=J_e(i,a,p),{firstValue:J,secondValue:ne,sliderSize:he}=Sr(a),X=se=>{a.dragging=se};return Kn(W,"touchstart",y,{passive:!1}),Kn(W,"touchmove",y,{passive:!1}),qt(gq,{...Sr(i),sliderSize:he,disabled:f,precision:U,emitChange:b,resetSize:p,updateDragging:X}),e({onSliderClick:_}),(se,re)=>{var ee,te;return B(),Q("div",{id:se.range?w(P):void 0,ref_key:"sliderWrapper",ref:W,class:$(F.value),role:se.range?"group":void 0,"aria-label":se.range&&!w(A)?q.value:void 0,"aria-labelledby":se.range&&w(A)?(ee=w(l))==null?void 0:ee.labelId:void 0},[ie("div",{ref_key:"slider",ref:u,class:$([w(o).e("runway"),{"show-input":se.showInput&&!se.range},w(o).is("disabled",w(f))]),style:mt(w(g)),onMousedown:re[0]||(re[0]=(...V)=>w(C)&&w(C)(...V)),onTouchstartPassive:re[1]||(re[1]=(...V)=>w(C)&&w(C)(...V))},[ie("div",{class:$(w(o).e("bar")),style:mt(w(v))},null,6),L(ON,{id:se.range?void 0:w(P),ref_key:"firstButton",ref:c,"model-value":w(J),vertical:se.vertical,"tooltip-class":se.tooltipClass,placement:se.placement,role:"slider","aria-label":se.range||!w(A)?z.value:void 0,"aria-labelledby":!se.range&&w(A)?(te=w(l))==null?void 0:te.labelId:void 0,"aria-valuemin":se.min,"aria-valuemax":se.range?w(ne):se.max,"aria-valuenow":w(J),"aria-valuetext":R.value,"aria-orientation":se.vertical?"vertical":"horizontal","aria-disabled":w(f),"onUpdate:modelValue":w(k)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),se.range?(B(),_e(ON,{key:0,ref_key:"secondButton",ref:d,"model-value":w(ne),vertical:se.vertical,"tooltip-class":se.tooltipClass,placement:se.placement,role:"slider","aria-label":O.value,"aria-valuemin":w(J),"aria-valuemax":se.max,"aria-valuenow":w(ne),"aria-valuetext":N.value,"aria-orientation":se.vertical?"vertical":"horizontal","aria-disabled":w(f),"onUpdate:modelValue":w(T)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):ve("v-if",!0),se.showStops?(B(),Q("div",Q_e,[(B(!0),Q(rt,null,gn(w(E),(V,K)=>(B(),Q("div",{key:K,class:$(w(o).e("stop")),style:mt(w(x)(V))},null,6))),128))])):ve("v-if",!0),w(j).length>0?(B(),Q(rt,{key:2},[ie("div",null,[(B(!0),Q(rt,null,gn(w(j),(V,K)=>(B(),Q("div",{key:K,style:mt(w(x)(V.position)),class:$([w(o).e("stop"),w(o).e("marks-stop")])},null,6))),128))]),ie("div",{class:$(w(o).e("marks"))},[(B(!0),Q(rt,null,gn(w(j),(V,K)=>(B(),_e(w(j_e),{key:K,mark:V.mark,style:mt(w(x)(V.position)),onMousedown:Ot(G=>w(S)(V.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):ve("v-if",!0)],38),se.showInput&&!se.range?(B(),_e(w(uq),{key:0,ref:"input","model-value":w(J),class:$(w(o).e("input")),step:se.step,disabled:w(f),controls:se.showInputControls,min:se.min,max:se.max,precision:U.value,size:D.value,"onUpdate:modelValue":w(k),onChange:w(b)},null,8,["model-value","class","step","disabled","controls","min","max","precision","size","onUpdate:modelValue","onChange"])):ve("v-if",!0)],10,Z_e)}}});const t1e=sn(e1e),pq=t=>["",...yl].includes(t),n1e=qe({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:pq},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:ri},activeActionIcon:{type:ri},activeIcon:{type:ri},inactiveIcon:{type:ri},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:me(Function)},id:String,tabindex:{type:[String,Number]},...hs(["ariaLabel"])}),i1e={[It]:t=>vi(t)||ot(t)||St(t),[En]:t=>vi(t)||ot(t)||St(t),[rs]:t=>vi(t)||ot(t)||St(t)},r1e=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],o1e=["aria-hidden"],s1e={key:1},a1e={key:1},l1e=["aria-hidden"],LN="ElSwitch";var u1e=le({name:LN,__name:"switch",props:n1e,emits:i1e,setup(t,{expose:e,emit:n}){const i=t,r=n,{formItem:o}=lo(),s=fr(),a=De("switch"),{inputId:l}=Au(i,{formItemContext:o}),u=Oi(M(()=>{if(i.loading)return!0})),c=H(i.modelValue!==!1),d=bi(),f=M(()=>[a.b(),a.m(s.value),a.is("disabled",u.value),a.is("checked",p.value)]),h=M(()=>[a.e("label"),a.em("label","left"),a.is("active",!p.value)]),m=M(()=>[a.e("label"),a.em("label","right"),a.is("active",p.value)]),g=M(()=>({width:zr(i.width)}));Se(()=>i.modelValue,()=>{c.value=!0});const v=M(()=>c.value?i.modelValue:!1),p=M(()=>v.value===i.activeValue);[i.activeValue,i.inactiveValue].includes(v.value)||(r(It,i.inactiveValue),r(En,i.inactiveValue),r(rs,i.inactiveValue)),Se(p,C=>{var S;d.value.checked=C,i.validateEvent&&((S=o?.validate)==null||S.call(o,"change").catch(k=>void 0))});const b=()=>{const C=p.value?i.inactiveValue:i.activeValue;r(It,C),r(En,C),r(rs,C),Ye(()=>{d.value.checked=p.value})},y=()=>{if(u.value)return;const{beforeChange:C}=i;if(!C){b();return}const S=C();[_v(S),vi(S)].includes(!0)||dr(LN,"beforeChange must return type `Promise<boolean>` or `boolean`"),_v(S)?S.then(T=>{T&&b()}).catch(T=>{}):S&&b()},_=()=>{var C,S;(S=(C=d.value)==null?void 0:C.focus)==null||S.call(C)};return Pt(()=>{d.value.checked=p.value}),e({focus:_,checked:p}),(C,S)=>(B(),Q("div",{class:$(f.value),onClick:Ot(y,["prevent"])},[ie("input",{id:w(l),ref_key:"input",ref:d,class:$(w(a).e("input")),type:"checkbox",role:"switch","aria-checked":p.value,"aria-disabled":w(u),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:w(u),tabindex:t.tabindex,onChange:b,onKeydown:Pi(y,["enter"])},null,42,r1e),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||C.$slots.inactive)?(B(),Q("span",{key:0,class:$(h.value)},[we(C.$slots,"inactive",{},()=>[t.inactiveIcon?(B(),_e(w(He),{key:0},{default:ce(()=>[(B(),_e(Gt(t.inactiveIcon)))]),_:1})):ve("v-if",!0),!t.inactiveIcon&&t.inactiveText?(B(),Q("span",{key:1,"aria-hidden":p.value},We(t.inactiveText),9,o1e)):ve("v-if",!0)])],2)):ve("v-if",!0),ie("span",{class:$(w(a).e("core")),style:mt(g.value)},[t.inlinePrompt?(B(),Q("div",{key:0,class:$(w(a).e("inner"))},[p.value?(B(),Q("div",{key:1,class:$(w(a).e("inner-wrapper"))},[we(C.$slots,"active",{},()=>[t.activeIcon?(B(),_e(w(He),{key:0},{default:ce(()=>[(B(),_e(Gt(t.activeIcon)))]),_:1})):ve("v-if",!0),!t.activeIcon&&t.activeText?(B(),Q("span",a1e,We(t.activeText),1)):ve("v-if",!0)])],2)):(B(),Q("div",{key:0,class:$(w(a).e("inner-wrapper"))},[we(C.$slots,"inactive",{},()=>[t.inactiveIcon?(B(),_e(w(He),{key:0},{default:ce(()=>[(B(),_e(Gt(t.inactiveIcon)))]),_:1})):ve("v-if",!0),!t.inactiveIcon&&t.inactiveText?(B(),Q("span",s1e,We(t.inactiveText),1)):ve("v-if",!0)])],2))],2)):ve("v-if",!0),ie("div",{class:$(w(a).e("action"))},[t.loading?(B(),_e(w(He),{key:0,class:$(w(a).is("loading"))},{default:ce(()=>[L(w(xc))]),_:1},8,["class"])):p.value?we(C.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(B(),_e(w(He),{key:0},{default:ce(()=>[(B(),_e(Gt(t.activeActionIcon)))]),_:1})):ve("v-if",!0)]):p.value?ve("v-if",!0):we(C.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(B(),_e(w(He),{key:0},{default:ce(()=>[(B(),_e(Gt(t.inactiveActionIcon)))]),_:1})):ve("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText||C.$slots.active)?(B(),Q("span",{key:1,class:$(m.value)},[we(C.$slots,"active",{},()=>[t.activeIcon?(B(),_e(w(He),{key:0},{default:ce(()=>[(B(),_e(Gt(t.activeIcon)))]),_:1})):ve("v-if",!0),!t.activeIcon&&t.activeText?(B(),Q("span",{key:1,"aria-hidden":!p.value},We(t.activeText),9,l1e)):ve("v-if",!0)])],2)):ve("v-if",!0)],2))}});const vq=sn(u1e),Nk=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},c1e=function(t,e,n,i,r){if(!e&&!i&&(!r||Pe(r)&&!r.length))return t;ot(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=i?null:function(a,l){return r?qH(Co(r),u=>ot(u)?to(a,u):u(a,l,t)):(e!=="$key"&&_t(a)&&"$value"in a&&(a=a.$value),[_t(a)?e?to(a,e):null:a])},s=function(a,l){var u,c,d,f,h,m;if(i)return i(a.value,l.value);for(let g=0,v=(c=(u=a.key)==null?void 0:u.length)!=null?c:0;g<v;g++){if(((d=a.key)==null?void 0:d[g])<((f=l.key)==null?void 0:f[g]))return-1;if(((h=a.key)==null?void 0:h[g])>((m=l.key)==null?void 0:m[g]))return 1}return 0};return t.map((a,l)=>({value:a,index:l,key:o?o(a,l):null})).sort((a,l)=>{let u=s(a,l);return u||(u=a.index-l.index),u*+n}).map(a=>a.value)},bq=function(t,e){let n=null;return t.columns.forEach(i=>{i.id===e&&(n=i)}),n},d1e=function(t,e){let n=null;for(let i=0;i<t.columns.length;i++){const r=t.columns[i];if(r.columnKey===e){n=r;break}}return n||dr("ElTable",`No column matching with column-key: ${e}`),n},DN=function(t,e,n){const i=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return i?bq(t,i[0]):null},vr=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(ot(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let i=t;for(const r of n)i=i[r];return`${i}`}else if(Xe(e))return e.call(null,t);return""},um=function(t,e,n=!1,i="children"){const r=t||[],o={};return r.forEach((s,a)=>{if(o[vr(s,e)]={row:s,index:a},n){const l=s[i];Pe(l)&&Object.assign(o,um(l,e,!0,i))}}),o};function f1e(t,e){const n={};let i;for(i in t)n[i]=t[i];for(i in e)if(Jt(e,i)){const r=e[i];pn(r)||(n[i]=r)}return n}function WR(t){return t===""||pn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function yq(t){return t===""||pn(t)||(t=WR(t),Number.isNaN(t)&&(t=80)),t}function h1e(t){return St(t)?t:ot(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function m1e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function Y_(t,e,n,i,r,o,s){let a=o??0,l=!1;const c=(()=>{if(!s)return t.indexOf(e);const g=vr(e,s);return t.findIndex(v=>vr(v,s)===g)})(),d=c!==-1,f=r?.call(null,e,a),h=g=>{g==="add"?t.push(e):t.splice(c,1),l=!0},m=g=>{let v=0;const p=i?.children&&g[i.children];return p&&Pe(p)&&(v+=p.length,p.forEach(b=>{v+=m(b)})),v};return(!r||f)&&(vi(n)?n&&!d?h("add"):!n&&d&&h("remove"):h(d?"remove":"add")),!i?.checkStrictly&&i?.children&&Pe(e[i.children])&&e[i.children].forEach(g=>{const v=Y_(t,g,n??!d,i,r,a+1,s);a+=m(g)+1,v&&(l=v)}),l}function g1e(t,e,n="children",i="hasChildren",r=!1){const o=a=>!(Pe(a)&&a.length);function s(a,l,u){e(a,l,u),l.forEach(c=>{if(c[i]&&r){e(c,null,u+1);return}const d=c[n];o(d)||s(c,d,u+1)})}t.forEach(a=>{if(a[i]&&r){e(a,null,0);return}const l=a[n];o(l)||s(a,l,0)})}const p1e=(t,e,n,i)=>{const r={strategy:"fixed",...t.popperOptions},o=Xe(i?.tooltipFormatter)?i.tooltipFormatter({row:n,column:i,cellValue:lm(n,i.property).value}):void 0;return yi(o)?{slotContent:o,content:null,...t,popperOptions:r}:{slotContent:null,content:o??e,...t,popperOptions:r}};let Rr=null;function v1e(t,e,n,i,r,o){var s;const a=p1e(t,e,n,i),l={...a,slotContent:void 0};if(Rr?.trigger===r){const m=(s=Rr.vm)==null?void 0:s.component;jH(m?.props,l),m&&a.slotContent&&(m.slots.content=()=>[a.slotContent]);return}Rr?.();const u=o?.refs.tableWrapper,c=u?.dataset.prefix,d=L(Lo,{virtualTriggering:!0,virtualRef:r,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...l},a.slotContent?{content:()=>a.slotContent}:void 0);d.appContext={...o.appContext,...o};const f=document.createElement("div");Tm(d,f),d.component.exposed.onOpen();const h=u?.querySelector(`.${c}-scrollbar__wrap`);Rr=()=>{var m,g;(g=(m=d.component)==null?void 0:m.exposed)!=null&&g.onClose&&d.component.exposed.onClose(),Tm(null,f);const v=Rr;h?.removeEventListener("scroll",v),v.trigger=void 0,v.vm=void 0,Rr=null},Rr.trigger=r??void 0,Rr.vm=d,h?.addEventListener("scroll",Rr)}function wq(t){return t.children?qH(t.children,wq):[t]}function NN(t,e){return t+e.colSpan}const _q=(t,e,n,i)=>{let r=0,o=t;const s=n.states.columns.value;if(i){const l=wq(i[t]);r=s.slice(0,s.indexOf(l[0])).reduce(NN,0),o=r+l.reduce(NN,0)-1}else r=t;let a;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":r>=s.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:o<n.states.fixedLeafColumnsLength.value?a="left":r>=s.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:r,after:o}:{}},qR=(t,e,n,i,r,o=0)=>{const s=[],{direction:a,start:l,after:u}=_q(e,n,i,r);if(a){const c=a==="left";s.push(`${t}-fixed-column--${a}`),c&&u+o===i.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):!c&&l-o===i.states.columns.value.length-i.states.rightFixedLeafColumnsLength.value&&s.push("is-first-column")}return s};function BN(t,e){return t+(PC(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const jR=(t,e,n,i)=>{const{direction:r,start:o=0,after:s=0}=_q(t,e,n,i);if(!r)return;const a={},l=r==="left",u=n.states.columns.value;return l?a.left=u.slice(0,o).reduce(BN,0):a.right=u.slice(s+1).reverse().reduce(BN,0),a},Nm=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function Cq(t){return t.some(e=>yi(e)?!(e.type===xi||e.type===rt&&!Cq(e.children)):!0)?t:null}function b1e(t){const e=Ct(),n=H(!1),i=H([]),r=(u,c)=>{var d;const f=e.store.states.rowExpandable.value;return(d=f?.(u,c))!=null?d:!0};return{updateExpandRows:()=>{const u=t.data.value||[],c=t.rowKey.value;if(n.value)i.value=e.store.states.rowExpandable.value?u.filter(r):u.slice();else if(c){const d=um(i.value,c);i.value=u.filter((f,h)=>{const m=vr(f,c);return!!d[m]&&r(f,h)})}else i.value=[]},toggleRowExpansion:(u,c)=>{const f=(t.data.value||[]).indexOf(u);if(f>-1&&!r(u,f))return;Y_(i.value,u,c,void 0,void 0,void 0,t.rowKey.value)&&e.emit("expand-change",u,i.value.slice())},setExpandRowKeys:u=>{e.store.assertRowKey();const c=t.data.value||[],d=t.rowKey.value,f=um(c,d);i.value=u.reduce((h,m)=>{const g=f[m];return g&&r(g.row,g.index)&&h.push(g.row),h},[])},isRowExpanded:u=>{const c=t.rowKey.value;return c?!!um(i.value,c)[vr(u,c)]:i.value.includes(u)},states:{expandRows:i,defaultExpandAll:n}}}function y1e(t){const e=Ct(),n=H(null),i=H(null),r=u=>{e.store.assertRowKey(),n.value=u,s(u)},o=()=>{n.value=null},s=u=>{var c;const{data:d,rowKey:f}=t,h=i.value;let m=null;f.value&&(m=(c=(w(d)||[]).find(g=>vr(g,f.value)===u))!=null?c:null),i.value=m??null,e.emit("current-change",i.value,h)};return{setCurrentRowKey:r,restoreCurrentRowKey:o,setCurrentRowByKey:s,updateCurrentRow:u=>{const c=i.value;if(u&&u!==c){i.value=u,e.emit("current-change",i.value,c);return}!u&&c&&(i.value=null,e.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=t.rowKey.value,c=t.data.value||[],d=i.value;if(d&&!c.includes(d))if(u){const f=vr(d,u);s(f)}else i.value=null,e.emit("current-change",null,d);else n.value&&(s(n.value),o())},states:{_currentRowKey:n,currentRow:i}}}function w1e(t){const e=H([]),n=H({}),i=H(16),r=H(!1),o=H({}),s=H("hasChildren"),a=H("children"),l=H(!1),u=Ct(),c=M(()=>{if(!t.rowKey.value)return{};const _=t.data.value||[];return f(_)}),d=M(()=>{const _=t.rowKey.value,C=Object.keys(o.value),S={};return C.length&&C.forEach(k=>{if(o.value[k].length){const T={children:[]};o.value[k].forEach(E=>{const x=vr(E,_);T.children.push(x),E[s.value]&&!S[x]&&(S[x]={children:[]})}),S[k]=T}}),S}),f=_=>{const C=t.rowKey.value,S={};return g1e(_,(k,T,E)=>{const x=vr(k,C);Pe(T)?S[x]={children:T.map(P=>vr(P,C)),level:E}:r.value&&(S[x]={children:[],lazy:!0,level:E})},a.value,s.value,r.value),S},h=(_=!1,C)=>{var S,k;C||(C=(S=u.store)==null?void 0:S.states.defaultExpandAll.value);const T=c.value,E=d.value,x=Object.keys(T),P={};if(x.length){const A=w(n),I=[],D=(z,R)=>{if(_)return e.value?C||e.value.includes(R):!!(C||z?.expanded);{const O=C||e.value&&e.value.includes(R);return!!(z?.expanded||O)}};x.forEach(z=>{const R=A[z],O={...T[z]};if(O.expanded=D(R,z),O.lazy){const{loaded:N=!1,loading:F=!1}=R||{};O.loaded=!!N,O.loading=!!F,I.push(z)}P[z]=O});const q=Object.keys(E);r.value&&q.length&&I.length&&q.forEach(z=>{var R;const O=A[z],N=E[z].children;if(I.includes(z)){if(((R=P[z].children)==null?void 0:R.length)!==0)throw new Error("[ElTable]children must be an empty array.");P[z].children=N}else{const{loaded:F=!1,loading:j=!1}=O||{};P[z]={lazy:!0,loaded:!!F,loading:!!j,expanded:D(O,z),children:N,level:void 0}}})}n.value=P,(k=u.store)==null||k.updateTableScrollY()};Se(()=>e.value,()=>{h(!0)}),Se(()=>c.value,()=>{h()}),Se(()=>d.value,()=>{h()});const m=_=>{e.value=_,h()},g=_=>r.value&&_&&"loaded"in _&&!_.loaded,v=(_,C)=>{u.store.assertRowKey();const S=t.rowKey.value,k=vr(_,S),T=k&&n.value[k];if(k&&T&&"expanded"in T){const E=T.expanded;C=pn(C)?!T.expanded:C,n.value[k].expanded=C,E!==C&&u.emit("expand-change",_,C),C&&g(T)&&b(_,k,T),u.store.updateTableScrollY()}},p=_=>{u.store.assertRowKey();const C=t.rowKey.value,S=vr(_,C),k=n.value[S];g(k)?b(_,S,k):v(_,void 0)},b=(_,C,S)=>{const{load:k}=u.props;k&&!n.value[C].loaded&&(n.value[C].loading=!0,k(_,S,T=>{if(!Pe(T))throw new TypeError("[ElTable] data must be an array");n.value[C].loading=!1,n.value[C].loaded=!0,n.value[C].expanded=!0,T.length&&(o.value[C]=T),u.emit("expand-change",_,!0)}))};return{loadData:b,loadOrToggle:p,toggleTreeExpansion:v,updateTreeExpandKeys:m,updateTreeData:h,updateKeyChildren:(_,C)=>{const{lazy:S,rowKey:k}=u.props;if(S){if(!k)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[_]&&(o.value[_]=C)}},normalize:f,states:{expandRowKeys:e,treeData:n,indent:i,lazy:r,lazyTreeNodeMap:o,lazyColumnIdentifier:s,childrenColumnName:a,checkStrictly:l}}}const _1e=(t,e)=>{const n=e.sortingColumn;return!n||ot(n.sortable)?t:c1e(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},Vw=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,Vw(n.children)):e.push(n)}),e};function C1e(){var t;const e=Ct(),{size:n}=Sr((t=e.proxy)==null?void 0:t.$props),i=H(null),r=H([]),o=H([]),s=H(!1),a=H([]),l=H([]),u=H([]),c=H([]),d=H([]),f=H([]),h=H([]),m=H([]),g=[],v=H(0),p=H(0),b=H(0),y=H(!1),_=H([]),C=H(!1),S=H(!1),k=H(null),T=H(null),E=H({}),x=H(null),P=H(null),A=H(null),I=H(null),D=H(null),q=M(()=>i.value?um(_.value,i.value):void 0);Se(r,()=>{var Je;e.state&&(N(!1),e.props.tableLayout==="auto"&&((Je=e.refs.tableHeaderRef)==null||Je.updateFixedColumnStyle()))},{deep:!0});const z=()=>{if(!i.value)throw new Error("[ElTable] prop row-key is required")},R=Je=>{var kt;(kt=Je.children)==null||kt.forEach(Et=>{Et.fixed=Je.fixed,R(Et)})},O=()=>{a.value.forEach(Ve=>{R(Ve)}),c.value=a.value.filter(Ve=>[!0,"left"].includes(Ve.fixed));const Je=a.value.find(Ve=>Ve.type==="selection");let kt;Je&&Je.fixed!=="right"&&!c.value.includes(Je)&&a.value.indexOf(Je)===0&&c.value.length&&(c.value.unshift(Je),kt=!0),d.value=a.value.filter(Ve=>Ve.fixed==="right");const Et=a.value.filter(Ve=>(kt?Ve.type!=="selection":!0)&&!Ve.fixed);l.value=Array.from(c.value).concat(Et).concat(d.value);const ge=Vw(Et),Le=Vw(c.value),de=Vw(d.value);v.value=ge.length,p.value=Le.length,b.value=de.length,u.value=Array.from(Le).concat(ge).concat(de),s.value=c.value.length>0||d.value.length>0},N=(Je,kt=!1)=>{Je&&O(),kt?e.state.doLayout():e.state.debouncedUpdateLayout()},F=Je=>q.value?!!q.value[vr(Je,i.value)]:_.value.includes(Je),j=()=>{y.value=!1;const Je=_.value;_.value=[],Je.length&&e.emit("selection-change",[])},U=()=>{var Je,kt;let Et;if(i.value){Et=[];const ge=(kt=(Je=e?.store)==null?void 0:Je.states)==null?void 0:kt.childrenColumnName.value,Le=um(r.value,i.value,!0,ge);for(const de in q.value)Jt(q.value,de)&&!Le[de]&&Et.push(q.value[de].row)}else Et=_.value.filter(ge=>!r.value.includes(ge));if(Et.length){const ge=_.value.filter(Le=>!Et.includes(Le));_.value=ge,e.emit("selection-change",ge.slice())}},W=()=>(_.value||[]).slice(),J=(Je,kt,Et=!0,ge=!1)=>{var Le,de,Ve,gt;const an={children:(de=(Le=e?.store)==null?void 0:Le.states)==null?void 0:de.childrenColumnName.value,checkStrictly:(gt=(Ve=e?.store)==null?void 0:Ve.states)==null?void 0:gt.checkStrictly.value};if(Y_(_.value,Je,kt,an,ge?void 0:k.value,r.value.indexOf(Je),i.value)){const uo=(_.value||[]).slice();Et&&e.emit("select",uo,Je),e.emit("selection-change",uo)}},ne=()=>{var Je,kt;const Et=S.value?!y.value:!(y.value||_.value.length);y.value=Et;let ge=!1,Le=0;const de=(kt=(Je=e?.store)==null?void 0:Je.states)==null?void 0:kt.rowKey.value,{childrenColumnName:Ve}=e.store.states,gt={children:Ve.value,checkStrictly:!1};r.value.forEach((an,Si)=>{const uo=Si+Le;Y_(_.value,an,Et,gt,k.value,uo,de)&&(ge=!0),Le+=X(vr(an,de))}),ge&&e.emit("selection-change",_.value?_.value.slice():[]),e.emit("select-all",(_.value||[]).slice())},he=()=>{var Je;if(((Je=r.value)==null?void 0:Je.length)===0){y.value=!1;return}const{childrenColumnName:kt}=e.store.states;let Et=0,ge=0;const Le=Ve=>{var gt;for(const an of Ve){const Si=k.value&&k.value.call(null,an,Et);if(F(an))ge++;else if(!k.value||Si)return!1;if(Et++,(gt=an[kt.value])!=null&&gt.length&&!Le(an[kt.value]))return!1}return!0},de=Le(r.value||[]);y.value=ge===0?!1:de},X=Je=>{var kt;if(!e||!e.store)return 0;const{treeData:Et}=e.store.states;let ge=0;const Le=(kt=Et.value[Je])==null?void 0:kt.children;return Le&&(ge+=Le.length,Le.forEach(de=>{ge+=X(de)})),ge},se=(Je,kt)=>{const Et={};return Co(Je).forEach(ge=>{E.value[ge.id]=kt,Et[ge.columnKey||ge.id]=kt}),Et},re=(Je,kt,Et)=>{P.value&&P.value!==Je&&(P.value.order=null),P.value=Je,A.value=kt,I.value=Et},ee=()=>{let Je=w(o);Object.keys(E.value).forEach(kt=>{const Et=E.value[kt];if(!Et||Et.length===0)return;const ge=bq({columns:u.value},kt);ge&&ge.filterMethod&&(Je=Je.filter(Le=>Et.some(de=>ge.filterMethod.call(null,de,Le,ge))))}),x.value=Je},te=()=>{var Je;r.value=_1e((Je=x.value)!=null?Je:[],{sortingColumn:P.value,sortProp:A.value,sortOrder:I.value})},V=(Je=void 0)=>{Je?.filter||ee(),te()},K=Je=>{const{tableHeaderRef:kt}=e.refs;if(!kt)return;const Et=Object.assign({},kt.filterPanels),ge=Object.keys(Et);if(ge.length)if(ot(Je)&&(Je=[Je]),Pe(Je)){const Le=Je.map(de=>d1e({columns:u.value},de));ge.forEach(de=>{const Ve=Le.find(gt=>gt.id===de);Ve&&(Ve.filteredValue=[])}),e.store.commit("filterChange",{column:Le,values:[],silent:!0,multi:!0})}else ge.forEach(Le=>{const de=u.value.find(Ve=>Ve.id===Le);de&&(de.filteredValue=[])}),E.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},G=()=>{P.value&&(re(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ye,toggleRowExpansion:be,updateExpandRows:Ce,states:Y,isRowExpanded:Z}=b1e({data:r,rowKey:i}),{updateTreeExpandKeys:ae,toggleTreeExpansion:pe,updateTreeData:je,updateKeyChildren:Ie,loadOrToggle:fe,states:Te}=w1e({data:r,rowKey:i}),{updateCurrentRowData:et,updateCurrentRow:Re,setCurrentRowKey:ze,states:Ke}=y1e({data:r,rowKey:i});return{assertRowKey:z,updateColumns:O,scheduleLayout:N,isSelected:F,clearSelection:j,cleanSelection:U,getSelectionRows:W,toggleRowSelection:J,_toggleAllSelection:ne,toggleAllSelection:null,updateAllSelected:he,updateFilters:se,updateCurrentRow:Re,updateSort:re,execFilter:ee,execSort:te,execQuery:V,clearFilter:K,clearSort:G,toggleRowExpansion:be,setExpandRowKeysAdapter:Je=>{ye(Je),ae(Je)},setCurrentRowKey:ze,toggleRowExpansionAdapter:(Je,kt)=>{u.value.some(({type:ge})=>ge==="expand")?be(Je,kt):pe(Je,kt)},isRowExpanded:Z,updateExpandRows:Ce,updateCurrentRowData:et,loadOrToggle:fe,updateTreeData:je,updateKeyChildren:Ie,states:{tableSize:n,rowKey:i,data:r,_data:o,isComplex:s,_columns:a,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:h,rightFixedLeafColumns:m,updateOrderFns:g,leafColumnsLength:v,fixedLeafColumnsLength:p,rightFixedLeafColumnsLength:b,isAllSelected:y,selection:_,reserveSelection:C,selectOnIndeterminate:S,selectable:k,rowExpandable:T,filters:E,filteredData:x,sortingColumn:P,sortProp:A,sortOrder:I,hoverRow:D,...Y,...Te,...Ke}}}function A2(t,e){return t.map(n=>{var i;return n.id===e.id?e:((i=n.children)!=null&&i.length&&(n.children=A2(n.children,e)),n)})}function P2(t){t.forEach(e=>{var n,i;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(i=e.children)!=null&&i.length&&P2(e.children)}),t.sort((e,n)=>e.no-n.no)}function S1e(){const t=Ct(),e=C1e(),n=De("table"),{t:i}=Qt();return{ns:n,t:i,...e,mutations:{setData(a,l){const u=w(a._data)!==l;a.data.value=l,a._data.value=l,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),w(a.reserveSelection)?t.store.assertRowKey():u?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,l,u,c){var d;const f=w(a._columns);let h=[];u?(u&&!u.children&&(u.children=[]),(d=u.children)==null||d.push(l),h=A2(f,u)):(f.push(l),h=f),P2(h),a._columns.value=h,a.updateOrderFns.push(c),l.type==="selection"&&(a.selectable.value=l.selectable,a.reserveSelection.value=l.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,l){var u;((u=l.getColumnIndex)==null?void 0:u.call(l))!==l.no&&(P2(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,l,u,c){var d;const f=w(a._columns)||[];if(u)(d=u.children)==null||d.splice(u.children.findIndex(m=>m.id===l.id),1),Ye(()=>{var m;((m=u.children)==null?void 0:m.length)===0&&delete u.children}),a._columns.value=A2(f,u);else{const m=f.indexOf(l);m>-1&&(f.splice(m,1),a._columns.value=f)}const h=a.updateOrderFns.indexOf(c);h>-1&&a.updateOrderFns.splice(h,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,l){const{prop:u,order:c,init:d}=l;if(u){const f=w(a.columns).find(h=>h.property===u);f&&(f.order=c,t.store.updateSort(f,u,c),t.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(a,l){const{sortingColumn:u,sortProp:c,sortOrder:d}=a,f=w(u),h=w(c),m=w(d);PC(m)&&(a.sortingColumn.value=null,a.sortProp.value=null);const g={filter:!0};t.store.execQuery(g),(!l||!(l.silent||l.init))&&t.emit("sort-change",{column:f,prop:h,order:m}),t.store.updateTableScrollY()},filterChange(a,l){const{column:u,values:c,silent:d}=l,f=t.store.updateFilters(u,c);t.store.execQuery(),d||t.emit("filter-change",f),t.store.updateTableScrollY()},toggleAllSelection(){var a,l;(l=(a=t.store).toggleAllSelection)==null||l.call(a)},rowSelectedChanged(a,l){t.store.toggleRowSelection(l),t.store.updateAllSelected()},setHoverRow(a,l){a.hoverRow.value=l},setCurrentRow(a,l){t.store.updateCurrentRow(l)}},commit:function(a,...l){const u=t.store.mutations;if(u[a])u[a].apply(t,[t.store.states,...l]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){Ye(()=>t.layout.updateScrollY.apply(t.layout))}}}const KR={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function k1e(t,e){if(!t)throw new Error("Table is required.");const n=S1e();return n.toggleAllSelection=ul(n._toggleAllSelection,10),Object.keys(KR).forEach(i=>{Sq(kq(e,i),i,n)}),T1e(n,e),n}function T1e(t,e){Object.keys(KR).forEach(n=>{Se(()=>kq(e,n),i=>{Sq(i,n,t)})})}function Sq(t,e,n){let i=t,r=KR[e];_t(r)&&(i=i||r.default,r=r.key),n.states[r].value=i}function kq(t,e){if(e.includes(".")){const n=e.split(".");let i=t;return n.forEach(r=>{i=i[r]}),i}else return t[e]}var E1e=Object.defineProperty,x1e=(t,e,n)=>e in t?E1e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mr=(t,e,n)=>x1e(t,typeof e!="symbol"?e+"":e,n);class A1e{constructor(e){mr(this,"observers"),mr(this,"table"),mr(this,"store"),mr(this,"columns"),mr(this,"fit"),mr(this,"showHeader"),mr(this,"height"),mr(this,"scrollX"),mr(this,"scrollY"),mr(this,"bodyWidth"),mr(this,"fixedWidth"),mr(this,"rightFixedWidth"),mr(this,"tableHeight"),mr(this,"headerHeight"),mr(this,"appendHeight"),mr(this,"footerHeight"),mr(this,"gutterWidth"),this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=H(null),this.scrollX=H(!1),this.scrollY=H(!1),this.bodyWidth=H(null),this.fixedWidth=H(null),this.rightFixedWidth=H(null),this.gutterWidth=0;for(const n in e)Jt(e,n)&&(rn(this[n])?this[n].value=e[n]:this[n]=e[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(PC(e))return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&n?.wrapRef){let i=!0;const r=this.scrollY.value;return i=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=i,r!==i}return!1}setHeight(e,n="height"){if(!Zt)return;const i=this.table.vnode.el;if(e=h1e(e),this.height.value=Number(e),!i&&(e||e===0)){Ye(()=>this.setHeight(e,n));return}i&&St(e)?(i.style[n]=`${e}px`,this.updateElsHeight()):i&&ot(e)&&(i.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(i=>{i.isColumnGroup?e.push.apply(e,i.columns):e.push(i)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let n=e;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){var e;if(!Zt)return;const n=this.fit,i=(e=this.table.vnode.el)==null?void 0:e.clientWidth;let r=0;const o=this.getFlattenColumns(),s=o.filter(u=>!St(u.width));if(o.forEach(u=>{St(u.width)&&u.realWidth&&(u.realWidth=null)}),s.length>0&&n){if(o.forEach(u=>{r+=Number(u.width||u.minWidth||80)}),r<=i){this.scrollX.value=!1;const u=i-r;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+u;else{const c=s.reduce((h,m)=>h+Number(m.minWidth||80),0),d=u/c;let f=0;s.forEach((h,m)=>{if(m===0)return;const g=Math.floor(Number(h.minWidth||80)*d);f+=g,h.realWidth=Number(h.minWidth||80)+g}),s[0].realWidth=Number(s[0].minWidth||80)+u-f}}else this.scrollX.value=!0,s.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(r,i),this.table.state.resizeState.value.width=this.bodyWidth.value}else o.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),r+=u.realWidth}),this.scrollX.value=r>i,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let u=0;a.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let u=0;l.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}notifyObservers(e){this.observers.forEach(i=>{var r,o;switch(e){case"columns":(r=i.state)==null||r.onColumnsChange(this);break;case"scrollable":(o=i.state)==null||o.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}var P1e=le({name:"ElTableFilterPanel",components:{ElCheckbox:Ac,ElCheckboxGroup:gW,ElScrollbar:gu,ElTooltip:Lo,ElIcon:He,ArrowDown:zc,ArrowUp:sR},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:Mn.appendTo},setup(t){const e=Ct(),{t:n}=Qt(),i=De("table-filter"),r=e?.parent;t.column&&!r.filterPanels.value[t.column.id]&&(r.filterPanels.value[t.column.id]=e);const o=H(null),s=H(null),a=H(0),l=M(()=>t.column&&t.column.filters),u=M(()=>t.column&&t.column.filterClassName?`${i.b()} ${t.column.filterClassName}`:i.b()),c=M({get:()=>{var k;return(((k=t.column)==null?void 0:k.filteredValue)||[])[0]},set:k=>{d.value&&(Is(k)?d.value.splice(0,1):d.value.splice(0,1,k))}}),d=M({get(){return t.column?t.column.filteredValue||[]:[]},set(k){var T;t.column&&((T=t.upDataColumn)==null||T.call(t,"filteredValue",k))}}),f=M(()=>t.column?t.column.filterMultiple:!0),h=k=>k.value===c.value,m=()=>{var k;(k=o.value)==null||k.onClose()},g=()=>{b(d.value),m()},v=()=>{d.value=[],b(d.value),m()},p=(k,T)=>{c.value=k,a.value=T,Is(k)?b([]):b(d.value),m()},b=k=>{var T,E;(T=t.store)==null||T.commit("filterChange",{column:t.column,values:k}),(E=t.store)==null||E.updateAllSelected()},y=()=>{var k,T;(k=s.value)==null||k.focus(),!f.value&&C(),t.column&&((T=t.upDataColumn)==null||T.call(t,"filterOpened",!0))},_=()=>{var k;t.column&&((k=t.upDataColumn)==null||k.call(t,"filterOpened",!1))},C=()=>{if(Is(c)){a.value=0;return}const k=(l.value||[]).findIndex(T=>T.value===c.value);a.value=k>=0?k+1:0};return{multiple:f,filterClassName:u,filteredValue:d,filterValue:c,filters:l,handleConfirm:g,handleReset:v,handleSelect:p,isPropAbsent:Is,isActive:h,t:n,ns:i,tooltipRef:o,rootRef:s,checkedIndex:a,handleShowTooltip:y,handleHideTooltip:_,handleKeydown:k=>{var T,E;const x=Bn(k),P=(l.value?l.value.length:0)+1;let A=a.value,I=!0;switch(x){case Me.down:case Me.right:A=(A+1)%P;break;case Me.up:case Me.left:A=(A-1+P)%P;break;case Me.tab:m(),I=!1;break;case Me.enter:case Me.space:if(A===0)p(null,0);else{const D=(l.value||[])[A-1];D.value&&p(D.value,A)}break;default:I=!1;break}I&&k.preventDefault(),a.value=A,(E=(T=s.value)==null?void 0:T.querySelector(`.${i.e("list-item")}:nth-child(${A+1})`))==null||E.focus()}}}});const I1e=["disabled"],R1e=["tabindex","aria-checked"],M1e=["tabindex","aria-checked","onClick"],O1e=["aria-label"];function L1e(t,e,n,i,r,o){const s=Bt("el-checkbox"),a=Bt("el-checkbox-group"),l=Bt("el-scrollbar"),u=Bt("arrow-up"),c=Bt("arrow-down"),d=Bt("el-icon"),f=Bt("el-tooltip");return B(),_e(f,{ref:"tooltipRef",offset:0,placement:t.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo,onShow:t.handleShowTooltip,onHide:t.handleHideTooltip},{content:ce(()=>[t.multiple?(B(),Q("div",{key:0,ref:"rootRef",tabindex:"-1",class:$(t.ns.e("multiple"))},[ie("div",{class:$(t.ns.e("content"))},[L(l,{"wrap-class":t.ns.e("wrap")},{default:ce(()=>[L(a,{modelValue:t.filteredValue,"onUpdate:modelValue":e[0]||(e[0]=h=>t.filteredValue=h),class:$(t.ns.e("checkbox-group"))},{default:ce(()=>[(B(!0),Q(rt,null,gn(t.filters,h=>(B(),_e(s,{key:h.value,value:h.value},{default:ce(()=>[dt(We(h.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),ie("div",{class:$(t.ns.e("bottom"))},[ie("button",{class:$(t.ns.is("disabled",t.filteredValue.length===0)),disabled:t.filteredValue.length===0,type:"button",onClick:e[1]||(e[1]=(...h)=>t.handleConfirm&&t.handleConfirm(...h))},We(t.t("el.table.confirmFilter")),11,I1e),ie("button",{type:"button",onClick:e[2]||(e[2]=(...h)=>t.handleReset&&t.handleReset(...h))},We(t.t("el.table.resetFilter")),1)],2)],2)):(B(),Q("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:$(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...h)=>t.handleKeydown&&t.handleKeydown(...h))},[ie("li",{role:"radio",class:$([t.ns.e("list-item"),t.ns.is("active",t.isPropAbsent(t.filterValue))]),tabindex:t.checkedIndex===0?0:-1,"aria-checked":t.isPropAbsent(t.filterValue),onClick:e[3]||(e[3]=h=>t.handleSelect(null,0))},We(t.t("el.table.clearFilter")),11,R1e),(B(!0),Q(rt,null,gn(t.filters,(h,m)=>(B(),Q("li",{key:h.value,role:"radio",class:$([t.ns.e("list-item"),t.ns.is("active",t.isActive(h))]),tabindex:t.checkedIndex===m+1?0:-1,"aria-checked":t.isActive(h),onClick:g=>t.handleSelect(h.value,m+1)},We(h.text),11,M1e))),128))],34))]),default:ce(()=>{var h;return[ie("button",{type:"button",class:$(`${t.ns.namespace.value}-table__column-filter-trigger`),"aria-label":t.t("el.table.filterLabel",{column:((h=t.column)==null?void 0:h.label)||""})},[L(d,null,{default:ce(()=>[we(t.$slots,"filter-icon",{},()=>{var m;return[(m=t.column)!=null&&m.filterOpened?(B(),_e(u,{key:0})):(B(),_e(c,{key:1}))]})]),_:3})],10,O1e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var D1e=Tr(P1e,[["render",L1e]]);function GR(t){const e=Ct();yC(()=>{n.value.addObserver(e)}),Pt(()=>{i(n.value),r(n.value)}),ku(()=>{i(n.value),r(n.value)}),Fc(()=>{n.value.removeObserver(e)});const n=M(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),i=o=>{var s;const a=((s=t.vnode.el)==null?void 0:s.querySelectorAll("colgroup > col"))||[];if(!a.length)return;const l=o.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,d=a.length;c<d;c++){const f=a[c],h=f.getAttribute("name"),m=u[h];m&&f.setAttribute("width",m.realWidth||m.width)}},r=o=>{var s,a;const l=((s=t.vnode.el)==null?void 0:s.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=l.length;c<d;c++)l[c].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const u=((a=t.vnode.el)==null?void 0:a.querySelectorAll("th.gutter"))||[];for(let c=0,d=u.length;c<d;c++){const f=u[c];f.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",f.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:i,onScrollableChange:r}}const _a=Symbol("ElTable");function N1e(t,e){const n=Ct(),i=Ne(_a),r=g=>{g.stopPropagation()},o=(g,v)=>{!v.filters&&v.sortable?m(g,v,!1):v.filterable&&!v.sortable&&r(g),i?.emit("header-click",v,g)},s=(g,v)=>{i?.emit("header-contextmenu",v,g)},a=H(null),l=H(!1),u=H(),c=(g,v)=>{var p,b;if(Zt&&!(v.children&&v.children.length>0)&&a.value&&t.border&&a.value.id===v.id){l.value=!0;const y=i;e("set-drag-visible",!0);const _=y?.vnode.el,C=_?.getBoundingClientRect().left,S=(b=(p=n?.vnode)==null?void 0:p.el)==null?void 0:b.querySelector(`th.${v.id}`),k=S.getBoundingClientRect(),T=k.left-C+30;Qs(S,"noclick"),u.value={startMouseLeft:g.clientX,startLeft:k.right-C,startColumnLeft:k.left-C,tableLeft:C};const E=y?.refs.resizeProxy;E.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const x=A=>{const I=A.clientX-u.value.startMouseLeft,D=u.value.startLeft+I;E.style.left=`${Math.max(T,D)}px`},P=()=>{if(l.value){const{startColumnLeft:A,startLeft:I}=u.value,q=Number.parseInt(E.style.left,10)-A;v.width=v.realWidth=q,y?.emit("header-dragend",v.width,I-A,v,g),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,u.value=void 0,e("set-drag-visible",!1)}document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{os(S,"noclick")},0)};document.addEventListener("mousemove",x),document.addEventListener("mouseup",P)}},d=(g,v)=>{var p;if(!t.border||v.children&&v.children.length>0)return;const b=g.target,y=Qo(b)?b.closest("th"):null;if(!y)return;const _=Xa(y,"is-sortable");if(_){const x=l.value?"col-resize":"";y.style.cursor=x;const P=y.querySelector(".caret-wrapper");P&&(P.style.cursor=x)}if(!v.resizable||l.value){a.value=null;return}const C=y.getBoundingClientRect(),S=((p=y.parentNode)==null?void 0:p.lastElementChild)===y,k=t.allowDragLastColumn||!S,T=C.width>12&&C.right-g.clientX<8&&k,E=T?"col-resize":"";document.body.style.cursor=E,a.value=T?v:null,_&&(y.style.cursor=E)},f=()=>{!Zt||l.value||(document.body.style.cursor="")},h=({order:g,sortOrders:v})=>{if(g==="")return v[0];const p=v.indexOf(g||null);return v[p>v.length-2?0:p+1]},m=(g,v,p)=>{var b;g.stopPropagation();const y=v.order===p?null:p||h(v),_=(b=g.target)==null?void 0:b.closest("th");if(_&&Xa(_,"noclick")){os(_,"noclick");return}if(!v.sortable)return;const C=g.currentTarget;if(["ascending","descending"].some(x=>Xa(C,x)&&!v.sortOrders.includes(x)))return;const S=t.store.states;let k=S.sortProp.value,T;const E=S.sortingColumn.value;(E!==v||E===v&&PC(E.order))&&(E&&(E.order=null),S.sortingColumn.value=v,k=v.property),y?T=v.order=y:T=v.order=null,S.sortProp.value=k,S.sortOrder.value=T,i?.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:m,handleFilterClick:r}}function B1e(t){const e=Ne(_a),n=De("table");return{getHeaderRowStyle:a=>{const l=e?.props.headerRowStyle;return Xe(l)?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],u=e?.props.headerRowClassName;return ot(u)?l.push(u):Xe(u)&&l.push(u.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,u,c)=>{var d;let f=(d=e?.props.headerCellStyle)!=null?d:{};Xe(f)&&(f=f.call(null,{rowIndex:a,columnIndex:l,row:u,column:c}));const h=jR(l,c.fixed,t.store,u);return Nm(h,"left"),Nm(h,"right"),Object.assign({},f,h)},getHeaderCellClass:(a,l,u,c)=>{const d=qR(n.b(),l,c.fixed,t.store,u),f=[c.id,c.order,c.headerAlign,c.className,c.labelClassName,...d];c.children||f.push("is-leaf"),c.sortable&&f.push("is-sortable");const h=e?.props.headerCellClassName;return ot(h)?f.push(h):Xe(h)&&f.push(h.call(null,{rowIndex:a,columnIndex:l,row:u,column:c})),f.push(n.e("cell")),f.filter(m=>!!m).join(" ")}}}const Tq=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,Tq(n.children))):e.push(n)}),e},Eq=t=>{let e=1;const n=(o,s)=>{if(s&&(o.level=s.level+1,e<o.level&&(e=o.level)),o.children){let a=0;o.children.forEach(l=>{n(l,o),a+=l.colSpan}),o.colSpan=a}else o.colSpan=1};t.forEach(o=>{o.level=1,n(o,void 0)});const i=[];for(let o=0;o<e;o++)i.push([]);return Tq(t).forEach(o=>{o.children?(o.rowSpan=1,o.children.forEach(s=>s.isSubColumn=!0)):o.rowSpan=e-o.level+1,i[o.level-1].push(o)}),i};function V1e(t){const e=Ne(_a),n=M(()=>Eq(t.store.states.originColumns.value));return{isGroup:M(()=>{const o=n.value.length>1;return o&&e&&(e.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),e?.store.commit("toggleAllSelection")},columnRows:n}}var F1e=le({name:"ElTableHeader",components:{ElCheckbox:Ac},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(t,{emit:e}){const n=Ct(),i=Ne(_a),r=De("table"),o=H({}),{onColumnsChange:s,onScrollableChange:a}=GR(i),l=i?.props.tableLayout==="auto",u=on(new Map),c=H();let d;const f=()=>{d=setTimeout(()=>{u.size>0&&(u.forEach((A,I)=>{const D=c.value.querySelector(`.${I.replace(/\s/g,".")}`);if(D){const q=D.getBoundingClientRect().width;A.width=q||A.width}}),u.clear())})};Se(u,f),Sn(()=>{d&&(clearTimeout(d),d=void 0)}),Pt(async()=>{await Ye(),await Ye();const{prop:A,order:I}=t.defaultSort;i?.store.commit("sort",{prop:A,order:I,init:!0}),f()});const{handleHeaderClick:h,handleHeaderContextMenu:m,handleMouseDown:g,handleMouseMove:v,handleMouseOut:p,handleSortClick:b,handleFilterClick:y}=N1e(t,e),{getHeaderRowStyle:_,getHeaderRowClass:C,getHeaderCellStyle:S,getHeaderCellClass:k}=B1e(t),{isGroup:T,toggleAllSelection:E,columnRows:x}=V1e(t),{t:P}=Qt();return n.state={onColumnsChange:s,onScrollableChange:a},n.filterPanels=o,{ns:r,t:P,filterPanels:o,onColumnsChange:s,onScrollableChange:a,columnRows:x,getHeaderRowClass:C,getHeaderRowStyle:_,getHeaderCellClass:k,getHeaderCellStyle:S,handleHeaderClick:h,handleHeaderContextMenu:m,handleMouseDown:g,handleMouseMove:v,handleMouseOut:p,handleSortClick:b,handleFilterClick:y,isGroup:T,toggleAllSelection:E,saveIndexSelection:u,isTableLayoutAuto:l,theadRef:c,updateFixedColumnStyle:f}},render(){const{ns:t,t:e,isGroup:n,columnRows:i,getHeaderCellStyle:r,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:a,handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleSortClick:f,handleMouseOut:h,store:m,$parent:g,saveIndexSelection:v,isTableLayoutAuto:p}=this;let b=1;return nt("thead",{ref:"theadRef",class:t.is("group",n)},i.map((y,_)=>nt("tr",{class:s(_),key:_,style:a(_)},y.map((C,S)=>{C.rowSpan>b&&(b=C.rowSpan);const k=o(_,S,y,C);return p&&C.fixed&&v.set(k,C),nt("th",{class:k,colspan:C.colSpan,key:`${C.id}-thead`,rowspan:C.rowSpan,scope:C.colSpan>1?"colgroup":"col",ariaSort:C.sortable?C.order:void 0,style:r(_,S,y,C),onClick:T=>{var E;(E=T.currentTarget)!=null&&E.classList.contains("noclick")||l(T,C)},onContextmenu:T=>u(T,C),onMousedown:T=>c(T,C),onMousemove:T=>d(T,C),onMouseout:h},[nt("div",{class:["cell",C.filteredValue&&C.filteredValue.length>0?"highlight":""]},[C.renderHeader?C.renderHeader({column:C,$index:S,store:m,_self:g}):C.label,C.sortable&&nt("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:C.label||""}),onClick:T=>f(T,C)},[nt("i",{onClick:T=>f(T,C,"ascending"),class:"sort-caret ascending"}),nt("i",{onClick:T=>f(T,C,"descending"),class:"sort-caret descending"})]),C.filterable&&nt(D1e,{store:m,placement:C.filterPlacement||"bottom-start",appendTo:g?.appendFilterPanelTo,column:C,upDataColumn:(T,E)=>{C[T]=E}},{"filter-icon":()=>C.renderFilterIcon?C.renderFilterIcon({filterOpened:C.filterOpened}):null})])])}))))}});function Bk(t,e,n=.03){return t-e>n}function $1e(t){const e=Ne(_a),n=H(""),i=H(nt("div")),r=(m,g,v)=>{var p,b,y;const _=e,C=Nk(m);let S=null;const k=(p=_?.vnode.el)==null?void 0:p.dataset.prefix;C&&(S=DN({columns:(y=(b=t.store)==null?void 0:b.states.columns.value)!=null?y:[]},C,k),S&&_?.emit(`cell-${v}`,g,S,C,m)),_?.emit(`row-${v}`,g,S,m)},o=(m,g)=>{r(m,g,"dblclick")},s=(m,g)=>{var v;(v=t.store)==null||v.commit("setCurrentRow",g),r(m,g,"click")},a=(m,g)=>{r(m,g,"contextmenu")},l=ul(m=>{var g;(g=t.store)==null||g.commit("setHoverRow",m)},30),u=ul(()=>{var m;(m=t.store)==null||m.commit("setHoverRow",null)},30),c=m=>{const g=window.getComputedStyle(m,null),v=Number.parseInt(g.paddingLeft,10)||0,p=Number.parseInt(g.paddingRight,10)||0,b=Number.parseInt(g.paddingTop,10)||0,y=Number.parseInt(g.paddingBottom,10)||0;return{left:v,right:p,top:b,bottom:y}},d=(m,g,v)=>{var p;let b=(p=g?.target)==null?void 0:p.parentNode;for(;m>1&&(b=b?.nextSibling,!(!b||b.nodeName!=="TR"));)v(b,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:o,handleClick:s,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:u,handleCellMouseEnter:(m,g,v)=>{var p,b,y,_,C,S,k,T,E;if(!e)return;const x=e,P=Nk(m),A=(p=x?.vnode.el)==null?void 0:p.dataset.prefix;let I=null;if(P){if(I=DN({columns:(y=(b=t.store)==null?void 0:b.states.columns.value)!=null?y:[]},P,A),!I)return;P.rowSpan>1&&d(P.rowSpan,m,Qs);const he=x.hoverState={cell:P,column:I,row:g};x?.emit("cell-mouse-enter",he.row,he.column,he.cell,m)}if(!v){((_=Rr)==null?void 0:_.trigger)===P&&((C=Rr)==null||C());return}const D=m.target.querySelector(".cell");if(!(Xa(D,`${A}-tooltip`)&&D.childNodes.length&&((S=D.textContent)!=null&&S.trim())))return;const q=document.createRange();q.setStart(D,0),q.setEnd(D,D.childNodes.length);const{width:z,height:R}=q.getBoundingClientRect(),{width:O,height:N}=D.getBoundingClientRect(),{top:F,left:j,right:U,bottom:W}=c(D),J=j+U,ne=F+W;Bk(z+J,O)||Bk(R+ne,N)||Bk(D.scrollWidth,O)?v1e(v,(k=P?.innerText||P?.textContent)!=null?k:"",g,I,P,x):((T=Rr)==null?void 0:T.trigger)===P&&((E=Rr)==null||E())},handleCellMouseLeave:m=>{const g=Nk(m);if(!g)return;g.rowSpan>1&&d(g.rowSpan,m,os);const v=e?.hoverState;e?.emit("cell-mouse-leave",v?.row,v?.column,v?.cell,m)},tooltipContent:n,tooltipTrigger:i}}function z1e(t){const e=Ne(_a),n=De("table");return{getRowStyle:(u,c)=>{const d=e?.props.rowStyle;return Xe(d)?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c,d)=>{var f;const h=[n.e("row")];e?.props.highlightCurrentRow&&u===((f=t.store)==null?void 0:f.states.currentRow.value)&&h.push("current-row"),t.stripe&&d%2===1&&h.push(n.em("row","striped"));const m=e?.props.rowClassName;return ot(m)?h.push(m):Xe(m)&&h.push(m.call(null,{row:u,rowIndex:c})),h},getCellStyle:(u,c,d,f)=>{const h=e?.props.cellStyle;let m=h??{};Xe(h)&&(m=h.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const g=jR(c,t?.fixed,t.store);return Nm(g,"left"),Nm(g,"right"),Object.assign({},m,g)},getCellClass:(u,c,d,f,h)=>{const m=qR(n.b(),c,t?.fixed,t.store,void 0,h),g=[f.id,f.align,f.className,...m],v=e?.props.cellClassName;return ot(v)?g.push(v):Xe(v)&&g.push(v.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),g.push(n.e("cell")),g.filter(p=>!!p).join(" ")},getSpan:(u,c,d,f)=>{let h=1,m=1;const g=e?.props.spanMethod;if(Xe(g)){const v=g({row:u,column:c,rowIndex:d,columnIndex:f});Pe(v)?(h=v[0],m=v[1]):_t(v)&&(h=v.rowspan,m=v.colspan)}return{rowspan:h,colspan:m}},getColspanRealWidth:(u,c,d)=>{if(c<1)return u[d].realWidth;const f=u.map(({realWidth:h,width:m})=>h||m).slice(d,d+c);return Number(f.reduce((h,m)=>Number(h)+Number(m),-1))}}}const H1e=["colspan","rowspan"];var U1e=le({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(B(),Q("td",{colspan:t.colspan,rowspan:t.rowspan},[we(e.$slots,"default")],8,H1e))}});function W1e(t){const e=Ne(_a),n=De("table"),{handleDoubleClick:i,handleClick:r,handleContextMenu:o,handleMouseEnter:s,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=$1e(t),{getRowStyle:f,getRowClass:h,getCellStyle:m,getCellClass:g,getSpan:v,getColspanRealWidth:p}=z1e(t);let b=-1;const y=M(()=>{var T;return(T=t.store)==null?void 0:T.states.columns.value.findIndex(({type:E})=>E==="default")}),_=(T,E)=>{var x;const P=(x=e?.props)==null?void 0:x.rowKey;return P?vr(T,P):E},C=(T,E,x,P=!1)=>{const{tooltipEffect:A,tooltipOptions:I,store:D}=t,{indent:q,columns:z}=D.states,R=[];let O=!0;return x&&(R.push(n.em("row",`level-${x.level}`)),O=!!x.display),E===0&&(b=-1),t.stripe&&O&&b++,R.push(...h(T,E,b)),nt("tr",{style:[O?null:{display:"none"},f(T,E)],class:R,key:_(T,E),onDblclick:F=>i(F,T),onClick:F=>r(F,T),onContextmenu:F=>o(F,T),onMouseenter:()=>s(E),onMouseleave:a},z.value.map((F,j)=>{const{rowspan:U,colspan:W}=v(T,F,E,j);if(!U||!W)return null;const J=Object.assign({},F);J.realWidth=p(z.value,W,j);const ne={store:D,_self:t.context||e,column:J,row:T,$index:E,cellIndex:j,expanded:P};j===y.value&&x&&(ne.treeNode={indent:x.level&&x.level*q.value,level:x.level},vi(x.expanded)&&(ne.treeNode.expanded=x.expanded,"loading"in x&&(ne.treeNode.loading=x.loading),"noLazyChildren"in x&&(ne.treeNode.noLazyChildren=x.noLazyChildren)));const he=`${_(T,E)},${j}`,X=J.columnKey||J.rawColumnKey||"",se=F.showOverflowTooltip&&jH({effect:A},I,F.showOverflowTooltip);return nt(U1e,{style:m(E,j,T,F),class:g(E,j,T,F,W-1),key:`${X}${he}`,rowspan:U,colspan:W,onMouseenter:re=>l(re,T,se),onMouseleave:u},{default:()=>S(j,F,ne)})}))},S=(T,E,x)=>E.renderCell(x);return{wrappedRowRender:(T,E)=>{const x=t.store,{isRowExpanded:P,assertRowKey:A}=x,{treeData:I,lazyTreeNodeMap:D,childrenColumnName:q,rowKey:z}=x.states,R=x.states.columns.value;if(R.some(({type:N})=>N==="expand")){const N=P(T),F=C(T,E,void 0,N),j=e?.renderExpanded;if(!j)return console.error("[Element Error]renderExpanded is required."),F;const U=[[F]];return(e.props.preserveExpandedContent||N)&&U[0].push(nt("tr",{key:`expanded-row__${F.key}`,style:{display:N?"":"none"}},[nt("td",{colspan:R.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[j({row:T,$index:E,store:x,expanded:N})])])),U}else if(Object.keys(I.value).length){A();const N=vr(T,z.value);let F=I.value[N],j=null;F&&(j={expanded:F.expanded,level:F.level,display:!0,noLazyChildren:void 0,loading:void 0},vi(F.lazy)&&(j&&vi(F.loaded)&&F.loaded&&(j.noLazyChildren=!(F.children&&F.children.length)),j.loading=F.loading));const U=[C(T,E,j??void 0)];if(F){let W=0;const J=(he,X)=>{he&&he.length&&X&&he.forEach(se=>{const re={display:X.display&&X.expanded,level:X.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ee=vr(se,z.value);if(Is(ee))throw new Error("For nested data item, row-key is required.");if(F={...I.value[ee]},F&&(re.expanded=F.expanded,F.level=F.level||re.level,F.display=!!(F.expanded&&re.display),vi(F.lazy)&&(vi(F.loaded)&&F.loaded&&(re.noLazyChildren=!(F.children&&F.children.length)),re.loading=F.loading)),W++,U.push(C(se,E+W,re)),F){const te=D.value[ee]||se[q.value];J(te,F)}})};F.display=!0;const ne=D.value[N]||T[q.value];J(ne,F)}return U}else return C(T,E,void 0)},tooltipContent:c,tooltipTrigger:d}}const q1e={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var j1e=le({name:"ElTableBody",props:q1e,setup(t){var e;const n=Ct(),i=Ne(_a),r=De("table"),{wrappedRowRender:o,tooltipContent:s,tooltipTrigger:a}=W1e(t),{onColumnsChange:l,onScrollableChange:u}=GR(i),c=[];return Se((e=t.store)==null?void 0:e.states.hoverRow,(d,f)=>{var h,m;const g=n?.vnode.el,v=Array.from(g?.children||[]).filter(y=>y?.classList.contains(`${r.e("row")}`));let p=d;const b=(h=v[p])==null?void 0:h.childNodes;if(b?.length){let y=0;Array.from(b).reduce((C,S,k)=>{var T,E;return((T=b[k])==null?void 0:T.colSpan)>1&&(y=(E=b[k])==null?void 0:E.colSpan),S.nodeName!=="TD"&&y===0&&C.push(k),y>0&&y--,C},[]).forEach(C=>{var S;for(p=d;p>0;){const k=(S=v[p-1])==null?void 0:S.childNodes;if(k[C]&&k[C].nodeName==="TD"&&k[C].rowSpan>1){Qs(k[C],"hover-cell"),c.push(k[C]);break}p--}})}else c.forEach(y=>os(y,"hover-cell")),c.length=0;!((m=t.store)!=null&&m.states.isComplex.value)||!Zt||oR(()=>{const y=v[f],_=v[d];y&&!y.classList.contains("hover-fixed-row")&&os(y,"hover-row"),_&&Qs(_,"hover-row")})}),Fc(()=>{var d;(d=Rr)==null||d()}),{ns:r,onColumnsChange:l,onScrollableChange:u,wrappedRowRender:o,tooltipContent:s,tooltipTrigger:a}},render(){const{wrappedRowRender:t,store:e}=this,n=e?.states.data.value||[];return nt("tbody",{tabIndex:-1},[n.reduce((i,r)=>i.concat(t(r,i.length)),[])])}});function K1e(){const t=Ne(_a),e=t?.store,n=M(()=>{var a;return(a=e?.states.fixedLeafColumnsLength.value)!=null?a:0}),i=M(()=>{var a;return(a=e?.states.rightFixedColumns.value.length)!=null?a:0}),r=M(()=>{var a;return(a=e?.states.columns.value.length)!=null?a:0}),o=M(()=>{var a;return(a=e?.states.fixedColumns.value.length)!=null?a:0}),s=M(()=>{var a;return(a=e?.states.rightFixedColumns.value.length)!=null?a:0});return{leftFixedLeafCount:n,rightFixedLeafCount:i,columnsCount:r,leftFixedCount:o,rightFixedCount:s,columns:M(()=>{var a;return(a=e?.states.columns.value)!=null?a:[]})}}function G1e(t){const{columns:e}=K1e(),n=De("table");return{getCellClasses:(o,s)=>{const a=o[s],l=[n.e("cell"),a.id,a.align,a.labelClassName,...qR(n.b(),s,a.fixed,t.store)];return a.className&&l.push(a.className),a.children||l.push(n.is("leaf")),l},getCellStyles:(o,s)=>{const a=jR(s,o.fixed,t.store);return Nm(a,"left"),Nm(a,"right"),a},columns:e}}var Y1e=le({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t){const e=Ne(_a),n=De("table"),{getCellClasses:i,getCellStyles:r,columns:o}=G1e(t),{onScrollableChange:s,onColumnsChange:a}=GR(e);return{ns:n,onScrollableChange:s,onColumnsChange:a,getCellClasses:i,getCellStyles:r,columns:o}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:i,sumText:r}=this,o=this.store.states.data.value;let s=[];return i?s=i({columns:t,data:o}):t.forEach((a,l)=>{if(l===0){s[l]=r;return}const u=o.map(h=>Number(h[a.property])),c=[];let d=!0;u.forEach(h=>{if(!Number.isNaN(+h)){d=!1;const m=`${h}`.split(".")[1];c.push(m?m.length:0)}});const f=Math.max.apply(null,c);d?s[l]="":s[l]=u.reduce((h,m)=>{const g=Number(m);return Number.isNaN(+g)?h:Number.parseFloat((h+m).toFixed(Math.min(f,20)))},0)}),nt(nt("tfoot",[nt("tr",{},[...t.map((a,l)=>nt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[nt("div",{class:["cell",a.labelClassName]},[s[l]])]))])]))}});function X1e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,f,h=!0)=>{t.toggleRowSelection(d,f,!1,h),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,f)=>{t.toggleRowExpansionAdapter(d,f)},clearSort:()=>{t.clearSort()},sort:(d,f)=>{t.commit("sort",{prop:d,order:f})},updateKeyChildren:(d,f)=>{t.updateKeyChildren(d,f)}}}function J1e(t,e,n,i){const r=H(!1),o=H(null),s=H(!1),a=R=>{s.value=R},l=H({width:null,height:null,headerHeight:null}),u=H(!1),c={display:"inline-block",verticalAlign:"middle"},d=H(),f=H(0),h=H(0),m=H(0),g=H(0),v=H(0);Se(()=>t.height,R=>{e.setHeight(R??null)},{immediate:!0}),Se(()=>t.maxHeight,R=>{e.setMaxHeight(R??null)},{immediate:!0}),Se(()=>[t.currentRowKey,n.states.rowKey],([R,O])=>{!w(O)||!w(R)||n.setCurrentRowKey(`${R}`)},{immediate:!0}),Se(()=>t.data,R=>{i.store.commit("setData",R)},{immediate:!0,deep:!0}),sl(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const p=()=>{i.store.commit("setHoverRow",null),i.hoverState&&(i.hoverState=null)},b=(R,O)=>{const{pixelX:N,pixelY:F}=O;Math.abs(N)>=Math.abs(F)&&(i.refs.bodyWrapper.scrollLeft+=O.pixelX/5)},y=M(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),_=M(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),C=()=>{y.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(E)};Pt(async()=>{await Ye(),n.updateColumns(),x(),requestAnimationFrame(C);const R=i.vnode.el,O=i.refs.headerWrapper;t.flexible&&R&&R.parentElement&&(R.parentElement.style.minWidth="0"),l.value={width:d.value=R.offsetWidth,height:R.offsetHeight,headerHeight:t.showHeader&&O?O.offsetHeight:null},n.states.columns.value.forEach(N=>{N.filteredValue&&N.filteredValue.length&&i.store.commit("filterChange",{column:N,values:N.filteredValue,silent:!0})}),i.$ready=!0});const S=(R,O)=>{if(!R)return;const N=Array.from(R.classList).filter(F=>!F.startsWith("is-scrolling-"));N.push(e.scrollX.value?O:"is-scrolling-none"),R.className=N.join(" ")},k=R=>{const{tableWrapper:O}=i.refs;S(O,R)},T=R=>{const{tableWrapper:O}=i.refs;return!!(O&&O.classList.contains(R))},E=function(){if(!i.refs.scrollBarRef)return;if(!e.scrollX.value){const J="is-scrolling-none";T(J)||k(J);return}const R=i.refs.scrollBarRef.wrapRef;if(!R)return;const{scrollLeft:O,offsetWidth:N,scrollWidth:F}=R,{headerWrapper:j,footerWrapper:U}=i.refs;j&&(j.scrollLeft=O),U&&(U.scrollLeft=O);const W=F-N-1;O>=W?k("is-scrolling-right"):k(O===0?"is-scrolling-left":"is-scrolling-middle")},x=()=>{i.refs.scrollBarRef&&(i.refs.scrollBarRef.wrapRef&&Kn(i.refs.scrollBarRef.wrapRef,"scroll",E,{passive:!0}),t.fit?nr(i.vnode.el,P):Kn(window,"resize",P),nr(i.refs.tableInnerWrapper,()=>{var R,O;P(),(O=(R=i.refs)==null?void 0:R.scrollBarRef)==null||O.update()}))},P=()=>{var R,O,N,F;const j=i.vnode.el;if(!i.$ready||!j)return;let U=!1;const{width:W,height:J,headerHeight:ne}=l.value,he=d.value=j.offsetWidth;W!==he&&(U=!0);const X=j.offsetHeight;(t.height||y.value)&&J!==X&&(U=!0);const se=t.tableLayout==="fixed"?i.refs.headerWrapper:(R=i.refs.tableHeaderRef)==null?void 0:R.$el;t.showHeader&&se?.offsetHeight!==ne&&(U=!0),f.value=((O=i.refs.tableWrapper)==null?void 0:O.scrollHeight)||0,m.value=se?.scrollHeight||0,g.value=((N=i.refs.footerWrapper)==null?void 0:N.offsetHeight)||0,v.value=((F=i.refs.appendWrapper)==null?void 0:F.offsetHeight)||0,h.value=f.value-m.value-g.value-v.value,U&&(l.value={width:he,height:X,headerHeight:t.showHeader&&se?.offsetHeight||0},C())},A=fr(),I=M(()=>{const{bodyWidth:R,scrollY:O,gutterWidth:N}=e;return R.value?`${R.value-(O.value?N:0)}px`:""}),D=M(()=>t.maxHeight?"fixed":t.tableLayout),q=M(()=>{if(t.data&&t.data.length)return;let R="100%";t.height&&h.value&&(R=`${h.value}px`);const O=d.value;return{width:O?`${O}px`:"",height:R}}),z=M(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${m.value+g.value}px)`}:{maxHeight:`${+t.maxHeight-m.value-g.value}px`}:{});return{isHidden:r,renderExpanded:o,setDragVisible:a,isGroup:u,handleMouseLeave:p,handleHeaderFooterMousewheel:b,tableSize:A,emptyBlockStyle:q,resizeProxyVisible:s,bodyWidth:I,resizeState:l,doLayout:C,tableBodyStyles:_,tableLayout:D,scrollbarViewStyle:c,scrollbarStyle:z}}function Z1e(t){let e;const n=()=>{const r=t.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},s=t.store.states.updateOrderFns;e=new MutationObserver(()=>{s.forEach(a=>a())}),e.observe(r,o)};Pt(()=>{n()}),Fc(()=>{e?.disconnect()})}var Q1e={data:{type:Array,default:()=>[]},size:$r,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function xq(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:r})=>pn(r))&&(n=[]);const i=r=>{const o={key:`${t.tableLayout}_${r.id}`,style:{},name:void 0};return e?o.style={width:`${r.width}px`}:o.name=r.id,o};return nt("colgroup",{},n.map(r=>nt("col",i(r))))}xq.props=["columns","tableLayout"];const eCe=()=>{const t=H(),e=(o,s)=>{const a=t.value;a&&a.scrollTo(o,s)},n=(o,s)=>{const a=t.value;a&&St(s)&&["Top","Left"].includes(o)&&a[`setScroll${o}`](s)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};var VN=!1,Vd,I2,R2,Fw,$w,Aq,zw,M2,O2,L2,Pq,D2,N2,Iq,Rq;function mo(){if(!VN){VN=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(D2=/\b(iPhone|iP[ao]d)/.exec(t),N2=/\b(iP[ao]d)/.exec(t),L2=/Android/i.exec(t),Iq=/FBAN\/\w+;/i.exec(t),Rq=/Mobile/i.exec(t),Pq=!!/Win64/.exec(t),e){Vd=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Vd&&document&&document.documentMode&&(Vd=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);Aq=i?parseFloat(i[1])+4:Vd,I2=e[2]?parseFloat(e[2]):NaN,R2=e[3]?parseFloat(e[3]):NaN,Fw=e[4]?parseFloat(e[4]):NaN,Fw?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),$w=e&&e[1]?parseFloat(e[1]):NaN):$w=NaN}else Vd=I2=R2=$w=Fw=NaN;if(n){if(n[1]){var r=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);zw=r?parseFloat(r[1].replace("_",".")):!0}else zw=!1;M2=!!n[2],O2=!!n[3]}else zw=M2=O2=!1}}var B2={ie:function(){return mo()||Vd},ieCompatibilityMode:function(){return mo()||Aq>Vd},ie64:function(){return B2.ie()&&Pq},firefox:function(){return mo()||I2},opera:function(){return mo()||R2},webkit:function(){return mo()||Fw},safari:function(){return B2.webkit()},chrome:function(){return mo()||$w},windows:function(){return mo()||M2},osx:function(){return mo()||zw},linux:function(){return mo()||O2},iphone:function(){return mo()||D2},mobile:function(){return mo()||D2||N2||L2||Rq},nativeApp:function(){return mo()||Iq},android:function(){return mo()||L2},ipad:function(){return mo()||N2}},tCe=B2,nCe=!!(typeof window<"u"&&window.document&&window.document.createElement),iCe={canUseDOM:nCe},Mq=iCe,Oq;Mq.canUseDOM&&(Oq=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function rCe(t,e){if(!Mq.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var r=document.createElement("div");r.setAttribute(n,"return;"),i=typeof r[n]=="function"}return!i&&Oq&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var oCe=rCe,FN=10,$N=40,zN=800;function Lq(t){var e=0,n=0,i=0,r=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),i=e*FN,r=n*FN,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||r)&&t.deltaMode&&(t.deltaMode==1?(i*=$N,r*=$N):(i*=zN,r*=zN)),i&&!e&&(e=i<1?-1:1),r&&!n&&(n=r<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:r}}Lq.getEventType=function(){return tCe.firefox()?"DOMMouseScroll":oCe("wheel")?"wheel":"mousewheel"};var sCe=Lq;const Hw="_Mousewheel",HN=function(t,e){if(t&&t.addEventListener){Dq(t);const n=function(i){const r=sCe(i);e&&Reflect.apply(e,this,[i,r])};t[Hw]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},Dq=t=>{var e;(e=t[Hw])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[Hw].wheelHandler),t[Hw]=null)},aCe={beforeMount(t,e){HN(t,e.value)},unmounted(t){Dq(t)},updated(t,e){e.value!==e.oldValue&&HN(t,e.value)}};let lCe=1;var uCe=le({name:"ElTable",directives:{Mousewheel:aCe},components:{TableHeader:F1e,TableBody:j1e,TableFooter:Y1e,ElScrollbar:gu,hColgroup:xq},props:Q1e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=Qt(),n=De("table"),i=Ct();qt(_a,i);const r=k1e(i,t);i.store=r;const o=new A1e({store:i.store,table:i,fit:t.fit,showHeader:t.showHeader});i.layout=o;const s=M(()=>(r.states.data.value||[]).length===0),{setCurrentRow:a,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:m,sort:g,updateKeyChildren:v}=X1e(r),{isHidden:p,renderExpanded:b,setDragVisible:y,isGroup:_,handleMouseLeave:C,handleHeaderFooterMousewheel:S,tableSize:k,emptyBlockStyle:T,resizeProxyVisible:E,bodyWidth:x,resizeState:P,doLayout:A,tableBodyStyles:I,tableLayout:D,scrollbarViewStyle:q,scrollbarStyle:z}=J1e(t,o,r,i),{scrollBarRef:R,scrollTo:O,setScrollLeft:N,setScrollTop:F}=eCe(),j=ul(A,50),U=`${n.namespace.value}-table_${lCe++}`;i.tableId=U,i.state={isGroup:_,resizeState:P,doLayout:A,debouncedUpdateLayout:j};const W=M(()=>{var he;return(he=t.sumText)!=null?he:e("el.table.sumText")}),J=M(()=>{var he;return(he=t.emptyText)!=null?he:e("el.table.emptyText")}),ne=M(()=>Eq(r.states.originColumns.value)[0]);return Z1e(i),Sn(()=>{j.cancel()}),{ns:n,layout:o,store:r,columns:ne,handleHeaderFooterMousewheel:S,handleMouseLeave:C,tableId:U,tableSize:k,isHidden:p,isEmpty:s,renderExpanded:b,resizeProxyVisible:E,resizeState:P,isGroup:_,bodyWidth:x,tableBodyStyles:I,emptyBlockStyle:T,debouncedUpdateLayout:j,setCurrentRow:a,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:m,doLayout:A,sort:g,updateKeyChildren:v,t:e,setDragVisible:y,context:i,computedSumText:W,computedEmptyText:J,tableLayout:D,scrollbarViewStyle:q,scrollbarStyle:z,scrollBarRef:R,scrollTo:O,setScrollLeft:N,setScrollTop:F,allowDragLastColumn:t.allowDragLastColumn}}});const cCe=["data-prefix"],dCe={ref:"hiddenColumns",class:"hidden-columns"};function fCe(t,e,n,i,r,o){const s=Bt("hColgroup"),a=Bt("table-header"),l=Bt("table-body"),u=Bt("table-footer"),c=Bt("el-scrollbar"),d=vz("mousewheel");return B(),Q("div",{ref:"tableWrapper",class:$([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:mt(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:e[1]||(e[1]=(...f)=>t.handleMouseLeave&&t.handleMouseLeave(...f))},[ie("div",{ref:"tableInnerWrapper",class:$(t.ns.e("inner-wrapper"))},[ie("div",dCe,[we(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Vt((B(),Q("div",{key:0,ref:"headerWrapper",class:$(t.ns.e("header-wrapper"))},[ie("table",{ref:"tableHeader",class:$(t.ns.e("header")),style:mt(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[L(s,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),L(a,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):ve("v-if",!0),ie("div",{ref:"bodyWrapper",class:$(t.ns.e("body-wrapper"))},[L(c,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:e[0]||(e[0]=f=>t.$emit("scroll",f))},{default:ce(()=>[ie("table",{ref:"tableBody",class:$(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:mt({width:t.bodyWidth,tableLayout:t.tableLayout})},[L(s,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(B(),_e(a,{key:0,ref:"tableHeaderRef",class:$(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):ve("v-if",!0),L(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(B(),_e(u,{key:1,class:$(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):ve("v-if",!0)],6),t.isEmpty?(B(),Q("div",{key:0,ref:"emptyBlock",style:mt(t.emptyBlockStyle),class:$(t.ns.e("empty-block"))},[ie("span",{class:$(t.ns.e("empty-text"))},[we(t.$slots,"empty",{},()=>[dt(We(t.computedEmptyText),1)])],2)],6)):ve("v-if",!0),t.$slots.append?(B(),Q("div",{key:1,ref:"appendWrapper",class:$(t.ns.e("append-wrapper"))},[we(t.$slots,"append")],2)):ve("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),t.showSummary&&t.tableLayout==="fixed"?Vt((B(),Q("div",{key:1,ref:"footerWrapper",class:$(t.ns.e("footer-wrapper"))},[ie("table",{class:$(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:mt(t.tableBodyStyles)},[L(s,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),L(u,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[On,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):ve("v-if",!0),t.border||t.isGroup?(B(),Q("div",{key:2,class:$(t.ns.e("border-left-patch"))},null,2)):ve("v-if",!0)],2),Vt(ie("div",{ref:"resizeProxy",class:$(t.ns.e("column-resize-proxy"))},null,2),[[On,t.resizeProxyVisible]])],46,cCe)}var hCe=Tr(uCe,[["render",fCe]]);const mCe={selection:"table-column--selection",expand:"table__expand-column"},gCe={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},pCe=t=>mCe[t]||"",vCe={selection:{renderHeader({store:t}){var e;function n(){return t.states.data.value&&t.states.data.value.length===0}return nt(Ac,{disabled:n(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":(e=t.toggleAllSelection)!=null?e:void 0,modelValue:t.states.isAllSelected.value,ariaLabel:t.t("el.table.selectAllLabel")})},renderCell({row:t,column:e,store:n,$index:i}){return nt(Ac,{disabled:e.selectable?!e.selectable.call(null,t,i):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:r=>r.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const i=t.index;return St(i)?n=e+i:Xe(i)&&(n=i(e)),nt("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:e,store:n,expanded:i,$index:r}){var o,s,a;const{ns:l}=n,u=[l.e("expand-icon")];!t.renderExpand&&i&&u.push(l.em("expand-icon","expanded"));const c=function(f){f.stopPropagation(),n.toggleRowExpansion(e)},d=(a=(s=(o=n.states.rowExpandable).value)==null?void 0:s.call(o,e,r))!=null?a:!0;return d||u.push(l.is("disabled")),nt("button",{type:"button",disabled:!d,"aria-label":n.t(i?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":i,class:u,onClick:c},{default:()=>t.renderExpand?[t.renderExpand({expanded:i,expandable:d})]:[nt(He,null,{default:()=>[nt(oa)]})]})},sortable:!1,resizable:!1}};function bCe({row:t,column:e,$index:n}){var i;const r=e.property,o=r&&lm(t,r).value;return e&&e.formatter?e.formatter(t,e,o,n):((i=o?.toString)==null?void 0:i.call(o))||""}function yCe({row:t,treeNode:e,store:n},i=!1){const{ns:r}=n;if(!e)return i?[nt("span",{class:r.e("placeholder")})]:null;const o=[],s=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(nt("span",{class:r.e("indent"),style:{"padding-left":`${e.indent}px`}})),vi(e.expanded)&&!e.noLazyChildren){const a=[r.e("expand-icon"),e.expanded?r.em("expand-icon","expanded"):""];let l=oa;e.loading&&(l=xc),o.push(nt("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:s},{default:()=>[nt(He,{class:r.is("loading",e.loading)},{default:()=>[nt(l)]})]}))}else o.push(nt("span",{class:r.e("placeholder")}));return o}function UN(t,e){return t.reduce((n,i)=>(n[i]=i,n),e)}function wCe(t,e){const n=Ct();return{registerComplexWatchers:()=>{const o=["fixed"],s={realWidth:"width",realMinWidth:"minWidth"},a=UN(o,s);Object.keys(a).forEach(l=>{const u=s[l];Jt(e,u)&&Se(()=>e[u],c=>{let d=c;u==="width"&&l==="realWidth"&&(d=WR(c)),u==="minWidth"&&l==="realMinWidth"&&(d=yq(c)),n.columnConfig.value[u]=d,n.columnConfig.value[l]=d;const f=u==="fixed";t.value.store.scheduleLayout(f)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],s=["showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=UN(o,a);Object.keys(l).forEach(u=>{const c=a[u];Jt(e,c)&&Se(()=>e[c],d=>{n.columnConfig.value[u]=d,(u==="filters"||u==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),s.forEach(u=>{Jt(t.value.props,u)&&Se(()=>t.value.props[u],c=>{n.columnConfig.value.type!=="selection"&&pn(e[u])&&(n.columnConfig.value[u]=c)})})}}}function _Ce(t,e,n){const i=Ct(),r=H(""),o=H(!1),s=H(),a=H(),l=De("table");sl(()=>{s.value=t.align?`is-${t.align}`:null,s.value}),sl(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:s.value,a.value});const u=M(()=>{let _=i.vnode.vParent||i.parent;for(;_&&!_.tableId&&!_.columnId;)_=_.vnode.vParent||_.parent;return _}),c=M(()=>{const{store:_}=i.parent;if(!_)return!1;const{treeData:C}=_.states,S=C.value;return S&&Object.keys(S).length>0}),d=H(WR(t.width)),f=H(yq(t.minWidth)),h=_=>(d.value&&(_.width=d.value),f.value&&(_.minWidth=f.value),!d.value&&f.value&&(_.width=void 0),_.minWidth||(_.minWidth=80),_.realWidth=Number(pn(_.width)?_.minWidth:_.width),_),m=_=>{const C=_.type,S=vCe[C]||{};Object.keys(S).forEach(T=>{const E=S[T];T!=="className"&&!pn(E)&&(_[T]=E)});const k=pCe(C);if(k){const T=`${w(l.namespace)}-${k}`;_.className=_.className?`${_.className} ${T}`:T}return _},g=_=>{Pe(_)?_.forEach(S=>C(S)):C(_);function C(S){var k;((k=S?.type)==null?void 0:k.name)==="ElTableColumn"&&(S.vParent=i)}};return{columnId:r,realAlign:s,isSubColumn:o,realHeaderAlign:a,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:m,setColumnRenders:_=>{t.renderHeader||_.type!=="selection"&&(_.renderHeader=S=>{if(i.columnConfig.value.label,e.header){const k=e.header(S);if(Cq(k))return nt(rt,k)}return dt(_.label)}),e["filter-icon"]&&(_.renderFilterIcon=S=>we(e,"filter-icon",S)),e.expand&&(_.renderExpand=S=>we(e,"expand",S));let C=_.renderCell;return _.type==="expand"?(_.renderCell=S=>nt("div",{class:"cell"},[C(S)]),n.value.renderExpanded=S=>e.default?e.default(S):e.default):(C=C||bCe,_.renderCell=S=>{let k=null;if(e.default){const I=e.default(S);k=I.some(D=>D.type!==xi)?I:C(S)}else k=C(S);const{columns:T}=n.value.store.states,E=T.value.findIndex(I=>I.type==="default"),x=c.value&&S.cellIndex===E,P=yCe(S,x),A={class:"cell",style:{}};return _.showOverflowTooltip&&(A.class=`${A.class} ${w(l.namespace)}-tooltip`,A.style={width:`${(S.column.realWidth||Number(S.column.width))-1}px`}),g(k),nt("div",A,[P,k])}),_},getPropsData:(..._)=>_.reduce((C,S)=>(Pe(S)&&S.forEach(k=>{C[k]=t[k]}),C),{}),getColumnElIndex:(_,C)=>Array.prototype.indexOf.call(_,C),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",i.columnConfig.value)}}}var CCe={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let SCe=1;var Nq=le({name:"ElTableColumn",components:{ElCheckbox:Ac},props:CCe,setup(t,{slots:e}){const n=Ct(),i=H({}),r=M(()=>{let y=n.parent;for(;y&&!y.tableId;)y=y.parent;return y}),{registerNormalWatchers:o,registerComplexWatchers:s}=wCe(r,t),{columnId:a,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:h,getPropsData:m,getColumnElIndex:g,realAlign:v,updateColumnOrder:p}=_Ce(t,e,r),b=c.value;a.value=`${"tableId"in b&&b.tableId||"columnId"in b&&b.columnId}_column_${SCe++}`,yC(()=>{l.value=r.value!==b;const y=t.type||"default",_=t.sortable===""?!0:t.sortable,C=y==="selection"?!1:pn(t.showOverflowTooltip)?b.props.showOverflowTooltip:t.showOverflowTooltip,S=pn(t.tooltipFormatter)?b.props.tooltipFormatter:t.tooltipFormatter,k={...gCe[y],id:a.value,type:y,property:t.prop||t.property,align:v,headerAlign:u,showOverflowTooltip:C,tooltipFormatter:S,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:_,index:t.index,rawColumnKey:n.vnode.key};let A=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);A=f1e(k,A),A=m1e(h,d,f)(A),i.value=A,o(),s()}),Pt(()=>{var y,_;const C=c.value,S=l.value?(y=C.vnode.el)==null?void 0:y.children:(_=C.refs.hiddenColumns)==null?void 0:_.children,k=()=>g(S||[],n.vnode.el);i.value.getColumnIndex=k,k()>-1&&r.value.store.commit("insertColumn",i.value,l.value?"columnConfig"in C&&C.columnConfig.value:null,p)}),Sn(()=>{const y=i.value.getColumnIndex;(y?y():-1)>-1&&r.value.store.commit("removeColumn",i.value,l.value?"columnConfig"in b&&b.columnConfig.value:null,p)}),n.columnId=a.value,n.columnConfig=i},render(){var t,e,n;try{const i=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),r=[];if(Pe(i))for(const s of i)((n=s.type)==null?void 0:n.name)==="ElTableColumn"||s.shapeFlag&2?r.push(s):s.type===rt&&Pe(s.children)&&s.children.forEach(a=>{a?.patchFlag!==1024&&!ot(a?.children)&&r.push(a)});return nt("div",r)}catch{return nt("div",[])}}});const kCe=sn(hCe,{TableColumn:Nq}),rd=Zi(Nq),UC=Symbol("tabsRootContextKey"),TCe=qe({tabs:{type:me(Array),default:()=>Fs([])},tabRefs:{type:me(Object),default:()=>Fs({})}}),WN="ElTabBar";var ECe=le({name:WN,__name:"tab-bar",props:TCe,setup(t,{expose:e}){const n=t,i=Ne(UC);i||dr(WN,"<el-tabs><el-tab-bar /></el-tabs>");const r=De("tabs"),o=H(),s=H(),a=M(()=>{var h;return pn(i.props.defaultValue)||!!((h=s.value)!=null&&h.transform)}),l=()=>{let h=0,m=0;const g=["top","bottom"].includes(i.props.tabPosition)?"width":"height",v=g==="width"?"x":"y",p=v==="x"?"left":"top";return n.tabs.every(b=>{if(pn(b.paneName))return!1;const y=n.tabRefs[b.paneName];if(!y)return!1;if(!b.active)return!0;h=y[`offset${ac(p)}`],m=y[`client${ac(g)}`];const _=window.getComputedStyle(y);return g==="width"&&(m-=Number.parseFloat(_.paddingLeft)+Number.parseFloat(_.paddingRight),h+=Number.parseFloat(_.paddingLeft)),!1}),{[g]:`${m}px`,transform:`translate${ac(v)}(${h}px)`}},u=()=>s.value=l(),c=[],d=()=>{c.forEach(h=>h.stop()),c.length=0,Object.values(n.tabRefs).forEach(h=>{c.push(nr(h,u))})};Se(()=>n.tabs,async()=>{await Ye(),u(),d()},{immediate:!0});const f=nr(o,()=>u());return Sn(()=>{c.forEach(h=>h.stop()),c.length=0,f.stop()}),e({ref:o,update:u}),(h,m)=>a.value?(B(),Q("div",{key:0,ref_key:"barRef",ref:o,class:$([w(r).e("active-bar"),w(r).is(w(i).props.tabPosition)]),style:mt(s.value)},null,6)):ve("v-if",!0)}});const xCe=qe({panes:{type:me(Array),default:()=>Fs([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),ACe={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},qN="ElTabNav",PCe=le({name:qN,props:xCe,emits:ACe,setup(t,{expose:e,emit:n}){const i=Ne(UC);i||dr(qN,"<el-tabs><tab-nav /></el-tabs>");const r=De("tabs"),o=Vce(),s=zce(),a=H(),l=H(),u=H(),c=H({}),d=H(),f=H(!1),h=H(0),m=H(!1),g=H(!0),v=bi(),p=M(()=>["top","bottom"].includes(i.props.tabPosition)),b=M(()=>p.value?"width":"height"),y=M(()=>({transform:`translate${b.value==="width"?"X":"Y"}(-${h.value}px)`})),{width:_,height:C}=mD(a),{width:S,height:k}=mD(l,{width:0,height:0},{box:"border-box"}),T=M(()=>p.value?_.value:C.value),E=M(()=>p.value?S.value:k.value),{onWheel:x}=B_e({atStartEdge:M(()=>h.value<=0),atEndEdge:M(()=>E.value-h.value<=T.value),layout:M(()=>p.value?"horizontal":"vertical")},F=>{h.value=GI(h.value+F,0,E.value-T.value)}),P=()=>{if(!a.value)return;const F=a.value[`offset${ac(b.value)}`],j=h.value;if(!j)return;const U=j>F?j-F:0;h.value=U},A=()=>{if(!a.value||!l.value)return;const F=l.value[`offset${ac(b.value)}`],j=a.value[`offset${ac(b.value)}`],U=h.value;if(F-U<=j)return;const W=F-U>j*2?U+j:F-j;h.value=W},I=async()=>{const F=l.value;if(!f.value||!u.value||!a.value||!F)return;await Ye();const j=c.value[t.currentName];if(!j)return;const U=a.value,W=j.getBoundingClientRect(),J=U.getBoundingClientRect(),ne=p.value?F.offsetWidth-J.width:F.offsetHeight-J.height,he=h.value;let X=he;p.value?(W.left<J.left&&(X=he-(J.left-W.left)),W.right>J.right&&(X=he+W.right-J.right)):(W.top<J.top&&(X=he-(J.top-W.top)),W.bottom>J.bottom&&(X=he+(W.bottom-J.bottom))),X=Math.max(X,0),h.value=Math.min(X,ne)},D=()=>{var F;if(!l.value||!a.value)return;t.stretch&&((F=d.value)==null||F.update());const j=l.value[`offset${ac(b.value)}`],U=a.value[`offset${ac(b.value)}`],W=h.value;U<j?(f.value=f.value||{},f.value.prev=W,f.value.next=W+U<j,j-W<U&&(h.value=j-U)):(f.value=!1,W>0&&(h.value=0))},q=F=>{const j=Bn(F);let U=0;switch(j){case Me.left:case Me.up:U=-1;break;case Me.right:case Me.down:U=1;break;default:return}const W=Array.from(F.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let ne=W.indexOf(F.target)+U;ne<0?ne=W.length-1:ne>=W.length&&(ne=0),W[ne].focus({preventScroll:!0}),W[ne].click(),z()},z=()=>{g.value&&(m.value=!0)},R=()=>m.value=!1,O=(F,j)=>{c.value[j]=F},N=async()=>{await Ye();const F=c.value[t.currentName];F?.focus({preventScroll:!0})};return Se(o,F=>{F==="hidden"?g.value=!1:F==="visible"&&setTimeout(()=>g.value=!0,50)}),Se(s,F=>{F?setTimeout(()=>g.value=!0,50):g.value=!1}),nr(u,()=>{oR(D)}),Pt(()=>setTimeout(()=>I(),0)),ku(()=>D()),e({scrollToActiveTab:I,removeFocus:R,focusActiveTab:N,tabListRef:l,tabBarRef:d,scheduleRender:()=>vw(v)}),()=>{const F=f.value?[L("span",{class:[r.e("nav-prev"),r.is("disabled",!f.value.prev)],onClick:P},[L(He,null,{default:()=>[L(Am,null,null)]})]),L("span",{class:[r.e("nav-next"),r.is("disabled",!f.value.next)],onClick:A},[L(He,null,{default:()=>[L(oa,null,null)]})])]:null,j=t.panes.map((U,W)=>{var J,ne,he,X,se;const re=U.uid,ee=U.props.disabled,te=(ne=(J=U.props.name)!=null?J:U.index)!=null?ne:`${W}`,V=!ee&&(U.isClosable||U.props.closable!==!1&&t.editable);U.index=`${W}`;const K=V?L(He,{class:"is-icon-close",onClick:be=>n("tabRemove",U,be)},{default:()=>[L(cl,null,null)]}):null,G=((X=(he=U.slots).label)==null?void 0:X.call(he))||U.props.label,ye=!ee&&U.active?(se=t.tabindex)!=null?se:i.props.tabindex:-1;return L("div",{ref:be=>O(be,te),class:[r.e("item"),r.is(i.props.tabPosition),r.is("active",U.active),r.is("disabled",ee),r.is("closable",V),r.is("focus",m.value)],id:`tab-${te}`,key:`tab-${re}`,"aria-controls":`pane-${te}`,role:"tab","aria-selected":U.active,tabindex:ye,onFocus:()=>z(),onBlur:()=>R(),onClick:be=>{R(),n("tabClick",U,te,be)},onKeydown:be=>{const Ce=Bn(be);V&&(Ce===Me.delete||Ce===Me.backspace)&&n("tabRemove",U,be)}},[G,K])});return v.value,L("div",{ref:u,class:[r.e("nav-wrap"),r.is("scrollable",!!f.value),r.is(i.props.tabPosition)]},[F,L("div",{class:r.e("nav-scroll"),ref:a},[t.panes.length>0?L("div",{class:[r.e("nav"),r.is(i.props.tabPosition),r.is("stretch",t.stretch&&["top","bottom"].includes(i.props.tabPosition))],ref:l,style:y.value,role:"tablist",onKeydown:q,onWheel:x},[t.type?null:L(ECe,{ref:d,tabs:[...t.panes],tabRefs:c.value},null),j]):null])])}}}),ICe=qe({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:me(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),Vk=t=>ot(t)||St(t),RCe={[It]:t=>Vk(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>Vk(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>Vk(t),tabAdd:()=>!0},MCe=le({name:"ElTabs",props:ICe,emits:RCe,setup(t,{emit:e,slots:n,expose:i}){var r;const o=De("tabs"),s=M(()=>["left","right"].includes(t.tabPosition)),{children:a,addChild:l,removeChild:u,ChildrenSorter:c}=Kge(Ct(),"ElTabPane"),d=H(),f=H((r=pn(t.modelValue)?t.defaultValue:t.modelValue)!=null?r:"0"),h=async(y,_=!1)=>{var C,S,k,T;if(!(f.value===y||pn(y)))try{let E;if(t.beforeLeave){const x=t.beforeLeave(y,f.value);E=x instanceof Promise?await x:x}else E=!0;if(E!==!1){const x=(C=a.value.find(P=>P.paneName===f.value))==null?void 0:C.isFocusInsidePane();f.value=y,_&&(e(It,y),e("tabChange",y)),(k=(S=d.value)==null?void 0:S.removeFocus)==null||k.call(S),x&&((T=d.value)==null||T.focusActiveTab())}}catch{}},m=(y,_,C)=>{y.props.disabled||(e("tabClick",y,C),h(_,!0))},g=(y,_)=>{y.props.disabled||pn(y.props.name)||(_.stopPropagation(),e("edit",y.props.name,"remove"),e("tabRemove",y.props.name))},v=()=>{e("edit",void 0,"add"),e("tabAdd")},p=y=>{const _=Bn(y);[Me.enter,Me.numpadEnter].includes(_)&&v()},b=y=>{const _=y.el.firstChild,C=["bottom","right"].includes(t.tabPosition)?y.children[0].el:y.children[1].el;_!==C&&_.before(C)};return Se(()=>t.modelValue,y=>h(y)),Se(f,async()=>{var y;await Ye(),(y=d.value)==null||y.scrollToActiveTab()}),qt(UC,{props:t,currentName:f,registerPane:l,unregisterPane:u,nav$:d}),i({currentName:f,get tabNavRef(){return IC(d.value,["scheduleRender"])}}),()=>{const y=n["add-icon"],_=t.editable||t.addable?L("div",{class:[o.e("new-tab"),s.value&&o.e("new-tab-vertical")],tabindex:t.tabindex,onClick:v,onKeydown:p},[y?we(n,"add-icon"):L(He,{class:o.is("icon-plus")},{default:()=>[L(fU,null,null)]})]):null,C=()=>L(PCe,{ref:d,currentName:f.value,editable:t.editable,type:t.type,panes:a.value,stretch:t.stretch,onTabClick:m,onTabRemove:g},null),S=L("div",{class:[o.e("header"),s.value&&o.e("header-vertical"),o.is(t.tabPosition)]},[L(c,null,{default:C,$stable:!0}),_]),k=L("div",{class:o.e("content")},[we(n,"default")]);return L("div",{class:[o.b(),o.m(t.tabPosition),{[o.m("card")]:t.type==="card",[o.m("border-card")]:t.type==="border-card"}],onVnodeMounted:b,onVnodeUpdated:b},[k,S])}}}),OCe=qe({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),LCe=["id","aria-hidden","aria-labelledby"],jN="ElTabPane";var Bq=le({name:jN,__name:"tab-pane",props:OCe,setup(t){const e=t,n=Ct(),i=$o(),r=Ne(UC);r||dr(jN,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=De("tab-pane"),s=H(),a=H(),l=M(()=>{var g;return(g=e.closable)!=null?g:r.props.closable}),u=M(()=>{var g;return r.currentName.value===((g=e.name)!=null?g:a.value)}),c=H(u.value),d=M(()=>{var g;return(g=e.name)!=null?g:a.value}),f=M(()=>!e.lazy||c.value||u.value),h=()=>{var g;return(g=s.value)==null?void 0:g.contains(document.activeElement)};Se(u,g=>{g&&(c.value=!0)});const m=on({uid:n.uid,getVnode:()=>n.vnode,slots:i,props:e,paneName:d,active:u,index:a,isClosable:l,isFocusInsidePane:h});return r.registerPane(m),Sn(()=>{r.unregisterPane(m)}),xI(()=>{var g;i.label&&((g=r.nav$.value)==null||g.scheduleRender())}),(g,v)=>f.value?Vt((B(),Q("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:s,class:$(w(o).b()),role:"tabpanel","aria-hidden":!u.value,"aria-labelledby":`tab-${d.value}`},[we(g.$slots,"default")],10,LCe)),[[On,u.value]]):ve("v-if",!0)}});const DCe=sn(MCe,{TabPane:Bq}),NCe=Zi(Bq),BCe=qe({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:yl,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}});var VCe=le({name:"ElText",__name:"text",props:BCe,setup(t){const e=t,n=H(),i=fr(),r=De("text"),o=M(()=>[r.b(),r.m(e.type),r.m(i.value),r.is("truncated",e.truncated),r.is("line-clamp",!pn(e.lineClamp))]),s=()=>{var a,l,u,c,d,f,h;if(Rf().title)return;let g=!1;const v=((a=n.value)==null?void 0:a.textContent)||"";if(e.truncated){const p=(l=n.value)==null?void 0:l.offsetWidth,b=(u=n.value)==null?void 0:u.scrollWidth;p&&b&&b>p&&(g=!0)}else if(!pn(e.lineClamp)){const p=(c=n.value)==null?void 0:c.offsetHeight,b=(d=n.value)==null?void 0:d.scrollHeight;p&&b&&b>p&&(g=!0)}g?(f=n.value)==null||f.setAttribute("title",v):(h=n.value)==null||h.removeAttribute("title")};return Pt(s),ku(s),(a,l)=>(B(),_e(Gt(t.tag),{ref_key:"textRef",ref:n,class:$(o.value),style:mt({"-webkit-line-clamp":t.lineClamp})},{default:ce(()=>[we(a.$slots,"default")]),_:3},8,["class","style"]))}});const V2=sn(VCe);var FCe=Object.defineProperty,$Ce=(t,e,n)=>e in t?FCe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K0=(t,e,n)=>$Ce(t,typeof e!="symbol"?e+"":e,n);const zCe="ElUpload";class F2 extends Error{constructor(e,n,i,r){super(e),K0(this,"name","UploadAjaxError"),K0(this,"status"),K0(this,"method"),K0(this,"url"),this.status=n,this.method=i,this.url=r}}function KN(t,e,n){let i;return n.response?i=`${n.response.error||n.response}`:n.responseText?i=`${n.responseText}`:i=`fail to ${e.method} ${t} ${n.status}`,new F2(i,n.status,e.method,t)}function HCe(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const UCe=t=>{typeof XMLHttpRequest>"u"&&dr(zCe,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const s=o;s.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(s)});const i=new FormData;if(t.data)for(const[o,s]of Object.entries(t.data))Pe(s)&&s.length?i.append(o,...s):i.append(o,s);i.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(KN(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(KN(n,t,e));t.onSuccess(HCe(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const r=t.headers||{};if(r instanceof Headers)r.forEach((o,s)=>e.setRequestHeader(s,o));else for(const[o,s]of Object.entries(r))ir(s)||e.setRequestHeader(o,String(s));return e.send(i),e},Vq=["text","picture","picture-card"];let WCe=1;const $2=()=>Date.now()+WCe++,Fq=qe({action:{type:String,default:"#"},headers:{type:me(Object)},method:{type:String,default:"post"},data:{type:me([Object,Function,Promise]),default:()=>Fs({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:me(Array),default:()=>Fs([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Vq,default:"text"},httpRequest:{type:me(Function),default:UCe},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),qCe=qe({...Fq,beforeUpload:{type:me(Function),default:tn},beforeRemove:{type:me(Function)},onRemove:{type:me(Function),default:tn},onChange:{type:me(Function),default:tn},onPreview:{type:me(Function),default:tn},onSuccess:{type:me(Function),default:tn},onProgress:{type:me(Function),default:tn},onError:{type:me(Function),default:tn},onExceed:{type:me(Function),default:tn},crossorigin:{type:me(String)}}),$q=Symbol("uploadContextKey"),jCe=qe({files:{type:me(Array),default:()=>Fs([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:me(Function),default:tn},listType:{type:String,values:Vq,default:"text"},crossorigin:{type:me(String)}}),KCe={remove:t=>!!t},GCe=["tabindex","aria-disabled","onKeydown"],YCe=["src","crossorigin"],XCe=["onClick"],JCe=["title"],ZCe=["onClick"],QCe=["onClick"];var GN=le({name:"ElUploadList",__name:"upload-list",props:jCe,emits:KCe,setup(t,{emit:e}){const n=t,i=e,{t:r}=Qt(),o=De("upload"),s=De("icon"),a=De("list"),l=Oi(),u=H(!1),c=M(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",l.value)]),d=f=>{i("remove",f)};return(f,h)=>(B(),_e(Xz,{tag:"ul",class:$(c.value),name:w(a).b()},{default:ce(()=>[(B(!0),Q(rt,null,gn(t.files,(m,g)=>(B(),Q("li",{key:m.uid||m.name,class:$([w(o).be("list","item"),w(o).is(m.status),{focusing:u.value}]),tabindex:w(l)?void 0:0,"aria-disabled":w(l),role:"button",onKeydown:Pi(v=>!w(l)&&d(m),["delete"]),onFocus:h[0]||(h[0]=v=>u.value=!0),onBlur:h[1]||(h[1]=v=>u.value=!1),onClick:h[2]||(h[2]=v=>u.value=!1)},[we(f.$slots,"default",{file:m,index:g},()=>[t.listType==="picture"||m.status!=="uploading"&&t.listType==="picture-card"?(B(),Q("img",{key:0,class:$(w(o).be("list","item-thumbnail")),src:m.url,crossorigin:t.crossorigin,alt:""},null,10,YCe)):ve("v-if",!0),m.status==="uploading"||t.listType!=="picture-card"?(B(),Q("div",{key:1,class:$(w(o).be("list","item-info"))},[ie("a",{class:$(w(o).be("list","item-name")),onClick:Ot(v=>t.handlePreview(m),["prevent"])},[L(w(He),{class:$(w(s).m("document"))},{default:ce(()=>[L(w(wde))]),_:1},8,["class"]),ie("span",{class:$(w(o).be("list","item-file-name")),title:m.name},We(m.name),11,JCe)],10,XCe),m.status==="uploading"?(B(),_e(w(D_e),{key:0,type:t.listType==="picture-card"?"circle":"line","stroke-width":t.listType==="picture-card"?6:2,percentage:Number(m.percentage),style:mt(t.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):ve("v-if",!0)],2)):ve("v-if",!0),ie("label",{class:$(w(o).be("list","item-status-label"))},[t.listType==="text"?(B(),_e(w(He),{key:0,class:$([w(s).m("upload-success"),w(s).m("circle-check")])},{default:ce(()=>[L(w(DC))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(B(),_e(w(He),{key:1,class:$([w(s).m("upload-success"),w(s).m("check")])},{default:ce(()=>[L(w(LC))]),_:1},8,["class"])):ve("v-if",!0)],2),w(l)?ve("v-if",!0):(B(),_e(w(He),{key:2,class:$(w(s).m("close")),onClick:v=>d(m)},{default:ce(()=>[L(w(cl))]),_:1},8,["class","onClick"])),ve(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),ve(" This is a bug which needs to be fixed "),ve(" TODO: Fix the incorrect navigation interaction "),w(l)?ve("v-if",!0):(B(),Q("i",{key:3,class:$(w(s).m("close-tip"))},We(w(r)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(B(),Q("span",{key:4,class:$(w(o).be("list","item-actions"))},[ie("span",{class:$(w(o).be("list","item-preview")),onClick:v=>t.handlePreview(m)},[L(w(He),{class:$(w(s).m("zoom-in"))},{default:ce(()=>[L(w(mU))]),_:1},8,["class"])],10,ZCe),w(l)?ve("v-if",!0):(B(),Q("span",{key:0,class:$(w(o).be("list","item-delete")),onClick:v=>d(m)},[L(w(He),{class:$(w(s).m("delete"))},{default:ce(()=>[L(w(bde))]),_:1},8,["class"])],10,QCe))],2)):ve("v-if",!0)])],42,GCe))),128)),we(f.$slots,"append")]),_:3},8,["class","name"]))}});const eSe=qe({...Fq,beforeUpload:{type:me(Function),default:tn},onRemove:{type:me(Function),default:tn},onStart:{type:me(Function),default:tn},onSuccess:{type:me(Function),default:tn},onProgress:{type:me(Function),default:tn},onError:{type:me(Function),default:tn},onExceed:{type:me(Function),default:tn}}),tSe=qe({disabled:{type:Boolean,default:void 0},directory:Boolean}),nSe={file:t=>Pe(t)},YN="ElUploadDrag";var iSe=le({name:YN,__name:"upload-dragger",props:tSe,emits:nSe,setup(t,{emit:e}){const n=t,i=e;Ne($q)||dr(YN,"usage: <el-upload><el-upload-dragger /></el-upload>");const o=De("upload"),s=H(!1),a=Oi(),l=h=>new Promise((m,g)=>h.file(m,g)),u=async h=>{try{if(h.isFile){const m=await l(h);return m.isDirectory=!1,[m]}if(h.isDirectory){const m=h.createReader(),g=()=>new Promise((_,C)=>m.readEntries(_,C)),v=[];let p=await g();for(;p.length>0;)v.push(...p),p=await g();const b=v.map(_=>u(_).catch(()=>[])),y=await Promise.all(b);return N_(y)}}catch{return[]}return[]},c=async h=>{if(a.value)return;s.value=!1,h.stopPropagation();const m=Array.from(h.dataTransfer.files),g=h.dataTransfer.items||[];if(n.directory){const v=Array.from(g).map(b=>{var y;return(y=b?.webkitGetAsEntry)==null?void 0:y.call(b)}).filter(b=>b),p=await Promise.all(v.map(u));i("file",N_(p));return}m.forEach((v,p)=>{var b;const y=g[p],_=(b=y?.webkitGetAsEntry)==null?void 0:b.call(y);_&&(v.isDirectory=_.isDirectory)}),i("file",m)},d=()=>{a.value||(s.value=!0)},f=h=>{h.currentTarget.contains(h.relatedTarget)||(s.value=!1)};return(h,m)=>(B(),Q("div",{class:$([w(o).b("dragger"),w(o).is("dragover",s.value)]),onDrop:Ot(c,["prevent"]),onDragover:Ot(d,["prevent"]),onDragleave:Ot(f,["prevent"])},[we(h.$slots,"default")],34))}});const rSe=["tabindex","aria-disabled","onKeydown"],oSe=["name","disabled","multiple","accept","webkitdirectory"];var XN=le({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:eSe,setup(t,{expose:e}){const n=t,i=De("upload"),r=Oi(),o=bi({}),s=bi(),a=g=>{if(g.length===0)return;const{autoUpload:v,limit:p,fileList:b,multiple:y,onStart:_,onExceed:C}=n;if(p&&b.length+g.length>p){C(g,b);return}y||(g=g.slice(0,1));for(const S of g){const k=S;k.uid=$2(),_(k),v&&l(k)}},l=async g=>{if(s.value.value="",!n.beforeUpload)return c(g);let v,p={};try{const y=n.data,_=n.beforeUpload(g);p=Cv(n.data)?V_(n.data):n.data,v=await _,Cv(n.data)&&$i(y,p)&&(p=V_(n.data))}catch{v=!1}if(v===!1){n.onRemove(g);return}let b=g;v instanceof Blob&&(v instanceof File?b=v:b=new File([v],g.name,{type:g.type})),c(Object.assign(b,{uid:g.uid}),p)},u=async(g,v)=>Xe(g)?g(v):g,c=async(g,v)=>{const{headers:p,data:b,method:y,withCredentials:_,name:C,action:S,onProgress:k,onSuccess:T,onError:E,httpRequest:x}=n;try{v=await u(v??b,g)}catch{n.onRemove(g);return}const{uid:P}=g,A={headers:p||{},withCredentials:_,file:g,data:v,method:y,filename:C,action:S,onProgress:D=>{k(D,g)},onSuccess:D=>{T(D,g),delete o.value[P]},onError:D=>{E(D,g),delete o.value[P]}},I=x(A);o.value[P]=I,I instanceof Promise&&I.then(A.onSuccess,A.onError)},d=g=>{const v=g.target.files;v&&a(Array.from(v))},f=()=>{r.value||(s.value.value="",s.value.click())},h=()=>{f()};return e({abort:g=>{jce(o.value).filter(g?([p])=>String(g.uid)===p:()=>!0).forEach(([p,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[p]})},upload:l}),(g,v)=>(B(),Q("div",{class:$([w(i).b(),w(i).m(t.listType),w(i).is("drag",t.drag),w(i).is("disabled",w(r))]),tabindex:w(r)?void 0:0,"aria-disabled":w(r),role:"button",onClick:f,onKeydown:Pi(Ot(h,["self"]),["enter","space"])},[t.drag?(B(),_e(iSe,{key:0,disabled:w(r),directory:t.directory,onFile:a},{default:ce(()=>[we(g.$slots,"default")]),_:3},8,["disabled","directory"])):we(g.$slots,"default",{key:1}),ie("input",{ref_key:"inputRef",ref:s,class:$(w(i).e("input")),name:t.name,disabled:w(r),multiple:t.multiple,accept:t.accept,webkitdirectory:t.directory||void 0,type:"file",onChange:d,onClick:v[0]||(v[0]=Ot(()=>{},["stop"]))},null,42,oSe)],42,rSe))}});const JN="ElUpload",ZN=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},sSe=(t,e)=>{const n=$ce(t,"fileList",void 0,{passive:!0}),i=m=>n.value.find(g=>g.uid===m.uid);function r(m){var g;(g=e.value)==null||g.abort(m)}function o(m=["ready","uploading","success","fail"]){n.value=n.value.filter(g=>!m.includes(g.status))}function s(m){n.value=n.value.filter(g=>g.uid!==m.uid)}const a=m=>{Ye(()=>t.onChange(m,n.value))},l=(m,g)=>{const v=i(g);v&&(console.error(m),v.status="fail",s(v),t.onError(m,v,n.value),a(v))},u=(m,g)=>{const v=i(g);v&&(t.onProgress(m,v,n.value),v.status="uploading",v.percentage=Math.round(m.percent))},c=(m,g)=>{const v=i(g);v&&(v.status="success",v.response=m,t.onSuccess(m,v,n.value),a(v))},d=m=>{ir(m.uid)&&(m.uid=$2());const g={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(t.listType==="picture-card"||t.listType==="picture")try{g.url=URL.createObjectURL(m)}catch(v){v.message,t.onError(v,g,n.value)}n.value=[...n.value,g],a(g)},f=async m=>{const g=m instanceof File?i(m):m;g||dr(JN,"file to be removed not found");const v=p=>{r(p),s(p),t.onRemove(p,n.value),ZN(p)};t.beforeRemove?await t.beforeRemove(g,n.value)!==!1&&v(g):v(g)};function h(){n.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var g;return m&&((g=e.value)==null?void 0:g.upload(m))})}return Se(()=>t.listType,m=>{m!=="picture-card"&&m!=="picture"||(n.value=n.value.map(g=>{const{raw:v,url:p}=g;if(!p&&v)try{g.url=URL.createObjectURL(v)}catch(b){t.onError(b,g,n.value)}return g}))}),Se(n,m=>{for(const g of m)g.uid||(g.uid=$2()),g.status||(g.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:r,clearFiles:o,handleError:l,handleProgress:u,handleStart:d,handleSuccess:c,handleRemove:f,submit:h,revokeFileObjectURL:ZN}};var aSe=le({name:"ElUpload",__name:"upload",props:qCe,setup(t,{expose:e}){const n=t,i=Oi(),r=bi(),{abort:o,submit:s,clearFiles:a,uploadFiles:l,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:h,revokeFileObjectURL:m}=sSe(n,r),g=M(()=>n.listType==="picture-card"),v=M(()=>({...n,fileList:l.value,onStart:u,onProgress:h,onSuccess:f,onError:c,onRemove:d}));return Sn(()=>{l.value.forEach(m)}),qt($q,{accept:An(n,"accept")}),e({abort:o,submit:s,clearFiles:a,handleStart:u,handleRemove:d}),(p,b)=>(B(),Q("div",null,[g.value&&t.showFileList?(B(),_e(GN,{key:0,disabled:w(i),"list-type":t.listType,files:w(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:w(d)},kc({append:ce(()=>[L(XN,Lt({ref_key:"uploadRef",ref:r},v.value),{default:ce(()=>[p.$slots.trigger?we(p.$slots,"trigger",{key:0}):ve("v-if",!0),!p.$slots.trigger&&p.$slots.default?we(p.$slots,"default",{key:1}):ve("v-if",!0)]),_:3},16)]),_:2},[p.$slots.file?{name:"default",fn:ce(({file:y,index:_})=>[we(p.$slots,"file",{file:y,index:_})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):ve("v-if",!0),!g.value||g.value&&!t.showFileList?(B(),_e(XN,Lt({key:1,ref_key:"uploadRef",ref:r},v.value),{default:ce(()=>[p.$slots.trigger?we(p.$slots,"trigger",{key:0}):ve("v-if",!0),!p.$slots.trigger&&p.$slots.default?we(p.$slots,"default",{key:1}):ve("v-if",!0)]),_:3},16)):ve("v-if",!0),p.$slots.trigger?we(p.$slots,"default",{key:2}):ve("v-if",!0),we(p.$slots,"tip"),!g.value&&t.showFileList?(B(),_e(GN,{key:3,disabled:w(i),"list-type":t.listType,files:w(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:w(d)},kc({_:2},[p.$slots.file?{name:"default",fn:ce(({file:y,index:_})=>[we(p.$slots,"file",{file:y,index:_})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):ve("v-if",!0)]))}});const lSe=sn(aSe);function uSe(t,e){let n;const i=H(!1),r=on({...t,originalPosition:"",originalOverflow:"",visible:!1});function o(h){r.text=h}function s(){const h=r.parent,m=f.ns;if(!h.vLoadingAddClassList){let g=h.getAttribute("loading-number");g=Number.parseInt(g)-1,g?h.setAttribute("loading-number",g.toString()):(os(h,m.bm("parent","relative")),h.removeAttribute("loading-number")),os(h,m.bm("parent","hidden"))}a(),d.unmount()}function a(){var h,m;(m=(h=f.$el)==null?void 0:h.parentNode)==null||m.removeChild(f.$el)}function l(){var h;t.beforeClose&&!t.beforeClose()||(i.value=!0,clearTimeout(n),n=setTimeout(u,400),r.visible=!1,(h=t.closed)==null||h.call(t))}function u(){if(!i.value)return;const h=r.parent;i.value=!1,h.vLoadingAddClassList=void 0,s()}const d=L_(le({name:"ElLoading",setup(h,{expose:m}){const{ns:g,zIndex:v}=nR("loading");return m({ns:g,zIndex:v}),()=>{const p=r.spinner||r.svg,b=nt("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",...p?{innerHTML:p}:{}},[nt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),y=r.text?nt("p",{class:g.b("text")},[r.text]):void 0;return nt(ya,{name:g.b("fade"),onAfterLeave:u},{default:ce(()=>[Vt(L("div",{style:{backgroundColor:r.background||""},class:[g.b("mask"),r.customClass,g.is("fullscreen",r.fullscreen)]},[nt("div",{class:g.b("spinner")},[b,y])]),[[On,r.visible]])])})}}}));Object.assign(d._context,e??{});const f=d.mount(document.createElement("div"));return{...Sr(r),setText:o,removeElLoadingChild:a,close:l,handleAfterLeave:u,vm:f,get $el(){return f.$el}}}let G0;const cm=function(t={},e){if(!Zt)return;const n=cSe(t);if(n.fullscreen&&G0)return G0;const i=uSe({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(G0=void 0)}},e??cm._context);dSe(n,n.parent,i),QN(n,n.parent,i),n.parent.vLoadingAddClassList=()=>QN(n,n.parent,i);let r=n.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",n.parent.setAttribute("loading-number",r),n.parent.appendChild(i.$el),Ye(()=>i.visible.value=n.visible),n.fullscreen&&(G0=i),i},cSe=t=>{var e,n,i,r;let o;return ot(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((n=t.fullscreen)!=null?n:!0),lock:(i=t.lock)!=null?i:!1,customClass:t.customClass||"",visible:(r=t.visible)!=null?r:!0,beforeClose:t.beforeClose,closed:t.closed,target:o}},dSe=async(t,e,n)=>{const{nextZIndex:i}=n.vm.zIndex||n.vm._.exposed.zIndex,r={};if(t.fullscreen)n.originalPosition.value=sc(document.body,"position"),n.originalOverflow.value=sc(document.body,"overflow"),r.zIndex=i();else if(t.parent===document.body){n.originalPosition.value=sc(document.body,"position"),await Ye();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";r[o]=`${t.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(sc(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])r[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=sc(e,"position");for(const[o,s]of Object.entries(r))n.$el.style[o]=s},QN=(t,e,n)=>{const i=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?os(e,i.bm("parent","relative")):Qs(e,i.bm("parent","relative")),t.fullscreen&&t.lock?Qs(e,i.bm("parent","hidden")):os(e,i.bm("parent","hidden"))};cm._context=null;const bp=Symbol("ElLoading"),Nd=t=>`element-loading-${bl(t)}`,e3=(t,e)=>{var n,i,r,o;const s=e.instance,a=h=>_t(e.value)?e.value[h]:void 0,l=h=>{const m=ot(h)&&s?.[h]||h;return H(m)},u=h=>l(a(h)||t.getAttribute(Nd(h))),c=(n=a("fullscreen"))!=null?n:e.modifiers.fullscreen,d={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:c,target:(i=a("target"))!=null?i:c?void 0:t,body:(r=a("body"))!=null?r:e.modifiers.body,lock:(o=a("lock"))!=null?o:e.modifiers.lock},f=cm(d);f._context=dm._context,t[bp]={options:d,instance:f}},fSe=(t,e)=>{for(const n of Object.keys(t))rn(t[n])&&(t[n].value=e[n])},dm={mounted(t,e){e.value&&e3(t,e)},updated(t,e){const n=t[bp];if(!e.value){n?.instance.close(),t[bp]=null;return}n?fSe(n.options,_t(e.value)?e.value:{text:t.getAttribute(Nd("text")),svg:t.getAttribute(Nd("svg")),svgViewBox:t.getAttribute(Nd("svgViewBox")),spinner:t.getAttribute(Nd("spinner")),background:t.getAttribute(Nd("background")),customClass:t.getAttribute(Nd("customClass"))}):e3(t,e)},unmounted(t){var e;(e=t[bp])==null||e.instance.close(),t[bp]=null}};dm._context=null;const hSe={install(t){cm._context=t._context,dm._context=t._context,t.directive("loading",dm),t.config.globalProperties.$loading=cm},directive:dm,service:cm},z2="_trap-focus-children",qd=[],t3=t=>{if(qd.length===0)return;const e=Bn(t),n=qd[qd.length-1][z2];if(n.length>0&&e===Me.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const i=t.shiftKey,r=t.target===n[0],o=t.target===n[n.length-1];r&&i&&(t.preventDefault(),n[n.length-1].focus()),o&&!i&&(t.preventDefault(),n[0].focus())}},mSe={beforeMount(t){t[z2]=MD(t),qd.push(t),qd.length<=1&&document.addEventListener("keydown",t3)},updated(t){Ye(()=>{t[z2]=MD(t)})},unmounted(){qd.shift(),qd.length===0&&document.removeEventListener("keydown",t3)}};var gSe=le({name:"ElMessageBox",directives:{TrapFocus:mSe},components:{ElButton:Hi,ElFocusTrap:VC,ElInput:cr,ElOverlay:GW,ElIcon:He,...lfe},inheritAttrs:!1,props:{buttonSize:{type:String,validator:pq},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:i,ns:r,size:o}=nR("message-box",M(()=>t.buttonSize)),{t:s}=n,{nextZIndex:a}=i,l=H(!1),u=on({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:ca(xc),cancelButtonLoadingIcon:ca(xc),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),c=M(()=>{const R=u.type;return{[r.bm("icon",R)]:R&&$_[R]}}),d=as(),f=as(),h=M(()=>{const R=u.type;return u.icon||R&&$_[R]||""}),m=M(()=>!!u.message),g=H(),v=H(),p=H(),b=H(),y=H(),_=M(()=>u.confirmButtonClass);Se(()=>u.inputValue,async R=>{await Ye(),t.boxType==="prompt"&&R&&I()},{immediate:!0}),Se(()=>l.value,R=>{var O,N;R&&(t.boxType!=="prompt"&&(u.autofocus?p.value=(N=(O=y.value)==null?void 0:O.$el)!=null?N:g.value:p.value=g.value),u.zIndex=a()),t.boxType==="prompt"&&(R?Ye().then(()=>{var F;b.value&&b.value.$el&&(u.autofocus?p.value=(F=D())!=null?F:g.value:p.value=g.value)}):(u.editorErrorMessage="",u.validateError=!1))});const C=M(()=>t.draggable),S=M(()=>t.overflow),{isDragging:k}=XW(g,v,C,S);Pt(async()=>{await Ye(),t.closeOnHashChange&&window.addEventListener("hashchange",T)}),Sn(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){l.value&&(l.value=!1,Ye(()=>{u.action&&e("action",u.action)}))}const E=()=>{t.closeOnClickModal&&A(u.distinguishCancelAndClose?"close":"cancel")},x=BR(E),P=R=>{var O;if(u.inputType!=="textarea"&&!((O=b.value)!=null&&O.isComposing))return R.preventDefault(),A("confirm")},A=R=>{var O;t.boxType==="prompt"&&R==="confirm"&&!I()||(u.action=R,u.beforeClose?(O=u.beforeClose)==null||O.call(u,R,u,T):T())},I=()=>{if(t.boxType==="prompt"){const R=u.inputPattern;if(R&&!R.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||s("el.messagebox.error"),u.validateError=!0,!1;const O=u.inputValidator;if(Xe(O)){const N=O(u.inputValue);if(N===!1)return u.editorErrorMessage=u.inputErrorMessage||s("el.messagebox.error"),u.validateError=!0,!1;if(ot(N))return u.editorErrorMessage=N,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},D=()=>{var R,O;const N=(R=b.value)==null?void 0:R.$refs;return(O=N?.input)!=null?O:N?.textarea},q=()=>{A("close")},z=()=>{t.closeOnPressEscape&&q()};return t.lockScroll&&FR(l,{ns:r}),{...Sr(u),ns:r,overlayEvent:x,visible:l,hasMessage:m,typeClass:c,contentId:d,inputId:f,btnSize:o,iconComponent:h,confirmButtonClasses:_,rootRef:g,focusStartRef:p,headerRef:v,inputRef:b,isDragging:k,confirmRef:y,doClose:T,handleClose:q,onCloseRequested:z,handleWrapperClick:E,handleInputEnter:P,handleAction:A,t:s}}});const pSe=["aria-label","aria-describedby"],vSe=["aria-label"],bSe=["id"];function ySe(t,e,n,i,r,o){const s=Bt("el-icon"),a=Bt("el-input"),l=Bt("el-button"),u=Bt("el-focus-trap"),c=Bt("el-overlay");return B(),_e(ya,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:ce(()=>[Vt(L(c,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:ce(()=>[ie("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:$(`${t.ns.namespace.value}-overlay-message-box`),onClick:e[8]||(e[8]=(...d)=>t.overlayEvent.onClick&&t.overlayEvent.onClick(...d)),onMousedown:e[9]||(e[9]=(...d)=>t.overlayEvent.onMousedown&&t.overlayEvent.onMousedown(...d)),onMouseup:e[10]||(e[10]=(...d)=>t.overlayEvent.onMouseup&&t.overlayEvent.onMouseup(...d))},[L(u,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:ce(()=>[ie("div",{ref:"rootRef",class:$([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),t.ns.is("dragging",t.isDragging),{[t.ns.m("center")]:t.center}]),style:mt(t.customStyle),tabindex:"-1",onClick:e[7]||(e[7]=Ot(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(B(),Q("div",{key:0,ref:"headerRef",class:$([t.ns.e("header"),{"show-close":t.showClose}])},[ie("div",{class:$(t.ns.e("title"))},[t.iconComponent&&t.center?(B(),_e(s,{key:0,class:$([t.ns.e("status"),t.typeClass])},{default:ce(()=>[(B(),_e(Gt(t.iconComponent)))]),_:1},8,["class"])):ve("v-if",!0),ie("span",null,We(t.title),1)],2),t.showClose?(B(),Q("button",{key:0,type:"button",class:$(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:e[0]||(e[0]=d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel")),onKeydown:e[1]||(e[1]=Pi(Ot(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[L(s,{class:$(t.ns.e("close"))},{default:ce(()=>[(B(),_e(Gt(t.closeIcon||"close")))]),_:1},8,["class"])],42,vSe)):ve("v-if",!0)],2)):ve("v-if",!0),ie("div",{id:t.contentId,class:$(t.ns.e("content"))},[ie("div",{class:$(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(B(),_e(s,{key:0,class:$([t.ns.e("status"),t.typeClass])},{default:ce(()=>[(B(),_e(Gt(t.iconComponent)))]),_:1},8,["class"])):ve("v-if",!0),t.hasMessage?(B(),Q("div",{key:1,class:$(t.ns.e("message"))},[we(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(B(),_e(Gt(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(B(),_e(Gt(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0,textContent:We(t.message)},null,8,["for","textContent"]))])],2)):ve("v-if",!0)],2),Vt(ie("div",{class:$(t.ns.e("input"))},[L(a,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":e[2]||(e[2]=d=>t.inputValue=d),type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:$({invalid:t.validateError}),onKeydown:Pi(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),ie("div",{class:$(t.ns.e("errormsg")),style:mt({visibility:t.editorErrorMessage?"visible":"hidden"})},We(t.editorErrorMessage),7)],2),[[On,t.showInput]])],10,bSe),ie("div",{class:$(t.ns.e("btns"))},[t.showCancelButton?(B(),_e(l,{key:0,type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:$([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=Pi(Ot(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:ce(()=>[dt(We(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):ve("v-if",!0),Vt(L(l,{ref:"confirmRef",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:$([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:e[5]||(e[5]=d=>t.handleAction("confirm")),onKeydown:e[6]||(e[6]=Pi(Ot(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:ce(()=>[dt(We(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[On,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,pSe)]),_:3},8,["z-index","overlay-class","mask"]),[[On,t.visible]])]),_:3})}var wSe=Tr(gSe,[["render",ySe]]);const qv=new Map,_Se=t=>{let e=document.body;return t.appendTo&&(ot(t.appendTo)&&(e=document.querySelector(t.appendTo)),Qo(t.appendTo)&&(e=t.appendTo),Qo(e)||(e=document.body)),e},CSe=(t,e,n=null)=>{const i=L(wSe,t,Xe(t.message)||yi(t.message)?{default:Xe(t.message)?t.message:()=>t.message}:null);return i.appContext=n,Tm(i,e),_Se(t).appendChild(e.firstElementChild),i.component},SSe=()=>document.createElement("div"),kSe=(t,e)=>{const n=SSe();t.onVanish=()=>{Tm(null,n),qv.delete(r)},t.onAction=o=>{const s=qv.get(r);let a;t.showInput?a={value:r.inputValue,action:o}:a=o,t.callback?t.callback(a,i.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(a)};const i=CSe(t,n,e),r=i.proxy;for(const o in t)Jt(t,o)&&!Jt(r.$props,o)&&(o==="closeIcon"&&_t(t[o])?r[o]=ca(t[o]):r[o]=t[o]);return r.visible=!0,r};function hg(t,e=null){if(!Zt)return Promise.reject();let n;return ot(t)||yi(t)?t={message:t}:n=t.callback,new Promise((i,r)=>{const o=kSe(t,e??hg._context);qv.set(o,{options:t,callback:n,resolve:i,reject:r})})}const TSe=["alert","confirm","prompt"],ESe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};TSe.forEach(t=>{hg[t]=xSe(t)});function xSe(t){return(e,n,i,r)=>{let o="";return _t(n)?(i=n,o=""):pn(n)?o="":o=n,hg(Object.assign({title:o,message:e,type:"",...ESe[t]},i,{boxType:t}),r)}}hg.close=()=>{qv.forEach((t,e)=>{e.doClose()}),qv.clear()};hg._context=null;const Ju=hg;Ju.install=t=>{Ju._context=t._context,t.config.globalProperties.$msgbox=Ju,t.config.globalProperties.$messageBox=Ju,t.config.globalProperties.$alert=Ju.alert,t.config.globalProperties.$confirm=Ju.confirm,t.config.globalProperties.$prompt=Ju.prompt};const ASe=Ju,zq=["primary","success","info","warning","error"],PSe=qe({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:ri},id:{type:String,default:""},message:{type:me([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:me(Function),default:()=>{}},onClose:{type:me(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...zq,""],default:""},zIndex:Number,closeIcon:{type:ri,default:cl}}),ISe={destroy:()=>!0},RSe=["id"],MSe=["textContent"],OSe={key:0},LSe=["innerHTML"];var DSe=le({name:"ElNotification",__name:"notification",props:PSe,emits:ISe,setup(t,{expose:e}){const n=t,{ns:i,zIndex:r}=nR("notification"),{nextZIndex:o,currentZIndex:s}=r,a=H(!1);let l;const u=M(()=>{const b=n.type;return b&&$_[n.type]?i.m(b):""}),c=M(()=>n.type&&$_[n.type]||n.icon),d=M(()=>n.position.endsWith("right")?"right":"left"),f=M(()=>n.position.startsWith("top")?"top":"bottom"),h=M(()=>{var b;return{[f.value]:`${n.offset}px`,zIndex:(b=n.zIndex)!=null?b:s.value}});function m(){n.duration>0&&({stop:l}=Dv(()=>{a.value&&v()},n.duration))}function g(){l?.()}function v(){a.value=!1}function p(b){switch(Bn(b)){case Me.delete:case Me.backspace:g();break;case Me.esc:a.value&&v();break;default:m();break}}return Pt(()=>{m(),o(),a.value=!0}),Kn(document,"keydown",p),e({visible:a,close:v}),(b,y)=>(B(),_e(ya,{name:w(i).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:y[1]||(y[1]=_=>b.$emit("destroy")),persisted:""},{default:ce(()=>[Vt(ie("div",{id:t.id,class:$([w(i).b(),t.customClass,d.value]),style:mt(h.value),role:"alert",onMouseenter:g,onMouseleave:m,onClick:y[0]||(y[0]=(..._)=>t.onClick&&t.onClick(..._))},[c.value?(B(),_e(w(He),{key:0,class:$([w(i).e("icon"),u.value])},{default:ce(()=>[(B(),_e(Gt(c.value)))]),_:1},8,["class"])):ve("v-if",!0),ie("div",{class:$(w(i).e("group"))},[ie("h2",{class:$(w(i).e("title")),textContent:We(t.title)},null,10,MSe),Vt(ie("div",{class:$(w(i).e("content")),style:mt(t.title?void 0:{margin:0})},[we(b.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(B(),Q(rt,{key:1},[ve(" Caution here, message could've been compromised, never use user's input as message "),ie("p",{innerHTML:t.message},null,8,LSe)],2112)):(B(),Q("p",OSe,We(t.message),1))])],6),[[On,t.message]]),t.showClose?(B(),_e(w(He),{key:0,class:$(w(i).e("closeBtn")),onClick:Ot(v,["stop"])},{default:ce(()=>[(B(),_e(Gt(t.closeIcon)))]),_:1},8,["class"])):ve("v-if",!0)],2)],46,RSe),[[On,a.value]])]),_:3},8,["name","onBeforeLeave"]))}});const Bm={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},X_=16;let NSe=1;const _f=function(t={},e){if(!Zt)return{close:()=>{}};(ot(t)||yi(t))&&(t={message:t});const n=t.position||"top-right";let i=t.offset||0;Bm[n].forEach(({vm:c})=>{var d;i+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+X_}),i+=X_;const r=`notification_${NSe++}`,o=t.onClose,s={...t,offset:i,id:r,onClose:()=>{BSe(r,n,o)}};let a=document.body;Qo(t.appendTo)?a=t.appendTo:ot(t.appendTo)&&(a=document.querySelector(t.appendTo)),Qo(a)||(a=document.body);const l=document.createElement("div"),u=L(DSe,s,Xe(s.message)?s.message:yi(s.message)?()=>s.message:null);return u.appContext=pn(e)?_f._context:e,u.props.onDestroy=()=>{Tm(null,l)},Tm(u,l),Bm[n].push({vm:u}),a.appendChild(l.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};zq.forEach(t=>{_f[t]=(e={},n)=>((ot(e)||yi(e))&&(e={message:e}),_f({...e,type:t},n))});function BSe(t,e,n){const i=Bm[e],r=i.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===t});if(r===-1)return;const{vm:o}=i[r];if(!o)return;n?.(o);const s=o.el.offsetHeight,a=e.split("-")[0];i.splice(r,1);const l=i.length;if(!(l<1))for(let u=r;u<l;u++){const{el:c,component:d}=i[u].vm,f=Number.parseInt(c.style[a],10)-s-X_;d.props.offset=f}}function VSe(){for(const t of Object.values(Bm))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function FSe(t="top-right"){var e,n,i,r;let o=((i=(n=(e=Bm[t][0])==null?void 0:e.vm.component)==null?void 0:n.props)==null?void 0:i.offset)||0;for(const{vm:s}of Bm[t])s.component.props.offset=o,o+=(((r=s.el)==null?void 0:r.offsetHeight)||0)+X_}_f.closeAll=VSe;_f.updateOffsets=FSe;_f._context=null;const $Se=Yce(_f,"$notify"),zSe="_login_wrapper_lufec_1",HSe="_particles_lufec_32",USe="_particle_lufec_32",WSe="_container_lufec_120",qSe="_login_cover_lufec_142",jSe="_cube_container_lufec_154",KSe="_cube_lufec_154",GSe="_cube_face_lufec_170",YSe="_cube_front_lufec_184",XSe="_cube_back_lufec_187",JSe="_cube_right_lufec_190",ZSe="_cube_left_lufec_193",QSe="_cube_top_lufec_196",eke="_cube_bottom_lufec_199",tke="_login_title_lufec_202",nke="_login_subtitle_lufec_213",ike="_waves_lufec_221",rke="_wave_lufec_221",oke="_wave_1_lufec_239",ske="_wave_2_lufec_244",ake="_wave_3_lufec_250",lke="_bubbles_lufec_256",uke="_bubble_lufec_256",cke="_login_body_lufec_346",dke="_login_body_title_lufec_352",fke="_remember_wrapper_lufec_392",hke="_login_button_lufec_496",bn={login_wrapper:zSe,particles:HSe,particle:USe,container:WSe,login_cover:qSe,cube_container:jSe,cube:KSe,cube_face:GSe,cube_front:YSe,cube_back:XSe,cube_right:JSe,cube_left:ZSe,cube_top:QSe,cube_bottom:eke,login_title:tke,login_subtitle:nke,waves:ike,wave:rke,wave_1:oke,wave_2:ske,wave_3:ake,bubbles:lke,bubble:uke,login_body:cke,login_body_title:dke,remember_wrapper:fke,login_button:hke};const Lh=typeof document<"u";function Hq(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function mke(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&Hq(t.default)}const In=Object.assign;function Fk(t,e){const n={};for(const i in e){const r=e[i];n[i]=ma(r)?r.map(t):t(r)}return n}const Gp=()=>{},ma=Array.isArray;function n3(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}let Ti=(function(t){return t[t.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",t[t.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",t[t.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",t[t.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",t[t.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",t})({});const Uq=Symbol("");Ti.MATCHER_NOT_FOUND+"",Ti.NAVIGATION_GUARD_REDIRECT+"",Ti.NAVIGATION_ABORTED+"",Ti.NAVIGATION_CANCELLED+"",Ti.NAVIGATION_DUPLICATED+"";function Vm(t,e){return In(new Error,{type:t,[Uq]:!0},e)}function Pl(t,e){return t instanceof Error&&Uq in t&&(e==null||!!(t.type&e))}const gke=["params","query","hash"];function pke(t){if(typeof t=="string")return t;if(t.path!=null)return t.path;const e={};for(const n of gke)n in t&&(e[n]=t[n]);return JSON.stringify(e,null,2)}const vke=Symbol(""),i3=Symbol(""),WC=Symbol(""),YR=Symbol(""),H2=Symbol("");function XR(){return Ne(WC)}function Wq(t){return Ne(YR)}const qq=/#/g,bke=/&/g,yke=/\//g,wke=/=/g,_ke=/\?/g,jq=/\+/g,Cke=/%5B/g,Ske=/%5D/g,Kq=/%5E/g,kke=/%60/g,Gq=/%7B/g,Tke=/%7C/g,Yq=/%7D/g,Eke=/%20/g;function JR(t){return t==null?"":encodeURI(""+t).replace(Tke,"|").replace(Cke,"[").replace(Ske,"]")}function xke(t){return JR(t).replace(Gq,"{").replace(Yq,"}").replace(Kq,"^")}function U2(t){return JR(t).replace(jq,"%2B").replace(Eke,"+").replace(qq,"%23").replace(bke,"%26").replace(kke,"`").replace(Gq,"{").replace(Yq,"}").replace(Kq,"^")}function Ake(t){return U2(t).replace(wke,"%3D")}function Pke(t){return JR(t).replace(qq,"%23").replace(_ke,"%3F")}function Ike(t){return Pke(t).replace(yke,"%2F")}function jv(t){if(t==null)return null;try{return decodeURIComponent(""+t)}catch{}return""+t}const Rke=/\/$/,Mke=t=>t.replace(Rke,"");function $k(t,e,n="/"){let i,r={},o="",s="";const a=e.indexOf("#");let l=e.indexOf("?");return l=a>=0&&l>a?-1:l,l>=0&&(i=e.slice(0,l),o=e.slice(l,a>0?a:e.length),r=t(o.slice(1))),a>=0&&(i=i||e.slice(0,a),s=e.slice(a,e.length)),i=Nke(i??e,n),{fullPath:i+o+s,path:i,query:r,hash:jv(s)}}function Oke(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function r3(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function Lke(t,e,n){const i=e.matched.length-1,r=n.matched.length-1;return i>-1&&i===r&&Fm(e.matched[i],n.matched[r])&&Xq(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Fm(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function Xq(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var n in t)if(!Dke(t[n],e[n]))return!1;return!0}function Dke(t,e){return ma(t)?o3(t,e):ma(e)?o3(e,t):(t&&t.valueOf())===(e&&e.valueOf())}function o3(t,e){return ma(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function Nke(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),r=i[i.length-1];(r===".."||r===".")&&i.push("");let o=n.length-1,s,a;for(s=0;s<i.length;s++)if(a=i[s],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+i.slice(s).join("/")}const Ou={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let W2=(function(t){return t.pop="pop",t.push="push",t})({}),zk=(function(t){return t.back="back",t.forward="forward",t.unknown="",t})({});function Bke(t){if(!t)if(Lh){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),Mke(t)}const Vke=/^[^#]+#/;function Fke(t,e){return t.replace(Vke,"#")+e}function $ke(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const qC=()=>({left:window.scrollX,top:window.scrollY});function zke(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;e=$ke(r,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function s3(t,e){return(history.state?history.state.position-e:-1)+t}const q2=new Map;function Hke(t,e){q2.set(t,e)}function Uke(t){const e=q2.get(t);return q2.delete(t),e}function Wke(t){return typeof t=="string"||t&&typeof t=="object"}function Jq(t){return typeof t=="string"||typeof t=="symbol"}function qke(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;i<n.length;++i){const r=n[i].replace(jq," "),o=r.indexOf("="),s=jv(o<0?r:r.slice(0,o)),a=o<0?null:jv(r.slice(o+1));if(s in e){let l=e[s];ma(l)||(l=e[s]=[l]),l.push(a)}else e[s]=a}return e}function a3(t){let e="";for(let n in t){const i=t[n];if(n=Ake(n),i==null){i!==void 0&&(e+=(e.length?"&":"")+n);continue}(ma(i)?i.map(r=>r&&U2(r)):[i&&U2(i)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function jke(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=ma(i)?i.map(r=>r==null?null:""+r):i==null?i:""+i)}return e}function Lg(){let t=[];function e(i){return t.push(i),()=>{const r=t.indexOf(i);r>-1&&t.splice(r,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function ic(t,e,n,i,r,o=s=>s()){const s=i&&(i.enterCallbacks[r]=i.enterCallbacks[r]||[]);return()=>new Promise((a,l)=>{const u=f=>{f===!1?l(Vm(Ti.NAVIGATION_ABORTED,{from:n,to:e})):f instanceof Error?l(f):Wke(f)?l(Vm(Ti.NAVIGATION_GUARD_REDIRECT,{from:e,to:f})):(s&&i.enterCallbacks[r]===s&&typeof f=="function"&&s.push(f),a())},c=o(()=>t.call(i&&i.instances[r],e,n,u));let d=Promise.resolve(c);t.length<3&&(d=d.then(u)),d.catch(f=>l(f))})}function Hk(t,e,n,i,r=o=>o()){const o=[];for(const s of t)for(const a in s.components){let l=s.components[a];if(!(e!=="beforeRouteEnter"&&!s.instances[a]))if(Hq(l)){const u=(l.__vccOpts||l)[e];u&&o.push(ic(u,n,i,s,a,r))}else{let u=l();o.push(()=>u.then(c=>{if(!c)throw new Error(`Couldn't resolve component "${a}" at "${s.path}"`);const d=mke(c)?c.default:c;s.mods[a]=c,s.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&ic(f,n,i,s,a,r)()}))}}return o}function Kke(t,e){const n=[],i=[],r=[],o=Math.max(e.matched.length,t.matched.length);for(let s=0;s<o;s++){const a=e.matched[s];a&&(t.matched.find(u=>Fm(u,a))?i.push(a):n.push(a));const l=t.matched[s];l&&(e.matched.find(u=>Fm(u,l))||r.push(l))}return[n,i,r]}let Gke=()=>location.protocol+"//"+location.host;function Zq(t,e){const{pathname:n,search:i,hash:r}=e,o=t.indexOf("#");if(o>-1){let s=r.includes(t.slice(o))?t.slice(o).length:1,a=r.slice(s);return a[0]!=="/"&&(a="/"+a),r3(a,"")}return r3(n,t)+i+r}function Yke(t,e,n,i){let r=[],o=[],s=null;const a=({state:f})=>{const h=Zq(t,location),m=n.value,g=e.value;let v=0;if(f){if(n.value=h,e.value=f,s&&s===m){s=null;return}v=g?f.position-g.position:0}else i(h);r.forEach(p=>{p(n.value,m,{delta:v,type:W2.pop,direction:v?v>0?zk.forward:zk.back:zk.unknown})})};function l(){s=n.value}function u(f){r.push(f);const h=()=>{const m=r.indexOf(f);m>-1&&r.splice(m,1)};return o.push(h),h}function c(){if(document.visibilityState==="hidden"){const{history:f}=window;if(!f.state)return;f.replaceState(In({},f.state,{scroll:qC()}),"")}}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",a),window.removeEventListener("pagehide",c),document.removeEventListener("visibilitychange",c)}return window.addEventListener("popstate",a),window.addEventListener("pagehide",c),document.addEventListener("visibilitychange",c),{pauseListeners:l,listen:u,destroy:d}}function l3(t,e,n,i=!1,r=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:r?qC():null}}function Xke(t){const{history:e,location:n}=window,i={value:Zq(t,n)},r={value:e.state};r.value||o(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,u,c){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:Gke()+t+l;try{e[c?"replaceState":"pushState"](u,"",f),r.value=u}catch(h){console.error(h),n[c?"replace":"assign"](f)}}function s(l,u){o(l,In({},e.state,l3(r.value.back,l,r.value.forward,!0),u,{position:r.value.position}),!0),i.value=l}function a(l,u){const c=In({},r.value,e.state,{forward:l,scroll:qC()});o(c.current,c,!0),o(l,In({},l3(i.value,l,null),{position:c.position+1},u),!1),i.value=l}return{location:i,state:r,push:a,replace:s}}function Jke(t){t=Bke(t);const e=Xke(t),n=Yke(t,e.state,e.location,e.replace);function i(o,s=!0){s||n.pauseListeners(),history.go(o)}const r=In({location:"",base:t,go:i,createHref:Fke.bind(null,t)},e,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>e.state.value}),r}function Zke(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),Jke(t)}let jd=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.Group=2]="Group",t})({});var er=(function(t){return t[t.Static=0]="Static",t[t.Param=1]="Param",t[t.ParamRegExp=2]="ParamRegExp",t[t.ParamRegExpEnd=3]="ParamRegExpEnd",t[t.EscapeNext=4]="EscapeNext",t})(er||{});const Qke={type:jd.Static,value:""},eTe=/[a-zA-Z0-9_]/;function tTe(t){if(!t)return[[]];if(t==="/")return[[Qke]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=er.Static,i=n;const r=[];let o;function s(){o&&r.push(o),o=[]}let a=0,l,u="",c="";function d(){u&&(n===er.Static?o.push({type:jd.Static,value:u}):n===er.Param||n===er.ParamRegExp||n===er.ParamRegExpEnd?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),o.push({type:jd.Param,value:u,regexp:c,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),u="")}function f(){u+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==er.ParamRegExp){i=n,n=er.EscapeNext;continue}switch(n){case er.Static:l==="/"?(u&&d(),s()):l===":"?(d(),n=er.Param):f();break;case er.EscapeNext:f(),n=i;break;case er.Param:l==="("?n=er.ParamRegExp:eTe.test(l)?f():(d(),n=er.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case er.ParamRegExp:l===")"?c[c.length-1]=="\\"?c=c.slice(0,-1)+l:n=er.ParamRegExpEnd:c+=l;break;case er.ParamRegExpEnd:d(),n=er.Static,l!=="*"&&l!=="?"&&l!=="+"&&a--,c="";break;default:e("Unknown state");break}}return n===er.ParamRegExp&&e(`Unfinished custom RegExp for param "${u}"`),d(),s(),r}const u3="[^/]+?",nTe={sensitive:!1,strict:!1,start:!0,end:!0};var Xr=(function(t){return t[t._multiplier=10]="_multiplier",t[t.Root=90]="Root",t[t.Segment=40]="Segment",t[t.SubSegment=30]="SubSegment",t[t.Static=40]="Static",t[t.Dynamic=20]="Dynamic",t[t.BonusCustomRegExp=10]="BonusCustomRegExp",t[t.BonusWildcard=-50]="BonusWildcard",t[t.BonusRepeatable=-20]="BonusRepeatable",t[t.BonusOptional=-8]="BonusOptional",t[t.BonusStrict=.7000000000000001]="BonusStrict",t[t.BonusCaseSensitive=.25]="BonusCaseSensitive",t})(Xr||{});const iTe=/[.+*?^${}()[\]/\\]/g;function rTe(t,e){const n=In({},nTe,e),i=[];let r=n.start?"^":"";const o=[];for(const u of t){const c=u.length?[]:[Xr.Root];n.strict&&!u.length&&(r+="/");for(let d=0;d<u.length;d++){const f=u[d];let h=Xr.Segment+(n.sensitive?Xr.BonusCaseSensitive:0);if(f.type===jd.Static)d||(r+="/"),r+=f.value.replace(iTe,"\\$&"),h+=Xr.Static;else if(f.type===jd.Param){const{value:m,repeatable:g,optional:v,regexp:p}=f;o.push({name:m,repeatable:g,optional:v});const b=p||u3;if(b!==u3){h+=Xr.BonusCustomRegExp;try{new RegExp(`(${b})`)}catch(_){throw new Error(`Invalid custom RegExp for param "${m}" (${b}): `+_.message)}}let y=g?`((?:${b})(?:/(?:${b}))*)`:`(${b})`;d||(y=v&&u.length<2?`(?:/${y})`:"/"+y),v&&(y+="?"),r+=y,h+=Xr.Dynamic,v&&(h+=Xr.BonusOptional),g&&(h+=Xr.BonusRepeatable),b===".*"&&(h+=Xr.BonusWildcard)}c.push(h)}i.push(c)}if(n.strict&&n.end){const u=i.length-1;i[u][i[u].length-1]+=Xr.BonusStrict}n.strict||(r+="/?"),n.end?r+="$":n.strict&&!r.endsWith("/")&&(r+="(?:/|$)");const s=new RegExp(r,n.sensitive?"":"i");function a(u){const c=u.match(s),d={};if(!c)return null;for(let f=1;f<c.length;f++){const h=c[f]||"",m=o[f-1];d[m.name]=h&&m.repeatable?h.split("/"):h}return d}function l(u){let c="",d=!1;for(const f of t){(!d||!c.endsWith("/"))&&(c+="/"),d=!1;for(const h of f)if(h.type===jd.Static)c+=h.value;else if(h.type===jd.Param){const{value:m,repeatable:g,optional:v}=h,p=m in u?u[m]:"";if(ma(p)&&!g)throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);const b=ma(p)?p.join("/"):p;if(!b)if(v)f.length<2&&(c.endsWith("/")?c=c.slice(0,-1):d=!0);else throw new Error(`Missing required param "${m}"`);c+=b}}return c||"/"}return{re:s,score:i,keys:o,parse:a,stringify:l}}function oTe(t,e){let n=0;for(;n<t.length&&n<e.length;){const i=e[n]-t[n];if(i)return i;n++}return t.length<e.length?t.length===1&&t[0]===Xr.Static+Xr.Segment?-1:1:t.length>e.length?e.length===1&&e[0]===Xr.Static+Xr.Segment?1:-1:0}function Qq(t,e){let n=0;const i=t.score,r=e.score;for(;n<i.length&&n<r.length;){const o=oTe(i[n],r[n]);if(o)return o;n++}if(Math.abs(r.length-i.length)===1){if(c3(i))return 1;if(c3(r))return-1}return r.length-i.length}function c3(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const sTe={strict:!1,end:!0,sensitive:!1};function aTe(t,e,n){const i=rTe(tTe(t.path),n),r=In(i,{record:t,parent:e,children:[],alias:[]});return e&&!r.record.aliasOf==!e.record.aliasOf&&e.children.push(r),r}function lTe(t,e){const n=[],i=new Map;e=n3(sTe,e);function r(d){return i.get(d)}function o(d,f,h){const m=!h,g=f3(d);g.aliasOf=h&&h.record;const v=n3(e,d),p=[g];if("alias"in d){const _=typeof d.alias=="string"?[d.alias]:d.alias;for(const C of _)p.push(f3(In({},g,{components:h?h.record.components:g.components,path:C,aliasOf:h?h.record:g})))}let b,y;for(const _ of p){const{path:C}=_;if(f&&C[0]!=="/"){const S=f.record.path,k=S[S.length-1]==="/"?"":"/";_.path=f.record.path+(C&&k+C)}if(b=aTe(_,f,v),h?h.alias.push(b):(y=y||b,y!==b&&y.alias.push(b),m&&d.name&&!h3(b)&&s(d.name)),ej(b)&&l(b),g.children){const S=g.children;for(let k=0;k<S.length;k++)o(S[k],b,h&&h.children[k])}h=h||b}return y?()=>{s(y)}:Gp}function s(d){if(Jq(d)){const f=i.get(d);f&&(i.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(s),f.alias.forEach(s))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&i.delete(d.record.name),d.children.forEach(s),d.alias.forEach(s))}}function a(){return n}function l(d){const f=dTe(d,n);n.splice(f,0,d),d.record.name&&!h3(d)&&i.set(d.record.name,d)}function u(d,f){let h,m={},g,v;if("name"in d&&d.name){if(h=i.get(d.name),!h)throw Vm(Ti.MATCHER_NOT_FOUND,{location:d});v=h.record.name,m=In(d3(f.params,h.keys.filter(y=>!y.optional).concat(h.parent?h.parent.keys.filter(y=>y.optional):[]).map(y=>y.name)),d.params&&d3(d.params,h.keys.map(y=>y.name))),g=h.stringify(m)}else if(d.path!=null)g=d.path,h=n.find(y=>y.re.test(g)),h&&(m=h.parse(g),v=h.record.name);else{if(h=f.name?i.get(f.name):n.find(y=>y.re.test(f.path)),!h)throw Vm(Ti.MATCHER_NOT_FOUND,{location:d,currentLocation:f});v=h.record.name,m=In({},f.params,d.params),g=h.stringify(m)}const p=[];let b=h;for(;b;)p.unshift(b.record),b=b.parent;return{name:v,path:g,params:m,matched:p,meta:cTe(p)}}t.forEach(d=>o(d));function c(){n.length=0,i.clear()}return{addRoute:o,resolve:u,removeRoute:s,clearRoutes:c,getRoutes:a,getRecordMatcher:r}}function d3(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function f3(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:uTe(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function uTe(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function h3(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function cTe(t){return t.reduce((e,n)=>In(e,n.meta),{})}function dTe(t,e){let n=0,i=e.length;for(;n!==i;){const o=n+i>>1;Qq(t,e[o])<0?i=o:n=o+1}const r=fTe(t);return r&&(i=e.lastIndexOf(r,i-1)),i}function fTe(t){let e=t;for(;e=e.parent;)if(ej(e)&&Qq(t,e)===0)return e}function ej({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function m3(t){const e=Ne(WC),n=Ne(YR),i=M(()=>{const l=w(t.to);return e.resolve(l)}),r=M(()=>{const{matched:l}=i.value,{length:u}=l,c=l[u-1],d=n.matched;if(!c||!d.length)return-1;const f=d.findIndex(Fm.bind(null,c));if(f>-1)return f;const h=g3(l[u-2]);return u>1&&g3(c)===h&&d[d.length-1].path!==h?d.findIndex(Fm.bind(null,l[u-2])):f}),o=M(()=>r.value>-1&&vTe(n.params,i.value.params)),s=M(()=>r.value>-1&&r.value===n.matched.length-1&&Xq(n.params,i.value.params));function a(l={}){if(pTe(l)){const u=e[w(t.replace)?"replace":"push"](w(t.to)).catch(Gp);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>u),u}return Promise.resolve()}return{route:i,href:M(()=>i.value.href),isActive:o,isExactActive:s,navigate:a}}function hTe(t){return t.length===1?t[0]:t}const mTe=le({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:m3,setup(t,{slots:e}){const n=on(m3(t)),{options:i}=Ne(WC),r=M(()=>({[p3(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[p3(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&hTe(e.default(n));return t.custom?o:nt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}}),gTe=mTe;function pTe(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function vTe(t,e){for(const n in e){const i=e[n],r=t[n];if(typeof i=="string"){if(i!==r)return!1}else if(!ma(r)||r.length!==i.length||i.some((o,s)=>o.valueOf()!==r[s].valueOf()))return!1}return!0}function g3(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const p3=(t,e,n)=>t??e??n,bTe=le({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=Ne(H2),r=M(()=>t.route||i.value),o=Ne(i3,0),s=M(()=>{let u=w(o);const{matched:c}=r.value;let d;for(;(d=c[u])&&!d.components;)u++;return u}),a=M(()=>r.value.matched[s.value]);qt(i3,M(()=>s.value+1)),qt(vke,a),qt(H2,r);const l=H();return Se(()=>[l.value,a.value,t.name],([u,c,d],[f,h,m])=>{c&&(c.instances[d]=u,h&&h!==c&&u&&u===f&&(c.leaveGuards.size||(c.leaveGuards=h.leaveGuards),c.updateGuards.size||(c.updateGuards=h.updateGuards))),u&&c&&(!h||!Fm(c,h)||!f)&&(c.enterCallbacks[d]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,c=t.name,d=a.value,f=d&&d.components[c];if(!f)return v3(n.default,{Component:f,route:u});const h=d.props[c],m=h?h===!0?u.params:typeof h=="function"?h(u):h:null,v=nt(f,In({},m,e,{onVnodeUnmounted:p=>{p.component.isUnmounted&&(d.instances[c]=null)},ref:l}));return v3(n.default,{Component:v,route:u})||v}}});function v3(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const yTe=bTe;function wTe(t){const e=lTe(t.routes,t),n=t.parseQuery||qke,i=t.stringifyQuery||a3,r=t.history,o=Lg(),s=Lg(),a=Lg(),l=bi(Ou);let u=Ou;Lh&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Fk.bind(null,X=>""+X),d=Fk.bind(null,Ike),f=Fk.bind(null,jv);function h(X,se){let re,ee;return Jq(X)?(re=e.getRecordMatcher(X),ee=se):ee=X,e.addRoute(ee,re)}function m(X){const se=e.getRecordMatcher(X);se&&e.removeRoute(se)}function g(){return e.getRoutes().map(X=>X.record)}function v(X){return!!e.getRecordMatcher(X)}function p(X,se){if(se=In({},se||l.value),typeof X=="string"){const G=$k(n,X,se.path),ye=e.resolve({path:G.path},se),be=r.createHref(G.fullPath);return In(G,ye,{params:f(ye.params),hash:jv(G.hash),redirectedFrom:void 0,href:be})}let re;if(X.path!=null)re=In({},X,{path:$k(n,X.path,se.path).path});else{const G=In({},X.params);for(const ye in G)G[ye]==null&&delete G[ye];re=In({},X,{params:d(G)}),se.params=d(se.params)}const ee=e.resolve(re,se),te=X.hash||"";ee.params=c(f(ee.params));const V=Oke(i,In({},X,{hash:xke(te),path:ee.path})),K=r.createHref(V);return In({fullPath:V,hash:te,query:i===a3?jke(X.query):X.query||{}},ee,{redirectedFrom:void 0,href:K})}function b(X){return typeof X=="string"?$k(n,X,l.value.path):In({},X)}function y(X,se){if(u!==X)return Vm(Ti.NAVIGATION_CANCELLED,{from:se,to:X})}function _(X){return k(X)}function C(X){return _(In(b(X),{replace:!0}))}function S(X,se){const re=X.matched[X.matched.length-1];if(re&&re.redirect){const{redirect:ee}=re;let te=typeof ee=="function"?ee(X,se):ee;return typeof te=="string"&&(te=te.includes("?")||te.includes("#")?te=b(te):{path:te},te.params={}),In({query:X.query,hash:X.hash,params:te.path!=null?{}:X.params},te)}}function k(X,se){const re=u=p(X),ee=l.value,te=X.state,V=X.force,K=X.replace===!0,G=S(re,ee);if(G)return k(In(b(G),{state:typeof G=="object"?In({},te,G.state):te,force:V,replace:K}),se||re);const ye=re;ye.redirectedFrom=se;let be;return!V&&Lke(i,ee,re)&&(be=Vm(Ti.NAVIGATION_DUPLICATED,{to:ye,from:ee}),j(ee,ee,!0,!1)),(be?Promise.resolve(be):x(ye,ee)).catch(Ce=>Pl(Ce)?Pl(Ce,Ti.NAVIGATION_GUARD_REDIRECT)?Ce:F(Ce):O(Ce,ye,ee)).then(Ce=>{if(Ce){if(Pl(Ce,Ti.NAVIGATION_GUARD_REDIRECT))return k(In({replace:K},b(Ce.to),{state:typeof Ce.to=="object"?In({},te,Ce.to.state):te,force:V}),se||ye)}else Ce=A(ye,ee,!0,K,te);return P(ye,ee,Ce),Ce})}function T(X,se){const re=y(X,se);return re?Promise.reject(re):Promise.resolve()}function E(X){const se=J.values().next().value;return se&&typeof se.runWithContext=="function"?se.runWithContext(X):X()}function x(X,se){let re;const[ee,te,V]=Kke(X,se);re=Hk(ee.reverse(),"beforeRouteLeave",X,se);for(const G of ee)G.leaveGuards.forEach(ye=>{re.push(ic(ye,X,se))});const K=T.bind(null,X,se);return re.push(K),he(re).then(()=>{re=[];for(const G of o.list())re.push(ic(G,X,se));return re.push(K),he(re)}).then(()=>{re=Hk(te,"beforeRouteUpdate",X,se);for(const G of te)G.updateGuards.forEach(ye=>{re.push(ic(ye,X,se))});return re.push(K),he(re)}).then(()=>{re=[];for(const G of V)if(G.beforeEnter)if(ma(G.beforeEnter))for(const ye of G.beforeEnter)re.push(ic(ye,X,se));else re.push(ic(G.beforeEnter,X,se));return re.push(K),he(re)}).then(()=>(X.matched.forEach(G=>G.enterCallbacks={}),re=Hk(V,"beforeRouteEnter",X,se,E),re.push(K),he(re))).then(()=>{re=[];for(const G of s.list())re.push(ic(G,X,se));return re.push(K),he(re)}).catch(G=>Pl(G,Ti.NAVIGATION_CANCELLED)?G:Promise.reject(G))}function P(X,se,re){a.list().forEach(ee=>E(()=>ee(X,se,re)))}function A(X,se,re,ee,te){const V=y(X,se);if(V)return V;const K=se===Ou,G=Lh?history.state:{};re&&(ee||K?r.replace(X.fullPath,In({scroll:K&&G&&G.scroll},te)):r.push(X.fullPath,te)),l.value=X,j(X,se,re,K),F()}let I;function D(){I||(I=r.listen((X,se,re)=>{if(!ne.listening)return;const ee=p(X),te=S(ee,ne.currentRoute.value);if(te){k(In(te,{replace:!0,force:!0}),ee).catch(Gp);return}u=ee;const V=l.value;Lh&&Hke(s3(V.fullPath,re.delta),qC()),x(ee,V).catch(K=>Pl(K,Ti.NAVIGATION_ABORTED|Ti.NAVIGATION_CANCELLED)?K:Pl(K,Ti.NAVIGATION_GUARD_REDIRECT)?(k(In(b(K.to),{force:!0}),ee).then(G=>{Pl(G,Ti.NAVIGATION_ABORTED|Ti.NAVIGATION_DUPLICATED)&&!re.delta&&re.type===W2.pop&&r.go(-1,!1)}).catch(Gp),Promise.reject()):(re.delta&&r.go(-re.delta,!1),O(K,ee,V))).then(K=>{K=K||A(ee,V,!1),K&&(re.delta&&!Pl(K,Ti.NAVIGATION_CANCELLED)?r.go(-re.delta,!1):re.type===W2.pop&&Pl(K,Ti.NAVIGATION_ABORTED|Ti.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),P(ee,V,K)}).catch(Gp)}))}let q=Lg(),z=Lg(),R;function O(X,se,re){F(X);const ee=z.list();return ee.length?ee.forEach(te=>te(X,se,re)):console.error(X),Promise.reject(X)}function N(){return R&&l.value!==Ou?Promise.resolve():new Promise((X,se)=>{q.add([X,se])})}function F(X){return R||(R=!X,D(),q.list().forEach(([se,re])=>X?re(X):se()),q.reset()),X}function j(X,se,re,ee){const{scrollBehavior:te}=t;if(!Lh||!te)return Promise.resolve();const V=!re&&Uke(s3(X.fullPath,0))||(ee||!re)&&history.state&&history.state.scroll||null;return Ye().then(()=>te(X,se,V)).then(K=>K&&zke(K)).catch(K=>O(K,X,se))}const U=X=>r.go(X);let W;const J=new Set,ne={currentRoute:l,listening:!0,addRoute:h,removeRoute:m,clearRoutes:e.clearRoutes,hasRoute:v,getRoutes:g,resolve:p,options:t,push:_,replace:C,go:U,back:()=>U(-1),forward:()=>U(1),beforeEach:o.add,beforeResolve:s.add,afterEach:a.add,onError:z.add,isReady:N,install(X){X.component("RouterLink",gTe),X.component("RouterView",yTe),X.config.globalProperties.$router=ne,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>w(l)}),Lh&&!W&&l.value===Ou&&(W=!0,_(r.location).catch(ee=>{}));const se={};for(const ee in Ou)Object.defineProperty(se,ee,{get:()=>l.value[ee],enumerable:!0});X.provide(WC,ne),X.provide(YR,Lp(se)),X.provide(H2,l);const re=X.unmount;J.add(X),X.unmount=function(){J.delete(X),J.size<1&&(u=Ou,I&&I(),I=null,l.value=Ou,W=!1,R=!1),re()}}};function he(X){return X.reduce((se,re)=>se.then(()=>E(re)),Promise.resolve())}return ne}const _Te=t=>{const e=[...t].sort((r,o)=>{const s=r.path.split("/").filter(l=>l!=="").length,a=o.path.split("/").filter(l=>l!=="").length;return s-a}),n=new Map,i=[];for(const r of e){const o=r.path.split("/").filter(u=>u!==""),s={...r,children:[]};if(n.set(r.path,s),o.length===0){i.push(s);continue}const a="/"+o.slice(0,-1).join("/"),l=n.get(a);l?l.children?.push(s):i.push(s)}return i},vn=t=>t,CTe=(t,e)=>{const n=Object.entries(t).map(([i,r])=>{const o=r||{},s=i.replace("../views","").replace(/View/g,"").replace("/index.tsx","")||"/",a=s.split("/").filter(Boolean).join("-")||"/";return{path:s,name:a,meta:o.meta,redirect:o.redirect,component:e[i]}});return _Te(n)},bc={getStorage(){return window.localStorage},get(t){const e=this.getStorage().getItem(t)||"";try{const n=JSON.parse(e);return n.expire>0&&n.expire<=Date.now()?"":n.value}catch{return""}},set(t,e,n=0){const i=JSON.stringify({value:e,expire:n>0?Date.now()+n*1e3:n});return this.getStorage().setItem(t,i),this},remove(t){this.getStorage().removeItem(t)}};let tj;const ZR=t=>tj=t,STe=Symbol();function j2(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Yp;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Yp||(Yp={}));const nj=()=>{};function b3(t,e,n,i=nj){t.add(e);const r=()=>{t.delete(e)&&i()};return!n&&cC()&&dC(r),r}function oh(t,...e){t.forEach(n=>{n(...e)})}const kTe=t=>t(),y3=Symbol(),Uk=Symbol();function K2(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],r=t[n];j2(r)&&j2(i)&&t.hasOwnProperty(n)&&!rn(i)&&!na(i)?t[n]=K2(r,i):t[n]=i}return t}const TTe=Symbol();function ETe(t){return!j2(t)||!Object.prototype.hasOwnProperty.call(t,TTe)}const{assign:Zu}=Object;function xTe(t){return!!(rn(t)&&t.effect)}function ATe(t,e,n,i){const{state:r,actions:o,getters:s}=e,a=n.state.value[t];let l;function u(){a||(n.state.value[t]=r?r():{});const c=Sr(n.state.value[t]);return Zu(c,o,Object.keys(s||{}).reduce((d,f)=>(d[f]=ca(M(()=>{ZR(n);const h=n._s.get(t);return s[f].call(h,h)})),d),{}))}return l=ij(t,u,e,n,i,!0),l}function ij(t,e,n={},i,r,o){let s;const a=Zu({actions:{}},n),l={deep:!0};let u,c,d=new Set,f=new Set,h;const m=i.state.value[t];!o&&!m&&(i.state.value[t]={});let g;function v(T){let E;u=c=!1,typeof T=="function"?(T(i.state.value[t]),E={type:Yp.patchFunction,storeId:t,events:h}):(K2(i.state.value[t],T),E={type:Yp.patchObject,payload:T,storeId:t,events:h});const x=g=Symbol();Ye().then(()=>{g===x&&(u=!0)}),c=!0,oh(d,E,i.state.value[t])}const p=o?function(){const{state:E}=n,x=E?E():{};this.$patch(P=>{Zu(P,x)})}:nj;function b(){s.stop(),d.clear(),f.clear(),i._s.delete(t)}const y=(T,E="")=>{if(y3 in T)return T[Uk]=E,T;const x=function(){ZR(i);const P=Array.from(arguments),A=new Set,I=new Set;function D(R){A.add(R)}function q(R){I.add(R)}oh(f,{args:P,name:x[Uk],store:C,after:D,onError:q});let z;try{z=T.apply(this&&this.$id===t?this:C,P)}catch(R){throw oh(I,R),R}return z instanceof Promise?z.then(R=>(oh(A,R),R)).catch(R=>(oh(I,R),Promise.reject(R))):(oh(A,z),z)};return x[y3]=!0,x[Uk]=E,x},_={_p:i,$id:t,$onAction:b3.bind(null,f),$patch:v,$reset:p,$subscribe(T,E={}){const x=b3(d,T,E.detached,()=>P()),P=s.run(()=>Se(()=>i.state.value[t],A=>{(E.flush==="sync"?c:u)&&T({storeId:t,type:Yp.direct,events:h},A)},Zu({},l,E)));return x},$dispose:b},C=on(_);i._s.set(t,C);const k=(i._a&&i._a.runWithContext||kTe)(()=>i._e.run(()=>(s=zb()).run(()=>e({action:y}))));for(const T in k){const E=k[T];if(rn(E)&&!xTe(E)||na(E))o||(m&&ETe(E)&&(rn(E)?E.value=m[T]:K2(E,m[T])),i.state.value[t][T]=E);else if(typeof E=="function"){const x=y(E,T);k[T]=x,a.actions[T]=E}}return Zu(C,k),Zu(ln(C),k),Object.defineProperty(C,"$state",{get:()=>i.state.value[t],set:T=>{v(E=>{Zu(E,T)})}}),i._p.forEach(T=>{Zu(C,s.run(()=>T({store:C,app:i._a,pinia:i,options:a})))}),m&&o&&n.hydrate&&n.hydrate(C.$state,m),u=!0,c=!0,C}function PTe(t,e,n){let i;const r=typeof e=="function";i=r?n:e;function o(s,a){const l=tz();return s=s||(l?Ne(STe,null):null),s&&ZR(s),s=tj,s._s.has(t)||(r?ij(t,e,i,s):ATe(t,i,s)),s._s.get(t)}return o.$id=t,o}function ITe(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const J_=typeof window<"u",Uc=(t,e=!1)=>e?Symbol.for(t):Symbol(t),RTe=(t,e,n)=>MTe({l:t,k:e,s:n}),MTe=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Xi=t=>typeof t=="number"&&isFinite(t),rj=t=>QR(t)==="[object Date]",$m=t=>QR(t)==="[object RegExp]",jC=t=>yn(t)&&Object.keys(t).length===0,rr=Object.assign,OTe=Object.create,Un=(t=null)=>OTe(t);let w3;const Kd=()=>w3||(w3=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Un());function _3(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function C3(t){return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function LTe(t){return t=t.replace(/(\w+)\s*=\s*"([^"]*)"/g,(i,r,o)=>`${r}="${C3(o)}"`),t=t.replace(/(\w+)\s*=\s*'([^']*)'/g,(i,r,o)=>`${r}='${C3(o)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t)&&(t=t.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(i=>{t=t.replace(i,"$1javascript&#58;")}),t}const DTe=Object.prototype.hasOwnProperty;function Ms(t,e){return DTe.call(t,e)}const Ei=Array.isArray,di=t=>typeof t=="function",ht=t=>typeof t=="string",kn=t=>typeof t=="boolean",Nn=t=>t!==null&&typeof t=="object",NTe=t=>Nn(t)&&di(t.then)&&di(t.catch),oj=Object.prototype.toString,QR=t=>oj.call(t),yn=t=>QR(t)==="[object Object]",BTe=t=>t==null?"":Ei(t)||yn(t)&&t.toString===oj?JSON.stringify(t,null,2):String(t);function eM(t,e=""){return t.reduce((n,i,r)=>r===0?n+i:n+e+i,"")}const Y0=t=>!Nn(t)||Ei(t);function Uw(t,e){if(Y0(t)||Y0(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:r}=n.pop();Object.keys(i).forEach(o=>{o!=="__proto__"&&(Nn(i[o])&&!Nn(r[o])&&(r[o]=Array.isArray(i[o])?[]:Un()),Y0(r[o])||Y0(i[o])?r[o]=i[o]:n.push({src:i[o],des:r[o]}))})}}function VTe(t,e,n){return{line:t,column:e,offset:n}}function G2(t,e,n){return{start:t,end:e}}const Rn={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},FTe=17;function KC(t,e,n={}){const{domain:i,messages:r,args:o}=n,s=t,a=new SyntaxError(String(s));return a.code=t,e&&(a.location=e),a.domain=i,a}function $Te(t){throw t}const Aa=" ",zTe="\r",Pr=`
`,HTe="\u2028",UTe="\u2029";function WTe(t){const e=t;let n=0,i=1,r=1,o=0;const s=k=>e[k]===zTe&&e[k+1]===Pr,a=k=>e[k]===Pr,l=k=>e[k]===UTe,u=k=>e[k]===HTe,c=k=>s(k)||a(k)||l(k)||u(k),d=()=>n,f=()=>i,h=()=>r,m=()=>o,g=k=>s(k)||l(k)||u(k)?Pr:e[k],v=()=>g(n),p=()=>g(n+o);function b(){return o=0,c(n)&&(i++,r=0),s(n)&&n++,n++,r++,e[n]}function y(){return s(n+o)&&o++,o++,e[n+o]}function _(){n=0,i=1,r=1,o=0}function C(k=0){o=k}function S(){const k=n+o;for(;k!==n;)b();o=0}return{index:d,line:f,column:h,peekOffset:m,charAt:g,currentChar:v,currentPeek:p,next:b,peek:y,reset:_,resetPeek:C,skipToPeek:S}}const Il=void 0,qTe=".",S3="'",jTe="tokenizer";function KTe(t,e={}){const n=e.location!==!1,i=WTe(t),r=()=>i.index(),o=()=>VTe(i.line(),i.column(),i.index()),s=o(),a=r(),l={currentType:13,offset:a,startLoc:s,endLoc:s,lastType:13,lastOffset:a,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},u=()=>l,{onError:c}=e;function d(Y,Z,ae,...pe){const je=u();if(Z.column+=ae,Z.offset+=ae,c){const Ie=n?G2(je.startLoc,Z):null,fe=KC(Y,Ie,{domain:jTe,args:pe});c(fe)}}function f(Y,Z,ae){Y.endLoc=o(),Y.currentType=Z;const pe={type:Z};return n&&(pe.loc=G2(Y.startLoc,Y.endLoc)),ae!=null&&(pe.value=ae),pe}const h=Y=>f(Y,13);function m(Y,Z){return Y.currentChar()===Z?(Y.next(),Z):(d(Rn.EXPECTED_TOKEN,o(),0,Z),"")}function g(Y){let Z="";for(;Y.currentPeek()===Aa||Y.currentPeek()===Pr;)Z+=Y.currentPeek(),Y.peek();return Z}function v(Y){const Z=g(Y);return Y.skipToPeek(),Z}function p(Y){if(Y===Il)return!1;const Z=Y.charCodeAt(0);return Z>=97&&Z<=122||Z>=65&&Z<=90||Z===95}function b(Y){if(Y===Il)return!1;const Z=Y.charCodeAt(0);return Z>=48&&Z<=57}function y(Y,Z){const{currentType:ae}=Z;if(ae!==2)return!1;g(Y);const pe=p(Y.currentPeek());return Y.resetPeek(),pe}function _(Y,Z){const{currentType:ae}=Z;if(ae!==2)return!1;g(Y);const pe=Y.currentPeek()==="-"?Y.peek():Y.currentPeek(),je=b(pe);return Y.resetPeek(),je}function C(Y,Z){const{currentType:ae}=Z;if(ae!==2)return!1;g(Y);const pe=Y.currentPeek()===S3;return Y.resetPeek(),pe}function S(Y,Z){const{currentType:ae}=Z;if(ae!==7)return!1;g(Y);const pe=Y.currentPeek()===".";return Y.resetPeek(),pe}function k(Y,Z){const{currentType:ae}=Z;if(ae!==8)return!1;g(Y);const pe=p(Y.currentPeek());return Y.resetPeek(),pe}function T(Y,Z){const{currentType:ae}=Z;if(!(ae===7||ae===11))return!1;g(Y);const pe=Y.currentPeek()===":";return Y.resetPeek(),pe}function E(Y,Z){const{currentType:ae}=Z;if(ae!==9)return!1;const pe=()=>{const Ie=Y.currentPeek();return Ie==="{"?p(Y.peek()):Ie==="@"||Ie==="|"||Ie===":"||Ie==="."||Ie===Aa||!Ie?!1:Ie===Pr?(Y.peek(),pe()):P(Y,!1)},je=pe();return Y.resetPeek(),je}function x(Y){g(Y);const Z=Y.currentPeek()==="|";return Y.resetPeek(),Z}function P(Y,Z=!0){const ae=(je=!1,Ie="")=>{const fe=Y.currentPeek();return fe==="{"||fe==="@"||!fe?je:fe==="|"?!(Ie===Aa||Ie===Pr):fe===Aa?(Y.peek(),ae(!0,Aa)):fe===Pr?(Y.peek(),ae(!0,Pr)):!0},pe=ae();return Z&&Y.resetPeek(),pe}function A(Y,Z){const ae=Y.currentChar();return ae===Il?Il:Z(ae)?(Y.next(),ae):null}function I(Y){const Z=Y.charCodeAt(0);return Z>=97&&Z<=122||Z>=65&&Z<=90||Z>=48&&Z<=57||Z===95||Z===36}function D(Y){return A(Y,I)}function q(Y){const Z=Y.charCodeAt(0);return Z>=97&&Z<=122||Z>=65&&Z<=90||Z>=48&&Z<=57||Z===95||Z===36||Z===45}function z(Y){return A(Y,q)}function R(Y){const Z=Y.charCodeAt(0);return Z>=48&&Z<=57}function O(Y){return A(Y,R)}function N(Y){const Z=Y.charCodeAt(0);return Z>=48&&Z<=57||Z>=65&&Z<=70||Z>=97&&Z<=102}function F(Y){return A(Y,N)}function j(Y){let Z="",ae="";for(;Z=O(Y);)ae+=Z;return ae}function U(Y){let Z="";for(;;){const ae=Y.currentChar();if(ae==="\\"){const pe=Y.peek();pe==="{"||pe==="}"||pe==="@"||pe==="|"||pe==="\\"?(Z+=ae+pe,Y.next(),Y.next()):(Y.resetPeek(),Z+=ae,Y.next())}else{if(ae==="{"||ae==="}"||ae==="@"||ae==="|"||!ae)break;if(ae===Aa||ae===Pr)if(P(Y))Z+=ae,Y.next();else{if(x(Y))break;Z+=ae,Y.next()}else Z+=ae,Y.next()}}return Z}function W(Y){v(Y);let Z="",ae="";for(;Z=z(Y);)ae+=Z;const pe=Y.currentChar();if(pe&&pe!=="}"&&pe!==Il&&pe!==Aa&&pe!==Pr&&pe!==" "){const je=ee(Y);return d(Rn.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,ae+je),ae+je}return Y.currentChar()===Il&&d(Rn.UNTERMINATED_CLOSING_BRACE,o(),0),ae}function J(Y){v(Y);let Z="";return Y.currentChar()==="-"?(Y.next(),Z+=`-${j(Y)}`):Z+=j(Y),Y.currentChar()===Il&&d(Rn.UNTERMINATED_CLOSING_BRACE,o(),0),Z}function ne(Y){return Y!==S3&&Y!==Pr}function he(Y){v(Y),m(Y,"'");let Z="",ae="";for(;Z=A(Y,ne);)Z==="\\"?ae+=X(Y):ae+=Z;const pe=Y.currentChar();return pe===Pr||pe===Il?(d(Rn.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,o(),0),pe===Pr&&(Y.next(),m(Y,"'")),ae):(m(Y,"'"),ae)}function X(Y){const Z=Y.currentChar();switch(Z){case"\\":case"'":return Y.next(),`\\${Z}`;case"u":return se(Y,Z,4);case"U":return se(Y,Z,6);default:return d(Rn.UNKNOWN_ESCAPE_SEQUENCE,o(),0,Z),""}}function se(Y,Z,ae){m(Y,Z);let pe="";for(let je=0;je<ae;je++){const Ie=F(Y);if(!Ie){d(Rn.INVALID_UNICODE_ESCAPE_SEQUENCE,o(),0,`\\${Z}${pe}${Y.currentChar()}`);break}pe+=Ie}return`\\${Z}${pe}`}function re(Y){return Y!=="{"&&Y!=="}"&&Y!==Aa&&Y!==Pr}function ee(Y){v(Y);let Z="",ae="";for(;Z=A(Y,re);)ae+=Z;return ae}function te(Y){let Z="",ae="";for(;Z=D(Y);)ae+=Z;return ae}function V(Y){const Z=ae=>{const pe=Y.currentChar();return pe==="{"||pe==="@"||pe==="|"||pe==="("||pe===")"||!pe||pe===Aa?ae:(ae+=pe,Y.next(),Z(ae))};return Z("")}function K(Y){v(Y);const Z=m(Y,"|");return v(Y),Z}function G(Y,Z){let ae=null;switch(Y.currentChar()){case"{":return Z.braceNest>=1&&d(Rn.NOT_ALLOW_NEST_PLACEHOLDER,o(),0),Y.next(),ae=f(Z,2,"{"),v(Y),Z.braceNest++,ae;case"}":return Z.braceNest>0&&Z.currentType===2&&d(Rn.EMPTY_PLACEHOLDER,o(),0),Y.next(),ae=f(Z,3,"}"),Z.braceNest--,Z.braceNest>0&&v(Y),Z.inLinked&&Z.braceNest===0&&(Z.inLinked=!1),ae;case"@":return Z.braceNest>0&&d(Rn.UNTERMINATED_CLOSING_BRACE,o(),0),ae=ye(Y,Z)||h(Z),Z.braceNest=0,ae;default:{let je=!0,Ie=!0,fe=!0;if(x(Y))return Z.braceNest>0&&d(Rn.UNTERMINATED_CLOSING_BRACE,o(),0),ae=f(Z,1,K(Y)),Z.braceNest=0,Z.inLinked=!1,ae;if(Z.braceNest>0&&(Z.currentType===4||Z.currentType===5||Z.currentType===6))return d(Rn.UNTERMINATED_CLOSING_BRACE,o(),0),Z.braceNest=0,be(Y,Z);if(je=y(Y,Z))return ae=f(Z,4,W(Y)),v(Y),ae;if(Ie=_(Y,Z))return ae=f(Z,5,J(Y)),v(Y),ae;if(fe=C(Y,Z))return ae=f(Z,6,he(Y)),v(Y),ae;if(!je&&!Ie&&!fe)return ae=f(Z,12,ee(Y)),d(Rn.INVALID_TOKEN_IN_PLACEHOLDER,o(),0,ae.value),v(Y),ae;break}}return ae}function ye(Y,Z){const{currentType:ae}=Z;let pe=null;const je=Y.currentChar();switch((ae===7||ae===8||ae===11||ae===9)&&(je===Pr||je===Aa)&&d(Rn.INVALID_LINKED_FORMAT,o(),0),je){case"@":return Y.next(),pe=f(Z,7,"@"),Z.inLinked=!0,pe;case".":return v(Y),Y.next(),f(Z,8,".");case":":return v(Y),Y.next(),f(Z,9,":");default:return x(Y)?(pe=f(Z,1,K(Y)),Z.braceNest=0,Z.inLinked=!1,pe):S(Y,Z)||T(Y,Z)?(v(Y),ye(Y,Z)):k(Y,Z)?(v(Y),f(Z,11,te(Y))):E(Y,Z)?(v(Y),je==="{"?G(Y,Z)||pe:f(Z,10,V(Y))):(ae===7&&d(Rn.INVALID_LINKED_FORMAT,o(),0),Z.braceNest=0,Z.inLinked=!1,be(Y,Z))}}function be(Y,Z){let ae={type:13};if(Z.braceNest>0)return G(Y,Z)||h(Z);if(Z.inLinked)return ye(Y,Z)||h(Z);switch(Y.currentChar()){case"{":return G(Y,Z)||h(Z);case"}":return d(Rn.UNBALANCED_CLOSING_BRACE,o(),0),Y.next(),f(Z,3,"}");case"@":return ye(Y,Z)||h(Z);default:{if(x(Y))return ae=f(Z,1,K(Y)),Z.braceNest=0,Z.inLinked=!1,ae;if(P(Y))return f(Z,0,U(Y));break}}return ae}function Ce(){const{currentType:Y,offset:Z,startLoc:ae,endLoc:pe}=l;return l.lastType=Y,l.lastOffset=Z,l.lastStartLoc=ae,l.lastEndLoc=pe,l.offset=r(),l.startLoc=o(),i.currentChar()===Il?f(l,13):be(i,l)}return{nextToken:Ce,currentOffset:r,currentPosition:o,context:u}}const GTe="parser",YTe=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,XTe=/\\([\\@{}|])/g;function JTe(t,e){return e}function ZTe(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):""}}}function QTe(t={}){const e=t.location!==!1,{onError:n}=t;function i(p,b,y,_,...C){const S=p.currentPosition();if(S.offset+=_,S.column+=_,n){const k=e?G2(y,S):null,T=KC(b,k,{domain:GTe,args:C});n(T)}}function r(p,b,y){const _={type:p};return e&&(_.start=b,_.end=b,_.loc={start:y,end:y}),_}function o(p,b,y,_){e&&(p.end=b,p.loc&&(p.loc.end=y))}function s(p,b){const y=p.context(),_=r(3,y.offset,y.startLoc);return _.value=b.replace(XTe,JTe),o(_,p.currentOffset(),p.currentPosition()),_}function a(p,b){const y=p.context(),{lastOffset:_,lastStartLoc:C}=y,S=r(5,_,C);return S.index=parseInt(b,10),p.nextToken(),o(S,p.currentOffset(),p.currentPosition()),S}function l(p,b){const y=p.context(),{lastOffset:_,lastStartLoc:C}=y,S=r(4,_,C);return S.key=b,p.nextToken(),o(S,p.currentOffset(),p.currentPosition()),S}function u(p,b){const y=p.context(),{lastOffset:_,lastStartLoc:C}=y,S=r(9,_,C);return S.value=b.replace(YTe,ZTe),p.nextToken(),o(S,p.currentOffset(),p.currentPosition()),S}function c(p){const b=p.nextToken(),y=p.context(),{lastOffset:_,lastStartLoc:C}=y,S=r(8,_,C);return b.type!==11?(i(p,Rn.UNEXPECTED_EMPTY_LINKED_MODIFIER,y.lastStartLoc,0),S.value="",o(S,_,C),{nextConsumeToken:b,node:S}):(b.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,Pa(b)),S.value=b.value||"",o(S,p.currentOffset(),p.currentPosition()),{node:S})}function d(p,b){const y=p.context(),_=r(7,y.offset,y.startLoc);return _.value=b,o(_,p.currentOffset(),p.currentPosition()),_}function f(p){const b=p.context(),y=r(6,b.offset,b.startLoc);let _=p.nextToken();if(_.type===8){const C=c(p);y.modifier=C.node,_=C.nextConsumeToken||p.nextToken()}switch(_.type!==9&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(_)),_=p.nextToken(),_.type===2&&(_=p.nextToken()),_.type){case 10:_.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(_)),y.key=d(p,_.value||"");break;case 4:_.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(_)),y.key=l(p,_.value||"");break;case 5:_.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(_)),y.key=a(p,_.value||"");break;case 6:_.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(_)),y.key=u(p,_.value||"");break;default:{i(p,Rn.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const C=p.context(),S=r(7,C.offset,C.startLoc);return S.value="",o(S,C.offset,C.startLoc),y.key=S,o(y,C.offset,C.startLoc),{nextConsumeToken:_,node:y}}}return o(y,p.currentOffset(),p.currentPosition()),{node:y}}function h(p){const b=p.context(),y=b.currentType===1?p.currentOffset():b.offset,_=b.currentType===1?b.endLoc:b.startLoc,C=r(2,y,_);C.items=[];let S=null;do{const E=S||p.nextToken();switch(S=null,E.type){case 0:E.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(E)),C.items.push(s(p,E.value||""));break;case 5:E.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(E)),C.items.push(a(p,E.value||""));break;case 4:E.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(E)),C.items.push(l(p,E.value||""));break;case 6:E.value==null&&i(p,Rn.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Pa(E)),C.items.push(u(p,E.value||""));break;case 7:{const x=f(p);C.items.push(x.node),S=x.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const k=b.currentType===1?b.lastOffset:p.currentOffset(),T=b.currentType===1?b.lastEndLoc:p.currentPosition();return o(C,k,T),C}function m(p,b,y,_){const C=p.context();let S=_.items.length===0;const k=r(1,b,y);k.cases=[],k.cases.push(_);do{const T=h(p);S||(S=T.items.length===0),k.cases.push(T)}while(C.currentType!==13);return S&&i(p,Rn.MUST_HAVE_MESSAGES_IN_PLURAL,y,0),o(k,p.currentOffset(),p.currentPosition()),k}function g(p){const b=p.context(),{offset:y,startLoc:_}=b,C=h(p);return b.currentType===13?C:m(p,y,_,C)}function v(p){const b=KTe(p,rr({},t)),y=b.context(),_=r(0,y.offset,y.startLoc);return e&&_.loc&&(_.loc.source=p),_.body=g(b),t.onCacheKey&&(_.cacheKey=t.onCacheKey(p)),y.currentType!==13&&i(b,Rn.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,p[y.offset]||""),o(_,b.currentOffset(),b.currentPosition()),_}return{parse:v}}function Pa(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function eEe(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:o=>(n.helpers.add(o),o)}}function k3(t,e){for(let n=0;n<t.length;n++)tM(t[n],e)}function tM(t,e){switch(t.type){case 1:k3(t.cases,e),e.helper("plural");break;case 2:k3(t.items,e);break;case 6:{tM(t.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function tEe(t,e={}){const n=eEe(t);n.helper("normalize"),t.body&&tM(t.body,n);const i=n.context();t.helpers=Array.from(i.helpers)}function nEe(t){const e=t.body;return e.type===2?T3(e):e.cases.forEach(n=>T3(n)),t}function T3(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n<t.items.length;n++){const i=t.items[n];if(!(i.type===3||i.type===9)||i.value==null)break;e.push(i.value)}if(e.length===t.items.length){t.static=eM(e);for(let n=0;n<t.items.length;n++){const i=t.items[n];(i.type===3||i.type===9)&&delete i.value}}}}function Dh(t){switch(t.t=t.type,t.type){case 0:{const e=t;Dh(e.body),e.b=e.body,delete e.body;break}case 1:{const e=t,n=e.cases;for(let i=0;i<n.length;i++)Dh(n[i]);e.c=n,delete e.cases;break}case 2:{const e=t,n=e.items;for(let i=0;i<n.length;i++)Dh(n[i]);e.i=n,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=t;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=t;Dh(e.key),e.k=e.key,delete e.key,e.modifier&&(Dh(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=t;e.i=e.index,delete e.index;break}case 4:{const e=t;e.k=e.key,delete e.key;break}}delete t.type}function iEe(t,e){const{filename:n,breakLineCode:i,needIndent:r}=e,o=e.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:r,indentLevel:0};o&&t.loc&&(s.source=t.loc.source);const a=()=>s;function l(g,v){s.code+=g}function u(g,v=!0){const p=v?i:"";l(r?p+" ".repeat(g):p)}function c(g=!0){const v=++s.indentLevel;g&&u(v)}function d(g=!0){const v=--s.indentLevel;g&&u(v)}function f(){u(s.indentLevel)}return{context:a,push:l,indent:c,deindent:d,newline:f,helper:g=>`_${g}`,needIndent:()=>s.needIndent}}function rEe(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),zm(t,e.key),e.modifier?(t.push(", "),zm(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function oEe(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const r=e.items.length;for(let o=0;o<r&&(zm(t,e.items[o]),o!==r-1);o++)t.push(", ");t.deindent(i()),t.push("])")}function sEe(t,e){const{helper:n,needIndent:i}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(i());const r=e.cases.length;for(let o=0;o<r&&(zm(t,e.cases[o]),o!==r-1);o++)t.push(", ");t.deindent(i()),t.push("])")}}function aEe(t,e){e.body?zm(t,e.body):t.push("null")}function zm(t,e){const{helper:n}=t;switch(e.type){case 0:aEe(t,e);break;case 1:sEe(t,e);break;case 2:oEe(t,e);break;case 6:rEe(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${n("interpolate")}(${n("list")}(${e.index}))`,e);break;case 4:t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break}}const lEe=(t,e={})=>{const n=ht(e.mode)?e.mode:"normal",i=ht(e.filename)?e.filename:"message.intl";e.sourceMap;const r=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
`,o=e.needIndent?e.needIndent:n!=="arrow",s=t.helpers||[],a=iEe(t,{filename:i,breakLineCode:r,needIndent:o});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(o),s.length>0&&(a.push(`const { ${eM(s.map(c=>`${c}: _${c}`),", ")} } = ctx`),a.newline()),a.push("return "),zm(a,t),a.deindent(o),a.push("}"),delete t.helpers;const{code:l,map:u}=a.context();return{ast:t,code:l,map:u?u.toJSON():void 0}};function uEe(t,e={}){const n=rr({},e),i=!!n.jit,r=!!n.minify,o=n.optimize==null?!0:n.optimize,a=QTe(n).parse(t);return i?(o&&nEe(a),r&&Dh(a),{ast:a,code:""}):(tEe(a,n),lEe(a,n))}function cEe(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Kd().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Kd().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Za(t){return Nn(t)&&nM(t)===0&&(Ms(t,"b")||Ms(t,"body"))}const sj=["b","body"];function dEe(t){return Wc(t,sj)}const aj=["c","cases"];function fEe(t){return Wc(t,aj,[])}const lj=["s","static"];function hEe(t){return Wc(t,lj)}const uj=["i","items"];function mEe(t){return Wc(t,uj,[])}const cj=["t","type"];function nM(t){return Wc(t,cj)}const dj=["v","value"];function X0(t,e){const n=Wc(t,dj);if(n!=null)return n;throw Kv(e)}const fj=["m","modifier"];function gEe(t){return Wc(t,fj)}const hj=["k","key"];function pEe(t){const e=Wc(t,hj);if(e)return e;throw Kv(6)}function Wc(t,e,n){for(let i=0;i<e.length;i++){const r=e[i];if(Ms(t,r)&&t[r]!=null)return t[r]}return n}const mj=[...sj,...aj,...lj,...uj,...hj,...fj,...dj,...cj];function Kv(t){return new Error(`unhandled node type: ${t}`)}function Wk(t){return n=>vEe(n,t)}function vEe(t,e){const n=dEe(e);if(n==null)throw Kv(0);if(nM(n)===1){const o=fEe(n);return t.plural(o.reduce((s,a)=>[...s,E3(t,a)],[]))}else return E3(t,n)}function E3(t,e){const n=hEe(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=mEe(e).reduce((r,o)=>[...r,Y2(t,o)],[]);return t.normalize(i)}}function Y2(t,e){const n=nM(e);switch(n){case 3:return X0(e,n);case 9:return X0(e,n);case 4:{const i=e;if(Ms(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(Ms(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw Kv(n)}case 5:{const i=e;if(Ms(i,"i")&&Xi(i.i))return t.interpolate(t.list(i.i));if(Ms(i,"index")&&Xi(i.index))return t.interpolate(t.list(i.index));throw Kv(n)}case 6:{const i=e,r=gEe(i),o=pEe(i);return t.linked(Y2(t,o),r?Y2(t,r):void 0,t.type)}case 7:return X0(e,n);case 8:return X0(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const bEe=t=>t;let J0=Un();function yEe(t,e={}){let n=!1;const i=e.onError||$Te;return e.onError=r=>{n=!0,i(r)},{...uEe(t,e),detectError:n}}function wEe(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ht(t)){kn(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||bEe)(t),r=J0[i];if(r)return r;const{ast:o,detectError:s}=yEe(t,{...e,location:!1,jit:!0}),a=Wk(o);return s?a:J0[i]=a}else{const n=t.cacheKey;if(n){const i=J0[n];return i||(J0[n]=Wk(t))}else return Wk(t)}}let Gv=null;function _Ee(t){Gv=t}function CEe(t,e,n){Gv&&Gv.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const SEe=kEe("function:translate");function kEe(t){return e=>Gv&&Gv.emit(t,e)}const Xl={INVALID_ARGUMENT:FTe,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},TEe=24;function Jl(t){return KC(t,null,void 0)}function iM(t,e){return e.locale!=null?x3(e.locale):x3(t.locale)}let qk;function x3(t){if(ht(t))return t;if(di(t)){if(t.resolvedOnce&&qk!=null)return qk;if(t.constructor.name==="Function"){const e=t();if(NTe(e))throw Jl(Xl.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return qk=e}else throw Jl(Xl.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Jl(Xl.NOT_SUPPORT_LOCALE_TYPE)}function EEe(t,e,n){return[...new Set([n,...Ei(e)?e:Nn(e)?Object.keys(e):ht(e)?[e]:[n]])]}function X2(t,e,n){const i=ht(n)?n:Yv,r=t;r.__localeChainCache||(r.__localeChainCache=new Map);let o=r.__localeChainCache.get(i);if(!o){o=[];let s=[n];for(;Ei(s);)s=A3(o,s,e);const a=Ei(e)||!yn(e)?e:e.default?e.default:null;s=ht(a)?[a]:a,Ei(s)&&A3(o,s,!1),r.__localeChainCache.set(i,o)}return o}function A3(t,e,n){let i=!0;for(let r=0;r<e.length&&kn(i);r++){const o=e[r];ht(o)&&(i=xEe(t,e[r],n))}return i}function xEe(t,e,n){let i;const r=e.split("-");do{const o=r.join("-");i=AEe(t,o,n),r.splice(-1,1)}while(r.length&&i===!0);return i}function AEe(t,e,n){let i=!1;if(!t.includes(e)&&(i=!0,e)){i=e[e.length-1]!=="!";const r=e.replace(/!/g,"");t.push(r),(Ei(n)||yn(n))&&n[r]&&(i=n[r])}return i}const qc=[];qc[0]={w:[0],i:[3,0],"[":[4],o:[7]};qc[1]={w:[1],".":[2],"[":[4],o:[7]};qc[2]={w:[2],i:[3,0],0:[3,0]};qc[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};qc[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};qc[5]={"'":[4,0],o:8,l:[5,0]};qc[6]={'"':[4,0],o:8,l:[6,0]};const PEe=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function IEe(t){return PEe.test(t)}function REe(t){const e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e===n&&(e===34||e===39)?t.slice(1,-1):t}function MEe(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function OEe(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:IEe(e)?REe(e):"*"+e}function LEe(t){const e=[];let n=-1,i=0,r=0,o,s,a,l,u,c,d;const f=[];f[0]=()=>{s===void 0?s=a:s+=a},f[1]=()=>{s!==void 0&&(e.push(s),s=void 0)},f[2]=()=>{f[0](),r++},f[3]=()=>{if(r>0)r--,i=4,f[0]();else{if(r=0,s===void 0||(s=OEe(s),s===!1))return!1;f[1]()}};function h(){const m=t[n+1];if(i===5&&m==="'"||i===6&&m==='"')return n++,a="\\"+m,f[0](),!0}for(;i!==null;)if(n++,o=t[n],!(o==="\\"&&h())){if(l=MEe(o),d=qc[i],u=d[l]||d.l||8,u===8||(i=u[0],u[1]!==void 0&&(c=f[u[1]],c&&(a=o,c()===!1))))return;if(i===7)return e}}const P3=new Map;function DEe(t,e){return Nn(t)?t[e]:null}function NEe(t,e){if(!Nn(t))return null;let n=P3.get(e);if(n||(n=LEe(e),n&&P3.set(e,n)),!n)return null;const i=n.length;let r=t,o=0;for(;o<i;){const s=n[o];if(mj.includes(s)&&Za(r)||!Nn(r)||!Ms(r,s))return null;const a=r[s];if(a===void 0||di(r))return null;r=a,o++}return r}const BEe="11.3.0",GC=-1,Yv="en-US",Z_="",I3=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function VEe(){return{upper:(t,e)=>e==="text"&&ht(t)?t.toUpperCase():e==="vnode"&&Nn(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&ht(t)?t.toLowerCase():e==="vnode"&&Nn(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&ht(t)?I3(t):e==="vnode"&&Nn(t)&&"__v_isVNode"in t?I3(t.children):t}}let gj;function FEe(t){gj=t}let pj;function $Ee(t){pj=t}let vj;function zEe(t){vj=t}let bj=null;const HEe=t=>{bj=t},UEe=()=>bj;let yj=null;const R3=t=>{yj=t},WEe=()=>yj;let M3=0;function qEe(t={}){const e=di(t.onWarn)?t.onWarn:ITe,n=ht(t.version)?t.version:BEe,i=ht(t.locale)||di(t.locale)?t.locale:Yv,r=di(i)?Yv:i,o=Ei(t.fallbackLocale)||yn(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:r,s=yn(t.messages)?t.messages:jk(r),a=yn(t.datetimeFormats)?t.datetimeFormats:jk(r),l=yn(t.numberFormats)?t.numberFormats:jk(r),u=rr(Un(),t.modifiers,VEe()),c=t.pluralRules||Un(),d=di(t.missing)?t.missing:null,f=kn(t.missingWarn)||$m(t.missingWarn)?t.missingWarn:!0,h=kn(t.fallbackWarn)||$m(t.fallbackWarn)?t.fallbackWarn:!0,m=!!t.fallbackFormat,g=!!t.unresolving,v=di(t.postTranslation)?t.postTranslation:null,p=yn(t.processor)?t.processor:null,b=kn(t.warnHtmlMessage)?t.warnHtmlMessage:!0,y=!!t.escapeParameter,_=di(t.messageCompiler)?t.messageCompiler:gj,C=di(t.messageResolver)?t.messageResolver:pj||DEe,S=di(t.localeFallbacker)?t.localeFallbacker:vj||EEe,k=Nn(t.fallbackContext)?t.fallbackContext:void 0,T=t,E=Nn(T.__datetimeFormatters)?T.__datetimeFormatters:new Map,x=Nn(T.__numberFormatters)?T.__numberFormatters:new Map,P=Nn(T.__meta)?T.__meta:{};M3++;const A={version:n,cid:M3,locale:i,fallbackLocale:o,messages:s,modifiers:u,pluralRules:c,missing:d,missingWarn:f,fallbackWarn:h,fallbackFormat:m,unresolving:g,postTranslation:v,processor:p,warnHtmlMessage:b,escapeParameter:y,messageCompiler:_,messageResolver:C,localeFallbacker:S,fallbackContext:k,onWarn:e,__meta:P};return A.datetimeFormats=a,A.numberFormats=l,A.__datetimeFormatters=E,A.__numberFormatters=x,__INTLIFY_PROD_DEVTOOLS__&&CEe(A,n,P),A}const jk=t=>({[t]:Un()});function rM(t,e,n,i,r){const{missing:o,onWarn:s}=t;if(o!==null){const a=o(t,n,e,r);return ht(a)?a:e}else return e}function Dg(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function jEe(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function KEe(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i<e.length;i++)if(jEe(t,e[i]))return!0;return!1}function O3(t,...e){const{datetimeFormats:n,unresolving:i,fallbackLocale:r,onWarn:o,localeFallbacker:s}=t,{__datetimeFormatters:a}=t;if(!ht(e[0])&&!rj(e[0])&&!Xi(e[0]))return Z_;const[l,u,c,d]=J2(...e),f=kn(c.missingWarn)?c.missingWarn:t.missingWarn;kn(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn;const h=!!c.part,m=iM(t,c),g=s(t,r,m);if(!ht(l)||l==="")return new Intl.DateTimeFormat(m.replace(/!/g,""),d).format(u);let v={},p,b=null;const y="datetime format";for(let S=0;S<g.length&&(p=g[S],v=n[p]||{},b=v[l],!yn(b));S++)rM(t,l,p,f,y);if(!yn(b)||!ht(p))return i?GC:l;let _=`${p}__${l}`;jC(d)||(_=`${_}__${JSON.stringify(d)}`);let C=a.get(_);return C||(C=new Intl.DateTimeFormat(p,rr({},b,d)),a.set(_,C)),h?C.formatToParts(u):C.format(u)}const wj=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function J2(...t){const[e,n,i,r]=t,o=Un();let s=Un(),a;if(ht(e)){const l=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!l)throw Jl(Xl.INVALID_ISO_DATE_ARGUMENT);const u=l[3]?l[3].trim().startsWith("T")?`${l[1].trim()}${l[3].trim()}`:`${l[1].trim()}T${l[3].trim()}`:l[1].trim();a=new Date(u);try{a.toISOString()}catch{throw Jl(Xl.INVALID_ISO_DATE_ARGUMENT)}}else if(rj(e)){if(isNaN(e.getTime()))throw Jl(Xl.INVALID_DATE_ARGUMENT);a=e}else if(Xi(e))a=e;else throw Jl(Xl.INVALID_ARGUMENT);return ht(n)?o.key=n:yn(n)&&Object.keys(n).forEach(l=>{wj.includes(l)?s[l]=n[l]:o[l]=n[l]}),ht(i)?o.locale=i:yn(i)&&(s=i),yn(r)&&(s=r),[o.key||"",a,o,s]}function L3(t,e,n){const i=t;for(const r in n){const o=`${e}__${r}`;i.__datetimeFormatters.has(o)&&i.__datetimeFormatters.delete(o)}}function D3(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:r,onWarn:o,localeFallbacker:s}=t,{__numberFormatters:a}=t;if(!Xi(e[0]))return Z_;const[l,u,c,d]=Z2(...e),f=kn(c.missingWarn)?c.missingWarn:t.missingWarn;kn(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn;const h=!!c.part,m=iM(t,c),g=s(t,r,m);if(!ht(l)||l==="")return new Intl.NumberFormat(m.replace(/!/g,""),d).format(u);let v={},p,b=null;const y="number format";for(let S=0;S<g.length&&(p=g[S],v=n[p]||{},b=v[l],!yn(b));S++)rM(t,l,p,f,y);if(!yn(b)||!ht(p))return i?GC:l;let _=`${p}__${l}`;jC(d)||(_=`${_}__${JSON.stringify(d)}`);let C=a.get(_);return C||(C=new Intl.NumberFormat(p,rr({},b,d)),a.set(_,C)),h?C.formatToParts(u):C.format(u)}const _j=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Z2(...t){const[e,n,i,r]=t,o=Un();let s=Un();if(!Xi(e))throw Jl(Xl.INVALID_ARGUMENT);const a=e;return ht(n)?o.key=n:yn(n)&&Object.keys(n).forEach(l=>{_j.includes(l)?s[l]=n[l]:o[l]=n[l]}),ht(i)?o.locale=i:yn(i)&&(s=i),yn(r)&&(s=r),[o.key||"",a,o,s]}function N3(t,e,n){const i=t;for(const r in n){const o=`${e}__${r}`;i.__numberFormatters.has(o)&&i.__numberFormatters.delete(o)}}const GEe=t=>t,YEe=t=>"",XEe="text",JEe=t=>t.length===0?"":eM(t),ZEe=BTe;function Kk(t,e){return t=Math.abs(t),e===2?t===1?0:1:Math.min(t,2)}function QEe(t){const e=Xi(t.pluralIndex)?t.pluralIndex:-1;return Xi(t.named?.count)?t.named.count:Xi(t.named?.n)?t.named.n:e}function exe(t={}){const e=t.locale,n=QEe(t),i=ht(e)&&di(t.pluralRules?.[e])?t.pluralRules[e]:Kk,r=i===Kk?void 0:Kk,o=p=>p[i(n,p.length,r)],s=t.list||[],a=p=>s[p],l=t.named||Un();Xi(t.pluralIndex)&&(l.count||=t.pluralIndex,l.n||=t.pluralIndex);const u=p=>l[p];function c(p,b){const y=di(t.messages)?t.messages(p,!!b):Nn(t.messages)?t.messages[p]:!1;return y||(t.parent?t.parent.message(p):YEe)}const d=p=>t.modifiers?t.modifiers[p]:GEe,f=di(t.processor?.normalize)?t.processor.normalize:JEe,h=di(t.processor?.interpolate)?t.processor.interpolate:ZEe,m=ht(t.processor?.type)?t.processor.type:XEe,v={list:a,named:u,plural:o,linked:(p,...b)=>{const[y,_]=b;let C="text",S="";b.length===1?Nn(y)?(S=y.modifier||S,C=y.type||C):ht(y)&&(S=y||S):b.length===2&&(ht(y)&&(S=y||S),ht(_)&&(C=_||C));const k=c(p,!0)(v),T=k===""||k===void 0?p:k,E=C==="vnode"&&Ei(T)&&S?T[0]:T;return S?d(S)(E,C):E},message:c,type:m,interpolate:h,normalize:f,values:rr(Un(),s,l)};return v}const B3=()=>"",ks=t=>di(t);function V3(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:r,messageCompiler:o,fallbackLocale:s,messages:a}=t,[l,u]=Q2(...e),c=kn(u.missingWarn)?u.missingWarn:t.missingWarn,d=kn(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,f=kn(u.escapeParameter)?u.escapeParameter:t.escapeParameter,h=!!u.resolvedMessage,m=ht(u.default)||kn(u.default)?kn(u.default)?o?l:()=>l:u.default:n?o?l:()=>l:null,g=n||m!=null&&(ht(m)||di(m)),v=iM(t,u);f&&txe(u);let[p,b,y]=h?[l,v,a[v]||Un()]:Cj(t,l,v,s,d,c),_=p,C=l;if(!h&&!(ht(_)||Za(_)||ks(_))&&g&&(_=m,C=_),!h&&(!(ht(_)||Za(_)||ks(_))||!ht(b)))return r?GC:l;let S=!1;const k=()=>{S=!0},T=ks(_)?_:Sj(t,l,b,_,C,k);if(S)return _;const E=rxe(t,b,y,u),x=exe(E),P=nxe(t,T,x);let A=i?i(P,l):P;if(f&&ht(A)&&(A=LTe(A)),__INTLIFY_PROD_DEVTOOLS__){const I={timestamp:Date.now(),key:ht(l)?l:ks(_)?_.key:"",locale:b||(ks(_)?_.locale:""),format:ht(_)?_:ks(_)?_.source:"",message:A};I.meta=rr({},t.__meta,UEe()||{}),SEe(I)}return A}function txe(t){Ei(t.list)?t.list=t.list.map(e=>ht(e)?_3(e):e):Nn(t.named)&&Object.keys(t.named).forEach(e=>{ht(t.named[e])&&(t.named[e]=_3(t.named[e]))})}function Cj(t,e,n,i,r,o){const{messages:s,onWarn:a,messageResolver:l,localeFallbacker:u}=t,c=u(t,i,n);let d=Un(),f,h=null;const m="translate";for(let g=0;g<c.length&&(f=c[g],d=s[f]||Un(),(h=l(d,e))===null&&(h=d[e]),!(ht(h)||Za(h)||ks(h)));g++)if(!KEe(f,c)){const v=rM(t,e,f,o,m);v!==e&&(h=v)}return[h,f,d]}function Sj(t,e,n,i,r,o){const{messageCompiler:s,warnHtmlMessage:a}=t;if(ks(i)){const u=i;return u.locale=u.locale||n,u.key=u.key||e,u}if(s==null){const u=(()=>i);return u.locale=n,u.key=e,u}const l=s(i,ixe(t,n,r,i,a,o));return l.locale=n,l.key=e,l.source=i,l}function nxe(t,e,n){return e(n)}function Q2(...t){const[e,n,i]=t,r=Un();if(!ht(e)&&!Xi(e)&&!ks(e)&&!Za(e))throw Jl(Xl.INVALID_ARGUMENT);const o=Xi(e)?String(e):(ks(e),e);return Xi(n)?r.plural=n:ht(n)?r.default=n:yn(n)&&!jC(n)?r.named=n:Ei(n)&&(r.list=n),Xi(i)?r.plural=i:ht(i)?r.default=i:yn(i)&&rr(r,i),[o,r]}function ixe(t,e,n,i,r,o){return{locale:e,key:n,warnHtmlMessage:r,onError:s=>{throw o&&o(s),s},onCacheKey:s=>RTe(e,n,s)}}function rxe(t,e,n,i){const{modifiers:r,pluralRules:o,messageResolver:s,fallbackLocale:a,fallbackWarn:l,missingWarn:u,fallbackContext:c}=t,f={locale:e,modifiers:r,pluralRules:o,messages:(h,m)=>{let g=s(n,h);if(g==null&&(c||m)){const[,,v]=Cj(c||t,h,e,a,l,u);g=s(v,h)}if(ht(g)||Za(g)){let v=!1;const b=Sj(t,h,e,g,h,()=>{v=!0});return v?B3:b}else return ks(g)?g:B3}};return t.processor&&(f.processor=t.processor),i.list&&(f.list=i.list),i.named&&(f.named=i.named),Xi(i.plural)&&(f.pluralIndex=i.plural),f}cEe();const oxe="11.3.0";function sxe(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Kd().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Kd().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Kd().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Kd().__INTLIFY_PROD_DEVTOOLS__=!1)}const Do={UNEXPECTED_RETURN_TYPE:TEe,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function ls(t,...e){return KC(t,null,void 0)}const eA=Uc("__translateVNode"),tA=Uc("__datetimeParts"),nA=Uc("__numberParts"),kj=Uc("__setPluralRules"),Tj=Uc("__injectWithOption"),iA=Uc("__dispose");function Xv(t){if(!Nn(t)||Za(t))return t;for(const e in t)if(Ms(t,e))if(!e.includes("."))Nn(t[e])&&Xv(t[e]);else{const n=e.split("."),i=n.length-1;let r=t,o=!1;for(let s=0;s<i;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in r||(r[n[s]]=Un()),!Nn(r[n[s]])){o=!0;break}r=r[n[s]]}if(o||(Za(r)?mj.includes(n[i])||delete t[e]:(r[n[i]]=t[e],delete t[e])),!Za(r)){const s=r[n[i]];Nn(s)&&Xv(s)}}return t}function oM(t,e){const{messages:n,__i18n:i,messageResolver:r,flatJson:o}=e,s=yn(n)?n:Ei(i)?Un():{[t]:Un()};if(Ei(i)&&i.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:l,resource:u}=a;l?(s[l]=s[l]||Un(),Uw(u,s[l])):Uw(u,s)}else ht(a)&&Uw(JSON.parse(a),s)}),r==null&&o)for(const a in s)Ms(s,a)&&Xv(s[a]);return s}function Ej(t){return t.type}function xj(t,e,n){let i=Nn(e.messages)?e.messages:Un();"__i18nGlobal"in n&&(i=oM(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const r=Object.keys(i);r.length&&r.forEach(o=>{t.mergeLocaleMessage(o,i[o])});{if(Nn(e.datetimeFormats)){const o=Object.keys(e.datetimeFormats);o.length&&o.forEach(s=>{t.mergeDateTimeFormat(s,e.datetimeFormats[s])})}if(Nn(e.numberFormats)){const o=Object.keys(e.numberFormats);o.length&&o.forEach(s=>{t.mergeNumberFormat(s,e.numberFormats[s])})}}}function F3(t){return L(Mf,null,t,0)}function Jv(){return Ct()}const $3="__INTLIFY_META__",z3=()=>[],axe=()=>!1;let H3=0;function U3(t){return((e,n,i,r)=>t(n,i,Jv()||void 0,r))}const lxe=()=>{const t=Jv();let e=null;return t&&(e=Ej(t)[$3])?{[$3]:e}:null};function sM(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,r=t.flatJson,o=J_?H:bi;let s=kn(t.inheritLocale)?t.inheritLocale:!0;const a=o(e&&s?e.locale.value:ht(t.locale)?t.locale:Yv),l=o(e&&s?e.fallbackLocale.value:ht(t.fallbackLocale)||Ei(t.fallbackLocale)||yn(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),u=o(oM(a.value,t)),c=o(yn(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),d=o(yn(t.numberFormats)?t.numberFormats:{[a.value]:{}});let f=e?e.missingWarn:kn(t.missingWarn)||$m(t.missingWarn)?t.missingWarn:!0,h=e?e.fallbackWarn:kn(t.fallbackWarn)||$m(t.fallbackWarn)?t.fallbackWarn:!0,m=e?e.fallbackRoot:kn(t.fallbackRoot)?t.fallbackRoot:!0,g=!!t.fallbackFormat,v=di(t.missing)?t.missing:null,p=di(t.missing)?U3(t.missing):null,b=di(t.postTranslation)?t.postTranslation:null,y=e?e.warnHtmlMessage:kn(t.warnHtmlMessage)?t.warnHtmlMessage:!0,_=!!t.escapeParameter;const C=e?e.modifiers:yn(t.modifiers)?t.modifiers:{};let S=t.pluralRules||e&&e.pluralRules,k;k=(()=>{i&&R3(null);const fe={version:oxe,locale:a.value,fallbackLocale:l.value,messages:u.value,modifiers:C,pluralRules:S,missing:p===null?void 0:p,missingWarn:f,fallbackWarn:h,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:y,escapeParameter:_,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};fe.datetimeFormats=c.value,fe.numberFormats=d.value,fe.__datetimeFormatters=yn(k)?k.__datetimeFormatters:void 0,fe.__numberFormatters=yn(k)?k.__numberFormatters:void 0;const Te=qEe(fe);return i&&R3(Te),Te})(),Dg(k,a.value,l.value);function E(){return[a.value,l.value,u.value,c.value,d.value]}const x=M({get:()=>a.value,set:fe=>{k.locale=fe,a.value=fe}}),P=M({get:()=>l.value,set:fe=>{k.fallbackLocale=fe,l.value=fe,Dg(k,a.value,fe)}}),A=M(()=>u.value),I=M(()=>c.value),D=M(()=>d.value);function q(){return di(b)?b:null}function z(fe){b=fe,k.postTranslation=fe}function R(){return v}function O(fe){fe!==null&&(p=U3(fe)),v=fe,k.missing=p}const N=(fe,Te,et,Re,ze,Ke)=>{E();let Dt;try{__INTLIFY_PROD_DEVTOOLS__,i||(k.fallbackContext=e?WEe():void 0),Dt=fe(k)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(k.fallbackContext=void 0)}if(et!=="translate exists"&&Xi(Dt)&&Dt===GC||et==="translate exists"&&!Dt){const[Cn,Je]=Te();return e&&m?Re(e):ze(Cn)}else{if(Ke(Dt))return Dt;throw ls(Do.UNEXPECTED_RETURN_TYPE)}};function F(...fe){return N(Te=>Reflect.apply(V3,null,[Te,...fe]),()=>Q2(...fe),"translate",Te=>Reflect.apply(Te.t,Te,[...fe]),Te=>Te,Te=>ht(Te))}function j(...fe){const[Te,et,Re]=fe;if(Re&&!Nn(Re))throw ls(Do.INVALID_ARGUMENT);return F(Te,et,rr({resolvedMessage:!0},Re||{}))}function U(...fe){return N(Te=>Reflect.apply(O3,null,[Te,...fe]),()=>J2(...fe),"datetime format",Te=>Reflect.apply(Te.d,Te,[...fe]),()=>Z_,Te=>ht(Te)||Ei(Te))}function W(...fe){return N(Te=>Reflect.apply(D3,null,[Te,...fe]),()=>Z2(...fe),"number format",Te=>Reflect.apply(Te.n,Te,[...fe]),()=>Z_,Te=>ht(Te)||Ei(Te))}function J(fe){return fe.map(Te=>ht(Te)||Xi(Te)||kn(Te)?F3(String(Te)):Te)}const he={normalize:J,interpolate:fe=>fe,type:"vnode"};function X(...fe){return N(Te=>{let et;const Re=Te;try{Re.processor=he,et=Reflect.apply(V3,null,[Re,...fe])}finally{Re.processor=null}return et},()=>Q2(...fe),"translate",Te=>Te[eA](...fe),Te=>[F3(Te)],Te=>Ei(Te))}function se(...fe){return N(Te=>Reflect.apply(D3,null,[Te,...fe]),()=>Z2(...fe),"number format",Te=>Te[nA](...fe),z3,Te=>ht(Te)||Ei(Te))}function re(...fe){return N(Te=>Reflect.apply(O3,null,[Te,...fe]),()=>J2(...fe),"datetime format",Te=>Te[tA](...fe),z3,Te=>ht(Te)||Ei(Te))}function ee(fe){S=fe,k.pluralRules=S}function te(fe,Te){return N(()=>{if(!fe)return!1;const et=ht(Te)?Te:a.value,Re=ht(Te)?[et]:X2(k,l.value,et);for(let ze=0;ze<Re.length;ze++){const Ke=G(Re[ze]);let Dt=k.messageResolver(Ke,fe);if(Dt===null&&(Dt=Ke[fe]),Za(Dt)||ks(Dt)||ht(Dt))return!0}return!1},()=>[fe],"translate exists",et=>Reflect.apply(et.te,et,[fe,Te]),axe,et=>kn(et))}function V(fe){let Te=null;const et=X2(k,l.value,a.value);for(let Re=0;Re<et.length;Re++){const ze=u.value[et[Re]]||{},Ke=k.messageResolver(ze,fe);if(Ke!=null){Te=Ke;break}}return Te}function K(fe){const Te=V(fe);return Te??(e?e.tm(fe)||{}:{})}function G(fe){return u.value[fe]||{}}function ye(fe,Te){if(r){const et={[fe]:Te};for(const Re in et)Ms(et,Re)&&Xv(et[Re]);Te=et[fe]}u.value[fe]=Te,k.messages=u.value}function be(fe,Te){u.value[fe]=u.value[fe]||{};const et={[fe]:Te};if(r)for(const Re in et)Ms(et,Re)&&Xv(et[Re]);Te=et[fe],Uw(Te,u.value[fe]),k.messages=u.value}function Ce(fe){return c.value[fe]||{}}function Y(fe,Te){c.value[fe]=Te,k.datetimeFormats=c.value,L3(k,fe,Te)}function Z(fe,Te){c.value[fe]=rr(c.value[fe]||{},Te),k.datetimeFormats=c.value,L3(k,fe,Te)}function ae(fe){return d.value[fe]||{}}function pe(fe,Te){d.value[fe]=Te,k.numberFormats=d.value,N3(k,fe,Te)}function je(fe,Te){d.value[fe]=rr(d.value[fe]||{},Te),k.numberFormats=d.value,N3(k,fe,Te)}H3++,e&&J_&&(Se(e.locale,fe=>{s&&(a.value=fe,k.locale=fe,Dg(k,a.value,l.value))}),Se(e.fallbackLocale,fe=>{s&&(l.value=fe,k.fallbackLocale=fe,Dg(k,a.value,l.value))}));const Ie={id:H3,locale:x,fallbackLocale:P,get inheritLocale(){return s},set inheritLocale(fe){s=fe,fe&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,Dg(k,a.value,l.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:A,get modifiers(){return C},get pluralRules(){return S||{}},get isGlobal(){return i},get missingWarn(){return f},set missingWarn(fe){f=fe,k.missingWarn=f},get fallbackWarn(){return h},set fallbackWarn(fe){h=fe,k.fallbackWarn=h},get fallbackRoot(){return m},set fallbackRoot(fe){m=fe},get fallbackFormat(){return g},set fallbackFormat(fe){g=fe,k.fallbackFormat=g},get warnHtmlMessage(){return y},set warnHtmlMessage(fe){y=fe,k.warnHtmlMessage=fe},get escapeParameter(){return _},set escapeParameter(fe){_=fe,k.escapeParameter=fe},t:F,getLocaleMessage:G,setLocaleMessage:ye,mergeLocaleMessage:be,getPostTranslationHandler:q,setPostTranslationHandler:z,getMissingHandler:R,setMissingHandler:O,[kj]:ee};return Ie.datetimeFormats=I,Ie.numberFormats=D,Ie.rt=j,Ie.te=te,Ie.tm=K,Ie.d=U,Ie.n=W,Ie.getDateTimeFormat=Ce,Ie.setDateTimeFormat=Y,Ie.mergeDateTimeFormat=Z,Ie.getNumberFormat=ae,Ie.setNumberFormat=pe,Ie.mergeNumberFormat=je,Ie[Tj]=n,Ie[eA]=X,Ie[tA]=re,Ie[nA]=se,Ie}function uxe(t){const e=ht(t.locale)?t.locale:Yv,n=ht(t.fallbackLocale)||Ei(t.fallbackLocale)||yn(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=di(t.missing)?t.missing:void 0,r=kn(t.silentTranslationWarn)||$m(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,o=kn(t.silentFallbackWarn)||$m(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,s=kn(t.fallbackRoot)?t.fallbackRoot:!0,a=!!t.formatFallbackMessages,l=yn(t.modifiers)?t.modifiers:{},u=t.pluralizationRules,c=di(t.postTranslation)?t.postTranslation:void 0,d=ht(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,f=!!t.escapeParameterHtml,h=kn(t.sync)?t.sync:!0;let m=t.messages;if(yn(t.sharedMessages)){const C=t.sharedMessages;m=Object.keys(C).reduce((k,T)=>{const E=k[T]||(k[T]={});return rr(E,C[T]),k},m||{})}const{__i18n:g,__root:v,__injectWithOption:p}=t,b=t.datetimeFormats,y=t.numberFormats,_=t.flatJson;return{locale:e,fallbackLocale:n,messages:m,flatJson:_,datetimeFormats:b,numberFormats:y,missing:i,missingWarn:r,fallbackWarn:o,fallbackRoot:s,fallbackFormat:a,modifiers:l,pluralRules:u,postTranslation:c,warnHtmlMessage:d,escapeParameter:f,messageResolver:t.messageResolver,inheritLocale:h,__i18n:g,__root:v,__injectWithOption:p}}function rA(t={}){const e=sM(uxe(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(r){e.locale.value=r},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(r){e.fallbackLocale.value=r},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(r){e.setMissingHandler(r)},get silentTranslationWarn(){return kn(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(r){e.missingWarn=kn(r)?!r:r},get silentFallbackWarn(){return kn(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(r){e.fallbackWarn=kn(r)?!r:r},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(r){e.fallbackFormat=r},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(r){e.setPostTranslationHandler(r)},get sync(){return e.inheritLocale},set sync(r){e.inheritLocale=r},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(r){e.warnHtmlMessage=r!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(r){e.escapeParameter=r},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...r){return Reflect.apply(e.t,e,[...r])},rt(...r){return Reflect.apply(e.rt,e,[...r])},te(r,o){return e.te(r,o)},tm(r){return e.tm(r)},getLocaleMessage(r){return e.getLocaleMessage(r)},setLocaleMessage(r,o){e.setLocaleMessage(r,o)},mergeLocaleMessage(r,o){e.mergeLocaleMessage(r,o)},d(...r){return Reflect.apply(e.d,e,[...r])},getDateTimeFormat(r){return e.getDateTimeFormat(r)},setDateTimeFormat(r,o){e.setDateTimeFormat(r,o)},mergeDateTimeFormat(r,o){e.mergeDateTimeFormat(r,o)},n(...r){return Reflect.apply(e.n,e,[...r])},getNumberFormat(r){return e.getNumberFormat(r)},setNumberFormat(r,o){e.setNumberFormat(r,o)},mergeNumberFormat(r,o){e.mergeNumberFormat(r,o)}};return i.__extender=n,i}function cxe(t,e,n){return{beforeCreate(){const i=Jv();if(!i)throw ls(Do.UNEXPECTED_ERROR);const r=this.$options;if(r.i18n){const o=r.i18n;if(r.__i18n&&(o.__i18n=r.__i18n),o.__root=e,this===this.$root)this.$i18n=W3(t,o);else{o.__injectWithOption=!0,o.__extender=n.__vueI18nExtend,this.$i18n=rA(o);const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}}else if(r.__i18n)if(this===this.$root)this.$i18n=W3(t,r);else{this.$i18n=rA({__i18n:r.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}else this.$i18n=t;r.__i18nGlobal&&xj(e,r,r),this.$t=(...o)=>this.$i18n.t(...o),this.$rt=(...o)=>this.$i18n.rt(...o),this.$te=(o,s)=>this.$i18n.te(o,s),this.$d=(...o)=>this.$i18n.d(...o),this.$n=(...o)=>this.$i18n.n(...o),this.$tm=o=>this.$i18n.tm(o),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=Jv();if(!i)throw ls(Do.UNEXPECTED_ERROR);const r=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,r.__disposer&&(r.__disposer(),delete r.__disposer,delete r.__extender),n.__deleteInstance(i),delete this.$i18n}}}function W3(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[kj](e.pluralizationRules||t.pluralizationRules);const n=oM(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const aM={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function dxe({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,r)=>[...i,...r.type===rt?r.children:[r]],[]):e.reduce((n,i)=>{const r=t[i];return r&&(n[i]=r()),n},Un())}function Aj(){return rt}const fxe=le({name:"i18n-t",props:rr({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>Xi(t)||!isNaN(t)}},aM),setup(t,e){const{slots:n,attrs:i}=e,r=t.i18n||YC({useScope:t.scope,__useComponent:!0});return()=>{const o=Object.keys(n).filter(d=>d[0]!=="_"),s=Un();t.locale&&(s.locale=t.locale),t.plural!==void 0&&(s.plural=ht(t.plural)?+t.plural:t.plural);const a=dxe(e,o),l=r[eA](t.keypath,a,s),u=rr(Un(),i),c=ht(t.tag)||Nn(t.tag)?t.tag:Aj();return nt(c,u,l)}}}),q3=fxe;function hxe(t){return Ei(t)&&!ht(t[0])}function Pj(t,e,n,i){const{slots:r,attrs:o}=e;return()=>{const s={part:!0};let a=Un();t.locale&&(s.locale=t.locale),ht(t.format)?s.key=t.format:Nn(t.format)&&(ht(t.format.key)&&(s.key=t.format.key),a=Object.keys(t.format).reduce((f,h)=>n.includes(h)?rr(Un(),f,{[h]:t.format[h]}):f,Un()));const l=i(t.value,s,a);let u=[s.key];Ei(l)?u=l.map((f,h)=>{const m=r[f.type],g=m?m({[f.type]:f.value,index:h,parts:l}):[f.value];return hxe(g)&&(g[0].key=`${f.type}-${h}`),g}):ht(l)&&(u=[l]);const c=rr(Un(),o),d=ht(t.tag)||Nn(t.tag)?t.tag:Aj();return nt(d,c,u)}}const mxe=le({name:"i18n-n",props:rr({value:{type:Number,required:!0},format:{type:[String,Object]}},aM),setup(t,e){const n=t.i18n||YC({useScope:t.scope,__useComponent:!0});return Pj(t,e,_j,(...i)=>n[nA](...i))}}),j3=mxe;function gxe(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function pxe(t){const e=s=>{const{instance:a,value:l}=s;if(!a||!a.$)throw ls(Do.UNEXPECTED_ERROR);const u=gxe(t,a.$),c=K3(l);return[Reflect.apply(u.t,u,[...G3(c)]),u]};return{created:(s,a)=>{const[l,u]=e(a);J_&&(s.__i18nWatcher=Se(u.locale,()=>{a.instance&&a.instance.$forceUpdate()})),s.__composer=u,s.textContent=l},unmounted:s=>{J_&&s.__i18nWatcher&&(s.__i18nWatcher(),s.__i18nWatcher=void 0,delete s.__i18nWatcher),s.__composer&&(s.__composer=void 0,delete s.__composer)},beforeUpdate:(s,{value:a})=>{if(s.__composer){const l=s.__composer,u=K3(a);s.textContent=Reflect.apply(l.t,l,[...G3(u)])}},getSSRProps:s=>{const[a]=e(s);return{textContent:a}}}}function K3(t){if(ht(t))return{path:t};if(yn(t)){if(!("path"in t))throw ls(Do.REQUIRED_VALUE,"path");return t}else throw ls(Do.INVALID_VALUE)}function G3(t){const{path:e,locale:n,args:i,choice:r,plural:o}=t,s={},a=i||{};return ht(n)&&(s.locale=n),Xi(r)&&(s.plural=r),Xi(o)&&(s.plural=o),[e,a,s]}function vxe(t,e,...n){const i=yn(n[0])?n[0]:{};(!kn(i.globalInstall)||i.globalInstall)&&([q3.name,"I18nT"].forEach(o=>t.component(o,q3)),[j3.name,"I18nN"].forEach(o=>t.component(o,j3)),[X3.name,"I18nD"].forEach(o=>t.component(o,X3))),t.directive("t",pxe(e))}const bxe=Uc("global-vue-i18n");function yxe(t={}){const e=__VUE_I18N_LEGACY_API__&&kn(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,n=kn(t.globalInjection)?t.globalInjection:!0,i=new Map,[r,o]=wxe(t,e),s=Uc("");function a(d){return i.get(d)||null}function l(d,f){i.set(d,f)}function u(d){i.delete(d)}const c={get mode(){return __VUE_I18N_LEGACY_API__&&e?"legacy":"composition"},async install(d,...f){if(d.__VUE_I18N_SYMBOL__=s,d.provide(d.__VUE_I18N_SYMBOL__,c),yn(f[0])){const g=f[0];c.__composerExtend=g.__composerExtend,c.__vueI18nExtend=g.__vueI18nExtend}let h=null;!e&&n&&(h=Axe(d,c.global)),__VUE_I18N_FULL_INSTALL__&&vxe(d,c,...f),__VUE_I18N_LEGACY_API__&&e&&d.mixin(cxe(o,o.__composer,c));const m=d.unmount;d.unmount=()=>{h&&h(),c.dispose(),m()}},get global(){return o},dispose(){r.stop()},__instances:i,__getInstance:a,__setInstance:l,__deleteInstance:u};return c}function YC(t={}){const e=Jv();if(e==null)throw ls(Do.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw ls(Do.NOT_INSTALLED);const n=_xe(e),i=Sxe(n),r=Ej(e),o=Cxe(t,r);if(o==="global")return xj(i,t,r),i;if(o==="parent"){let l=kxe(n,e,t.__useComponent);return l==null&&(l=i),l}const s=n;let a=s.__getInstance(e);if(a==null){const l=rr({},t);"__i18n"in r&&(l.__i18n=r.__i18n),i&&(l.__root=i),a=sM(l),s.__composerExtend&&(a[iA]=s.__composerExtend(a)),Exe(s,e,a),s.__setInstance(e,a)}return a}function wxe(t,e){const n=zb(),i=__VUE_I18N_LEGACY_API__&&e?n.run(()=>rA(t)):n.run(()=>sM(t));if(i==null)throw ls(Do.UNEXPECTED_ERROR);return[n,i]}function _xe(t){const e=Ne(t.isCE?bxe:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw ls(t.isCE?Do.NOT_INSTALLED_WITH_PROVIDE:Do.UNEXPECTED_ERROR);return e}function Cxe(t,e){return jC(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function Sxe(t){return t.mode==="composition"?t.global:t.global.__composer}function kxe(t,e,n=!1){let i=null;const r=e.root;let o=Txe(e,n);for(;o!=null;){const s=t;if(t.mode==="composition")i=s.__getInstance(o);else if(__VUE_I18N_LEGACY_API__){const a=s.__getInstance(o);a!=null&&(i=a.__composer,n&&i&&!i[Tj]&&(i=null))}if(i!=null||r===o)break;o=o.parent}return i}function Txe(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function Exe(t,e,n){Pt(()=>{},e),Fc(()=>{const i=n;t.__deleteInstance(e);const r=i[iA];r&&(r(),delete i[iA])},e)}const xxe=["locale","fallbackLocale","availableLocales"],Y3=["t","rt","d","n","tm","te"];function Axe(t,e){const n=Object.create(null);return xxe.forEach(r=>{const o=Object.getOwnPropertyDescriptor(e,r);if(!o)throw ls(Do.UNEXPECTED_ERROR);const s=rn(o.value)?{get(){return o.value.value},set(a){o.value.value=a}}:{get(){return o.get&&o.get()}};Object.defineProperty(n,r,s)}),t.config.globalProperties.$i18n=n,Y3.forEach(r=>{const o=Object.getOwnPropertyDescriptor(e,r);if(!o||!o.value)throw ls(Do.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${r}`,o)}),()=>{delete t.config.globalProperties.$i18n,Y3.forEach(r=>{delete t.config.globalProperties[`$${r}`]})}}const Pxe=le({name:"i18n-d",props:rr({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},aM),setup(t,e){const n=t.i18n||YC({useScope:t.scope,__useComponent:!0});return Pj(t,e,wj,(...i)=>n[tA](...i))}}),X3=Pxe;sxe();FEe(wEe);$Ee(NEe);zEe(X2);if(__INTLIFY_PROD_DEVTOOLS__){const t=Kd();t.__INTLIFY__=!0,_Ee(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const J3="_I18N_LOCALE_CACHE_KEY_";function Ixe(t){const{storeId:e,messages:n,locale:i="enUS",useCache:r=!0,i18nOptions:o={}}=t,a=(r?bc.get(J3):null)||i,l=yxe({legacy:!1,locale:a,messages:n,...o});return{i18n:l,useI18nStore:PTe(e,()=>{const{t:c,locale:d}=YC();return{locale:d,change:m=>{r&&bc.set(J3,m),d.value=m},t:(m,g={})=>c(m,g),i18n:l}})}}var sh={},Gk,Z3;function Rxe(){return Z3||(Z3=1,Gk=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),Gk}var Yk={},Lu={},Q3;function Vf(){if(Q3)return Lu;Q3=1;let t;const e=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];return Lu.getSymbolSize=function(i){if(!i)throw new Error('"version" cannot be null or undefined');if(i<1||i>40)throw new Error('"version" should be in range from 1 to 40');return i*4+17},Lu.getSymbolTotalCodewords=function(i){return e[i]},Lu.getBCHDigit=function(n){let i=0;for(;n!==0;)i++,n>>>=1;return i},Lu.setToSJISFunction=function(i){if(typeof i!="function")throw new Error('"toSJISFunc" is not a valid function.');t=i},Lu.isKanjiModeEnabled=function(){return typeof t<"u"},Lu.toSJIS=function(i){return t(i)},Lu}var Xk={},eB;function lM(){return eB||(eB=1,(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+n)}}t.isValid=function(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,r){if(t.isValid(i))return i;try{return e(i)}catch{return r}}})(Xk)),Xk}var Jk,tB;function Mxe(){if(tB)return Jk;tB=1;function t(){this.buffer=[],this.length=0}return t.prototype={get:function(e){const n=Math.floor(e/8);return(this.buffer[n]>>>7-e%8&1)===1},put:function(e,n){for(let i=0;i<n;i++)this.putBit((e>>>n-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),e&&(this.buffer[n]|=128>>>this.length%8),this.length++}},Jk=t,Jk}var Zk,nB;function Oxe(){if(nB)return Zk;nB=1;function t(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}return t.prototype.set=function(e,n,i,r){const o=e*this.size+n;this.data[o]=i,r&&(this.reservedBit[o]=!0)},t.prototype.get=function(e,n){return this.data[e*this.size+n]},t.prototype.xor=function(e,n,i){this.data[e*this.size+n]^=i},t.prototype.isReserved=function(e,n){return this.reservedBit[e*this.size+n]},Zk=t,Zk}var Qk={},iB;function Lxe(){return iB||(iB=1,(function(t){const e=Vf().getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const r=Math.floor(i/7)+2,o=e(i),s=o===145?26:Math.ceil((o-13)/(2*r-2))*2,a=[o-7];for(let l=1;l<r-1;l++)a[l]=a[l-1]-s;return a.push(6),a.reverse()},t.getPositions=function(i){const r=[],o=t.getRowColCoords(i),s=o.length;for(let a=0;a<s;a++)for(let l=0;l<s;l++)a===0&&l===0||a===0&&l===s-1||a===s-1&&l===0||r.push([o[a],o[l]]);return r}})(Qk)),Qk}var eT={},rB;function Dxe(){if(rB)return eT;rB=1;const t=Vf().getSymbolSize,e=7;return eT.getPositions=function(i){const r=t(i);return[[0,0],[r-e,0],[0,r-e]]},eT}var tT={},oB;function Nxe(){return oB||(oB=1,(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(r){return r!=null&&r!==""&&!isNaN(r)&&r>=0&&r<=7},t.from=function(r){return t.isValid(r)?parseInt(r,10):void 0},t.getPenaltyN1=function(r){const o=r.size;let s=0,a=0,l=0,u=null,c=null;for(let d=0;d<o;d++){a=l=0,u=c=null;for(let f=0;f<o;f++){let h=r.get(d,f);h===u?a++:(a>=5&&(s+=e.N1+(a-5)),u=h,a=1),h=r.get(f,d),h===c?l++:(l>=5&&(s+=e.N1+(l-5)),c=h,l=1)}a>=5&&(s+=e.N1+(a-5)),l>=5&&(s+=e.N1+(l-5))}return s},t.getPenaltyN2=function(r){const o=r.size;let s=0;for(let a=0;a<o-1;a++)for(let l=0;l<o-1;l++){const u=r.get(a,l)+r.get(a,l+1)+r.get(a+1,l)+r.get(a+1,l+1);(u===4||u===0)&&s++}return s*e.N2},t.getPenaltyN3=function(r){const o=r.size;let s=0,a=0,l=0;for(let u=0;u<o;u++){a=l=0;for(let c=0;c<o;c++)a=a<<1&2047|r.get(u,c),c>=10&&(a===1488||a===93)&&s++,l=l<<1&2047|r.get(c,u),c>=10&&(l===1488||l===93)&&s++}return s*e.N3},t.getPenaltyN4=function(r){let o=0;const s=r.data.length;for(let l=0;l<s;l++)o+=r.data[l];return Math.abs(Math.ceil(o*100/s/5)-10)*e.N4};function n(i,r,o){switch(i){case t.Patterns.PATTERN000:return(r+o)%2===0;case t.Patterns.PATTERN001:return r%2===0;case t.Patterns.PATTERN010:return o%3===0;case t.Patterns.PATTERN011:return(r+o)%3===0;case t.Patterns.PATTERN100:return(Math.floor(r/2)+Math.floor(o/3))%2===0;case t.Patterns.PATTERN101:return r*o%2+r*o%3===0;case t.Patterns.PATTERN110:return(r*o%2+r*o%3)%2===0;case t.Patterns.PATTERN111:return(r*o%3+(r+o)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(r,o){const s=o.size;for(let a=0;a<s;a++)for(let l=0;l<s;l++)o.isReserved(l,a)||o.xor(l,a,n(r,l,a))},t.getBestMask=function(r,o){const s=Object.keys(t.Patterns).length;let a=0,l=1/0;for(let u=0;u<s;u++){o(u),t.applyMask(u,r);const c=t.getPenaltyN1(r)+t.getPenaltyN2(r)+t.getPenaltyN3(r)+t.getPenaltyN4(r);t.applyMask(u,r),c<l&&(l=c,a=u)}return a}})(tT)),tT}var Z0={},sB;function Ij(){if(sB)return Z0;sB=1;const t=lM(),e=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],n=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];return Z0.getBlocksCount=function(r,o){switch(o){case t.L:return e[(r-1)*4+0];case t.M:return e[(r-1)*4+1];case t.Q:return e[(r-1)*4+2];case t.H:return e[(r-1)*4+3];default:return}},Z0.getTotalCodewordsCount=function(r,o){switch(o){case t.L:return n[(r-1)*4+0];case t.M:return n[(r-1)*4+1];case t.Q:return n[(r-1)*4+2];case t.H:return n[(r-1)*4+3];default:return}},Z0}var nT={},Ng={},aB;function Bxe(){if(aB)return Ng;aB=1;const t=new Uint8Array(512),e=new Uint8Array(256);return(function(){let i=1;for(let r=0;r<255;r++)t[r]=i,e[i]=r,i<<=1,i&256&&(i^=285);for(let r=255;r<512;r++)t[r]=t[r-255]})(),Ng.log=function(i){if(i<1)throw new Error("log("+i+")");return e[i]},Ng.exp=function(i){return t[i]},Ng.mul=function(i,r){return i===0||r===0?0:t[e[i]+e[r]]},Ng}var lB;function Vxe(){return lB||(lB=1,(function(t){const e=Bxe();t.mul=function(i,r){const o=new Uint8Array(i.length+r.length-1);for(let s=0;s<i.length;s++)for(let a=0;a<r.length;a++)o[s+a]^=e.mul(i[s],r[a]);return o},t.mod=function(i,r){let o=new Uint8Array(i);for(;o.length-r.length>=0;){const s=o[0];for(let l=0;l<r.length;l++)o[l]^=e.mul(r[l],s);let a=0;for(;a<o.length&&o[a]===0;)a++;o=o.slice(a)}return o},t.generateECPolynomial=function(i){let r=new Uint8Array([1]);for(let o=0;o<i;o++)r=t.mul(r,new Uint8Array([1,e.exp(o)]));return r}})(nT)),nT}var iT,uB;function Fxe(){if(uB)return iT;uB=1;const t=Vxe();function e(n){this.genPoly=void 0,this.degree=n,this.degree&&this.initialize(this.degree)}return e.prototype.initialize=function(i){this.degree=i,this.genPoly=t.generateECPolynomial(this.degree)},e.prototype.encode=function(i){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(i.length+this.degree);r.set(i);const o=t.mod(r,this.genPoly),s=this.degree-o.length;if(s>0){const a=new Uint8Array(this.degree);return a.set(o,s),a}return o},iT=e,iT}var rT={},oT={},sT={},cB;function Rj(){return cB||(cB=1,sT.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}),sT}var Ia={},dB;function Mj(){if(dB)return Ia;dB=1;const t="[0-9]+",e="[A-Z $%*+\\-./:]+";let n="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";n=n.replace(/u/g,"\\u");const i="(?:(?![A-Z0-9 $%*+\\-./:]|"+n+`)(?:.|[\r
]))+`;Ia.KANJI=new RegExp(n,"g"),Ia.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),Ia.BYTE=new RegExp(i,"g"),Ia.NUMERIC=new RegExp(t,"g"),Ia.ALPHANUMERIC=new RegExp(e,"g");const r=new RegExp("^"+n+"$"),o=new RegExp("^"+t+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return Ia.testKanji=function(l){return r.test(l)},Ia.testNumeric=function(l){return o.test(l)},Ia.testAlphanumeric=function(l){return s.test(l)},Ia}var fB;function Ff(){return fB||(fB=1,(function(t){const e=Rj(),n=Mj();t.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(o,s){if(!o.ccBits)throw new Error("Invalid mode: "+o);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?o.ccBits[0]:s<27?o.ccBits[1]:o.ccBits[2]},t.getBestModeForData=function(o){return n.testNumeric(o)?t.NUMERIC:n.testAlphanumeric(o)?t.ALPHANUMERIC:n.testKanji(o)?t.KANJI:t.BYTE},t.toString=function(o){if(o&&o.id)return o.id;throw new Error("Invalid mode")},t.isValid=function(o){return o&&o.bit&&o.ccBits};function i(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+r)}}t.from=function(o,s){if(t.isValid(o))return o;try{return i(o)}catch{return s}}})(oT)),oT}var hB;function $xe(){return hB||(hB=1,(function(t){const e=Vf(),n=Ij(),i=lM(),r=Ff(),o=Rj(),s=7973,a=e.getBCHDigit(s);function l(f,h,m){for(let g=1;g<=40;g++)if(h<=t.getCapacity(g,m,f))return g}function u(f,h){return r.getCharCountIndicator(f,h)+4}function c(f,h){let m=0;return f.forEach(function(g){const v=u(g.mode,h);m+=v+g.getBitsLength()}),m}function d(f,h){for(let m=1;m<=40;m++)if(c(f,m)<=t.getCapacity(m,h,r.MIXED))return m}t.from=function(h,m){return o.isValid(h)?parseInt(h,10):m},t.getCapacity=function(h,m,g){if(!o.isValid(h))throw new Error("Invalid QR Code version");typeof g>"u"&&(g=r.BYTE);const v=e.getSymbolTotalCodewords(h),p=n.getTotalCodewordsCount(h,m),b=(v-p)*8;if(g===r.MIXED)return b;const y=b-u(g,h);switch(g){case r.NUMERIC:return Math.floor(y/10*3);case r.ALPHANUMERIC:return Math.floor(y/11*2);case r.KANJI:return Math.floor(y/13);case r.BYTE:default:return Math.floor(y/8)}},t.getBestVersionForData=function(h,m){let g;const v=i.from(m,i.M);if(Array.isArray(h)){if(h.length>1)return d(h,v);if(h.length===0)return 1;g=h[0]}else g=h;return l(g.mode,g.getLength(),v)},t.getEncodedBits=function(h){if(!o.isValid(h)||h<7)throw new Error("Invalid QR Code version");let m=h<<12;for(;e.getBCHDigit(m)-a>=0;)m^=s<<e.getBCHDigit(m)-a;return h<<12|m}})(rT)),rT}var aT={},mB;function zxe(){if(mB)return aT;mB=1;const t=Vf(),e=1335,n=21522,i=t.getBCHDigit(e);return aT.getEncodedBits=function(o,s){const a=o.bit<<3|s;let l=a<<10;for(;t.getBCHDigit(l)-i>=0;)l^=e<<t.getBCHDigit(l)-i;return(a<<10|l)^n},aT}var lT={},uT,gB;function Hxe(){if(gB)return uT;gB=1;const t=Ff();function e(n){this.mode=t.NUMERIC,this.data=n.toString()}return e.getBitsLength=function(i){return 10*Math.floor(i/3)+(i%3?i%3*3+1:0)},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(i){let r,o,s;for(r=0;r+3<=this.data.length;r+=3)o=this.data.substr(r,3),s=parseInt(o,10),i.put(s,10);const a=this.data.length-r;a>0&&(o=this.data.substr(r),s=parseInt(o,10),i.put(s,a*3+1))},uT=e,uT}var cT,pB;function Uxe(){if(pB)return cT;pB=1;const t=Ff(),e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function n(i){this.mode=t.ALPHANUMERIC,this.data=i}return n.getBitsLength=function(r){return 11*Math.floor(r/2)+6*(r%2)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(r){let o;for(o=0;o+2<=this.data.length;o+=2){let s=e.indexOf(this.data[o])*45;s+=e.indexOf(this.data[o+1]),r.put(s,11)}this.data.length%2&&r.put(e.indexOf(this.data[o]),6)},cT=n,cT}var dT,vB;function Wxe(){if(vB)return dT;vB=1;const t=Ff();function e(n){this.mode=t.BYTE,typeof n=="string"?this.data=new TextEncoder().encode(n):this.data=new Uint8Array(n)}return e.getBitsLength=function(i){return i*8},e.prototype.getLength=function(){return this.data.length},e.prototype.getBitsLength=function(){return e.getBitsLength(this.data.length)},e.prototype.write=function(n){for(let i=0,r=this.data.length;i<r;i++)n.put(this.data[i],8)},dT=e,dT}var fT,bB;function qxe(){if(bB)return fT;bB=1;const t=Ff(),e=Vf();function n(i){this.mode=t.KANJI,this.data=i}return n.getBitsLength=function(r){return r*13},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(i){let r;for(r=0;r<this.data.length;r++){let o=e.toSJIS(this.data[r]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[r]+`
Make sure your charset is UTF-8`);o=(o>>>8&255)*192+(o&255),i.put(o,13)}},fT=n,fT}var hT={exports:{}},yB;function jxe(){return yB||(yB=1,(function(t){var e={single_source_shortest_paths:function(n,i,r){var o={},s={};s[i]=0;var a=e.PriorityQueue.make();a.push(i,0);for(var l,u,c,d,f,h,m,g,v;!a.empty();){l=a.pop(),u=l.value,d=l.cost,f=n[u]||{};for(c in f)f.hasOwnProperty(c)&&(h=f[c],m=d+h,g=s[c],v=typeof s[c]>"u",(v||g>m)&&(s[c]=m,a.push(c,m),o[c]=u))}if(typeof r<"u"&&typeof s[r]>"u"){var p=["Could not find a path from ",i," to ",r,"."].join("");throw new Error(p)}return o},extract_shortest_path_from_predecessor_list:function(n,i){for(var r=[],o=i;o;)r.push(o),n[o],o=n[o];return r.reverse(),r},find_path:function(n,i,r){var o=e.single_source_shortest_paths(n,i,r);return e.extract_shortest_path_from_predecessor_list(o,r)},PriorityQueue:{make:function(n){var i=e.PriorityQueue,r={},o;n=n||{};for(o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);return r.queue=[],r.sorter=n.sorter||i.default_sorter,r},default_sorter:function(n,i){return n.cost-i.cost},push:function(n,i){var r={value:n,cost:i};this.queue.push(r),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(hT)),hT.exports}var wB;function Kxe(){return wB||(wB=1,(function(t){const e=Ff(),n=Hxe(),i=Uxe(),r=Wxe(),o=qxe(),s=Mj(),a=Vf(),l=jxe();function u(p){return unescape(encodeURIComponent(p)).length}function c(p,b,y){const _=[];let C;for(;(C=p.exec(y))!==null;)_.push({data:C[0],index:C.index,mode:b,length:C[0].length});return _}function d(p){const b=c(s.NUMERIC,e.NUMERIC,p),y=c(s.ALPHANUMERIC,e.ALPHANUMERIC,p);let _,C;return a.isKanjiModeEnabled()?(_=c(s.BYTE,e.BYTE,p),C=c(s.KANJI,e.KANJI,p)):(_=c(s.BYTE_KANJI,e.BYTE,p),C=[]),b.concat(y,_,C).sort(function(k,T){return k.index-T.index}).map(function(k){return{data:k.data,mode:k.mode,length:k.length}})}function f(p,b){switch(b){case e.NUMERIC:return n.getBitsLength(p);case e.ALPHANUMERIC:return i.getBitsLength(p);case e.KANJI:return o.getBitsLength(p);case e.BYTE:return r.getBitsLength(p)}}function h(p){return p.reduce(function(b,y){const _=b.length-1>=0?b[b.length-1]:null;return _&&_.mode===y.mode?(b[b.length-1].data+=y.data,b):(b.push(y),b)},[])}function m(p){const b=[];for(let y=0;y<p.length;y++){const _=p[y];switch(_.mode){case e.NUMERIC:b.push([_,{data:_.data,mode:e.ALPHANUMERIC,length:_.length},{data:_.data,mode:e.BYTE,length:_.length}]);break;case e.ALPHANUMERIC:b.push([_,{data:_.data,mode:e.BYTE,length:_.length}]);break;case e.KANJI:b.push([_,{data:_.data,mode:e.BYTE,length:u(_.data)}]);break;case e.BYTE:b.push([{data:_.data,mode:e.BYTE,length:u(_.data)}])}}return b}function g(p,b){const y={},_={start:{}};let C=["start"];for(let S=0;S<p.length;S++){const k=p[S],T=[];for(let E=0;E<k.length;E++){const x=k[E],P=""+S+E;T.push(P),y[P]={node:x,lastCount:0},_[P]={};for(let A=0;A<C.length;A++){const I=C[A];y[I]&&y[I].node.mode===x.mode?(_[I][P]=f(y[I].lastCount+x.length,x.mode)-f(y[I].lastCount,x.mode),y[I].lastCount+=x.length):(y[I]&&(y[I].lastCount=x.length),_[I][P]=f(x.length,x.mode)+4+e.getCharCountIndicator(x.mode,b))}}C=T}for(let S=0;S<C.length;S++)_[C[S]].end=0;return{map:_,table:y}}function v(p,b){let y;const _=e.getBestModeForData(p);if(y=e.from(b,_),y!==e.BYTE&&y.bit<_.bit)throw new Error('"'+p+'" cannot be encoded with mode '+e.toString(y)+`.
Suggested mode is: `+e.toString(_));switch(y===e.KANJI&&!a.isKanjiModeEnabled()&&(y=e.BYTE),y){case e.NUMERIC:return new n(p);case e.ALPHANUMERIC:return new i(p);case e.KANJI:return new o(p);case e.BYTE:return new r(p)}}t.fromArray=function(b){return b.reduce(function(y,_){return typeof _=="string"?y.push(v(_,null)):_.data&&y.push(v(_.data,_.mode)),y},[])},t.fromString=function(b,y){const _=d(b,a.isKanjiModeEnabled()),C=m(_),S=g(C,y),k=l.find_path(S.map,"start","end"),T=[];for(let E=1;E<k.length-1;E++)T.push(S.table[k[E]].node);return t.fromArray(h(T))},t.rawSplit=function(b){return t.fromArray(d(b,a.isKanjiModeEnabled()))}})(lT)),lT}var _B;function Gxe(){if(_B)return Yk;_B=1;const t=Vf(),e=lM(),n=Mxe(),i=Oxe(),r=Lxe(),o=Dxe(),s=Nxe(),a=Ij(),l=Fxe(),u=$xe(),c=zxe(),d=Ff(),f=Kxe();function h(S,k){const T=S.size,E=o.getPositions(k);for(let x=0;x<E.length;x++){const P=E[x][0],A=E[x][1];for(let I=-1;I<=7;I++)if(!(P+I<=-1||T<=P+I))for(let D=-1;D<=7;D++)A+D<=-1||T<=A+D||(I>=0&&I<=6&&(D===0||D===6)||D>=0&&D<=6&&(I===0||I===6)||I>=2&&I<=4&&D>=2&&D<=4?S.set(P+I,A+D,!0,!0):S.set(P+I,A+D,!1,!0))}}function m(S){const k=S.size;for(let T=8;T<k-8;T++){const E=T%2===0;S.set(T,6,E,!0),S.set(6,T,E,!0)}}function g(S,k){const T=r.getPositions(k);for(let E=0;E<T.length;E++){const x=T[E][0],P=T[E][1];for(let A=-2;A<=2;A++)for(let I=-2;I<=2;I++)A===-2||A===2||I===-2||I===2||A===0&&I===0?S.set(x+A,P+I,!0,!0):S.set(x+A,P+I,!1,!0)}}function v(S,k){const T=S.size,E=u.getEncodedBits(k);let x,P,A;for(let I=0;I<18;I++)x=Math.floor(I/3),P=I%3+T-8-3,A=(E>>I&1)===1,S.set(x,P,A,!0),S.set(P,x,A,!0)}function p(S,k,T){const E=S.size,x=c.getEncodedBits(k,T);let P,A;for(P=0;P<15;P++)A=(x>>P&1)===1,P<6?S.set(P,8,A,!0):P<8?S.set(P+1,8,A,!0):S.set(E-15+P,8,A,!0),P<8?S.set(8,E-P-1,A,!0):P<9?S.set(8,15-P-1+1,A,!0):S.set(8,15-P-1,A,!0);S.set(E-8,8,1,!0)}function b(S,k){const T=S.size;let E=-1,x=T-1,P=7,A=0;for(let I=T-1;I>0;I-=2)for(I===6&&I--;;){for(let D=0;D<2;D++)if(!S.isReserved(x,I-D)){let q=!1;A<k.length&&(q=(k[A]>>>P&1)===1),S.set(x,I-D,q),P--,P===-1&&(A++,P=7)}if(x+=E,x<0||T<=x){x-=E,E=-E;break}}}function y(S,k,T){const E=new n;T.forEach(function(D){E.put(D.mode.bit,4),E.put(D.getLength(),d.getCharCountIndicator(D.mode,S)),D.write(E)});const x=t.getSymbolTotalCodewords(S),P=a.getTotalCodewordsCount(S,k),A=(x-P)*8;for(E.getLengthInBits()+4<=A&&E.put(0,4);E.getLengthInBits()%8!==0;)E.putBit(0);const I=(A-E.getLengthInBits())/8;for(let D=0;D<I;D++)E.put(D%2?17:236,8);return _(E,S,k)}function _(S,k,T){const E=t.getSymbolTotalCodewords(k),x=a.getTotalCodewordsCount(k,T),P=E-x,A=a.getBlocksCount(k,T),I=E%A,D=A-I,q=Math.floor(E/A),z=Math.floor(P/A),R=z+1,O=q-z,N=new l(O);let F=0;const j=new Array(A),U=new Array(A);let W=0;const J=new Uint8Array(S.buffer);for(let re=0;re<A;re++){const ee=re<D?z:R;j[re]=J.slice(F,F+ee),U[re]=N.encode(j[re]),F+=ee,W=Math.max(W,ee)}const ne=new Uint8Array(E);let he=0,X,se;for(X=0;X<W;X++)for(se=0;se<A;se++)X<j[se].length&&(ne[he++]=j[se][X]);for(X=0;X<O;X++)for(se=0;se<A;se++)ne[he++]=U[se][X];return ne}function C(S,k,T,E){let x;if(Array.isArray(S))x=f.fromArray(S);else if(typeof S=="string"){let q=k;if(!q){const z=f.rawSplit(S);q=u.getBestVersionForData(z,T)}x=f.fromString(S,q||40)}else throw new Error("Invalid data");const P=u.getBestVersionForData(x,T);if(!P)throw new Error("The amount of data is too big to be stored in a QR Code");if(!k)k=P;else if(k<P)throw new Error(`
The chosen QR Code version cannot contain this amount of data.
Minimum version required to store current data is: `+P+`.
`);const A=y(k,T,x),I=t.getSymbolSize(k),D=new i(I);return h(D,k),m(D),g(D,k),p(D,T,0),k>=7&&v(D,k),b(D,A),isNaN(E)&&(E=s.getBestMask(D,p.bind(null,D,T))),s.applyMask(E,D),p(D,T,E),{modules:D,version:k,errorCorrectionLevel:T,maskPattern:E,segments:x}}return Yk.create=function(k,T){if(typeof k>"u"||k==="")throw new Error("No input text");let E=e.M,x,P;return typeof T<"u"&&(E=e.from(T.errorCorrectionLevel,e.M),x=u.from(T.version),P=s.from(T.maskPattern),T.toSJISFunc&&t.setToSJISFunction(T.toSJISFunc)),C(k,x,E,P)},Yk}var mT={},gT={},CB;function Oj(){return CB||(CB=1,(function(t){function e(n){if(typeof n=="number"&&(n=n.toString()),typeof n!="string")throw new Error("Color should be defined as hex string");let i=n.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+n);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(o){return[o,o]}))),i.length===6&&i.push("F","F");const r=parseInt(i.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:r&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const r=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,o=i.width&&i.width>=21?i.width:void 0,s=i.scale||4;return{width:o,scale:o?4:s,margin:r,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,r){return r.width&&r.width>=i+r.margin*2?r.width/(i+r.margin*2):r.scale},t.getImageWidth=function(i,r){const o=t.getScale(i,r);return Math.floor((i+r.margin*2)*o)},t.qrToImageData=function(i,r,o){const s=r.modules.size,a=r.modules.data,l=t.getScale(s,o),u=Math.floor((s+o.margin*2)*l),c=o.margin*l,d=[o.color.light,o.color.dark];for(let f=0;f<u;f++)for(let h=0;h<u;h++){let m=(f*u+h)*4,g=o.color.light;if(f>=c&&h>=c&&f<u-c&&h<u-c){const v=Math.floor((f-c)/l),p=Math.floor((h-c)/l);g=d[a[v*s+p]?1:0]}i[m++]=g.r,i[m++]=g.g,i[m++]=g.b,i[m]=g.a}}})(gT)),gT}var SB;function Yxe(){return SB||(SB=1,(function(t){const e=Oj();function n(r,o,s){r.clearRect(0,0,o.width,o.height),o.style||(o.style={}),o.height=s,o.width=s,o.style.height=s+"px",o.style.width=s+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(o,s,a){let l=a,u=s;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),s||(u=i()),l=e.getOptions(l);const c=e.getImageWidth(o.modules.size,l),d=u.getContext("2d"),f=d.createImageData(c,c);return e.qrToImageData(f.data,o,l),n(d,u,c),d.putImageData(f,0,0),u},t.renderToDataURL=function(o,s,a){let l=a;typeof l>"u"&&(!s||!s.getContext)&&(l=s,s=void 0),l||(l={});const u=t.render(o,s,l),c=l.type||"image/png",d=l.rendererOpts||{};return u.toDataURL(c,d.quality)}})(mT)),mT}var pT={},kB;function Xxe(){if(kB)return pT;kB=1;const t=Oj();function e(r,o){const s=r.a/255,a=o+'="'+r.hex+'"';return s<1?a+" "+o+'-opacity="'+s.toFixed(2).slice(1)+'"':a}function n(r,o,s){let a=r+o;return typeof s<"u"&&(a+=" "+s),a}function i(r,o,s){let a="",l=0,u=!1,c=0;for(let d=0;d<r.length;d++){const f=Math.floor(d%o),h=Math.floor(d/o);!f&&!u&&(u=!0),r[d]?(c++,d>0&&f>0&&r[d-1]||(a+=u?n("M",f+s,.5+h+s):n("m",l,0),l=0,u=!1),f+1<o&&r[d+1]||(a+=n("h",c),c=0)):l++}return a}return pT.render=function(o,s,a){const l=t.getOptions(s),u=o.modules.size,c=o.modules.data,d=u+l.margin*2,f=l.color.light.a?"<path "+e(l.color.light,"fill")+' d="M0 0h'+d+"v"+d+'H0z"/>':"",h="<path "+e(l.color.dark,"stroke")+' d="'+i(c,u,l.margin)+'"/>',m='viewBox="0 0 '+d+" "+d+'"',v='<svg xmlns="http://www.w3.org/2000/svg" '+(l.width?'width="'+l.width+'" height="'+l.width+'" ':"")+m+' shape-rendering="crispEdges">'+f+h+`</svg>
`;return typeof a=="function"&&a(null,v),v},pT}var TB;function Jxe(){if(TB)return sh;TB=1;const t=Rxe(),e=Gxe(),n=Yxe(),i=Xxe();function r(o,s,a,l,u){const c=[].slice.call(arguments,1),d=c.length,f=typeof c[d-1]=="function";if(!f&&!t())throw new Error("Callback required as last argument");if(f){if(d<2)throw new Error("Too few arguments provided");d===2?(u=a,a=s,s=l=void 0):d===3&&(s.getContext&&typeof u>"u"?(u=l,l=void 0):(u=l,l=a,a=s,s=void 0))}else{if(d<1)throw new Error("Too few arguments provided");return d===1?(a=s,s=l=void 0):d===2&&!s.getContext&&(l=a,a=s,s=void 0),new Promise(function(h,m){try{const g=e.create(a,l);h(o(g,s,l))}catch(g){m(g)}})}try{const h=e.create(a,l);u(null,o(h,s,l))}catch(h){u(h)}}return sh.create=e.create,sh.toCanvas=r.bind(null,n.render),sh.toDataURL=r.bind(null,n.renderToDataURL),sh.toString=r.bind(null,function(o,s,a){return i.render(o,a)}),sh}Jxe();class fl{static showConfirm(e){return ASe.confirm(e,"系统提示",{type:"warning"})}static showNotification(e){$Se({title:"系统提示",message:e,type:"info",duration:1800})}static showLoading(e="请稍后"){return hSe.service({text:e,spinner:"",background:"rgba(255,255,255,0.2)"})}}function Lj(t,e){return function(){return t.apply(e,arguments)}}const{toString:Zxe}=Object.prototype,{getPrototypeOf:uM}=Object,{iterator:XC,toStringTag:Dj}=Symbol,JC=(t=>e=>{const n=Zxe.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ca=t=>(t=t.toLowerCase(),e=>JC(e)===t),ZC=t=>e=>typeof e===t,{isArray:mg}=Array,Hm=ZC("undefined");function t0(t){return t!==null&&!Hm(t)&&t.constructor!==null&&!Hm(t.constructor)&&xo(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Nj=Ca("ArrayBuffer");function Qxe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Nj(t.buffer),e}const e2e=ZC("string"),xo=ZC("function"),Bj=ZC("number"),n0=t=>t!==null&&typeof t=="object",t2e=t=>t===!0||t===!1,Ww=t=>{if(JC(t)!=="object")return!1;const e=uM(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Dj in t)&&!(XC in t)},n2e=t=>{if(!n0(t)||t0(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},i2e=Ca("Date"),r2e=Ca("File"),o2e=Ca("Blob"),s2e=Ca("FileList"),a2e=t=>n0(t)&&xo(t.pipe),l2e=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||xo(t.append)&&((e=JC(t))==="formdata"||e==="object"&&xo(t.toString)&&t.toString()==="[object FormData]"))},u2e=Ca("URLSearchParams"),[c2e,d2e,f2e,h2e]=["ReadableStream","Request","Response","Headers"].map(Ca),m2e=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function i0(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,r;if(typeof t!="object"&&(t=[t]),mg(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{if(t0(t))return;const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(i=0;i<s;i++)a=o[i],e.call(null,t[a],a,t)}}function Vj(t,e){if(t0(t))return null;e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Gd=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Fj=t=>!Hm(t)&&t!==Gd;function oA(){const{caseless:t,skipUndefined:e}=Fj(this)&&this||{},n={},i=(r,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=t&&Vj(n,o)||o;Ww(n[s])&&Ww(r)?n[s]=oA(n[s],r):Ww(r)?n[s]=oA({},r):mg(r)?n[s]=r.slice():(!e||!Hm(r))&&(n[s]=r)};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&i0(arguments[r],i);return n}const g2e=(t,e,n,{allOwnKeys:i}={})=>(i0(e,(r,o)=>{n&&xo(r)?Object.defineProperty(t,o,{value:Lj(r,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,o,{value:r,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:i}),t),p2e=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),v2e=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},b2e=(t,e,n,i)=>{let r,o,s;const a={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),o=r.length;o-- >0;)s=r[o],(!i||i(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&uM(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},y2e=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},w2e=t=>{if(!t)return null;if(mg(t))return t;let e=t.length;if(!Bj(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},_2e=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&uM(Uint8Array)),C2e=(t,e)=>{const i=(t&&t[XC]).call(t);let r;for(;(r=i.next())&&!r.done;){const o=r.value;e.call(t,o[0],o[1])}},S2e=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},k2e=Ca("HTMLFormElement"),T2e=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),EB=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),E2e=Ca("RegExp"),$j=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};i0(n,(r,o)=>{let s;(s=e(r,o,t))!==!1&&(i[o]=s||r)}),Object.defineProperties(t,i)},x2e=t=>{$j(t,(e,n)=>{if(xo(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(xo(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},A2e=(t,e)=>{const n={},i=r=>{r.forEach(o=>{n[o]=!0})};return mg(t)?i(t):i(String(t).split(e)),n},P2e=()=>{},I2e=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function R2e(t){return!!(t&&xo(t.append)&&t[Dj]==="FormData"&&t[XC])}const M2e=t=>{const e=new Array(10),n=(i,r)=>{if(n0(i)){if(e.indexOf(i)>=0)return;if(t0(i))return i;if(!("toJSON"in i)){e[r]=i;const o=mg(i)?[]:{};return i0(i,(s,a)=>{const l=n(s,r+1);!Hm(l)&&(o[a]=l)}),e[r]=void 0,o}}return i};return n(t,0)},O2e=Ca("AsyncFunction"),L2e=t=>t&&(n0(t)||xo(t))&&xo(t.then)&&xo(t.catch),zj=((t,e)=>t?setImmediate:e?((n,i)=>(Gd.addEventListener("message",({source:r,data:o})=>{r===Gd&&o===n&&i.length&&i.shift()()},!1),r=>{i.push(r),Gd.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",xo(Gd.postMessage)),D2e=typeof queueMicrotask<"u"?queueMicrotask.bind(Gd):typeof process<"u"&&process.nextTick||zj,N2e=t=>t!=null&&xo(t[XC]),Ae={isArray:mg,isArrayBuffer:Nj,isBuffer:t0,isFormData:l2e,isArrayBufferView:Qxe,isString:e2e,isNumber:Bj,isBoolean:t2e,isObject:n0,isPlainObject:Ww,isEmptyObject:n2e,isReadableStream:c2e,isRequest:d2e,isResponse:f2e,isHeaders:h2e,isUndefined:Hm,isDate:i2e,isFile:r2e,isBlob:o2e,isRegExp:E2e,isFunction:xo,isStream:a2e,isURLSearchParams:u2e,isTypedArray:_2e,isFileList:s2e,forEach:i0,merge:oA,extend:g2e,trim:m2e,stripBOM:p2e,inherits:v2e,toFlatObject:b2e,kindOf:JC,kindOfTest:Ca,endsWith:y2e,toArray:w2e,forEachEntry:C2e,matchAll:S2e,isHTMLForm:k2e,hasOwnProperty:EB,hasOwnProp:EB,reduceDescriptors:$j,freezeMethods:x2e,toObjectSet:A2e,toCamelCase:T2e,noop:P2e,toFiniteNumber:I2e,findKey:Vj,global:Gd,isContextDefined:Fj,isSpecCompliantForm:R2e,toJSONObject:M2e,isAsyncFn:O2e,isThenable:L2e,setImmediate:zj,asap:D2e,isIterable:N2e};let Ft=class Hj extends Error{static from(e,n,i,r,o,s){const a=new Hj(e.message,n||e.code,i,r,o);return a.cause=e,a.name=e.name,s&&Object.assign(a,s),a}constructor(e,n,i,r,o){super(e),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),i&&(this.config=i),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ae.toJSONObject(this.config),code:this.code,status:this.status}}};Ft.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Ft.ERR_BAD_OPTION="ERR_BAD_OPTION";Ft.ECONNABORTED="ECONNABORTED";Ft.ETIMEDOUT="ETIMEDOUT";Ft.ERR_NETWORK="ERR_NETWORK";Ft.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Ft.ERR_DEPRECATED="ERR_DEPRECATED";Ft.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Ft.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Ft.ERR_CANCELED="ERR_CANCELED";Ft.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Ft.ERR_INVALID_URL="ERR_INVALID_URL";const B2e=null;function sA(t){return Ae.isPlainObject(t)||Ae.isArray(t)}function Uj(t){return Ae.endsWith(t,"[]")?t.slice(0,-2):t}function xB(t,e,n){return t?t.concat(e).map(function(r,o){return r=Uj(r),!n&&o?"["+r+"]":r}).join(n?".":""):e}function V2e(t){return Ae.isArray(t)&&!t.some(sA)}const F2e=Ae.toFlatObject(Ae,{},null,function(e){return/^is[A-Z]/.test(e)});function QC(t,e,n){if(!Ae.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Ae.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!Ae.isUndefined(v[g])});const i=n.metaTokens,r=n.visitor||c,o=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Ae.isSpecCompliantForm(e);if(!Ae.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(Ae.isDate(m))return m.toISOString();if(Ae.isBoolean(m))return m.toString();if(!l&&Ae.isBlob(m))throw new Ft("Blob is not supported. Use a Buffer instead.");return Ae.isArrayBuffer(m)||Ae.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,g,v){let p=m;if(m&&!v&&typeof m=="object"){if(Ae.endsWith(g,"{}"))g=i?g:g.slice(0,-2),m=JSON.stringify(m);else if(Ae.isArray(m)&&V2e(m)||(Ae.isFileList(m)||Ae.endsWith(g,"[]"))&&(p=Ae.toArray(m)))return g=Uj(g),p.forEach(function(y,_){!(Ae.isUndefined(y)||y===null)&&e.append(s===!0?xB([g],_,o):s===null?g:g+"[]",u(y))}),!1}return sA(m)?!0:(e.append(xB(v,g,o),u(m)),!1)}const d=[],f=Object.assign(F2e,{defaultVisitor:c,convertValue:u,isVisitable:sA});function h(m,g){if(!Ae.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),Ae.forEach(m,function(p,b){(!(Ae.isUndefined(p)||p===null)&&r.call(e,p,Ae.isString(b)?b.trim():b,g,f))===!0&&h(p,g?g.concat(b):[b])}),d.pop()}}if(!Ae.isObject(t))throw new TypeError("data must be an object");return h(t),e}function AB(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function cM(t,e){this._pairs=[],t&&QC(t,this,e)}const Wj=cM.prototype;Wj.append=function(e,n){this._pairs.push([e,n])};Wj.toString=function(e){const n=e?function(i){return e.call(this,i,AB)}:AB;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function $2e(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function qj(t,e,n){if(!e)return t;const i=n&&n.encode||$2e,r=Ae.isFunction(n)?{serialize:n}:n,o=r&&r.serialize;let s;if(o?s=o(e,r):s=Ae.isURLSearchParams(e)?e.toString():new cM(e,r).toString(i),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class PB{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Ae.forEach(this.handlers,function(i){i!==null&&e(i)})}}const dM={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},z2e=typeof URLSearchParams<"u"?URLSearchParams:cM,H2e=typeof FormData<"u"?FormData:null,U2e=typeof Blob<"u"?Blob:null,W2e={isBrowser:!0,classes:{URLSearchParams:z2e,FormData:H2e,Blob:U2e},protocols:["http","https","file","blob","url","data"]},fM=typeof window<"u"&&typeof document<"u",aA=typeof navigator=="object"&&navigator||void 0,q2e=fM&&(!aA||["ReactNative","NativeScript","NS"].indexOf(aA.product)<0),j2e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",K2e=fM&&window.location.href||"http://localhost",G2e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fM,hasStandardBrowserEnv:q2e,hasStandardBrowserWebWorkerEnv:j2e,navigator:aA,origin:K2e},Symbol.toStringTag,{value:"Module"})),Vr={...G2e,...W2e};function Y2e(t,e){return QC(t,new Vr.classes.URLSearchParams,{visitor:function(n,i,r,o){return Vr.isNode&&Ae.isBuffer(n)?(this.append(i,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...e})}function X2e(t){return Ae.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function J2e(t){const e={},n=Object.keys(t);let i;const r=n.length;let o;for(i=0;i<r;i++)o=n[i],e[o]=t[o];return e}function jj(t){function e(n,i,r,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),l=o>=n.length;return s=!s&&Ae.isArray(r)?r.length:s,l?(Ae.hasOwnProp(r,s)?r[s]=[r[s],i]:r[s]=i,!a):((!r[s]||!Ae.isObject(r[s]))&&(r[s]=[]),e(n,i,r[s],o)&&Ae.isArray(r[s])&&(r[s]=J2e(r[s])),!a)}if(Ae.isFormData(t)&&Ae.isFunction(t.entries)){const n={};return Ae.forEachEntry(t,(i,r)=>{e(X2e(i),r,n,0)}),n}return null}function Z2e(t,e,n){if(Ae.isString(t))try{return(e||JSON.parse)(t),Ae.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const r0={transitional:dM,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,o=Ae.isObject(e);if(o&&Ae.isHTMLForm(e)&&(e=new FormData(e)),Ae.isFormData(e))return r?JSON.stringify(jj(e)):e;if(Ae.isArrayBuffer(e)||Ae.isBuffer(e)||Ae.isStream(e)||Ae.isFile(e)||Ae.isBlob(e)||Ae.isReadableStream(e))return e;if(Ae.isArrayBufferView(e))return e.buffer;if(Ae.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Y2e(e,this.formSerializer).toString();if((a=Ae.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return QC(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||r?(n.setContentType("application/json",!1),Z2e(e)):e}],transformResponse:[function(e){const n=this.transitional||r0.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(Ae.isResponse(e)||Ae.isReadableStream(e))return e;if(e&&Ae.isString(e)&&(i&&!this.responseType||r)){const s=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?Ft.from(a,Ft.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Vr.classes.FormData,Blob:Vr.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ae.forEach(["delete","get","head","post","put","patch"],t=>{r0.headers[t]={}});const Q2e=Ae.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),eAe=t=>{const e={};let n,i,r;return t&&t.split(`
`).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),i=s.substring(r+1).trim(),!(!n||e[n]&&Q2e[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},IB=Symbol("internals");function Bg(t){return t&&String(t).trim().toLowerCase()}function qw(t){return t===!1||t==null?t:Ae.isArray(t)?t.map(qw):String(t)}function tAe(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const nAe=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function vT(t,e,n,i,r){if(Ae.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!Ae.isString(e)){if(Ae.isString(i))return e.indexOf(i)!==-1;if(Ae.isRegExp(i))return i.test(e)}}function iAe(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function rAe(t,e){const n=Ae.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,o,s){return this[i].call(this,e,r,o,s)},configurable:!0})})}let Ao=class{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function o(a,l,u){const c=Bg(l);if(!c)throw new Error("header name must be a non-empty string");const d=Ae.findKey(r,c);(!d||r[d]===void 0||u===!0||u===void 0&&r[d]!==!1)&&(r[d||l]=qw(a))}const s=(a,l)=>Ae.forEach(a,(u,c)=>o(u,c,l));if(Ae.isPlainObject(e)||e instanceof this.constructor)s(e,n);else if(Ae.isString(e)&&(e=e.trim())&&!nAe(e))s(eAe(e),n);else if(Ae.isObject(e)&&Ae.isIterable(e)){let a={},l,u;for(const c of e){if(!Ae.isArray(c))throw TypeError("Object iterator must return a key-value pair");a[u=c[0]]=(l=a[u])?Ae.isArray(l)?[...l,c[1]]:[l,c[1]]:c[1]}s(a,n)}else e!=null&&o(n,e,i);return this}get(e,n){if(e=Bg(e),e){const i=Ae.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return tAe(r);if(Ae.isFunction(n))return n.call(this,r,i);if(Ae.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Bg(e),e){const i=Ae.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||vT(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function o(s){if(s=Bg(s),s){const a=Ae.findKey(i,s);a&&(!n||vT(i,i[a],a,n))&&(delete i[a],r=!0)}}return Ae.isArray(e)?e.forEach(o):o(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const o=n[i];(!e||vT(this,this[o],o,e,!0))&&(delete this[o],r=!0)}return r}normalize(e){const n=this,i={};return Ae.forEach(this,(r,o)=>{const s=Ae.findKey(i,o);if(s){n[s]=qw(r),delete n[o];return}const a=e?iAe(o):String(o).trim();a!==o&&delete n[o],n[a]=qw(r),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Ae.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&Ae.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[IB]=this[IB]={accessors:{}}).accessors,r=this.prototype;function o(s){const a=Bg(s);i[a]||(rAe(r,s),i[a]=!0)}return Ae.isArray(e)?e.forEach(o):o(e),this}};Ao.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ae.reduceDescriptors(Ao.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});Ae.freezeMethods(Ao);function bT(t,e){const n=this||r0,i=e||n,r=Ao.from(i.headers);let o=i.data;return Ae.forEach(t,function(a){o=a.call(n,o,r.normalize(),e?e.status:void 0)}),r.normalize(),o}function Kj(t){return!!(t&&t.__CANCEL__)}let o0=class extends Ft{constructor(e,n,i){super(e??"canceled",Ft.ERR_CANCELED,n,i),this.name="CanceledError",this.__CANCEL__=!0}};function Gj(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Ft("Request failed with status code "+n.status,[Ft.ERR_BAD_REQUEST,Ft.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function oAe(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function sAe(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,o=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[o];s||(s=u),n[r]=l,i[r]=u;let d=o,f=0;for(;d!==r;)f+=n[d++],d=d%t;if(r=(r+1)%t,r===o&&(o=(o+1)%t),u-s<e)return;const h=c&&u-c;return h?Math.round(f*1e3/h):void 0}}function aAe(t,e){let n=0,i=1e3/e,r,o;const s=(u,c=Date.now())=>{n=c,r=null,o&&(clearTimeout(o),o=null),t(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=i?s(u,c):(r=u,o||(o=setTimeout(()=>{o=null,s(r)},i-d)))},()=>r&&s(r)]}const Q_=(t,e,n=3)=>{let i=0;const r=sAe(50,250);return aAe(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,l=s-i,u=r(l),c=s<=a;i=s;const d={loaded:s,total:a,progress:a?s/a:void 0,bytes:l,rate:u||void 0,estimated:u&&a&&c?(a-s)/u:void 0,event:o,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},RB=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},MB=t=>(...e)=>Ae.asap(()=>t(...e)),lAe=Vr.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Vr.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Vr.origin),Vr.navigator&&/(msie|trident)/i.test(Vr.navigator.userAgent)):()=>!0,uAe=Vr.hasStandardBrowserEnv?{write(t,e,n,i,r,o,s){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];Ae.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Ae.isString(i)&&a.push(`path=${i}`),Ae.isString(r)&&a.push(`domain=${r}`),o===!0&&a.push("secure"),Ae.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function cAe(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function dAe(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Yj(t,e,n){let i=!cAe(e);return t&&(i||n==!1)?dAe(t,e):e}const OB=t=>t instanceof Ao?{...t}:t;function Cf(t,e){e=e||{};const n={};function i(u,c,d,f){return Ae.isPlainObject(u)&&Ae.isPlainObject(c)?Ae.merge.call({caseless:f},u,c):Ae.isPlainObject(c)?Ae.merge({},c):Ae.isArray(c)?c.slice():c}function r(u,c,d,f){if(Ae.isUndefined(c)){if(!Ae.isUndefined(u))return i(void 0,u,d,f)}else return i(u,c,d,f)}function o(u,c){if(!Ae.isUndefined(c))return i(void 0,c)}function s(u,c){if(Ae.isUndefined(c)){if(!Ae.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function a(u,c,d){if(d in e)return i(u,c);if(d in t)return i(void 0,u)}const l={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken: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:a,headers:(u,c,d)=>r(OB(u),OB(c),d,!0)};return Ae.forEach(Object.keys({...t,...e}),function(c){if(c==="__proto__"||c==="constructor"||c==="prototype")return;const d=Ae.hasOwnProp(l,c)?l[c]:r,f=d(t[c],e[c],c);Ae.isUndefined(f)&&d!==a||(n[c]=f)}),n}const Xj=t=>{const e=Cf({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:o,headers:s,auth:a}=e;if(e.headers=s=Ao.from(s),e.url=qj(Yj(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Ae.isFormData(n)){if(Vr.hasStandardBrowserEnv||Vr.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Ae.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([c,d])=>{u.includes(c.toLowerCase())&&s.set(c,d)})}}if(Vr.hasStandardBrowserEnv&&(i&&Ae.isFunction(i)&&(i=i(e)),i||i!==!1&&lAe(e.url))){const l=r&&o&&uAe.read(o);l&&s.set(r,l)}return e},fAe=typeof XMLHttpRequest<"u",hAe=fAe&&function(t){return new Promise(function(n,i){const r=Xj(t);let o=r.data;const s=Ao.from(r.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:u}=r,c,d,f,h,m;function g(){h&&h(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function p(){if(!v)return;const y=Ao.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:y,config:t,request:v};Gj(function(k){n(k),g()},function(k){i(k),g()},C),v=null}"onloadend"in v?v.onloadend=p:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(p)},v.onabort=function(){v&&(i(new Ft("Request aborted",Ft.ECONNABORTED,t,v)),v=null)},v.onerror=function(_){const C=_&&_.message?_.message:"Network Error",S=new Ft(C,Ft.ERR_NETWORK,t,v);S.event=_||null,i(S),v=null},v.ontimeout=function(){let _=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||dM;r.timeoutErrorMessage&&(_=r.timeoutErrorMessage),i(new Ft(_,C.clarifyTimeoutError?Ft.ETIMEDOUT:Ft.ECONNABORTED,t,v)),v=null},o===void 0&&s.setContentType(null),"setRequestHeader"in v&&Ae.forEach(s.toJSON(),function(_,C){v.setRequestHeader(C,_)}),Ae.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),a&&a!=="json"&&(v.responseType=r.responseType),u&&([f,m]=Q_(u,!0),v.addEventListener("progress",f)),l&&v.upload&&([d,h]=Q_(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=y=>{v&&(i(!y||y.type?new o0(null,t,v):y),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const b=oAe(r.url);if(b&&Vr.protocols.indexOf(b)===-1){i(new Ft("Unsupported protocol "+b+":",Ft.ERR_BAD_REQUEST,t));return}v.send(o||null)})},mAe=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const o=function(u){if(!r){r=!0,a();const c=u instanceof Error?u:this.reason;i.abort(c instanceof Ft?c:new o0(c instanceof Error?c.message:c))}};let s=e&&setTimeout(()=>{s=null,o(new Ft(`timeout of ${e}ms exceeded`,Ft.ETIMEDOUT))},e);const a=()=>{t&&(s&&clearTimeout(s),s=null,t.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),t=null)};t.forEach(u=>u.addEventListener("abort",o));const{signal:l}=i;return l.unsubscribe=()=>Ae.asap(a),l}},gAe=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},pAe=async function*(t,e){for await(const n of vAe(t))yield*gAe(n,e)},vAe=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},LB=(t,e,n,i)=>{const r=pAe(t,e);let o=0,s,a=l=>{s||(s=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await r.next();if(u){a(),l.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw a(u),u}},cancel(l){return a(l),r.return()}},{highWaterMark:2})},DB=64*1024,{isFunction:Q0}=Ae,bAe=(({Request:t,Response:e})=>({Request:t,Response:e}))(Ae.global),{ReadableStream:NB,TextEncoder:BB}=Ae.global,VB=(t,...e)=>{try{return!!t(...e)}catch{return!1}},yAe=t=>{t=Ae.merge.call({skipUndefined:!0},bAe,t);const{fetch:e,Request:n,Response:i}=t,r=e?Q0(e):typeof fetch=="function",o=Q0(n),s=Q0(i);if(!r)return!1;const a=r&&Q0(NB),l=r&&(typeof BB=="function"?(m=>g=>m.encode(g))(new BB):async m=>new Uint8Array(await new n(m).arrayBuffer())),u=o&&a&&VB(()=>{let m=!1;const g=new n(Vr.origin,{body:new NB,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!g}),c=s&&a&&VB(()=>Ae.isReadableStream(new i("").body)),d={stream:c&&(m=>m.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(g,v)=>{let p=g&&g[m];if(p)return p.call(g);throw new Ft(`Response type '${m}' is not supported`,Ft.ERR_NOT_SUPPORT,v)})});const f=async m=>{if(m==null)return 0;if(Ae.isBlob(m))return m.size;if(Ae.isSpecCompliantForm(m))return(await new n(Vr.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(Ae.isArrayBufferView(m)||Ae.isArrayBuffer(m))return m.byteLength;if(Ae.isURLSearchParams(m)&&(m=m+""),Ae.isString(m))return(await l(m)).byteLength},h=async(m,g)=>{const v=Ae.toFiniteNumber(m.getContentLength());return v??f(g)};return async m=>{let{url:g,method:v,data:p,signal:b,cancelToken:y,timeout:_,onDownloadProgress:C,onUploadProgress:S,responseType:k,headers:T,withCredentials:E="same-origin",fetchOptions:x}=Xj(m),P=e||fetch;k=k?(k+"").toLowerCase():"text";let A=mAe([b,y&&y.toAbortSignal()],_),I=null;const D=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let q;try{if(S&&u&&v!=="get"&&v!=="head"&&(q=await h(T,p))!==0){let j=new n(g,{method:"POST",body:p,duplex:"half"}),U;if(Ae.isFormData(p)&&(U=j.headers.get("content-type"))&&T.setContentType(U),j.body){const[W,J]=RB(q,Q_(MB(S)));p=LB(j.body,DB,W,J)}}Ae.isString(E)||(E=E?"include":"omit");const z=o&&"credentials"in n.prototype,R={...x,signal:A,method:v.toUpperCase(),headers:T.normalize().toJSON(),body:p,duplex:"half",credentials:z?E:void 0};I=o&&new n(g,R);let O=await(o?P(I,x):P(g,R));const N=c&&(k==="stream"||k==="response");if(c&&(C||N&&D)){const j={};["status","statusText","headers"].forEach(ne=>{j[ne]=O[ne]});const U=Ae.toFiniteNumber(O.headers.get("content-length")),[W,J]=C&&RB(U,Q_(MB(C),!0))||[];O=new i(LB(O.body,DB,W,()=>{J&&J(),D&&D()}),j)}k=k||"text";let F=await d[Ae.findKey(d,k)||"text"](O,m);return!N&&D&&D(),await new Promise((j,U)=>{Gj(j,U,{data:F,headers:Ao.from(O.headers),status:O.status,statusText:O.statusText,config:m,request:I})})}catch(z){throw D&&D(),z&&z.name==="TypeError"&&/Load failed|fetch/i.test(z.message)?Object.assign(new Ft("Network Error",Ft.ERR_NETWORK,m,I,z&&z.response),{cause:z.cause||z}):Ft.from(z,z&&z.code,m,I,z&&z.response)}}},wAe=new Map,Jj=t=>{let e=t&&t.env||{};const{fetch:n,Request:i,Response:r}=e,o=[i,r,n];let s=o.length,a=s,l,u,c=wAe;for(;a--;)l=o[a],u=c.get(l),u===void 0&&c.set(l,u=a?new Map:yAe(e)),c=u;return u};Jj();const hM={http:B2e,xhr:hAe,fetch:{get:Jj}};Ae.forEach(hM,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const FB=t=>`- ${t}`,_Ae=t=>Ae.isFunction(t)||t===null||t===!1;function CAe(t,e){t=Ae.isArray(t)?t:[t];const{length:n}=t;let i,r;const o={};for(let s=0;s<n;s++){i=t[s];let a;if(r=i,!_Ae(i)&&(r=hM[(a=String(i)).toLowerCase()],r===void 0))throw new Ft(`Unknown adapter '${a}'`);if(r&&(Ae.isFunction(r)||(r=r.get(e))))break;o[a||"#"+s]=r}if(!r){const s=Object.entries(o).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
`+s.map(FB).join(`
`):" "+FB(s[0]):"as no adapter specified";throw new Ft("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r}const Zj={getAdapter:CAe,adapters:hM};function yT(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new o0(null,t)}function $B(t){return yT(t),t.headers=Ao.from(t.headers),t.data=bT.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Zj.getAdapter(t.adapter||r0.adapter,t)(t).then(function(i){return yT(t),i.data=bT.call(t,t.transformResponse,i),i.headers=Ao.from(i.headers),i},function(i){return Kj(i)||(yT(t),i&&i.response&&(i.response.data=bT.call(t,t.transformResponse,i.response),i.response.headers=Ao.from(i.response.headers))),Promise.reject(i)})}const Qj="1.13.5",eS={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{eS[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const zB={};eS.transitional=function(e,n,i){function r(o,s){return"[Axios v"+Qj+"] Transitional option '"+o+"'"+s+(i?". "+i:"")}return(o,s,a)=>{if(e===!1)throw new Ft(r(s," has been removed"+(n?" in "+n:"")),Ft.ERR_DEPRECATED);return n&&!zB[s]&&(zB[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};eS.spelling=function(e){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function SAe(t,e,n){if(typeof t!="object")throw new Ft("options must be an object",Ft.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const o=i[r],s=e[o];if(s){const a=t[o],l=a===void 0||s(a,o,t);if(l!==!0)throw new Ft("option "+o+" must be "+l,Ft.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ft("Unknown option "+o,Ft.ERR_BAD_OPTION)}}const jw={assertOptions:SAe,validators:eS},ps=jw.validators;let sf=class{constructor(e){this.defaults=e||{},this.interceptors={request:new PB,response:new PB}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?o&&!String(i.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(i.stack+=`
`+o):i.stack=o}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Cf(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:o}=n;i!==void 0&&jw.assertOptions(i,{silentJSONParsing:ps.transitional(ps.boolean),forcedJSONParsing:ps.transitional(ps.boolean),clarifyTimeoutError:ps.transitional(ps.boolean),legacyInterceptorReqResOrdering:ps.transitional(ps.boolean)},!1),r!=null&&(Ae.isFunction(r)?n.paramsSerializer={serialize:r}:jw.assertOptions(r,{encode:ps.function,serialize:ps.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jw.assertOptions(n,{baseUrl:ps.spelling("baseURL"),withXsrfToken:ps.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&Ae.merge(o.common,o[n.method]);o&&Ae.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=Ao.concat(s,o);const a=[];let l=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;l=l&&g.synchronous;const v=n.transitional||dM;v&&v.legacyInterceptorReqResOrdering?a.unshift(g.fulfilled,g.rejected):a.push(g.fulfilled,g.rejected)});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!l){const m=[$B.bind(this),void 0];for(m.unshift(...a),m.push(...u),f=m.length,c=Promise.resolve(n);d<f;)c=c.then(m[d++],m[d++]);return c}f=a.length;let h=n;for(;d<f;){const m=a[d++],g=a[d++];try{h=m(h)}catch(v){g.call(this,v);break}}try{c=$B.call(this,h)}catch(m){return Promise.reject(m)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=Cf(this.defaults,e);const n=Yj(e.baseURL,e.url,e.allowAbsoluteUrls);return qj(n,e.params,e.paramsSerializer)}};Ae.forEach(["delete","get","head","options"],function(e){sf.prototype[e]=function(n,i){return this.request(Cf(i||{},{method:e,url:n,data:(i||{}).data}))}});Ae.forEach(["post","put","patch"],function(e){function n(i){return function(o,s,a){return this.request(Cf(a||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}sf.prototype[e]=n(),sf.prototype[e+"Form"]=n(!0)});let kAe=class eK{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const i=this;this.promise.then(r=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](r);i._listeners=null}),this.promise.then=r=>{let o;const s=new Promise(a=>{i.subscribe(a),o=a}).then(r);return s.cancel=function(){i.unsubscribe(o)},s},e(function(o,s,a){i.reason||(i.reason=new o0(o,s,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new eK(function(r){e=r}),cancel:e}}};function TAe(t){return function(n){return t.apply(null,n)}}function EAe(t){return Ae.isObject(t)&&t.isAxiosError===!0}const lA={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(lA).forEach(([t,e])=>{lA[e]=t});function tK(t){const e=new sf(t),n=Lj(sf.prototype.request,e);return Ae.extend(n,sf.prototype,e,{allOwnKeys:!0}),Ae.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return tK(Cf(t,r))},n}const Ui=tK(r0);Ui.Axios=sf;Ui.CanceledError=o0;Ui.CancelToken=kAe;Ui.isCancel=Kj;Ui.VERSION=Qj;Ui.toFormData=QC;Ui.AxiosError=Ft;Ui.Cancel=Ui.CanceledError;Ui.all=function(e){return Promise.all(e)};Ui.spread=TAe;Ui.isAxiosError=EAe;Ui.mergeConfig=Cf;Ui.AxiosHeaders=Ao;Ui.formToJSON=t=>jj(Ae.isHTMLForm(t)?new FormData(t):t);Ui.getAdapter=Zj.getAdapter;Ui.HttpStatusCode=lA;Ui.default=Ui;const{Axios:Ust,AxiosError:Wst,CanceledError:qst,isCancel:jst,CancelToken:Kst,VERSION:Gst,all:Yst,Cancel:Xst,isAxiosError:Jst,spread:Zst,toFormData:Qst,AxiosHeaders:eat,HttpStatusCode:tat,formToJSON:nat,getAdapter:iat,mergeConfig:rat}=Ui;var nK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(nK||{}),iK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(iK||{}),mM=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(mM||{}),rK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(rK||{}),oK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(oK||{}),sK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(sK||{}),aK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(aK||{}),gM=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(gM||{}),lK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(lK||{}),pM=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(pM||{}),uK=(t=>(t.Asc="asc",t.Desc="desc",t))(uK||{}),cK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(cK||{}),dK=(t=>(t.Asc="asc",t.Desc="desc",t))(dK||{}),fK=(t=>(t.Eq="eq",t.Neq="neq",t.Gt="gt",t.Egt="egt",t.Lt="lt",t.Elt="elt",t.Between="between",t.NotBetween="not between",t.In="in",t.NotIn="not in",t.Like="like",t.Slike="slike",t.Elike="elike",t))(fK||{}),hK=(t=>(t.Asc="asc",t.Desc="desc",t))(hK||{});class xAe{instance;securityData=null;securityWorker;secure;format;constructor({securityWorker:e,secure:n,format:i,...r}={}){this.instance=Ui.create({...r,baseURL:r.baseURL||""}),this.secure=n,this.format=i,this.securityWorker=e}setSecurityData=e=>{this.securityData=e};mergeRequestParams(e,n){const i=e.method||n&&n.method;return{...this.instance.defaults,...e,...n||{},headers:{...i&&this.instance.defaults.headers[i.toLowerCase()]||{},...e.headers||{},...n&&n.headers||{}}}}stringifyFormItem(e){return typeof e=="object"&&e!==null?JSON.stringify(e):`${e}`}createFormData(e){return e instanceof FormData?e:Object.keys(e||{}).reduce((n,i)=>{const r=e[i],o=r instanceof Array?r:[r];for(const s of o){const a=s instanceof Blob||s instanceof File;n.append(i,a?s:this.stringifyFormItem(s))}return n},new FormData)}request=async({secure:e,path:n,type:i,query:r,format:o,body:s,...a})=>{const l=(typeof e=="boolean"?e:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},u=this.mergeRequestParams(a,l),c=o||this.format||void 0;return i==="multipart/form-data"&&s&&s!==null&&typeof s=="object"&&(s=this.createFormData(s)),i==="text/plain"&&s&&s!==null&&typeof s!="string"&&(s=JSON.stringify(s)),this.instance.request({...u,headers:{...u.headers||{},...i?{"Content-Type":i}:{}},params:r,responseType:c,data:s,url:n})}}class AAe{http;constructor(e){this.http=e}admin={withdrawControllerReview:(e,n={})=>this.http.request({path:"/admin/withdraw/review",method:"POST",body:e,type:"application/json",format:"json",...n}),adminUserControllerList:(e,n={})=>this.http.request({path:"/admin/user/list",method:"GET",query:e,format:"json",...n}),adminUserControllerToggleFreeze:(e,n={})=>this.http.request({path:"/admin/user/toggleFreeze",method:"POST",body:e,type:"application/json",format:"json",...n}),uploadControllerImage:(e,n={})=>this.http.request({path:"/admin/upload/image",method:"POST",body:e,type:"multipart/form-data",format:"json",...n}),uploadControllerVideo:(e,n={})=>this.http.request({path:"/admin/upload/video",method:"POST",body:e,type:"multipart/form-data",format:"json",...n}),teamControllerMembers:(e,n={})=>this.http.request({path:"/admin/team/members",method:"GET",query:e,format:"json",...n}),teamControllerAncestors:(e,n={})=>this.http.request({path:"/admin/team/ancestors",method:"GET",query:e,format:"json",...n}),statsControllerStats:(e={})=>this.http.request({path:"/admin/session/stats",method:"GET",format:"json",...e}),sessionControllerLogin:(e,n={})=>this.http.request({path:"/admin/session/login",method:"POST",body:e,type:"application/json",format:"json",...n}),adminGiftControllerGiftProduct:(e,n={})=>this.http.request({path:"/admin/gift/product",method:"POST",body:e,type:"application/json",format:"json",...n}),configControllerGetSystemConfig:(e={})=>this.http.request({path:"/admin/config/system",method:"GET",format:"json",...e}),configControllerUpdateSystemConfig:(e,n={})=>this.http.request({path:"/admin/config/system",method:"PUT",body:e,type:"application/json",format:"json",...n}),generatedWalletControllerList:(e,n={})=>this.http.request({path:"/admin/generated/wallet/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedWalletControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/wallet/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedWalletControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/wallet",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedWalletControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/wallet/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedWalletControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/wallet/${e}`,method:"DELETE",format:"json",...n}),generatedTeamRelationControllerList:(e,n={})=>this.http.request({path:"/admin/generated/team_relation/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedTeamRelationControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/team_relation/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedTeamRelationControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/team_relation",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedTeamRelationControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/team_relation/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedTeamRelationControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/team_relation/${e}`,method:"DELETE",format:"json",...n}),generatedUserVerifyControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_verify/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserVerifyControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_verify/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserVerifyControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_verify",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserVerifyControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_verify/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserVerifyControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_verify/${e}`,method:"DELETE",format:"json",...n}),generatedRedPacketRecordControllerList:(e,n={})=>this.http.request({path:"/admin/generated/red_packet_record/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedRedPacketRecordControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/red_packet_record/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedRedPacketRecordControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/red_packet_record",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedRedPacketRecordControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/red_packet_record/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedRedPacketRecordControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/red_packet_record/${e}`,method:"DELETE",format:"json",...n}),generatedRedPacketControllerList:(e,n={})=>this.http.request({path:"/admin/generated/red_packet/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedRedPacketControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/red_packet/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedRedPacketControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/red_packet",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedRedPacketControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/red_packet/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedRedPacketControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/red_packet/${e}`,method:"DELETE",format:"json",...n}),generatedUserControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user/${e}`,method:"DELETE",format:"json",...n}),generatedUserBankControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_bank/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserBankControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_bank/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserBankControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_bank",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserBankControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_bank/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserBankControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_bank/${e}`,method:"DELETE",format:"json",...n}),generatedUserAddressControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_address/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserAddressControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_address/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserAddressControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_address",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserAddressControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_address/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserAddressControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_address/${e}`,method:"DELETE",format:"json",...n}),generatedUserMessageControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_message/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserMessageControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_message/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserMessageControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_message",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserMessageControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_message/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserMessageControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_message/${e}`,method:"DELETE",format:"json",...n}),generatedWithdrawControllerList:(e,n={})=>this.http.request({path:"/admin/generated/withdraw/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedWithdrawControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/withdraw/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedWithdrawControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/withdraw",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedWithdrawControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/withdraw/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedWithdrawControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/withdraw/${e}`,method:"DELETE",format:"json",...n}),generatedWalletBillControllerList:(e,n={})=>this.http.request({path:"/admin/generated/wallet_bill/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedWalletBillControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/wallet_bill/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedWalletBillControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/wallet_bill",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedWalletBillControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/wallet_bill/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedWalletBillControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/wallet_bill/${e}`,method:"DELETE",format:"json",...n}),generatedFinancialProductControllerList:(e,n={})=>this.http.request({path:"/admin/generated/financial_product/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedFinancialProductControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/financial_product/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedFinancialProductControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/financial_product",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedFinancialProductControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/financial_product/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedFinancialProductControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/financial_product/${e}`,method:"DELETE",format:"json",...n}),generatedUserFinancialProductControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_financial_product/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserFinancialProductControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_financial_product/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserFinancialProductControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_financial_product",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserFinancialProductControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_financial_product/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserFinancialProductControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_financial_product/${e}`,method:"DELETE",format:"json",...n}),generatedUserSignInTaskRewardControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in_task_reward/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInTaskRewardControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in_task_reward/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserSignInTaskRewardControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in_task_reward",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInTaskRewardControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in_task_reward/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserSignInTaskRewardControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_sign_in_task_reward/${e}`,method:"DELETE",format:"json",...n}),generatedUserSignInTaskControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in_task/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInTaskControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in_task/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserSignInTaskControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in_task",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInTaskControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in_task/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserSignInTaskControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_sign_in_task/${e}`,method:"DELETE",format:"json",...n}),generatedUserSignInCalendarControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in_calendar/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInCalendarControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in_calendar/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserSignInCalendarControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in_calendar",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInCalendarControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in_calendar/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserSignInCalendarControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_sign_in_calendar/${e}`,method:"DELETE",format:"json",...n}),generatedUserLogControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_log/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserLogControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_log/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserLogControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_log",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserLogControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_log/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserLogControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_log/${e}`,method:"DELETE",format:"json",...n}),generatedNewsCategoryControllerList:(e,n={})=>this.http.request({path:"/admin/generated/news_category/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedNewsCategoryControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/news_category/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedNewsCategoryControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/news_category",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedNewsCategoryControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/news_category/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedNewsCategoryControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/news_category/${e}`,method:"DELETE",format:"json",...n}),generatedRechargeControllerList:(e,n={})=>this.http.request({path:"/admin/generated/recharge/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedRechargeControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/recharge/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedRechargeControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/recharge",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedRechargeControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/recharge/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedRechargeControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/recharge/${e}`,method:"DELETE",format:"json",...n}),generatedJobHuntingControllerList:(e,n={})=>this.http.request({path:"/admin/generated/job_hunting/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedJobHuntingControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/job_hunting/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedJobHuntingControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/job_hunting",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedJobHuntingControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/job_hunting/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedJobHuntingControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/job_hunting/${e}`,method:"DELETE",format:"json",...n}),generatedSystemConfigControllerList:(e,n={})=>this.http.request({path:"/admin/generated/system_config/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedSystemConfigControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/system_config/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedSystemConfigControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/system_config",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedSystemConfigControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/system_config/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedSystemConfigControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/system_config/${e}`,method:"DELETE",format:"json",...n}),generatedInviteCodePoolControllerList:(e,n={})=>this.http.request({path:"/admin/generated/invite_code_pool/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedInviteCodePoolControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/invite_code_pool/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedInviteCodePoolControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/invite_code_pool",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedInviteCodePoolControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/invite_code_pool/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedInviteCodePoolControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/invite_code_pool/${e}`,method:"DELETE",format:"json",...n}),generatedNewsControllerList:(e,n={})=>this.http.request({path:"/admin/generated/news/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedNewsControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/news/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedNewsControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/news",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedNewsControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/news/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedNewsControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/news/${e}`,method:"DELETE",format:"json",...n}),generatedDailyMeetingControllerList:(e,n={})=>this.http.request({path:"/admin/generated/daily_meeting/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedDailyMeetingControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/daily_meeting/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedDailyMeetingControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/daily_meeting",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedDailyMeetingControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/daily_meeting/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedDailyMeetingControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/daily_meeting/${e}`,method:"DELETE",format:"json",...n}),generatedDailyMeetingStatsControllerList:(e,n={})=>this.http.request({path:"/admin/generated/daily_meeting_stats/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedDailyMeetingStatsControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/daily_meeting_stats/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedDailyMeetingStatsControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/daily_meeting_stats",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedDailyMeetingStatsControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/daily_meeting_stats/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedDailyMeetingStatsControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/daily_meeting_stats/${e}`,method:"DELETE",format:"json",...n}),generatedAppVersionControllerList:(e,n={})=>this.http.request({path:"/admin/generated/app_version/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedAppVersionControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/app_version/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedAppVersionControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/app_version",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedAppVersionControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/app_version/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedAppVersionControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/app_version/${e}`,method:"DELETE",format:"json",...n}),generatedDocumentControllerList:(e,n={})=>this.http.request({path:"/admin/generated/document/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedDocumentControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/document/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedDocumentControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/document",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedDocumentControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/document/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedDocumentControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/document/${e}`,method:"DELETE",format:"json",...n}),generatedUserSignInControllerList:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedUserSignInControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/user_sign_in",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedUserSignInControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/user_sign_in/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedUserSignInControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/user_sign_in/${e}`,method:"DELETE",format:"json",...n}),generatedAdminControllerList:(e,n={})=>this.http.request({path:"/admin/generated/admin/list",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedAdminControllerDetail:({id:e},n,i={})=>this.http.request({path:`/admin/generated/admin/detail/${e}`,method:"POST",body:n,type:"application/json",format:"json",...i}),generatedAdminControllerCreate:(e,n={})=>this.http.request({path:"/admin/generated/admin",method:"POST",body:e,type:"application/json",format:"json",...n}),generatedAdminControllerUpdate:({id:e},n,i={})=>this.http.request({path:`/admin/generated/admin/${e}`,method:"PUT",body:n,type:"application/json",format:"json",...i}),generatedAdminControllerDelete:({ids:e},n={})=>this.http.request({path:`/admin/generated/admin/${e}`,method:"DELETE",format:"json",...n})}}const wT="__ADMIN_LOGIN_INFO_CACHE_KEY__",s0=Nre("session",()=>{const t=H(bc.get(wT)||""),e=M(()=>!!t.value);return{token:t,isLogin:e,login:r=>{t.value=r,bc.set(wT,r)},loginout:()=>{t.value="",bc.remove(wT)}}}),vM=new xAe({headers:{"Content-Type":"application/json;charset=UTF-8"},validateStatus:t=>!0});vM.instance.interceptors.response.use(t=>{const e=s0(),n=t.data||{};return n.code==401&&(e.loginout(),location.href="/"),n.success||fl.showNotification(n.msg),t});vM.instance.interceptors.request.use(t=>{const e=s0();return t.headers.Authorization="Bearer "+e.token,t});const PAe=new AAe(vM),it=PAe.admin,mK=vn({meta:{title:"登录"}}),IAe=le(()=>{const t=s0(),e=async(c,d)=>{const f=await it.sessionControllerLogin({username:c,password:d});return f.data.success&&t.login(f.data.data?.token),f.data.success},n=XR(),i=H(),r=H({username:"",password:""}),o=H(!1),s=H(!1),a=H({username:[{required:!0,message:"请输入账号",trigger:"blur"}],password:[{required:!0,message:"请输入密码",trigger:"blur"}]}),l="login_remember";Pt(()=>{const c=bc.get(l);c&&(r.value.username=c.username,r.value.password=c.password,o.value=!0)});const u=async()=>{if(!i.value||!await i.value.validate().catch(()=>!1))return!1;s.value=!0;try{const{username:d,password:f}=r.value;o.value?bc.set(l,{username:d,password:f}):bc.remove(l);const h=await e(d,f);return s.value=!1,h?(fl.showNotification("登录成功"),n.push("/"),!0):!1}finally{s.value=!1}};return()=>L("div",{class:bn.login_wrapper},[L("div",{class:bn.particles},[[...Array(9)].map((c,d)=>L("div",{key:d,class:bn.particle},null))]),L("div",{class:bn.container},[L("div",{class:bn.login_cover},[L("div",{class:bn.cube_container},[L("div",{class:bn.cube},[L("div",{class:bn.cube_face+" "+bn.cube_front},[dt("📊")]),L("div",{class:bn.cube_face+" "+bn.cube_back},[dt("🔒")]),L("div",{class:bn.cube_face+" "+bn.cube_right},[dt("⚡")]),L("div",{class:bn.cube_face+" "+bn.cube_left},[dt("🚀")]),L("div",{class:bn.cube_face+" "+bn.cube_top},[dt("💡")]),L("div",{class:bn.cube_face+" "+bn.cube_bottom},[dt("🎯")])])]),L("h1",{class:bn.login_title},[dt("后台管理系统")]),L("p",{class:bn.login_subtitle},[dt("让工作更智能,让管理更简单")]),L("div",{class:bn.waves},[L("div",{class:bn.wave+" "+bn.wave_1},null),L("div",{class:bn.wave+" "+bn.wave_2},null),L("div",{class:bn.wave+" "+bn.wave_3},null)]),L("div",{class:bn.bubbles},[[...Array(6)].map((c,d)=>L("div",{key:d,class:bn.bubble,style:{"--delay":d*.5,"--size":20+d*8}},null))])]),L("div",{class:bn.login_body},[L("div",{class:bn.login_body_title},[L("span",null,[dt("密码登录")])]),L(aq,{ref:i,model:r.value,rules:a.value,"label-width":"0"},{default:()=>[L(Wh,{prop:"username"},{default:()=>[L(cr,{modelValue:r.value.username,"onUpdate:modelValue":c=>r.value.username=c,placeholder:"请输入账号",size:"large",clearable:!0,"prefix-icon":L(He,null,{default:()=>[L(hU,null,null)]})},null)]}),L(Wh,{prop:"password"},{default:()=>[L(cr,{modelValue:r.value.password,"onUpdate:modelValue":c=>r.value.password=c,type:"password",placeholder:"请输入密码","show-password":!0,size:"large",clearable:!0,"prefix-icon":L(He,null,{default:()=>[L(Ade,null,null)]})},null)]}),L(Wh,null,{default:()=>[L("div",{class:bn.remember_wrapper},[L(Ac,{modelValue:o.value,"onUpdate:modelValue":c=>o.value=c},{default:()=>[dt("记住账号密码")]})])]}),L(Wh,null,{default:()=>[L(Hi,{type:"primary",class:bn.login_button,onClick:u,size:"large",loading:s.value},{default:()=>[dt("登录")]})]})]})])])])}),RAe=Object.freeze(Object.defineProperty({__proto__:null,default:IAe,meta:mK},Symbol.toStringTag,{value:"Module"}));var qh=9e15,jc=1e9,uA="0123456789abcdef",e1="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",t1="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",cA={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-qh,maxE:qh,crypto:!1},gK,Zl,zt=!0,tS="[DecimalError] ",Pc=tS+"Invalid argument: ",pK=tS+"Precision limit exceeded",vK=tS+"crypto unavailable",bK="[object Decimal]",Hr=Math.floor,tr=Math.pow,MAe=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,OAe=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,LAe=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,yK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,sa=1e7,Mt=7,DAe=9007199254740991,NAe=e1.length-1,dA=t1.length-1,$e={toStringTag:bK};$e.absoluteValue=$e.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),Tt(t)};$e.ceil=function(){return Tt(new this.constructor(this),this.e+1,2)};$e.clampedTo=$e.clamp=function(t,e){var n,i=this,r=i.constructor;if(t=new r(t),e=new r(e),!t.s||!e.s)return new r(NaN);if(t.gt(e))throw Error(Pc+e);return n=i.cmp(t),n<0?t:i.cmp(e)>0?e:new r(i)};$e.comparedTo=$e.cmp=function(t){var e,n,i,r,o=this,s=o.d,a=(t=new o.constructor(t)).d,l=o.s,u=t.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==t.e)return o.e>t.e^l<0?1:-1;for(i=s.length,r=a.length,e=0,n=i<r?i:r;e<n;++e)if(s[e]!==a[e])return s[e]>a[e]^l<0?1:-1;return i===r?0:i>r^l<0?1:-1};$e.cosine=$e.cos=function(){var t,e,n=this,i=n.constructor;return n.d?n.d[0]?(t=i.precision,e=i.rounding,i.precision=t+Math.max(n.e,n.sd())+Mt,i.rounding=1,n=BAe(i,kK(i,n)),i.precision=t,i.rounding=e,Tt(Zl==2||Zl==3?n.neg():n,t,e,!0)):new i(1):new i(NaN)};$e.cubeRoot=$e.cbrt=function(){var t,e,n,i,r,o,s,a,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(zt=!1,o=c.s*tr(c.s*c,1/3),!o||Math.abs(o)==1/0?(n=yr(c.d),t=c.e,(o=(t-n.length+1)%3)&&(n+=o==1||o==-2?"0":"00"),o=tr(n,1/3),t=Hr((t+1)/3)-(t%3==(t<0?-1:2)),o==1/0?n="5e"+t:(n=o.toExponential(),n=n.slice(0,n.indexOf("e")+1)+t),i=new d(n),i.s=c.s):i=new d(o.toString()),s=(t=d.precision)+3;;)if(a=i,l=a.times(a).times(a),u=l.plus(c),i=Gn(u.plus(c).times(a),u.plus(l),s+2,1),yr(a.d).slice(0,s)===(n=yr(i.d)).slice(0,s))if(n=n.slice(s-3,s+1),n=="9999"||!r&&n=="4999"){if(!r&&(Tt(a,t+1,0),a.times(a).times(a).eq(c))){i=a;break}s+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(Tt(i,t+1,1),e=!i.times(i).times(i).eq(c));break}return zt=!0,Tt(i,t,d.rounding,e)};$e.decimalPlaces=$e.dp=function(){var t,e=this.d,n=NaN;if(e){if(t=e.length-1,n=(t-Hr(this.e/Mt))*Mt,t=e[t],t)for(;t%10==0;t/=10)n--;n<0&&(n=0)}return n};$e.dividedBy=$e.div=function(t){return Gn(this,new this.constructor(t))};$e.dividedToIntegerBy=$e.divToInt=function(t){var e=this,n=e.constructor;return Tt(Gn(e,new n(t),0,1,1),n.precision,n.rounding)};$e.equals=$e.eq=function(t){return this.cmp(t)===0};$e.floor=function(){return Tt(new this.constructor(this),this.e+1,3)};$e.greaterThan=$e.gt=function(t){return this.cmp(t)>0};$e.greaterThanOrEqualTo=$e.gte=function(t){var e=this.cmp(t);return e==1||e===0};$e.hyperbolicCosine=$e.cosh=function(){var t,e,n,i,r,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;n=s.precision,i=s.rounding,s.precision=n+Math.max(o.e,o.sd())+4,s.rounding=1,r=o.d.length,r<32?(t=Math.ceil(r/3),e=(1/iS(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),o=Um(s,1,o.times(e),new s(1),!0);for(var l,u=t,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return Tt(o,s.precision=n,s.rounding=i,!0)};$e.hyperbolicSine=$e.sinh=function(){var t,e,n,i,r=this,o=r.constructor;if(!r.isFinite()||r.isZero())return new o(r);if(e=o.precision,n=o.rounding,o.precision=e+Math.max(r.e,r.sd())+4,o.rounding=1,i=r.d.length,i<3)r=Um(o,2,r,r,!0);else{t=1.4*Math.sqrt(i),t=t>16?16:t|0,r=r.times(1/iS(5,t)),r=Um(o,2,r,r,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);t--;)s=r.times(r),r=r.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=e,o.rounding=n,Tt(r,e,n,!0)};$e.hyperbolicTangent=$e.tanh=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.precision,e=i.rounding,i.precision=t+7,i.rounding=1,Gn(n.sinh(),n.cosh(),i.precision=t,i.rounding=e)):new i(n.s)};$e.inverseCosine=$e.acos=function(){var t=this,e=t.constructor,n=t.abs().cmp(1),i=e.precision,r=e.rounding;return n!==-1?n===0?t.isNeg()?ja(e,i,r):new e(0):new e(NaN):t.isZero()?ja(e,i+4,r).times(.5):(e.precision=i+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=i,e.rounding=r,t.times(2))};$e.inverseHyperbolicCosine=$e.acosh=function(){var t,e,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(t=i.precision,e=i.rounding,i.precision=t+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,zt=!1,n=n.times(n).minus(1).sqrt().plus(n),zt=!0,i.precision=t,i.rounding=e,n.ln()):new i(n)};$e.inverseHyperbolicSine=$e.asinh=function(){var t,e,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(t=i.precision,e=i.rounding,i.precision=t+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,zt=!1,n=n.times(n).plus(1).sqrt().plus(n),zt=!0,i.precision=t,i.rounding=e,n.ln())};$e.inverseHyperbolicTangent=$e.atanh=function(){var t,e,n,i,r=this,o=r.constructor;return r.isFinite()?r.e>=0?new o(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(t=o.precision,e=o.rounding,i=r.sd(),Math.max(i,t)<2*-r.e-1?Tt(new o(r),t,e,!0):(o.precision=n=i-r.e,r=Gn(r.plus(1),new o(1).minus(r),n+t,1),o.precision=t+4,o.rounding=1,r=r.ln(),o.precision=t,o.rounding=e,r.times(.5))):new o(NaN)};$e.inverseSine=$e.asin=function(){var t,e,n,i,r=this,o=r.constructor;return r.isZero()?new o(r):(e=r.abs().cmp(1),n=o.precision,i=o.rounding,e!==-1?e===0?(t=ja(o,n+4,i).times(.5),t.s=r.s,t):new o(NaN):(o.precision=n+6,o.rounding=1,r=r.div(new o(1).minus(r.times(r)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=i,r.times(2)))};$e.inverseTangent=$e.atan=function(){var t,e,n,i,r,o,s,a,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=dA)return s=ja(c,d+4,f).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(d+4<=dA)return s=ja(c,d+4,f).times(.5),s.s=u.s,s}for(c.precision=a=d+10,c.rounding=1,n=Math.min(28,a/Mt+2|0),t=n;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(zt=!1,e=Math.ceil(a/Mt),i=1,l=u.times(u),s=new c(u),r=u;t!==-1;)if(r=r.times(l),o=s.minus(r.div(i+=2)),r=r.times(l),s=o.plus(r.div(i+=2)),s.d[e]!==void 0)for(t=e;s.d[t]===o.d[t]&&t--;);return n&&(s=s.times(2<<n-1)),zt=!0,Tt(s,c.precision=d,c.rounding=f,!0)};$e.isFinite=function(){return!!this.d};$e.isInteger=$e.isInt=function(){return!!this.d&&Hr(this.e/Mt)>this.d.length-2};$e.isNaN=function(){return!this.s};$e.isNegative=$e.isNeg=function(){return this.s<0};$e.isPositive=$e.isPos=function(){return this.s>0};$e.isZero=function(){return!!this.d&&this.d[0]===0};$e.lessThan=$e.lt=function(t){return this.cmp(t)<0};$e.lessThanOrEqualTo=$e.lte=function(t){return this.cmp(t)<1};$e.logarithm=$e.log=function(t){var e,n,i,r,o,s,a,l,u=this,c=u.constructor,d=c.precision,f=c.rounding,h=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),n=t.d,t.s<0||!n||!n[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(n=u.d,u.s<0||!n||!n[0]||u.eq(1))return new c(n&&!n[0]?-1/0:u.s!=1?NaN:n?0:1/0);if(e)if(n.length>1)o=!0;else{for(r=n[0];r%10===0;)r/=10;o=r!==1}if(zt=!1,a=d+h,s=fc(u,a),i=e?n1(c,a+10):fc(t,a),l=Gn(s,i,a,1),Zv(l.d,r=d,f))do if(a+=10,s=fc(u,a),i=e?n1(c,a+10):fc(t,a),l=Gn(s,i,a,1),!o){+yr(l.d).slice(r+1,r+15)+1==1e14&&(l=Tt(l,d+1,0));break}while(Zv(l.d,r+=10,f));return zt=!0,Tt(l,d,f)};$e.minus=$e.sub=function(t){var e,n,i,r,o,s,a,l,u,c,d,f,h=this,m=h.constructor;if(t=new m(t),!h.d||!t.d)return!h.s||!t.s?t=new m(NaN):h.d?t.s=-t.s:t=new m(t.d||h.s!==t.s?h:NaN),t;if(h.s!=t.s)return t.s=-t.s,h.plus(t);if(u=h.d,f=t.d,a=m.precision,l=m.rounding,!u[0]||!f[0]){if(f[0])t.s=-t.s;else if(u[0])t=new m(h);else return new m(l===3?-0:0);return zt?Tt(t,a,l):t}if(n=Hr(t.e/Mt),c=Hr(h.e/Mt),u=u.slice(),o=c-n,o){for(d=o<0,d?(e=u,o=-o,s=f.length):(e=f,n=c,s=u.length),i=Math.max(Math.ceil(a/Mt),s)+2,o>i&&(o=i,e.length=1),e.reverse(),i=o;i--;)e.push(0);e.reverse()}else{for(i=u.length,s=f.length,d=i<s,d&&(s=i),i=0;i<s;i++)if(u[i]!=f[i]){d=u[i]<f[i];break}o=0}for(d&&(e=u,u=f,f=e,t.s=-t.s),s=u.length,i=f.length-s;i>0;--i)u[s++]=0;for(i=f.length;i>o;){if(u[--i]<f[i]){for(r=i;r&&u[--r]===0;)u[r]=sa-1;--u[r],u[i]+=sa}u[i]-=f[i]}for(;u[--s]===0;)u.pop();for(;u[0]===0;u.shift())--n;return u[0]?(t.d=u,t.e=nS(u,n),zt?Tt(t,a,l):t):new m(l===3?-0:0)};$e.modulo=$e.mod=function(t){var e,n=this,i=n.constructor;return t=new i(t),!n.d||!t.s||t.d&&!t.d[0]?new i(NaN):!t.d||n.d&&!n.d[0]?Tt(new i(n),i.precision,i.rounding):(zt=!1,i.modulo==9?(e=Gn(n,t.abs(),0,3,1),e.s*=t.s):e=Gn(n,t,0,i.modulo,1),e=e.times(t),zt=!0,n.minus(e))};$e.naturalExponential=$e.exp=function(){return fA(this)};$e.naturalLogarithm=$e.ln=function(){return fc(this)};$e.negated=$e.neg=function(){var t=new this.constructor(this);return t.s=-t.s,Tt(t)};$e.plus=$e.add=function(t){var e,n,i,r,o,s,a,l,u,c,d=this,f=d.constructor;if(t=new f(t),!d.d||!t.d)return!d.s||!t.s?t=new f(NaN):d.d||(t=new f(t.d||d.s===t.s?d:NaN)),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(u=d.d,c=t.d,a=f.precision,l=f.rounding,!u[0]||!c[0])return c[0]||(t=new f(d)),zt?Tt(t,a,l):t;if(o=Hr(d.e/Mt),i=Hr(t.e/Mt),u=u.slice(),r=o-i,r){for(r<0?(n=u,r=-r,s=c.length):(n=c,i=o,s=u.length),o=Math.ceil(a/Mt),s=o>s?o+1:s+1,r>s&&(r=s,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for(s=u.length,r=c.length,s-r<0&&(r=s,n=c,c=u,u=n),e=0;r;)e=(u[--r]=u[r]+c[r]+e)/sa|0,u[r]%=sa;for(e&&(u.unshift(e),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=nS(u,i),zt?Tt(t,a,l):t};$e.precision=$e.sd=function(t){var e,n=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Pc+t);return n.d?(e=wK(n.d),t&&n.e+1>e&&(e=n.e+1)):e=NaN,e};$e.round=function(){var t=this,e=t.constructor;return Tt(new e(t),t.e+1,e.rounding)};$e.sine=$e.sin=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.precision,e=i.rounding,i.precision=t+Math.max(n.e,n.sd())+Mt,i.rounding=1,n=FAe(i,kK(i,n)),i.precision=t,i.rounding=e,Tt(Zl>2?n.neg():n,t,e,!0)):new i(NaN)};$e.squareRoot=$e.sqrt=function(){var t,e,n,i,r,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(zt=!1,u=Math.sqrt(+s),u==0||u==1/0?(e=yr(a),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=Hr((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),i=new c(e)):i=new c(u.toString()),n=(l=c.precision)+3;;)if(o=i,i=o.plus(Gn(s,o,n+2,1)).times(.5),yr(o.d).slice(0,n)===(e=yr(i.d)).slice(0,n))if(e=e.slice(n-3,n+1),e=="9999"||!r&&e=="4999"){if(!r&&(Tt(o,l+1,0),o.times(o).eq(s))){i=o;break}n+=4,r=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(Tt(i,l+1,1),t=!i.times(i).eq(s));break}return zt=!0,Tt(i,l,c.rounding,t)};$e.tangent=$e.tan=function(){var t,e,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(t=i.precision,e=i.rounding,i.precision=t+10,i.rounding=1,n=n.sin(),n.s=1,n=Gn(n,new i(1).minus(n.times(n)).sqrt(),t+10,0),i.precision=t,i.rounding=e,Tt(Zl==2||Zl==4?n.neg():n,t,e,!0)):new i(NaN)};$e.times=$e.mul=function(t){var e,n,i,r,o,s,a,l,u,c=this,d=c.constructor,f=c.d,h=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!h||!h[0])return new d(!t.s||f&&!f[0]&&!h||h&&!h[0]&&!f?NaN:!f||!h?t.s/0:t.s*0);for(n=Hr(c.e/Mt)+Hr(t.e/Mt),l=f.length,u=h.length,l<u&&(o=f,f=h,h=o,s=l,l=u,u=s),o=[],s=l+u,i=s;i--;)o.push(0);for(i=u;--i>=0;){for(e=0,r=l+i;r>i;)a=o[r]+h[i]*f[r-i-1]+e,o[r--]=a%sa|0,e=a/sa|0;o[r]=(o[r]+e)%sa|0}for(;!o[--s];)o.pop();return e?++n:o.shift(),t.d=o,t.e=nS(o,n),zt?Tt(t,d.precision,d.rounding):t};$e.toBinary=function(t,e){return bM(this,2,t,e)};$e.toDecimalPlaces=$e.toDP=function(t,e){var n=this,i=n.constructor;return n=new i(n),t===void 0?n:(No(t,0,jc),e===void 0?e=i.rounding:No(e,0,8),Tt(n,t+n.e+1,e))};$e.toExponential=function(t,e){var n,i=this,r=i.constructor;return t===void 0?n=hl(i,!0):(No(t,0,jc),e===void 0?e=r.rounding:No(e,0,8),i=Tt(new r(i),t+1,e),n=hl(i,!0,t+1)),i.isNeg()&&!i.isZero()?"-"+n:n};$e.toFixed=function(t,e){var n,i,r=this,o=r.constructor;return t===void 0?n=hl(r):(No(t,0,jc),e===void 0?e=o.rounding:No(e,0,8),i=Tt(new o(r),t+r.e+1,e),n=hl(i,!1,t+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n};$e.toFraction=function(t){var e,n,i,r,o,s,a,l,u,c,d,f,h=this,m=h.d,g=h.constructor;if(!m)return new g(h);if(u=n=new g(1),i=l=new g(0),e=new g(i),o=e.e=wK(m)-h.e-1,s=o%Mt,e.d[0]=tr(10,s<0?Mt+s:s),t==null)t=o>0?e:u;else{if(a=new g(t),!a.isInt()||a.lt(u))throw Error(Pc+a);t=a.gt(e)?o>0?e:u:a}for(zt=!1,a=new g(yr(m)),c=g.precision,g.precision=o=m.length*Mt*2;d=Gn(a,e,0,1,1),r=n.plus(d.times(i)),r.cmp(t)!=1;)n=i,i=r,r=u,u=l.plus(d.times(r)),l=r,r=e,e=a.minus(d.times(r)),a=r;return r=Gn(t.minus(n),i,0,1,1),l=l.plus(r.times(u)),n=n.plus(r.times(i)),l.s=u.s=h.s,f=Gn(u,i,o,1).minus(h).abs().cmp(Gn(l,n,o,1).minus(h).abs())<1?[u,i]:[l,n],g.precision=c,zt=!0,f};$e.toHexadecimal=$e.toHex=function(t,e){return bM(this,16,t,e)};$e.toNearest=function(t,e){var n=this,i=n.constructor;if(n=new i(n),t==null){if(!n.d)return n;t=new i(1),e=i.rounding}else{if(t=new i(t),e===void 0?e=i.rounding:No(e,0,8),!n.d)return t.s?n:t;if(!t.d)return t.s&&(t.s=n.s),t}return t.d[0]?(zt=!1,n=Gn(n,t,0,e,1).times(t),zt=!0,Tt(n)):(t.s=n.s,n=t),n};$e.toNumber=function(){return+this};$e.toOctal=function(t,e){return bM(this,8,t,e)};$e.toPower=$e.pow=function(t){var e,n,i,r,o,s,a=this,l=a.constructor,u=+(t=new l(t));if(!a.d||!t.d||!a.d[0]||!t.d[0])return new l(tr(+a,u));if(a=new l(a),a.eq(1))return a;if(i=l.precision,o=l.rounding,t.eq(1))return Tt(a,i,o);if(e=Hr(t.e/Mt),e>=t.d.length-1&&(n=u<0?-u:u)<=DAe)return r=_K(l,a,n,i),t.s<0?new l(1).div(r):Tt(r,i,o);if(s=a.s,s<0){if(e<t.d.length-1)return new l(NaN);if((t.d[e]&1)==0&&(s=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=s,a}return n=tr(+a,u),e=n==0||!isFinite(n)?Hr(u*(Math.log("0."+yr(a.d))/Math.LN10+a.e+1)):new l(n+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?s/0:0):(zt=!1,l.rounding=a.s=1,n=Math.min(12,(e+"").length),r=fA(t.times(fc(a,i+n)),i),r.d&&(r=Tt(r,i+5,1),Zv(r.d,i,o)&&(e=i+10,r=Tt(fA(t.times(fc(a,e+n)),e),e+5,1),+yr(r.d).slice(i+1,i+15)+1==1e14&&(r=Tt(r,i+1,0)))),r.s=s,zt=!0,l.rounding=o,Tt(r,i,o))};$e.toPrecision=function(t,e){var n,i=this,r=i.constructor;return t===void 0?n=hl(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(No(t,1,jc),e===void 0?e=r.rounding:No(e,0,8),i=Tt(new r(i),t,e),n=hl(i,t<=i.e||i.e<=r.toExpNeg,t)),i.isNeg()&&!i.isZero()?"-"+n:n};$e.toSignificantDigits=$e.toSD=function(t,e){var n=this,i=n.constructor;return t===void 0?(t=i.precision,e=i.rounding):(No(t,1,jc),e===void 0?e=i.rounding:No(e,0,8)),Tt(new i(n),t,e)};$e.toString=function(){var t=this,e=t.constructor,n=hl(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+n:n};$e.truncated=$e.trunc=function(){return Tt(new this.constructor(this),this.e+1,1)};$e.valueOf=$e.toJSON=function(){var t=this,e=t.constructor,n=hl(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+n:n};function yr(t){var e,n,i,r=t.length-1,o="",s=t[0];if(r>0){for(o+=s,e=1;e<r;e++)i=t[e]+"",n=Mt-i.length,n&&(o+=rc(n)),o+=i;s=t[e],i=s+"",n=Mt-i.length,n&&(o+=rc(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}function No(t,e,n){if(t!==~~t||t<e||t>n)throw Error(Pc+t)}function Zv(t,e,n,i){var r,o,s,a;for(o=t[0];o>=10;o/=10)--e;return--e<0?(e+=Mt,r=0):(r=Math.ceil((e+1)/Mt),e%=Mt),o=tr(10,Mt-e),a=t[r]%o|0,i==null?e<3?(e==0?a=a/100|0:e==1&&(a=a/10|0),s=n<4&&a==99999||n>3&&a==49999||a==5e4||a==0):s=(n<4&&a+1==o||n>3&&a+1==o/2)&&(t[r+1]/o/100|0)==tr(10,e-2)-1||(a==o/2||a==0)&&(t[r+1]/o/100|0)==0:e<4?(e==0?a=a/1e3|0:e==1?a=a/100|0:e==2&&(a=a/10|0),s=(i||n<4)&&a==9999||!i&&n>3&&a==4999):s=((i||n<4)&&a+1==o||!i&&n>3&&a+1==o/2)&&(t[r+1]/o/1e3|0)==tr(10,e-3)-1,s}function Kw(t,e,n){for(var i,r=[0],o,s=0,a=t.length;s<a;){for(o=r.length;o--;)r[o]*=e;for(r[0]+=uA.indexOf(t.charAt(s++)),i=0;i<r.length;i++)r[i]>n-1&&(r[i+1]===void 0&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}function BAe(t,e){var n,i,r;if(e.isZero())return e;i=e.d.length,i<32?(n=Math.ceil(i/3),r=(1/iS(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),t.precision+=n,e=Um(t,1,e.times(r),new t(1));for(var o=n;o--;){var s=e.times(e);e=s.times(s).minus(s).times(8).plus(1)}return t.precision-=n,e}var Gn=(function(){function t(i,r,o){var s,a=0,l=i.length;for(i=i.slice();l--;)s=i[l]*r+a,i[l]=s%o|0,a=s/o|0;return a&&i.unshift(a),i}function e(i,r,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;a<o;a++)if(i[a]!=r[a]){l=i[a]>r[a]?1:-1;break}return l}function n(i,r,o,s){for(var a=0;o--;)i[o]-=a,a=i[o]<r[o]?1:0,i[o]=a*s+i[o]-r[o];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,o,s,a,l){var u,c,d,f,h,m,g,v,p,b,y,_,C,S,k,T,E,x,P,A,I=i.constructor,D=i.s==r.s?1:-1,q=i.d,z=r.d;if(!q||!q[0]||!z||!z[0])return new I(!i.s||!r.s||(q?z&&q[0]==z[0]:!z)?NaN:q&&q[0]==0||!z?D*0:D/0);for(l?(h=1,c=i.e-r.e):(l=sa,h=Mt,c=Hr(i.e/h)-Hr(r.e/h)),P=z.length,E=q.length,p=new I(D),b=p.d=[],d=0;z[d]==(q[d]||0);d++);if(z[d]>(q[d]||0)&&c--,o==null?(S=o=I.precision,s=I.rounding):a?S=o+(i.e-r.e)+1:S=o,S<0)b.push(1),m=!0;else{if(S=S/h+2|0,d=0,P==1){for(f=0,z=z[0],S++;(d<E||f)&&S--;d++)k=f*l+(q[d]||0),b[d]=k/z|0,f=k%z|0;m=f||d<E}else{for(f=l/(z[0]+1)|0,f>1&&(z=t(z,f,l),q=t(q,f,l),P=z.length,E=q.length),T=P,y=q.slice(0,P),_=y.length;_<P;)y[_++]=0;A=z.slice(),A.unshift(0),x=z[0],z[1]>=l/2&&++x;do f=0,u=e(z,y,P,_),u<0?(C=y[0],P!=_&&(C=C*l+(y[1]||0)),f=C/x|0,f>1?(f>=l&&(f=l-1),g=t(z,f,l),v=g.length,_=y.length,u=e(g,y,v,_),u==1&&(f--,n(g,P<v?A:z,v,l))):(f==0&&(u=f=1),g=z.slice()),v=g.length,v<_&&g.unshift(0),n(y,g,_,l),u==-1&&(_=y.length,u=e(z,y,P,_),u<1&&(f++,n(y,P<_?A:z,_,l))),_=y.length):u===0&&(f++,y=[0]),b[d++]=f,u&&y[0]?y[_++]=q[T]||0:(y=[q[T]],_=1);while((T++<E||y[0]!==void 0)&&S--);m=y[0]!==void 0}b[0]||b.shift()}if(h==1)p.e=c,gK=m;else{for(d=1,f=b[0];f>=10;f/=10)d++;p.e=d+c*h-1,Tt(p,a?o+p.e+1:o,s,m)}return p}})();function Tt(t,e,n,i){var r,o,s,a,l,u,c,d,f,h=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(r=1,a=d[0];a>=10;a/=10)r++;if(o=e-r,o<0)o+=Mt,s=e,c=d[f=0],l=c/tr(10,r-s-1)%10|0;else if(f=Math.ceil((o+1)/Mt),a=d.length,f>=a)if(i){for(;a++<=f;)d.push(0);c=l=0,r=1,o%=Mt,s=o-Mt+1}else break e;else{for(c=a=d[f],r=1;a>=10;a/=10)r++;o%=Mt,s=o-Mt+r,l=s<0?0:c/tr(10,r-s-1)%10|0}if(i=i||e<0||d[f+1]!==void 0||(s<0?c:c%tr(10,r-s-1)),u=n<4?(l||i)&&(n==0||n==(t.s<0?3:2)):l>5||l==5&&(n==4||i||n==6&&(o>0?s>0?c/tr(10,r-s):0:d[f-1])%10&1||n==(t.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=t.e+1,d[0]=tr(10,(Mt-e%Mt)%Mt),t.e=-e||0):d[0]=t.e=0,t;if(o==0?(d.length=f,a=1,f--):(d.length=f+1,a=tr(10,Mt-o),d[f]=s>0?(c/tr(10,r-s)%tr(10,s)|0)*a:0),u)for(;;)if(f==0){for(o=1,s=d[0];s>=10;s/=10)o++;for(s=d[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(t.e++,d[0]==sa&&(d[0]=1));break}else{if(d[f]+=a,d[f]!=sa)break;d[f--]=0,a=1}for(o=d.length;d[--o]===0;)d.pop()}return zt&&(t.e>h.maxE?(t.d=null,t.e=NaN):t.e<h.minE&&(t.e=0,t.d=[0])),t}function hl(t,e,n){if(!t.isFinite())return SK(t);var i,r=t.e,o=yr(t.d),s=o.length;return e?(n&&(i=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+rc(i):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(t.e<0?"e":"e+")+t.e):r<0?(o="0."+rc(-r-1)+o,n&&(i=n-s)>0&&(o+=rc(i))):r>=s?(o+=rc(r+1-s),n&&(i=n-r-1)>0&&(o=o+"."+rc(i))):((i=r+1)<s&&(o=o.slice(0,i)+"."+o.slice(i)),n&&(i=n-s)>0&&(r+1===s&&(o+="."),o+=rc(i))),o}function nS(t,e){var n=t[0];for(e*=Mt;n>=10;n/=10)e++;return e}function n1(t,e,n){if(e>NAe)throw zt=!0,n&&(t.precision=n),Error(pK);return Tt(new t(e1),e,1,!0)}function ja(t,e,n){if(e>dA)throw Error(pK);return Tt(new t(t1),e,n,!0)}function wK(t){var e=t.length-1,n=e*Mt+1;if(e=t[e],e){for(;e%10==0;e/=10)n--;for(e=t[0];e>=10;e/=10)n++}return n}function rc(t){for(var e="";t--;)e+="0";return e}function _K(t,e,n,i){var r,o=new t(1),s=Math.ceil(i/Mt+4);for(zt=!1;;){if(n%2&&(o=o.times(e),UB(o.d,s)&&(r=!0)),n=Hr(n/2),n===0){n=o.d.length-1,r&&o.d[n]===0&&++o.d[n];break}e=e.times(e),UB(e.d,s)}return zt=!0,o}function HB(t){return t.d[t.d.length-1]&1}function CK(t,e,n){for(var i,r,o=new t(e[0]),s=0;++s<e.length;){if(r=new t(e[s]),!r.s){o=r;break}i=o.cmp(r),(i===n||i===0&&o.s===n)&&(o=r)}return o}function fA(t,e){var n,i,r,o,s,a,l,u=0,c=0,d=0,f=t.constructor,h=f.rounding,m=f.precision;if(!t.d||!t.d[0]||t.e>17)return new f(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(e==null?(zt=!1,l=m):l=e,a=new f(.03125);t.e>-2;)t=t.times(a),d+=5;for(i=Math.log(tr(2,d))/Math.LN10*2+5|0,l+=i,n=o=s=new f(1),f.precision=l;;){if(o=Tt(o.times(t),l,1),n=n.times(++c),a=s.plus(Gn(o,n,l,1)),yr(a.d).slice(0,l)===yr(s.d).slice(0,l)){for(r=d;r--;)s=Tt(s.times(s),l,1);if(e==null)if(u<3&&Zv(s.d,l-i,h,u))f.precision=l+=10,n=o=a=new f(1),c=0,u++;else return Tt(s,f.precision=m,h,zt=!0);else return f.precision=m,s}s=a}}function fc(t,e){var n,i,r,o,s,a,l,u,c,d,f,h=1,m=10,g=t,v=g.d,p=g.constructor,b=p.rounding,y=p.precision;if(g.s<0||!v||!v[0]||!g.e&&v[0]==1&&v.length==1)return new p(v&&!v[0]?-1/0:g.s!=1?NaN:v?0:g);if(e==null?(zt=!1,c=y):c=e,p.precision=c+=m,n=yr(v),i=n.charAt(0),Math.abs(o=g.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)g=g.times(t),n=yr(g.d),i=n.charAt(0),h++;o=g.e,i>1?(g=new p("0."+n),o++):g=new p(i+"."+n.slice(1))}else return u=n1(p,c+2,y).times(o+""),g=fc(new p(i+"."+n.slice(1)),c-m).plus(u),p.precision=y,e==null?Tt(g,y,b,zt=!0):g;for(d=g,l=s=g=Gn(g.minus(1),g.plus(1),c,1),f=Tt(g.times(g),c,1),r=3;;){if(s=Tt(s.times(f),c,1),u=l.plus(Gn(s,new p(r),c,1)),yr(u.d).slice(0,c)===yr(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(n1(p,c+2,y).times(o+""))),l=Gn(l,new p(h),c,1),e==null)if(Zv(l.d,c-m,b,a))p.precision=c+=m,u=s=g=Gn(d.minus(1),d.plus(1),c,1),f=Tt(g.times(g),c,1),r=a=1;else return Tt(l,p.precision=y,b,zt=!0);else return p.precision=y,l;l=u,r+=2}}function SK(t){return String(t.s*t.s/0)}function Gw(t,e){var n,i,r;for((n=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(n<0&&(n=i),n+=+e.slice(i+1),e=e.substring(0,i)):n<0&&(n=e.length),i=0;e.charCodeAt(i)===48;i++);for(r=e.length;e.charCodeAt(r-1)===48;--r);if(e=e.slice(i,r),e){if(r-=i,t.e=n=n-i-1,t.d=[],i=(n+1)%Mt,n<0&&(i+=Mt),i<r){for(i&&t.d.push(+e.slice(0,i)),r-=Mt;i<r;)t.d.push(+e.slice(i,i+=Mt));e=e.slice(i),i=Mt-e.length}else i-=r;for(;i--;)e+="0";t.d.push(+e),zt&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function VAe(t,e){var n,i,r,o,s,a,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),yK.test(e))return Gw(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(OAe.test(e))n=16,e=e.toLowerCase();else if(MAe.test(e))n=2;else if(LAe.test(e))n=8;else throw Error(Pc+e);for(o=e.search(/p/i),o>0?(l=+e.slice(o+1),e=e.substring(2,o)):e=e.slice(2),o=e.indexOf("."),s=o>=0,i=t.constructor,s&&(e=e.replace(".",""),a=e.length,o=a-o,r=_K(i,new i(n),o,o*2)),u=Kw(e,n,sa),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new i(t.s*0):(t.e=nS(u,c),t.d=u,zt=!1,s&&(t=Gn(t,r,a*4)),l&&(t=t.times(Math.abs(l)<54?tr(2,l):hc.pow(2,l))),zt=!0,t)}function FAe(t,e){var n,i=e.d.length;if(i<3)return e.isZero()?e:Um(t,2,e,e);n=1.4*Math.sqrt(i),n=n>16?16:n|0,e=e.times(1/iS(5,n)),e=Um(t,2,e,e);for(var r,o=new t(5),s=new t(16),a=new t(20);n--;)r=e.times(e),e=e.times(o.plus(r.times(s.times(r).minus(a))));return e}function Um(t,e,n,i,r){var o,s,a,l,u=t.precision,c=Math.ceil(u/Mt);for(zt=!1,l=n.times(n),a=new t(i);;){if(s=Gn(a.times(l),new t(e++*e++),u,1),a=r?i.plus(s):i.minus(s),i=Gn(s.times(l),new t(e++*e++),u,1),s=a.plus(i),s.d[c]!==void 0){for(o=c;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=i,i=s,s=o}return zt=!0,s.d.length=c+1,s}function iS(t,e){for(var n=t;--e;)n*=t;return n}function kK(t,e){var n,i=e.s<0,r=ja(t,t.precision,1),o=r.times(.5);if(e=e.abs(),e.lte(o))return Zl=i?4:1,e;if(n=e.divToInt(r),n.isZero())Zl=i?3:2;else{if(e=e.minus(n.times(r)),e.lte(o))return Zl=HB(n)?i?2:3:i?4:1,e;Zl=HB(n)?i?1:4:i?3:2}return e.minus(r).abs()}function bM(t,e,n,i){var r,o,s,a,l,u,c,d,f,h=t.constructor,m=n!==void 0;if(m?(No(n,1,jc),i===void 0?i=h.rounding:No(i,0,8)):(n=h.precision,i=h.rounding),!t.isFinite())c=SK(t);else{for(c=hl(t),s=c.indexOf("."),m?(r=2,e==16?n=n*4-3:e==8&&(n=n*3-2)):r=e,s>=0&&(c=c.replace(".",""),f=new h(1),f.e=c.length-s,f.d=Kw(hl(f),10,r),f.e=f.d.length),d=Kw(c,10,r),o=l=d.length;d[--l]==0;)d.pop();if(!d[0])c=m?"0p+0":"0";else{if(s<0?o--:(t=new h(t),t.d=d,t.e=o,t=Gn(t,f,n,i,0,r),d=t.d,o=t.e,u=gK),s=d[n],a=r/2,u=u||d[n+1]!==void 0,u=i<4?(s!==void 0||u)&&(i===0||i===(t.s<0?3:2)):s>a||s===a&&(i===4||u||i===6&&d[n-1]&1||i===(t.s<0?8:7)),d.length=n,u)for(;++d[--n]>r-1;)d[n]=0,n||(++o,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,c="";s<l;s++)c+=uA.charAt(d[s]);if(m){if(l>1)if(e==16||e==8){for(s=e==16?4:3,--l;l%s;l++)c+="0";for(d=Kw(c,r,e),l=d.length;!d[l-1];--l);for(s=1,c="1.";s<l;s++)c+=uA.charAt(d[s])}else c=c.charAt(0)+"."+c.slice(1);c=c+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)c="0"+c;c="0."+c}else if(++o>l)for(o-=l;o--;)c+="0";else o<l&&(c=c.slice(0,o)+"."+c.slice(o))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function UB(t,e){if(t.length>e)return t.length=e,!0}function $Ae(t){return new this(t).abs()}function zAe(t){return new this(t).acos()}function HAe(t){return new this(t).acosh()}function UAe(t,e){return new this(t).plus(e)}function WAe(t){return new this(t).asin()}function qAe(t){return new this(t).asinh()}function jAe(t){return new this(t).atan()}function KAe(t){return new this(t).atanh()}function GAe(t,e){t=new this(t),e=new this(e);var n,i=this.precision,r=this.rounding,o=i+4;return!t.s||!e.s?n=new this(NaN):!t.d&&!e.d?(n=ja(this,o,1).times(e.s>0?.25:.75),n.s=t.s):!e.d||t.isZero()?(n=e.s<0?ja(this,i,r):new this(0),n.s=t.s):!t.d||e.isZero()?(n=ja(this,o,1).times(.5),n.s=t.s):e.s<0?(this.precision=o,this.rounding=1,n=this.atan(Gn(t,e,o,1)),e=ja(this,o,1),this.precision=i,this.rounding=r,n=t.s<0?n.minus(e):n.plus(e)):n=this.atan(Gn(t,e,o,1)),n}function YAe(t){return new this(t).cbrt()}function XAe(t){return Tt(t=new this(t),t.e+1,2)}function JAe(t,e,n){return new this(t).clamp(e,n)}function ZAe(t){if(!t||typeof t!="object")throw Error(tS+"Object expected");var e,n,i,r=t.defaults===!0,o=["precision",1,jc,"rounding",0,8,"toExpNeg",-qh,0,"toExpPos",0,qh,"maxE",0,qh,"minE",-qh,0,"modulo",0,9];for(e=0;e<o.length;e+=3)if(n=o[e],r&&(this[n]=cA[n]),(i=t[n])!==void 0)if(Hr(i)===i&&i>=o[e+1]&&i<=o[e+2])this[n]=i;else throw Error(Pc+n+": "+i);if(n="crypto",r&&(this[n]=cA[n]),(i=t[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(vK);else this[n]=!1;else throw Error(Pc+n+": "+i);return this}function QAe(t){return new this(t).cos()}function ePe(t){return new this(t).cosh()}function TK(t){var e,n,i;function r(o){var s,a,l,u=this;if(!(u instanceof r))return new r(o);if(u.constructor=r,WB(o)){u.s=o.s,zt?!o.d||o.e>r.maxE?(u.e=NaN,u.d=null):o.e<r.minE?(u.e=0,u.d=[0]):(u.e=o.e,u.d=o.d.slice()):(u.e=o.e,u.d=o.d?o.d.slice():o.d);return}if(l=typeof o,l==="number"){if(o===0){u.s=1/o<0?-1:1,u.e=0,u.d=[0];return}if(o<0?(o=-o,u.s=-1):u.s=1,o===~~o&&o<1e7){for(s=0,a=o;a>=10;a/=10)s++;zt?s>r.maxE?(u.e=NaN,u.d=null):s<r.minE?(u.e=0,u.d=[0]):(u.e=s,u.d=[o]):(u.e=s,u.d=[o]);return}if(o*0!==0){o||(u.s=NaN),u.e=NaN,u.d=null;return}return Gw(u,o.toString())}if(l==="string")return(a=o.charCodeAt(0))===45?(o=o.slice(1),u.s=-1):(a===43&&(o=o.slice(1)),u.s=1),yK.test(o)?Gw(u,o):VAe(u,o);if(l==="bigint")return o<0?(o=-o,u.s=-1):u.s=1,Gw(u,o.toString());throw Error(Pc+o)}if(r.prototype=$e,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=ZAe,r.clone=TK,r.isDecimal=WB,r.abs=$Ae,r.acos=zAe,r.acosh=HAe,r.add=UAe,r.asin=WAe,r.asinh=qAe,r.atan=jAe,r.atanh=KAe,r.atan2=GAe,r.cbrt=YAe,r.ceil=XAe,r.clamp=JAe,r.cos=QAe,r.cosh=ePe,r.div=tPe,r.exp=nPe,r.floor=iPe,r.hypot=rPe,r.ln=oPe,r.log=sPe,r.log10=lPe,r.log2=aPe,r.max=uPe,r.min=cPe,r.mod=dPe,r.mul=fPe,r.pow=hPe,r.random=mPe,r.round=gPe,r.sign=pPe,r.sin=vPe,r.sinh=bPe,r.sqrt=yPe,r.sub=wPe,r.sum=_Pe,r.tan=CPe,r.tanh=SPe,r.trunc=kPe,t===void 0&&(t={}),t&&t.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<i.length;)t.hasOwnProperty(n=i[e++])||(t[n]=this[n]);return r.config(t),r}function tPe(t,e){return new this(t).div(e)}function nPe(t){return new this(t).exp()}function iPe(t){return Tt(t=new this(t),t.e+1,3)}function rPe(){var t,e,n=new this(0);for(zt=!1,t=0;t<arguments.length;)if(e=new this(arguments[t++]),e.d)n.d&&(n=n.plus(e.times(e)));else{if(e.s)return zt=!0,new this(1/0);n=e}return zt=!0,n.sqrt()}function WB(t){return t instanceof hc||t&&t.toStringTag===bK||!1}function oPe(t){return new this(t).ln()}function sPe(t,e){return new this(t).log(e)}function aPe(t){return new this(t).log(2)}function lPe(t){return new this(t).log(10)}function uPe(){return CK(this,arguments,-1)}function cPe(){return CK(this,arguments,1)}function dPe(t,e){return new this(t).mod(e)}function fPe(t,e){return new this(t).mul(e)}function hPe(t,e){return new this(t).pow(e)}function mPe(t){var e,n,i,r,o=0,s=new this(1),a=[];if(t===void 0?t=this.precision:No(t,1,jc),i=Math.ceil(t/Mt),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(i));o<i;)r=e[o],r>=429e7?e[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=r%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(i*=4);o<i;)r=e[o]+(e[o+1]<<8)+(e[o+2]<<16)+((e[o+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(e,o):(a.push(r%1e7),o+=4);o=i/4}else throw Error(vK);else for(;o<i;)a[o++]=Math.random()*1e7|0;for(i=a[--o],t%=Mt,i&&t&&(r=tr(10,Mt-t),a[o]=(i/r|0)*r);a[o]===0;o--)a.pop();if(o<0)n=0,a=[0];else{for(n=-1;a[0]===0;n-=Mt)a.shift();for(i=1,r=a[0];r>=10;r/=10)i++;i<Mt&&(n-=Mt-i)}return s.e=n,s.d=a,s}function gPe(t){return Tt(t=new this(t),t.e+1,this.rounding)}function pPe(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function vPe(t){return new this(t).sin()}function bPe(t){return new this(t).sinh()}function yPe(t){return new this(t).sqrt()}function wPe(t,e){return new this(t).sub(e)}function _Pe(){var t=0,e=arguments,n=new this(e[t]);for(zt=!1;n.s&&++t<e.length;)n=n.plus(e[t]);return zt=!0,Tt(n,this.precision,this.rounding)}function CPe(t){return new this(t).tan()}function SPe(t){return new this(t).tanh()}function kPe(t){return Tt(t=new this(t),t.e+1,1)}$e[Symbol.for("nodejs.util.inspect.custom")]=$e.toString;$e[Symbol.toStringTag]="Decimal";var hc=$e.constructor=TK(cA);e1=new hc(e1);t1=new hc(t1);const qB={plus(...t){let e=new hc(t.shift());return t.forEach(n=>{e=e.plus(n)}),e.toString()},minus(...t){let e=new hc(t.shift());return t.forEach(n=>{e=e.minus(n)}),e.toString()},times(...t){let e=new hc(t.shift());return t.forEach(n=>{e=e.times(n)}),e.toString()},div(...t){let e=new hc(t.shift());return t.forEach(n=>{e=e.div(n)}),e.toString()}},TPe=le({props:{prefixIcon:{type:Object},suffixIcon:{type:Object},modelValue:{type:String,default:""},clearable:Boolean,placeholder:String,unsigned:{type:Boolean,default:!0},multiplier:{type:Number,default:1}},emits:["update:modelValue","clear","blur"],setup(t,e){const n=H(null),i=c=>c==null||typeof c=="string"&&c.trim()===""?"":qB.times(c,t.multiplier),r=c=>c==null||c.trim()===""||c==="-"?"":qB.div(c,t.multiplier),o=H(i(t.modelValue)),s=M(()=>!t.unsigned),a=c=>{let d=c.replace(/[^\d.\-]/g,"");if(s.value?d.lastIndexOf("-")>0&&(d=d[0]+d.substring(1).replace(/\-/g,"")):d=d.replace(/\-/g,""),(d.match(/\./g)||[]).length>1){const m=d.indexOf(".")+1;d=d.substring(0,m)+d.substring(m).replace(/\./g,"")}d.indexOf(".")===0&&(d=s.value&&d.startsWith("-")?"-0.":"0.");const h=d.indexOf(".");return h>-1&&d.indexOf("-",h)>-1&&(d=d.substring(0,h+1)+d.substring(h+1).replace(/\-/g,"")),d},l=()=>{let c=o.value;if(c==null)return;if(c=a(String(c)),o.value=c,c===""||c==="-"){e.emit("update:modelValue","");return}const d=r(c);Number(d)!==Number(t.modelValue)&&e.emit("update:modelValue",d)},u=()=>{const c=o.value;if(c===""||c==="-"||c===void 0){o.value="",e.emit("update:modelValue",""),e.emit("blur");return}e.emit("blur")};return Se(()=>t.modelValue,c=>{const d=i(c);o.value!==d&&(o.value=d)}),()=>L(cr,{ref:n,type:"text",clearable:t.clearable,prefixIcon:t.prefixIcon,suffixIcon:t.suffixIcon,placeholder:t.placeholder,inputmode:"decimal",modelValue:o.value,"onUpdate:modelValue":c=>o.value=c,onInput:l,onBlur:u,onChange:l,onClear:()=>{e.emit("update:modelValue",""),e.emit("clear")}},null)}}),EPe=le({props:{modelValue:{type:String,default:""},width:Number,accept:{type:Array,default(){return["*/*"]}},errMessage:String,disabled:Boolean,listType:{type:String,default:"picture-card"},limit:{type:Number,default:1},limitSize:{type:Number,default:1024},onUpload:Function},emits:["update:modelValue"],setup(t,e){const n=H(),i=M(()=>t.width?{width:"100%"}:{width:t.width+"px"}),r=H("");return()=>L(xPe,{ref:n,modelValue:t.modelValue,"onUpdate:modelValue":(...o)=>{e.emit("update:modelValue",...o)},style:i.value,limit:t.limit,accept:t.accept.join(","),disabled:t.disabled,listType:t.listType,errMessage:r.value,httpRequest:o=>{if(r.value="",o.file.size/1024>t.limitSize){r.value=`大小不能超过${t.limitSize}KB,请重新上传`,o.onError(new F2("limit",200,"post",""));return}const l=d=>{o.onSuccess(d)},u=d=>{r.value=d,o.onError(new F2(d,200,"post",""))},c=(d,f)=>{const h=new ProgressEvent("upload",{lengthComputable:!1,loaded:f,total:d});h.percent=f,o.onProgress(h)};t.onUpload?.call(this,{success:l,error:u,progress:c,file:o.file})},exceed:(o,s)=>{r.value=`文件数量已达${t.limit}个,想继续上传请先删除旧文件`}},null)}}),xPe=le({props:{accept:String,errMessage:String,disabled:Boolean,listType:String,limit:Number,httpRequest:Function,exceed:Function,modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(t,e){const n=H(t.errMessage),i=H([]),r=M(()=>i.value.map(u=>u.response?u.response:u.url).join(","));e.expose({isUploadEnd:()=>!i.value.find(c=>c.status!="success")}),Se(()=>t.errMessage,()=>{n.value=t.errMessage}),Se(()=>t.modelValue,()=>{if(n.value="",!t.modelValue){i.value=[];return}t.modelValue!=r.value&&(i.value=t.modelValue.split(",").map(u=>({name:u,url:u})))},{immediate:!0});const o=()=>{Ye(()=>{e.emit("update:modelValue",r.value)})},s=(u,c)=>{!c.url&&u&&(c.url=typeof u=="string"?u:u.url||u.data?.url||u.data),o()},a=H(!1),l=H();return()=>L(lSe,{"file-list":i.value,"onUpdate:file-list":u=>i.value=u,limit:t.limit,accept:t.accept,disabled:t.disabled,"list-type":t.listType,action:"upload","on-success":s,"on-remove":o,"http-request":t.httpRequest,"on-exceed":t.exceed,onPreview:u=>{l.value=[u.url],a.value=!0}},{default(){return L(Hi,{type:"primary"},{default:()=>[dt("Click to upload")]})},tip:()=>L("div",{class:"el-upload__tip"},[L(V2,{class:"mx-1",type:"warning"},{default:()=>[dt("只能上传"),t.accept,dt("格式文件  ")]}),Vt(L(V2,{class:"mx-1",type:"danger"},{default:()=>[n.value]}),[[On,n.value]]),a.value&&L(lq,{"url-list":l.value,"show-progress":!0,onClose:()=>{a.value=!1}},null)])})}}),APe="_wrapper_vf2oh_1",jB={wrapper:APe};new Array(256).fill("").map((t,e)=>("0"+e.toString(16)).slice(-2));function PPe(t,e){const n=t.extraPlugins||[];return{...t,extraPlugins:[...n,...e.filter(i=>!n.includes(i))]}}function EK(t){return!!t&&/^\d+\.\d+\.\d+/.test(t)}function xK(t){return t?["nightly","alpha","internal","nightly-","staging"].some(e=>t.includes(e)):!1}function IPe(t){return EK(t)||xK(t)}function RPe(t){if(!EK(t))throw new Error(`Invalid semantic version: ${t||"<blank>"}.`);const[e,n,i]=t.split(".");return{major:Number.parseInt(e,10),minor:Number.parseInt(n,10),patch:Number.parseInt(i,10)}}function MPe(t){if(xK(t))return 3;const{major:e}=RPe(t);switch(!0){case e>=44:return 3;case e>=38:return 2;default:return 1}}function OPe(){const{CKEDITOR_VERSION:t,CKEDITOR:e}=window;return IPe(t)?{source:e?"cdn":"npm",version:t}:null}function LPe(){const t=OPe();return t?MPe(t.version):null}function AK(t,e){switch(e||=LPe()||void 0,e){case 1:case 2:return t===void 0;case 3:return t==="GPL";default:return!1}}function DPe(t,e){return function(i){AK(i.config.get("licenseKey"))||i.on("collectUsageData",(r,{setUsageData:o})=>{o(`integration.${t}`,e)})}}const NPe=DPe("vue",{version:"7.3.1",frameworkVersion:LI});function BPe(t){return AK(t.licenseKey)?t:PPe(t,[NPe])}const _T="Lock from Vue integration (@ckeditor/ckeditor5-vue)",VPe=300,FPe=le({name:"CKEditor",__name:"ckeditor",props:o5({editor:{},config:{default:()=>({})},tagName:{default:"div"},disabled:{type:Boolean,default:!1},disableTwoWayDataBinding:{type:Boolean,default:!1}},{modelValue:{type:String,default:""},modelModifiers:{}}),emits:o5(["ready","destroy","blur","focus","input","update:modelValue"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const i=_ie(t,"modelValue"),r=t,o=n,s=H(),a=H(),l=H();e({instance:a,lastEditorData:l}),Se(i,d=>{a.value&&d!==l.value&&a.value.data.set(d)}),Se(()=>r.disabled,d=>{d?a.value.enableReadOnlyMode(_T):a.value.disableReadOnlyMode(_T)});function u(){const d=window.CKEDITOR_VERSION;if(!d)return console.warn('Cannot find the "CKEDITOR_VERSION" in the "window" scope.');const[f]=d.split(".").map(Number);f>=42||d.startsWith("0.0.0")||console.warn("The <CKEditor> component requires using CKEditor 5 in version 42+ or nightly build.")}function c(d){const f=ul(h=>{if(r.disableTwoWayDataBinding)return;const m=l.value=d.data.get();o("update:modelValue",m,h,d),o("input",m,h,d)},VPe,{leading:!0});d.model.document.on("change:data",f),d.editing.view.document.on("focus",h=>{o("focus",h,d)}),d.editing.view.document.on("blur",h=>{o("blur",h,d)})}return u(),Pt(()=>{const d=BPe(Object.assign({},r.config));i.value&&(d.initialData=i.value),r.editor.create(s.value,d).then(f=>{a.value=ca(f),c(f),i.value!==d.initialData&&f.data.set(i.value),r.disabled&&f.enableReadOnlyMode(_T),o("ready",f)}).catch(f=>{console.error(f)})}),Sn(()=>{a.value&&(a.value.destroy(),a.value=void 0),o("destroy")}),(d,f)=>(B(),_e(Gt(t.tagName),{ref_key:"element",ref:s},null,512))}});if(!LI.startsWith("3."))throw new Error("The CKEditor plugin works only with Vue 3+. For more information, please refer to https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs-v3.html");function $Pe(t){return Number.isSafeInteger(t)&&t>=0}function zPe(t){return t!=null&&typeof t!="function"&&$Pe(t.length)}function PK(t){return t}function Qv(t){return t==="__proto__"}function IK(t){switch(typeof t){case"number":case"symbol":return!1;case"string":return t.includes(".")||t.includes("[")||t.includes("]")}}function yM(t){return typeof t=="string"||typeof t=="symbol"?t:Object.is(t?.valueOf?.(),-0)?"-0":String(t)}function wM(t){const e=[],n=t.length;if(n===0)return e;let i=0,r="",o="",s=!1;for(t.charCodeAt(0)===46&&(e.push(""),i++);i<n;){const a=t[i];o?a==="\\"&&i+1<n?(i++,r+=t[i]):a===o?o="":r+=a:s?a==='"'||a==="'"?o=a:a==="]"?(s=!1,e.push(r),r=""):r+=a:a==="["?(s=!0,r&&(e.push(r),r="")):a==="."?r&&(e.push(r),r=""):r+=a,i++}return r&&e.push(r),e}function Ic(t,e,n){if(t==null)return n;switch(typeof e){case"string":{if(Qv(e))return n;const i=t[e];return i===void 0?IK(e)?Ic(t,wM(e),n):n:i}case"number":case"symbol":{typeof e=="number"&&(e=yM(e));const i=t[e];return i===void 0?n:i}default:{if(Array.isArray(e))return HPe(t,e,n);if(Object.is(e?.valueOf(),-0)?e="-0":e=String(e),Qv(e))return n;const i=t[e];return i===void 0?n:i}}}function HPe(t,e,n){if(e.length===0)return n;let i=t;for(let r=0;r<e.length;r++){if(i==null||Qv(e[r]))return n;i=i[e[r]]}return i===void 0?n:i}function UPe(t){return function(e){return Ic(e,t)}}function so(t){return t!==null&&(typeof t=="object"||typeof t=="function")}function a0(t){return t==null||typeof t!="object"&&typeof t!="function"}function eb(t,e){return t===e||Number.isNaN(t)&&Number.isNaN(e)}function WPe(t,e,n){return typeof n!="function"?_M(t,e):hA(t,e,function i(r,o,s,a,l,u){const c=n(r,o,s,a,l,u);return c!==void 0?!!c:hA(r,o,i,u)},new Map)}function hA(t,e,n,i){if(e===t)return!0;switch(typeof e){case"object":return qPe(t,e,n,i);case"function":return Object.keys(e).length>0?hA(t,{...e},n,i):eb(t,e);default:return so(t)?typeof e=="string"?e==="":!0:eb(t,e)}}function qPe(t,e,n,i){if(e==null)return!0;if(Array.isArray(e))return RK(t,e,n,i);if(e instanceof Map)return jPe(t,e,n,i);if(e instanceof Set)return KPe(t,e,n,i);const r=Object.keys(e);if(t==null)return r.length===0;if(r.length===0)return!0;if(i&&i.has(e))return i.get(e)===t;i&&i.set(e,t);try{for(let o=0;o<r.length;o++){const s=r[o];if(!a0(t)&&!(s in t)||e[s]===void 0&&t[s]!==void 0||e[s]===null&&t[s]!==null||!n(t[s],e[s],s,t,e,i))return!1}return!0}finally{i&&i.delete(e)}}function jPe(t,e,n,i){if(e.size===0)return!0;if(!(t instanceof Map))return!1;for(const[r,o]of e.entries()){const s=t.get(r);if(n(s,o,r,t,e,i)===!1)return!1}return!0}function RK(t,e,n,i){if(e.length===0)return!0;if(!Array.isArray(t))return!1;const r=new Set;for(let o=0;o<e.length;o++){const s=e[o];let a=!1;for(let l=0;l<t.length;l++){if(r.has(l))continue;const u=t[l];let c=!1;if(n(u,s,o,t,e,i)&&(c=!0),c){r.add(l),a=!0;break}}if(!a)return!1}return!0}function KPe(t,e,n,i){return e.size===0?!0:t instanceof Set?RK([...t],[...e],n,i):!1}function _M(t,e){return WPe(t,e,()=>{})}function i1(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}function Wm(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const rS="[object RegExp]",qm="[object String]",l0="[object Number]",u0="[object Boolean]",jm="[object Arguments]",oS="[object Symbol]",sS="[object Date]",aS="[object Map]",lS="[object Set]",CM="[object Array]",GPe="[object Function]",uS="[object ArrayBuffer]",Xp="[object Object]",YPe="[object Error]",cS="[object DataView]",SM="[object Uint8Array]",kM="[object Uint8ClampedArray]",TM="[object Uint16Array]",EM="[object Uint32Array]",XPe="[object BigUint64Array]",xM="[object Int8Array]",AM="[object Int16Array]",PM="[object Int32Array]",JPe="[object BigInt64Array]",IM="[object Float32Array]",RM="[object Float64Array]";function MM(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ZPe(t,e){return Yd(t,void 0,t,new Map,e)}function Yd(t,e,n,i=new Map,r=void 0){const o=r?.(t,e,n,i);if(o!=null)return o;if(a0(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const s=new Array(t.length);i.set(t,s);for(let a=0;a<t.length;a++)s[a]=Yd(t[a],a,n,i,r);return Object.hasOwn(t,"index")&&(s.index=t.index),Object.hasOwn(t,"input")&&(s.input=t.input),s}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const s=new RegExp(t.source,t.flags);return s.lastIndex=t.lastIndex,s}if(t instanceof Map){const s=new Map;i.set(t,s);for(const[a,l]of t)s.set(a,Yd(l,a,n,i,r));return s}if(t instanceof Set){const s=new Set;i.set(t,s);for(const a of t)s.add(Yd(a,void 0,n,i,r));return s}if(typeof Buffer<"u"&&Buffer.isBuffer(t))return t.subarray();if(MM(t)){const s=new(Object.getPrototypeOf(t)).constructor(t.length);i.set(t,s);for(let a=0;a<t.length;a++)s[a]=Yd(t[a],a,n,i,r);return s}if(t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const s=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,s),Fd(s,t,n,i,r),s}if(typeof File<"u"&&t instanceof File){const s=new File([t],t.name,{type:t.type});return i.set(t,s),Fd(s,t,n,i,r),s}if(t instanceof Blob){const s=new Blob([t],{type:t.type});return i.set(t,s),Fd(s,t,n,i,r),s}if(t instanceof Error){const s=new t.constructor;return i.set(t,s),s.message=t.message,s.name=t.name,s.stack=t.stack,s.cause=t.cause,Fd(s,t,n,i,r),s}if(typeof t=="object"&&QPe(t)){const s=Object.create(Object.getPrototypeOf(t));return i.set(t,s),Fd(s,t,n,i,r),s}return t}function Fd(t,e,n=t,i,r){const o=[...Object.keys(e),...i1(e)];for(let s=0;s<o.length;s++){const a=o[s],l=Object.getOwnPropertyDescriptor(t,a);(l==null||l.writable)&&(t[a]=Yd(e[a],a,n,i,r))}}function QPe(t){switch(Wm(t)){case jm:case CM:case uS:case cS:case u0:case sS:case IM:case RM:case xM:case AM:case PM:case aS:case l0:case Xp:case rS:case lS:case qm:case oS:case SM:case kM:case TM:case EM:return!0;default:return!1}}function eIe(t){return Yd(t,void 0,t,new Map,void 0)}function tIe(t){return t=eIe(t),e=>_M(e,t)}function dS(t,e){return ZPe(t,(n,i,r,o)=>{const s=e?.(n,i,r,o);if(s!=null)return s;if(typeof t=="object")switch(Object.prototype.toString.call(t)){case l0:case qm:case u0:{const a=new t.constructor(t?.valueOf());return Fd(a,t),a}case jm:{const a={};return Fd(a,t),a.length=t.length,a[Symbol.iterator]=t[Symbol.iterator],a}default:return}})}function Bo(t){return dS(t)}const nIe=/^(?:0|[1-9]\d*)$/;function MK(t,e=Number.MAX_SAFE_INTEGER){switch(typeof t){case"number":return Number.isInteger(t)&&t>=0&&t<e;case"symbol":return!1;case"string":return nIe.test(t)}}function mA(t){return t!==null&&typeof t=="object"&&Wm(t)==="[object Arguments]"}function iIe(t,e){let n;if(Array.isArray(e)?n=e:typeof e=="string"&&IK(e)&&t?.[e]==null?n=wM(e):n=[e],n.length===0)return!1;let i=t;for(let r=0;r<n.length;r++){const o=n[r];if((i==null||!Object.hasOwn(i,o))&&!((Array.isArray(i)||mA(i))&&MK(o)&&o<i.length))return!1;i=i[o]}return!0}function rIe(t,e){switch(typeof t){case"object":{Object.is(t?.valueOf(),-0)&&(t="-0");break}case"number":{t=yM(t);break}}return e=Bo(e),function(n){const i=Ic(n,t);return i===void 0?iIe(n,t):e===void 0?i===void 0:_M(i,e)}}function oIe(t){if(t==null)return PK;switch(typeof t){case"function":return t;case"object":return Array.isArray(t)&&t.length===2?rIe(t[0],t[1]):tIe(t);case"string":case"symbol":case"number":return UPe(t)}}function gA(t){return typeof t=="object"&&t!==null}function OK(t){return typeof t=="symbol"||t instanceof Symbol}function sIe(t){return OK(t)?NaN:Number(t)}function aIe(t){return t?(t=sIe(t),t===1/0||t===-1/0?(t<0?-1:1)*Number.MAX_VALUE:t===t?t:0):t===0?t:0}function lIe(t){const e=aIe(t),n=e%1;return n?e-n:e}function KB(t){return typeof t=="string"||t instanceof String}const uIe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cIe=/^\w*$/;function dIe(t,e){return Array.isArray(t)?!1:typeof t=="number"||typeof t=="boolean"||t==null||OK(t)?!0:typeof t=="string"&&(cIe.test(t)||!uIe.test(t))||e!=null&&Object.hasOwn(e,t)}function fIe(t){return Array.isArray(t)}function Vg(t){return t}const hIe=(t,e,n)=>{const i=t[e];(!(Object.hasOwn(t,e)&&eb(i,n))||n===void 0&&!(e in t))&&(t[e]=n)};function mIe(t,e,n,i){if(t==null&&!so(t))return t;const r=dIe(e,t)?[e]:Array.isArray(e)?e:typeof e=="string"?wM(e):[e];let o=t;for(let s=0;s<r.length&&o!=null;s++){const a=yM(r[s]);if(Qv(a))continue;let l;if(s===r.length-1)l=n(o[a]);else{const u=o[a],c=i?.(u,a,t);l=c!==void 0?c:so(u)?u:MK(r[s+1])?[]:{}}hIe(o,a,l),o=o[a]}return t}function LK(t,e,n){return mIe(t,e,()=>n,()=>{})}function gIe(t,e,{signal:n,edges:i}={}){let r,o=null;const s=i!=null&&i.includes("leading"),a=i==null||i.includes("trailing"),l=()=>{o!==null&&(t.apply(r,o),r=void 0,o=null)},u=()=>{a&&l(),h()};let c=null;const d=()=>{c!=null&&clearTimeout(c),c=setTimeout(()=>{c=null,u()},e)},f=()=>{c!==null&&(clearTimeout(c),c=null)},h=()=>{f(),r=void 0,o=null},m=()=>{f(),l()},g=function(...v){if(n?.aborted)return;r=this,o=v;const p=c==null;d(),s&&p&&l()};return g.schedule=d,g.cancel=h,g.flush=m,n?.addEventListener("abort",h,{once:!0}),g}function ml(t,e=0,n={}){typeof n!="object"&&(n={});const{leading:i=!1,trailing:r=!0,maxWait:o}=n,s=Array(2);i&&(s[0]="leading"),r&&(s[1]="trailing");let a,l=null;const u=gIe(function(...f){a=t.apply(this,f),l=null},e,{edges:s}),c=function(...f){return o!=null&&(l===null&&(l=Date.now()),Date.now()-l>=o)?(a=t.apply(this,f),l=Date.now(),u.cancel(),u.schedule(),a):(u.apply(this,f),a)},d=()=>(u.flush(),a);return c.cancel=u.cancel,c.flush=d,c}function Km(t,e=0,n={}){typeof n!="object"&&(n={});const{leading:i=!0,trailing:r=!0}=n;return ml(t,e,{leading:i,trailing:r,maxWait:e})}function OM(t){if(t==null)return"";if(typeof t=="string")return t;if(Array.isArray(t))return t.map(OM).join(",");const e=String(t);return e==="0"&&Object.is(Number(t),-0)?"-0":e}function GB(t){if(!t||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null?Object.prototype.toString.call(t)==="[object Object]":!1}function DK(t,e,n){return yp(t,e,void 0,void 0,void 0,void 0,n)}function yp(t,e,n,i,r,o,s){const a=s(t,e,n,i,r,o);if(a!==void 0)return a;if(typeof t==typeof e)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return t===e;case"number":return t===e||Object.is(t,e);case"function":return t===e;case"object":return Jp(t,e,o,s)}return Jp(t,e,o,s)}function Jp(t,e,n,i){if(Object.is(t,e))return!0;let r=Wm(t),o=Wm(e);if(r===jm&&(r=Xp),o===jm&&(o=Xp),r!==o)return!1;switch(r){case qm:return t.toString()===e.toString();case l0:{const l=t.valueOf(),u=e.valueOf();return eb(l,u)}case u0:case sS:case oS:return Object.is(t.valueOf(),e.valueOf());case rS:return t.source===e.source&&t.flags===e.flags;case GPe:return t===e}n=n??new Map;const s=n.get(t),a=n.get(e);if(s!=null&&a!=null)return s===e;n.set(t,e),n.set(e,t);try{switch(r){case aS:{if(t.size!==e.size)return!1;for(const[l,u]of t.entries())if(!e.has(l)||!yp(u,e.get(l),l,t,e,n,i))return!1;return!0}case lS:{if(t.size!==e.size)return!1;const l=Array.from(t.values()),u=Array.from(e.values());for(let c=0;c<l.length;c++){const d=l[c],f=u.findIndex(h=>yp(d,h,void 0,t,e,n,i));if(f===-1)return!1;u.splice(f,1)}return!0}case CM:case SM:case kM:case TM:case EM:case XPe:case xM:case AM:case PM:case JPe:case IM:case RM:{if(typeof Buffer<"u"&&Buffer.isBuffer(t)!==Buffer.isBuffer(e)||t.length!==e.length)return!1;for(let l=0;l<t.length;l++)if(!yp(t[l],e[l],l,t,e,n,i))return!1;return!0}case uS:return t.byteLength!==e.byteLength?!1:Jp(new Uint8Array(t),new Uint8Array(e),n,i);case cS:return t.byteLength!==e.byteLength||t.byteOffset!==e.byteOffset?!1:Jp(new Uint8Array(t),new Uint8Array(e),n,i);case YPe:return t.name===e.name&&t.message===e.message;case Xp:{if(!(Jp(t.constructor,e.constructor,n,i)||GB(t)&&GB(e)))return!1;const u=[...Object.keys(t),...i1(t)],c=[...Object.keys(e),...i1(e)];if(u.length!==c.length)return!1;for(let d=0;d<u.length;d++){const f=u[d],h=t[f];if(!Object.hasOwn(e,f))return!1;const m=e[f];if(!yp(h,m,f,t,e,n,i))return!1}return!0}default:return!1}}finally{n.delete(t),n.delete(e)}}function NK(){}function r1(t,e){return DK(t,e,NK)}function pIe(t){return typeof Buffer<"u"&&Buffer.isBuffer(t)}function vIe(t){const e=t?.constructor,n=typeof e=="function"?e.prototype:Object.prototype;return t===n}function LM(t){return MM(t)}function bIe(t,e){if(t=lIe(t),t<1||!Number.isSafeInteger(t))return[];const n=new Array(t);for(let i=0;i<t;i++)n[i]=typeof e=="function"?e(i):i;return n}function yIe(t){if(t==null)return[];switch(typeof t){case"object":case"function":return zPe(t)?_Ie(t):vIe(t)?wIe(t):o1(t);default:return o1(Object(t))}}function o1(t){const e=[];for(const n in t)e.push(n);return e}function wIe(t){return o1(t).filter(n=>n!=="constructor")}function _Ie(t){const e=bIe(t.length,i=>`${i}`),n=new Set(e);return pIe(t)&&(n.add("offset"),n.add("parent")),LM(t)&&(n.add("buffer"),n.add("byteLength"),n.add("byteOffset")),[...e,...o1(t).filter(i=>!n.has(i))]}function BK(t,...e){for(let n=0;n<e.length;n++)CIe(t,e[n]);return t}function CIe(t,e){const n=yIe(e);for(let i=0;i<n.length;i++){const r=n[i];(!(r in t)||!eb(t[r],e[r]))&&(t[r]=e[r])}}function SIe(t){if(a0(t))return t;const e=Wm(t);if(!kIe(t))return{};if(fIe(t)){const i=Array.from(t);return t.length>0&&typeof t[0]=="string"&&Object.hasOwn(t,"index")&&(i.index=t.index,i.input=t.input),i}if(LM(t)){const i=t,r=i.constructor;return new r(i.buffer,i.byteOffset,i.length)}if(e===uS)return new ArrayBuffer(t.byteLength);if(e===cS){const i=t,r=i.buffer,o=i.byteOffset,s=i.byteLength,a=new ArrayBuffer(s),l=new Uint8Array(r,o,s);return new Uint8Array(a).set(l),new DataView(a)}if(e===u0||e===l0||e===qm){const i=t.constructor,r=new i(t.valueOf());return e===qm?EIe(r,t):CT(r,t),r}if(e===sS)return new Date(Number(t));if(e===rS){const i=t,r=new RegExp(i.source,i.flags);return r.lastIndex=i.lastIndex,r}if(e===oS)return Object(Symbol.prototype.valueOf.call(t));if(e===aS){const i=t,r=new Map;return i.forEach((o,s)=>{r.set(s,o)}),r}if(e===lS){const i=t,r=new Set;return i.forEach(o=>{r.add(o)}),r}if(e===jm){const i=t,r={};return CT(r,i),r.length=i.length,r[Symbol.iterator]=i[Symbol.iterator],r}const n={};return xIe(n,t),CT(n,t),TIe(n,t),n}function kIe(t){switch(Wm(t)){case jm:case CM:case uS:case cS:case u0:case sS:case IM:case RM:case xM:case AM:case PM:case aS:case l0:case Xp:case rS:case lS:case qm:case oS:case SM:case kM:case TM:case EM:return!0;default:return!1}}function CT(t,e){for(const n in e)Object.hasOwn(e,n)&&(t[n]=e[n])}function TIe(t,e){const n=Object.getOwnPropertySymbols(e);for(let i=0;i<n.length;i++){const r=n[i];Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}}function EIe(t,e){const n=e.valueOf().length;for(const i in e)Object.hasOwn(e,i)&&(Number.isNaN(Number(i))||Number(i)>=n)&&(t[i]=e[i])}function xIe(t,e){const n=Object.getPrototypeOf(e);n!==null&&typeof e.constructor=="function"&&Object.setPrototypeOf(t,n)}function Wa(t){if(typeof t!="object"||t==null)return!1;if(Object.getPrototypeOf(t)===null)return!0;if(Object.prototype.toString.call(t)!=="[object Object]"){const n=t[Symbol.toStringTag];return n==null||!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable?!1:t.toString()===`[object ${n}]`}let e=t;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function AIe(t,e){const n={},i=Object.keys(t);for(let r=0;r<i.length;r++){const o=i[r],s=t[o];n[o]=e(s,o,t)}return n}function PIe(t,e=PK){return t==null?{}:AIe(t,oIe(e))}function IIe(t){if(a0(t))return t;if(Array.isArray(t)||MM(t)||t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t),n=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new n(t);if(t instanceof RegExp){const i=new n(t);return i.lastIndex=t.lastIndex,i}if(t instanceof DataView)return new n(t.buffer.slice(0));if(t instanceof Error){const i=new n(t.message);return i.stack=t.stack,i.name=t.name,i.cause=t.cause,i}if(typeof File<"u"&&t instanceof File)return new n([t],t.name,{type:t.type,lastModified:t.lastModified});if(typeof t=="object"){const i=Object.create(e);return Object.assign(i,t)}return t}function RIe(t,...e){const n=e.slice(0,-1),i=e[e.length-1];let r=t;for(let o=0;o<n.length;o++){const s=n[o];r=Yw(r,s,i,new Map)}return r}function Yw(t,e,n,i){if(a0(t)&&(t=Object(t)),e==null||typeof e!="object")return t;if(i.has(e))return IIe(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let o=0;o<e.length;o++)e[o]=e[o]??void 0}const r=[...Object.keys(e),...i1(e)];for(let o=0;o<r.length;o++){const s=r[o];if(Qv(s))continue;let a=e[s],l=t[s];if(mA(a)&&(a={...a}),mA(l)&&(l={...l}),typeof Buffer<"u"&&Buffer.isBuffer(a)&&(a=Bo(a)),Array.isArray(a))if(typeof l=="object"&&l!=null){const c=[],d=Reflect.ownKeys(l);for(let f=0;f<d.length;f++){const h=d[f];c[h]=l[h]}l=c}else l=[];const u=n(l,a,s,t,e,i);u!=null?t[s]=u:Array.isArray(a)||gA(l)&&gA(a)?t[s]=Yw(l,a,n,i):l==null&&Wa(a)?t[s]=Yw({},a,n,i):l==null&&LM(a)?t[s]=Bo(a):(l===void 0||a!==void 0)&&(t[s]=a)}return t}function DM(t,...e){return RIe(t,...e,NK)}function s1(t){return typeof t=="function"}function Rc(t){return gA(t)&&t.nodeType===1&&!Wa(t)}function YB(t,e){if(!Number.isInteger(t)||t<0)throw new Error("n must be a non-negative integer.");let n=0;return(...i)=>{if(++n>=t)return e(...i)}}function pA(t,e,n){return typeof n!="function"&&(n=()=>{}),DK(t,e,(...i)=>{const r=n(...i);if(r!==void 0)return!!r;if(t instanceof Map&&e instanceof Map||t instanceof Set&&e instanceof Set)return pA(Array.from(t),Array.from(e),YB(2,n))})}function MIe(t){return t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&")}function OIe(t){return MIe(OM(t))}function LIe(t){return t.substring(0,1).toUpperCase()+t.substring(1)}function DIe(t){return LIe(OM(t))}let Qe;try{Qe={window,document}}catch{Qe={window:{},document:{}}}function NIe(){try{return navigator.userAgent.toLowerCase()}catch{return""}}const od=NIe(),vt={isMac:VK(od),isWindows:BIe(od),isGecko:VIe(od),isSafari:FIe(od),isiOS:$Ie(od),isAndroid:zIe(od),isBlink:HIe(od),get isMediaForcedColors(){return WIe()},features:{isRegExpUnicodePropertySupported:UIe()}};function VK(t){return t.indexOf("macintosh")>-1}function BIe(t){return t.indexOf("windows")>-1}function VIe(t){return!!t.match(/gecko\/\d+/)}function FIe(t){return t.indexOf(" applewebkit/")>-1&&t.indexOf("chrome")===-1}function $Ie(t){return!!t.match(/iphone|ipad/i)||VK(t)&&navigator.maxTouchPoints>0}function zIe(t){return t.indexOf("android")>-1}function HIe(t){return t.indexOf("chrome/")>-1&&t.indexOf("edge/")<0}function UIe(){let t=!1;try{t="ć".search(new RegExp("[\\p{L}]","u"))===0}catch{}return t}function WIe(){return Qe.window.matchMedia?Qe.window.matchMedia("(forced-colors: active)").matches:!1}function FK(t,e,n,i){n=n||function(l,u){return l===u};const r=Array.isArray(t)?t:Array.prototype.slice.call(t),o=Array.isArray(e)?e:Array.prototype.slice.call(e),s=qIe(r,o,n);return i?KIe(s,o.length):jIe(o,s)}function qIe(t,e,n){const i=XB(t,e,n);if(i===-1)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const r=JB(t,i),o=JB(e,i),s=XB(r,o,n),a=t.length-s,l=e.length-s;return{firstIndex:i,lastIndexOld:a,lastIndexNew:l}}function XB(t,e,n){for(let i=0;i<Math.max(t.length,e.length);i++)if(t[i]===void 0||e[i]===void 0||!n(t[i],e[i]))return i;return-1}function JB(t,e){return t.slice(e).reverse()}function jIe(t,e){const n=[],{firstIndex:i,lastIndexOld:r,lastIndexNew:o}=e;return o-i>0&&n.push({index:i,type:"insert",values:t.slice(i,o)}),r-i>0&&n.push({index:i+(o-i),type:"delete",howMany:r-i}),n}function KIe(t,e){const{firstIndex:n,lastIndexOld:i,lastIndexNew:r}=t;if(n===-1)return Array(e).fill("equal");let o=[];return n>0&&(o=o.concat(Array(n).fill("equal"))),r-n>0&&(o=o.concat(Array(r-n).fill("insert"))),i-n>0&&(o=o.concat(Array(i-n).fill("delete"))),r<e&&(o=o.concat(Array(e-r).fill("equal"))),o}function fm(t,e,n){n=n||function(g,v){return g===v};const i=t.length,r=e.length;if(i>200||r>200||i+r>300)return fm.fastDiff(t,e,n,!0);let o,s;if(r<i){const g=t;t=e,e=g,o="delete",s="insert"}else o="insert",s="delete";const a=t.length,l=e.length,u=l-a,c={},d={};function f(g){const v=(d[g-1]!==void 0?d[g-1]:-1)+1,p=d[g+1]!==void 0?d[g+1]:-1,b=v>p?-1:1;c[g+b]&&(c[g]=c[g+b].slice(0)),c[g]||(c[g]=[]),c[g].push(v>p?o:s);let y=Math.max(v,p),_=y-g;for(;_<a&&y<l&&n(t[_],e[y]);)_++,y++,c[g].push("equal");return y}let h=0,m;do{for(m=-h;m<u;m++)d[m]=f(m);for(m=u+h;m>u;m--)d[m]=f(m);d[u]=f(u),h++}while(d[u]!==l);return c[u].slice(1)}fm.fastDiff=FK;function ZB(){return function t(){t.called=!0}}class pu{source;name;path;stop;off;return;constructor(e,n){this.source=e,this.name=n,this.path=[],this.stop=ZB(),this.off=ZB()}}const xr=new Array(256).fill("").map((t,e)=>("0"+e.toString(16)).slice(-2));function Ur(){const[t,e,n,i]=crypto.getRandomValues(new Uint32Array(4));return"e"+xr[t>>0&255]+xr[t>>8&255]+xr[t>>16&255]+xr[t>>24&255]+xr[e>>0&255]+xr[e>>8&255]+xr[e>>16&255]+xr[e>>24&255]+xr[n>>0&255]+xr[n>>8&255]+xr[n>>16&255]+xr[n>>24&255]+xr[i>>0&255]+xr[i>>8&255]+xr[i>>16&255]+xr[i>>24&255]}const ou={get(t="normal"){return typeof t!="number"?this[t]||this.normal:t},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};function $K(t,e){const n=ou.get(e.priority);let i=0,r=t.length;for(;i<r;){const o=i+r>>1;ou.get(t[o].priority)<n?r=o:i=o+1}t.splice(i,0,e)}const GIe="https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html";class oe extends Error{context;data;constructor(e,n,i,r){super(XIe(e,i,r)),this.name="CKEditorError",this.context=n,this.data=i,r&&(this.stack=r.stack)}is(e){return e==="CKEditorError"}static rethrowUnexpectedError(e,n){throw e.is&&e.is("CKEditorError")?e:new oe("unexpected-error",n,void 0,e)}}function hn(t,e){console.warn(...HK(t,e))}function YIe(t,e){console.error(...HK(t,e))}function zK(t){return`
Read more: ${GIe}#error-${t}`}function XIe(t,e,n){const i=new WeakSet,o=e?` ${JSON.stringify(e,(l,u)=>{if(typeof u=="object"&&u!==null){if(i.has(u))return`[object ${u.constructor.name}]`;i.add(u)}return u})}`:"",s=zK(t),a=n?`
Original error: ${n.name}: ${n.message}`:"";return t+o+s+a}function HK(t,e){const n=zK(t);return e?[t,e,n]:[t,n]}const JIe="47.5.0",ZIe=new Date(2026,1,11);if(globalThis.CKEDITOR_VERSION)throw new oe("ckeditor-duplicated-modules",null);globalThis.CKEDITOR_VERSION=JIe;const Nh=Symbol("listeningTo"),vA=Symbol("emitterId"),Rl=Symbol("delegations"),QIe=Fn(Object);function Fn(t){if(!t)return QIe;class e extends t{on(i,r,o){this.listenTo(this,i,r,o)}once(i,r,o){let s=!1;const a=(l,...u)=>{s||(s=!0,l.off(),r.call(this,l,...u))};this.listenTo(this,i,a,o)}off(i,r){this.stopListening(this,i,r)}listenTo(i,r,o,s={}){let a,l;this[Nh]||(this[Nh]={});const u=this[Nh];ST(i)||UK(i);const c=ST(i);(a=u[c])||(a=u[c]={emitter:i,callbacks:{}}),(l=a.callbacks[r])||(l=a.callbacks[r]=[]),l.push(o),rRe(this,i,r,o,s)}stopListening(i,r,o){const s=this[Nh];let a=i&&ST(i);const l=s&&a?s[a]:void 0,u=l&&r?l.callbacks[r]:void 0;if(!(!s||i&&!l||r&&!u))if(o)kT(this,i,r,o),u.indexOf(o)!==-1&&(u.length===1?delete l.callbacks[r]:kT(this,i,r,o));else if(u){for(;o=u.pop();)kT(this,i,r,o);delete l.callbacks[r]}else if(l){for(r in l.callbacks)this.stopListening(i,r);delete s[a]}else{for(a in s)this.stopListening(s[a].emitter);delete this[Nh]}}fire(i,...r){try{const o=i instanceof pu?i:new pu(this,i),s=o.name;let a=iRe(this,s);if(o.path.push(this),a){a=a.slice();for(let u=0;u<a.length;u++){const c=a[u].callback;if(c.call(this,o,...r),o.off.called&&(delete o.off.called,this._removeEventListener(s,c)),o.stop.called)break}}const l=this[Rl];if(l){const u=l.get(s),c=l.get("*");u&&QB(u,o,r),c&&QB(c,o,r)}return o.return}catch(o){oe.rethrowUnexpectedError(o,this)}}delegate(...i){return{to:(r,o)=>{this[Rl]||(this[Rl]=new Map),i.forEach(s=>{const a=this[Rl].get(s);a?a.set(r,o):this[Rl].set(s,new Map([[r,o]]))})}}}stopDelegating(i,r){if(this[Rl])if(!i)this[Rl].clear();else if(!r)this[Rl].delete(i);else{const o=this[Rl].get(i);o&&o.delete(r)}}_addEventListener(i,r,o){nRe(this,i);const s=bA(this,i),a=ou.get(o.priority),l={callback:r,priority:a};for(const u of s)$K(u,l)}_removeEventListener(i,r){const o=bA(this,i);for(const s of o)for(let a=0;a<s.length;a++)s[a].callback==r&&(s.splice(a,1),a--)}}return e}function eRe(t,e){const n=t[Nh];return n&&n[e]?n[e].emitter:null}function UK(t,e){t[vA]||(t[vA]=e||Ur())}function ST(t){return t[vA]}function WK(t){return t._events||Object.defineProperty(t,"_events",{value:{}}),t._events}function tRe(){return{callbacks:[],childEvents:[]}}function nRe(t,e){const n=WK(t);if(n[e])return;let i=e,r=null;const o=[];for(;i!==""&&!n[i];)n[i]=tRe(),o.push(n[i]),r&&n[i].childEvents.push(r),r=i,i=i.substr(0,i.lastIndexOf(":"));if(i!==""){for(const s of o)s.callbacks=n[i].callbacks.slice();n[i].childEvents.push(r)}}function bA(t,e){const n=WK(t)[e];if(!n)return[];let i=[n.callbacks];for(let r=0;r<n.childEvents.length;r++){const o=bA(t,n.childEvents[r]);i=i.concat(o)}return i}function iRe(t,e){if(!t._events)return null;let n=e;do{const i=t._events[n];if(i&&i.callbacks&&i.callbacks.length)return i.callbacks;const r=n.lastIndexOf(":");n=r>-1?n.substring(0,r):""}while(n);return null}function QB(t,e,n){for(let[i,r]of t){r?typeof r=="function"&&(r=r(e.name)):r=e.name;const o=new pu(e.source,r);o.path=[...e.path],i.fire(o,...n)}}function rRe(t,e,n,i,r){e._addEventListener?e._addEventListener(n,i,r):t._addEventListener.call(e,n,i,r)}function kT(t,e,n,i){e._removeEventListener?e._removeEventListener(n,i):t._removeEventListener.call(e,n,i)}const Zp=Symbol("observableProperties"),tb=Symbol("boundObservables"),Qp=Symbol("boundProperties"),sd=Symbol("decoratedMethods"),e4=Symbol("decoratedOriginal"),oRe=Ln(Fn());function Ln(t){if(!t)return oRe;class e extends t{set(i,r){if(so(i)){Object.keys(i).forEach(s=>{this.set(s,i[s])},this);return}TT(this);const o=this[Zp];if(i in this&&!o.has(i))throw new oe("observable-set-cannot-override",this);Object.defineProperty(this,i,{enumerable:!0,configurable:!0,get(){return o.get(i)},set(s){const a=o.get(i);let l=this.fire(`set:${i}`,i,s,a);l===void 0&&(l=s),(a!==l||!o.has(i))&&(o.set(i,l),this.fire(`change:${i}`,i,l,a))}}),this[i]=r}bind(...i){if(!i.length||!t4(i))throw new oe("observable-bind-wrong-properties",this);if(new Set(i).size!==i.length)throw new oe("observable-bind-duplicate-properties",this);TT(this);const r=this[Qp];i.forEach(s=>{if(r.has(s))throw new oe("observable-bind-rebind",this)});const o=new Map;return i.forEach(s=>{const a={property:s,to:[]};r.set(s,a),o.set(s,a)}),{to:sRe,toMany:aRe,_observable:this,_bindProperties:i,_to:[],_bindings:o}}unbind(...i){if(!this[Zp])return;const r=this[Qp],o=this[tb];if(i.length){if(!t4(i))throw new oe("observable-unbind-wrong-properties",this);i.forEach(s=>{const a=r.get(s);a&&(a.to.forEach(([l,u])=>{const c=o.get(l),d=c[u];d.delete(a),d.size||delete c[u],Object.keys(c).length||(o.delete(l),this.stopListening(l,"change"))}),r.delete(s))})}else o.forEach((s,a)=>{this.stopListening(a,"change")}),o.clear(),r.clear()}decorate(i){TT(this);const r=this[i];if(!r)throw new oe("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:i});this.on(i,(o,s)=>{o.return=r.apply(this,s)}),this[i]=function(...o){return this.fire(i,o)},this[i][e4]=r,this[sd]||(this[sd]=[]),this[sd].push(i)}stopListening(i,r,o){if(!i&&this[sd]){for(const s of this[sd])this[s]=this[s][e4];delete this[sd]}super.stopListening(i,r,o)}[Zp];[sd];[Qp];[tb]}return e}function TT(t){t[Zp]||(Object.defineProperty(t,Zp,{value:new Map}),Object.defineProperty(t,tb,{value:new Map}),Object.defineProperty(t,Qp,{value:new Map}))}function sRe(...t){const e=uRe(...t),n=Array.from(this._bindings.keys()),i=n.length;if(!e.callback&&e.to.length>1)throw new oe("observable-bind-to-no-callback",this);if(i>1&&e.callback)throw new oe("observable-bind-to-extra-callback",this);e.to.forEach(r=>{if(r.properties.length&&r.properties.length!==i)throw new oe("observable-bind-to-properties-length",this);r.properties.length||(r.properties=this._bindProperties)}),this._to=e.to,e.callback&&(this._bindings.get(n[0]).callback=e.callback),fRe(this._observable,this._to),dRe(this),this._bindProperties.forEach(r=>{qK(this._observable,r)})}function aRe(t,e,n){if(this._bindings.size>1)throw new oe("observable-bind-to-many-not-one-binding",this);this.to(...lRe(t,e),n)}function lRe(t,e){const n=t.map(i=>[i,e]);return Array.prototype.concat.apply([],n)}function t4(t){return t.every(e=>typeof e=="string")}function uRe(...t){if(!t.length)throw new oe("observable-bind-to-parse-error",null);const e={to:[]};let n;return typeof t[t.length-1]=="function"&&(e.callback=t.pop()),t.forEach(i=>{if(typeof i=="string")n.properties.push(i);else if(typeof i=="object")n={observable:i,properties:[]},e.to.push(n);else throw new oe("observable-bind-to-parse-error",null)}),e}function cRe(t,e,n,i){const r=t[tb],o=r.get(n),s=o||{};s[i]||(s[i]=new Set),s[i].add(e),o||r.set(n,s)}function dRe(t){let e;t._bindings.forEach((n,i)=>{t._to.forEach(r=>{e=r.properties[n.callback?0:t._bindProperties.indexOf(i)],n.to.push([r.observable,e]),cRe(t._observable,n,r.observable,e)})})}function qK(t,e){const i=t[Qp].get(e);let r;i.callback?r=i.callback.apply(t,i.to.map(o=>o[0][o[1]])):(r=i.to[0],r=r[0][r[1]]),Object.prototype.hasOwnProperty.call(t,e)?t[e]=r:t.set(e,r)}function fRe(t,e){e.forEach(n=>{const i=t[tb];let r;i.get(n.observable)||t.listenTo(n.observable,"change",(o,s)=>{r=i.get(n.observable)[s],r&&r.forEach(a=>{qK(t,a.property)})})})}class jK{_replacedElements;constructor(){this._replacedElements=[]}replace(e,n){this._replacedElements.push({element:e,newElement:n}),e.style.display="none",n&&e.parentNode.insertBefore(n,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:n})=>{e.style.display="",n&&n.remove()}),this._replacedElements=[]}}function yA(t){let e=0;for(const n of t)e++;return e}function ur(t,e){const n=Math.min(t.length,e.length);for(let i=0;i<n;i++)if(t[i]!=e[i])return i;return t.length==e.length?"same":t.length<e.length?"prefix":"extension"}function us(t){return!!(t&&t[Symbol.iterator])}function Ko(t,e,n={},i=[]){const r=n&&n.xmlns,o=r?t.createElementNS(r,e):t.createElement(e);for(const s in n)o.setAttribute(s,n[s]);(KB(i)||!us(i))&&(i=[i]);for(let s of i)KB(s)&&(s=t.createTextNode(s)),o.appendChild(s);return o}class KK{_config;constructor(e,n){this._config=Object.create(null),n&&this.define(n4(n)),e&&this._setObjectToTarget(this._config,e)}set(e,n){this._setToTarget(this._config,e,n)}define(e,n){this._setToTarget(this._config,e,n,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,n,i,r=!1){if(Wa(n)){this._setObjectToTarget(e,n,r);return}const o=n.split(".");n=o.pop();for(const s of o)Wa(e[s])||(e[s]=Object.create(null)),e=e[s];if(Wa(i)){Wa(e[n])||(e[n]=Object.create(null)),e=e[n],this._setObjectToTarget(e,i,r);return}r&&typeof e[n]<"u"||(e[n]=i)}_getFromSource(e,n){const i=n.split(".");n=i.pop();for(const r of i){if(!Wa(e[r])){e=null;break}e=e[r]}return e?n4(e[n]):void 0}_setObjectToTarget(e,n,i){Object.keys(n).forEach(r=>{this._setToTarget(e,r,n[r],i)})}}function n4(t){return dS(t,hRe)}function hRe(t){return Rc(t)||typeof t=="function"?t:void 0}function Mc(t){if(t){if(t.defaultView)return t instanceof t.defaultView.Document;if(t.ownerDocument&&t.ownerDocument.defaultView)return t instanceof t.ownerDocument.defaultView.Node}return!1}function a1(t){const e=Object.prototype.toString.apply(t);return e=="[object Window]"||e=="[object global]"}const mRe=zo(Fn());function zo(t){if(!t)return mRe;class e extends t{listenTo(i,r,o,s={}){if(Mc(i)||a1(i)||i instanceof Qe.window.EventTarget){const a={capture:!!s.useCapture,passive:!!s.usePassive},l=this._getProxyEmitter(i,a)||new gRe(i,a);this.listenTo(l,r,o,s)}else super.listenTo(i,r,o,s)}stopListening(i,r,o){if(Mc(i)||a1(i)||i instanceof Qe.window.EventTarget){const s=this._getAllProxyEmitters(i);for(const a of s)this.stopListening(a,r,o)}else super.stopListening(i,r,o)}_getProxyEmitter(i,r){return eRe(this,GK(i,r))}_getAllProxyEmitters(i){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(r=>this._getProxyEmitter(i,r)).filter(r=>!!r)}}return e}class gRe extends Fn(){_domNode;_options;constructor(e,n){super(),UK(this,GK(e,n)),this._domNode=e,this._options=n}_domListeners;attach(e){if(this._domListeners&&this._domListeners[e])return;const n=this._createDomListener(e);this._domNode.addEventListener(e,n,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=n}detach(e){let n;this._domListeners[e]&&(!(n=this._events[e])||!n.callbacks.length)&&this._domListeners[e].removeListener()}_addEventListener(e,n,i){this.attach(e),Fn().prototype._addEventListener.call(this,e,n,i)}_removeEventListener(e,n){Fn().prototype._removeEventListener.call(this,e,n),this.detach(e)}_createDomListener(e){const n=i=>{this.fire(e,i)};return n.removeListener=()=>{this._domNode.removeEventListener(e,n,this._options),delete this._domListeners[e]},n}}function pRe(t){return t["data-ck-expando"]||(t["data-ck-expando"]=Ur())}function GK(t,e){let n=pRe(t);for(const i of Object.keys(e).sort())e[i]&&(n+="-"+i);return n}function vRe(t){const e=[];let n=t;for(;n&&n.nodeType!=Node.DOCUMENT_NODE;)e.unshift(n),n=n.parentNode;return e}function bRe(t){return t instanceof HTMLTextAreaElement?t.value:t.innerHTML}function YK(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}function XK(t){if(!t.target)return null;const e=t.target.ownerDocument,n=t.clientX,i=t.clientY;let r=null;return e.caretRangeFromPoint&&e.caretRangeFromPoint(n,i)?r=e.caretRangeFromPoint(n,i):t.rangeParent&&(r=e.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0)),r}function JK(t){return!t||!t.parentNode||t.offsetParent===Qe.document.body?null:t.offsetParent}function fi(t){return Object.prototype.toString.call(t)=="[object Text]"}function fS(t){return Object.prototype.toString.apply(t)=="[object Range]"}const ZK=["top","right","bottom","left","width","height"],yRe=new Set(["relative","absolute","fixed","sticky"]);let Wt=class Bl{top;right;bottom;left;width;height;_source;constructor(e){const n=fS(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),wA(e)||n)if(n){const i=Bl.getDomRangeRects(e);ey(this,Bl.getBoundingRect(i))}else ey(this,e.getBoundingClientRect());else if(a1(e)){const{innerWidth:i,innerHeight:r}=e;ey(this,{top:0,right:i,bottom:r,left:0,width:i,height:r})}else ey(this,e)}clone(){return new Bl(this)}moveTo(e,n){return this.top=n,this.right=e+this.width,this.bottom=n+this.height,this.left=e,this}moveBy(e,n){return this.top+=n,this.right+=e,this.left+=e,this.bottom+=n,this}getIntersection(e){const n={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};if(n.width=n.right-n.left,n.height=n.bottom-n.top,n.width<0||n.height<0)return null;{const i=new Bl(n);return i._source=this._source,i}}getIntersectionArea(e){const n=this.getIntersection(e);return n?n.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let n=this.clone();if(i4(e))return n;let i=e,r=e.parentNode||e.commonAncestorContainer,o;for(;r&&!i4(r);){const s=wRe(r)==="visible";if(r4(i)&&(o=i),s||o&&QK(o)==="absolute"&&!r4(r)){i=r,r=r.parentNode;continue}const a=new Bl(r),l=n.getIntersection(a);if(l)l.getArea()<n.getArea()&&(n=l);else return null;i=r,r=r.parentNode}return n}isEqual(e){for(const n of ZK)if(this[n]!==e[n])return!1;return!0}contains(e){const n=this.getIntersection(e);return!!(n&&n.isEqual(e))}toAbsoluteRect(){const{scrollX:e,scrollY:n}=Qe.window,i=this.clone().moveBy(e,n);if(wA(i._source)){const r=JK(i._source);r&&_Re(i,r)}return i}excludeScrollbarsAndBorders(){const e=this._source;let n,i,r;if(a1(e))n=e.innerWidth-e.document.documentElement.clientWidth,i=e.innerHeight-e.document.documentElement.clientHeight,r=e.getComputedStyle(e.document.documentElement).direction;else{const o=YK(e);n=e.offsetWidth-e.clientWidth-o.left-o.right,i=e.offsetHeight-e.clientHeight-o.top-o.bottom,r=e.ownerDocument.defaultView.getComputedStyle(e).direction,this.left+=o.left,this.top+=o.top,this.right-=o.right,this.bottom-=o.bottom,this.width=this.right-this.left,this.height=this.bottom-this.top}return this.width-=n,r==="ltr"?this.right-=n:this.left+=n,this.height-=i,this.bottom-=i,this}static getDomRangeRects(e){const n=[],i=Array.from(e.getClientRects());if(i.length)for(const r of i){const o=new Bl(r);o._source=e,n.push(o)}else{let r=e.startContainer;fi(r)&&(r=r.parentNode);const o=new Bl(r.getBoundingClientRect());o.right=o.left,o.width=0,n.push(o)}return n}static getBoundingRect(e){const n={left:Number.POSITIVE_INFINITY,top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,width:0,height:0};let i=0;for(const r of e)i++,n.left=Math.min(n.left,r.left),n.top=Math.min(n.top,r.top),n.right=Math.max(n.right,r.right),n.bottom=Math.max(n.bottom,r.bottom);return i==0?null:(n.width=n.right-n.left,n.height=n.bottom-n.top,new Bl(n))}};function ey(t,e){for(const n of ZK)t[n]=e[n]}function i4(t){return wA(t)?t===t.ownerDocument.body:!1}function wA(t){return t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.getBoundingClientRect=="function"}function QK(t){return t.ownerDocument.defaultView.getComputedStyle(t).position}function wRe(t){return t instanceof HTMLElement?t.ownerDocument.defaultView.getComputedStyle(t).overflow:"visible"}function r4(t){return t instanceof HTMLElement&&yRe.has(QK(t))}function _Re(t,e){const n=new Wt(e),i=YK(e);let r=0,o=0;r-=n.left,o-=n.top,r+=e.scrollLeft,o+=e.scrollTop,r-=i.left,o-=i.top,t.moveBy(r,o)}let NM=class Ni{_element;_callback;static _observerInstance=null;static _elementCallbacks=null;constructor(e,n){Ni._observerInstance||Ni._createObserver(),this._element=e,this._callback=n,Ni._addElementCallback(e,n),Ni._observerInstance.observe(e)}get element(){return this._element}destroy(){Ni._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,n){Ni._elementCallbacks||(Ni._elementCallbacks=new Map);let i=Ni._elementCallbacks.get(e);i||(i=new Set,Ni._elementCallbacks.set(e,i)),i.add(n)}static _deleteElementCallback(e,n){const i=Ni._getElementCallbacks(e);i&&(i.delete(n),i.size||(Ni._elementCallbacks.delete(e),Ni._observerInstance.unobserve(e))),Ni._elementCallbacks&&!Ni._elementCallbacks.size&&(Ni._observerInstance=null,Ni._elementCallbacks=null)}static _getElementCallbacks(e){return Ni._elementCallbacks?Ni._elementCallbacks.get(e):null}static _createObserver(){Ni._observerInstance=new Qe.window.ResizeObserver(e=>{for(const n of e){const i=Ni._getElementCallbacks(n.target);if(i)for(const r of i)r(n)}})}};function o4(t,e){t instanceof HTMLTextAreaElement&&(t.value=e),t.innerHTML=e}function gg(t){return e=>e+t}function jh(t){let e=0;for(;t.previousSibling;)t=t.previousSibling,e++;return e}function eG(t,e,n){t.insertBefore(n,t.childNodes[e]||null)}function ev(t){return t&&t.nodeType===Node.COMMENT_NODE}function CRe(t){try{Qe.document.createAttribute(t)}catch{return!1}return!0}function vu(t){return t?fi(t)?vu(t.parentElement):t.getClientRects?!!t.getClientRects().length:!1:!1}function BM({element:t,target:e,positions:n,limiter:i,fitInViewport:r,viewportOffsetConfig:o}){s1(e)&&(e=e()),s1(i)&&(i=i());const s=JK(t),a=tG(o),l=new Wt(t),u=s4(e,a);let c;if(!u||!a.getIntersection(u))return null;const d={targetRect:u,elementRect:l,positionedElementAncestor:s,viewportRect:a};if(!i&&!r)c=new nG(n[0],d);else{if(i){const f=s4(i,a);f&&(d.limiterRect=f)}c=SRe(n,d)}return c}function s4(t,e){const n=new Wt(t).getVisible();return n?n.getIntersection(e):null}function tG(t){t=Object.assign({top:0,bottom:0,left:0,right:0},t);const e=new Wt(Qe.window);return e.top+=t.top,e.height-=t.top,e.bottom-=t.bottom,e.height-=t.bottom,e.left+=t.left,e.right-=t.right,e.width-=t.left+t.right,e}function SRe(t,e){const{elementRect:n}=e,i=n.getArea(),r=t.map(a=>new nG(a,e)).filter(a=>!!a.name);let o=0,s=null;for(const a of r){const{limiterIntersectionArea:l,viewportIntersectionArea:u}=a;if(l===i)return a;const c=u**2+l**2;c>o&&(o=c,s=a)}return s}class nG{name;config;_positioningFunctionCoordinates;_options;_cachedRect;_cachedAbsoluteRect;constructor(e,n){const i=e(n.targetRect,n.elementRect,n.viewportRect,n.limiterRect);if(!i)return;const{left:r,top:o,name:s,config:a}=i;this.name=s,this.config=a,this._positioningFunctionCoordinates={left:r,top:o},this._options=n}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;return e?e.getIntersectionArea(this._rect):0}get viewportIntersectionArea(){return this._options.viewportRect.getIntersectionArea(this._rect)}get _rect(){return this._cachedRect?this._cachedRect:(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCoordinates.left,this._positioningFunctionCoordinates.top),this._cachedRect)}get _absoluteRect(){return this._cachedAbsoluteRect?this._cachedAbsoluteRect:(this._cachedAbsoluteRect=this._rect.toAbsoluteRect(),this._cachedAbsoluteRect)}}function a4(t){const e=t.parentNode;e&&e.removeChild(t)}function Xw(){const t=Qe.window.visualViewport;if(!t||!(vt.isiOS||vt.isSafari))return{left:0,top:0};const e=Math.max(Math.round(t.offsetLeft),0),n=Math.max(Math.round(t.offsetTop),0);return{left:e,top:n}}function kRe({target:t,viewportOffset:e=0,ancestorOffset:n=0,alignToTop:i,forceScroll:r}){const o=VM(t);let s=o,a=null;for(e=xRe(e);s;){let l;s==o?l=l4(t):l=l4(a),ERe({parent:l,getRect:()=>ET(t,s),alignToTop:i,ancestorOffset:n,forceScroll:r});let u=ET(t,s);const c=ET(l,s);if(u.height>c.height){const d=u.getIntersection(c);d&&(u=d)}if(TRe({window:s,rect:u,viewportOffset:e,alignToTop:i,forceScroll:r}),s.parent!=s){if(a=s.frameElement,s=s.parent,!a)return}else s=null}}function TRe({window:t,rect:e,alignToTop:n,forceScroll:i,viewportOffset:r}){const o=e.clone().moveBy(0,r.bottom),s=e.clone().moveBy(0,-r.top),a=new Wt(t).excludeScrollbarsAndBorders(),l=[s,o],u=n&&i,c=l.every(g=>a.contains(g));let{scrollX:d,scrollY:f}=t;const h=d,m=f;u?f-=a.top-e.top+r.top:c||(rG(s,a)?f-=a.top-e.top+r.top:iG(o,a)&&(n?f+=e.top-a.top-r.top:f+=e.bottom-a.bottom+r.bottom)),c||(oG(e,a)?d-=a.left-e.left+r.left:sG(e,a)&&(d+=e.right-a.right+r.right)),(d!=h||f!==m)&&t.scrollTo(d,f)}function ERe({parent:t,getRect:e,alignToTop:n,forceScroll:i,ancestorOffset:r=0,limiterElement:o}){const s=VM(t),a=n&&i;let l,u,c;const d=o||s.document.body;for(;t!=d;)u=e(),l=new Wt(t).excludeScrollbarsAndBorders(),c=l.contains(u),a?t.scrollTop-=l.top-u.top+r:c||(rG(u,l)?t.scrollTop-=l.top-u.top+r:iG(u,l)&&(n?t.scrollTop+=u.top-l.top-r:t.scrollTop+=u.bottom-l.bottom+r)),c||(oG(u,l)?t.scrollLeft-=l.left-u.left+r:sG(u,l)&&(t.scrollLeft+=u.right-l.right+r)),t=t.parentNode}function iG(t,e){return t.bottom>e.bottom}function rG(t,e){return t.top<e.top}function oG(t,e){return t.left<e.left}function sG(t,e){return t.right>e.right}function VM(t){return fS(t)?t.startContainer.ownerDocument.defaultView:t.ownerDocument.defaultView}function l4(t){if(fS(t)){let e=t.commonAncestorContainer;return fi(e)&&(e=e.parentNode),e}else return t.parentNode}function ET(t,e){const n=VM(t),i=new Wt(t);if(n===e)return i;{let r=n;for(;r!=e;){const o=r.frameElement,s=new Wt(o).excludeScrollbarsAndBorders();i.moveBy(s.left,s.top),r=r.parent}}return i}function xRe(t){return typeof t=="number"?{top:t,bottom:t,left:t,right:t}:t}const ARe={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},PRe={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},u4={37:"←",38:"↑",39:"→",40:"↓",9:"⇥",33:"Page Up",34:"Page Down"},Yt=LRe(),IRe=Object.fromEntries(Object.entries(Yt).map(([t,e])=>{let n;return e in u4?n=u4[e]:n=t.charAt(0).toUpperCase()+t.slice(1),[e,n]}));function Gm(t){let e;if(typeof t=="string"){if(e=Yt[t.toLowerCase()],!e)throw new oe("keyboard-unknown-key",null,{key:t})}else e=t.keyCode+(t.altKey?Yt.alt:0)+(t.ctrlKey?Yt.ctrl:0)+(t.shiftKey?Yt.shift:0)+(t.metaKey?Yt.cmd:0);return e}function FM(t){return typeof t=="string"&&(t=DRe(t)),t.map(e=>typeof e=="string"?MRe(e):e).reduce((e,n)=>n+e,0)}function l1(t,e){let n=FM(t);const i=vt.isMac||vt.isiOS;return Object.entries(i?ARe:PRe).reduce((s,[a,l])=>((n&Yt[a])!=0&&(n&=~Yt[a],s+=l),s),"")+(n?IRe[n]:"")}function RRe(t){return t==Yt.arrowright||t==Yt.arrowleft||t==Yt.arrowup||t==Yt.arrowdown}function $M(t,e){const n=e==="ltr";switch(t){case Yt.arrowleft:return n?"left":"right";case Yt.arrowright:return n?"right":"left";case Yt.arrowup:return"up";case Yt.arrowdown:return"down"}}function MRe(t){if(t.endsWith("!"))return Gm(t.slice(0,-1));const e=Gm(t);return(vt.isMac||vt.isiOS)&&e==Yt.ctrl?Yt.cmd:e}function ORe(t,e){const n=$M(t,e);return n==="down"||n==="right"}function LRe(){const t={pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let e=65;e<=90;e++){const n=String.fromCharCode(e);t[n.toLowerCase()]=e}for(let e=48;e<=57;e++)t[e-48]=e;for(let e=112;e<=123;e++)t["f"+(e-111)]=e;return Object.assign(t,{"'":222,",":108,"-":109,".":110,"/":111,";":186,"=":187,"[":219,"\\":220,"]":221,"`":223}),t}function DRe(t){return t.split("+").map(e=>e.trim())}const NRe=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig","ur","urd"];function c4(t){return NRe.includes(t)?"rtl":"ltr"}function li(t){return Array.isArray(t)?t:[t]}Qe.window.CKEDITOR_TRANSLATIONS||(Qe.window.CKEDITOR_TRANSLATIONS={});function BRe(t,e,n=1,i){if(typeof n!="number")throw new oe("translation-service-quantity-not-a-number",null,{quantity:n});const r=i||Qe.window.CKEDITOR_TRANSLATIONS,o=$Re(r);o===1&&(t=Object.keys(r)[0]);const s=e.id||e.string;if(o===0||!FRe(t,s,r))return n!==1?e.plural:e.string;const a=r[t].dictionary,l=r[t].getPluralForm||(d=>d===1?0:1),u=a[s];if(typeof u=="string")return u;const c=Number(l(n));return u[c]}function VRe(t){return Array.isArray(t)?t.reduce((e,n)=>DM(e,n)):t}function FRe(t,e,n){return!!n[t]&&!!n[t].dictionary[e]}function $Re(t){return Object.keys(t).length}class zRe{uiLanguage;uiLanguageDirection;contentLanguage;contentLanguageDirection;t;translations;constructor({uiLanguage:e="en",contentLanguage:n,translations:i}={}){this.uiLanguage=e,this.contentLanguage=n||this.uiLanguage,this.uiLanguageDirection=c4(this.uiLanguage),this.contentLanguageDirection=c4(this.contentLanguage),this.translations=VRe(i),this.t=(r,o)=>this._t(r,o)}_t(e,n=[]){n=li(n),typeof e=="string"&&(e={string:e});const r=!!e.plural?n[0]:1,o=BRe(this.uiLanguage,e,r,this.translations);return HRe(o,n)}}function HRe(t,e){return t.replace(/%(\d+)/g,(n,i)=>i<e.length?e[i]:n)}class Er extends Fn(){_items;_itemMap;_idProperty;_bindToCollection;_bindToExternalToInternalMap;_bindToInternalToExternalMap;_skippedIndexesFromExternal;constructor(e={},n={}){super();const i=us(e);if(i||(n=e),this._items=[],this._itemMap=new Map,this._idProperty=n.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],i)for(const r of e)this._items.push(r),this._itemMap.set(this._getItemIdBeforeAdding(r),r)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,n){return this.addMany([e],n)}addMany(e,n){if(n===void 0)n=this._items.length;else if(n>this._items.length||n<0)throw new oe("collection-add-item-invalid-index",this);let i=0;for(const r of e){const o=this._getItemIdBeforeAdding(r),s=n+i;this._items.splice(s,0,r),this._itemMap.set(o,r),this.fire("add",r,s),i++}return this.fire("change",{added:e,removed:[],index:n}),this}get(e){let n;if(typeof e=="string")n=this._itemMap.get(e);else if(typeof e=="number")n=this._items[e];else throw new oe("collection-get-invalid-arg",this);return n||null}has(e){if(typeof e=="string")return this._itemMap.has(e);{const n=this._idProperty,i=e[n];return i&&this._itemMap.has(i)}}getIndex(e){let n;return typeof e=="string"?n=this._itemMap.get(e):n=e,n?this._items.indexOf(n):-1}remove(e){const[n,i]=this._remove(e);return this.fire("change",{added:[],removed:[n],index:i}),n}map(e,n){return this._items.map(e,n)}forEach(e,n){this._items.forEach(e,n)}find(e,n){return this._items.find(e,n)}filter(e,n){return this._items.filter(e,n)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new oe("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:n=>{this._setUpBindToBinding(i=>new n(i))},using:n=>{typeof n=="function"?this._setUpBindToBinding(n):this._setUpBindToBinding(i=>i[n])}}}_setUpBindToBinding(e){const n=this._bindToCollection,i=(r,o,s)=>{const a=n._bindToCollection==this,l=n._bindToInternalToExternalMap.get(o);if(a&&l)this._bindToExternalToInternalMap.set(o,l),this._bindToInternalToExternalMap.set(l,o);else{const u=e(o);if(!u){this._skippedIndexesFromExternal.push(s);return}let c=s;for(const d of this._skippedIndexesFromExternal)s>d&&c--;for(const d of n._skippedIndexesFromExternal)c>=d&&c++;this._bindToExternalToInternalMap.set(o,u),this._bindToInternalToExternalMap.set(u,o),this.add(u,c);for(let d=0;d<n._skippedIndexesFromExternal.length;d++)c<=n._skippedIndexesFromExternal[d]&&n._skippedIndexesFromExternal[d]++}};for(const r of n)i(null,r,n.getIndex(r));this.listenTo(n,"add",i),this.listenTo(n,"remove",(r,o,s)=>{const a=this._bindToExternalToInternalMap.get(o);a&&this.remove(a),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((l,u)=>(s<u&&l.push(u-1),s>u&&l.push(u),l),[])})}_getItemIdBeforeAdding(e){const n=this._idProperty;let i;if(n in e){if(i=e[n],typeof i!="string")throw new oe("collection-add-invalid-id",this);if(this.get(i))throw new oe("collection-add-item-already-exists",this)}else e[n]=i=Ur();return i}_remove(e){let n,i,r,o=!1;const s=this._idProperty;if(typeof e=="string"?(i=e,r=this._itemMap.get(i),o=!r,r&&(n=this._items.indexOf(r))):typeof e=="number"?(n=e,r=this._items[n],o=!r,r&&(i=r[s])):(r=e,i=r[s],n=this._items.indexOf(r),o=n==-1||!this._itemMap.get(i)),o)throw new oe("collection-remove-404",this);this._items.splice(n,1),this._itemMap.delete(i);const a=this._bindToInternalToExternalMap.get(r);return this._bindToInternalToExternalMap.delete(r),this._bindToExternalToInternalMap.delete(a),this.fire("remove",r,n),[r,n]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}function Mi(t){const e=t.next();return e.done?null:e.value}class wi extends zo(Ln()){_elements=new Set;_externalViews=new Set;_blurTimeout=null;constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null)}get elements(){return Array.from(this._elements.values())}get externalViews(){return Array.from(this._externalViews.values())}add(e){if(f4(e))this._addElement(e);else if(d4(e))this._addView(e);else{if(!e.element)throw new oe("focustracker-add-view-missing-element",{focusTracker:this,view:e});this._addElement(e.element)}}remove(e){f4(e)?this._removeElement(e):d4(e)?this._removeView(e):this._removeElement(e.element)}_addElement(e){if(this._elements.has(e))throw new oe("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>{const n=this.externalViews.find(i=>URe(e,i));n?this._focus(n.element):this._focus(e)},{useCapture:!0}),this.listenTo(e,"blur",()=>{this._blur()},{useCapture:!0}),this._elements.add(e)}_removeElement(e){this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e)),e===this.focusedElement&&this._blur()}_addView(e){e.element&&this._addElement(e.element),this.listenTo(e.focusTracker,"change:focusedElement",()=>{e.focusTracker.focusedElement?e.element&&this._focus(e.element):this._blur()}),this._externalViews.add(e)}_removeView(e){e.element&&this._removeElement(e.element),this.stopListening(e.focusTracker),this._externalViews.delete(e)}destroy(){this.stopListening(),this._elements.clear(),this._externalViews.clear(),this.isFocused=!1,this.focusedElement=null}_focus(e){this._clearBlurTimeout(),this.focusedElement=e,this.isFocused=!0}_blur(){this.elements.find(i=>i.contains(document.activeElement))||this.externalViews.find(i=>i.focusTracker.isFocused&&!i.focusTracker._blurTimeout)||(this._clearBlurTimeout(),this._blurTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0))}_clearBlurTimeout(){clearTimeout(this._blurTimeout),this._blurTimeout=null}}function d4(t){return"focusTracker"in t&&t.focusTracker instanceof wi}function f4(t){return Rc(t)}function URe(t,e){return h4(t,e)?!0:!!e.focusTracker.externalViews.find(n=>h4(t,n))}function h4(t,e){return!!e.element&&e.element.contains(document.activeElement)&&t.contains(e.element)}class Qi{_listener;constructor(){this._listener=new(zo())}listenTo(e){this._listener.listenTo(e,"keydown",(n,i)=>{this._listener.fire("_keydown:"+Gm(i),i)})}set(e,n,i={}){const r=FM(e),o=i.priority;this._listener.listenTo(this._listener,"_keydown:"+r,(s,a)=>{i.filter&&!i.filter(a)||(n(a,()=>{a.preventDefault(),a.stopPropagation(),s.stop()}),s.return=!0)},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+Gm(e),e)}stopListening(e){this._listener.stopListening(e)}destroy(){this.stopListening()}}function WRe(t){const e=new Map;for(const n in t)e.set(n,t[n]);return e}function gl(t){return us(t)?new Map(t):WRe(t)}function m4(t,e,n){const i=t.length,r=e.length;for(let o=i-1;o>=n;o--)t[o+r]=t[o];for(let o=0;o<r;o++)t[n+o]=e[o]}function zM(t,e){let n;function i(...r){i.cancel(),n=setTimeout(()=>t(...r),e)}return i.cancel=()=>{clearTimeout(n)},i}function HM(t){try{if(!t.startsWith("ey"))return null;const e=atob(t.replace(/-/g,"+").replace(/_/g,"/"));return JSON.parse(e)}catch{return null}}function qRe(){const t=[];for(let e=0;e<256;e++){let n=e;for(let i=0;i<8;i++)n&1?n=3988292384^n>>>1:n=n>>>1;t[e]=n}return t}function jRe(t){const e=Array.isArray(t)?t:[t],n=qRe();let i=-1;const r=e.map(o=>Array.isArray(o)?o.join(""):String(o)).join("");for(let o=0;o<r.length;o++){const s=r.charCodeAt(o);i=i>>>8^n[(i^s)&255]}return i=(i^-1)>>>0,i.toString(16).padStart(8,"0")}function KRe(t){const e=[{name:"address",isVoid:!1},{name:"article",isVoid:!1},{name:"aside",isVoid:!1},{name:"blockquote",isVoid:!1},{name:"details",isVoid:!1},{name:"dialog",isVoid:!1},{name:"dd",isVoid:!1},{name:"div",isVoid:!1},{name:"dl",isVoid:!1},{name:"dt",isVoid:!1},{name:"fieldset",isVoid:!1},{name:"figcaption",isVoid:!1},{name:"figure",isVoid:!1},{name:"footer",isVoid:!1},{name:"form",isVoid:!1},{name:"h1",isVoid:!1},{name:"h2",isVoid:!1},{name:"h3",isVoid:!1},{name:"h4",isVoid:!1},{name:"h5",isVoid:!1},{name:"h6",isVoid:!1},{name:"header",isVoid:!1},{name:"hgroup",isVoid:!1},{name:"hr",isVoid:!0},{name:"li",isVoid:!1},{name:"main",isVoid:!1},{name:"nav",isVoid:!1},{name:"ol",isVoid:!1},{name:"p",isVoid:!1},{name:"section",isVoid:!1},{name:"table",isVoid:!1},{name:"tbody",isVoid:!1},{name:"td",isVoid:!1},{name:"th",isVoid:!1},{name:"thead",isVoid:!1},{name:"tr",isVoid:!1},{name:"ul",isVoid:!1}],n=e.map(s=>s.name).join("|"),i=t.replace(new RegExp(`</?(${n})( .*?)?>`,"g"),`
$&
`).replace(/<br[^>]*>/g,`$&
`).split(`
`);let r=0,o=!1;return i.map(s=>(o=XRe(s,o),!s.length&&!o?"":GRe(s,e)?ty(s,r++):YRe(s,e)?ty(s,--r):o==="middle"||o==="last"?ty(s,0):ty(s,r))).join("").trimEnd()}function GRe(t,e){return e.some(n=>!(n.isVoid||!new RegExp(`<${n.name}( .*?)?>`).test(t)))}function YRe(t,e){return e.some(n=>new RegExp(`</${n.name}>`).test(t))}function ty(t,e,n=" "){return`${n.repeat(Math.max(0,e))}${t}
`}function XRe(t,e){const n=/<pre( .*?)?>/.test(t),i=/<\/pre>/.test(t);return n&&i?!1:n?"first":i?"last":e==="first"||e==="middle"?"middle":!1}function JRe(t){return!!t&&t.length==1&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(t)}function ZRe(t){return!!t&&t.length==1&&/[\ud800-\udbff]/.test(t)}function QRe(t){return!!t&&t.length==1&&/[\udc00-\udfff]/.test(t)}function UM(t,e){return ZRe(t.charAt(e-1))&&QRe(t.charAt(e))}function WM(t,e){return JRe(t.charAt(e))}const eMe=tMe();function aG(t,e){const n=String(t).matchAll(eMe);return Array.from(n).some(i=>i.index<e&&e<i.index+i[0].length)}function tMe(){const t=[new RegExp("\\p{Emoji}[\\u{E0020}-\\u{E007E}]+\\u{E007F}","u"),new RegExp("\\p{Emoji}\\u{FE0F}?\\u{20E3}","u"),new RegExp("\\p{Emoji}\\u{FE0F}","u"),new RegExp("(?=\\p{General_Category=Other_Symbol})\\p{Emoji}\\p{Emoji_Modifier}*","u")],e=new RegExp("\\p{Regional_Indicator}{2}","u").source,n="(?:"+t.map(r=>r.source).join("|")+")",i=`${e}|${n}(?:${n})*`;return new RegExp(i,"ug")}function g4(t){if(!t)return null;const e=nMe(t);return e?HM(e):null}function nMe(t){const e=t.split(".");return e.length!=3?null:e[1]}function iMe(t,e){return(t.removeFeatures||[]).includes(e)}const Fg=new WeakMap;let p4=!1;function qM({view:t,element:e,text:n,isDirectHost:i=!0,keepOnFocus:r=!1}){const o=t.document;Fg.has(o)||(Fg.set(o,new Map),o.registerPostFixer(a=>xT(Fg.get(o),a)),o.on("change:isComposing",()=>{t.change(a=>xT(Fg.get(o),a))},{priority:"high"})),e.is("editableElement")&&e.on("change:placeholder",(a,l,u)=>s(u)),e.placeholder?s(e.placeholder):n&&s(n),n&&lMe();function s(a){const l={text:a,isDirectHost:i,keepOnFocus:r,hostElement:i?e:null};Fg.get(o).set(e,l),t.change(u=>xT([[e,l]],u))}}function rMe(t,e){return e.hasClass("ck-placeholder")?!1:(t.addClass("ck-placeholder",e),!0)}function lG(t,e){return e.hasClass("ck-placeholder")?(t.removeClass("ck-placeholder",e),!0):!1}function oMe(t,e){if(!t.isAttached()||sMe(t))return!1;const n=t.document,r=n.selection.anchor;return n.isComposing&&r&&r.parent===t?!1:e||!n.isFocused?!0:!!r&&r.parent!==t}function sMe(t){for(const e of t.getChildren())if(!e.is("uiElement"))return!0;return!1}function xT(t,e){const n=[];let i=!1;for(const[r,o]of t)o.isDirectHost&&(n.push(r),v4(e,r,o)&&(i=!0));for(const[r,o]of t){if(o.isDirectHost)continue;const s=aMe(r);s!==o.hostElement&&o.hostElement&&(e.removeAttribute("data-placeholder",o.hostElement),lG(e,o.hostElement),o.hostElement=null,i=!0),s&&(n.includes(s)||(o.hostElement=s,v4(e,r,o)&&(i=!0)))}return i}function v4(t,e,n){const{text:i,isDirectHost:r,hostElement:o}=n;let s=!1;return o.getAttribute("data-placeholder")!==i&&(t.setAttribute("data-placeholder",i,o),s=!0),(r||e.childCount==1)&&oMe(o,n.keepOnFocus)?rMe(t,o)&&(s=!0):lG(t,o)&&(s=!0),s}function aMe(t){if(t.childCount){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement")&&!e.is("attributeElement"))return e}return null}function lMe(){p4||hn("enableViewPlaceholder-deprecated-text-option"),p4=!0}class $f{is(){throw new Error("is() method is abstract")}}class zf extends Fn($f){document;parent;constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if((e=this.parent.getChildIndex(this))==-1)throw new oe("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return e!==null&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return e!==null&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let n=this;for(;n.parent;)e.unshift(n.index),n=n.parent;return e}getAncestors(e={}){const n=[];let i=e.includeSelf?this:this.parent;for(;i;)n[e.parentFirst?"push":"unshift"](i),i=i.parent;return n}getCommonAncestor(e,n={}){const i=this.getAncestors(n),r=e.getAncestors(n);let o=0;for(;i[o]==r[o]&&i[o];)o++;return o===0?null:i[o-1]}isBefore(e){if(this==e||this.root!==e.root)return!1;const n=this.getPath(),i=e.getPath(),r=ur(n,i);switch(r){case"prefix":return!0;case"extension":return!1;default:return n[r]<i[r]}}isAfter(e){return this==e||this.root!==e.root?!1:!this.isBefore(e)}_remove(){this.parent._removeChildren(this.index)}_fireChange(e,n,i){this.fire(`change:${e}`,n,i),this.parent&&this.parent._fireChange(e,n,i)}toJSON(){const e={path:this.getPath(),type:"Node"};return this!==this.root&&this.root.is("rootElement")&&(e.root=this.root.toJSON()),e}}zf.prototype.is=function(t){return t==="node"||t==="view:node"};class Ji extends zf{_textData;constructor(e,n){super(e),this._textData=n}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof Ji?this===e||this.data===e.data:!1}toJSON(){const e=super.toJSON();return e.type="Text",e.data=this.data,e}_clone(){return new Ji(this.document,this.data)}}Ji.prototype.is=function(t){return t==="$text"||t==="view:$text"||t==="text"||t==="view:text"||t==="node"||t==="view:node"};class Wl extends $f{textNode;data;offsetInText;constructor(e,n,i){if(super(),this.textNode=e,n<0||n>e.data.length)throw new oe("view-textproxy-wrong-offsetintext",this);if(i<0||n+i>e.data.length)throw new oe("view-textproxy-wrong-length",this);this.data=e.data.substring(n,n+i),this.offsetInText=n}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const n=[];let i=e.includeSelf?this.textNode:this.parent;for(;i!==null;)n[e.parentFirst?"push":"unshift"](i),i=i.parent;return n}}Wl.prototype.is=function(t){return t==="$textProxy"||t==="view:$textProxy"||t==="textProxy"||t==="view:textProxy"};class u1{_consumables=new Map;add(e,n){let i;if(e.is("$text")||e.is("documentFragment")){this._consumables.set(e,!0);return}this._consumables.has(e)?i=this._consumables.get(e):(i=new uMe(e),this._consumables.set(e,i)),i.add(n?wp(n):e._getConsumables())}test(e,n){const i=this._consumables.get(e);return i===void 0?null:e.is("$text")||e.is("documentFragment")?i:i.test(wp(n))}consume(e,n){if(e.is("$text")||e.is("documentFragment"))return this.test(e,n)?(this._consumables.set(e,!1),!0):!1;const i=this._consumables.get(e);return i===void 0?!1:i.consume(wp(n))}revert(e,n){const i=this._consumables.get(e);i!==void 0&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):i.revert(wp(n)))}static createFrom(e,n){if(n||(n=new u1),e.is("$text"))n.add(e);else if(e.is("element")||e.is("documentFragment")){n.add(e);for(const i of e.getChildren())u1.createFrom(i,n)}return n}}class uMe{element;_canConsumeName=null;_attributes=new Map;constructor(e){this.element=e}add(e){e.name&&(this._canConsumeName=!0);for(const[n,i]of e.attributes)if(i){let r=this._attributes.get(n);(!r||typeof r=="boolean")&&(r=new Map,this._attributes.set(n,r)),r.set(i,!0)}else{if(n=="style"||n=="class")throw new oe("viewconsumable-invalid-attribute",this);this._attributes.set(n,!0)}}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const[n,i]of e.attributes){const r=this._attributes.get(n);if(r===void 0)return null;if(r===!1)return!1;if(r!==!0){if(i){const o=r.get(i);if(o===void 0)return null;if(!o)return!1}else for(const o of r.values())if(!o)return!1}}return!0}consume(e){if(!this.test(e))return!1;e.name&&(this._canConsumeName=!1);for(const[n,i]of e.attributes){const r=this._attributes.get(n);if(typeof r=="boolean")for(const[o]of this.element._getConsumables(n,i).attributes)this._attributes.set(o,!1);else if(i)for(const[,o]of this.element._getConsumables(n,i).attributes)r.set(o,!1);else for(const o of r.keys())r.set(o,!1)}return!0}revert(e){e.name&&(this._canConsumeName=!0);for(const[n,i]of e.attributes){const r=this._attributes.get(n);if(r===!1){this._attributes.set(n,!0);continue}if(!(r===void 0||r===!0))if(i)r.get(i)===!1&&r.set(i,!0);else for(const o of r.keys())r.set(o,!0)}}}function wp(t){const e=[];return"attributes"in t&&t.attributes&&AT(e,t.attributes),"classes"in t&&t.classes&&AT(e,t.classes,"class"),"styles"in t&&t.styles&&AT(e,t.styles,"style"),{name:t.name||!1,attributes:e}}function AT(t,e,n){if(typeof e=="string"){t.push(n?[n,e]:[e]);return}for(const i of e)Array.isArray(i)?t.push(i):t.push(n?[n,i]:[i])}class pl{_patterns=[];constructor(...e){this.add(...e)}add(...e){for(let n of e)(typeof n=="string"||n instanceof RegExp)&&(n={name:n}),this._patterns.push(n)}match(...e){for(const n of e)for(const i of this._patterns){const r=this._isElementMatching(n,i);if(r)return{element:n,pattern:i,match:r}}return null}matchAll(...e){const n=[];for(const i of e)for(const r of this._patterns){const o=this._isElementMatching(i,r);o&&n.push({element:i,pattern:r,match:o})}return n.length>0?n:null}getElementName(){if(this._patterns.length!==1)return null;const e=this._patterns[0],n=e.name;return typeof e!="function"&&n&&!(n instanceof RegExp)?n:null}_isElementMatching(e,n){if(typeof n=="function"){const o=n(e);return!o||typeof o!="object"?o:wp(o)}const i={};if(n.name&&(i.name=cMe(n.name,e.name),!i.name))return null;const r=[];return n.attributes&&!dMe(n.attributes,e,r)||n.classes&&!fMe(n.classes,e,r)||n.styles&&!hMe(n.styles,e,r)?null:(r.length&&(i.attributes=r),i)}}function c1(t,e){return t===!0||t===e||t instanceof RegExp&&!!String(e).match(t)}function cMe(t,e){return t instanceof RegExp?!!e.match(t):t===e}function jM(t,e){if(Array.isArray(t))return t.map(i=>typeof i!="object"||i instanceof RegExp?e?[e,i,!0]:[i,!0]:((i.key===void 0||i.value===void 0)&&hn("matcher-pattern-missing-key-or-value",i),e?[e,i.key,i.value]:[i.key,i.value]));if(typeof t!="object"||t instanceof RegExp)return[e?[e,t,!0]:[t,!0]];const n=[];for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&n.push(e?[e,i,t[i]]:[i,t[i]]);return n}function dMe(t,e,n){let i;return typeof t=="object"&&!(t instanceof RegExp)&&!Array.isArray(t)?(t.style!==void 0&&hn("matcher-pattern-deprecated-attributes-style-key",t),t.class!==void 0&&hn("matcher-pattern-deprecated-attributes-class-key",t)):i=["class","style"],e._collectAttributesMatch(jM(t),n,i)}function fMe(t,e,n){return e._collectAttributesMatch(jM(t,"class"),n)}function hMe(t,e,n){return e._collectAttributesMatch(jM(t,"style"),n)}class tv{_styles;_cachedStyleNames=null;_cachedExpandedStyleNames=null;_styleProcessor;constructor(e){this._styles={},this._styleProcessor=e}get isEmpty(){return!Object.entries(this._styles).length}get size(){return this.isEmpty?0:this.getStyleNames().length}setTo(e){this.clear();const n=gMe(e);for(const[i,r]of n)this._styleProcessor.toNormalizedForm(i,r,this._styles);return this}has(e){if(this.isEmpty)return!1;const i=this._styleProcessor.getReducedForm(e,this._styles).find(([r])=>r===e);return Array.isArray(i)}set(e,n){if(this._cachedStyleNames=null,this._cachedExpandedStyleNames=null,so(e))for(const[i,r]of Object.entries(e))this._styleProcessor.toNormalizedForm(i,r,this._styles);else this._styleProcessor.toNormalizedForm(e,n,this._styles)}remove(e){const n={};for(const i of li(e)){const r=_A(i),o=Ic(this._styles,r);if(o)Jw(n,r,o);else{const s=this.getAsString(i);s!==void 0&&this._styleProcessor.toNormalizedForm(i,s,n)}}Object.keys(n).length&&(uG(this._styles,n),this._cachedStyleNames=null,this._cachedExpandedStyleNames=null)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!so(this._styles[e]))return this._styles[e];const i=this._styleProcessor.getReducedForm(e,this._styles).find(([r])=>r===e);if(Array.isArray(i))return i[1]}getStyleNames(e=!1){return this.isEmpty?[]:e?(this._cachedExpandedStyleNames||=this._styleProcessor.getStyleNames(this._styles),this._cachedExpandedStyleNames):(this._cachedStyleNames||=this.getStylesEntries().map(([n])=>n),this._cachedStyleNames)}keys(){return this.getStyleNames()}clear(){this._styles={},this._cachedStyleNames=null,this._cachedExpandedStyleNames=null}isSimilar(e){if(this.size!==e.size)return!1;for(const n of this.getStyleNames())if(!e.has(n)||e.getAsString(n)!==this.getAsString(n))return!1;return!0}getStylesEntries(){const e=[],n=Object.keys(this._styles);for(const i of n)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_clone(){const e=new this.constructor(this._styleProcessor);return e.set(this.getNormalized()),e}_getTokensMatch(e,n){const i=[];for(const r of this.getStyleNames(!0))if(c1(e,r)){if(n===!0){i.push(r);continue}const o=this.getAsString(r);c1(n,o)&&i.push(r)}return i.length?i:void 0}_getConsumables(e){const n=[];if(e){n.push(e);for(const i of this._styleProcessor.getRelatedStyles(e))n.push(i)}else for(const i of this.getStyleNames()){for(const r of this._styleProcessor.getRelatedStyles(i))n.push(r);n.push(i)}return n}_canMergeFrom(e){for(const n of e.getStyleNames())if(this.has(n)&&this.getAsString(n)!==e.getAsString(n))return!1;return!0}_mergeFrom(e){for(const n of e.getStyleNames())this.has(n)||this.set(n,e.getAsString(n))}_isMatching(e){for(const n of e.getStyleNames())if(!this.has(n)||this.getAsString(n)!==e.getAsString(n))return!1;return!0}}class mMe{_normalizers;_extractors;_reducers;_consumables;constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,n,i){if(so(n)){Jw(i,_A(e),n);return}if(this._normalizers.has(e)){const r=this._normalizers.get(e),{path:o,value:s}=r(n);Jw(i,o,s)}else Jw(i,e,n)}getNormalized(e,n){if(!e)return DM({},n);if(n[e]!==void 0)return n[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if(typeof i=="string")return Ic(n,i);const r=i(e,n);if(r)return r}return Ic(n,_A(e))}getReducedForm(e,n){const i=this.getNormalized(e,n);return i===void 0?[]:this._reducers.has(e)?this._reducers.get(e)(i):[[e,i]]}getStyleNames(e){const n=new Set;for(const i of this._consumables.keys()){const r=this.getNormalized(i,e);r&&(typeof r!="object"||Object.keys(r).length)&&n.add(i)}for(const i of Object.keys(e))n.add(i);return Array.from(n)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,n){this._normalizers.set(e,n)}setExtractor(e,n){this._extractors.set(e,n)}setReducer(e,n){this._reducers.set(e,n)}setStyleRelation(e,n){this._mapStyleNames(e,n);for(const i of n)this._mapStyleNames(i,[e])}_mapStyleNames(e,n){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...n)}}function gMe(t){let e=null,n=0,i=0,r=null;const o=new Map;if(t==="")return o;t.charAt(t.length-1)!=";"&&(t=t+";");for(let s=0;s<t.length;s++){const a=t.charAt(s);if(e===null)switch(a){case":":r||(r=t.substr(n,s-n),i=s+1);break;case'"':case"'":e=a;break;case";":{const l=t.substr(i,s-i);r&&o.set(r.trim(),l.trim()),r=null,n=s+1;break}}else a===e&&(e=null)}return o}function _A(t){return t.replace("-",".")}function Jw(t,e,n){let i=n;so(n)&&(i=DM({},Ic(t,e),n)),LK(t,e,i)}function uG(t,e){for(const n of Object.keys(e))t[n]!==null&&!Array.isArray(t[n])&&typeof t[n]=="object"&&typeof e[n]=="object"?(uG(t[n],e[n]),Object.keys(t[n]).length||delete t[n]):delete t[n]}class PT{_set=new Set;get isEmpty(){return this._set.size==0}get size(){return this._set.size}has(e){return this._set.has(e)}keys(){return Array.from(this._set.keys())}setTo(e){this.clear();for(const n of e.split(/\s+/))n&&this._set.add(n);return this}set(e){for(const n of li(e))n&&this._set.add(n)}remove(e){for(const n of li(e))this._set.delete(n)}clear(){this._set.clear()}toString(){return Array.from(this._set).join(" ")}isSimilar(e){if(this.size!==e.size)return!1;for(const n of this.keys())if(!e.has(n))return!1;return!0}_clone(){const e=new this.constructor;return e._set=new Set(this._set),e}_getTokensMatch(e){const n=[];if(e===!0){for(const i of this._set.keys())n.push(i);return n}if(typeof e=="string"){for(const i of e.split(/\s+/))if(this._set.has(i))n.push(i);else return;return n}for(const i of this._set.keys())i.match(e)&&n.push(i);return n.length?n:void 0}_getConsumables(e){return e?[e]:this.keys()}_canMergeFrom(){return!0}_mergeFrom(e){for(const n of e._set.keys())this._set.has(n)||this._set.add(n)}_isMatching(e){for(const n of e._set.keys())if(!this._set.has(n))return!1;return!0}}class ga extends zf{name;_unsafeAttributesToRender=[];_attrs;_children;_customProperties=new Map;get _classes(){return this._attrs.get("class")}get _styles(){return this._attrs.get("style")}constructor(e,n,i,r){super(e),this.name=n,this._attrs=this._parseAttributes(i),this._children=[],r&&this._insertChild(0,r)}get childCount(){return this._children.length}get isEmpty(){return this._children.length===0}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes&&(yield"class"),this._styles&&(yield"style");for(const e of this._attrs.keys())e!="class"&&e!="style"&&(yield e)}*getAttributes(){for(const[e,n]of this._attrs.entries())yield[e,String(n)]}getAttribute(e){return this._attrs.has(e)?String(this._attrs.get(e)):void 0}hasAttribute(e,n){return this._attrs.has(e)?n!==void 0?ah(this.name,e)||$g(this.name,e)?this._attrs.get(e).has(n):this._attrs.get(e)===n:!0:!1}isSimilar(e){if(!(e instanceof ga))return!1;if(this===e)return!0;if(this.name!=e.name||this._attrs.size!==e._attrs.size)return!1;for(const[n,i]of this._attrs){const r=e._attrs.get(n);if(r===void 0)return!1;if(typeof i=="string"||typeof r=="string"){if(r!==i)return!1}else if(!i.isSimilar(r))return!1}return!0}hasClass(...e){for(const n of e)if(!this._classes||!this._classes.has(n))return!1;return!0}getClassNames(){const e=this._classes?this._classes.keys():[],n=e[Symbol.iterator]();return Object.assign(e,{next:n.next.bind(n)})}getStyle(e){return this._styles&&this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles&&this._styles.getNormalized(e)}getStyleNames(e){return this._styles?this._styles.getStyleNames(e):[]}hasStyle(...e){for(const n of e)if(!this._styles||!this._styles.has(n))return!1;return!0}findAncestor(...e){const n=new pl(...e);let i=this.parent;for(;i&&!i.is("documentFragment");){if(n.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=this._classes?this._classes.keys().sort().join(","):"",n=this._styles&&String(this._styles),i=Array.from(this._attrs).filter(([r])=>r!="style"&&r!="class").map(r=>`${r[0]}="${r[1]}"`).sort().join(" ");return this.name+(e==""?"":` class="${e}"`)+(n?` style="${n}"`:"")+(i==""?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}toJSON(){const e=super.toJSON();if(e.name=this.name,e.type="Element",this._attrs.size&&(e.attributes=Object.fromEntries(this.getAttributes())),this._children.length>0){e.children=[];for(const n of this._children)e.children.push(n.toJSON())}return e}_clone(e=!1){const n=[];if(e)for(const r of this.getChildren())n.push(r._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,n);return i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,n){this._fireChange("children",this,{index:e});let i=0;const r=pMe(this.document,n);for(const o of r)o.parent!==null&&o._remove(),o.parent=this,o.document=this.document,this._children.splice(e,0,o),e++,i++;return i}_removeChildren(e,n=1){this._fireChange("children",this,{index:e});for(let i=e;i<e+n;i++)this._children[i].parent=null;return this._children.splice(e,n)}_setAttribute(e,n,i=!0){if(this._fireChange("attributes",this),ah(this.name,e)||$g(this.name,e)){let r=this._attrs.get(e);r||(r=ah(this.name,e)?new tv(this.document.stylesProcessor):new PT,this._attrs.set(e,r)),i?r.setTo(String(n)):ah(this.name,e)?Array.isArray(n)?r.set(n[0],n[1]):r.set(n):r.set(typeof n=="string"?n.split(/\s+/):n)}else this._attrs.set(e,String(n))}_removeAttribute(e,n){if(this._fireChange("attributes",this),n!==void 0&&(ah(this.name,e)||$g(this.name,e))){const i=this._attrs.get(e);return i?($g(this.name,e)&&typeof n=="string"&&(n=n.split(/\s+/)),i.remove(n),i.isEmpty?this._attrs.delete(e):!1):!1}return this._attrs.delete(e)}_addClass(e){this._setAttribute("class",e,!1)}_removeClass(e){this._removeAttribute("class",e)}_setStyle(e,n){typeof e!="string"?this._setAttribute("style",e,!1):this._setAttribute("style",[e,n],!1)}_removeStyle(e){this._removeAttribute("style",e)}_collectAttributesMatch(e,n,i){for(const[r,o,s]of e){let a=!1,l=!1;for(const[u,c]of this._attrs)if(!(i&&i.includes(u)||!c1(r,u)))if(a=!0,typeof c=="string"){if(c1(o,c))n.push([u]),l=!0;else if(!(r instanceof RegExp))return!1}else{const d=c._getTokensMatch(o,s||!0);if(d){l=!0;for(const f of d)n.push([u,f])}else if(!(r instanceof RegExp))return!1}if(!a||!l)return!1}return!0}_getConsumables(e,n){const i=[];if(e){const r=this._attrs.get(e);if(r!==void 0)if(typeof r=="string")i.push([e]);else for(const o of r._getConsumables(n))i.push([e,o])}else for(const[r,o]of this._attrs)if(typeof o=="string")i.push([r]);else for(const s of o._getConsumables())i.push([r,s]);return{name:!e,attributes:i}}_canMergeAttributesFrom(e){if(this.name!=e.name)return!1;for(const[n,i]of e._attrs){const r=this._attrs.get(n);if(r!==void 0){if(typeof r=="string"||typeof i=="string"){if(r!==i)return!1}else if(!r._canMergeFrom(i))return!1}}return!0}_mergeAttributesFrom(e){this._fireChange("attributes",this);for(const[n,i]of e._attrs){const r=this._attrs.get(n);r===void 0||typeof r=="string"||typeof i=="string"?this._setAttribute(n,i):r._mergeFrom(i)}}_canSubtractAttributesOf(e){if(this.name!=e.name)return!1;for(const[n,i]of e._attrs){const r=this._attrs.get(n);if(r===void 0)return!1;if(typeof r=="string"||typeof i=="string"){if(r!==i)return!1}else if(!r._isMatching(i))return!1}return!0}_subtractAttributesOf(e){this._fireChange("attributes",this);for(const[n,i]of e._attrs){const r=this._attrs.get(n);typeof r=="string"||typeof i=="string"?this._attrs.delete(n):(r.remove(i.keys()),r.isEmpty&&this._attrs.delete(n))}}_setCustomProperty(e,n){this._customProperties.set(e,n)}_removeCustomProperty(e){return this._customProperties.delete(e)}_parseAttributes(e){const n=gl(e);for(const[i,r]of n)if(r===null)n.delete(i);else if(ah(this.name,i)){const o=r instanceof tv?r._clone():new tv(this.document.stylesProcessor).setTo(String(r));n.set(i,o)}else if($g(this.name,i)){const o=r instanceof PT?r._clone():new PT().setTo(String(r));n.set(i,o)}else typeof r!="string"&&n.set(i,String(r));return n}}ga.prototype.is=function(t,e){return e?e===this.name&&(t==="element"||t==="view:element"):t==="element"||t==="view:element"||t==="node"||t==="view:node"};function pMe(t,e){if(typeof e=="string")return[new Ji(t,e)];us(e)||(e=[e]);const n=[];for(const i of e)typeof i=="string"?n.push(new Ji(t,i)):i instanceof Wl?n.push(new Ji(t,i.data)):n.push(i);return n}function $g(t,e){return e=="class"||t=="a"&&e=="rel"}function ah(t,e){return e=="style"}class nb extends ga{constructor(e,n,i,r){super(e,n,i,r),this.getFillerOffset=vMe}toJSON(){const e=super.toJSON();return e.type="ContainerElement",e}}nb.prototype.is=function(t,e){return e?e===this.name&&(t==="containerElement"||t==="view:containerElement"||t==="element"||t==="view:element"):t==="containerElement"||t==="view:containerElement"||t==="element"||t==="view:element"||t==="node"||t==="view:node"};function vMe(){const t=[...this.getChildren()],e=t[this.childCount-1];if(e&&e.is("element","br"))return this.childCount;for(const n of t)if(!n.is("uiElement"))return null;return this.childCount}class hS extends Ln(nb){constructor(e,n,i,r){super(e,n,i,r),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("placeholder",void 0),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",o=>o&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}destroy(){this.stopListening()}toJSON(){const e=super.toJSON();return e.type="EditableElement",e.isReadOnly=this.isReadOnly,e.isFocused=this.isFocused,e}}hS.prototype.is=function(t,e){return e?e===this.name&&(t==="editableElement"||t==="view:editableElement"||t==="containerElement"||t==="view:containerElement"||t==="element"||t==="view:element"):t==="editableElement"||t==="view:editableElement"||t==="containerElement"||t==="view:containerElement"||t==="element"||t==="view:element"||t==="node"||t==="view:node"};const b4=Symbol("rootName");class cG extends hS{constructor(e,n){super(e,n),this.rootName="main"}get rootName(){return this.getCustomProperty(b4)}set rootName(e){this._setCustomProperty(b4,e)}toJSON(){return this.rootName}set _name(e){this.name=e}}cG.prototype.is=function(t,e){return e?e===this.name&&(t==="rootElement"||t==="view:rootElement"||t==="editableElement"||t==="view:editableElement"||t==="containerElement"||t==="view:containerElement"||t==="element"||t==="view:element"):t==="rootElement"||t==="view:rootElement"||t==="editableElement"||t==="view:editableElement"||t==="containerElement"||t==="view:containerElement"||t==="element"||t==="view:element"||t==="node"||t==="view:node"};class Xd{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new oe("view-tree-walker-no-start-position",null);if(e.direction&&e.direction!="forward"&&e.direction!="backward")throw new oe("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this._position=Ge._createAt(e.startPosition):this._position=Ge._createAt(e.boundaries[e.direction=="backward"?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let n,i;do i=this.position,n=this.next();while(!n.done&&e(n.value));n.done||(this._position=i)}jumpTo(e){this._boundaryStartParent&&e.isBefore(this.boundaries.start)?e=this.boundaries.start:this._boundaryEndParent&&e.isAfter(this.boundaries.end)&&(e=this.boundaries.end),this._position=e.clone()}next(){return this.direction=="forward"?this._next():this._previous()}_next(){let e=this.position.clone();const n=this.position,i=e.parent;if(i.parent===null&&e.offset===i.childCount)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let r;if(i&&i.is("view:$text")){if(e.isAtEnd)return this._position=Ge._createAfter(i),this._next();r=i.data[e.offset]}else r=i.getChild(e.offset);if(typeof r=="string"){let o;this.singleCharacters?o=1:o=(i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length)-e.offset;const s=new Wl(i,e.offset,o);return e.offset+=o,this._position=e,this._formatReturnValue("text",s,n,e,o)}if(r&&r.is("view:element")){if(!this.shallow)e=new Ge(r,0);else{if(this.boundaries&&this.boundaries.end.isBefore(e))return{done:!0,value:void 0};e.offset++}return this._position=e,this._formatReturnValue("elementStart",r,n,e,1)}if(r&&r.is("view:$text")){if(this.singleCharacters)return e=new Ge(r,0),this._position=e,this._next();let o=r.data.length,s;return r==this._boundaryEndParent?(o=this.boundaries.end.offset,s=new Wl(r,0,o),e=Ge._createAfter(s)):(s=new Wl(r,0,r.data.length),e.offset++),this._position=e,this._formatReturnValue("text",s,n,e,o)}return e=Ge._createAfter(i),this._position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",i,n,e)}_previous(){let e=this.position.clone();const n=this.position,i=e.parent;if(i.parent===null&&e.offset===0)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let r;if(i.is("view:$text")){if(e.isAtStart)return this._position=Ge._createBefore(i),this._previous();r=i.data[e.offset-1]}else r=i.getChild(e.offset-1);if(typeof r=="string"){let o;if(this.singleCharacters)o=1;else{const a=i===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-a}e.offset-=o;const s=new Wl(i,e.offset,o);return this._position=e,this._formatReturnValue("text",s,n,e,o)}if(r&&r.is("view:element"))return this.shallow?(e.offset--,this._position=e,this._formatReturnValue("elementStart",r,n,e,1)):(e=new Ge(r,r.childCount),this._position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",r,n,e));if(r&&r.is("view:$text")){if(this.singleCharacters)return e=new Ge(r,r.data.length),this._position=e,this._previous();let o=r.data.length,s;if(r==this._boundaryStartParent){const a=this.boundaries.start.offset;s=new Wl(r,a,r.data.length-a),o=s.data.length,e=Ge._createBefore(s)}else s=new Wl(r,0,r.data.length),e.offset--;return this._position=e,this._formatReturnValue("text",s,n,e,o)}return e=Ge._createBefore(i),this._position=e,this._formatReturnValue("elementStart",i,n,e,1)}_formatReturnValue(e,n,i,r,o){return n.is("view:$textProxy")&&(n.offsetInText+n.data.length==n.textNode.data.length&&(this.direction=="forward"&&!(this.boundaries&&this.boundaries.end.isEqual(this.position))?(r=Ge._createAfter(n.textNode),this._position=r):i=Ge._createAfter(n.textNode)),n.offsetInText===0&&(this.direction=="backward"&&!(this.boundaries&&this.boundaries.start.isEqual(this.position))?(r=Ge._createBefore(n.textNode),this._position=r):i=Ge._createBefore(n.textNode))),{done:!1,value:{type:e,item:n,previousPosition:i,nextPosition:r,length:o}}}}class Ge extends $f{parent;offset;constructor(e,n){super(),this.parent=e,this.offset=n}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return this.offset===0}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof hS);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const n=Ge._createAt(this),i=n.offset+e;return n.offset=i<0?0:i,n}getLastMatchingPosition(e,n={}){n.startPosition=this;const i=new Xd(n);return i.skip(e),i.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const n=this.getAncestors(),i=e.getAncestors();let r=0;for(;n[r]==i[r]&&n[r];)r++;return r===0?null:n[r-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return this.compareWith(e)=="before"}isAfter(e){return this.compareWith(e)=="after"}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const n=this.parent.is("node")?this.parent.getPath():[],i=e.parent.is("node")?e.parent.getPath():[];n.push(this.offset),i.push(e.offset);const r=ur(n,i);switch(r){case"prefix":return"before";case"extension":return"after";default:return n[r]<i[r]?"before":"after"}}getWalker(e={}){return e.startPosition=this,new Xd(e)}clone(){return new Ge(this.parent,this.offset)}toJSON(){return{parent:this.parent.toJSON(),offset:this.offset}}static _createAt(e,n){if(e instanceof Ge)return new this(e.parent,e.offset);{const i=e;if(n=="end")n=i.is("$text")?i.data.length:i.childCount;else{if(n=="before")return this._createBefore(i);if(n=="after")return this._createAfter(i);if(n!==0&&!n)throw new oe("view-createpositionat-offset-required",i)}return new Ge(i,n)}}static _createAfter(e){if(e.is("$textProxy"))return new Ge(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new oe("view-position-after-root",e,{root:e});return new Ge(e.parent,e.index+1)}static _createBefore(e){if(e.is("$textProxy"))return new Ge(e.textNode,e.offsetInText);if(!e.parent)throw new oe("view-position-before-root",e,{root:e});return new Ge(e.parent,e.index)}}Ge.prototype.is=function(t){return t==="position"||t==="view:position"};class Nt extends $f{start;end;constructor(e,n=null){super(),this.start=e.clone(),this.end=n?n.clone():e.clone()}*[Symbol.iterator](){yield*new Xd({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(ny,{direction:"backward"}),n=this.end.getLastMatchingPosition(ny);return e.parent.is("$text")&&e.isAtStart&&(e=Ge._createBefore(e.parent)),n.parent.is("$text")&&n.isAtEnd&&(n=Ge._createAfter(n.parent)),new Nt(e,n)}getTrimmed(){let e=this.start.getLastMatchingPosition(ny);if(e.isAfter(this.end)||e.isEqual(this.end))return new Nt(e,e);let n=this.end.getLastMatchingPosition(ny,{direction:"backward"});const i=e.nodeAfter,r=n.nodeBefore;return i&&i.is("$text")&&(e=new Ge(i,0)),r&&r.is("$text")&&(n=new Ge(r,r.data.length)),new Nt(e,n)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,n=!1){e.isCollapsed&&(n=!1);const i=this.containsPosition(e.start)||n&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||n&&this.end.isEqual(e.end);return i&&r}getDifference(e){const n=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&n.push(new Nt(this.start,e.start)),this.containsPosition(e.end)&&n.push(new Nt(e.end,this.end))):n.push(this.clone()),n}getIntersection(e){if(this.isIntersecting(e)){let n=this.start,i=this.end;return this.containsPosition(e.start)&&(n=e.start),this.containsPosition(e.end)&&(i=e.end),new Nt(n,i)}return null}getWalker(e={}){return e.boundaries=this,new Xd(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,n=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(n=this.end.parent.previousSibling),e&&e.is("element")&&e===n?e:null}clone(){return new Nt(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const n=new Xd(e);for(const i of n)yield i.item}*getPositions(e={}){e.boundaries=this;const n=new Xd(e);yield n.position;for(const i of n)yield i.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}static _createFromParentsAndOffsets(e,n,i,r){return new this(new Ge(e,n),new Ge(i,r))}static _createFromPositionAndShift(e,n){const i=e,r=e.getShiftedBy(n);return n>0?new this(i,r):new this(r,i)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const n=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Ge._createBefore(e),n)}}Nt.prototype.is=function(t){return t==="range"||t==="view:range"};function ny(t){return!!(t.item.is("attributeElement")||t.item.is("uiElement"))}class aa extends Fn($f){_ranges;_lastRangeBackward;_isFake;_fakeSelectionLabel;constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return this.rangeCount===1&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const n of this._ranges)(!e||n.start.isBefore(e.start))&&(e=n);return e?e.clone():null}getLastRange(){let e=null;for(const n of this._ranges)(!e||n.end.isAfter(e.end))&&(e=n);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake||this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel||this.rangeCount!=e.rangeCount)return!1;if(this.rangeCount===0)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const n of this._ranges){let i=!1;for(const r of e._ranges)if(n.isEqual(r)){i=!0;break}if(!i)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const n=yA(this.getRanges()),i=yA(e.getRanges());if(n!=i)return!1;if(n==0)return!0;for(let r of this.getRanges()){r=r.getTrimmed();let o=!1;for(let s of e.getRanges())if(s=s.getTrimmed(),r.start.isEqual(s.start)&&r.end.isEqual(s.end)){o=!0;break}if(!o)return!1}return!0}getSelectedElement(){return this.rangeCount!==1?null:this.getFirstRange().getContainedElement()}setTo(...e){let[n,i,r]=e;if(typeof i=="object"&&(r=i,i=void 0),n===null)this._setRanges([]),this._setFakeOptions(r);else if(n instanceof aa||n instanceof KM)this._setRanges(n.getRanges(),n.isBackward),this._setFakeOptions({fake:n.isFake,label:n.fakeSelectionLabel});else if(n instanceof Nt)this._setRanges([n],r&&r.backward),this._setFakeOptions(r);else if(n instanceof Ge)this._setRanges([new Nt(n)]),this._setFakeOptions(r);else if(n instanceof zf){const o=!!r&&!!r.backward;let s;if(i===void 0)throw new oe("view-selection-setto-required-second-parameter",this);i=="in"?s=Nt._createIn(n):i=="on"?s=Nt._createOn(n):s=new Nt(Ge._createAt(n,i)),this._setRanges([s],o),this._setFakeOptions(r)}else if(us(n))this._setRanges(n,r&&r.backward),this._setFakeOptions(r);else throw new oe("view-selection-setto-not-selectable",this);this.fire("change")}setFocus(e,n){if(this.anchor===null)throw new oe("view-selection-setfocus-no-ranges",this);const i=Ge._createAt(e,n);if(i.compareWith(this.focus)=="same")return;const r=this.anchor;this._ranges.pop(),i.compareWith(r)=="before"?this._addRange(new Nt(i,r),!0):this._addRange(new Nt(r,i)),this.fire("change")}toJSON(){const e={ranges:Array.from(this.getRanges()).map(n=>n.toJSON())};return this.isBackward&&(e.isBackward=!0),this.isFake&&(e.isFake=!0),e}_setRanges(e,n=!1){e=Array.from(e),this._ranges=[];for(const i of e)this._addRange(i);this._lastRangeBackward=!!n}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,n=!1){if(!(e instanceof Nt))throw new oe("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!n}_pushRange(e){for(const n of this._ranges)if(e.isIntersecting(n))throw new oe("view-selection-range-intersects",this,{addedRange:e,intersectingRange:n});this._ranges.push(new Nt(e.start,e.end))}}aa.prototype.is=function(t){return t==="selection"||t==="view:selection"};class KM extends Fn($f){_selection;constructor(...e){super(),this._selection=new aa,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}toJSON(){return this._selection.toJSON()}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,n){this._selection.setFocus(e,n)}}KM.prototype.is=function(t){return t==="selection"||t=="documentSelection"||t=="view:selection"||t=="view:documentSelection"};class Hf extends pu{startRange;_eventPhase;_currentTarget;constructor(e,n,i){super(e,n),this.startRange=i,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const IT=Symbol("bubblingEmitter"),RT=Symbol("bubblingCallbacks"),MT=Symbol("bubblingContexts");function bMe(t){class e extends t{fire(i,...r){try{const o=i instanceof pu?i:new pu(this,i),s=OT(this),a=w4(this);if(zg(o,"capturing",this),iy(s,"$capture",o,...r))return o.return;const l=o.startRange||this.selection.getFirstRange(),u=l?l.getContainedElement():null,c=u?wMe(a,u):!1;let d=u||_Me(l);if(zg(o,"atTarget",d),!c){if(iy(s,"$text",o,...r))return o.return;zg(o,"bubbling",d)}for(;d;){if(d.is("element")&&iy(s,d,o,...r))return o.return;d=d.parent,zg(o,"bubbling",d)}return zg(o,"bubbling",this),iy(s,"$document",o,...r),o.return}catch(o){oe.rethrowUnexpectedError(o,this)}}_addEventListener(i,r,o){const s=li(o.context||"$document"),a=OT(this),l=y4(this);for(const c of s)typeof c=="function"&&w4(this).add(c);const u=yMe(this,s,r);l.set(r,u),this.listenTo(a,i,u,o)}_removeEventListener(i,r){const o=OT(this),s=y4(this),a=s.get(r);a&&(s.delete(r),this.stopListening(o,i,a))}}return e}function zg(t,e,n){t instanceof Hf&&(t._eventPhase=e,t._currentTarget=n)}function iy(t,e,n,...i){return t.fire(n,{currentTarget:e,eventArgs:i}),!!n.stop.called}function yMe(t,e,n){return function(i,r){const{currentTarget:o,eventArgs:s}=r;if(typeof o=="string"){e.includes(o)&&n.call(t,i,...s);return}if(o.is("rootElement")&&e.includes("$root")){n.call(t,i,...s);return}if(e.includes(o.name)){n.call(t,i,...s);return}for(const a of e)if(typeof a=="function"&&a(o)){n.call(t,i,...s);return}}}function OT(t){return t[IT]||(t[IT]=new(Fn())),t[IT]}function y4(t){return t[RT]||(t[RT]=new Map),t[RT]}function w4(t){return t[MT]||(t[MT]=new Set),t[MT]}function wMe(t,e){for(const n of t)if(n(e))return!0;return!1}function _Me(t){if(!t)return null;const e=t.start.parent,n=t.end.parent,i=e.getPath(),r=n.getPath();return i.length>r.length?e:n}class mS extends bMe(Ln()){selection;roots;stylesProcessor;_postFixers=new Set;constructor(e){super(),this.selection=new KM,this.roots=new Er({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1)}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.forEach(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let n=!1;do for(const i of this._postFixers)if(n=i(e),n)break;while(n)}}const _4=10;class hm extends ga{static DEFAULT_PRIORITY=_4;_priority=_4;_id=null;_clonesGroup=null;constructor(e,n,i,r){super(e,n,i,r),this.getFillerOffset=CMe}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(this.id===null)throw new oe("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return this.id!==null||e.id!==null?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}toJSON(){const e=super.toJSON();return e.type="AttributeElement",e}_clone(e=!1){const n=super._clone(e);return n._priority=this._priority,n._id=this._id,n}_canMergeAttributesFrom(e){return this.id!==null||e.id!==null||this.priority!==e.priority?!1:super._canMergeAttributesFrom(e)}_canSubtractAttributesOf(e){return this.id!==null||e.id!==null||this.priority!==e.priority?!1:super._canSubtractAttributesOf(e)}}hm.prototype.is=function(t,e){return e?e===this.name&&(t==="attributeElement"||t==="view:attributeElement"||t==="element"||t==="view:element"):t==="attributeElement"||t==="view:attributeElement"||t==="element"||t==="view:element"||t==="node"||t==="view:node"};function CMe(){if(LT(this))return null;let t=this.parent;for(;t&&t.is("attributeElement");){if(LT(t)>1)return null;t=t.parent}return!t||LT(t)>1?null:this.childCount}function LT(t){return Array.from(t.getChildren()).filter(e=>!e.is("uiElement")).length}class GM extends ga{constructor(e,n,i,r){super(e,n,i,r),this.getFillerOffset=SMe}toJSON(){const e=super.toJSON();return e.type="EmptyElement",e}_insertChild(e,n){if(n&&(n instanceof zf||Array.from(n).length>0))throw new oe("view-emptyelement-cannot-add",[this,n]);return 0}}GM.prototype.is=function(t,e){return e?e===this.name&&(t==="emptyElement"||t==="view:emptyElement"||t==="element"||t==="view:element"):t==="emptyElement"||t==="view:emptyElement"||t==="element"||t==="view:element"||t==="node"||t==="view:node"};function SMe(){return null}class gS extends ga{constructor(e,n,i,r){super(e,n,i,r),this.getFillerOffset=TMe}_insertChild(e,n){if(n&&(n instanceof zf||Array.from(n).length>0))throw new oe("view-uielement-cannot-add",[this,n]);return 0}render(e,n){return this.toDomElement(e)}toDomElement(e){const n=e.createElement(this.name);for(const i of this.getAttributeKeys())n.setAttribute(i,this.getAttribute(i));return n}toJSON(){const e=super.toJSON();return e.type="UIElement",e}}gS.prototype.is=function(t,e){return e?e===this.name&&(t==="uiElement"||t==="view:uiElement"||t==="element"||t==="view:element"):t==="uiElement"||t==="view:uiElement"||t==="element"||t==="view:element"||t==="node"||t==="view:node"};function kMe(t){t.document.on("arrowKey",(e,n)=>EMe(e,n,t.domConverter),{priority:"low"})}function TMe(){return null}function EMe(t,e,n){if(e.keyCode==Yt.arrowright){const i=e.domTarget.ownerDocument.defaultView.getSelection(),r=i.rangeCount==1&&i.getRangeAt(0).collapsed;if(r||e.shiftKey){const o=i.focusNode,s=i.focusOffset,a=n.domPositionToView(o,s);if(a===null)return;let l=!1;const u=a.getLastMatchingPosition(c=>(c.item.is("uiElement")&&(l=!0),!!(c.item.is("uiElement")||c.item.is("attributeElement"))));if(l){const c=n.viewPositionToDom(u);r?i.collapse(c.parent,c.offset):i.extend(c.parent,c.offset)}}}}class YM extends ga{constructor(e,n,i,r){super(e,n,i,r),this.getFillerOffset=xMe}toJSON(){const e=super.toJSON();return e.type="RawElement",e}_insertChild(e,n){if(n&&(n instanceof zf||Array.from(n).length>0))throw new oe("view-rawelement-cannot-add",[this,n]);return 0}render(e,n){}}YM.prototype.is=function(t,e){return e?e===this.name&&(t==="rawElement"||t==="view:rawElement"||t==="element"||t==="view:element"):t==="rawElement"||t==="view:rawElement"||t===this.name||t==="view:"+this.name||t==="element"||t==="view:element"||t==="node"||t==="view:node"};function xMe(){return null}class af extends Fn($f){document;_children=[];_customProperties=new Map;constructor(e,n){super(),this.document=e,n&&this._insertChild(0,n)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return this.childCount===0}get root(){return this}get parent(){return null}get name(){}get getFillerOffset(){}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}toJSON(){const e=[];for(const n of this._children)e.push(n.toJSON());return e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,n){this._fireChange("children",this,{index:e});let i=0;const r=AMe(this.document,n);for(const o of r)o.parent!==null&&o._remove(),o.parent=this,this._children.splice(e,0,o),e++,i++;return i}_removeChildren(e,n=1){this._fireChange("children",this,{index:e});for(let i=e;i<e+n;i++)this._children[i].parent=null;return this._children.splice(e,n)}_fireChange(e,n,i){this.fire(`change:${e}`,n,i)}_setCustomProperty(e,n){this._customProperties.set(e,n)}_removeCustomProperty(e){return this._customProperties.delete(e)}}af.prototype.is=function(t){return t==="documentFragment"||t==="view:documentFragment"};function AMe(t,e){return typeof e=="string"?[new Ji(t,e)]:(us(e)||(e=[e]),Array.from(e).map(n=>typeof n=="string"?new Ji(t,n):n instanceof Wl?new Ji(t,n.data):n))}class dG{document;_cloneGroups=new Map;_slotFactory=null;constructor(e){this.document=e}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(e,n){this.document.selection._setFocus(e,n)}createDocumentFragment(e){return new af(this.document,e)}createText(e){return new Ji(this.document,e)}createAttributeElement(e,n,i={}){const r=new hm(this.document,e,n);return typeof i.priority=="number"&&(r._priority=i.priority),i.id&&(r._id=i.id),i.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),r}createContainerElement(e,n,i={},r={}){let o;MMe(i)?r=i:o=i;const s=new nb(this.document,e,n,o);return r.renderUnsafeAttributes&&s._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),s}createEditableElement(e,n,i={}){const r=new hS(this.document,e,n);return i.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),r}createEmptyElement(e,n,i={}){const r=new GM(this.document,e,n);return i.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),r}createUIElement(e,n,i){const r=new gS(this.document,e,n);return i&&(r.render=i),r}createRawElement(e,n,i,r={}){const o=new YM(this.document,e,n);return i&&(o.render=i),r.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...r.renderUnsafeAttributes),o}setAttribute(e,n,i,r){r!==void 0?r._setAttribute(e,n,i):i._setAttribute(e,n)}removeAttribute(e,n,i){i!==void 0?i._removeAttribute(e,n):n._removeAttribute(e)}addClass(e,n){n._addClass(e)}removeClass(e,n){n._removeClass(e)}setStyle(e,n,i){Wa(e)&&i===void 0?n._setStyle(e):i._setStyle(e,n)}removeStyle(e,n){n._removeStyle(e)}setCustomProperty(e,n,i){i._setCustomProperty(e,n)}removeCustomProperty(e,n){return n._removeCustomProperty(e)}breakAttributes(e){return e instanceof Ge?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const n=e.parent;if(!n.is("containerElement"))throw new oe("view-writer-break-non-container-element",this.document);if(!n.parent)throw new oe("view-writer-break-root",this.document);if(e.isAtStart)return Ge._createBefore(n);if(!e.isAtEnd){const i=n._clone(!1);this.insert(Ge._createAfter(n),i);const r=new Nt(e,Ge._createAt(n,"end")),o=new Ge(i,0);this.move(r,o)}return Ge._createAfter(n)}mergeAttributes(e){const n=e.offset,i=e.parent;if(i.is("$text"))return e;if(i.is("attributeElement")&&i.childCount===0){const s=i.parent,a=i.index;return i._remove(),this._removeFromClonedElementsGroup(i),this.mergeAttributes(new Ge(s,a))}const r=i.getChild(n-1),o=i.getChild(n);if(!r||!o)return e;if(r.is("$text")&&o.is("$text"))return S4(r,o);if(r.is("attributeElement")&&o.is("attributeElement")&&r.isSimilar(o)){const s=r.childCount;return r._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new Ge(r,s))}return e}mergeContainers(e){const n=e.nodeBefore,i=e.nodeAfter;if(!n||!i||!n.is("containerElement")||!i.is("containerElement"))throw new oe("view-writer-merge-containers-invalid-position",this.document);const r=n.getChild(n.childCount-1),o=r instanceof Ji?Ge._createAt(r,"end"):Ge._createAt(n,"end");return this.move(Nt._createIn(i),Ge._createAt(n,"end")),this.remove(Nt._createOn(i)),o}insert(e,n){n=us(n)?[...n]:[n],fG(n,this.document);const i=n.reduce((s,a)=>{const l=s[s.length-1],u=!a.is("uiElement");return!l||l.breakAttributes!=u?s.push({breakAttributes:u,nodes:[a]}):l.nodes.push(a),s},[]);let r=null,o=e;for(const{nodes:s,breakAttributes:a}of i){const l=this._insertNodes(o,s,a);r||(r=l.start),o=l.end}return r?new Nt(r,o):new Nt(e)}remove(e){const n=e instanceof Nt?e:Nt._createOn(e);if(Hg(n,this.document),n.isCollapsed)return new af(this.document);const{start:i,end:r}=this._breakAttributesRange(n,!0),o=i.parent,s=r.offset-i.offset,a=o._removeChildren(i.offset,s);for(const u of a)this._removeFromClonedElementsGroup(u);const l=this.mergeAttributes(i);return n.start=l,n.end=l.clone(),new af(this.document,a)}clear(e,n){Hg(e,this.document);const i=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const r of i){const o=r.item;let s;if(o.is("element")&&n.isSimilar(o))s=Nt._createOn(o);else if(!r.nextPosition.isAfter(e.start)&&o.is("$textProxy")){const a=o.getAncestors().find(l=>l.is("element")&&n.isSimilar(l));a&&(s=Nt._createIn(a))}s&&(s.end.isAfter(e.end)&&(s.end=e.end),s.start.isBefore(e.start)&&(s.start=e.start),this.remove(s))}}move(e,n){let i;if(n.isAfter(e.end)){n=this._breakAttributes(n,!0);const r=n.parent,o=r.childCount;e=this._breakAttributesRange(e,!0),i=this.remove(e),n.offset+=r.childCount-o}else i=this.remove(e);return this.insert(n,i)}wrap(e,n){if(!(n instanceof hm))throw new oe("view-writer-wrap-invalid-attribute",this.document);if(Hg(e,this.document),e.isCollapsed){let i=e.start;i.parent.is("element")&&!PMe(i.parent)&&(i=i.getLastMatchingPosition(o=>o.item.is("uiElement"))),i=this._wrapPosition(i,n);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(i),new Nt(i)}else return this._wrapRange(e,n)}unwrap(e,n){if(!(n instanceof hm))throw new oe("view-writer-unwrap-invalid-attribute",this.document);if(Hg(e,this.document),e.isCollapsed)return e;const{start:i,end:r}=this._breakAttributesRange(e,!0),o=i.parent,s=this._unwrapChildren(o,i.offset,r.offset,n),a=this.mergeAttributes(s.start);a.isEqual(s.start)||s.end.offset--;const l=this.mergeAttributes(s.end);return new Nt(a,l)}rename(e,n){const i=new nb(this.document,e,n.getAttributes());return this.insert(Ge._createAfter(n),i),this.move(Nt._createIn(n),Ge._createAt(i,0)),this.remove(Nt._createOn(n)),i}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,n){return Ge._createAt(e,n)}createPositionAfter(e){return Ge._createAfter(e)}createPositionBefore(e){return Ge._createBefore(e)}createRange(e,n){return new Nt(e,n)}createRangeOn(e){return Nt._createOn(e)}createRangeIn(e){return Nt._createIn(e)}createSelection(...e){return new aa(...e)}createSlot(e="children"){if(!this._slotFactory)throw new oe("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,n,i){let r;if(i?r=CA(e):r=e.parent.is("$text")?e.parent.parent:e.parent,!r)throw new oe("view-writer-invalid-position-container",this.document);let o;i?o=this._breakAttributes(e,!0):o=e.parent.is("$text")?DT(e):e;const s=r._insertChild(o.offset,n);for(const c of n)this._addToClonedElementsGroup(c);const a=o.getShiftedBy(s),l=this.mergeAttributes(o);l.isEqual(o)||a.offset--;const u=this.mergeAttributes(a);return new Nt(l,u)}_wrapChildren(e,n,i,r){let o=n;const s=[];for(;o<i;){const l=e.getChild(o),u=l.is("$text"),c=l.is("attributeElement");if(c&&l._canMergeAttributesFrom(r))l._mergeAttributesFrom(r),s.push(new Ge(e,o));else if(u||!c||IMe(r,l)){const d=r._clone();l._remove(),d._appendChild(l),e._insertChild(o,d),this._addToClonedElementsGroup(d),s.push(new Ge(e,o))}else this._wrapChildren(l,0,l.childCount,r);o++}let a=0;for(const l of s){if(l.offset-=a,l.offset==n)continue;this.mergeAttributes(l).isEqual(l)||(a++,i--)}return Nt._createFromParentsAndOffsets(e,n,e,i)}_unwrapChildren(e,n,i,r){let o=n;const s=[];for(;o<i;){const l=e.getChild(o);if(!l.is("attributeElement")){o++;continue}if(l.isSimilar(r)){const u=l.getChildren(),c=l.childCount;l._remove(),e._insertChild(o,u),this._removeFromClonedElementsGroup(l),s.push(new Ge(e,o),new Ge(e,o+c)),o+=c,i+=c-1;continue}if(l._canSubtractAttributesOf(r)){l._subtractAttributesOf(r),s.push(new Ge(e,o),new Ge(e,o+1)),o++;continue}this._unwrapChildren(l,0,l.childCount,r),o++}let a=0;for(const l of s){if(l.offset-=a,l.offset==n||l.offset==i)continue;this.mergeAttributes(l).isEqual(l)||(a++,i--)}return Nt._createFromParentsAndOffsets(e,n,e,i)}_wrapRange(e,n){const{start:i,end:r}=this._breakAttributesRange(e,!0),o=i.parent,s=this._wrapChildren(o,i.offset,r.offset,n),a=this.mergeAttributes(s.start);a.isEqual(s.start)||s.end.offset--;const l=this.mergeAttributes(s.end);return new Nt(a,l)}_wrapPosition(e,n){if(n.isSimilar(e.parent))return C4(e.clone());e.parent.is("$text")&&(e=DT(e));const i=this.createAttributeElement("_wrapPosition-fake-element");i._priority=Number.POSITIVE_INFINITY,i.isSimilar=()=>!1,e.parent._insertChild(e.offset,i);const r=new Nt(e,e.getShiftedBy(1));this.wrap(r,n);const o=new Ge(i.parent,i.index);i._remove();const s=o.nodeBefore,a=o.nodeAfter;return s&&s.is("view:$text")&&a&&a.is("view:$text")?S4(s,a):C4(o)}_breakAttributesRange(e,n=!1){const i=e.start,r=e.end;if(Hg(e,this.document),e.isCollapsed){const l=this._breakAttributes(e.start,n);return new Nt(l,l)}const o=this._breakAttributes(r,n),s=o.parent.childCount,a=this._breakAttributes(i,n);return o.offset+=o.parent.childCount-s,new Nt(a,o)}_breakAttributes(e,n=!1){const i=e.offset,r=e.parent;if(e.parent.is("emptyElement"))throw new oe("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new oe("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new oe("view-writer-cannot-break-raw-element",this.document);if(!n&&r.is("$text")&&SA(r.parent)||SA(r))return e.clone();if(r.is("$text"))return this._breakAttributes(DT(e),n);const o=r.childCount;if(i==o){const s=new Ge(r.parent,r.index+1);return this._breakAttributes(s,n)}else if(i===0){const s=new Ge(r.parent,r.index);return this._breakAttributes(s,n)}else{const s=r.index+1,a=r._clone();r.parent._insertChild(s,a),this._addToClonedElementsGroup(a);const l=r.childCount-i,u=r._removeChildren(i,l);a._appendChild(u);const c=new Ge(r.parent,s);return this._breakAttributes(c,n)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const r of e.getChildren())this._addToClonedElementsGroup(r);const n=e.id;if(!n)return;let i=this._cloneGroups.get(n);i||(i=new Set,this._cloneGroups.set(n,i)),i.add(e),e._clonesGroup=i}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const r of e.getChildren())this._removeFromClonedElementsGroup(r);const n=e.id;if(!n)return;const i=this._cloneGroups.get(n);i&&i.delete(e)}}function PMe(t){return Array.from(t.getChildren()).some(e=>!e.is("uiElement"))}function CA(t){let e=t.parent;for(;!SA(e);){if(!e)return;e=e.parent}return e}function IMe(t,e){return t.priority<e.priority?!0:t.priority>e.priority?!1:t.getIdentity()<e.getIdentity()}function C4(t){const e=t.nodeBefore;if(e&&e.is("$text"))return new Ge(e,e.data.length);const n=t.nodeAfter;return n&&n.is("$text")?new Ge(n,0):t}function DT(t){if(t.offset==t.parent.data.length)return new Ge(t.parent.parent,t.parent.index+1);if(t.offset===0)return new Ge(t.parent.parent,t.parent.index);const e=t.parent.data.slice(t.offset);return t.parent._data=t.parent.data.slice(0,t.offset),t.parent.parent._insertChild(t.parent.index+1,new Ji(t.root.document,e)),new Ge(t.parent.parent,t.parent.index+1)}function S4(t,e){const n=t.data.length;return t._data+=e.data,e._remove(),new Ge(t,n)}const RMe=[Ji,hm,nb,GM,YM,gS];function fG(t,e){for(const n of t){if(!RMe.some(i=>n instanceof i))throw new oe("view-writer-insert-invalid-node-type",e);n.is("$text")||fG(n.getChildren(),e)}}function SA(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function Hg(t,e){const n=CA(t.start),i=CA(t.end);if(!n||!i||n!==i)throw new oe("view-writer-invalid-range-container",e)}function MMe(t){return Wa(t)}const hG=t=>t.createTextNode(" "),mG=t=>{const e=t.createElement("span");return e.dataset.ckeFiller="true",e.innerText=" ",e},gG=t=>{const e=t.createElement("br");return e.dataset.ckeFiller="true",e},ts=7,ib="".repeat(ts);function Qr(t){return typeof t=="string"?t.substr(0,ts)===ib:fi(t)&&t.data.substr(0,ts)===ib}function Kh(t){return t.data.length==ts&&Qr(t)}function k4(t){const e=typeof t=="string"?t:t.data;return Qr(t)?e.slice(ts):e}function OMe(t){t.document.on("arrowKey",LMe,{priority:"low"})}function LMe(t,e){if(e.keyCode==Yt.arrowleft){const n=e.domTarget.ownerDocument.defaultView.getSelection();if(n.rangeCount==1&&n.getRangeAt(0).collapsed){const i=n.getRangeAt(0).startContainer,r=n.getRangeAt(0).startOffset;Qr(i)&&r<=ts&&n.collapse(i,0)}}}class DMe extends Ln(){domDocuments=new Set;domConverter;markedAttributes=new Set;markedChildren=new Set;markedTexts=new Set;selection;_inlineFiller=null;_fakeSelectionContainer=null;constructor(e,n){super(),this.domConverter=e,this.selection=n,this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),vt.isBlink&&!vt.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()})}markToSync(e,n){if(e==="text")this.domConverter.mapViewToDom(n.parent)&&this.markedTexts.add(n);else{if(!this.domConverter.mapViewToDom(n))return;if(e==="attributes")this.markedAttributes.add(n);else if(e==="children")this.markedChildren.add(n);else throw new oe("view-renderer-unknown-type",this)}}render(){if(this.isComposing&&!vt.isAndroid)return;let e=null;const n=vt.isBlink&&!vt.isAndroid?!this.isSelecting:!0;for(const i of this.markedChildren)this._updateChildrenMappings(i);n?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=Ge._createBefore(e.parent)));for(const i of this.markedAttributes)this._updateAttrs(i);for(const i of this.markedChildren)this._updateChildren(i,{inlineFillerPosition:e});for(const i of this.markedTexts)!this.markedChildren.has(i.parent)&&this.domConverter.mapViewToDom(i.parent)&&this._updateText(i,{inlineFillerPosition:e});if(n)if(e){const i=this.domConverter.viewPositionToDom(e),r=i.parent.ownerDocument;Qr(i.parent)?this._inlineFiller=i.parent:this._inlineFiller=T4(r,i.parent,i.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.domConverter._clearTemporaryCustomProperties(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const n=this.domConverter.mapViewToDom(e);if(!n)return;const i=Array.from(n.childNodes),r=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),o=this._diffNodeLists(i,r),s=this._findUpdateActions(o,i,r,BMe);if(s.indexOf("update")!==-1){const a={equal:0,insert:0,delete:0};for(const l of s)if(l==="update"){const u=a.equal+a.insert,c=a.equal+a.delete,d=e.getChild(u);d&&!d.is("uiElement")&&!d.is("rawElement")&&this._updateElementMappings(d,i[c]),a4(r[u]),a.equal++}else a[l]++}}_updateElementMappings(e,n){this.domConverter.unbindDomElement(n),this.domConverter.bindElements(n,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Ge._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),n=this.domConverter.viewPositionToDom(e);return!!(n&&fi(n.parent)&&Qr(n.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!Qr(e))throw new oe("view-renderer-filler-was-lost",this);Kh(e)?e.remove():e.data=e.data.substr(ts),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),n=e.parent,i=e.offset;if(!this.domConverter.mapViewToDom(n.root)||!n.is("element")||!NMe(n))return!1;const r=e.nodeBefore,o=e.nodeAfter;return!(r instanceof Ji||o instanceof Ji||i===n.getFillerOffset()&&(!r||!r.is("element","br"))||vt.isAndroid&&(r||o))}_updateText(e,n){const i=this.domConverter.findCorrespondingDomText(e);let o=this.domConverter.viewToDom(e).data;const s=n.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(o=ib+o),this._updateTextNode(i,o)}_updateAttrs(e){const n=this.domConverter.mapViewToDom(e);if(n){for(const i of Array.from(n.attributes)){const r=i.name;e.hasAttribute(r)||this.domConverter.removeDomElementAttribute(n,r)}for(const i of e.getAttributeKeys())this.domConverter.setDomElementAttribute(n,i,e.getAttribute(i),e)}}_updateChildren(e,n){const i=this.domConverter.mapViewToDom(e);if(!i)return;if(vt.isAndroid){let d=null;for(const f of Array.from(i.childNodes)){if(d&&fi(d)&&fi(f)){i.normalize();break}d=f}}const r=n.inlineFillerPosition,o=i.childNodes,s=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));r&&r.parent===e&&T4(i.ownerDocument,s,r.offset);const a=this._diffNodeLists(o,s),l=this._findUpdateActions(a,o,s,VMe);let u=0;const c=new Set;for(const d of l)d==="delete"?(c.add(o[u]),a4(o[u])):(d==="equal"||d==="update")&&u++;u=0;for(const d of l)d==="insert"?(eG(i,u,s[u]),u++):d==="update"?(this._updateTextNode(o[u],s[u].data),u++):d==="equal"&&(this._markDescendantTextToSync(this.domConverter.domToView(s[u])),u++);for(const d of c)d.parentNode||this.domConverter.unbindDomElement(d)}_diffNodeLists(e,n){return e=zMe(e,this._fakeSelectionContainer),fm(e,n,FMe.bind(null,this.domConverter))}_findUpdateActions(e,n,i,r){if(e.indexOf("insert")===-1||e.indexOf("delete")===-1)return e;let o=[],s=[],a=[];const l={equal:0,insert:0,delete:0};for(const u of e)u==="insert"?a.push(i[l.equal+l.insert]):u==="delete"?s.push(n[l.equal+l.delete]):(o=o.concat(fm(s,a,r).map(c=>c==="equal"?"update":c)),o.push("equal"),s=[],a=[]),l[u]++;return o.concat(fm(s,a,r).map(u=>u==="equal"?"update":u))}_updateTextNode(e,n){const i=e.data;i!=n&&(vt.isAndroid&&this.isComposing&&i.replace(/\u00A0/g," ")==n.replace(/\u00A0/g," ")||this._updateTextNodeInternal(e,n))}_updateTextNodeInternal(e,n){const i=FK(e.data,n);for(const r of i)r.type==="insert"?e.insertData(r.index,r.values.join("")):e.deleteData(r.index,r.howMany)}_markDescendantTextToSync(e){if(e){if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const n of e.getChildren())this._markDescendantTextToSync(n)}}_updateSelection(){if(vt.isBlink&&!vt.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(this.selection.rangeCount===0){this._removeDomSelection(),this._removeFakeSelection();return}const e=this.domConverter.mapViewToDom(this.selection.editableElement);if(!this.isFocused||!e){!this.selection.isFake&&this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected&&this._removeFakeSelection();return}this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&vt.isAndroid||this._updateDomSelection(e)}_updateFakeSelection(e){const n=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=HMe(n));const i=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(i,this.selection),!this._fakeSelectionNeedsUpdate(e))return;(!i.parentElement||i.parentElement!=e)&&e.appendChild(i),i.textContent=this.selection.fakeSelectionLabel||" ";const r=n.getSelection(),o=n.createRange();r.removeAllRanges(),o.selectNodeContents(i),r.addRange(o)}_updateDomSelection(e){const n=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(n))return;const i=this.domConverter.viewPositionToDom(this.selection.anchor),r=this.domConverter.viewPositionToDom(this.selection.focus);n.setBaseAndExtent(i.parent,i.offset,r.parent,r.offset),vt.isGecko&&$Me(r,n)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const n=e&&this.domConverter.domSelectionToView(e);return!(n&&this.selection.isEqual(n)||!this.selection.isCollapsed&&this.selection.isSimilar(n))}_fakeSelectionNeedsUpdate(e){const n=this._fakeSelectionContainer,i=e.ownerDocument.getSelection();return!n||n.parentElement!==e||i.anchorNode!==n&&!n.contains(i.anchorNode)?!0:n.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments){const n=e.getSelection();if(n.rangeCount){const i=e.activeElement,r=this.domConverter.mapDomToView(i);i&&r&&n.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function NMe(t){if(t.getAttribute("contenteditable")=="false")return!1;const e=t.findAncestor(n=>n.hasAttribute("contenteditable"));return!e||e.getAttribute("contenteditable")=="true"}function T4(t,e,n){const i=e instanceof Array?e:e.childNodes,r=i[n];if(fi(r))return r.data=ib+r.data,r;{const o=t.createTextNode(ib);return Array.isArray(e)?i.splice(n,0,o):eG(e,n,o),o}}function BMe(t,e){return Mc(t)&&Mc(e)&&!fi(t)&&!fi(e)&&!ev(t)&&!ev(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function VMe(t,e){return Mc(t)&&Mc(e)&&fi(t)&&fi(e)}function FMe(t,e,n){return e===n?!0:fi(e)&&fi(n)?e.data===n.data:!!(t.isBlockFiller(e)&&t.isBlockFiller(n))}function $Me(t,e){let n=t.parent,i=t.offset;if(fi(n)&&Kh(n)&&(i=jh(n)+1,n=n.parentNode),n.nodeType!=Node.ELEMENT_NODE||i!=n.childNodes.length-1)return;const r=n.childNodes[i];r&&r.tagName=="BR"&&e.addRange(e.getRangeAt(0))}function zMe(t,e){const n=Array.from(t);return n.length==0||!e||n[n.length-1]==e&&n.pop(),n}function HMe(t){const e=t.createElement("div");return e.className="ck-fake-selection-container",Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),e.textContent=" ",e}const UMe=gG(Qe.document),WMe=hG(Qe.document),qMe=mG(Qe.document),ry="data-ck-unsafe-attribute-",E4="data-ck-unsafe-element";class pS{document;renderingMode;blockFillerMode;preElements;blockElements;inlineObjectElements;unsafeElements;_domDocument;_domToViewMapping=new WeakMap;_viewToDomMapping=new WeakMap;_fakeSelectionMapping=new WeakMap;_rawContentElementMatcher=new pl;_inlineObjectElementMatcher=new pl;_elementsWithTemporaryCustomProperties=new Set;constructor(e,{blockFillerMode:n,renderingMode:i="editing"}={}){this.document=e,this.renderingMode=i,this.blockFillerMode=n||(i==="editing"?"br":"nbsp"),this.preElements=["pre","textarea"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument=this.renderingMode==="editing"?Qe.document:Qe.document.implementation.createHTMLDocument("")}get domDocument(){return this._domDocument}bindFakeSelection(e,n){this._fakeSelectionMapping.set(e,new aa(n))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,n){this._domToViewMapping.set(e,n),this._viewToDomMapping.set(n,e)}unbindDomElement(e){const n=this._domToViewMapping.get(e);if(n){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(n);for(const i of e.children)this.unbindDomElement(i)}}bindDocumentFragments(e,n){this._domToViewMapping.set(e,n),this._viewToDomMapping.set(n,e)}shouldRenderAttribute(e,n,i){return this.renderingMode==="data"?!0:(e=e.toLowerCase(),e.startsWith("on")||e==="srcdoc"&&n.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i)?!1:i==="img"&&(e==="src"||e==="srcset")||i==="source"&&e==="srcset"?!0:!n.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,n){if(this.renderingMode==="data"){e.innerHTML=n;return}const i=new DOMParser().parseFromString(n,"text/html"),r=i.createDocumentFragment(),o=i.body.childNodes;for(;o.length>0;)r.appendChild(o[0]);const s=i.createTreeWalker(r,NodeFilter.SHOW_ELEMENT),a=[];let l;for(;l=s.nextNode();)a.push(l);for(const u of a){for(const d of u.getAttributeNames())this.setDomElementAttribute(u,d,u.getAttribute(d));const c=u.tagName.toLowerCase();this._shouldRenameElement(c)&&(I4(c),u.replaceWith(this._createReplacementDomElement(c,u)))}for(;e.firstChild;)e.firstChild.remove();e.append(r)}viewToDom(e,n={}){if(e.is("$text")){const i=this._processDataFromViewText(e);return this._domDocument.createTextNode(i)}else{const i=e;if(this.mapViewToDom(i))if(i.getCustomProperty("editingPipeline:doNotReuseOnce"))this._elementsWithTemporaryCustomProperties.add(i);else return this.mapViewToDom(i);let r;if(i.is("documentFragment"))r=this._domDocument.createDocumentFragment(),n.bind&&this.bindDocumentFragments(r,i);else{if(i.is("uiElement"))return i.name==="$comment"?r=this._domDocument.createComment(i.getCustomProperty("$rawContent")):r=i.render(this._domDocument,this),n.bind&&this.bindElements(r,i),r;this._shouldRenameElement(i.name)?(I4(i.name),r=this._createReplacementDomElement(i.name)):i.hasAttribute("xmlns")?r=this._domDocument.createElementNS(i.getAttribute("xmlns"),i.name):r=this._domDocument.createElement(i.name),i.is("rawElement")&&i.render(r,this),n.bind&&this.bindElements(r,i);for(const o of i.getAttributeKeys())this.setDomElementAttribute(r,o,i.getAttribute(o),i)}if(n.withChildren!==!1)for(const o of this.viewChildrenToDom(i,n))r instanceof HTMLTemplateElement?r.content.appendChild(o):r.appendChild(o);return r}}setDomElementAttribute(e,n,i,r){const o=this.shouldRenderAttribute(n,i,e.tagName.toLowerCase())||r&&r.shouldRenderUnsafeAttribute(n);if(o||hn("domconverter-unsafe-attribute-detected",{domElement:e,key:n,value:i}),!CRe(n)){hn("domconverter-invalid-attribute-detected",{domElement:e,key:n,value:i});return}e.hasAttribute(n)&&!o?e.removeAttribute(n):e.hasAttribute(ry+n)&&o&&e.removeAttribute(ry+n),e.setAttribute(o?n:ry+n,i)}removeDomElementAttribute(e,n){n!=E4&&(e.removeAttribute(n),e.removeAttribute(ry+n))}*viewChildrenToDom(e,n={}){const i=e.getFillerOffset&&e.getFillerOffset();let r=0;for(const o of e.getChildren()){i===r&&(yield this._getBlockFiller());const s=o.is("element")&&!!o.getCustomProperty("dataPipeline:transparentRendering")&&!Mi(o.getAttributes());if(s&&this.renderingMode=="data")if(o.is("rawElement")){const a=this._domDocument.createElement(o.name);o.render(a,this),yield*[...a.childNodes]}else yield*this.viewChildrenToDom(o,n);else s&&hn("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:o}),yield this.viewToDom(o,n);r++}i===r&&(yield this._getBlockFiller())}viewRangeToDom(e){const n=this.viewPositionToDom(e.start),i=this.viewPositionToDom(e.end),r=this._domDocument.createRange();return r.setStart(n.parent,n.offset),r.setEnd(i.parent,i.offset),r}viewPositionToDom(e){const n=e.parent;if(n.is("$text")){const i=this.findCorrespondingDomText(n);if(!i)return null;let r=e.offset;return Qr(i)&&(r+=ts),i.data&&r>i.data.length&&(r=i.data.length),{parent:i,offset:r}}else{let i,r,o;if(e.offset===0){if(i=this.mapViewToDom(n),!i)return null;o=i.childNodes[0]}else{const a=e.nodeBefore;if(r=a.is("$text")?this.findCorrespondingDomText(a):this.mapViewToDom(a),!r)return null;i=r.parentNode,o=r.nextSibling}if(fi(o)&&Qr(o))return{parent:o,offset:ts};const s=r?jh(r)+1:0;return{parent:i,offset:s}}}domToView(e,n={}){const i=[],r=this._domToView(e,n,i),o=r.next().value;return!o||(r.next(),this._processDomInlineNodes(null,i,n),this.blockFillerMode=="br"&&A4(o))||o.is("$text")&&o.data.length==0?null:o}*domChildrenToView(e,n={},i=[]){let r=[];e instanceof HTMLTemplateElement?r=[...e.content.childNodes]:r=[...e.childNodes];for(let o=0;o<r.length;o++){const s=r[o],a=this._domToView(s,n,i),l=a.next().value;l!==null&&(this._isBlockViewElement(l)&&this._processDomInlineNodes(e,i,n),this.blockFillerMode=="br"&&A4(l)||(yield l),a.next())}this._processDomInlineNodes(e,i,n)}domSelectionToView(e){if(XMe(e))return new aa([]);if(e.rangeCount===1){let r=e.getRangeAt(0).startContainer;fi(r)&&(r=r.parentNode);const o=this.fakeSelectionToView(r);if(o)return o}const n=this.isDomSelectionBackward(e),i=[];for(let r=0;r<e.rangeCount;r++){const o=e.getRangeAt(r),s=this.domRangeToView(o);s&&i.push(s)}return new aa(i,{backward:n})}domRangeToView(e){const n=this.domPositionToView(e.startContainer,e.startOffset),i=this.domPositionToView(e.endContainer,e.endOffset);return n&&i?new Nt(n,i):null}domPositionToView(e,n=0){if(this.isBlockFiller(e))return this.domPositionToView(e.parentNode,jh(e));const i=this.mapDomToView(e);if(i&&(i.is("uiElement")||i.is("rawElement")))return Ge._createBefore(i);if(fi(e)){if(Kh(e))return this.domPositionToView(e.parentNode,jh(e));const r=this.findCorrespondingViewText(e);let o=n;return r?(Qr(e)&&(o-=ts,o=o<0?0:o),new Ge(r,o)):null}else{if(n===0){const r=this.mapDomToView(e);if(r)return new Ge(r,0)}else{const r=e.childNodes[n-1];if(fi(r)&&Kh(r)||r&&this.isBlockFiller(r))return this.domPositionToView(r.parentNode,jh(r));const o=fi(r)?this.findCorrespondingViewText(r):this.mapDomToView(r);if(o&&o.parent)return new Ge(o.parent,o.index+1)}return null}}mapDomToView(e){return this.getHostViewElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Kh(e))return null;const n=this.getHostViewElement(e);if(n)return n;const i=e.previousSibling;if(i){if(!this.isElement(i))return null;const r=this.mapDomToView(i);if(r){const o=r.nextSibling;return o instanceof Ji?o:null}}else{const r=this.mapDomToView(e.parentNode);if(r){const o=r.getChild(0);return o instanceof Ji?o:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const n=e.previousSibling;return n&&this.mapViewToDom(n)?this.mapViewToDom(n).nextSibling:!n&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const n=this.mapViewToDom(e);if(!n||n.ownerDocument.activeElement===n)return;const{scrollX:i,scrollY:r}=Qe.window,o=[];x4(n,s=>{const{scrollLeft:a,scrollTop:l}=s;o.push([a,l])}),n.focus({preventScroll:!0}),x4(n,s=>{const[a,l]=o.shift();s.scrollLeft=a,s.scrollTop=l}),Qe.window.scrollTo(i,r)}_clearDomSelection(){const e=this.mapViewToDom(this.document.selection.editableElement);if(!e)return;const n=e.ownerDocument.defaultView.getSelection(),i=this.domSelectionToView(n);i&&i.rangeCount>0&&n.removeAllRanges()}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return this.blockFillerMode=="br"?e.isEqualNode(UMe):P4(e,this.blockElements)?!0:e.isEqualNode(qMe)||KMe(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const n=this._domDocument.createRange();try{n.setStart(e.anchorNode,e.anchorOffset),n.setEnd(e.focusNode,e.focusOffset)}catch{return!1}const i=n.collapsed;return n.detach(),i}getHostViewElement(e){const n=vRe(e);for(n.pop();n.length;){const i=n.pop(),r=this._domToViewMapping.get(i);if(r&&(r.is("uiElement")||r.is("rawElement")))return r}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}registerInlineObjectMatcher(e){this._inlineObjectElementMatcher.add(e)}_clearTemporaryCustomProperties(){for(const e of this._elementsWithTemporaryCustomProperties)e._removeCustomProperty("editingPipeline:doNotReuseOnce");this._elementsWithTemporaryCustomProperties.clear()}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return hG(this._domDocument);case"markedNbsp":return mG(this._domDocument);case"br":return gG(this._domDocument)}}_isDomSelectionPositionCorrect(e,n){if(fi(e)&&Qr(e)&&n<ts||this.isElement(e)&&Qr(e.childNodes[n]))return!1;const i=this.mapDomToView(e);return!(i&&(i.is("uiElement")||i.is("rawElement")))}*_domToView(e,n,i){if(this.blockFillerMode!="br"&&P4(e,this.blockElements))return null;const r=this.getHostViewElement(e);if(r)return r;if(ev(e)&&n.skipComments)return null;if(fi(e)){if(Kh(e))return null;{const o=e.data;if(o==="")return null;const s=new Ji(this.document,o);return i.push(s),s}}else{let o=this.mapDomToView(e);if(o)return this._isInlineObjectElement(o)&&i.push(o),o;if(this.isDocumentFragment(e))o=new af(this.document),n.bind&&this.bindDocumentFragments(e,o);else{o=this._createViewElement(e,n),n.bind&&this.bindElements(e,o);const a=e.attributes;if(a)for(let l=a.length,u=0;u<l;u++)o._setAttribute(a[u].name,a[u].value);if(this._isViewElementWithRawContent(o,n))return o._setCustomProperty("$rawContent",e.innerHTML),this._isBlockViewElement(o)||i.push(o),o;if(ev(e))return o._setCustomProperty("$rawContent",e.data),o}yield o;const s=[];if(n.withChildren!==!1)for(const a of this.domChildrenToView(e,n,s))o._appendChild(a);if(this._isInlineObjectElement(o))i.push(o),this._processDomInlineNodes(null,s,n);else for(const a of s)i.push(a)}}_processDomInlineNodes(e,n,i){if(!n.length||e&&!this.isDocumentFragment(e)&&!this._isBlockDomElement(e))return;let r=!1;for(let o=0;o<n.length;o++){const s=n[o];if(!s.is("$text")){r=!1;continue}let a,l=!1;if(this._isPreFormatted(s))a=k4(s.data);else{a=s.data.replace(/[ \n\t\r]{1,}/g," "),l=/[^\S\u00A0]/.test(a.charAt(a.length-1));const u=o>0?n[o-1]:null,c=o+1<n.length?n[o+1]:null,d=!u||u.is("element")&&u.name=="br"||r,f=c?!1:!Qr(s.data);i.withChildren!==!1&&(d&&(a=a.replace(/^ /,"")),f&&(a=a.replace(/ $/,""))),a=k4(a),this.blockFillerMode!="br"&&s.parent&&(YMe(s.parent,a)?(a="",s.parent.parent&&(s.parent.parent._setCustomProperty("$hasBlockFiller",!0),s.parent._remove())):GMe(s.parent,a,this.blockElements)&&(a="",s.parent._setCustomProperty("$hasBlockFiller",!0))),a=a.replace(/ \u00A0/g," ");const h=c&&c.is("element")&&c.name!="br",m=c&&c.is("$text")&&c.data.charAt(0)==" ";(/[ \u00A0]\u00A0$/.test(a)||!c||h||m)&&(a=a.replace(/\u00A0$/," ")),(d||u&&u.is("element")&&u.name!="br")&&(a=a.replace(/^\u00A0/," "))}a.length==0&&s.parent?(s._remove(),n.splice(o,1),o--):(s._data=a,r=l)}n.length=0}_processDataFromViewText(e){let n=e.data;if(this._isPreFormatted(e))return n;if(n.charAt(0)==" "){const i=this._getTouchingInlineViewNode(e,!1);(i&&i.is("$textProxy")&&this._nodeEndsWithSpace(i)||!i)&&(n=" "+n.substr(1))}if(n.charAt(n.length-1)==" "){const i=this._getTouchingInlineViewNode(e,!0),r=i&&i.is("$textProxy")&&i.data.charAt(0)==" ";(n.charAt(n.length-2)==" "||!i||r)&&(n=n.substr(0,n.length-1)+" ")}return n.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(this._isPreFormatted(e))return!1;const n=this._processDataFromViewText(e);return n.charAt(n.length-1)==" "}_isPreFormatted(e){if(jMe(e,this.preElements))return!0;for(const n of e.getAncestors({parentFirst:!0}))if(!(!n.is("element")||!n.hasStyle("white-space")||n.getStyle("white-space")==="inherit"))return["pre","pre-wrap","break-spaces"].includes(n.getStyle("white-space"));return!1}_getTouchingInlineViewNode(e,n){const i=new Xd({startPosition:n?Ge._createAfter(e):Ge._createBefore(e),direction:n?"forward":"backward"});for(const{item:r}of i){if(r.is("$textProxy"))return r;if(r.is("element")&&r.getCustomProperty("dataPipeline:transparentRendering"))continue;if(r.is("element","br"))return null;if(this._isInlineObjectElement(r))return r;if(r.is("containerElement")||this._isBlockViewElement(r))return null}return null}_isBlockDomElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isBlockViewElement(e){return e.is("element")&&this.blockElements.includes(e.name)}_isInlineObjectElement(e){return e.is("element")?e.name=="br"||this.inlineObjectElements.includes(e.name)||!!this._inlineObjectElementMatcher.match(e):!1}_createViewElement(e,n){if(ev(e))return new gS(this.document,"$comment");const i=n.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new ga(this.document,i)}_isViewElementWithRawContent(e,n){return n.withChildren!==!1&&e.is("element")&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const n=e.toLowerCase();return this.renderingMode==="editing"&&this.unsafeElements.includes(n)}_createReplacementDomElement(e,n){const i=this._domDocument.createElement("span");if(i.setAttribute(E4,e),n){for(;n.firstChild;)i.appendChild(n.firstChild);for(const r of n.getAttributeNames())i.setAttribute(r,n.getAttribute(r))}return i}}function jMe(t,e){return t.getAncestors().some(n=>n.is("element")&&e.includes(n.name))}function x4(t,e){let n=t;for(;n;)e(n),n=n.parentElement}function KMe(t,e){return t.isEqualNode(WMe)&&pG(t,e)&&t.parentNode.childNodes.length===1}function pG(t,e){const n=t.parentNode;return!!n&&!!n.tagName&&e.includes(n.tagName.toLowerCase())}function GMe(t,e,n){return e==" "&&t&&t.is("element")&&t.childCount==1&&n.includes(t.name)}function YMe(t,e){return e==" "&&t&&t.is("element","span")&&t.childCount==1&&t.hasAttribute("data-cke-filler")}function A4(t){return t.is("element","br")&&t.hasAttribute("data-cke-filler")}function P4(t,e){return t.tagName==="BR"&&pG(t,e)&&t.parentNode.childNodes.length===1}function I4(t){t==="script"&&hn("domconverter-unsafe-script-element-detected"),t==="style"&&hn("domconverter-unsafe-style-element-detected")}function XMe(t){if(!vt.isGecko||!t.rangeCount)return!1;const e=t.getRangeAt(0).startContainer;try{Object.prototype.toString.call(e)}catch{return!0}return!1}class _l extends zo(){view;document;_isEnabled=!1;constructor(e){super(),this.view=e,this.document=e.document}get isEnabled(){return this._isEnabled}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&e.nodeType===3&&(e=e.parentNode),!e||e.nodeType!==1?!1:e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}class Sf{view;document;domEvent;domTarget;constructor(e,n,i){this.view=e,this.document=e.document,this.domEvent=n,this.domTarget=n.target,BK(this,i)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Cl extends _l{useCapture=!1;usePassive=!1;observe(e){(typeof this.domEventType=="string"?[this.domEventType]:this.domEventType).forEach(i=>{this.listenTo(e,i,(r,o)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(o.target)&&this.onDomEvent(o)},{useCapture:this.useCapture,usePassive:this.usePassive})})}stopObserving(e){this.stopListening(e)}fire(e,n,i){this.isEnabled&&this.document.fire(e,new Sf(this.view,n,i))}}class JMe extends Cl{domEventType=["keydown","keyup"];onDomEvent(e){const n={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return Gm(this)}};this.fire(e.type,e,n)}}class ZMe extends _l{_fireSelectionChangeDoneDebounced;constructor(e){super(e),this._fireSelectionChangeDoneDebounced=ml(n=>{this.document.fire("selectionChangeDone",n)},200)}observe(){const e=this.document;e.on("arrowKey",(n,i)=>{e.selection.isFake&&this.isEnabled&&i.preventDefault()},{context:"$capture"}),e.on("arrowKey",(n,i)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(i.keyCode)},{priority:"lowest"})}stopObserving(){}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const n=this.document.selection,i=new aa(n.getRanges(),{backward:n.isBackward,fake:!1});(e==Yt.arrowleft||e==Yt.arrowup)&&i.setTo(i.getFirstPosition()),(e==Yt.arrowright||e==Yt.arrowdown)&&i.setTo(i.getLastPosition());const r={oldSelection:n,newSelection:i,domSelection:null};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}let vG=class extends _l{domConverter;_config;_domElements;_mutationObserver;constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this._domElements=new Set,this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.add(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}stopObserving(e){if(this._domElements.delete(e),this.isEnabled){this._mutationObserver.disconnect();for(const n of this._domElements)this._mutationObserver.observe(n,this._config)}}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(e.length===0)return;const n=this.domConverter,i=new Set,r=new Set;for(const s of e){const a=n.mapDomToView(s.target);a&&(a.is("uiElement")||a.is("rawElement")||s.type==="childList"&&!this._isBogusBrMutation(s)&&r.add(a))}for(const s of e){const a=n.mapDomToView(s.target);if(!(a&&(a.is("uiElement")||a.is("rawElement")))&&s.type==="characterData"){const l=n.findCorrespondingViewText(s.target);l&&!r.has(l.parent)?i.add(l):!l&&Qr(s.target)&&r.add(n.mapDomToView(s.target.parentNode))}}const o=[];for(const s of i)o.push({type:"text",node:s});for(const s of r){const a=n.mapViewToDom(s),l=Array.from(s.getChildren()),u=Array.from(n.domChildrenToView(a,{withChildren:!1}));pA(l,u,QMe)||o.push({type:"children",node:s})}o.length&&this.document.fire("mutations",{mutations:o})}_isBogusBrMutation(e){let n=null;return e.nextSibling===null&&e.removedNodes.length===0&&e.addedNodes.length==1&&(n=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),n&&n.is("element","br")}};function QMe(t,e){if(!Array.isArray(t))return t===e?!0:t.is("$text")&&e.is("$text")?t.data===e.data:!1}class d1 extends Cl{_renderTimeoutId=null;_isFocusChanging=!1;domEventType=["focus","blur"];constructor(e){super(e),this.useCapture=!0;const n=this.document;n.on("focus",()=>this._handleFocus()),n.on("blur",(i,r)=>this._handleBlur(r)),n.on("beforeinput",()=>{n.isFocused||this._handleFocus()},{priority:"highest"})}flush(){this._isFocusChanging&&(this._isFocusChanging=!1,this.document.isFocused=!0)}onDomEvent(e){this.fire(e.type,e)}destroy(){this._clearTimeout(),super.destroy()}_handleFocus(){this._clearTimeout(),this._isFocusChanging=!0,this._renderTimeoutId=setTimeout(()=>{this._renderTimeoutId=null,this.flush(),this.view.change(()=>{})},50)}_handleBlur(e){const n=this.document.selection.editableElement;(n===null||n===e.target)&&(this.document.isFocused=!1,this._isFocusChanging=!1,this.view.change(()=>{}))}_clearTimeout(){this._renderTimeoutId&&(clearTimeout(this._renderTimeoutId),this._renderTimeoutId=null)}}class eOe extends _l{mutationObserver;focusObserver;selection;domConverter;_documents=new WeakSet;_fireSelectionChangeDoneDebounced;_clearInfiniteLoopInterval;_documentIsSelectingInactivityTimeoutDebounced;_loopbackCounter=0;_pendingSelectionChange=new Set;constructor(e){super(e),this.mutationObserver=e.getObserver(vG),this.focusObserver=e.getObserver(d1),this.selection=this.document.selection,this.domConverter=e.domConverter,this._fireSelectionChangeDoneDebounced=ml(n=>{this.document.fire("selectionChangeDone",n)},200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=ml(()=>this.document.isSelecting=!1,5e3),this.view.document.on("change:isFocused",(n,i,r)=>{if(r&&this._pendingSelectionChange.size){for(const o of Array.from(this._pendingSelectionChange))this._handleSelectionChange(o);this._pendingSelectionChange.clear()}})}observe(e){const n=e.ownerDocument,i=()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},r=()=>{this.document.isSelecting&&(this._handleSelectionChange(n),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",i,{priority:"highest"}),this.listenTo(e,"keydown",r,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",r,{priority:"highest",useCapture:!0}),!this._documents.has(n)&&(this.listenTo(n,"mouseup",r,{priority:"highest",useCapture:!0}),this.listenTo(n,"selectionchange",()=>{this.document.isComposing&&!vt.isAndroid||(this._handleSelectionChange(n),this._documentIsSelectingInactivityTimeoutDebounced())}),this.listenTo(this.view.document,"compositionstart",()=>{this._handleSelectionChange(n)},{priority:"lowest"}),this._documents.add(n))}stopObserving(e){this.stopListening(e)}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_reportInfiniteLoop(){}_handleSelectionChange(e){if(!this.isEnabled)return;const n=e.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(n);if(i.rangeCount==0){this.view.hasDomSelection=!1;return}if(this.view.hasDomSelection=!0,this.focusObserver.flush(),!this.view.document.isFocused&&!this.view.document.isReadOnly){this._pendingSelectionChange.add(e);return}if(this._pendingSelectionChange.delete(e),!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(n))){if(++this._loopbackCounter>60){this._reportInfiniteLoop();return}if(!tOe(i))this.view.forceRender();else if(this.selection.isSimilar(i))this.view.forceRender();else{const r={oldSelection:this.selection,newSelection:i,domSelection:n};this.document.fire("selectionChange",r),this._fireSelectionChangeDoneDebounced(r)}}}_clearInfiniteLoop(){this._loopbackCounter=0}}function tOe(t){return Array.from(t.getRanges()).flatMap(e=>[e.start.root,e.end.root]).every(e=>e&&e.is("rootElement"))}class nOe extends Cl{domEventType=["compositionstart","compositionupdate","compositionend"];constructor(e){super(e);const n=this.document;n.on("compositionstart",()=>{n.isComposing=!0}),n.on("compositionend",()=>{n.isComposing=!1})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}class bG{_files;_native;constructor(e,n={}){this._files=n.cacheFiles?R4(e):null,this._native=e}get files(){return this._files||(this._files=R4(this._native)),this._files}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,n){this._native.setData(e,n)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}setDragImage(e,n,i){this._native.setDragImage(e,n,i)}get isCanceled(){return this._native.dropEffect=="none"||!!this._native.mozUserCancelled}}function R4(t){const e=Array.from(t.files||[]),n=Array.from(t.items||[]);return e.length?e:n.filter(i=>i.kind==="file").map(i=>i.getAsFile())}class iOe extends Cl{domEventType="beforeinput";onDomEvent(e){const n=e.getTargetRanges(),i=this.view,r=i.document;let o=null,s=null,a=[];if(e.dataTransfer&&(o=new bG(e.dataTransfer)),e.data!==null?s=e.data:o&&(s=o.getData("text/plain")),r.selection.isFake)a=Array.from(r.selection.getRanges()),e.preventDefault();else if(n.length)a=n.map(l=>{let u=i.domConverter.domPositionToView(l.startContainer,l.startOffset);const c=i.domConverter.domPositionToView(l.endContainer,l.endOffset);if(u&&Qr(l.startContainer)&&l.startOffset<ts){e.preventDefault();let d=ts-l.startOffset;u=u.getLastMatchingPosition(f=>!!(f.item.is("attributeElement")||f.item.is("uiElement")||f.item.is("$textProxy")&&d--),{direction:"backward",singleCharacters:!0})}if(rOe(l.endContainer,l.endOffset)&&e.preventDefault(),u)return i.createRange(u,c);if(c)return i.createRange(c)}).filter(l=>!!l);else if(vt.isAndroid){const l=e.target.ownerDocument.defaultView.getSelection();a=Array.from(i.domConverter.domSelectionToView(l).getRanges())}if(vt.isAndroid&&e.inputType=="insertCompositionText"&&s&&s.endsWith(`
`)){this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[i.createRange(a[0].end)]});return}if(["insertText","insertReplacementText"].includes(e.inputType)&&s&&s.includes(`
`)){const l=s.split(/\n{1,2}/g);let u=a;e.preventDefault();for(let c=0;c<l.length;c++){const d=l[c];d!=""&&(this.fire(e.type,e,{data:d,dataTransfer:o,targetRanges:u,inputType:e.inputType,isComposing:e.isComposing}),u=[r.selection.getFirstRange()]),c+1<l.length&&(this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:u}),u=[r.selection.getFirstRange()])}return}this.fire(e.type,e,{data:s,dataTransfer:o,targetRanges:a,inputType:e.inputType,isComposing:e.isComposing})}}function rOe(t,e){for(;t.parentNode;){if(fi(t)){if(e!=t.data.length)return!1}else if(e!=t.childNodes.length)return!1;if(e=jh(t)+1,t=t.parentNode,e<t.childNodes.length&&Qr(t.childNodes[e]))return!0}return!1}class oOe extends _l{constructor(e){super(e),this.document.on("keydown",(n,i)=>{if(this.isEnabled&&RRe(i.keyCode)){const r=new Hf(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(r,i),r.stop.called&&n.stop()}})}observe(){}stopObserving(){}}class sOe extends _l{constructor(e){super(e);const n=this.document;n.on("keydown",(i,r)=>{if(!this.isEnabled||r.keyCode!=Yt.tab||r.ctrlKey)return;const o=new Hf(n,"tab",n.selection.getFirstRange());n.fire(o,r),o.stop.called&&i.stop()})}observe(){}stopObserving(){}}class aOe extends Ln(){document;domConverter;domRoots=new Map;_renderer;_initialDomRootAttributes=new WeakMap;_observers=new Map;_writer;_ongoingChange=!1;_postFixersInProgress=!1;_renderingDisabled=!1;_hasChangedSinceTheLastRendering=!1;constructor(e){super(),this.document=new mS(e),this.domConverter=new pS(this.document),this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new DMe(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._writer=new dG(this.document),this.addObserver(vG),this.addObserver(d1),this.addObserver(eOe),this.addObserver(JMe),this.addObserver(ZMe),this.addObserver(nOe),this.addObserver(oOe),this.addObserver(iOe),this.addObserver(sOe),OMe(this),kMe(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0}),vt.isiOS&&this.listenTo(this.document,"blur",(n,i)=>{this.domConverter.mapDomToView(i.domEvent.relatedTarget)||this.domConverter._clearDomSelection()}),this.listenTo(this.document,"mutations",(n,{mutations:i})=>{i.forEach(r=>this._renderer.markToSync(r.type,r.node))},{priority:"low"}),this.listenTo(this.document,"mutations",()=>{this.forceRender()},{priority:"lowest"})}attachDomRoot(e,n="main"){const i=this.document.getRoot(n);i._name=e.tagName.toLowerCase();const r={};for(const{name:s,value:a}of Array.from(e.attributes))r[s]=a,s==="class"?this._writer.addClass(a.split(" "),i):i.hasAttribute(s)||this._writer.setAttribute(s,a,i);this._initialDomRootAttributes.set(e,r);const o=()=>{this._writer.setAttribute("contenteditable",(!i.isReadOnly).toString(),i),i.isReadOnly?this._writer.addClass("ck-read-only",i):this._writer.removeClass("ck-read-only",i)};o(),this.domRoots.set(n,e),this.domConverter.bindElements(e,i),this._renderer.markToSync("children",i),this._renderer.markToSync("attributes",i),this._renderer.domDocuments.add(e.ownerDocument),i.on("change:children",(s,a)=>this._renderer.markToSync("children",a)),i.on("change:attributes",(s,a)=>this._renderer.markToSync("attributes",a)),i.on("change:text",(s,a)=>this._renderer.markToSync("text",a)),i.on("change:isReadOnly",()=>this.change(o)),i.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const s of this._observers.values())s.observe(e,n)}detachDomRoot(e){const n=this.domRoots.get(e);Array.from(n.attributes).forEach(({name:r})=>n.removeAttribute(r));const i=this._initialDomRootAttributes.get(n);for(const r in i)n.setAttribute(r,i[r]);this.domRoots.delete(e),this.domConverter.unbindDomElement(n);for(const r of this._observers.values())r.stopObserving(n)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let n=this._observers.get(e);if(n)return n;n=new e(this),this._observers.set(e,n);for(const[i,r]of this.domRoots)n.observe(r,i);return n.enable(),n}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection({alignToTop:e,forceScroll:n,viewportOffset:i=20,ancestorOffset:r=20}={}){const o=this.document.selection.getFirstRange();if(!o)return;const s=Bo({alignToTop:e,forceScroll:n,viewportOffset:i,ancestorOffset:r});typeof i=="number"&&(i={top:i,bottom:i,left:i,right:i});const a={target:this.domConverter.viewRangeToDom(o),viewportOffset:i,ancestorOffset:r,alignToTop:e,forceScroll:n};this.fire("scrollToTheSelection",a,s),kRe(a)}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new oe("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const n=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),n}catch(n){oe.rethrowUnexpectedError(n,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.getObserver(d1).flush(),this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,n){return Ge._createAt(e,n)}createPositionAfter(e){return Ge._createAfter(e)}createPositionBefore(e){return Ge._createBefore(e)}createRange(e,n){return new Nt(e,n)}createRangeOn(e){return Nt._createOn(e)}createRangeIn(e){return Nt._createIn(e)}createSelection(...e){return new aa(...e)}_disableRendering(e){this._renderingDisabled=e,e==!1&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}class Kc{is(){throw new Error("is() method is abstract")}}class ea extends Kc{textNode;data;offsetInText;constructor(e,n,i){if(super(),this.textNode=e,n<0||n>e.offsetSize)throw new oe("model-textproxy-wrong-offsetintext",this);if(i<0||n+i>e.offsetSize)throw new oe("model-textproxy-wrong-length",this);this.data=e.data.substring(n,n+i),this.offsetInText=n}get startOffset(){return this.textNode.startOffset!==null?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return this.startOffset!==null?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const n=[];let i=e.includeSelf?this:this.parent;for(;i;)n[e.parentFirst?"push":"unshift"](i),i=i.parent;return n}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}ea.prototype.is=function(t){return t==="$textProxy"||t==="model:$textProxy"||t==="textProxy"||t==="model:textProxy"};class Ql{direction;boundaries;singleCharacters;shallow;ignoreElementEnd;_position;_boundaryStartParent;_boundaryEndParent;_visitedParent;constructor(e){if(!e||!e.boundaries&&!e.startPosition)throw new oe("model-tree-walker-no-start-position",null);const n=e.direction||"forward";if(n!="forward"&&n!="backward")throw new oe("model-tree-walker-unknown-direction",e,{direction:n});this.direction=n,this.boundaries=e.boundaries||null,e.startPosition?this._position=e.startPosition.clone():this._position=Be._createAt(this.boundaries[this.direction=="backward"?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}get position(){return this._position}skip(e){let n,i,r,o;do r=this.position,o=this._visitedParent,{done:n,value:i}=this.next();while(!n&&e(i));n||(this._position=r,this._visitedParent=o)}jumpTo(e){this._boundaryStartParent&&e.isBefore(this.boundaries.start)?e=this.boundaries.start:this._boundaryEndParent&&e.isAfter(this.boundaries.end)&&(e=this.boundaries.end),this._position=e.clone(),this._visitedParent=e.parent}next(){return this.direction=="forward"?this._next():this._previous()}_next(){const e=this.position,n=this.position.clone(),i=this._visitedParent;if(i.parent===null&&n.offset===i.maxOffset)return{done:!0,value:void 0};if(i===this._boundaryEndParent&&n.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const r=nv(n,i),o=r||yG(n,i,r);if(o&&o.is("model:element")){if(!this.shallow)n.path.push(0),this._visitedParent=o;else{if(this.boundaries&&this.boundaries.end.isBefore(n))return{done:!0,value:void 0};n.offset++}return this._position=n,ad("elementStart",o,e,n,1)}if(o&&o.is("model:$text")){let s;if(this.singleCharacters)s=1;else{let u=o.endOffset;this._boundaryEndParent==i&&this.boundaries.end.offset<u&&(u=this.boundaries.end.offset),s=u-n.offset}const a=n.offset-o.startOffset,l=new ea(o,a,s);return n.offset+=s,this._position=n,ad("text",l,e,n,s)}return n.path.pop(),n.offset++,this._position=n,this._visitedParent=i.parent,this.ignoreElementEnd?this._next():ad("elementEnd",i,e,n)}_previous(){const e=this.position,n=this.position.clone(),i=this._visitedParent;if(i.parent===null&&n.offset===0)return{done:!0,value:void 0};if(i==this._boundaryStartParent&&n.offset==this.boundaries.start.offset)return{done:!0,value:void 0};const r=n.parent,o=nv(n,r),s=o||wG(n,r,o);if(s&&s.is("model:element"))return n.offset--,this.shallow?(this._position=n,ad("elementStart",s,e,n,1)):(n.path.push(s.maxOffset),this._position=n,this._visitedParent=s,this.ignoreElementEnd?this._previous():ad("elementEnd",s,e,n));if(s&&s.is("model:$text")){let a;if(this.singleCharacters)a=1;else{let c=s.startOffset;this._boundaryStartParent==i&&this.boundaries.start.offset>c&&(c=this.boundaries.start.offset),a=n.offset-c}const l=n.offset-s.startOffset,u=new ea(s,l-a,a);return n.offset-=a,this._position=n,ad("text",u,e,n,a)}return n.path.pop(),this._position=n,this._visitedParent=i.parent,ad("elementStart",i,e,n,1)}}function ad(t,e,n,i,r){return{done:!1,value:{type:t,item:e,previousPosition:n,nextPosition:i,length:r}}}class Be extends Kc{root;path;stickiness;constructor(e,n,i="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new oe("model-position-root-invalid",e);if(!Array.isArray(n)||n.length===0)throw new oe("model-position-path-incorrect-format",e,{path:n});e.is("rootElement")?n=n.slice():(n=[...e.getPath(),...n],e=e.root),this.root=e,this.path=n,this.stickiness=i}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let n=0;n<this.path.length-1;n++)if(e=e.getChildAtOffset(this.path[n]),!e)throw new oe("model-position-path-incorrect",this,{position:this});if(e.is("$text"))throw new oe("model-position-path-incorrect",this,{position:this});return e}get index(){return this.parent.offsetToIndex(this.offset)}get textNode(){return nv(this,this.parent)}get nodeAfter(){const e=this.parent;return yG(this,e,nv(this,e))}get nodeBefore(){const e=this.parent;return wG(this,e,nv(this,e))}get isAtStart(){return this.offset===0}get isAtEnd(){return this.offset==this.parent.maxOffset}isValid(){if(this.offset<0)return!1;let e=this.root;for(let n=0;n<this.path.length-1;n++)if(e=e.getChildAtOffset(this.path[n]),!e)return!1;return this.offset<=e.maxOffset}compareWith(e){if(this.root!=e.root)return"different";const n=ur(this.path,e.path);switch(n){case"same":return"same";case"prefix":return"before";case"extension":return"after";default:return this.path[n]<e.path[n]?"before":"after"}}getLastMatchingPosition(e,n={}){n.startPosition=this;const i=new Ql(n);return i.skip(e),i.position}getParentPath(){return this.path.slice(0,-1)}getAncestors(){const e=this.parent;return e.is("documentFragment")?[e]:e.getAncestors({includeSelf:!0})}findAncestor(e){const n=this.parent;return n.is("element")?n.findAncestor(e,{includeSelf:!0}):null}getCommonPath(e){if(this.root!=e.root)return[];const n=ur(this.path,e.path),i=typeof n=="string"?Math.min(this.path.length,e.path.length):n;return this.path.slice(0,i)}getCommonAncestor(e){const n=this.getAncestors(),i=e.getAncestors();let r=0;for(;n[r]==i[r]&&n[r];)r++;return r===0?null:n[r-1]}getShiftedBy(e){const n=this.clone(),i=n.offset+e;return n.offset=i<0?0:i,n}isAfter(e){return this.compareWith(e)=="after"}isBefore(e){return this.compareWith(e)=="before"}isEqual(e){return this.compareWith(e)=="same"}isTouching(e){if(this.root!==e.root)return!1;const n=Math.min(this.path.length,e.path.length);for(let i=0;i<n;i++){const r=this.path[i]-e.path[i];if(r<-1||r>1)return!1;if(r===1)return M4(e,this,i);if(r===-1)return M4(this,e,i)}return this.path.length===e.path.length?!0:this.path.length>e.path.length?kA(this.path,n):kA(e.path,n)}hasSameParentAs(e){if(this.root!==e.root)return!1;const n=this.getParentPath(),i=e.getParentPath();return ur(n,i)=="same"}getTransformedByOperation(e){let n;switch(e.type){case"insert":n=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":n=this._getTransformedByMoveOperation(e);break;case"split":n=this._getTransformedBySplitOperation(e);break;case"merge":n=this._getTransformedByMergeOperation(e);break;default:n=Be._createAt(this);break}return n}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const n=e.movedRange;return n.containsPosition(this)||n.start.isEqual(this)&&this.stickiness=="toNext"?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const n=e.movedRange,i=n.containsPosition(this)||n.start.isEqual(this);let r;return i?(r=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(r=r._getTransformedByDeletion(e.deletionPosition,1))):this.isEqual(e.deletionPosition)?r=Be._createAt(e.deletionPosition):r=this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),r}_getTransformedByDeletion(e,n){const i=Be._createAt(this);if(this.root!=e.root)return i;if(ur(e.getParentPath(),this.getParentPath())=="same"){if(e.offset<this.offset){if(e.offset+n>this.offset)return null;i.offset-=n}}else if(ur(e.getParentPath(),this.getParentPath())=="prefix"){const r=e.path.length-1;if(e.offset<=this.path[r]){if(e.offset+n>this.path[r])return null;i.path[r]-=n}}return i}_getTransformedByInsertion(e,n){const i=Be._createAt(this);if(this.root!=e.root)return i;if(ur(e.getParentPath(),this.getParentPath())=="same")(e.offset<this.offset||e.offset==this.offset&&this.stickiness!="toPrevious")&&(i.offset+=n);else if(ur(e.getParentPath(),this.getParentPath())=="prefix"){const r=e.path.length-1;e.offset<=this.path[r]&&(i.path[r]+=n)}return i}_getTransformedByMove(e,n,i){if(n=n._getTransformedByDeletion(e,i),e.isEqual(n))return Be._createAt(this);const r=this._getTransformedByDeletion(e,i);return r===null||e.isEqual(this)&&this.stickiness=="toNext"||e.getShiftedBy(i).isEqual(this)&&this.stickiness=="toPrevious"?this._getCombined(e,n):r._getTransformedByInsertion(n,i)}_getCombined(e,n){const i=e.path.length-1,r=Be._createAt(n);return r.stickiness=this.stickiness,r.offset=r.offset+this.path[i]-e.offset,r.path=[...r.path,...this.path.slice(i+1)],r}toJSON(){return{root:this.root.toJSON(),path:Array.from(this.path),stickiness:this.stickiness}}clone(){return new this.constructor(this.root,this.path,this.stickiness)}static _createAt(e,n,i="toNone"){if(e.is("model:position"))return new Be(e.root,e.path,e.stickiness);{const r=e;if(n=="end")n=r.maxOffset;else{if(n=="before")return this._createBefore(r,i);if(n=="after")return this._createAfter(r,i);if(n!==0&&!n)throw new oe("model-createpositionat-offset-required",[this,e])}if(!r.is("element")&&!r.is("documentFragment"))throw new oe("model-position-parent-incorrect",[this,e]);const o=r.getPath();return o.push(n),new this(r.root,o,i)}}static _createAfter(e,n){if(!e.parent)throw new oe("model-position-after-root",[this,e],{root:e});return this._createAt(e.parent,e.endOffset,n)}static _createBefore(e,n){if(!e.parent)throw new oe("model-position-before-root",e,{root:e});return this._createAt(e.parent,e.startOffset,n)}static fromJSON(e,n){if(e.root==="$graveyard"){const i=new Be(n.graveyard,e.path);return i.stickiness=e.stickiness,i}if(!n.getRoot(e.root))throw new oe("model-position-fromjson-no-root",n,{rootName:e.root});return new Be(n.getRoot(e.root),e.path,e.stickiness)}}Be.prototype.is=function(t){return t==="position"||t==="model:position"};function nv(t,e){const n=e.getChildAtOffset(t.offset);return n&&n.is("$text")&&n.startOffset<t.offset?n:null}function yG(t,e,n){return n!==null?null:e.getChildAtOffset(t.offset)}function wG(t,e,n){return n!==null?null:e.getChild(e.offsetToIndex(t.offset)-1)}function M4(t,e,n){return!(n+1===t.path.length||!kA(e.path,n+1)||!lOe(t,n+1))}function kA(t,e){for(;e<t.length;){if(t[e]!==0)return!1;e++}return!0}function lOe(t,e){let n=t.parent,i=t.path.length-1,r=0;for(;i>=e;){if(t.path[i]+r!==n.maxOffset)return!1;r=1,i--,n=n.parent}return!0}class Ee extends Kc{start;end;constructor(e,n){super(),this.start=Be._createAt(e),this.end=n?Be._createAt(n):Be._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new Ql({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const e=this.start.getParentPath(),n=this.end.getParentPath();return ur(e,n)=="same"}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,n=!1){e.isCollapsed&&(n=!1);const i=this.containsPosition(e.start)||n&&this.start.isEqual(e.start),r=this.containsPosition(e.end)||n&&this.end.isEqual(e.end);return i&&r}containsItem(e){const n=Be._createBefore(e);return this.containsPosition(n)||this.start.isEqual(n)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const n=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&n.push(new Ee(this.start,e.start)),this.containsPosition(e.end)&&n.push(new Ee(e.end,this.end))):n.push(new Ee(this.start,this.end)),n}getIntersection(e){if(this.isIntersecting(e)){let n=this.start,i=this.end;return this.containsPosition(e.start)&&(n=e.start),this.containsPosition(e.end)&&(i=e.end),new Ee(n,i)}return null}getJoined(e,n=!1){let i=this.isIntersecting(e);if(i||(this.start.isBefore(e.start)?i=n?this.end.isTouching(e.start):this.end.isEqual(e.start):i=n?e.end.isTouching(this.start):e.end.isEqual(this.start)),!i)return null;let r=this.start,o=this.end;return e.start.isBefore(r)&&(r=e.start),e.end.isAfter(o)&&(o=e.end),new Ee(r,o)}getMinimalFlatRanges(){const e=[],n=this.start.getCommonPath(this.end).length,i=Be._createAt(this.start);let r=i.parent;for(;i.path.length>n+1;){const o=r.maxOffset-i.offset;o!==0&&e.push(new Ee(i,i.getShiftedBy(o))),i.path=i.path.slice(0,-1),i.offset++,r=r.parent}for(;i.path.length<=this.end.path.length;){const o=this.end.path[i.path.length-1],s=o-i.offset;s!==0&&e.push(new Ee(i,i.getShiftedBy(s))),i.offset=o,i.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Ql(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const n=new Ql(e);for(const i of n)yield i.item}*getPositions(e={}){e.boundaries=this;const n=new Ql(e);yield n.position;for(const i of n)yield i.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Ee(this.start,this.end)]}getTransformedByOperations(e){const n=[new Ee(this.start,this.end)];for(const i of e)for(let r=0;r<n.length;r++){const o=n[r].getTransformedByOperation(i);n.splice(r,1,...o),r+=o.length-1}for(let i=0;i<n.length;i++){const r=n[i];for(let o=i+1;o<n.length;o++){const s=n[o];(r.containsRange(s)||s.containsRange(r)||r.isEqual(s))&&n.splice(o,1)}}return n}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;const e=this.start.nodeAfter,n=this.end.nodeBefore;return e&&e.is("element")&&e===n?e:null}toJSON(){return{start:this.start.toJSON(),end:this.end.toJSON()}}clone(){return new this.constructor(this.start,this.end)}_getTransformedByInsertOperation(e,n=!1){return this._getTransformedByInsertion(e.position,e.howMany,n)}_getTransformedByMoveOperation(e,n=!1){const i=e.sourcePosition,r=e.howMany,o=e.targetPosition;return this._getTransformedByMove(i,o,r,n)}_getTransformedBySplitOperation(e){const n=this.start._getTransformedBySplitOperation(e);let i=this.end._getTransformedBySplitOperation(e);return this.end.isEqual(e.insertionPosition)&&(i=this.end.getShiftedBy(1)),n.root!=i.root&&(i=this.end.getShiftedBy(-1)),new Ee(n,i)}_getTransformedByMergeOperation(e){if(this.start.isEqual(e.targetPosition)&&this.end.isEqual(e.deletionPosition))return new Ee(this.start);let n=this.start._getTransformedByMergeOperation(e),i=this.end._getTransformedByMergeOperation(e);return n.root!=i.root&&(i=this.end.getShiftedBy(-1)),n.isAfter(i)?(e.sourcePosition.isBefore(e.targetPosition)?(n=Be._createAt(i),n.offset=0):(e.deletionPosition.isEqual(n)||(i=e.deletionPosition),n=e.targetPosition),new Ee(n,i)):new Ee(n,i)}_getTransformedByInsertion(e,n,i=!1){if(i&&this.containsPosition(e))return[new Ee(this.start,e),new Ee(e.getShiftedBy(n),this.end._getTransformedByInsertion(e,n))];{const r=new Ee(this.start,this.end);return r.start=r.start._getTransformedByInsertion(e,n),r.end=r.end._getTransformedByInsertion(e,n),[r]}}_getTransformedByMove(e,n,i,r=!1){if(this.isCollapsed){const d=this.start._getTransformedByMove(e,n,i);return[new Ee(d)]}const o=Ee._createFromPositionAndShift(e,i),s=n._getTransformedByDeletion(e,i);if(this.containsPosition(n)&&!r&&(o.containsPosition(this.start)||o.containsPosition(this.end))){const d=this.start._getTransformedByMove(e,n,i),f=this.end._getTransformedByMove(e,n,i);return[new Ee(d,f)]}let a;const l=this.getDifference(o);let u=null;const c=this.getIntersection(o);if(l.length==1?u=new Ee(l[0].start._getTransformedByDeletion(e,i),l[0].end._getTransformedByDeletion(e,i)):l.length==2&&(u=new Ee(this.start,this.end._getTransformedByDeletion(e,i))),u?a=u._getTransformedByInsertion(s,i,c!==null||r):a=[],c){const d=new Ee(c.start._getCombined(o.start,s),c.end._getCombined(o.start,s));a.length==2?a.splice(1,0,d):a.push(d)}return a}_getTransformedByDeletion(e,n){let i=this.start._getTransformedByDeletion(e,n),r=this.end._getTransformedByDeletion(e,n);return i==null&&r==null?null:(i==null&&(i=e),r==null&&(r=e),new Ee(i,r))}static _createFromPositionAndShift(e,n){const i=e,r=e.getShiftedBy(n);return n>0?new this(i,r):new this(r,i)}static _createIn(e){return new this(Be._createAt(e,0),Be._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Be._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(e.length===0)throw new oe("range-create-from-ranges-empty-array",null);if(e.length==1)return e[0].clone();const n=e[0];e.sort((o,s)=>o.start.isAfter(s.start)?1:-1);const i=e.indexOf(n),r=new this(n.start,n.end);for(let o=i-1;o>=0&&e[o].end.isEqual(r.start);o--)r.start=Be._createAt(e[o].start);for(let o=i+1;o<e.length&&e[o].start.isEqual(r.end);o++)r.end=Be._createAt(e[o].end);return r}static fromJSON(e,n){return new this(Be.fromJSON(e.start,n),Be.fromJSON(e.end,n))}}Ee.prototype.is=function(t){return t==="range"||t==="model:range"};class _G extends Fn(){_modelToViewMapping=new WeakMap;_viewToModelMapping=new WeakMap;_viewToModelLengthCallbacks=new Map;_markerNameToElements=new Map;_elementToMarkerNames=new Map;_deferredBindingRemovals=new Map;_unboundMarkerNames=new Set;_cache=new uOe;constructor(){super(),this.on("modelToViewPosition",(e,n)=>{if(n.viewPosition)return;const i=this._modelToViewMapping.get(n.modelPosition.parent);if(!i)throw new oe("mapping-model-position-view-parent-not-found",this,{modelPosition:n.modelPosition});n.viewPosition=this.findPositionIn(i,n.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,n)=>{if(n.modelPosition)return;const i=this.findMappedViewAncestor(n.viewPosition),r=this._viewToModelMapping.get(i),o=this._toModelOffset(n.viewPosition.parent,n.viewPosition.offset,i);n.modelPosition=Be._createAt(r,o)},{priority:"low"})}bindElements(e,n){this._modelToViewMapping.set(e,n),this._viewToModelMapping.set(n,e)}unbindViewElement(e,n={}){const i=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const r of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(r);n.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e)&&this._cache.stopTracking(e),this._modelToViewMapping.get(i)==e&&this._modelToViewMapping.delete(i))}unbindModelElement(e){const n=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(n)==e&&this._viewToModelMapping.delete(n)&&this._cache.stopTracking(n)}bindElementToMarker(e,n){const i=this._markerNameToElements.get(n)||new Set;i.add(e);const r=this._elementToMarkerNames.get(e)||new Set;r.add(n),this._markerNameToElements.set(n,i),this._elementToMarkerNames.set(e,r)}unbindElementFromMarkerName(e,n){const i=this._markerNameToElements.get(n);i&&(i.delete(e),i.size==0&&this._markerNameToElements.delete(n));const r=this._elementToMarkerNames.get(e);r&&(r.delete(n),r.size==0&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,n]of this._deferredBindingRemovals)e.root==n&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Ee(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Nt(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const n={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",n),n.modelPosition}toViewPosition(e,n={}){const i={modelPosition:e,mapper:this,isPhantom:n.isPhantom};return this.fire("modelToViewPosition",i),i.viewPosition}markerNameToElements(e){const n=this._markerNameToElements.get(e);if(!n)return null;const i=new Set;for(const r of n)if(r.is("attributeElement"))for(const o of r.getElementsWithSameId())i.add(o);else i.add(r);return i}registerViewToModelLength(e,n){this._viewToModelLengthCallbacks.set(e,n)}findMappedViewAncestor(e){let n=e.parent;for(;!this._viewToModelMapping.has(n);)n=n.parent;return n}_toModelOffset(e,n,i){if(i!=e){const o=this._toModelOffset(e.parent,e.index,i),s=this._toModelOffset(e,n,e);return o+s}if(e.is("$text"))return n;let r=0;for(let o=0;o<n;o++)r+=this.getModelLength(e.getChild(o));return r}getModelLength(e){const n=[e];let i=0;for(;n.length>0;){const r=n.pop(),o=r.name&&this._viewToModelLengthCallbacks.size>0&&this._viewToModelLengthCallbacks.get(r.name);if(o)i+=o(r);else if(this._viewToModelMapping.has(r))i+=1;else if(r.is("$text"))i+=r.data.length;else{if(r.is("uiElement"))continue;for(const s of r.getChildren())n.push(s)}}return i}findPositionIn(e,n){if(n===0)return this._moveViewPositionToTextNode(new Ge(e,0));if(this._viewToModelLengthCallbacks.size==0&&this._viewToModelMapping.has(e)){const r=this._cache.getClosest(e,n);return this._findPositionStartingFrom(r.viewPosition,r.modelOffset,n,e,!0)}else return this._findPositionStartingFrom(new Ge(e,0),0,n,e,!1)}_findPositionStartingFrom(e,n,i,r,o){let s=e.parent,a=e.offset;if(s.is("$text"))return new Ge(s,i-n);let l,u=n,c=0;for(;u<i;){if(l=s.getChild(a),!l){if(s==r)throw new oe("mapping-model-offset-not-found",this,{modelOffset:i,viewContainer:r});a=s.parent.getChildIndex(s)+1,s=s.parent,o&&this._cache.save(s,a,r,u);continue}o?c=this._getModelLengthAndCache(l,r,u):c=this.getModelLength(l),u+=c,a++}let d=new Ge(s,a);if(o)for(;d.isAtEnd&&d.parent!==r&&d.parent.parent;){const f=d.parent.parent,h=f.getChildIndex(d.parent)+1;this._cache.save(f,h,r,u),d=new Ge(f,h)}return u==i?this._moveViewPositionToTextNode(d):this._findPositionStartingFrom(new Ge(l,0),u-c,i,r,o)}_getModelLengthAndCache(e,n,i){let r=0;if(this._viewToModelMapping.has(e))r=1;else if(e.is("$text"))r=e.data.length;else if(!e.is("uiElement"))for(const o of e.getChildren())r+=this._getModelLengthAndCache(o,n,i+r);return this._cache.save(e.parent,e.index+1,n,i+r),r}_moveViewPositionToTextNode(e){const n=e.nodeBefore,i=e.nodeAfter;return n&&n.is("view:$text")?new Ge(n,n.data.length):i&&i.is("view:$text")?new Ge(i,0):e}}class uOe extends Fn(){_cachedMapping=new WeakMap;_nodeToCacheListIndex=new WeakMap;_invalidateOnChildrenChangeCallback=(e,n,i)=>{this._clearCacheInsideParent(n,i.index)};_invalidateOnTextChangeCallback=(e,n)=>{this._clearCacheAfter(n)};save(e,n,i,r){const o=this._cachedMapping.get(i),s=o.cacheMap.get(r);if(s){const c=e.getChild(n-1),d=s.viewPosition.nodeBefore?this._nodeToCacheListIndex.get(s.viewPosition.nodeBefore):0;this._nodeToCacheListIndex.set(c,d);return}const l={viewPosition:new Ge(e,n),modelOffset:r};o.maxModelOffset=r>o.maxModelOffset?r:o.maxModelOffset,o.cacheMap.set(r,l);let u=o.cacheList.length-1;for(;u>=0&&o.cacheList[u].modelOffset>r;)u--;if(o.cacheList.splice(u+1,0,l),n>0){const c=e.getChild(n-1);this._nodeToCacheListIndex.set(c,u+1)}}getClosest(e,n){const i=this._cachedMapping.get(e);let r;if(i)if(n>i.maxModelOffset)r=i.cacheList[i.cacheList.length-1];else{const o=i.cacheMap.get(n);o?r=o:r=this._findInCacheList(i.cacheList,n)}else r=this.startTracking(e);return{modelOffset:r.modelOffset,viewPosition:r.viewPosition.clone()}}startTracking(e){const i={viewPosition:new Ge(e,0),modelOffset:0},r={maxModelOffset:0,cacheList:[i],cacheMap:new Map([[0,i]])};return this._cachedMapping.set(e,r),e.on("change:children",this._invalidateOnChildrenChangeCallback),e.on("change:text",this._invalidateOnTextChangeCallback),i}stopTracking(e){e.off("change:children",this._invalidateOnChildrenChangeCallback),e.off("change:text",this._invalidateOnTextChangeCallback),this._cachedMapping.delete(e)}_clearCacheInsideParent(e,n){if(n==0)this._cachedMapping.has(e)?this._clearCacheAll(e):this._clearCacheInsideParent(e.parent,e.index);else{const i=e.getChild(n-1);this._clearCacheAfter(i)}}_clearCacheAll(e){const n=this._cachedMapping.get(e);n.maxModelOffset>0&&(n.maxModelOffset=0,n.cacheList.length=1,n.cacheMap.clear(),n.cacheMap.set(0,n.cacheList[0]))}_clearCacheAfter(e){const n=this._nodeToCacheListIndex.get(e);if(n===void 0){const r=e.parent;this._cachedMapping.has(r)||this._clearCacheInsideParent(r.parent,r.index);return}let i=e.parent;for(;!this._cachedMapping.has(i);)i=i.parent;this._clearCacheFromCacheIndex(i,n)}_clearCacheFromCacheIndex(e,n){n===0&&(n=1);const i=this._cachedMapping.get(e),r=i.cacheList[n-1];if(!r)return;i.maxModelOffset=r.modelOffset;const o=i.cacheList.splice(n);for(const s of o){i.cacheMap.delete(s.modelOffset);const a=s.viewPosition.nodeBefore;this._nodeToCacheListIndex.delete(a)}}_findInCacheList(e,n){let i=0,r=e.length-1,o=r-i>>1,s=e[o];for(;i<r;)s.modelOffset<n?i=o+1:r=o-1,o=i+(r-i>>1),s=e[o];return s.modelOffset<=n?s:e[o-1]}}class cOe{_consumable=new Map;_textProxyRegistry=new Map;add(e,n){n=oy(n),e instanceof ea&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(n,!0)}consume(e,n){return n=oy(n),e instanceof ea&&(e=this._getSymbolForTextProxy(e)),this.test(e,n)?(this._consumable.get(e).set(n,!1),!0):!1}test(e,n){n=oy(n),e instanceof ea&&(e=this._getSymbolForTextProxy(e));const i=this._consumable.get(e);if(i===void 0)return null;const r=i.get(n);return r===void 0?null:r}revert(e,n){n=oy(n),e instanceof ea&&(e=this._getSymbolForTextProxy(e));const i=this.test(e,n);return i===!1?(this._consumable.get(e).set(n,!0),!0):i===!0?!1:null}verifyAllConsumed(e){const n=[];for(const[i,r]of this._consumable)for(const[o,s]of r){const a=o.split(":")[0];s&&e==a&&n.push({event:o,item:i.name||i.description})}if(n.length)throw new oe("conversion-model-consumable-not-consumed",null,{items:n})}_getSymbolForTextProxy(e){let n=null;const i=this._textProxyRegistry.get(e.startOffset);if(i){const r=i.get(e.endOffset);r&&(n=r.get(e.parent))}return n||(n=this._addSymbolForTextProxy(e)),n}_addSymbolForTextProxy(e){const n=e.startOffset,i=e.endOffset,r=e.parent,o=Symbol("$textProxy:"+e.data);let s,a;return s=this._textProxyRegistry.get(n),s||(s=new Map,this._textProxyRegistry.set(n,s)),a=s.get(i),a||(a=new Map,s.set(i,a)),a.set(r,o),o}}function oy(t){const e=t.split(":");return e[0]=="insert"?e[0]:e[0]=="addMarker"||e[0]=="removeMarker"?t:e.length>1?e[0]+":"+e[1]:e[0]}class CG extends Fn(){_conversionApi;_firedEventsMap;constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,n,i){const r=e.getRefreshedItems(),o=this._createConversionApi(i,r);for(const a of e.getMarkersToRemove())this._convertMarkerRemove(a.name,a.range,o);const s=this._reduceChanges(e.getChanges(),r);for(const a of s)a.type==="insert"?this._convertInsert(Ee._createFromPositionAndShift(a.position,a.length),o):a.type==="reinsert"?this._convertReinsert(Ee._createFromPositionAndShift(a.position,a.length),o):a.type==="remove"?this._convertRemove(a.position,a.length,a.name,o):this._convertAttribute(a.range,a.attributeKey,a.attributeOldValue,a.attributeNewValue,o);o.mapper.flushDeferredBindings();for(const a of o.mapper.flushUnboundMarkerNames()){const l=n.get(a).getRange();this._convertMarkerRemove(a,l,o),this._convertMarkerAdd(a,l,o)}for(const a of e.getMarkersToAdd())this._convertMarkerAdd(a.name,a.range,o);o.consumable.verifyAllConsumed("insert")}convert(e,n,i,r={}){const o=this._createConversionApi(i,void 0,r);this._convertInsert(e,o);for(const[s,a]of n)this._convertMarkerAdd(s,a,o);o.consumable.verifyAllConsumed("insert")}convertSelection(e,n,i){const r=this._createConversionApi(i);this.fire("cleanSelection",{selection:e},r);const o=e.getFirstPosition().root;if(!r.mapper.toViewElement(o))return;const s=Array.from(n.getMarkersAtPosition(e.getFirstPosition()));if(this._addConsumablesForSelection(r.consumable,e,s),this.fire("selection",{selection:e},r),!!e.isCollapsed){for(const a of s)if(r.consumable.test(e,"addMarker:"+a.name)){const l=a.getRange();if(!dOe(e.getFirstPosition(),a,r.mapper))continue;const u={item:e,markerName:a.name,markerRange:l};this.fire(`addMarker:${a.name}`,u,r)}for(const a of e.getAttributeKeys())if(r.consumable.test(e,"attribute:"+a)){const l={item:e,range:e.getFirstRange(),attributeKey:a,attributeOldValue:null,attributeNewValue:e.getAttribute(a)};this.fire(`attribute:${a}:$text`,l,r)}}}_convertInsert(e,n,i={}){i.doNotAddConsumables||this._addConsumablesForInsert(n.consumable,e);for(const r of e.getWalker({shallow:!0}))this._testAndFire("insert",O4(r),n)}_convertRemove(e,n,i,r){this.fire(`remove:${i}`,{position:e,length:n},r)}_convertAttribute(e,n,i,r,o){this._addConsumablesForRange(o.consumable,e,`attribute:${n}`);for(const s of e){const a={item:s.item,range:Ee._createFromPositionAndShift(s.previousPosition,s.length),attributeKey:n,attributeOldValue:i,attributeNewValue:r};this._testAndFire(`attribute:${n}`,a,o)}}_convertReinsert(e,n){const i=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(n.consumable,i);for(const r of i.map(O4))this.fire(`remove:${r.item.is("element")?r.item.name:"$text"}`,{position:r.range.start,length:r.item.offsetSize,reconversion:!0},n),this._testAndFire("insert",{...r,reconversion:!0},n)}_convertMarkerAdd(e,n,i){if(n.root.rootName=="$graveyard")return;const r=`addMarker:${e}`;if(i.consumable.add(n,r),this.fire(r,{markerName:e,markerRange:n},i),!!i.consumable.consume(n,r)){this._addConsumablesForRange(i.consumable,n,r);for(const o of n.getItems()){if(!i.consumable.test(o,r))continue;const s={item:o,range:Ee._createOn(o),markerName:e,markerRange:n};this.fire(r,s,i)}}}_convertMarkerRemove(e,n,i){n.root.rootName!="$graveyard"&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:n},i)}_reduceChanges(e,n){const i={changes:e,refreshedItems:n};return this.fire("reduceChanges",i),i.changes}_addConsumablesForInsert(e,n){for(const i of n){const r=i.item;if(e.test(r,"insert")===null){e.add(r,"insert");for(const o of r.getAttributeKeys())e.add(r,"attribute:"+o)}}return e}_addConsumablesForRange(e,n,i){for(const r of n.getItems())e.add(r,i);return e}_addConsumablesForSelection(e,n,i){e.add(n,"selection");for(const r of i)e.add(n,"addMarker:"+r.name);for(const r of n.getAttributeKeys())e.add(n,"attribute:"+r);return e}_testAndFire(e,n,i){const r=fOe(e,n),o=n.item.is("$textProxy")?i.consumable._getSymbolForTextProxy(n.item):n.item,s=this._firedEventsMap.get(i),a=s.get(o);if(!a)s.set(o,new Set([r]));else if(!a.has(r))a.add(r);else return;this.fire(r,n,i)}_testAndFireAddAttributes(e,n){const i={item:e,range:Ee._createOn(e)};for(const r of i.item.getAttributeKeys())i.attributeKey=r,i.attributeOldValue=null,i.attributeNewValue=i.item.getAttribute(r),this._testAndFire(`attribute:${r}`,i,n)}_createConversionApi(e,n=new Set,i={}){const r={...this._conversionApi,consumable:new cOe,writer:e,options:i,convertItem:o=>this._convertInsert(Ee._createOn(o),r),convertChildren:o=>this._convertInsert(Ee._createIn(o),r,{doNotAddConsumables:!0}),convertAttributes:o=>this._testAndFireAddAttributes(o,r),canReuseView:o=>!n.has(r.mapper.toModelElement(o))};return this._firedEventsMap.set(r,new Map),r}}function dOe(t,e,n){const i=e.getRange(),r=Array.from(t.getAncestors());return r.shift(),r.reverse(),!r.some(s=>{if(i.containsItem(s))return!!n.toViewElement(s).getCustomProperty("addHighlight")})}function fOe(t,e){const n=e.item.is("element")?e.item.name:"$text";return`${t}:${n}`}function O4(t){return{item:t.item,range:Ee._createFromPositionAndShift(t.previousPosition,t.length)}}class Uf extends Kc{parent=null;_attrs;_index=null;_startOffset=null;constructor(e){super(),this._attrs=gl(e)}get document(){return null}get index(){return this._index}get startOffset(){return this._startOffset}get offsetSize(){return 1}get endOffset(){return this.startOffset===null?null:this.startOffset+this.offsetSize}get nextSibling(){const e=this.index;return e!==null&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return e!==null&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.parent===null?!1:this.root.isAttached()}getPath(){const e=[];let n=this;for(;n.parent;)e.unshift(n.startOffset),n=n.parent;return e}getAncestors(e={}){const n=[];let i=e.includeSelf?this:this.parent;for(;i;)n[e.parentFirst?"push":"unshift"](i),i=i.parent;return n}getCommonAncestor(e,n={}){const i=this.getAncestors(n),r=e.getAncestors(n);let o=0;for(;i[o]==r[o]&&i[o];)o++;return o===0?null:i[o-1]}isBefore(e){if(this==e||this.root!==e.root)return!1;const n=this.getPath(),i=e.getPath(),r=ur(n,i);switch(r){case"prefix":return!0;case"extension":return!1;default:return n[r]<i[r]}}isAfter(e){return this==e||this.root!==e.root?!1:!this.isBefore(e)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}toJSON(){const e={};return this._attrs.size&&(e.attributes=Array.from(this._attrs).reduce((n,i)=>(n[i[0]]=i[1],n),{})),e}_clone(e){return new this.constructor(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,n){this._attrs.set(e,n)}_setAttributesTo(e){this._attrs=gl(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}Uf.prototype.is=function(t){return t==="node"||t==="model:node"};class Xo extends Fn(Kc){_lastRangeBackward=!1;_attrs=new Map;_ranges=[];constructor(...e){super(),e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return this._ranges.length===1?this._ranges[0].isCollapsed:!1}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(this.rangeCount===0)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const n of this._ranges){let i=!1;for(const r of e._ranges)if(n.isEqual(r)){i=!0;break}if(!i)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Ee(e.start,e.end)}getFirstRange(){let e=null;for(const n of this._ranges)(!e||n.start.isBefore(e.start))&&(e=n);return e?new Ee(e.start,e.end):null}getLastRange(){let e=null;for(const n of this._ranges)(!e||n.end.isAfter(e.end))&&(e=n);return e?new Ee(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[n,i,r]=e;if(typeof i=="object"&&(r=i,i=void 0),n===null)this._setRanges([]);else if(n instanceof Xo)this._setRanges(n.getRanges(),n.isBackward);else if(n&&typeof n.getRanges=="function")this._setRanges(n.getRanges(),n.isBackward);else if(n instanceof Ee)this._setRanges([n],!!r&&!!r.backward);else if(n instanceof Be)this._setRanges([new Ee(n)]);else if(n instanceof Uf){const o=!!r&&!!r.backward;let s;if(i=="in")s=Ee._createIn(n);else if(i=="on")s=Ee._createOn(n);else if(i!==void 0)s=new Ee(Be._createAt(n,i));else throw new oe("model-selection-setto-required-second-parameter",[this,n]);this._setRanges([s],o)}else if(us(n))this._setRanges(n,r&&!!r.backward);else throw new oe("model-selection-setto-not-selectable",[this,n])}_setRanges(e,n=!1){const i=Array.from(e),r=i.some(o=>{if(!(o instanceof Ee))throw new oe("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(s=>!s.isEqual(o))});i.length===this._ranges.length&&!r||(this._replaceAllRanges(i),this._lastRangeBackward=!!n,this.fire("change:range",{directChange:!0}))}setFocus(e,n){if(this.anchor===null)throw new oe("model-selection-setfocus-no-ranges",[this,e]);const i=Be._createAt(e,n);if(i.compareWith(this.focus)=="same")return;const r=this.anchor;this._ranges.length&&this._popRange(),i.compareWith(r)=="before"?(this._pushRange(new Ee(i,r)),this._lastRangeBackward=!0):(this._pushRange(new Ee(r,i)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,n){this.getAttribute(e)!==n&&(this._attrs.set(e,n),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return this.rangeCount!==1?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const n of this.getRanges()){const i=L4(n.start,e);mOe(i,n)&&(yield i);const r=n.getWalker();for(const s of r){const a=s.item;s.type=="elementEnd"&&hOe(a,e,n)?yield a:s.type=="elementStart"&&a.is("model:element")&&a.root.document.model.schema.isBlock(a)&&r.jumpTo(Be._createAt(a,"end"))}const o=L4(n.end,e);gOe(o,n)&&(yield o)}}containsEntireContent(e=this.anchor.root){const n=Be._createAt(e,0),i=Be._createAt(e,"end");return n.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}toJSON(){const e={ranges:Array.from(this.getRanges()).map(i=>i.toJSON())},n=Object.fromEntries(this.getAttributes());return Object.keys(n).length&&(e.attributes=n),this.isBackward&&(e.isBackward=!0),e}_pushRange(e){this._checkRange(e),this._ranges.push(new Ee(e.start,e.end))}_checkRange(e){for(let n=0;n<this._ranges.length;n++)if(e.isIntersecting(this._ranges[n]))throw new oe("model-selection-range-intersects",[this,e],{addedRange:e,intersectingRange:this._ranges[n]})}_replaceAllRanges(e){this._removeAllRanges();for(const n of e)this._pushRange(n)}_removeAllRanges(){for(;this._ranges.length>0;)this._popRange()}_popRange(){this._ranges.pop()}}Xo.prototype.is=function(t){return t==="selection"||t==="model:selection"};function SG(t,e){return e.has(t)?!1:(e.add(t),t.root.document.model.schema.isBlock(t)&&!!t.parent)}function hOe(t,e,n){return SG(t,e)&&XM(t,n)}function L4(t,e){const i=t.parent.root.document.model.schema,r=t.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const s=r.find(a=>o?!1:(o=i.isLimit(a),!o&&SG(a,e)));return r.forEach(a=>e.add(a)),s}function XM(t,e){const n=pOe(t);return n?!e.containsRange(Ee._createOn(n),!0):!0}function mOe(t,e){return t?e.isCollapsed||t.isEmpty?!0:e.start.isTouching(Be._createAt(t,t.maxOffset))?!1:XM(t,e):!1}function gOe(t,e){return t?e.isCollapsed||t.isEmpty?!0:e.end.isTouching(Be._createAt(t,0))?!1:XM(t,e):!1}function pOe(t){const e=t.root.document.model.schema;let n=t.parent;for(;n;){if(e.isBlock(n))return n;n=n.parent}}class ko extends Fn(Ee){constructor(e,n){super(e,n),vOe.call(this)}detach(){this.stopListening()}toRange(){return new Ee(this.start,this.end)}static fromRange(e){return new ko(e.start,e.end)}}ko.prototype.is=function(t){return t==="liveRange"||t==="model:liveRange"||t=="range"||t==="model:range"};function vOe(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&bOe.call(this,n)},{priority:"low"})}function bOe(t){const e=this.getTransformedByOperation(t),n=Ee._createFromRanges(e),i=!n.isEqual(this),r=yOe(this,t);let o=null;if(i){n.root.rootName=="$graveyard"&&(t.type=="remove"?o=t.sourcePosition:o=t.deletionPosition);const s=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",s,{deletionPosition:o})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:o})}function yOe(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return!1}class ni extends Uf{_data;constructor(e,n){super(n),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new ni(this.data,this.getAttributes())}static fromJSON(e){return new ni(e.data,e.attributes)}}ni.prototype.is=function(t){return t==="$text"||t==="model:$text"||t==="text"||t==="model:text"||t==="node"||t==="model:node"};const rb="selection:";class cs extends Fn(Kc){_selection;constructor(e){super(),this._selection=new wOe(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}toJSON(){return this._selection.toJSON()}_setFocus(e,n){this._selection.setFocus(e,n)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,n){this._selection.setAttribute(e,n)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return rb+e}static _isStoreAttributeKey(e){return e.startsWith(rb)}}cs.prototype.is=function(t){return t==="selection"||t=="model:selection"||t=="documentSelection"||t=="model:documentSelection"};class wOe extends Xo{markers=new Er({idProperty:"name"});_model;_document;_attributePriority=new Map;_selectionRestorePosition=null;_hasChangedRange=!1;_overriddenGravityRegister=new Set;_observedMarkers=new Set;constructor(e){super(),this._model=e.model,this._document=e,this.listenTo(this._model,"applyOperation",(n,i)=>{const r=i[0];!r.isDocumentOperation||r.type=="marker"||r.type=="rename"||r.type=="noop"||(this._ranges.length==0&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{this._validateSelectionRanges(this.getRanges())}),this.listenTo(this._model.markers,"update",(n,i,r,o)=>{this._updateMarker(i,o)}),this.listenTo(this._document,"change",(n,i)=>{_Oe(this._model,i)})}get isCollapsed(){return this._ranges.length===0?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e<this._ranges.length;e++)this._ranges[e].detach();this.stopListening()}*getRanges(){this._ranges.length?yield*super.getRanges():yield this._document._getDefaultRange()}getFirstRange(){return super.getFirstRange()||this._document._getDefaultRange()}getLastRange(){return super.getLastRange()||this._document._getDefaultRange()}setTo(...e){super.setTo(...e),this._updateAttributes(!0),this.updateMarkers()}setFocus(e,n){super.setFocus(e,n),this._updateAttributes(!0),this.updateMarkers()}setAttribute(e,n){if(this._setAttribute(e,n)){const i=[e];this.fire("change:attribute",{attributeKeys:i,directChange:!0})}}removeAttribute(e){if(this._removeAttribute(e)){const n=[e];this.fire("change:attribute",{attributeKeys:n,directChange:!0})}}overrideGravity(){const e=Ur();return this._overriddenGravityRegister.add(e),this._overriddenGravityRegister.size===1&&this._updateAttributes(!0),e}restoreGravity(e){if(!this._overriddenGravityRegister.has(e))throw new oe("document-selection-gravity-wrong-restore",this,{uid:e});this._overriddenGravityRegister.delete(e),this.isGravityOverridden||this._updateAttributes(!0)}observeMarkers(e){this._observedMarkers.add(e),this.updateMarkers()}_replaceAllRanges(e){this._validateSelectionRanges(e),super._replaceAllRanges(e)}_popRange(){this._ranges.pop().detach()}_pushRange(e){const n=this._prepareRange(e);n&&this._ranges.push(n)}toJSON(){const e=super.toJSON();return this.markers.length&&(e.markers=this.markers.map(n=>n.toJSON())),e}_validateSelectionRanges(e){for(const n of e)if(!this._document._validateSelectionRange(n))throw new oe("document-selection-wrong-position",this,{range:n})}_prepareRange(e){if(this._checkRange(e),e.root==this._document.graveyard)return;const n=ko.fromRange(e);return n.on("change:range",(i,r,o)=>{if(this._hasChangedRange=!0,n.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const s=this._ranges.indexOf(n);this._ranges.splice(s,1),n.detach()}}),n}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let n=!1;for(const r of this._model.markers){const o=r.name.split(":",1)[0];if(!this._observedMarkers.has(o))continue;const s=r.getRange();for(const a of this.getRanges())s.containsRange(a,!a.isCollapsed)&&e.push(r)}const i=Array.from(this.markers);for(const r of e)this.markers.has(r)||(this.markers.add(r),n=!0);for(const r of Array.from(this.markers))e.includes(r)||(this.markers.remove(r),n=!0);n&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateMarker(e,n){const i=e.name.split(":",1)[0];if(!this._observedMarkers.has(i))return;let r=!1;const o=Array.from(this.markers),s=this.markers.has(e);if(!n)s&&(this.markers.remove(e),r=!0);else{let a=!1;for(const l of this.getRanges())if(n.containsRange(l,!l.isCollapsed)){a=!0;break}a&&!s?(this.markers.add(e),r=!0):!a&&s&&(this.markers.remove(e),r=!0)}r&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateAttributes(e){const n=gl(this._getSurroundingAttributes()),i=gl(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[o,s]of this._attributePriority)s=="low"&&(this._attrs.delete(o),this._attributePriority.delete(o));this._setAttributesTo(n);const r=[];for(const[o,s]of this.getAttributes())(!i.has(o)||i.get(o)!==s)&&r.push(o);for(const[o]of i)this.hasAttribute(o)||r.push(o);r.length>0&&this.fire("change:attribute",{attributeKeys:r,directChange:!1})}_setAttribute(e,n,i=!0){const r=i?"normal":"low";return r=="low"&&this._attributePriority.get(e)=="normal"||super.getAttribute(e)===n?!1:(this._attrs.set(e,n),this._attributePriority.set(e,r),!0)}_removeAttribute(e,n=!0){const i=n?"normal":"low";return i=="low"&&this._attributePriority.get(e)=="normal"||(this._attributePriority.set(e,i),!super.hasAttribute(e))?!1:(this._attrs.delete(e),!0)}_setAttributesTo(e){const n=new Set;for(const[i,r]of this.getAttributes())e.get(i)!==r&&this._removeAttribute(i,!1);for(const[i,r]of e)this._setAttribute(i,r,!1)&&n.add(i);return n}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const n of e.getAttributeKeys())n.startsWith(rb)&&(yield[n.substr(rb.length),e.getAttribute(n)])}_getSurroundingAttributes(){const e=this.getFirstPosition(),n=this._model.schema;if(e.root.rootName=="$graveyard")return null;let i=null;if(this.isCollapsed){const r=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(i=Ug(r,n)),i||(i=Ug(o,n)),!this.isGravityOverridden&&!i){let s=r;for(;s&&!i;)s=s.previousSibling,i=Ug(s,n)}if(!i){let s=o;for(;s&&!i;)s=s.nextSibling,i=Ug(s,n)}i||(i=this.getStoredAttributes())}else{const r=this.getFirstRange();for(const o of r){if(o.item.is("element")&&n.isObject(o.item)){i=Ug(o.item,n);break}if(o.type=="text"){i=o.item.getAttributes();break}}}return i}_fixGraveyardSelection(e){const n=this._model.schema.getNearestSelectionRange(e);n&&this._pushRange(n)}}function Ug(t,e){if(!t)return null;if(t instanceof ea||t instanceof ni)return t.getAttributes();if(!e.isInline(t))return null;if(!e.isObject(t))return[];const n=[];for(const[i,r]of t.getAttributes())e.checkAttribute("$text",i)&&e.getAttributeProperties(i).copyFromObject!==!1&&n.push([i,r]);return n}function _Oe(t,e){const n=t.document.differ;for(const i of n.getChanges()){if(i.type!="insert")continue;const r=i.position.parent;i.length===r.maxOffset&&t.enqueueChange(e,s=>{const a=Array.from(r.getAttributeKeys()).filter(l=>l.startsWith(rb));for(const l of a)s.removeAttribute(l,r)})}}class iv{_nodes=[];_offsetToNode=[];constructor(e){e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._offsetToNode.length}getNode(e){return this._nodes[e]||null}getNodeAtOffset(e){return this._offsetToNode[e]||null}getNodeIndex(e){return e.index}getNodeStartOffset(e){return e.startOffset}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const n=this._nodes[e];if(!n)throw new oe("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(n)}offsetToIndex(e){if(e==this._offsetToNode.length)return this._nodes.length;const n=this._offsetToNode[e];if(!n)throw new oe("model-nodelist-offset-out-of-bounds",this,{offset:e,nodeList:this});return this.getNodeIndex(n)}_insertNodes(e,n){const i=[];for(const o of n){if(!(o instanceof Uf))throw new oe("model-nodelist-insertnodes-not-node",this);i.push(o)}let r=this.indexToOffset(e);m4(this._nodes,i,e),m4(this._offsetToNode,COe(i),r);for(let o=e;o<this._nodes.length;o++)this._nodes[o]._index=o,this._nodes[o]._startOffset=r,r+=this._nodes[o].offsetSize}_removeNodes(e,n=1){if(n==0)return[];let i=this.indexToOffset(e);const r=this._nodes.splice(e,n),o=r[r.length-1],s=o.startOffset+o.offsetSize-i;this._offsetToNode.splice(i,s);for(const a of r)a._index=null,a._startOffset=null;for(let a=e;a<this._nodes.length;a++)this._nodes[a]._index=a,this._nodes[a]._startOffset=i,i+=this._nodes[a].offsetSize;return r}_removeNodesArray(e){if(e.length==0)return;for(const i of e)i._index=null,i._startOffset=null;this._nodes=this._nodes.filter(i=>i.index!==null),this._offsetToNode=this._offsetToNode.filter(i=>i.index!==null);let n=0;for(let i=0;i<this._nodes.length;i++)this._nodes[i]._index=i,this._nodes[i]._startOffset=n,n+=this._nodes[i].offsetSize}toJSON(){return this._nodes.map(e=>e.toJSON())}}function COe(t){const e=[];let n=0;for(const i of t)for(let r=0;r<i.offsetSize;r++)e[n++]=i;return e}class zn extends Uf{name;_children=new iv;constructor(e,n,i){super(n),this.name=e,i&&this._insertChild(0,i)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}getChild(e){return this._children.getNode(e)}getChildAtOffset(e){return this._children.getNodeAtOffset(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let n=this;for(const i of e)n=n.getChildAtOffset(i);return n}findAncestor(e,n={}){let i=n.includeSelf?this:this.parent;for(;i;){if(i.name===e)return i;i=i.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const n of this._children)e.children.push(n.toJSON())}return e}_clone(e=!1){const n=e?kOe(this._children):void 0;return new zn(this.name,this.getAttributes(),n)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,n){const i=SOe(n);for(const r of i)r.parent!==null&&r._remove(),r.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,n=1){const i=this._children._removeNodes(e,n);for(const r of i)r.parent=null;return i}_removeChildrenArray(e){this._children._removeNodesArray(e);for(const n of e)n.parent=null}static fromJSON(e){let n;if(e.children){n=[];for(const i of e.children)i.name?n.push(zn.fromJSON(i)):n.push(ni.fromJSON(i))}return new zn(e.name,e.attributes,n)}}zn.prototype.is=function(t,e){return e?e===this.name&&(t==="element"||t==="model:element"):t==="element"||t==="model:element"||t==="node"||t==="model:node"};function SOe(t){if(typeof t=="string")return[new ni(t)];us(t)||(t=[t]);const e=[];for(const n of t)typeof n=="string"?e.push(new ni(n)):n instanceof ea?e.push(new ni(n.data,n.getAttributes())):e.push(n);return e}function kOe(t){const e=[];for(const n of t)e.push(n._clone(!0));return e}class kG{_dispatchers;constructor(e){this._dispatchers=e}add(e){for(const n of this._dispatchers)e(n);return this}}class TOe extends kG{elementToElement(e){return this.add(UOe(e))}elementToStructure(e){return this.add(WOe(e))}attributeToElement(e){return this.add(qOe(e))}attributeToAttribute(e){return this.add(jOe(e))}markerToElement(e){return this.add(KOe(e))}markerToHighlight(e){return this.add(YOe(e))}markerToData(e){return this.add(GOe(e))}}function TG(){return(t,e,n)=>{if(!n.consumable.consume(e.item,t.name))return;const i=n.writer,r=n.mapper.toViewPosition(e.range.start),o=i.createText(e.item.data);i.insert(r,o)}}function EG(){return(t,e,n)=>{n.convertAttributes(e.item),!e.reconversion&&e.item.is("element")&&!e.item.isEmpty&&n.convertChildren(e.item)}}function EOe(){return(t,e,n)=>{if(e.reconversion)return;const i=n.mapper.toViewPosition(e.position),r=e.position.getShiftedBy(e.length),o=n.mapper.toViewPosition(r,{isPhantom:!0}),s=n.writer.createRange(i,o);AG(s.getTrimmed(),n)}}function xG(t,e){const n=t.createAttributeElement("span",e.attributes);return e.classes&&n._addClass(e.classes),typeof e.priority=="number"&&(n._priority=e.priority),n._id=e.id,n}function xOe(){return(t,e,n)=>{const i=e.selection;if(i.isCollapsed||!n.consumable.consume(i,"selection"))return;const r=[];for(const o of i.getRanges())r.push(n.mapper.toViewRange(o));n.writer.setSelection(r,{backward:i.isBackward})}}function AOe(){return(t,e,n)=>{const i=e.selection;if(!i.isCollapsed||!n.consumable.consume(i,"selection"))return;const r=n.writer,o=i.getFirstPosition(),s=n.mapper.toViewPosition(o),a=r.breakAttributes(s);r.setSelection(a)}}function POe(){return(t,e,n)=>{const i=n.writer,r=i.document.selection;for(const o of r.getRanges())o.isCollapsed&&o.end.parent.isAttached()&&n.writer.mergeAttributes(o.start);i.setSelection(null)}}function IOe(t){return(e,n,i)=>{if(!i.consumable.test(n.item,e.name))return;const r=t(n.attributeOldValue,i,n),o=t(n.attributeNewValue,i,n);if(!r&&!o)return;i.consumable.consume(n.item,e.name);const s=i.writer,a=s.document.selection;if(n.item instanceof Xo||n.item instanceof cs)s.wrap(a.getFirstRange(),o);else{let l=i.mapper.toViewRange(n.range);n.attributeOldValue!==null&&r&&(l=s.unwrap(l,r)),n.attributeNewValue!==null&&o&&s.wrap(l,o)}}}function ROe(t,e=nLe){return(n,i,r)=>{if(!e(i.item,r.consumable,{preflight:!0}))return;const o=t(i.item,r,i);if(!o)return;e(i.item,r.consumable);const s=i.reconversion&&PG(i.item,r)||r.mapper.toViewPosition(i.range.start);r.mapper.bindElements(i.item,o),r.writer.insert(s,o),r.convertAttributes(i.item),LG(o,i.item.getChildren(),r,{reconversion:i.reconversion})}}function MOe(t,e){return(n,i,r)=>{if(!e(i.item,r.consumable,{preflight:!0}))return;const o=new Map;r.writer._registerSlotFactory(ZOe(i.item,o,r));const s=t(i.item,r,i);if(r.writer._clearSlotFactory(),!s)return;QOe(i.item,o,r),e(i.item,r.consumable);const a=i.reconversion&&PG(i.item,r)||r.mapper.toViewPosition(i.range.start);r.mapper.bindElements(i.item,s),r.writer.insert(a,s),r.convertAttributes(i.item),eLe(s,o,r,{reconversion:i.reconversion})}}function OOe(t){return(e,n,i)=>{n.isOpening=!0;const r=t(n,i);n.isOpening=!1;const o=t(n,i);if(!r||!o)return;const s=n.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,e.name))return;for(const u of s)if(!i.consumable.consume(u.item,e.name))return;const a=i.mapper,l=i.writer;l.insert(a.toViewPosition(s.start),r),i.mapper.bindElementToMarker(r,n.markerName),s.isCollapsed||(l.insert(a.toViewPosition(s.end),o),i.mapper.bindElementToMarker(o,n.markerName)),e.stop()}}function AG(t,e){const n=e.writer.remove(t);for(const i of e.writer.createRangeIn(n).getItems())e.mapper.unbindViewElement(i,{defer:!0});return t.start}function PG(t,e){const n=e.mapper.toViewElement(t);return n&&AG(e.writer.createRangeOn(n),e)}function LOe(){return(t,e,n)=>{const i=n.mapper.markerNameToElements(e.markerName);if(i){for(const r of i)n.mapper.unbindElementFromMarkerName(r,e.markerName),n.writer.clear(n.writer.createRangeOn(r),r);n.writer.clearClonedElementsGroup(e.markerName),t.stop()}}}function DOe(t){return(e,n,i)=>{const r=t(n.markerName,i);if(!r)return;const o=n.markerRange;i.consumable.consume(o,e.name)&&(D4(o,!1,i,n,r),D4(o,!0,i,n,r),e.stop())}}function D4(t,e,n,i,r){const o=e?t.start:t.end,s=o.nodeAfter&&o.nodeAfter.is("element")?o.nodeAfter:null,a=o.nodeBefore&&o.nodeBefore.is("element")?o.nodeBefore:null;if(s||a){let u,c;e&&s||!e&&!a?(u=s,c=!0):(u=a,c=!1);const d=n.mapper.toViewElement(u);if(d){NOe(d,e,c,n,i,r);return}}const l=n.mapper.toViewPosition(o);BOe(l,e,n,i,r)}function NOe(t,e,n,i,r,o){const s=`data-${o.group}-${e?"start":"end"}-${n?"before":"after"}`,a=t.hasAttribute(s)?t.getAttribute(s).split(","):[];a.unshift(o.name),i.writer.setAttribute(s,a.join(","),t),i.mapper.bindElementToMarker(t,r.markerName)}function BOe(t,e,n,i,r){const o=`${r.group}-${e?"start":"end"}`,s=r.name?{name:r.name}:null,a=n.writer.createUIElement(o,s);n.writer.insert(t,a),n.mapper.bindElementToMarker(a,i.markerName)}function VOe(t){return(e,n,i)=>{const r=t(n.markerName,i);if(!r)return;const o=i.mapper.markerNameToElements(n.markerName);if(!o)return;for(const a of o)i.mapper.unbindElementFromMarkerName(a,n.markerName),a.is("containerElement")?(s(`data-${r.group}-start-before`,a),s(`data-${r.group}-start-after`,a),s(`data-${r.group}-end-before`,a),s(`data-${r.group}-end-after`,a)):i.writer.clear(i.writer.createRangeOn(a),a);i.writer.clearClonedElementsGroup(n.markerName),e.stop();function s(a,l){if(l.hasAttribute(a)){const u=new Set(l.getAttribute(a).split(","));u.delete(r.name),u.size==0?i.writer.removeAttribute(a,l):i.writer.setAttribute(a,Array.from(u).join(","),l)}}}}function FOe(t){return(e,n,i)=>{if(!i.consumable.test(n.item,e.name))return;const r=t(n.attributeOldValue,i,n),o=t(n.attributeNewValue,i,n);if(!r&&!o)return;i.consumable.consume(n.item,e.name);const s=i.mapper.toViewElement(n.item),a=i.writer;if(!s)throw new oe("conversion-attribute-to-attribute-on-text",i.dispatcher,n);if(n.attributeOldValue!==null&&r){let l=r.value;r.key=="style"&&(typeof r.value=="string"?l=new tv(a.document.stylesProcessor).setTo(r.value).getStylesEntries().map(([u])=>u):l=Object.keys(r.value)),a.removeAttribute(r.key,l,s)}if(n.attributeNewValue!==null&&o){let l=o.value;o.key=="style"&&typeof o.value=="string"&&(l=Object.fromEntries(new tv(a.document.stylesProcessor).setTo(o.value).getStylesEntries())),a.setAttribute(o.key,l,!1,s)}}}function $Oe(t){return(e,n,i)=>{if(!n.item||!(n.item instanceof Xo||n.item instanceof cs)&&!n.item.is("$textProxy"))return;const r=JM(t,n,i);if(!r||!i.consumable.consume(n.item,e.name))return;const o=i.writer,s=xG(o,r),a=o.document.selection;if(n.item instanceof Xo||n.item instanceof cs)o.wrap(a.getFirstRange(),s);else{const l=i.mapper.toViewRange(n.range),u=o.wrap(l,s);for(const c of u.getItems())if(c.is("attributeElement")&&c.isSimilar(s)){i.mapper.bindElementToMarker(c,n.markerName);break}}}}function zOe(t){return(e,n,i)=>{if(!n.item||!(n.item instanceof zn))return;const r=JM(t,n,i);if(!r||!i.consumable.test(n.item,e.name))return;const o=i.mapper.toViewElement(n.item);if(o&&o.getCustomProperty("addHighlight")){i.consumable.consume(n.item,e.name);for(const a of Ee._createIn(n.item))i.consumable.consume(a.item,e.name);o.getCustomProperty("addHighlight")(o,r,i.writer),i.mapper.bindElementToMarker(o,n.markerName)}}}function HOe(t){return(e,n,i)=>{if(n.markerRange.isCollapsed)return;const r=JM(t,n,i);if(!r)return;const o=xG(i.writer,r),s=i.mapper.markerNameToElements(n.markerName);if(s){for(const a of s)i.mapper.unbindElementFromMarkerName(a,n.markerName),a.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(a),o):a.getCustomProperty("removeHighlight")(a,r.id,i.writer);i.writer.clearClonedElementsGroup(n.markerName),e.stop()}}}function UOe(t){const e=IG(t.model),n=ob(t.view,"container");return e.attributes.length&&(e.children=!0),i=>{i.on(`insert:${e.name}`,ROe(n,OG(e)),{priority:t.converterPriority||"normal"}),(e.children||e.attributes.length)&&i.on("reduceChanges",MG(e),{priority:"low"})}}function WOe(t){const e=IG(t.model),n=ob(t.view,"container");return e.children=!0,i=>{if(i._conversionApi.schema.checkChild(e.name,"$text"))throw new oe("conversion-element-to-structure-disallowed-text",i,{elementName:e.name});i.on(`insert:${e.name}`,MOe(n,OG(e)),{priority:t.converterPriority||"normal"}),i.on("reduceChanges",MG(e),{priority:"low"})}}function qOe(t){t=Bo(t);let e=t.model;typeof e=="string"&&(e={key:e});let n=`attribute:${e.key}`;if(e.name&&(n+=":"+e.name),e.values)for(const r of e.values)t.view[r]=ob(t.view[r],"attribute");else t.view=ob(t.view,"attribute");const i=RG(t);return r=>{r.on(n,IOe(i),{priority:t.converterPriority||"normal"})}}function jOe(t){t=Bo(t);let e=t.model;typeof e=="string"&&(e={key:e});let n=`attribute:${e.key}`;if(e.name&&(n+=":"+e.name),e.values)for(const r of e.values)t.view[r]=N4(t.view[r]);else t.view=N4(t.view);const i=RG(t);return r=>{r.on(n,FOe(i),{priority:t.converterPriority||"normal"})}}function KOe(t){const e=ob(t.view,"ui");return n=>{n.on(`addMarker:${t.model}`,OOe(e),{priority:t.converterPriority||"normal"}),n.on(`removeMarker:${t.model}`,LOe(),{priority:t.converterPriority||"normal"})}}function GOe(t){t=Bo(t);const e=t.model;let n=t.view;return n||(n=i=>({group:e,name:i.substr(t.model.length+1)})),i=>{i.on(`addMarker:${e}`,DOe(n),{priority:t.converterPriority||"normal"}),i.on(`removeMarker:${e}`,VOe(n),{priority:t.converterPriority||"normal"})}}function YOe(t){return e=>{e.on(`addMarker:${t.model}`,$Oe(t.view),{priority:t.converterPriority||"normal"}),e.on(`addMarker:${t.model}`,zOe(t.view),{priority:t.converterPriority||"normal"}),e.on(`removeMarker:${t.model}`,HOe(t.view),{priority:t.converterPriority||"normal"})}}function IG(t){return typeof t=="string"&&(t={name:t}),{name:t.name,attributes:t.attributes?li(t.attributes):[],children:!!t.children}}function ob(t,e){return typeof t=="function"?t:(n,i)=>XOe(t,i,e)}function XOe(t,e,n){typeof t=="string"&&(t={name:t});let i;const r=e.writer,o=Object.assign({},t.attributes);if(n=="container")i=r.createContainerElement(t.name,o);else if(n=="attribute"){const s={priority:t.priority||hm.DEFAULT_PRIORITY};i=r.createAttributeElement(t.name,o,s)}else i=r.createUIElement(t.name,o);if(t.styles){const s=Object.keys(t.styles);for(const a of s)r.setStyle(a,t.styles[a],i)}if(t.classes){const s=t.classes;if(typeof s=="string")r.addClass(s,i);else for(const a of s)r.addClass(a,i)}return i}function RG(t){return t.model.values?(e,n,i)=>{const r=t.view[e];return r?r(e,n,i):null}:t.view}function N4(t){return typeof t=="string"?e=>({key:t,value:e}):typeof t=="object"?t.value?()=>t:e=>({key:t.key,value:e}):t}function JM(t,e,n){const i=typeof t=="function"?t(e,n):{...t};return i?(i.priority||(i.priority=10),i.id||(i.id=e.markerName),i):null}function JOe(t){return(e,n)=>{if(!e.is("element",t.name))return!1;if(n.type=="attribute"){if(t.attributes.includes(n.attributeKey))return!0}else{if(t.children)return!0}return!1}}function MG(t){const e=JOe(t);return(n,i)=>{const r=[];i.reconvertedElements||(i.reconvertedElements=new Set);for(const o of i.changes){const s=o.type=="attribute"?o.range.start.nodeAfter:o.position.parent;if(!s||!e(s,o)||o.type=="reinsert"){r.push(o);continue}if(o.type=="insert"&&o.action=="rename"&&i.refreshedItems.add(o.position.nodeAfter),!i.reconvertedElements.has(s)){i.reconvertedElements.add(s);const a=Be._createBefore(s);let l=r.length;for(let u=r.length-1;u>=0;u--){const c=r[u],f=(c.type=="attribute"?c.range.start:c.position).compareWith(a);if(f=="before"||c.type=="remove"&&f=="same")break;l=u}r.splice(l,0,{type:"reinsert",name:s.name,position:a,length:1})}}i.changes=r}}function OG(t){return(e,n,i={})=>{const r=["insert"];for(const o of t.attributes)e.hasAttribute(o)&&r.push(`attribute:${o}`);return r.every(o=>n.test(e,o))?(i.preflight||r.forEach(o=>n.consume(e,o)),!0):!1}}function ZOe(t,e,n){return(i,r)=>{const o=i.createContainerElement("$slot");let s=null;if(r==="children")s=Array.from(t.getChildren());else if(typeof r=="function")s=Array.from(t.getChildren()).filter(a=>r(a));else throw new oe("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:r});return e.set(o,s),o}}function QOe(t,e,n){const i=Array.from(e.values()).flat(),r=new Set(i);if(r.size!=i.length)throw new oe("conversion-slot-filter-overlap",n.dispatcher,{element:t});if(r.size!=t.childCount)throw new oe("conversion-slot-filter-incomplete",n.dispatcher,{element:t})}function eLe(t,e,n,i){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let r=null,o=null;for([r,o]of e)LG(t,o,n,i),n.writer.setCustomProperty("$structureSlotParent",!0,r.parent),n.writer.move(n.writer.createRangeIn(r),n.writer.createPositionBefore(r)),n.writer.remove(r);n.mapper.off("modelToViewPosition",s);function s(a,l){const u=l.modelPosition.nodeAfter,c=o.indexOf(u);c<0||(l.viewPosition=l.mapper.findPositionIn(r,c))}}function LG(t,e,n,i){for(const r of e)tLe(t.root,r,n,i)||n.convertItem(r)}function tLe(t,e,n,i){const{writer:r,mapper:o}=n;if(!i.reconversion)return!1;const s=o.toViewElement(e);return!s||s.root==t||!n.canReuseView(s)?!1:(r.move(r.createRangeOn(s),o.toViewPosition(Be._createBefore(e))),!0)}function nLe(t,e,{preflight:n}={}){return n?e.test(t,"insert"):e.consume(t,"insert")}function DG(t){const{schema:e,document:n}=t.model;for(const i of n.getRoots())if(i.isEmpty&&!e.checkChild(i,"$text")&&e.checkChild(i,"paragraph"))return t.insertElement("paragraph",i),!0;return!1}function NG(t,e,n){const i=n.createContext(t);return!(!n.checkChild(i,"paragraph")||!n.checkChild(i.push("paragraph"),e))}function BG(t,e){const n=e.createElement("paragraph");return e.insert(n,t),e.createPositionAt(n,0)}class iLe extends kG{elementToElement(e){return this.add(VG(e))}elementToAttribute(e){return this.add(sLe(e))}attributeToAttribute(e){return this.add(aLe(e))}elementToMarker(e){return this.add(lLe(e))}dataToMarker(e){return this.add(uLe(e))}}function B4(){return(t,e,n)=>{if(!e.modelRange&&n.consumable.consume(e.viewItem,{name:!0})){const{modelRange:i,modelCursor:r}=n.convertChildren(e.viewItem,e.modelCursor);e.modelRange=i,e.modelCursor=r}}}function rLe(){return(t,e,{schema:n,consumable:i,writer:r})=>{let o=e.modelCursor;if(!i.test(e.viewItem))return;if(!n.checkChild(o,"$text")){if(!NG(o,"$text",n)||e.viewItem.data.trim().length==0)return;o=BG(o,r)}i.consume(e.viewItem);const s=r.createText(e.viewItem.data);r.insert(s,o),e.modelRange=r.createRange(o,o.getShiftedBy(s.offsetSize)),e.modelCursor=e.modelRange.end}}function oLe(t,e){return(n,i)=>{const r=i.newSelection,o=[];for(const a of r.getRanges())o.push(e.toModelRange(a));const s=t.createSelection(o,{backward:r.isBackward});s.isEqual(t.document.selection)||t.change(a=>{a.setSelection(s)})}}function VG(t){t=Bo(t);const e=TA(t),n=ZM(t.view),i=n?`element:${n}`:"element";return r=>{r.on(i,e,{priority:t.converterPriority||"normal"})}}function sLe(t){t=Bo(t),FG(t);const e=$G(t,!1),n=ZM(t.view),i=n?`element:${n}`:"element";return r=>{r.on(i,e,{priority:t.converterPriority||"low"})}}function aLe(t){t=Bo(t);let e=null;(typeof t.view=="string"||t.view.key)&&(e=fLe(t)),FG(t,e);const n=$G(t,!0);return i=>{i.on("element",n,{priority:t.converterPriority||"low"})}}function lLe(t){const e=gLe(t.model);return VG({...t,model:e})}function uLe(t){t=Bo(t),t.model||(t.model=r=>r?t.view+":"+r:t.view);const e={view:t.view,model:t.model},n=TA(V4(e,"start")),i=TA(V4(e,"end"));return r=>{r.on(`element:${t.view}-start`,n,{priority:t.converterPriority||"normal"}),r.on(`element:${t.view}-end`,i,{priority:t.converterPriority||"normal"});const o=ou.low,s=ou.highest,a=ou.get(t.converterPriority)/s;r.on("element",cLe(e),{priority:o+a})}}function cLe(t){return(e,n,i)=>{const r=`data-${t.view}`;if(!i.consumable.test(n.viewItem,{attributes:r+"-end-after"})&&!i.consumable.test(n.viewItem,{attributes:r+"-start-after"})&&!i.consumable.test(n.viewItem,{attributes:r+"-end-before"})&&!i.consumable.test(n.viewItem,{attributes:r+"-start-before"}))return;n.modelRange||Object.assign(n,i.convertChildren(n.viewItem,n.modelCursor)),i.consumable.consume(n.viewItem,{attributes:r+"-end-after"})&&o(n.modelRange.end,n.viewItem.getAttribute(r+"-end-after").split(",")),i.consumable.consume(n.viewItem,{attributes:r+"-start-after"})&&o(n.modelRange.end,n.viewItem.getAttribute(r+"-start-after").split(",")),i.consumable.consume(n.viewItem,{attributes:r+"-end-before"})&&o(n.modelRange.start,n.viewItem.getAttribute(r+"-end-before").split(",")),i.consumable.consume(n.viewItem,{attributes:r+"-start-before"})&&o(n.modelRange.start,n.viewItem.getAttribute(r+"-start-before").split(","));function o(s,a){for(const l of a){const u=t.model(l,i),c=i.writer.createElement("$marker",{"data-name":u});i.writer.insert(c,s),n.modelCursor.isEqual(s)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(s,1),n.modelRange=n.modelRange._getTransformedByInsertion(s,1)[0]}}}}function ZM(t){return typeof t=="string"?t:typeof t=="object"&&typeof t.name=="string"?t.name:null}function TA(t){const e=new pl(t.view);return(n,i,r)=>{const o=e.match(i.viewItem);if(!o)return;const s=o.match;if(s.name=!0,!r.consumable.test(i.viewItem,s))return;const a=dLe(t.model,i.viewItem,r);a&&r.safeInsert(a,i.modelCursor)&&(r.consumable.consume(i.viewItem,s),r.convertChildren(i.viewItem,a),r.updateConversionResult(a,i))}}function dLe(t,e,n){return t instanceof Function?t(e,n):n.writer.createElement(t)}function fLe(t){typeof t.view=="string"&&(t.view={key:t.view});const e=t.view.key,n=typeof t.view.value>"u"?/[\s\S]*/:t.view.value;let i;return e=="class"||e=="style"?i={[e=="class"?"classes":"styles"]:n}:i={attributes:{[e]:n}},t.view.name&&(i.name=t.view.name),t.view=i,e}function FG(t,e=null){const n=e===null?!0:o=>o.getAttribute(e),i=typeof t.model!="object"?t.model:t.model.key,r=typeof t.model!="object"||typeof t.model.value>"u"?n:t.model.value;t.model={key:i,value:r}}function $G(t,e){const n=new pl(t.view);return(i,r,o)=>{if(!r.modelRange&&e)return;const s=n.match(r.viewItem);if(!s||(hLe(t.view,r.viewItem)?s.match.name=!0:delete s.match.name,!o.consumable.test(r.viewItem,s.match)))return;const a=t.model.key,l=typeof t.model.value=="function"?t.model.value(r.viewItem,o,r):t.model.value;if(l==null)return;r.modelRange||Object.assign(r,o.convertChildren(r.viewItem,r.modelCursor)),mLe(r.modelRange,{key:a,value:l},e,o)&&(o.consumable.test(r.viewItem,{name:!0})&&(s.match.name=!0),o.consumable.consume(r.viewItem,s.match))}}function hLe(t,e){const n=typeof t=="function"?t(e):t;return typeof n=="object"&&!ZM(n)?!1:!n.classes&&!n.attributes&&!n.styles}function mLe(t,e,n,i){let r=!1;for(const o of Array.from(t.getItems({shallow:n})))i.schema.checkAttribute(o,e.key)&&(r=!0,!o.hasAttribute(e.key)&&i.writer.setAttribute(e.key,e.value,o));return r}function gLe(t){return(e,n)=>{const i=typeof t=="string"?t:t(e,n);return n.writer.createElement("$marker",{"data-name":i})}}function V4(t,e){const n=(i,r)=>{const o=i.getAttribute("name"),s=t.model(o,r);return r.writer.createElement("$marker",{"data-name":s})};return{view:`${t.view}-${e}`,model:n}}class pLe extends Ln(){model;view;mapper;downcastDispatcher;constructor(e,n){super(),this.model=e,this.view=new aOe(n),this.mapper=new _G,this.downcastDispatcher=new CG({mapper:this.mapper,schema:e.schema});const i=this.model.document,r=i.selection,o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(i,"change",()=>{this.view.change(s=>{this.downcastDispatcher.convertChanges(i.differ,o,s),this.downcastDispatcher.convertSelection(r,o,s)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",oLe(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",TG(),{priority:"lowest"}),this.downcastDispatcher.on("insert",EG(),{priority:"lowest"}),this.downcastDispatcher.on("remove",EOe(),{priority:"low"}),this.downcastDispatcher.on("cleanSelection",POe()),this.downcastDispatcher.on("selection",xOe(),{priority:"low"}),this.downcastDispatcher.on("selection",AOe(),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(s=>{if(s.rootName=="$graveyard")return null;const a=new cG(this.view.document,s.name);return a.rootName=s.rootName,this.mapper.bindElements(s,a),a})}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const n=typeof e=="string"?e:e.name,i=this.model.markers.get(n);if(!i)throw new oe("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:n});this.model.change(()=>{this.model.markers._refresh(i)})}reconvertItem(e){this.model.change(()=>{this.model.document.differ._refreshItem(e)})}}class vLe extends Ln(){_sourceDefinitions={};_attributeProperties=Object.create(null);_customChildChecks=new Map;_customAttributeChecks=new Map;_genericCheckSymbol=Symbol("$generic");_compiledDefinitions;constructor(){super(),this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,n)=>{n[0]=new su(n[0])},{priority:"highest"}),this.on("checkChild",(e,n)=>{n[0]=new su(n[0]),n[1]=this.getDefinition(n[1])},{priority:"highest"})}register(e,n){if(this._sourceDefinitions[e])throw new oe("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},n)],this._clearCache()}extend(e,n){if(!this._sourceDefinitions[e])throw new oe("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},n)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let n;return typeof e=="string"?n=e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?n="$text":n=e.name,this.getDefinitions()[n]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const n=this.getDefinition(e);return!!(n&&n.isBlock)}isLimit(e){const n=this.getDefinition(e);return n?!!(n.isLimit||n.isObject):!1}isObject(e){const n=this.getDefinition(e);return n?!!(n.isObject||n.isLimit&&n.isSelectable&&n.isContent):!1}isInline(e){const n=this.getDefinition(e);return!!(n&&n.isInline)}isSelectable(e){const n=this.getDefinition(e);return n?!!(n.isSelectable||n.isObject):!1}isContent(e){const n=this.getDefinition(e);return n?!!(n.isContent||n.isObject):!1}checkChild(e,n){return n?this._checkContextMatch(e,n):!1}checkAttribute(e,n){const i=this.getDefinition(e.last);if(!i)return!1;const r=this._evaluateAttributeChecks(e,n);return r!==void 0?r:i.allowAttributes.includes(n)}checkMerge(e,n){if(e instanceof Be){const i=e.nodeBefore,r=e.nodeAfter;if(!(i instanceof zn))throw new oe("schema-check-merge-no-element-before",this);if(!(r instanceof zn))throw new oe("schema-check-merge-no-element-after",this);return this.checkMerge(i,r)}if(this.isLimit(e)||this.isLimit(n))return!1;for(const i of n.getChildren())if(!this.checkChild(e,i))return!1;return!0}addChildCheck(e,n){const i=n!==void 0?n:this._genericCheckSymbol,r=this._customChildChecks.get(i)||[];r.push(e),this._customChildChecks.set(i,r)}addAttributeCheck(e,n){const i=n!==void 0?n:this._genericCheckSymbol,r=this._customAttributeChecks.get(i)||[];r.push(e),this._customAttributeChecks.set(i,r)}setAttributeProperties(e,n){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),n)}getAttributeProperties(e){return this._attributeProperties[e]||Object.create(null)}getLimitElement(e){let n;for(e instanceof Be?n=e.parent:n=(e instanceof Ee?[e]:Array.from(e.getRanges())).reduce((r,o)=>{const s=o.getCommonAncestor();return r?r.getCommonAncestor(s,{includeSelf:!0}):s},null);!this.isLimit(n)&&n.parent;)n=n.parent;return n}checkAttributeInSelection(e,n){if(e.isCollapsed){const r=[...e.getFirstPosition().getAncestors(),new ni("",e.getAttributes())];return this.checkAttribute(r,n)}else{const i=e.getRanges();for(const r of i)for(const o of r)if(this.checkAttribute(o.item,n))return!0}return!1}*getValidRanges(e,n,i={}){e=OLe(e);for(const r of e)yield*this._getValidRangesForRange(r,n,i)}getNearestSelectionRange(e,n="both"){if(e.root.rootName=="$graveyard")return null;if(this.checkChild(e,"$text"))return new Ee(e);let i,r;const o=e.getAncestors().reverse().find(s=>this.isLimit(s))||e.root;(n=="both"||n=="backward")&&(i=new Ql({boundaries:Ee._createIn(o),startPosition:e,direction:"backward"})),(n=="both"||n=="forward")&&(r=new Ql({boundaries:Ee._createIn(o),startPosition:e}));for(const s of MLe(i,r)){const a=s.walker==i?"elementEnd":"elementStart",l=s.value;if(l.type==a&&this.isObject(l.item))return Ee._createOn(l.item);if(this.checkChild(l.nextPosition,"$text"))return new Ee(l.nextPosition)}return null}findAllowedParent(e,n){let i=e.parent;for(;i;){if(this.checkChild(i,n))return i;if(this.isLimit(i))return null;i=i.parent}return null}setAllowedAttributes(e,n,i){const r=i.model;for(const[o,s]of Object.entries(n))r.schema.checkAttribute(e,o)&&i.setAttribute(o,s,e)}removeDisallowedAttributes(e,n){for(const i of e)if(i.is("$text"))F4(this,i,n);else{const o=Ee._createIn(i).getPositions();for(const s of o){const a=s.nodeBefore||s.parent;F4(this,a,n)}}}getAttributesWithProperty(e,n,i){const r={};for(const[o,s]of e.getAttributes()){const a=this.getAttributeProperties(o);a[n]!==void 0&&(i===void 0||i===a[n])&&(r[o]=s)}return r}createContext(e){return new su(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},n=this._sourceDefinitions,i=Object.keys(n);for(const o of i)e[o]=bLe(n[o],o);const r=Object.values(e);for(const o of r)yLe(e,o),wLe(e,o),_Le(e,o),CLe(e,o);for(const o of r)SLe(e,o);for(const o of r)kLe(e,o);for(const o of r)TLe(e,o);for(const o of r)xLe(e,o);for(const o of r)ALe(e,o);this._compiledDefinitions=ELe(e)}_checkContextMatch(e,n){const i=e.last;let r=this._evaluateChildChecks(e,n);if(r=r!==void 0?r:n.allowIn.includes(i.name),!r)return!1;const o=this.getDefinition(i),s=e.trimLast();return o?s.length==0?!0:this._checkContextMatch(s,o):!1}_evaluateChildChecks(e,n){const i=this._customChildChecks.get(this._genericCheckSymbol)||[],r=this._customChildChecks.get(n.name)||[];for(const o of[...i,...r]){const s=o(e,n);if(s!==void 0)return s}}_evaluateAttributeChecks(e,n){const i=this._customAttributeChecks.get(this._genericCheckSymbol)||[],r=this._customAttributeChecks.get(n)||[];for(const o of[...i,...r]){const s=o(e,n);if(s!==void 0)return s}}*_getValidRangesForRange(e,n,i){let r=e.start,o=e.start;for(const s of e.getItems({shallow:!0})){if(s.is("element"))if(i.includeEmptyRanges&&s.isEmpty){const a=this.createContext(s);this.checkChild(a,"$text")&&this.checkAttribute(a.push("$text"),n)&&(yield Ee._createIn(s))}else yield*this._getValidRangesForRange(Ee._createIn(s),n,i);this.checkAttribute(s,n)||(r.isEqual(o)||(yield new Ee(r,o)),r=Be._createAfter(s)),o=Be._createAfter(s)}r.isEqual(o)||(yield new Ee(r,o))}findOptimalInsertionRange(e,n){const i=e.getSelectedElement();if(i&&this.isObject(i)&&!this.isInline(i))return n=="before"||n=="after"?new Ee(Be._createAt(i,n)):Ee._createOn(i);const r=Mi(e.getSelectedBlocks());if(!r)return new Ee(e.focus);if(r.isEmpty)return new Ee(Be._createAt(r,0));const o=Be._createAfter(r);return e.focus.isTouching(o)?new Ee(o):new Ee(Be._createBefore(r))}}class su{_items;constructor(e){if(e instanceof su)return e;let n;typeof e=="string"?n=[e]:Array.isArray(e)?n=e:n=e.getAncestors({includeSelf:!0}),this._items=n.map(RLe)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const n=new su([e]);return n._items=[...this._items,...n._items],n}trimLast(){const e=new su([]);return e._items=this._items.slice(0,-1),e}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function bLe(t,e){const n={name:e,allowIn:new Set,allowChildren:new Set,disallowIn:new Set,disallowChildren:new Set,allowContentOf:new Set,allowWhere:new Set,allowAttributes:new Set,disallowAttributes:new Set,allowAttributesOf:new Set,inheritTypesFrom:new Set};return PLe(t,n),Ra(t,n,"allowIn"),Ra(t,n,"allowChildren"),Ra(t,n,"disallowIn"),Ra(t,n,"disallowChildren"),Ra(t,n,"allowContentOf"),Ra(t,n,"allowWhere"),Ra(t,n,"allowAttributes"),Ra(t,n,"disallowAttributes"),Ra(t,n,"allowAttributesOf"),Ra(t,n,"inheritTypesFrom"),ILe(t,n),n}function yLe(t,e){for(const n of e.allowIn){const i=t[n];i?i.allowChildren.add(e.name):e.allowIn.delete(n)}}function wLe(t,e){for(const n of e.allowChildren){const i=t[n];i?i.allowIn.add(e.name):e.allowChildren.delete(n)}}function _Le(t,e){for(const n of e.disallowIn){const i=t[n];i?i.disallowChildren.add(e.name):e.disallowIn.delete(n)}}function CLe(t,e){for(const n of e.disallowChildren){const i=t[n];i?i.disallowIn.add(e.name):e.disallowChildren.delete(n)}}function SLe(t,e){for(const n of e.disallowChildren)e.allowChildren.delete(n);for(const n of e.disallowIn)e.allowIn.delete(n);for(const n of e.disallowAttributes)e.allowAttributes.delete(n)}function kLe(t,e){for(const n of e.allowContentOf){const i=t[n];i&&(i.disallowChildren.forEach(r=>{e.allowChildren.has(r)||(e.disallowChildren.add(r),t[r].disallowIn.add(e.name))}),i.allowChildren.forEach(r=>{e.disallowChildren.has(r)||(e.allowChildren.add(r),t[r].allowIn.add(e.name))}))}}function TLe(t,e){for(const n of e.allowWhere){const i=t[n];i&&(i.disallowIn.forEach(r=>{e.allowIn.has(r)||(e.disallowIn.add(r),t[r].disallowChildren.add(e.name))}),i.allowIn.forEach(r=>{e.disallowIn.has(r)||(e.allowIn.add(r),t[r].allowChildren.add(e.name))}))}}function ELe(t){const e={};for(const n of Object.values(t))e[n.name]={name:n.name,isBlock:!!n.isBlock,isContent:!!n.isContent,isInline:!!n.isInline,isLimit:!!n.isLimit,isObject:!!n.isObject,isSelectable:!!n.isSelectable,allowIn:Array.from(n.allowIn).filter(i=>!!t[i]),allowChildren:Array.from(n.allowChildren).filter(i=>!!t[i]),allowAttributes:Array.from(n.allowAttributes)};return e}function xLe(t,e){for(const n of e.allowAttributesOf){const i=t[n];if(!i)return;i.allowAttributes.forEach(r=>{e.disallowAttributes.has(r)||e.allowAttributes.add(r)})}}function ALe(t,e){for(const n of e.inheritTypesFrom){const i=t[n];if(i){const r=Object.keys(i).filter(o=>o.startsWith("is"));for(const o of r)o in e||(e[o]=i[o])}}}function PLe(t,e){for(const n of t){const i=Object.keys(n).filter(r=>r.startsWith("is"));for(const r of i)e[r]=!!n[r]}}function Ra(t,e,n){for(const i of t){let r=i[n];typeof r=="string"&&(r=[r]),Array.isArray(r)&&r.forEach(o=>e[n].add(o))}}function ILe(t,e){for(const n of t){const i=n.inheritAllFrom;i&&(e.allowContentOf.add(i),e.allowWhere.add(i),e.allowAttributesOf.add(i),e.inheritTypesFrom.add(i))}}function RLe(t){return typeof t=="string"||t.is("documentFragment")?{name:typeof t=="string"?t:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute(e){return t.getAttribute(e)}}}function*MLe(t,e){let n=!1;for(;!n;){if(n=!0,t){const i=t.next();i.done||(n=!1,yield{walker:t,value:i.value})}if(e){const i=e.next();i.done||(n=!1,yield{walker:e,value:i.value})}}}function*OLe(t){for(const e of t)yield*e.getMinimalFlatRanges()}function F4(t,e,n){for(const i of e.getAttributeKeys())t.checkAttribute(e,i)||n.removeAttribute(i,e)}class LLe extends Fn(){conversionApi;_splitParts=new Map;_cursorParents=new Map;_modelCursor=null;_emptyElementsToKeep=new Set;constructor(e){super(),this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(n,i)=>this._convertItem(n,i),convertChildren:(n,i)=>this._convertChildren(n,i),safeInsert:(n,i)=>this._safeInsert(n,i),updateConversionResult:(n,i)=>this._updateConversionResult(n,i),splitToAllowedParent:(n,i)=>this._splitToAllowedParent(n,i),getSplitParts:n=>this._getSplitParts(n),keepEmptyElement:n=>this._keepEmptyElement(n)}}convert(e,n,i=["$root"]){this.fire("viewCleanup",e),this._modelCursor=NLe(i,n),this.conversionApi.writer=n,this.conversionApi.consumable=u1.createFrom(e),this.conversionApi.store={};const{modelRange:r}=this._convertItem(e,this._modelCursor),o=n.createDocumentFragment();if(r){this._removeEmptyElements();const s=this._modelCursor.parent,a=s._removeChildren(0,s.childCount);o._insertChild(0,a),o.markers=DLe(o,n)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,n){const i={viewItem:e,modelCursor:n,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,i,this.conversionApi):e.is("$text")?this.fire("text",i,this.conversionApi):this.fire("documentFragment",i,this.conversionApi),i.modelRange&&!(i.modelRange instanceof Ee))throw new oe("view-conversion-dispatcher-incorrect-result",this);return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(e,n){let i=n.is("position")?n:Be._createAt(n,0);const r=new Ee(i);for(const o of Array.from(e.getChildren())){const s=this._convertItem(o,i);s.modelRange instanceof Ee&&(r.end=s.modelRange.end,i=s.modelCursor)}return{modelRange:r,modelCursor:i}}_safeInsert(e,n){const i=this._splitToAllowedParent(e,n);return i?(this.conversionApi.writer.insert(e,i.position),!0):!1}_updateConversionResult(e,n){const i=this._getSplitParts(e),r=this.conversionApi.writer;n.modelRange||(n.modelRange=r.createRange(r.createPositionBefore(e),r.createPositionAfter(i[i.length-1])));const o=this._cursorParents.get(e);o?n.modelCursor=r.createPositionAt(o,0):n.modelCursor=n.modelRange.end}_splitToAllowedParent(e,n){const{schema:i,writer:r}=this.conversionApi;let o=i.findAllowedParent(n,e);if(o){if(o===n.parent)return{position:n};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return NG(n,e,i)?{position:BG(n,r)}:null;const s=this.conversionApi.writer.split(n,o),a=[];for(const u of s.range.getWalker())if(u.type=="elementEnd")a.push(u.item);else{const c=a.pop(),d=u.item;this._registerSplitPair(c,d)}const l=s.range.end.parent;return this._cursorParents.set(e,l),{position:s.position,cursorParent:l}}_registerSplitPair(e,n){this._splitParts.has(e)||this._splitParts.set(e,[e]);const i=this._splitParts.get(e);this._splitParts.set(n,i),i.push(n)}_getSplitParts(e){let n;return this._splitParts.has(e)?n=this._splitParts.get(e):n=[e],n}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){const e=new Map;for(const n of this._splitParts.keys())if(n.isEmpty&&!this._emptyElementsToKeep.has(n)){const i=e.get(n.parent)||[];i.push(n),this._splitParts.delete(n),e.set(n.parent,i)}for(const[n,i]of e)n._removeChildrenArray(i);e.size&&this._removeEmptyElements()}}function DLe(t,e){const n=new Set,i=new Map,r=Ee._createIn(t).getItems();for(const o of r)o.is("element","$marker")&&n.add(o);for(const o of n){const s=o.getAttribute("data-name"),a=e.createPositionBefore(o);i.has(s)?i.get(s).end=a.clone():i.set(s,new Ee(a.clone())),e.remove(o)}return i}function NLe(t,e){let n;for(const i of new su(t)){const r={};for(const s of i.getAttributeKeys())r[s]=i.getAttribute(s);const o=e.createElement(i.name,r);n&&e.insert(o,n),n=Be._createAt(o,0)}return n}class BLe{getHtml(e){const i=Qe.document.implementation.createHTMLDocument("").createElement("div");return i.appendChild(e),i.innerHTML}}class VLe{domParser;domConverter;htmlWriter;skipComments=!0;constructor(e){this.domParser=new DOMParser,this.domConverter=new pS(e,{renderingMode:"data"}),this.htmlWriter=new BLe}toData(e){const n=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(n)}toView(e){const n=this._toDom(e);return this.domConverter.domToView(n,{skipComments:this.skipComments})}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode=e=="marked"?"markedNbsp":"nbsp"}_toDom(e){/<(?:html|body|head|meta)(?:\s[^>]*)?>/i.test(e.trim().slice(0,1e4))||(e=`<body>${e}</body>`);const n=this.domParser.parseFromString(e,"text/html"),i=n.createDocumentFragment(),r=n.body.childNodes;for(;r.length>0;)i.appendChild(r[0]);return i}}class FLe extends Fn(){model;mapper;downcastDispatcher;upcastDispatcher;viewDocument;stylesProcessor;htmlProcessor;processor;_viewWriter;constructor(e,n){super(),this.model=e,this.mapper=new _G,this.downcastDispatcher=new CG({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",TG(),{priority:"lowest"}),this.downcastDispatcher.on("insert",EG(),{priority:"lowest"}),this.upcastDispatcher=new LLe({schema:e.schema}),this.viewDocument=new mS(n),this.stylesProcessor=n,this.htmlProcessor=new VLe(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new dG(this.viewDocument),this.upcastDispatcher.on("text",rLe(),{priority:"lowest"}),this.upcastDispatcher.on("element",B4(),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",B4(),{priority:"lowest"}),Ln().prototype.decorate.call(this,"init"),Ln().prototype.decorate.call(this,"set"),Ln().prototype.decorate.call(this,"get"),Ln().prototype.decorate.call(this,"toView"),Ln().prototype.decorate.call(this,"toModel"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},DG)},{priority:"lowest"})}get(e={}){const{rootName:n="main",trim:i="empty"}=e;if(!this._checkIfRootsExists([n]))throw new oe("datacontroller-get-non-existent-root",this);const r=this.model.document.getRoot(n);return r.isAttached()||hn("datacontroller-get-detached-root",this),i==="empty"&&!this.model.hasContent(r,{ignoreWhitespaces:!0})?"":this.stringify(r,e)}stringify(e,n={}){const i=this.toView(e,n);return this.processor.toData(i)}toView(e,n={}){const i=this.viewDocument,r=this._viewWriter;this.mapper.clearBindings();const o=Ee._createIn(e),s=new af(i);this.mapper.bindElements(e,s);const a=e.is("documentFragment")?e.markers:$Le(e);return this.downcastDispatcher.convert(o,a,r,n),s}init(e){if(this.model.document.version)throw new oe("datacontroller-init-document-not-empty",this);let n={};if(typeof e=="string"?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new oe("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},i=>{for(const r of Object.keys(n)){const o=this.model.document.getRoot(r);i.insert(this.parse(n[r],o),o,0)}}),Promise.resolve()}set(e,n={}){let i={};if(typeof e=="string"?i.main=e:i=e,!this._checkIfRootsExists(Object.keys(i)))throw new oe("datacontroller-set-non-existent-root",this);this.model.enqueueChange(n.batchType||{},r=>{r.setSelection(null),r.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const o of Object.keys(i)){const s=this.model.document.getRoot(o);r.remove(r.createRangeIn(s)),r.insert(this.parse(i[o],s),s,0)}})}parse(e,n="$root"){const i=this.processor.toView(e);return this.toModel(i,n)}toModel(e,n="$root"){return this.model.change(i=>this.upcastDispatcher.convert(e,i,n))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const n of e)if(!this.model.document.getRoot(n))return!1;return!0}}function $Le(t){const e=[],n=t.root.document;if(!n)return new Map;const i=Ee._createIn(t);for(const r of n.model.markers){const o=r.getRange(),s=o.isCollapsed,a=o.start.isEqual(i.start)||o.end.isEqual(i.end);if(s&&a)e.push([r.name,o]);else{const l=i.getIntersection(o);l&&e.push([r.name,l])}}return e.sort(([r,o],[s,a])=>{if(o.end.compareWith(a.start)!=="after")return 1;if(o.start.compareWith(a.end)!=="before")return-1;switch(o.start.compareWith(a.start)){case"before":return 1;case"after":return-1;default:switch(o.end.compareWith(a.end)){case"before":return 1;case"after":return-1;default:return s.localeCompare(r)}}}),new Map(e)}class zLe{_helpers=new Map;_downcast;_upcast;constructor(e,n){this._downcast=li(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=li(n),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,n){const i=this._downcast.includes(n);if(!this._upcast.includes(n)&&!i)throw new oe("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[n],isDowncast:i})}for(e){if(!this._helpers.has(e))throw new oe("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:n,view:i}of NT(e))this.for("upcast").elementToElement({model:n,view:i,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:n,view:i}of NT(e))this.for("upcast").elementToAttribute({view:i,model:n,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:n,view:i}of NT(e))this.for("upcast").attributeToAttribute({view:i,model:n})}_createConversionHelpers({name:e,dispatchers:n,isDowncast:i}){if(this._helpers.has(e))throw new oe("conversion-group-exists",this);const r=i?new TOe(n):new iLe(n);this._helpers.set(e,r)}}function*NT(t){if(t.model.values)for(const e of t.model.values){const n={key:t.model.key,value:e},i=t.view[e],r=t.upcastAlso?t.upcastAlso[e]:void 0;yield*$4(n,i,r)}else yield*$4(t.model,t.view,t.upcastAlso)}function*$4(t,e,n){if(yield{model:t,view:e},n)for(const i of li(n))yield{model:t,view:i}}class ds{baseVersion;isDocumentOperation;batch;constructor(e){this.baseVersion=e,this.isDocumentOperation=this.baseVersion!==null,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,n){return new this(e.baseVersion)}}function QM(t,e){const n=HG(e),i=n.reduce((s,a)=>s+a.offsetSize,0),r=t.parent;lb(t);const o=t.index;return r._insertChild(o,n),ab(r,o+n.length),ab(r,o),new Ee(t,t.getShiftedBy(i))}function zG(t){if(!t.isFlat)throw new oe("operation-utils-remove-range-not-flat",this);const e=t.start.parent;lb(t.start),lb(t.end);const n=e._removeChildren(t.start.index,t.end.index-t.start.index);return ab(e,t.start.index),n}function sb(t,e){if(!t.isFlat)throw new oe("operation-utils-move-range-not-flat",this);const n=zG(t);return e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset),QM(e,n)}function HLe(t,e,n){lb(t.start),lb(t.end);for(const i of t.getItems({shallow:!0})){const r=i.is("$textProxy")?i.textNode:i;n!==null?r._setAttribute(e,n):r._removeAttribute(e),ab(r.parent,r.index)}ab(t.end.parent,t.end.index)}function HG(t){const e=[];function n(i){if(typeof i=="string")e.push(new ni(i));else if(i instanceof ea)e.push(new ni(i.data,i.getAttributes()));else if(i instanceof Uf)e.push(i);else if(us(i))for(const r of i)n(r)}n(t);for(let i=1;i<e.length;i++){const r=e[i],o=e[i-1];r instanceof ni&&o instanceof ni&&UG(r,o)&&(e.splice(i-1,2,new ni(o.data+r.data,o.getAttributes())),i--)}return e}function ab(t,e){const n=t.getChild(e-1),i=t.getChild(e);if(n&&i&&n.is("$text")&&i.is("$text")&&UG(n,i)){const r=new ni(n.data+i.data,n.getAttributes());t._removeChildren(e-1,2),t._insertChild(e-1,r)}}function lb(t){const e=t.textNode,n=t.parent;if(e){const i=t.offset-e.startOffset,r=e.index;n._removeChildren(r,1);const o=new ni(e.data.substr(0,i),e.getAttributes()),s=new ni(e.data.substr(i),e.getAttributes());n._insertChild(r,[o,s])}}function UG(t,e){const n=t.getAttributes(),i=e.getAttributes();for(const r of n){if(r[1]!==e.getAttribute(r[0]))return!1;i.next()}return i.next().done}class Tn extends ds{sourcePosition;howMany;targetPosition;constructor(e,n,i,r){super(r),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=n,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNone"}get type(){return this.targetPosition.root.rootName==this.sourcePosition.root.rootName?"move":this.targetPosition.root.rootName=="$graveyard"?"remove":this.sourcePosition.root.rootName=="$graveyard"?"reinsert":"move"}get affectedSelectable(){return[Ee._createFromPositionAndShift(this.sourcePosition,this.howMany),Ee._createFromPositionAndShift(this.targetPosition,0)]}clone(){return new Tn(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new Tn(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,n=this.targetPosition.parent,i=this.sourcePosition.offset,r=this.targetPosition.offset;if(i+this.howMany>e.maxOffset)throw new oe("move-operation-nodes-do-not-exist",this);if(e===n&&i<r&&r<i+this.howMany)throw new oe("move-operation-range-into-itself",this);if(this.sourcePosition.root==this.targetPosition.root&&ur(this.sourcePosition.getParentPath(),this.targetPosition.getParentPath())=="prefix"){const o=this.sourcePosition.path.length-1;if(this.targetPosition.path[o]>=i&&this.targetPosition.path[o]<i+this.howMany)throw new oe("move-operation-node-into-itself",this)}}_execute(){sb(Ee._createFromPositionAndShift(this.sourcePosition,this.howMany),this.targetPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e.targetPosition=this.targetPosition.toJSON(),e}static get className(){return"MoveOperation"}static fromJSON(e,n){const i=Be.fromJSON(e.sourcePosition,n),r=Be.fromJSON(e.targetPosition,n);return new this(i,e.howMany,r,e.baseVersion)}}class hr extends ds{position;nodes;shouldReceiveAttributes;constructor(e,n,i){super(i),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new iv(HG(n)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}get affectedSelectable(){return this.position.clone()}clone(){const e=new iv([...this.nodes].map(i=>i._clone(!0))),n=new hr(this.position,e,this.baseVersion);return n.shouldReceiveAttributes=this.shouldReceiveAttributes,n}getReversed(){const e=this.position.root.document.graveyard,n=new Be(e,[0]);return new Tn(this.position,this.nodes.maxOffset,n,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffset<this.position.offset)throw new oe("insert-operation-position-invalid",this)}_execute(){const e=this.nodes;this.nodes=new iv([...e].map(n=>n._clone(!0))),QM(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,n){const i=[];for(const o of e.nodes)o.name?i.push(zn.fromJSON(o)):i.push(ni.fromJSON(o));const r=new hr(Be.fromJSON(e.position,n),i,e.baseVersion);return r.shouldReceiveAttributes=e.shouldReceiveAttributes,r}}class Hn extends ds{splitPosition;howMany;insertionPosition;graveyardPosition;constructor(e,n,i,r,o){super(o),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=n,this.insertionPosition=i,this.graveyardPosition=r?r.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Be(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ee(this.splitPosition,e)}get affectedSelectable(){const e=[Ee._createFromPositionAndShift(this.splitPosition,0),Ee._createFromPositionAndShift(this.insertionPosition,0)];return this.graveyardPosition&&e.push(Ee._createFromPositionAndShift(this.graveyardPosition,0)),e}clone(){return new Hn(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,n=new Be(e,[0]);return new Ai(this.moveTargetPosition,this.howMany,this.splitPosition,n,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,n=this.splitPosition.offset;if(!e||e.maxOffset<n)throw new oe("split-operation-position-invalid",this);if(e.parent){if(this.howMany!==Number.NEGATIVE_INFINITY&&this.howMany!=e.maxOffset-this.splitPosition.offset)throw new oe("split-operation-how-many-invalid",this);if(this.graveyardPosition&&!this.graveyardPosition.nodeAfter)throw new oe("split-operation-graveyard-position-invalid",this)}else throw new oe("split-operation-split-in-root",this);this.howMany=this.splitPosition.parent.maxOffset-this.splitPosition.offset}_execute(){const e=this.splitPosition.parent;if(this.graveyardPosition)sb(Ee._createFromPositionAndShift(this.graveyardPosition,1),this.insertionPosition);else{const i=e._clone();QM(this.insertionPosition,i)}const n=new Ee(Be._createAt(e,this.splitPosition.offset),Be._createAt(e,e.maxOffset));sb(n,this.moveTargetPosition)}toJSON(){const e=super.toJSON();return e.splitPosition=this.splitPosition.toJSON(),e.insertionPosition=this.insertionPosition.toJSON(),this.graveyardPosition&&(e.graveyardPosition=this.graveyardPosition.toJSON()),e}static get className(){return"SplitOperation"}static getInsertionPosition(e){const n=e.path.slice(0,-1);return n[n.length-1]++,new Be(e.root,n,"toPrevious")}static fromJSON(e,n){const i=Be.fromJSON(e.splitPosition,n),r=Be.fromJSON(e.insertionPosition,n),o=e.graveyardPosition?Be.fromJSON(e.graveyardPosition,n):null;return new this(i,e.howMany,r,o,e.baseVersion)}}class Ai extends ds{sourcePosition;howMany;targetPosition;graveyardPosition;constructor(e,n,i,r,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=n,this.targetPosition=i.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=r.clone()}get type(){return"merge"}get deletionPosition(){return new Be(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Ee(this.sourcePosition,e)}get affectedSelectable(){const e=this.sourcePosition.parent;return[Ee._createOn(e),Ee._createFromPositionAndShift(this.targetPosition,0),Ee._createFromPositionAndShift(this.graveyardPosition,0)]}clone(){return new Ai(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),n=this.sourcePosition.path.slice(0,-1),i=new Be(this.sourcePosition.root,n)._getTransformedByMergeOperation(this);return new Hn(e,this.howMany,i,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,n=this.targetPosition.parent;if(e.parent)if(n.parent){if(this.howMany!==Number.NEGATIVE_INFINITY&&this.howMany!=e.maxOffset)throw new oe("merge-operation-how-many-invalid",this)}else throw new oe("merge-operation-target-position-invalid",this);else throw new oe("merge-operation-source-position-invalid",this);this.howMany=this.sourcePosition.parent.maxOffset}_execute(){const e=this.sourcePosition.parent,n=Ee._createIn(e);sb(n,this.targetPosition),sb(Ee._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,n){const i=Be.fromJSON(e.sourcePosition,n),r=Be.fromJSON(e.targetPosition,n),o=Be.fromJSON(e.graveyardPosition,n);return new this(i,e.howMany,r,o,e.baseVersion)}}class no extends ds{name;oldRange;newRange;affectsData;_markers;constructor(e,n,i,r,o,s){super(s),this.name=e,this.oldRange=n?n.clone():null,this.newRange=i?i.clone():null,this.affectsData=o,this._markers=r}get type(){return"marker"}get affectedSelectable(){const e=[];return this.oldRange&&e.push(this.oldRange.clone()),this.newRange&&(this.oldRange?e.push(...this.newRange.getDifference(this.oldRange)):e.push(this.newRange.clone())),e}clone(){return new no(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new no(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,n){return new no(e.name,e.oldRange?Ee.fromJSON(e.oldRange,n):null,e.newRange?Ee.fromJSON(e.newRange,n):null,n.model.markers,e.affectsData,e.baseVersion)}}class zi extends ds{range;key;oldValue;newValue;constructor(e,n,i,r,o){super(o),this.range=e.clone(),this.key=n,this.oldValue=i===void 0?null:i,this.newValue=r===void 0?null:r}get type(){return this.oldValue===null?"addAttribute":this.newValue===null?"removeAttribute":"changeAttribute"}get affectedSelectable(){return this.range.clone()}clone(){return new zi(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new zi(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new oe("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(this.oldValue!==null&&!r1(e.getAttribute(this.key),this.oldValue))throw new oe("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(this.oldValue===null&&this.newValue!==null&&e.hasAttribute(this.key))throw new oe("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){r1(this.oldValue,this.newValue)||HLe(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,n){return new zi(Ee.fromJSON(e.range,n),e.key,e.oldValue,e.newValue,e.baseVersion)}}class or extends ds{get type(){return"noop"}get affectedSelectable(){return null}clone(){return new or(this.baseVersion)}getReversed(){return new or(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}class Po extends ds{position;oldName;newName;constructor(e,n,i,r){super(r),this.position=e,this.position.stickiness="toNext",this.oldName=n,this.newName=i}get type(){return"rename"}get affectedSelectable(){return this.position.nodeAfter}clone(){return new Po(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Po(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(e instanceof zn){if(this.oldName!==""&&e.name!==this.oldName)throw new oe("rename-operation-wrong-name",this)}else throw new oe("rename-operation-wrong-position",this);this.oldName=e.name}_execute(){const e=this.position.nodeAfter;e.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,n){return new Po(Be.fromJSON(e.position,n),e.oldName,e.newName,e.baseVersion)}}class au extends ds{root;key;oldValue;newValue;constructor(e,n,i,r,o){super(o),this.root=e,this.key=n,this.oldValue=i===void 0?null:i,this.newValue=r===void 0?null:r}get type(){return this.oldValue===null?"addRootAttribute":this.newValue===null?"removeRootAttribute":"changeRootAttribute"}get affectedSelectable(){return this.root}clone(){return new au(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new au(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new oe("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(this.oldValue!==null&&this.root.getAttribute(this.key)!==this.oldValue)throw new oe("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(this.oldValue===null&&this.newValue!==null&&this.root.hasAttribute(this.key))throw new oe("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){this.newValue!==null?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,n){if(!n.getRoot(e.root))throw new oe("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new au(n.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Qa extends ds{rootName;elementName;isAdd;_document;constructor(e,n,i,r,o){if(super(o),this.rootName=e,this.elementName=n,this.isAdd=i,this._document=r,!this._document.getRoot(this.rootName)){const s=this._document.createRoot(this.elementName,this.rootName);s._isAttached=!1}}get type(){return this.isAdd?"addRoot":"detachRoot"}get affectedSelectable(){return this._document.getRoot(this.rootName)}clone(){return new Qa(this.rootName,this.elementName,this.isAdd,this._document,this.baseVersion)}getReversed(){return new Qa(this.rootName,this.elementName,!this.isAdd,this._document,this.baseVersion+1)}_execute(){this._document.getRoot(this.rootName)._isAttached=this.isAdd}toJSON(){const e=super.toJSON();return delete e._document,e}static get className(){return"RootOperation"}static fromJSON(e,n){return new Qa(e.rootName,e.elementName,e.isAdd,n,e.baseVersion)}}const Hs={};Hs[zi.className]=zi;Hs[hr.className]=hr;Hs[no.className]=no;Hs[Tn.className]=Tn;Hs[or.className]=or;Hs[ds.className]=ds;Hs[Po.className]=Po;Hs[au.className]=au;Hs[Qa.className]=Qa;Hs[Hn.className]=Hn;Hs[Ai.className]=Ai;class ULe{static fromJSON(e,n){return Hs[e.__className].fromJSON(e,n)}}const EA=new Map;function _n(t,e,n){let i=EA.get(t);i||(i=new Map,EA.set(t,i)),i.set(e,n)}function WLe(t,e){const n=EA.get(t);return n&&n.has(e)?n.get(e):qLe}function qLe(t){return[t]}function z4(t,e,n={}){const i=WLe(t.constructor,e.constructor);try{return t=t.clone(),i(t,e,n)}catch(r){throw r}}function jLe(t,e,n){t=t.slice(),e=e.slice();const i=new KLe(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(t),i.setOriginalOperations(e);const r=i.originalOperations;if(t.length==0||e.length==0)return{operationsA:t,operationsB:e,originalOperations:r};const o=new WeakMap;for(const l of t)o.set(l,0);const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;for(;a<t.length;){const l=t[a],u=o.get(l);if(u==e.length){a++;continue}const c=e[u],d=z4(l,c,i.getContext(l,c,!0)),f=z4(c,l,i.getContext(c,l,!1));i.updateRelation(l,c),i.setOriginalOperations(d,l),i.setOriginalOperations(f,c);for(const h of d)o.set(h,u+f.length);t.splice(a,1,...d),e.splice(u,1,...f)}return U4(t),U4(e),H4(t,s.nextBaseVersionB),H4(e,s.nextBaseVersionA),{operationsA:t,operationsB:e,originalOperations:r}}class KLe{originalOperations;_history;_useRelations;_forceWeakRemove;_relations;constructor(e,n,i=!1){this.originalOperations=new Map,this._history=e.history,this._useRelations=n,this._forceWeakRemove=!!i,this._relations=new Map}setOriginalOperations(e,n=null){const i=n?this.originalOperations.get(n):null;for(const r of e)this.originalOperations.set(r,i||r)}updateRelation(e,n){if(e instanceof Tn)n instanceof Ai?e.targetPosition.isEqual(n.sourcePosition)||n.movedRange.containsPosition(e.targetPosition)?this._setRelation(e,n,"insertAtSource"):e.targetPosition.isEqual(n.deletionPosition)?this._setRelation(e,n,"insertBetween"):e.targetPosition.isAfter(n.sourcePosition)?this._setRelation(e,n,"moveTargetAfter"):e.howMany>1&&e.sourcePosition.isEqual(n.deletionPosition)?this._setRelation(e,n,"firstToMoveMerged"):e.howMany>1&&e.sourcePosition.getShiftedBy(e.howMany-1).isEqual(n.deletionPosition)&&this._setRelation(e,n,"lastToMoveMerged"):n instanceof Tn&&(e.targetPosition.isEqual(n.sourcePosition)||e.targetPosition.isBefore(n.sourcePosition)?this._setRelation(e,n,"insertBefore"):this._setRelation(e,n,"insertAfter"));else if(e instanceof Hn){if(n instanceof Ai)e.splitPosition.isBefore(n.sourcePosition)&&this._setRelation(e,n,"splitBefore");else if(n instanceof Tn)if(e.splitPosition.isEqual(n.sourcePosition)||e.splitPosition.isBefore(n.sourcePosition))this._setRelation(e,n,"splitBefore");else{const i=Ee._createFromPositionAndShift(n.sourcePosition,n.howMany);if(e.splitPosition.hasSameParentAs(n.sourcePosition)&&i.containsPosition(e.splitPosition)){const r=i.end.offset-e.splitPosition.offset,o=e.splitPosition.offset-i.start.offset;this._setRelation(e,n,{howMany:r,offset:o})}}}else if(e instanceof Ai)n instanceof Ai?(e.targetPosition.isEqual(n.sourcePosition)||this._setRelation(e,n,"mergeTargetNotMoved"),e.sourcePosition.isEqual(n.targetPosition)&&this._setRelation(e,n,"mergeSourceNotMoved"),e.sourcePosition.isEqual(n.sourcePosition)&&this._setRelation(e,n,"mergeSameElement")):n instanceof Hn?e.sourcePosition.isEqual(n.splitPosition)&&this._setRelation(e,n,"splitAtSource"):n instanceof Tn&&n.howMany>0&&(e.sourcePosition.isEqual(n.sourcePosition.getShiftedBy(n.howMany))&&this._setRelation(e,n,"mergeSourceAffected"),e.targetPosition.isEqual(n.sourcePosition)&&this._setRelation(e,n,"mergeTargetWasBefore"));else if(e instanceof no){const i=e.newRange;if(!i)return;if(n instanceof Ai){const r=i.start.isEqual(n.targetPosition),o=i.start.isEqual(n.deletionPosition),s=i.end.isEqual(n.deletionPosition),a=i.end.isEqual(n.sourcePosition);(r||o||s||a)&&this._setRelation(e,n,{wasInLeftElement:r,wasStartBeforeMergedElement:o,wasEndBeforeMergedElement:s,wasInRightElement:a})}}}getContext(e,n,i){return{aIsStrong:i,aWasUndone:this._wasUndone(e),bWasUndone:this._wasUndone(n),abRelation:this._useRelations?this._getRelation(e,n):null,baRelation:this._useRelations?this._getRelation(n,e):null,forceWeakRemove:this._forceWeakRemove}}_wasUndone(e){const n=this.originalOperations.get(e);return n.wasUndone||this._history.isUndoneOperation(n)}_getRelation(e,n){const i=this.originalOperations.get(n),r=this._history.getUndoneOperation(i);if(!r)return null;const o=this.originalOperations.get(e),s=this._relations.get(o);return s&&s.get(r)||null}_setRelation(e,n,i){const r=this.originalOperations.get(e),o=this.originalOperations.get(n);let s=this._relations.get(r);s||(s=new Map,this._relations.set(r,s)),s.set(o,i)}}function H4(t,e){for(const n of t)n.baseVersion=e++}function U4(t){const e=new Map;for(let n=0;n<t.length;n++){const i=t[n];i instanceof no&&(i.baseVersion!==-1?e.set(i.name,{op:i,ranges:i.newRange?[i.newRange]:[]}):(i.newRange&&e.get(i.name).ranges.push(i.newRange),t.splice(n,1),n--))}for(const{op:n,ranges:i}of e.values())i.length?n.newRange=Ee._createFromRanges(i):n.newRange=null}_n(zi,zi,(t,e,n)=>{if(t.key===e.key&&t.range.start.hasSameParentAs(e.range.start)){const i=t.range.getDifference(e.range).map(o=>new zi(o,t.key,t.oldValue,t.newValue,0)),r=t.range.getIntersection(e.range);return r&&n.aIsStrong&&i.push(new zi(r,e.key,e.newValue,t.newValue,0)),i.length==0?[new or(0)]:i}else return[t]});_n(zi,hr,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const i=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes).map(r=>new zi(r,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const r=WG(e,t.key,t.oldValue);r&&i.unshift(r)}return i}return t.range=t.range._getTransformedByInsertion(e.position,e.howMany,!1)[0],[t]});function WG(t,e,n){const r=t.nodes.getNode(0).getAttribute(e);if(r==n)return null;const o=new Ee(t.position,t.position.getShiftedBy(t.howMany));return new zi(o,e,r,n,0)}_n(zi,Ai,(t,e)=>{const n=[];t.range.start.hasSameParentAs(e.deletionPosition)&&(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition))&&n.push(Ee._createFromPositionAndShift(e.graveyardPosition,1));const i=t.range._getTransformedByMergeOperation(e);return i.isCollapsed||n.push(i),n.map(r=>new zi(r,t.key,t.oldValue,t.newValue,t.baseVersion))});_n(zi,Tn,(t,e)=>GLe(t.range,e).map(i=>new zi(i,t.key,t.oldValue,t.newValue,t.baseVersion)));function GLe(t,e){const n=Ee._createFromPositionAndShift(e.sourcePosition,e.howMany);let i=null,r=[];n.containsRange(t,!0)?i=t:t.start.hasSameParentAs(n.start)?(r=t.getDifference(n),i=t.getIntersection(n)):r=[t];const o=[];for(let s of r){s=s._getTransformedByDeletion(e.sourcePosition,e.howMany);const a=e.getMovedRangeStart(),l=s.start.hasSameParentAs(a),u=s._getTransformedByInsertion(a,e.howMany,l);o.push(...u)}return i&&o.push(i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,!1)[0]),o}_n(zi,Hn,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition))return e.graveyardPosition||t.range.end.offset++,[t];if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const n=t.clone();return n.range=new Ee(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition)),t.range.end=e.splitPosition.clone(),t.range.end.stickiness="toPrevious",[t,n]}return t.range=t.range._getTransformedBySplitOperation(e),[t]});_n(hr,zi,(t,e)=>{const n=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const i=WG(t,e.key,e.newValue);i&&n.push(i)}return n});_n(hr,hr,(t,e,n)=>t.position.isEqual(e.position)&&n.aIsStrong?[t]:(t.position=t.position._getTransformedByInsertOperation(e),[t]));_n(hr,Tn,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]));_n(hr,Hn,(t,e)=>(t.position=t.position._getTransformedBySplitOperation(e),[t]));_n(hr,Ai,(t,e)=>(t.position=t.position._getTransformedByMergeOperation(e),[t]));_n(no,hr,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]),t.newRange&&(t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]),[t]));_n(no,no,(t,e,n)=>{if(t.name==e.name)if(n.aIsStrong)t.oldRange=e.newRange?e.newRange.clone():null;else return[new or(0)];return[t]});_n(no,Ai,(t,e)=>(t.oldRange&&(t.oldRange=t.oldRange._getTransformedByMergeOperation(e)),t.newRange&&(t.newRange=t.newRange._getTransformedByMergeOperation(e)),[t]));_n(no,Tn,(t,e)=>{const n=[t];if(t.oldRange&&(t.oldRange=Ee._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))),t.newRange){const i=t.newRange._getTransformedByMoveOperation(e);t.newRange=i[0];for(let r=1;r<i.length;r++){const o=t.clone();o.oldRange=null,o.newRange=i[r],o.baseVersion=-1,n.push(o)}}return n});_n(no,Hn,(t,e,n)=>{if(t.oldRange&&(t.oldRange=t.oldRange._getTransformedBySplitOperation(e)),t.newRange){if(n.abRelation){const i=t.newRange._getTransformedBySplitOperation(e);return t.newRange.start.isEqual(e.splitPosition)?n.abRelation.wasStartBeforeMergedElement?t.newRange.start=Be._createAt(e.insertionPosition):n.abRelation.wasInLeftElement?t.newRange.start=Be._createAt(t.newRange.start):t.newRange.start=Be._createAt(e.moveTargetPosition):t.newRange.start=i.start,t.newRange.end.isEqual(e.splitPosition)?t.newRange.end.isEqual(e.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?t.newRange.end=Be._createAt(e.insertionPosition):n.abRelation.wasInRightElement?t.newRange.end=Be._createAt(e.moveTargetPosition):t.newRange.end=Be._createAt(t.newRange.end):t.newRange.end=i.end,[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]});_n(Ai,hr,(t,e)=>(t.sourcePosition.hasSameParentAs(e.position)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e),t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e),[t]));_n(Ai,Ai,(t,e,n)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition))if(n.bWasUndone){const i=e.graveyardPosition.path.slice();return i.push(0),t.sourcePosition=new Be(e.graveyardPosition.root,i),t.howMany=0,[t]}else return[new or(0)];if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!n.bWasUndone&&n.abRelation!="splitAtSource"){const i=t.targetPosition.root.rootName=="$graveyard",r=e.targetPosition.root.rootName=="$graveyard";if(r&&!i||!(i&&!r)&&n.aIsStrong){const l=e.targetPosition._getTransformedByMergeOperation(e),u=t.targetPosition._getTransformedByMergeOperation(e);return[new Tn(l,t.howMany,u,0)]}else return[new or(0)]}return t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),(!t.graveyardPosition.isEqual(e.graveyardPosition)||!n.aIsStrong)&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]});_n(Ai,Tn,(t,e,n)=>{const i=Ee._createFromPositionAndShift(e.sourcePosition,e.howMany);return e.type=="remove"&&!n.bWasUndone&&t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition)?[new or(0)]:(e.sourcePosition.getShiftedBy(e.howMany).isEqual(t.sourcePosition)?t.sourcePosition.stickiness="toNone":e.targetPosition.isEqual(t.sourcePosition)&&n.abRelation=="mergeSourceAffected"?t.sourcePosition.stickiness="toNext":e.sourcePosition.isEqual(t.targetPosition)?(t.targetPosition.stickiness="toNone",t.howMany-=e.howMany):e.targetPosition.isEqual(t.targetPosition)&&n.abRelation=="mergeTargetWasBefore"?(t.targetPosition.stickiness="toPrevious",t.howMany+=e.howMany):(t.sourcePosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.sourcePosition.hasSameParentAs(e.sourcePosition)&&(t.howMany-=e.howMany)),t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e),t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e),t.sourcePosition.stickiness="toPrevious",t.targetPosition.stickiness="toNext",t.graveyardPosition.isEqual(e.targetPosition)||(t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)),[t])});_n(Ai,Hn,(t,e,n)=>{if(e.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1),t.deletionPosition.isEqual(e.graveyardPosition)&&(t.howMany=e.howMany)),t.targetPosition.isEqual(e.splitPosition)&&(e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition)||n.abRelation=="mergeTargetNotMoved"))return t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),[t];if(t.sourcePosition.isEqual(e.splitPosition)){if(n.abRelation=="mergeSourceNotMoved")return t.howMany=0,t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t];if(n.abRelation=="mergeSameElement"||t.sourcePosition.offset>0)return t.sourcePosition=e.moveTargetPosition.clone(),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]}return t.sourcePosition.hasSameParentAs(e.splitPosition)&&(t.howMany=e.splitPosition.offset),t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e),t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e),[t]});_n(Tn,hr,(t,e)=>{const i=Ee._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByInsertOperation(e,!1)[0];return t.sourcePosition=i.start,t.howMany=i.end.offset-i.start.offset,t.targetPosition.isEqual(e.position)||(t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)),[t]});_n(Tn,Tn,(t,e,n)=>{const i=Ee._createFromPositionAndShift(t.sourcePosition,t.howMany),r=Ee._createFromPositionAndShift(e.sourcePosition,e.howMany);let o=n.aIsStrong,s=!n.aIsStrong;n.abRelation=="insertBefore"||n.baRelation=="insertAfter"?s=!0:(n.abRelation=="insertAfter"||n.baRelation=="insertBefore")&&(s=!1);let a;if(t.targetPosition.isEqual(e.targetPosition)&&s?a=t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany):a=t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),W4(t,e)&&W4(e,t))return[e.getReversed()];if(i.containsPosition(e.targetPosition)&&i.containsRange(r,!0))return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Gh([i],a);if(r.containsPosition(t.targetPosition)&&r.containsRange(i,!0))return i.start=i.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),i.end=i.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),Gh([i],a);const c=ur(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if(c=="prefix"||c=="extension")return i.start=i.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),i.end=i.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany),Gh([i],a);t.type=="remove"&&e.type!="remove"&&!n.aWasUndone&&!n.forceWeakRemove?o=!0:t.type!="remove"&&e.type=="remove"&&!n.bWasUndone&&!n.forceWeakRemove&&(o=!1);const d=[],f=i.getDifference(r);for(const m of f){m.start=m.start._getTransformedByDeletion(e.sourcePosition,e.howMany),m.end=m.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const g=ur(m.start.getParentPath(),e.getMovedRangeStart().getParentPath())=="same",v=m._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,g);d.push(...v)}const h=i.getIntersection(r);return h!==null&&o&&(h.start=h.start._getCombined(e.sourcePosition,e.getMovedRangeStart()),h.end=h.end._getCombined(e.sourcePosition,e.getMovedRangeStart()),d.length===0?d.push(h):d.length==1?r.start.isBefore(i.start)||r.start.isEqual(i.start)?d.unshift(h):d.push(h):d.splice(1,0,h)),d.length===0?[new or(t.baseVersion)]:Gh(d,a)});_n(Tn,Hn,(t,e,n)=>{let i=t.targetPosition.clone();if((!t.targetPosition.isEqual(e.insertionPosition)||!e.graveyardPosition||n.abRelation=="moveTargetAfter")&&(i=t.targetPosition._getTransformedBySplitOperation(e)),t.sourcePosition.isEqual(e.insertionPosition)&&n.abRelation=="firstToMoveMerged")return t.howMany++,t.targetPosition=i,[t];const r=Ee._createFromPositionAndShift(t.sourcePosition,t.howMany);if(r.end.isEqual(e.insertionPosition))return(!e.graveyardPosition||n.abRelation=="lastToMoveMerged")&&t.howMany++,t.targetPosition=i,[t];if(r.start.hasSameParentAs(e.splitPosition)&&r.containsPosition(e.splitPosition)){let a=new Ee(e.splitPosition,r.end);a=a._getTransformedBySplitOperation(e);const l=[new Ee(r.start,e.splitPosition),a];return Gh(l,i)}t.targetPosition.isEqual(e.splitPosition)&&n.abRelation=="insertAtSource"&&(i=e.moveTargetPosition),t.targetPosition.isEqual(e.insertionPosition)&&n.abRelation=="insertBetween"&&(i=t.targetPosition);const s=[r._getTransformedBySplitOperation(e)];if(e.graveyardPosition){const a=r.start.isEqual(e.graveyardPosition)||r.containsPosition(e.graveyardPosition);t.howMany>1&&a&&!n.aWasUndone&&s.push(Ee._createFromPositionAndShift(e.insertionPosition,1))}return Gh(s,i)});_n(Tn,Ai,(t,e,n)=>{const i=Ee._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)){if(t.type=="remove"&&!n.forceWeakRemove){if(!n.aWasUndone){const s=[];let a=e.graveyardPosition.clone(),l=e.targetPosition._getTransformedByMergeOperation(e);const u=t.targetPosition.getTransformedByOperation(e);t.howMany>1&&(s.push(new Tn(t.sourcePosition,t.howMany-1,u,0)),a=a._getTransformedByMove(t.sourcePosition,u,t.howMany-1),l=l._getTransformedByMove(t.sourcePosition,u,t.howMany-1));const c=e.deletionPosition._getCombined(t.sourcePosition,u),d=new Tn(a,1,c,0),f=d.getMovedRangeStart().path.slice();f.push(0);const h=new Be(d.targetPosition.root,f);l=l._getTransformedByMove(a,c,1);const m=new Tn(l,e.howMany,h,0);return s.push(d),s.push(m),s}}else if(t.howMany==1)return n.bWasUndone?(t.sourcePosition=e.graveyardPosition.clone(),t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]):[new or(0)]}const o=Ee._createFromPositionAndShift(t.sourcePosition,t.howMany)._getTransformedByMergeOperation(e);return t.sourcePosition=o.start,t.howMany=o.end.offset-o.start.offset,t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e),[t]});_n(Po,hr,(t,e)=>(t.position=t.position._getTransformedByInsertOperation(e),[t]));_n(Po,Ai,(t,e)=>t.position.isEqual(e.deletionPosition)?(t.position=e.graveyardPosition.clone(),t.position.stickiness="toNext",[t]):(t.position=t.position._getTransformedByMergeOperation(e),[t]));_n(Po,Tn,(t,e)=>(t.position=t.position._getTransformedByMoveOperation(e),[t]));_n(Po,Po,(t,e,n)=>{if(t.position.isEqual(e.position))if(n.aIsStrong)t.oldName=e.newName;else return[new or(0)];return[t]});_n(Po,Hn,(t,e)=>{const n=t.position.path,i=e.splitPosition.getParentPath();if(ur(n,i)=="same"&&!e.graveyardPosition){const r=new Po(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,r]}return t.position=t.position._getTransformedBySplitOperation(e),[t]});_n(au,au,(t,e,n)=>{if(t.root===e.root&&t.key===e.key)if(n.aIsStrong)t.oldValue=e.newValue;else return[new or(0)];return[t]});_n(Qa,Qa,(t,e)=>t.rootName===e.rootName&&t.isAdd===e.isAdd?[new or(0)]:[t]);_n(Hn,hr,(t,e)=>(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset<e.position.offset&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByInsertOperation(e),t.insertionPosition=t.insertionPosition._getTransformedByInsertOperation(e),[t]));_n(Hn,Ai,(t,e,n)=>{if(!t.graveyardPosition&&!n.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const i=e.graveyardPosition.path.slice();i.push(0);const r=new Be(e.graveyardPosition.root,i),o=Hn.getInsertionPosition(new Be(e.graveyardPosition.root,i)),s=new Hn(r,0,o,null,0);return t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Hn.getInsertionPosition(t.splitPosition),t.graveyardPosition=s.insertionPosition.clone(),t.graveyardPosition.stickiness="toNext",[s,t]}return t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)&&t.howMany--,t.splitPosition.hasSameParentAs(e.targetPosition)&&(t.howMany+=e.howMany),t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e),t.insertionPosition=Hn.getInsertionPosition(t.splitPosition),t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)),[t]});_n(Hn,Tn,(t,e,n)=>{const i=Ee._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);if(!n.bWasUndone&&o){const s=t.splitPosition._getTransformedByMoveOperation(e),a=t.graveyardPosition._getTransformedByMoveOperation(e),l=a.path.slice();l.push(0);const u=new Be(a.root,l);return[new Tn(s,t.howMany,u,0)]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}const r=t.splitPosition.isEqual(e.targetPosition);if(r&&(n.baRelation=="insertAtSource"||n.abRelation=="splitBefore"))return t.howMany+=e.howMany,t.splitPosition=t.splitPosition._getTransformedByDeletion(e.sourcePosition,e.howMany),t.insertionPosition=Hn.getInsertionPosition(t.splitPosition),[t];if(r&&n.abRelation&&n.abRelation.howMany){const{howMany:o,offset:s}=n.abRelation;return t.howMany+=o,t.splitPosition=t.splitPosition.getShiftedBy(s),[t]}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.splitPosition)){const o=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);return t.howMany-=o,t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany),t.splitPosition=e.sourcePosition.clone(),t.insertionPosition=Hn.getInsertionPosition(t.splitPosition),[t]}return e.sourcePosition.isEqual(e.targetPosition)||(t.splitPosition.hasSameParentAs(e.sourcePosition)&&t.splitPosition.offset<=e.sourcePosition.offset&&(t.howMany-=e.howMany),t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset<e.targetPosition.offset&&(t.howMany+=e.howMany)),t.splitPosition.stickiness="toNone",t.splitPosition=t.splitPosition._getTransformedByMoveOperation(e),t.splitPosition.stickiness="toNext",t.graveyardPosition?t.insertionPosition=t.insertionPosition._getTransformedByMoveOperation(e):t.insertionPosition=Hn.getInsertionPosition(t.splitPosition),[t]});_n(Hn,Hn,(t,e,n)=>{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition)return[new or(0)];if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition))return[new or(0)];if(n.abRelation=="splitBefore")return t.howMany=0,t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e),[t]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const i=t.splitPosition.root.rootName=="$graveyard",r=e.splitPosition.root.rootName=="$graveyard";if(r&&!i||!(i&&!r)&&n.aIsStrong){const l=[];return e.howMany&&l.push(new Tn(e.moveTargetPosition,e.howMany,e.splitPosition,0)),t.howMany&&l.push(new Tn(t.splitPosition,t.howMany,t.moveTargetPosition,0)),l}else return[new or(0)]}if(t.graveyardPosition&&(t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)),t.splitPosition.isEqual(e.insertionPosition)&&n.abRelation=="splitBefore")return t.howMany++,[t];if(e.splitPosition.isEqual(t.insertionPosition)&&n.baRelation=="splitBefore"){const i=e.insertionPosition.path.slice();i.push(0);const r=new Be(e.insertionPosition.root,i),o=new Tn(t.insertionPosition,1,r,0);return[t,o]}return t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset<e.splitPosition.offset&&(t.howMany-=e.howMany),t.splitPosition=t.splitPosition._getTransformedBySplitOperation(e),t.insertionPosition=Hn.getInsertionPosition(t.splitPosition),[t]});function W4(t,e){return t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)===null}function Gh(t,e){const n=[];for(let i=0;i<t.length;i++){const r=t[i],o=new Tn(r.start,r.end.offset-r.start.offset,e,0);n.push(o);for(let s=i+1;s<t.length;s++)t[s]=t[s]._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)[0];e=e._getTransformedByMove(o.sourcePosition,o.targetPosition,o.howMany)}return n}class Bi extends Fn(Be){constructor(e,n,i="toNone"){if(super(e,n,i),!this.root.is("rootElement"))throw new oe("model-liveposition-root-not-rootelement",e);YLe.call(this)}detach(){this.stopListening()}toPosition(){return new Be(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,n){return new this(e.root,e.path.slice(),n||e.stickiness)}}Bi.prototype.is=function(t){return t==="livePosition"||t==="model:livePosition"||t=="position"||t==="model:position"};function YLe(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const n=e[0];n.isDocumentOperation&&XLe.call(this,n)},{priority:"low"})}function XLe(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const n=this.toPosition();this.path=e.path,this.root=e.root,this.fire("change",n)}}class lh{operations;isUndoable;isLocal;isUndo;isTyping;constructor(e={}){typeof e=="string"&&(e=e==="transparent"?{isUndoable:!1}:{},hn("batch-constructor-deprecated-string-type"));const{isUndoable:n=!0,isLocal:i=!0,isUndo:r=!1,isTyping:o=!1}=e;this.operations=[],this.isUndoable=n,this.isLocal=i,this.isUndo=r,this.isTyping=o}get baseVersion(){for(const e of this.operations)if(e.baseVersion!==null)return e.baseVersion;return null}addOperation(e){return e.isDocumentOperation&&(e.batch=this,this.operations.push(e)),e}}class f1{static _statesPriority=[void 0,"refresh","rename","move"];_markerCollection;_changesInElement=new Map;_elementsSnapshots=new Map;_elementChildrenSnapshots=new Map;_elementState=new Map;_changedMarkers=new Map;_changedRoots=new Map;_changeCount=0;_cachedChanges=null;_cachedChangesWithGraveyard=null;_refreshedItems=new Set;constructor(e){this._markerCollection=e}get isEmpty(){return this._changesInElement.size==0&&this._changedMarkers.size==0&&this._changedRoots.size==0}bufferOperation(e){const n=e;switch(n.type){case"insert":{if(this._isInInsertedElement(n.position.parent))return;this._markInsert(n.position.parent,n.position.offset,n.nodes.maxOffset);break}case"addAttribute":case"removeAttribute":case"changeAttribute":{for(const i of n.range.getItems({shallow:!0}))this._isInInsertedElement(i.parent)||this._markAttribute(i);break}case"remove":case"move":case"reinsert":{if(n.sourcePosition.isEqual(n.targetPosition)||n.sourcePosition.getShiftedBy(n.howMany).isEqual(n.targetPosition))return;const i=this._isInInsertedElement(n.sourcePosition.parent),r=this._isInInsertedElement(n.targetPosition.parent);i||this._markRemove(n.sourcePosition.parent,n.sourcePosition.offset,n.howMany),r||this._markInsert(n.targetPosition.parent,n.getMovedRangeStart().offset,n.howMany);const o=Ee._createFromPositionAndShift(n.sourcePosition,n.howMany);for(const s of o.getItems({shallow:!0}))this._setElementState(s,"move");break}case"rename":{if(this._isInInsertedElement(n.position.parent))return;this._markRemove(n.position.parent,n.position.offset,1),this._markInsert(n.position.parent,n.position.offset,1);const i=Ee._createFromPositionAndShift(n.position,1);for(const r of this._markerCollection.getMarkersIntersectingRange(i)){const o=r.getData();this.bufferMarkerChange(r.name,o,o)}this._setElementState(n.position.nodeAfter,"rename");break}case"split":{const i=n.splitPosition.parent;if(!this._isInInsertedElement(i)){this._markRemove(i,n.splitPosition.offset,n.howMany);const r=Ee._createFromPositionAndShift(n.splitPosition,n.howMany);for(const o of r.getItems({shallow:!0}))this._setElementState(o,"move")}this._isInInsertedElement(n.insertionPosition.parent)||this._markInsert(n.insertionPosition.parent,n.insertionPosition.offset,1),n.graveyardPosition&&(this._markRemove(n.graveyardPosition.parent,n.graveyardPosition.offset,1),this._setElementState(n.graveyardPosition.nodeAfter,"move"));break}case"merge":{const i=n.sourcePosition.parent;this._isInInsertedElement(i.parent)||this._markRemove(i.parent,i.startOffset,1);const r=n.graveyardPosition.parent;this._markInsert(r,n.graveyardPosition.offset,1),this._setElementState(i,"move");const o=n.targetPosition.parent;if(!this._isInInsertedElement(o)){this._markInsert(o,n.targetPosition.offset,i.maxOffset);const s=Ee._createFromPositionAndShift(n.sourcePosition,n.howMany);for(const a of s.getItems({shallow:!0}))this._setElementState(a,"move")}break}case"detachRoot":case"addRoot":{const i=n.affectedSelectable;if(!i._isLoaded||i.isAttached()==n.isAdd)return;this._bufferRootStateChange(n.rootName,n.isAdd);break}case"addRootAttribute":case"removeRootAttribute":case"changeRootAttribute":{if(!n.root._isLoaded)return;const i=n.root.rootName;this._bufferRootAttributeChange(i,n.key,n.oldValue,n.newValue);break}}this._cachedChanges=null}bufferMarkerChange(e,n,i){n.range&&n.range.root.is("rootElement")&&!n.range.root._isLoaded&&(n.range=null),i.range&&i.range.root.is("rootElement")&&!i.range.root._isLoaded&&(i.range=null);let r=this._changedMarkers.get(e);r?r.newMarkerData=i:(r={newMarkerData:i,oldMarkerData:n},this._changedMarkers.set(e,r)),r.oldMarkerData.range==null&&i.range==null&&this._changedMarkers.delete(e)}getMarkersToRemove(){const e=[];for(const[n,i]of this._changedMarkers)i.oldMarkerData.range!=null&&e.push({name:n,range:i.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[n,i]of this._changedMarkers)i.newMarkerData.range!=null&&e.push({name:n,range:i.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(([e,n])=>({name:e,data:{oldRange:n.oldMarkerData.range,newRange:n.newMarkerData.range}}))}hasDataChanges(){if(this.getChanges().length||this._changedRoots.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:n}of this._changedMarkers.values()){if(e.affectsData!==n.affectsData)return!0;if(e.affectsData){const i=e.range&&!n.range,r=!e.range&&n.range,o=e.range&&n.range&&!e.range.isEqual(n.range);if(i||r||o)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let n=[];for(const i of this._changesInElement.keys()){const r=this._changesInElement.get(i).sort((c,d)=>c.offset===d.offset?c.type!=d.type?c.type=="remove"?-1:1:0:c.offset<d.offset?-1:1),o=this._elementChildrenSnapshots.get(i),s=j4(i.getChildren()),a=JLe(o.length,r);let l=0,u=0;for(const c of a)if(c==="i"){const d=this._getDiffActionForNode(s[l].node,"insert"),f=this._elementsSnapshots.get(s[l].node),h=this._getInsertDiff(i,l,d,s[l],f);n.push(h),l++}else if(c==="r"){const d=this._getDiffActionForNode(o[u].node,"remove"),f=this._getRemoveDiff(i,l,d,o[u]);n.push(f),u++}else if(c==="a"){const d=o[u].attributes,f=s[l].attributes;let h;if(s[l].name=="$text")h=new Ee(Be._createAt(i,l),Be._createAt(i,l+1));else{const g=i.offsetToIndex(l);h=new Ee(Be._createAt(i,l),Be._createAt(i.getChild(g),0))}const m=this._getAttributesDiff(h,d,f);n.push(...m),l++,u++}else l++,u++}n.sort((i,r)=>i.position.root!=r.position.root?i.position.root.rootName<r.position.root.rootName?-1:1:i.position.isEqual(r.position)?i.changeCount-r.changeCount:i.position.isBefore(r.position)?-1:1);for(let i=1,r=0;i<n.length;i++){const o=n[r],s=n[i],a=o.type=="remove"&&s.type=="remove"&&o.name=="$text"&&s.name=="$text"&&o.position.isEqual(s.position),l=o.type=="insert"&&s.type=="insert"&&o.name=="$text"&&s.name=="$text"&&o.position.parent==s.position.parent&&o.position.offset+o.length==s.position.offset,u=o.type=="attribute"&&s.type=="attribute"&&o.position.parent==s.position.parent&&o.range.isFlat&&s.range.isFlat&&o.position.offset+o.length==s.position.offset&&o.attributeKey==s.attributeKey&&o.attributeOldValue==s.attributeOldValue&&o.attributeNewValue==s.attributeNewValue;a||l||u?(o.length++,u&&(o.range.end=o.range.end.getShiftedBy(1)),n[i]=null):r=i}n=n.filter(i=>i);for(const i of n)delete i.changeCount,i.type=="attribute"&&(delete i.position,delete i.length);return this._changeCount=0,this._cachedChangesWithGraveyard=n,this._cachedChanges=n.filter(ZLe),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getChangedRoots(){return Array.from(this._changedRoots.values()).map(e=>{const n={...e};return n.state!==void 0&&delete n.attributes,n})}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementChildrenSnapshots.clear(),this._elementsSnapshots.clear(),this._elementState.clear(),this._changedMarkers.clear(),this._changedRoots.clear(),this._refreshedItems.clear(),this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e),this._setElementState(e,"refresh");const n=Ee._createOn(e);for(const i of this._markerCollection.getMarkersIntersectingRange(n)){const r=i.getData();this.bufferMarkerChange(i.name,r,r)}this._cachedChanges=null}_bufferRootLoad(e){if(e.isAttached()){this._bufferRootStateChange(e.rootName,!0),this._markInsert(e,0,e.maxOffset);for(const n of e.getAttributeKeys())this._bufferRootAttributeChange(e.rootName,n,null,e.getAttribute(n));for(const n of this._markerCollection)if(n.getRange().root==e){const i=n.getData();this.bufferMarkerChange(n.name,{...i,range:null},i)}}}_bufferRootStateChange(e,n){if(!this._changedRoots.has(e)){this._changedRoots.set(e,{name:e,state:n?"attached":"detached"});return}const i=this._changedRoots.get(e);i.state!==void 0?(delete i.state,i.attributes===void 0&&this._changedRoots.delete(e)):i.state=n?"attached":"detached"}_bufferRootAttributeChange(e,n,i,r){const o=this._changedRoots.get(e)||{name:e},s=o.attributes||{};if(s[n]){const a=s[n];r===a.oldValue?delete s[n]:a.newValue=r}else s[n]={oldValue:i,newValue:r};Object.entries(s).length===0?(delete o.attributes,o.state===void 0&&this._changedRoots.delete(e)):(o.attributes=s,this._changedRoots.set(e,o))}_markInsert(e,n,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const r={type:"insert",offset:n,howMany:i,count:this._changeCount++};this._markChange(e,r)}_markRemove(e,n,i){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const r={type:"remove",offset:n,howMany:i,count:this._changeCount++};this._markChange(e,r),this._removeAllNestedChanges(e,n,i)}_markAttribute(e){if(e.root.is("rootElement")&&!e.root._isLoaded)return;const n={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,n)}_markChange(e,n){this._makeSnapshots(e);const i=this._getChangesForElement(e);this._handleChange(n,i),i.push(n);for(let r=0;r<i.length;r++)i[r].howMany<1&&(i.splice(r,1),r--)}_setElementState(e,n){if(!e.is("element"))return;const i=f1._statesPriority.indexOf(this._elementState.get(e));f1._statesPriority.indexOf(n)>i&&this._elementState.set(e,n)}_getDiffActionForNode(e,n){if(!e.is("element")||!this._elementsSnapshots.has(e))return n;const i=this._elementState.get(e);return!i||i=="move"?n:i}_getChangesForElement(e){let n;return this._changesInElement.has(e)?n=this._changesInElement.get(e):(n=[],this._changesInElement.set(e,n)),n}_makeSnapshots(e){if(this._elementChildrenSnapshots.has(e))return;const n=j4(e.getChildren());this._elementChildrenSnapshots.set(e,n);for(const i of n)this._elementsSnapshots.set(i.node,i)}_handleChange(e,n){e.nodesToHandle=e.howMany;for(const i of n){const r=e.offset+e.howMany,o=i.offset+i.howMany;if(e.type=="insert"&&(i.type=="insert"&&(e.offset<=i.offset?i.offset+=e.howMany:e.offset<o&&(i.howMany+=e.nodesToHandle,e.nodesToHandle=0)),i.type=="remove"&&e.offset<i.offset&&(i.offset+=e.howMany),i.type=="attribute")){if(e.offset<=i.offset)i.offset+=e.howMany;else if(e.offset<o){const s=i.howMany;i.howMany=e.offset-i.offset,n.unshift({type:"attribute",offset:r,howMany:s-i.howMany,count:this._changeCount++})}}if(e.type=="remove"){if(i.type=="insert"){if(r<=i.offset)i.offset-=e.howMany;else if(r<=o)if(e.offset<i.offset){const s=r-i.offset;i.offset=e.offset,i.howMany-=s,e.nodesToHandle-=s}else i.howMany-=e.nodesToHandle,e.nodesToHandle=0;else if(e.offset<=i.offset)e.nodesToHandle-=i.howMany,i.howMany=0;else if(e.offset<o){const s=o-e.offset;i.howMany-=s,e.nodesToHandle-=s}}if(i.type=="remove"&&(r<=i.offset?i.offset-=e.howMany:e.offset<i.offset&&(e.nodesToHandle+=i.howMany,i.howMany=0)),i.type=="attribute"){if(r<=i.offset)i.offset-=e.howMany;else if(e.offset<i.offset){const s=r-i.offset;i.offset=e.offset,i.howMany-=s}else if(e.offset<o)if(r<=o){const s=i.howMany;i.howMany=e.offset-i.offset;const a=s-i.howMany-e.nodesToHandle;n.unshift({type:"attribute",offset:e.offset,howMany:a,count:this._changeCount++})}else i.howMany-=o-e.offset}}if(e.type=="attribute"){if(i.type=="insert")if(e.offset<i.offset&&r>i.offset){if(r>o){const s={type:"attribute",offset:o,howMany:r-o,count:this._changeCount++};this._handleChange(s,n),n.push(s)}e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=i.offset&&e.offset<o&&(r>o?(e.nodesToHandle=r-o,e.offset=o):e.nodesToHandle=0);if(i.type=="remove"&&e.offset<i.offset&&r>i.offset){const s={type:"attribute",offset:i.offset,howMany:r-i.offset,count:this._changeCount++};this._handleChange(s,n),n.push(s),e.nodesToHandle=i.offset-e.offset,e.howMany=e.nodesToHandle}i.type=="attribute"&&(e.offset>=i.offset&&r<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=i.offset&&r>=o&&(i.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,n,i,r,o){const s={type:"insert",position:Be._createAt(e,n),name:r.name,attributes:new Map(r.attributes),length:1,changeCount:this._changeCount++,action:i};return i!="insert"&&o&&(s.before={name:o.name,attributes:new Map(o.attributes)}),s}_getRemoveDiff(e,n,i,r){return{type:"remove",action:i,position:Be._createAt(e,n),name:r.name,attributes:new Map(r.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,n,i){const r=[];i=new Map(i);for(const[o,s]of n){const a=i.has(o)?i.get(o):null;a!==s&&r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:s,attributeNewValue:a,changeCount:this._changeCount++}),i.delete(o)}for(const[o,s]of i)r.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:null,attributeNewValue:s,changeCount:this._changeCount++});return r}_isInInsertedElement(e){const n=e.parent;if(!n)return!1;const i=this._changesInElement.get(n),r=e.startOffset;if(i){for(const o of i)if(o.type=="insert"&&r>=o.offset&&r<o.offset+o.howMany)return!0}return this._isInInsertedElement(n)}_removeAllNestedChanges(e,n,i){const r=new Ee(Be._createAt(e,n),Be._createAt(e,n+i));for(const o of r.getItems({shallow:!0}))o.is("element")&&(this._changesInElement.delete(o),this._removeAllNestedChanges(o,0,o.maxOffset))}}function q4(t){return{node:t,name:t.is("$text")?"$text":t.name,attributes:new Map(t.getAttributes())}}function j4(t){const e=[];for(const n of t)if(n.is("$text"))for(let i=0;i<n.data.length;++i)e.push(q4(n));else e.push(q4(n));return e}function JLe(t,e){const n=[];let i=0,r=0;for(const o of e){if(o.offset>i){for(let s=0;s<o.offset-i;s++)n.push("e");r+=o.offset-i}if(o.type=="insert"){for(let s=0;s<o.howMany;s++)n.push("i");i=o.offset+o.howMany}else if(o.type=="remove"){for(let s=0;s<o.howMany;s++)n.push("r");i=o.offset,r+=o.howMany}else{if(o.howMany>1500)for(let s=0;s<o.howMany;s++)n.push("a");else n.push(..."a".repeat(o.howMany).split(""));i=o.offset+o.howMany,r+=o.howMany}}if(r<t)for(let o=0;o<t-r-i;o++)n.push("e");return n}function ZLe(t){const e="position"in t&&t.position.root.rootName=="$graveyard",n="range"in t&&t.range.root.rootName=="$graveyard";return!e&&!n}class QLe{_operations=[];_undoPairs=new Map;_undoneOperations=new Set;_baseVersionToOperationIndex=new Map;_version=0;_gaps=new Map;get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new oe("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,n=this.version){if(!this._operations.length)return[];const i=this._operations[0];e===void 0&&(e=i.baseVersion);let r=n-1;for(const[a,l]of this._gaps)e>a&&e<l&&(e=l),r>a&&r<l&&(r=a-1);if(r<i.baseVersion||e>this.lastOperation.baseVersion)return[];let o=this._baseVersionToOperationIndex.get(e);o===void 0&&(o=0);let s=this._baseVersionToOperationIndex.get(r);return s===void 0&&(s=this._operations.length-1),this._operations.slice(o,s+1)}getOperation(e){const n=this._baseVersionToOperationIndex.get(e);if(n!==void 0)return this._operations[n]}setOperationAsUndone(e,n){this._undoPairs.set(n,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}class h1 extends zn{rootName;_document;_isAttached=!0;_isLoaded=!0;constructor(e,n,i="main"){super(n),this._document=e,this.rootName=i}get document(){return this._document}isAttached(){return this._isAttached}toJSON(){return this.rootName}}h1.prototype.is=function(t,e){return e?e===this.name&&(t==="rootElement"||t==="model:rootElement"||t==="element"||t==="model:element"):t==="rootElement"||t==="model:rootElement"||t==="element"||t==="model:element"||t==="node"||t==="model:node"};const K4="$graveyard";class e5e extends Fn(){model;history;selection;roots;differ;isReadOnly;_postFixers;_hasSelectionChangedFromTheLastChangeBlock;constructor(e){super(),this.model=e,this.history=new QLe,this.selection=new cs(this),this.roots=new Er({idProperty:"rootName"}),this.differ=new f1(e.markers),this.isReadOnly=!1,this._postFixers=new Set,this._hasSelectionChangedFromTheLastChangeBlock=!1,this.createRoot("$root",K4),this.listenTo(e,"applyOperation",(n,i)=>{const r=i[0];r.isDocumentOperation&&this.differ.bufferOperation(r)},{priority:"high"}),this.listenTo(e,"applyOperation",(n,i)=>{const r=i[0];r.isDocumentOperation&&this.history.addOperation(r)},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(n,i,r,o,s)=>{const a={...i.getData(),range:o};this.differ.bufferMarkerChange(i.name,s,a),r===null&&i.on("change",(l,u)=>{const c=i.getData();this.differ.bufferMarkerChange(i.name,{...c,range:u},c)})}),this.registerPostFixer(n=>{let i=!1;for(const r of this.roots)!r.isAttached()&&!r.isEmpty&&(n.remove(n.createRangeIn(r)),i=!0);for(const r of this.model.markers)r.getRange().root.isAttached()||(n.removeMarker(r),i=!0);return i})}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(K4)}createRoot(e="$root",n="main"){if(this.roots.get(n))throw new oe("model-document-createroot-name-exists",this,{name:n});const i=new h1(this,e,n);return this.roots.add(i),i}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(e=!1){return this.getRoots(e).map(n=>n.rootName)}getRoots(e=!1){return this.roots.filter(n=>n!=this.graveyard&&(e||n.isAttached())&&n._isLoaded)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=SIe(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){const e=this.getRoots();return e.length?e[0]:this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),n=this.model,i=n.schema,r=n.createPositionFromPath(e,[0]);return i.getNearestSelectionRange(r)||n.createRange(r)}_validateSelectionRange(e){return e.start.isValid()&&e.end.isValid()&&G4(e.start)&&G4(e.end)}_callPostFixers(e){let n=!1;do for(const i of this._postFixers)if(this.selection.refresh(),n=i(e),n)break;while(n)}}function G4(t){const e=t.textNode;if(e){const n=e.data,i=t.offset-e.startOffset;return!UM(n,i)&&!WM(n,i)}return!0}class t5e extends Fn(){_markers=new Map;[Symbol.iterator](){return this._markers.values()}has(e){const n=e instanceof Bh?e.name:e;return this._markers.has(n)}get(e){return this._markers.get(e)||null}_set(e,n,i=!1,r=!1){const o=e instanceof Bh?e.name:e;if(o.includes(","))throw new oe("markercollection-incorrect-marker-name",this);const s=this._markers.get(o);if(s){const u=s.getData(),c=s.getRange();let d=!1;return c.isEqual(n)||(s._attachLiveRange(ko.fromRange(n)),d=!0),i!=s.managedUsingOperations&&(s._managedUsingOperations=i,d=!0),typeof r=="boolean"&&r!=s.affectsData&&(s._affectsData=r,d=!0),d&&this.fire(`update:${o}`,s,c,n,u),s}const a=ko.fromRange(n),l=new Bh(o,a,i,r);return this._markers.set(o,l),this.fire(`update:${o}`,l,null,n,{...l.getData(),range:null}),l}_remove(e){const n=e instanceof Bh?e.name:e,i=this._markers.get(n);return i?(this._markers.delete(n),this.fire(`update:${n}`,i,i.getRange(),null,i.getData()),this._destroyMarker(i),!0):!1}_refresh(e){const n=e instanceof Bh?e.name:e,i=this._markers.get(n);if(!i)throw new oe("markercollection-refresh-marker-not-exists",this);const r=i.getRange();this.fire(`update:${n}`,i,r,r,i.getData())}*getMarkersAtPosition(e){for(const n of this)n.getRange().containsPosition(e)&&(yield n)}*getMarkersIntersectingRange(e){for(const n of this)n.getRange().getIntersection(e)!==null&&(yield n)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const n of this._markers.values())n.name.startsWith(e+":")&&(yield n)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class Bh extends Fn(Kc){name;_managedUsingOperations;_affectsData;_liveRange;constructor(e,n,i,r){super(),this.name=e,this._liveRange=this._attachLiveRange(n),this._managedUsingOperations=i,this._affectsData=r}get managedUsingOperations(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new oe("marker-destroyed",this);return this._liveRange.toRange()}toJSON(){return{name:this.name,range:this._liveRange?.toJSON(),usingOperations:this._managedUsingOperations,affectsData:this._affectsData}}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}Bh.prototype.is=function(t){return t==="marker"||t==="model:marker"};class n5e extends ds{sourcePosition;howMany;constructor(e,n){super(null),this.sourcePosition=e.clone(),this.howMany=n}get type(){return"detach"}get affectedSelectable(){return null}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new oe("detach-operation-on-document-node",this)}_execute(){zG(Ee._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}class za extends Kc{markers=new Map;_children=new iv;constructor(e){super(),e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}isAttached(){return!1}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildAtOffset(e){return this._children.getNodeAtOffset(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let n=this;for(const i of e)n=n.getChildAtOffset(i);return n}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const n of this._children)e.push(n.toJSON());return e}static fromJSON(e){const n=[];for(const i of e)i.name?n.push(zn.fromJSON(i)):n.push(ni.fromJSON(i));return new za(n)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,n){const i=i5e(n);for(const r of i)r.parent!==null&&r._remove(),r.parent=this;this._children._insertNodes(e,i)}_removeChildren(e,n=1){const i=this._children._removeNodes(e,n);for(const r of i)r.parent=null;return i}_removeChildrenArray(e){this._children._removeNodesArray(e);for(const n of e)n.parent=null}}za.prototype.is=function(t){return t==="documentFragment"||t==="model:documentFragment"};function i5e(t){return typeof t=="string"?[new ni(t)]:(us(t)||(t=[t]),Array.from(t).map(e=>typeof e=="string"?new ni(e):e instanceof ea?new ni(e.data,e.getAttributes()):e))}class r5e{model;batch;constructor(e,n){this.model=e,this.batch=n}createText(e,n){return new ni(e,n)}createElement(e,n){return new zn(e,n)}createDocumentFragment(){return new za}cloneElement(e,n=!0){return e._clone(n)}insert(e,n,i=0){if(this._assertWriterUsedCorrectly(),e instanceof ni&&e.data=="")return;const r=Be._createAt(n,i);if(e.parent)if(J4(e.root,r.root)){this.move(Ee._createOn(e),r);return}else{if(e.root.document)throw new oe("model-writer-insert-forbidden-move",this);this.remove(e)}const o=r.root.document?r.root.document.version:null,s=e instanceof za?e._removeChildren(0,e.childCount):e,a=new hr(r,s,o);if(e instanceof ni&&(a.shouldReceiveAttributes=!0),this.batch.addOperation(a),this.model.applyOperation(a),e instanceof za)for(const[l,u]of e.markers){const c=Be._createAt(u.root,0),f={range:new Ee(u.start._getCombined(c,r),u.end._getCombined(c,r)),usingOperation:!0,affectsData:!0};this.model.markers.has(l)?this.updateMarker(l,f):this.addMarker(l,f)}}insertText(e,n,i,r){n instanceof za||n instanceof zn||n instanceof Be?this.insert(this.createText(e),n,i):this.insert(this.createText(e,n),i,r)}insertElement(e,n,i,r){n instanceof za||n instanceof zn||n instanceof Be?this.insert(this.createElement(e),n,i):this.insert(this.createElement(e,n),i,r)}append(e,n){this.insert(e,n,"end")}appendText(e,n,i){n instanceof za||n instanceof zn?this.insert(this.createText(e),n,"end"):this.insert(this.createText(e,n),i,"end")}appendElement(e,n,i){n instanceof za||n instanceof zn?this.insert(this.createElement(e),n,"end"):this.insert(this.createElement(e,n),i,"end")}setAttribute(e,n,i){if(this._assertWriterUsedCorrectly(),i instanceof Ee){const r=i.getMinimalFlatRanges();for(const o of r)Y4(this,e,n,o)}else X4(this,e,n,i)}setAttributes(e,n){for(const[i,r]of gl(e))this.setAttribute(i,r,n)}removeAttribute(e,n){if(this._assertWriterUsedCorrectly(),n instanceof Ee){const i=n.getMinimalFlatRanges();for(const r of i)Y4(this,e,null,r)}else X4(this,e,null,n)}clearAttributes(e){this._assertWriterUsedCorrectly();const n=i=>{for(const r of i.getAttributeKeys())this.removeAttribute(r,i)};if(!(e instanceof Ee))n(e);else for(const i of e.getItems())n(i)}move(e,n,i){if(this._assertWriterUsedCorrectly(),!(e instanceof Ee))throw new oe("writer-move-invalid-range",this);if(!e.isFlat)throw new oe("writer-move-range-not-flat",this);const r=Be._createAt(n,i);if(r.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!J4(e.root,r.root))throw new oe("writer-move-different-document",this);const o=e.root.document?e.root.document.version:null,s=new Tn(e.start,e.end.offset-e.start.offset,r,o);this.batch.addOperation(s),this.model.applyOperation(s)}remove(e){this._assertWriterUsedCorrectly();const i=(e instanceof Ee?e:Ee._createOn(e)).getMinimalFlatRanges().reverse();for(const r of i)this._addOperationForAffectedMarkers("move",r),o5e(r.start,r.end.offset-r.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const n=e.nodeBefore,i=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(n instanceof zn))throw new oe("writer-merge-no-element-before",this);if(!(i instanceof zn))throw new oe("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,n,i){return this.model.createPositionFromPath(e,n,i)}createPositionAt(e,n){return this.model.createPositionAt(e,n)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,n){return this.model.createRange(e,n)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const n=e.nodeBefore,i=e.nodeAfter;this.move(Ee._createIn(i),Be._createAt(n,"end")),this.remove(i)}_merge(e){const n=Be._createAt(e.nodeBefore,"end"),i=Be._createAt(e.nodeAfter,0),r=e.root.document.graveyard,o=new Be(r,[0]),s=e.root.document.version,a=new Ai(i,e.nodeAfter.maxOffset,n,o,s);this.batch.addOperation(a),this.model.applyOperation(a)}rename(e,n){if(this._assertWriterUsedCorrectly(),!(e instanceof zn))throw new oe("writer-rename-not-element-instance",this);const i=e.root.document?e.root.document.version:null,r=new Po(Be._createBefore(e),e.name,n,i);this.batch.addOperation(r),this.model.applyOperation(r)}split(e,n){this._assertWriterUsedCorrectly();let i=e.parent;if(!i.parent)throw new oe("writer-split-element-no-parent",this);if(n||(n=i.parent),!e.parent.getAncestors({includeSelf:!0}).includes(n))throw new oe("writer-split-invalid-limit-element",this);let r,o;do{const s=i.root.document?i.root.document.version:null,a=i.maxOffset-e.offset,l=Hn.getInsertionPosition(e),u=new Hn(e,a,l,null,s);this.batch.addOperation(u),this.model.applyOperation(u),!r&&!o&&(r=i,o=e.parent.nextSibling),e=this.createPositionAfter(e.parent),i=e.parent}while(i!==n);return{position:e,range:new Ee(Be._createAt(r,"end"),Be._createAt(o,0))}}wrap(e,n){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new oe("writer-wrap-range-not-flat",this);const i=n instanceof zn?n:new zn(n);if(i.childCount>0)throw new oe("writer-wrap-element-not-empty",this);if(i.parent!==null)throw new oe("writer-wrap-element-attached",this);this.insert(i,e.start);const r=new Ee(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(r,Be._createAt(i,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),e.parent===null)throw new oe("writer-unwrap-element-no-parent",this);this.move(Ee._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,n){if(this._assertWriterUsedCorrectly(),!n||typeof n.usingOperation!="boolean")throw new oe("writer-addmarker-no-usingoperation",this);const i=n.usingOperation,r=n.range,o=n.affectsData===void 0?!1:n.affectsData;if(this.model.markers.has(e))throw new oe("writer-addmarker-marker-exists",this);if(!r)throw new oe("writer-addmarker-no-range",this);return i?(Wg(this,e,null,r,o),this.model.markers.get(e)):this.model.markers._set(e,r,i,o)}updateMarker(e,n){this._assertWriterUsedCorrectly();const i=typeof e=="string"?e:e.name,r=this.model.markers.get(i);if(!r)throw new oe("writer-updatemarker-marker-not-exists",this);if(!n){hn("writer-updatemarker-reconvert-using-editingcontroller",{markerName:i}),this.model.markers._refresh(r);return}const o=typeof n.usingOperation=="boolean",s=typeof n.affectsData=="boolean",a=s?n.affectsData:r.affectsData;if(!o&&!n.range&&!s)throw new oe("writer-updatemarker-wrong-options",this);const l=r.getRange(),u=n.range?n.range:l;if(o&&n.usingOperation!==r.managedUsingOperations){n.usingOperation?Wg(this,i,null,u,a):(Wg(this,i,l,null,a),this.model.markers._set(i,u,void 0,a));return}r.managedUsingOperations?Wg(this,i,l,u,a):this.model.markers._set(i,u,void 0,a)}removeMarker(e){this._assertWriterUsedCorrectly();const n=typeof e=="string"?e:e.name;if(!this.model.markers.has(n))throw new oe("writer-removemarker-no-marker",this);const i=this.model.markers.get(n);if(!i.managedUsingOperations){this.model.markers._remove(n);return}const r=i.getRange();Wg(this,n,r,null,i.affectsData)}addRoot(e,n="$root"){this._assertWriterUsedCorrectly();const i=this.model.document.getRoot(e);if(i&&i.isAttached())throw new oe("writer-addroot-root-exists",this);const r=this.model.document,o=new Qa(e,n,!0,r,r.version);return this.batch.addOperation(o),this.model.applyOperation(o),this.model.document.getRoot(e)}detachRoot(e){this._assertWriterUsedCorrectly();const n=typeof e=="string"?this.model.document.getRoot(e):e;if(!n||!n.isAttached())throw new oe("writer-detachroot-no-root",this);for(const o of this.model.markers)o.getRange().root===n&&this.removeMarker(o);for(const o of n.getAttributeKeys())this.removeAttribute(o,n);this.remove(this.createRangeIn(n));const i=this.model.document,r=new Qa(n.rootName,n.name,!1,i,i.version);this.batch.addOperation(r),this.model.applyOperation(r)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,n)}setSelectionAttribute(e,n){if(this._assertWriterUsedCorrectly(),typeof e=="string")this._setSelectionAttribute(e,n);else for(const[i,r]of gl(e))this._setSelectionAttribute(i,r)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),typeof e=="string")this._removeSelectionAttribute(e);else for(const n of e)this._removeSelectionAttribute(n)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,n){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const r=cs._getStoreAttributeKey(e);this.setAttribute(r,n,i.anchor.parent)}i._setAttribute(e,n)}_removeSelectionAttribute(e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const i=cs._getStoreAttributeKey(e);this.removeAttribute(i,n.anchor.parent)}n._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new oe("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,n){for(const i of this.model.markers){if(!i.managedUsingOperations)continue;const r=i.getRange();let o=!1;if(e==="move"){const s=n;o=s.containsPosition(r.start)||s.start.isEqual(r.start)||s.containsPosition(r.end)||s.end.isEqual(r.end)}else{const s=n,a=s.nodeBefore,l=s.nodeAfter,u=r.start.parent==a&&r.start.isAtEnd,c=r.end.parent==l&&r.end.offset==0,d=r.end.nodeAfter==l,f=r.start.nodeAfter==l;o=u||c||d||f}o&&this.updateMarker(i.name,{range:r})}}}function Y4(t,e,n,i){const r=t.model,o=r.document;let s=i.start,a,l,u;for(const d of i.getWalker({shallow:!0}))u=d.item.getAttribute(e),a&&l!=u&&(l!=n&&c(),s=a),a=d.nextPosition,l=u;a instanceof Be&&a!=s&&l!=n&&c();function c(){const d=new Ee(s,a),f=d.root.document?o.version:null,h=new zi(d,e,l,n,f);t.batch.addOperation(h),r.applyOperation(h)}}function X4(t,e,n,i){const r=t.model,o=r.document,s=i.getAttribute(e);let a,l;if(s!=n){if(i.root===i){const c=i.document?o.version:null;l=new au(i,e,s,n,c)}else{a=new Ee(Be._createBefore(i),t.createPositionAfter(i));const c=a.root.document?o.version:null;l=new zi(a,e,s,n,c)}t.batch.addOperation(l),r.applyOperation(l)}}function Wg(t,e,n,i,r){const o=t.model,s=o.document,a=new no(e,n,i,o.markers,!!r,s.version);t.batch.addOperation(a),o.applyOperation(a)}function o5e(t,e,n,i){let r;if(t.root.document){const o=i.document,s=new Be(o.graveyard,[0]);r=new Tn(t,e,s,o.version)}else r=new n5e(t,e);n.addOperation(r),i.applyOperation(r)}function J4(t,e){return t===e||t instanceof h1&&e instanceof h1}function s5e(t){t.document.registerPostFixer(e=>a5e(e,t))}function a5e(t,e){const n=e.document.selection,i=e.schema,r=[];let o=!1;for(const s of n.getRanges()){const a=eO(s,i);a&&!a.isEqual(s)?(r.push(a),o=!0):r.push(s)}return o&&t.setSelection(d5e(r),{backward:n.isBackward}),!1}function eO(t,e){return t.isCollapsed?l5e(t,e):u5e(t,e)}function l5e(t,e){const n=t.start,i=e.getNearestSelectionRange(n);if(!i){const o=n.getAncestors().reverse().find(s=>e.isObject(s));return o?Ee._createOn(o):null}if(!i.isCollapsed)return i;const r=i.start;return n.isEqual(r)?null:new Ee(r)}function u5e(t,e){const{start:n,end:i}=t,r=e.checkChild(n,"$text"),o=e.checkChild(i,"$text"),s=e.getLimitElement(n),a=e.getLimitElement(i);if(s===a){if(r&&o)return null;if(c5e(n,i,e)){const d=n.nodeAfter&&e.isSelectable(n.nodeAfter)?null:e.getNearestSelectionRange(n,"forward"),h=i.nodeBefore&&e.isSelectable(i.nodeBefore)?null:e.getNearestSelectionRange(i,"backward"),m=d?d.start:n,g=h?h.end:i;return new Ee(m,g)}}const l=s&&!s.is("rootElement"),u=a&&!a.is("rootElement");if(l||u){const c=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,d=l&&(!c||!Q4(n.nodeAfter,e)),f=u&&(!c||!Q4(i.nodeBefore,e));let h=n,m=i;return d&&(h=Be._createBefore(Z4(s,e))),f&&(m=Be._createAfter(Z4(a,e))),new Ee(h,m)}return null}function Z4(t,e){let n=t,i=n;for(;e.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function c5e(t,e,n){const i=t.nodeAfter&&!n.isLimit(t.nodeAfter)||n.checkChild(t,"$text"),r=e.nodeBefore&&!n.isLimit(e.nodeBefore)||n.checkChild(e,"$text");return i||r}function d5e(t){const e=[...t],n=new Set;let i=1;for(;i<e.length;){const o=e[i],s=e.slice(0,i);for(const[a,l]of s.entries())if(!n.has(a)){if(o.isEqual(l))n.add(a);else if(o.isIntersecting(l)){n.add(a),n.add(i);const u=o.getJoined(l);e.push(u)}}i++}return e.filter((o,s)=>!n.has(s))}function Q4(t,e){return t&&e.isSelectable(t)}function f5e(t,e,n={}){if(e.isCollapsed)return;const i=e.getFirstRange();if(i.root.rootName=="$graveyard")return;const r=t.schema;t.change(o=>{if(!n.doNotResetEntireContent&&_5e(r,e)){w5e(o,e);return}const s={};if(!n.doNotAutoparagraph){const u=e.getSelectedElement();u&&Object.assign(s,r.getAttributesWithProperty(u,"copyOnReplace",!0))}let a,l;n.doNotFixSelection?(a=Bi.fromPosition(i.start,"toPrevious"),l=Bi.fromPosition(i.end,"toNext")):[a,l]=h5e(i),a.isTouching(l)||o.remove(o.createRange(a,l)),n.leaveUnmerged||(g5e(o,a,l),r.removeDisallowedAttributes(a.parent.getChildren(),o)),GG(o,e,a),!n.doNotAutoparagraph&&b5e(r,a)&&KG(o,a,e,s),a.detach(),l.detach()})}function h5e(t){const e=t.root.document.model,n=t.start;let i=t.end;if(e.hasContent(t,{ignoreMarkers:!0})){const r=m5e(i);if(r&&i.isTouching(e.createPositionAt(r,0))){const o=e.createSelection(t);e.modifySelection(o,{direction:"backward"});const s=o.getLastPosition(),a=e.createRange(s,i);e.hasContent(a,{ignoreMarkers:!0})||(i=s)}}return[Bi.fromPosition(n,"toPrevious"),Bi.fromPosition(i,"toNext")]}function m5e(t){const e=t.parent,n=e.root.document.model.schema,i=e.getAncestors({parentFirst:!0,includeSelf:!0});for(const r of i){if(n.isLimit(r))return null;if(n.isBlock(r))return r}}function g5e(t,e,n){const i=t.model;if(!tO(t.model.schema,e,n))return;const[r,o]=v5e(e,n);!r||!o||(!i.hasContent(r,{ignoreMarkers:!0})&&i.hasContent(o,{ignoreMarkers:!0})?jG(t,e,n,r.parent):qG(t,e,n,r.parent))}function qG(t,e,n,i){const r=e.parent,o=n.parent;if(!(r==i||o==i)){for(e=t.createPositionAfter(r),n=t.createPositionBefore(o),n.isEqual(e)||t.insert(o,e),t.merge(e);n.parent.isEmpty;){const s=n.parent;n=t.createPositionBefore(s),t.remove(s)}tO(t.model.schema,e,n)&&qG(t,e,n,i)}}function jG(t,e,n,i){const r=e.parent,o=n.parent;if(!(r==i||o==i)){for(e=t.createPositionAfter(r),n=t.createPositionBefore(o),n.isEqual(e)||t.insert(r,n);e.parent.isEmpty;){const s=e.parent;e=t.createPositionBefore(s),t.remove(s)}n=t.createPositionBefore(o),p5e(t,n),tO(t.model.schema,e,n)&&jG(t,e,n,i)}}function p5e(t,e){const n=e.nodeBefore,i=e.nodeAfter;n.name!=i.name&&t.rename(n,i.name),t.clearAttributes(n),t.setAttributes(Object.fromEntries(i.getAttributes()),n),t.merge(e)}function tO(t,e,n){const i=e.parent,r=n.parent;return i==r||t.isLimit(i)||t.isLimit(r)?!1:y5e(e,n,t)}function v5e(t,e){const n=t.getAncestors(),i=e.getAncestors();let r=0;for(;n[r]&&n[r]==i[r];)r++;return[n[r],i[r]]}function b5e(t,e){const n=t.checkChild(e,"$text"),i=t.checkChild(e,"paragraph");return!n&&i}function y5e(t,e,n){const i=new Ee(t,e);for(const r of i.getWalker())if(n.isLimit(r.item))return!1;return!0}function KG(t,e,n,i={}){const r=t.createElement("paragraph");t.model.schema.setAllowedAttributes(r,i,t),t.insert(r,e),GG(t,n,t.createPositionAt(r,0))}function w5e(t,e){const n=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(n)),KG(t,t.createPositionAt(n,0),e)}function _5e(t,e){const n=t.getLimitElement(e);if(!e.containsEntireContent(n))return!1;const i=e.getFirstRange();return i.start.parent==i.end.parent?!1:t.checkChild(n,"paragraph")}function GG(t,e,n){e instanceof cs?t.setSelection(n):e.setTo(n)}function C5e(t,e){return t.change(n=>{const i=n.createDocumentFragment(),r=e.getFirstRange();if(!r||r.isCollapsed)return i;const o=r.start.root,s=r.start.getCommonPath(r.end),a=o.getNodeByPath(s);let l;r.start.parent==r.end.parent?l=r:l=n.createRange(n.createPositionAt(a,r.start.path[s.length]),n.createPositionAt(a,r.end.path[s.length]+1));const u=l.end.offset-l.start.offset;for(const c of l.getItems({shallow:!0}))c.is("$textProxy")?n.appendText(c.data,c.getAttributes(),i):n.append(n.cloneElement(c,!0),i);if(l!=r){const c=r._getTransformedByMove(l.start,n.createPositionAt(i,0),u)[0],d=n.createRange(n.createPositionAt(i,0),c.start),f=n.createRange(c.end,n.createPositionAt(i,"end"));eV(f,n),eV(d,n)}return i})}function eV(t,e){const n=[];Array.from(t.getItems({direction:"backward"})).map(i=>e.createRangeOn(i)).filter(i=>(i.start.isAfter(t.start)||i.start.isEqual(t.start))&&(i.end.isBefore(t.end)||i.end.isEqual(t.end))).forEach(i=>{n.push(i.start.parent),e.remove(i)}),n.forEach(i=>{let r=i;for(;r.parent&&r.isEmpty;){const o=e.createRangeOn(r);r=r.parent,e.remove(o)}})}function S5e(t,e,n){return t.change(i=>{const r=n||t.document.selection;r.isCollapsed||t.deleteContent(r,{doNotAutoparagraph:!0});const o=new k5e(t,i,r.anchor),s=[];let a;if(e.is("documentFragment")){if(e.markers.size){const c=[];for(const[d,f]of e.markers){const{start:h,end:m}=f,g=h.isEqual(m);c.push({position:h,name:d,isCollapsed:g},{position:m,name:d,isCollapsed:g})}c.sort(({position:d},{position:f})=>d.isBefore(f)?1:-1);for(const{position:d,name:f,isCollapsed:h}of c){let m=null,g=null;const v=d.parent===e&&d.isAtStart,p=d.parent===e&&d.isAtEnd;!v&&!p?(m=i.createElement("$marker"),i.insert(m,d)):h&&(g=v?"start":"end"),s.push({name:f,element:m,collapsed:g})}}a=e.getChildren()}else a=[e];o.handleNodes(a);let l=o.getSelectionRange();if(e.is("documentFragment")&&s.length){const c=l?ko.fromRange(l):null,d={};for(let f=s.length-1;f>=0;f--){const{name:h,element:m,collapsed:g}=s[f],v=!d[h];if(v&&(d[h]=[]),m){const p=i.createPositionAt(m,"before");d[h].push(p),i.remove(m)}else{const p=o.getAffectedRange();if(!p){g&&d[h].push(o.position);continue}g?d[h].push(p[g]):d[h].push(v?p.start:p.end)}}for(const[f,[h,m]]of Object.entries(d))h&&m&&h.root===m.root&&h.root.document&&!i.model.markers.has(f)&&i.addMarker(f,{usingOperation:!0,affectsData:!0,range:new Ee(h,m)});c&&(l=c.toRange(),c.detach())}l&&(r instanceof cs?i.setSelection(l):r.setTo(l));const u=o.getAffectedRange()||t.createRange(r.anchor);return o.destroy(),u})}class k5e{model;writer;position;canMergeWith;schema;_documentFragment;_documentFragmentPosition;_firstNode=null;_lastNode=null;_lastAutoParagraph=null;_filterAttributesAndChildrenOf=[];_affectedStart=null;_affectedEnd=null;_nodeToSelect=null;constructor(e,n,i){this.model=e,this.writer=n,this.position=i,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=n.createDocumentFragment(),this._documentFragmentPosition=n.createPositionAt(this._documentFragment,0)}handleNodes(e){for(const n of Array.from(e))n.offsetSize>0&&this._handleNode(n);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesAndChildrenOf,this.writer),this.model._config?.get("experimentalFlags.modelInsertContentDeepSchemaVerification")&&this._removeDisallowedChildren(this._filterAttributesAndChildrenOf),this._filterAttributesAndChildrenOf=[]}_removeDisallowedChildren(e){const n=Array.from(e);for(const i of n){if(!i.is("element"))continue;const r=[],o=[],s=this.writer.createRangeIn(i).getWalker({ignoreElementEnd:!0});for(const{item:a}of s){const l=a.parent;this.schema.checkChild(l,a)||(a.is("element")&&!this.schema.isObject(a)?(o.push(a),n.push(l)):r.push(a),s.jumpTo(this.writer.createPositionAfter(a)))}for(const a of o)this.writer.unwrap(a);for(const a of r)this.writer.remove(a)}}_updateLastNodeFromAutoParagraph(e){const n=this.writer.createPositionAfter(this._lastNode),i=this.writer.createPositionAfter(e);if(i.isAfter(n)){this._lastNode=e;if(this.position.parent!=e||!this.position.isAtEnd)throw new oe("insertcontent-invalid-insertion-position",this);this.position=i,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?Ee._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Ee(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(!this._checkAndSplitToAllowedPosition(e)){this.schema.isObject(e)||this._handleDisallowedNode(e);return}e=this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=Bi.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleDisallowedNode(e){e.is("element")&&this.handleNodes(e.getChildren())}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new oe("insertcontent-wrong-position",this,{node:e,position:this.position});return this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),e.parent||(e=this._documentFragmentPosition.nodeBefore),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesAndChildrenOf.push(e),e}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=Bi.fromPosition(e,"toPrevious")),(!this._affectedEnd||this._affectedEnd.isBefore(e))&&(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=Bi.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof zn)||!this._canMergeLeft(e))return;const n=Bi._createBefore(e);n.stickiness="toNext";const i=Bi.fromPosition(this.position,"toNext");this._affectedStart.isEqual(n)&&(this._affectedStart.detach(),this._affectedStart=Bi._createAt(n.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=n.nodeBefore,this._lastNode=n.nodeBefore),this.writer.merge(n),n.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=Bi._createAt(n.nodeBefore,"end","toNext")),this.position=i.toPosition(),i.detach(),this._filterAttributesAndChildrenOf.push(this.position.parent),n.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof zn)||!this._canMergeRight(e))return;const n=Bi._createAfter(e);n.stickiness="toNext";if(!this.position.isEqual(n))throw new oe("insertcontent-invalid-insertion-position",this);this.position=Be._createAt(n.nodeBefore,"end");const i=Bi.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(n)&&(this._affectedEnd.detach(),this._affectedEnd=Bi._createAt(n.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=n.nodeBefore,this._lastNode=n.nodeBefore),this.writer.merge(n),n.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=Bi._createAt(n.nodeBefore,0,"toPrevious")),this.position=i.toPosition(),i.detach(),this._filterAttributesAndChildrenOf.push(this.position.parent),n.detach()}_canMergeLeft(e){const n=e.previousSibling;return n instanceof zn&&this.canMergeWith.has(n)&&this.model.schema.checkMerge(n,e)}_canMergeRight(e){const n=e.nextSibling;return n instanceof zn&&this.canMergeWith.has(n)&&this.model.schema.checkMerge(e,n)}_insertAutoParagraph(){this._insertPartialFragment();const e=this.writer.createElement("paragraph");this.writer.insert(e,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=e,this.position=this.writer.createPositionAt(e,0)}_checkAndSplitToAllowedPosition(e){const n=this._getAllowedIn(this.position.parent,e);if(!n)return!1;for(n!=this.position.parent&&this._insertPartialFragment();n!=this.position.parent;)if(this.position.isAtStart){const i=this.position.parent;this.position=this.writer.createPositionBefore(i),i.isEmpty&&i.parent===n&&this.writer.remove(i)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const i=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=i,this.canMergeWith.add(this.position.nodeAfter)}return this.schema.checkChild(this.position.parent,e)||this._insertAutoParagraph(),!0}_getAllowedIn(e,n){const i=this.schema.createContext(e);return this.schema.checkChild(i,n)||this.schema.checkChild(i,"paragraph")&&this.schema.checkChild(i.push("paragraph"),n)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,n)}}function T5e(t,e,n,i={}){if(!t.schema.isObject(e))throw new oe("insertobject-element-not-an-object",t,{object:e});const r=n||t.document.selection;let o=r;i.findOptimalPosition&&t.schema.isBlock(e)&&(o=t.createSelection(t.schema.findOptimalInsertionRange(r,i.findOptimalPosition)));const s=Mi(r.getSelectedBlocks()),a={};return s&&Object.assign(a,t.schema.getAttributesWithProperty(s,"copyOnReplace",!0)),t.change(l=>{o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0});let u=e;const c=o.anchor.parent,d=t.schema.createContext(c);!t.schema.checkChild(d,e)&&t.schema.checkChild(d,"paragraph")&&t.schema.checkChild(d.push("paragraph"),e)&&(u=l.createElement("paragraph"),l.insert(e,u)),t.schema.setAllowedAttributes(u,a,l);const f=t.insertContent(u,o);return f.isCollapsed||i.setSelection&&E5e(l,e,i.setSelection,a),f})}function E5e(t,e,n,i){const r=t.model;if(n=="on"){t.setSelection(e,"on");return}if(n!="after")throw new oe("insertobject-invalid-place-parameter-value",r);let o=e.nextSibling;if(r.schema.isInline(e)){t.setSelection(e,"after");return}!(o&&r.schema.checkChild(o,"$text"))&&r.schema.checkChild(e.parent,"paragraph")&&(o=t.createElement("paragraph"),r.schema.setAllowedAttributes(o,i,t),r.insertContent(o,t.createPositionAfter(e))),o&&t.setSelection(o,0)}const x5e=' ,.?!:;"-()';function A5e(t,e,n={}){const i=t.schema,r=n.direction!="backward",o=n.unit?n.unit:"character",s=!!n.treatEmojiAsSingleUnit,a=e.focus,l=new Ql({boundaries:M5e(a,r),singleCharacters:!0,direction:r?"forward":"backward"}),u={walker:l,schema:i,isForward:r,unit:o,treatEmojiAsSingleUnit:s};let c;for(;c=l.next();){if(c.done)return;const d=P5e(u,c.value);if(d){e instanceof cs?t.change(f=>{f.setSelectionFocus(d)}):e.setFocus(d);return}}}function P5e(t,e){const{isForward:n,walker:i,unit:r,schema:o,treatEmojiAsSingleUnit:s}=t,{type:a,item:l,nextPosition:u}=e;if(a=="text")return t.unit==="word"?R5e(i,n):I5e(i,r,s);if(a==(n?"elementStart":"elementEnd")){if(o.isSelectable(l))return Be._createAt(l,n?"after":"before");if(o.checkChild(u,"$text"))return u}else{if(o.isLimit(l)){i.skip(()=>!0);return}if(o.checkChild(u,"$text"))return u}}function I5e(t,e,n){const i=t.position.textNode;if(i){const r=i.data;let o=t.position.offset-i.startOffset;for(;UM(r,o)||e=="character"&&WM(r,o)||n&&aG(r,o);)t.next(),o=t.position.offset-i.startOffset}return t.position}function R5e(t,e){let n=t.position.textNode;for(n||(n=e?t.position.nodeAfter:t.position.nodeBefore);n&&n.is("$text");){const i=t.position.offset-n.startOffset;if(L5e(n,i,e))n=e?t.position.nodeAfter:t.position.nodeBefore;else{if(O5e(n.data,i,e))break;t.next()}}return t.position}function M5e(t,e){const n=t.root,i=Be._createAt(n,e?"end":0);return e?new Ee(t,i):new Ee(i,t)}function O5e(t,e,n){const i=e+(n?0:-1);return x5e.includes(t.charAt(i))}function L5e(t,e,n){return e===(n?t.offsetSize:0)}let D5e=class extends Ln(){markers;document;schema;_config;_pendingChanges;_currentWriter;constructor(e){super(),this.markers=new t5e,this.document=new e5e(this),this.schema=new vLe,this._config=e,this._pendingChanges=[],this._currentWriter=null,["deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(n=>this.decorate(n)),this.on("applyOperation",(n,i)=>{i[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(()=>!0,"$marker"),s5e(this),this.document.registerPostFixer(DG),this.on("insertContent",(n,[i,r])=>{n.return=S5e(this,i,r)}),this.on("insertObject",(n,[i,r,o])=>{n.return=T5e(this,i,r,o)}),this.on("canEditAt",n=>{const i=!this.document.isReadOnly;n.return=i,i||n.stop()})}change(e){try{return this._pendingChanges.length===0?(this._pendingChanges.push({batch:new lh,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(n){oe.rethrowUnexpectedError(n,this)}}enqueueChange(e,n){try{e?typeof e=="function"?(n=e,e=new lh):e instanceof lh||(e=new lh(e)):e=new lh,this._pendingChanges.push({batch:e,callback:n}),this._pendingChanges.length==1&&this._runPendingChanges()}catch(i){oe.rethrowUnexpectedError(i,this)}}applyOperation(e){e._execute()}insertContent(e,n,i,...r){const o=BT(n,i);return this.fire("insertContent",[e,o,i,...r])}insertObject(e,n,i,r,...o){const s=BT(n,i);return this.fire("insertObject",[e,s,r,r,...o])}deleteContent(e,n){f5e(this,e,n)}modifySelection(e,n){A5e(this,e,n)}getSelectedContent(e){return C5e(this,e)}hasContent(e,n={}){const i=e instanceof Ee?e:Ee._createIn(e);if(i.isCollapsed)return!1;const{ignoreWhitespaces:r=!1,ignoreMarkers:o=!1}=n;if(!o){for(const s of this.markers.getMarkersIntersectingRange(i))if(s.affectsData)return!0}for(const s of i.getItems())if(this.schema.isContent(s))if(s.is("$textProxy"))if(r){if(s.data.search(/\S/)!==-1)return!0}else return!0;else return!0;return!1}canEditAt(e){const n=BT(e);return this.fire("canEditAt",[n])}createPositionFromPath(e,n,i){return new Be(e,n,i)}createPositionAt(e,n){return Be._createAt(e,n)}createPositionAfter(e){return Be._createAfter(e)}createPositionBefore(e){return Be._createBefore(e)}createRange(e,n){return new Ee(e,n)}createRangeIn(e){return Ee._createIn(e)}createRangeOn(e){return Ee._createOn(e)}createSelection(...e){return new Xo(...e)}createBatch(e){return new lh(e)}createOperationFromJSON(e){return ULe.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const n=this._pendingChanges[0].batch;this._currentWriter=new r5e(this,n);const i=this._pendingChanges[0].callback(this._currentWriter);e.push(i),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}};function BT(t,e){if(t)return t instanceof Xo||t instanceof cs?t:t instanceof Uf?e||e===0?new Xo(t,e):t.is("rootElement")?new Xo(t,"in"):new Xo(t,"on"):new Xo(t)}class N5e extends Cl{domEventType="click";onDomEvent(e){this.fire(e.type,e)}}class nO extends Cl{domEventType=["mousedown","mouseup","mouseover","mouseout"];onDomEvent(e){this.fire(e.type,e)}}class B5e extends Cl{domEventType=["touchstart","touchend","touchmove"];onDomEvent(e){this.fire(e.type,e)}}class YG extends Cl{domEventType=["pointerdown","pointerup","pointermove"];onDomEvent(e){this.fire(e.type,e)}}class Pu{document;constructor(e){this.document=e}createDocumentFragment(e){return new af(this.document,e)}createElement(e,n,i){return new ga(this.document,e,n,i)}createText(e){return new Ji(this.document,e)}clone(e,n=!1){return e._clone(n)}appendChild(e,n){return n._appendChild(e)}insertChild(e,n,i){return i._insertChild(e,n)}removeChildren(e,n,i){return i._removeChildren(e,n)}remove(e){const n=e.parent;return n?this.removeChildren(n.getChildIndex(e),1,n):[]}replace(e,n){const i=e.parent;if(i){const r=i.getChildIndex(e);return this.removeChildren(r,1,i),this.insertChild(r,n,i),!0}return!1}unwrapElement(e){const n=e.parent;if(n){const i=n.getChildIndex(e);this.remove(e),this.insertChild(i,e.getChildren(),n)}}rename(e,n){const i=new ga(this.document,e,n.getAttributes(),n.getChildren());return this.replace(n,i)?i:null}setAttribute(e,n,i){i._setAttribute(e,n)}removeAttribute(e,n){n._removeAttribute(e)}addClass(e,n){n._addClass(e)}removeClass(e,n){n._removeClass(e)}setStyle(e,n,i){Wa(e)&&i===void 0?n._setStyle(e):i._setStyle(e,n)}removeStyle(e,n){n._removeStyle(e)}setCustomProperty(e,n,i){i._setCustomProperty(e,n)}removeCustomProperty(e,n){return n._removeCustomProperty(e)}createPositionAt(e,n){return Ge._createAt(e,n)}createPositionAfter(e){return Ge._createAfter(e)}createPositionBefore(e){return Ge._createBefore(e)}createRange(e,n){return new Nt(e,n)}createRangeOn(e){return Nt._createOn(e)}createRangeIn(e){return Nt._createIn(e)}createSelection(...e){return new aa(...e)}}const V5e=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,F5e=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,$5e=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,z5e=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,H5e=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,U5e=/\w+\((?:[^()]|\([^()]*\))*\)|\S+/gi,W5e=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function XG(t){return t.startsWith("#")?V5e.test(t):t.startsWith("rgb")?F5e.test(t)||$5e.test(t):t.startsWith("hsl")?z5e.test(t)||H5e.test(t):W5e.has(t.toLowerCase())}const q5e=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function j5e(t){return q5e.includes(t)}const K5e=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function vS(t){return K5e.test(t)}const G5e=/^[+-]?[0-9]*([.][0-9]+)?%$/;function JG(t){return G5e.test(t)}const Y5e=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function X5e(t){return Y5e.includes(t)}const J5e=["center","top","bottom","left","right"];function Z5e(t){return J5e.includes(t)}const Q5e=["fixed","scroll","local"];function eDe(t){return Q5e.includes(t)}const tDe=/^url\(/;function nDe(t){return tDe.test(t)}function rv(t=""){if(t==="")return{top:void 0,right:void 0,bottom:void 0,left:void 0};const e=iO(t),n=e[0],i=e[2]||n,r=e[1]||n,o=e[3]||r;return{top:n,bottom:i,right:r,left:o}}function ov(t){return e=>{const{top:n,right:i,bottom:r,left:o}=e,s=[];return[n,i,o,r].every(a=>!!a)?s.push([t,iDe(e)]):(n&&s.push([t+"-top",n]),i&&s.push([t+"-right",i]),r&&s.push([t+"-bottom",r]),o&&s.push([t+"-left",o])),s}}function iDe({top:t,right:e,bottom:n,left:i}){const r=[];return i!==e?r.push(t,e,n,i):n!==t?r.push(t,e,n):e!==t?r.push(t,e):r.push(t),r.join(" ")}function ZG(t){return e=>({path:t,value:rv(e)})}function iO(t){const e=t.trim().slice(0,1500).matchAll(U5e);return Array.from(e).map(n=>n[0])}function QG(t){t.setNormalizer("background",rDe()),t.setNormalizer("background-color",oDe()),t.setReducer("background",sDe()),t.setStyleRelation("background",["background-color"])}function rDe(){return t=>{const e={},n=iO(t);for(const i of n)X5e(i)?(e.repeat=e.repeat||[],e.repeat.push(i)):Z5e(i)?(e.position=e.position||[],e.position.push(i)):eDe(i)?e.attachment=i:XG(i)?e.color=i:nDe(i)&&(e.image=i);return{path:"background",value:e}}}function oDe(){return t=>({path:"background.color",value:t})}function sDe(){return t=>{const e=[];return e.push(["background-color",t.color]),e}}function aDe(t){t.setNormalizer("border",lDe()),t.setNormalizer("border-top",sy("top")),t.setNormalizer("border-right",sy("right")),t.setNormalizer("border-bottom",sy("bottom")),t.setNormalizer("border-left",sy("left")),t.setNormalizer("border-color",VT("color")),t.setNormalizer("border-width",VT("width")),t.setNormalizer("border-style",VT("style")),t.setNormalizer("border-top-color",vs("color","top")),t.setNormalizer("border-top-style",vs("style","top")),t.setNormalizer("border-top-width",vs("width","top")),t.setNormalizer("border-right-color",vs("color","right")),t.setNormalizer("border-right-style",vs("style","right")),t.setNormalizer("border-right-width",vs("width","right")),t.setNormalizer("border-bottom-color",vs("color","bottom")),t.setNormalizer("border-bottom-style",vs("style","bottom")),t.setNormalizer("border-bottom-width",vs("width","bottom")),t.setNormalizer("border-left-color",vs("color","left")),t.setNormalizer("border-left-style",vs("style","left")),t.setNormalizer("border-left-width",vs("width","left")),t.setExtractor("border-top",ay("top")),t.setExtractor("border-right",ay("right")),t.setExtractor("border-bottom",ay("bottom")),t.setExtractor("border-left",ay("left")),t.setExtractor("border-top-color","border.color.top"),t.setExtractor("border-right-color","border.color.right"),t.setExtractor("border-bottom-color","border.color.bottom"),t.setExtractor("border-left-color","border.color.left"),t.setExtractor("border-top-width","border.width.top"),t.setExtractor("border-right-width","border.width.right"),t.setExtractor("border-bottom-width","border.width.bottom"),t.setExtractor("border-left-width","border.width.left"),t.setExtractor("border-top-style","border.style.top"),t.setExtractor("border-right-style","border.style.right"),t.setExtractor("border-bottom-style","border.style.bottom"),t.setExtractor("border-left-style","border.style.left"),t.setReducer("border-color",ov("border-color")),t.setReducer("border-style",ov("border-style")),t.setReducer("border-width",ov("border-width")),t.setReducer("border-top",ly("top")),t.setReducer("border-right",ly("right")),t.setReducer("border-bottom",ly("bottom")),t.setReducer("border-left",ly("left")),t.setReducer("border",cDe()),t.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),t.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),t.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),t.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),t.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),t.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),t.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),t.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function lDe(){return t=>{const{color:e,style:n,width:i}=eY(t);return{path:"border",value:{color:rv(e),style:rv(n),width:rv(i)}}}}function sy(t){return e=>{const{color:n,style:i,width:r}=eY(e),o={};return n!==void 0&&(o.color={[t]:n}),i!==void 0&&(o.style={[t]:i}),r!==void 0&&(o.width={[t]:r}),{path:"border",value:o}}}function VT(t){return e=>({path:"border",value:uDe(e,t)})}function uDe(t,e){return{[e]:rv(t)}}function vs(t,e){return n=>({path:"border",value:{[t]:{[e]:n}}})}function ay(t){return(e,n)=>{if(n.border)return _p(n.border,t)}}function _p(t,e){const n={};return t.width&&t.width[e]&&(n.width=t.width[e]),t.style&&t.style[e]&&(n.style=t.style[e]),t.color&&t.color[e]&&(n.color=t.color[e]),n}function eY(t){const e={},n=iO(t);for(const i of n)vS(i)||/thin|medium|thick/.test(i)?e.width=i:j5e(i)?e.style=i:e.color=i;return e}function cDe(){return e=>{const n=_p(e,"top"),i=_p(e,"right"),r=_p(e,"bottom"),o=_p(e,"left"),s=[n,i,r,o],a={width:t(s,"width"),style:t(s,"style"),color:t(s,"color")},l=Vh(a,"all");return l.length?l:[...Object.entries(a).reduce((c,[d,f])=>(f&&(c.push([`border-${d}`,f]),s.forEach(h=>delete h[d])),c),[]),...Vh(n,"top"),...Vh(i,"right"),...Vh(r,"bottom"),...Vh(o,"left")]};function t(e,n){return e.map(i=>i[n]).reduce((i,r)=>i==r?i:null)}}function ly(t){return e=>Vh(e,t)}function Vh(t,e){const n=[];if(t&&t.width&&n.push("width"),t&&t.style&&n.push("style"),t&&t.color&&n.push("color"),n.length==3){const i=n.map(r=>t[r]).join(" ");return[e=="all"?["border",i]:[`border-${e}`,i]]}return e=="all"?[]:n.map(i=>[`border-${e}-${i}`,t[i]])}function dDe(t){t.setNormalizer("margin",ZG("margin")),t.setNormalizer("margin-top",e=>({path:"margin.top",value:e})),t.setNormalizer("margin-right",e=>({path:"margin.right",value:e})),t.setNormalizer("margin-bottom",e=>({path:"margin.bottom",value:e})),t.setNormalizer("margin-left",e=>({path:"margin.left",value:e})),t.setReducer("margin",ov("margin")),t.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function fDe(t){t.setNormalizer("padding",ZG("padding")),t.setNormalizer("padding-top",e=>({path:"padding.top",value:e})),t.setNormalizer("padding-right",e=>({path:"padding.right",value:e})),t.setNormalizer("padding-bottom",e=>({path:"padding.bottom",value:e})),t.setNormalizer("padding-left",e=>({path:"padding.left",value:e})),t.setReducer("padding",ov("padding")),t.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}class tY{crashes=[];state="initializing";_crashNumberLimit;_now=Date.now;_minimumNonErrorTimePeriod;_boundErrorHandler;_listeners;constructor(e){if(this.crashes=[],this._crashNumberLimit=typeof e.crashNumberLimit=="number"?e.crashNumberLimit:3,this._minimumNonErrorTimePeriod=typeof e.minimumNonErrorTimePeriod=="number"?e.minimumNonErrorTimePeriod:5e3,this._boundErrorHandler=n=>{const i="error"in n?n.error:n.reason;i instanceof Error&&this._handleError(i,n)},this._listeners={},!this._restart)throw new Error("The Watchdog class was split into the abstract `Watchdog` class and the `EditorWatchdog` class. Please, use `EditorWatchdog` if you have used the `Watchdog` class previously.")}destroy(){this._stopErrorHandling(),this._listeners={}}on(e,n){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(n)}off(e,n){this._listeners[e]=this._listeners[e].filter(i=>i!==n)}_fire(e,...n){const i=this._listeners[e]||[];for(const r of i)r.apply(this,[null,...n])}_startErrorHandling(){window.addEventListener("error",this._boundErrorHandler),window.addEventListener("unhandledrejection",this._boundErrorHandler)}_stopErrorHandling(){window.removeEventListener("error",this._boundErrorHandler),window.removeEventListener("unhandledrejection",this._boundErrorHandler)}_handleError(e,n){if(this._shouldReactToError(e)){this.crashes.push({message:e.message,stack:e.stack,filename:n instanceof ErrorEvent?n.filename:void 0,lineno:n instanceof ErrorEvent?n.lineno:void 0,colno:n instanceof ErrorEvent?n.colno:void 0,date:this._now()});const i=this._shouldRestart();this.state="crashed",this._fire("stateChange"),this._fire("error",{error:e,causesRestart:i}),i?this._restart():(this.state="crashedPermanently",this._fire("stateChange"))}}_shouldReactToError(e){return e.is&&e.is("CKEditorError")&&e.context!==void 0&&e.context!==null&&this.state==="ready"&&this._isErrorComingFromThisItem(e)}_shouldRestart(){if(this.crashes.length<=this._crashNumberLimit)return!0;const e=this.crashes[this.crashes.length-1].date,n=this.crashes[this.crashes.length-1-this._crashNumberLimit].date;return(e-n)/this._crashNumberLimit>this._minimumNonErrorTimePeriod}}function xA(t,e=new Set){const n=[t],i=new Set;let r=0;for(;n.length>r;){const o=n[r++];if(!(i.has(o)||!hDe(o)||e.has(o)))if(i.add(o),Symbol.iterator in o)try{for(const s of o)n.push(s)}catch{}else for(const s in o)s!=="defaultValue"&&n.push(o[s])}return i}function hDe(t){const e=Object.prototype.toString.call(t),n=typeof t;return!(n==="number"||n==="boolean"||n==="string"||n==="symbol"||n==="function"||e==="[object Date]"||e==="[object RegExp]"||e==="[object Module]"||t===void 0||t===null||t._watchdogExcluded||t instanceof EventTarget||t instanceof Event)}function nY(t,e,n=new Set){if(t===e&&mDe(t))return!0;const i=xA(t,n),r=xA(e,n);for(const o of i)if(r.has(o))return!0;return!1}function mDe(t){return typeof t=="object"&&t!==null}class iY extends tY{_editor=null;_lifecyclePromise=null;_throttledSave;_data;_lastDocumentVersion;_elementOrData;_initUsingData=!0;_editables={};_config;_excludedProps;constructor(e,n={}){super(n),this._throttledSave=Km(this._save.bind(this),typeof n.saveInterval=="number"?n.saveInterval:5e3),e&&(this._creator=(i,r)=>e.create(i,r)),this._destructor=i=>i.destroy()}get editor(){return this._editor}get _item(){return this._editor}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}_restart(){return Promise.resolve().then(()=>(this.state="initializing",this._fire("stateChange"),this._destroy())).catch(e=>{console.error("An error happened during the editor destroying.",e)}).then(()=>{const e={},n=[],i=this._config.rootsAttributes||{},r={};for(const[s,a]of Object.entries(this._data.roots))a.isLoaded?(e[s]="",r[s]=i[s]||{}):n.push(s);const o={...this._config,extraPlugins:this._config.extraPlugins||[],lazyRoots:n,rootsAttributes:r,_watchdogInitialData:this._data};return delete o.initialData,o.extraPlugins.push(gDe),this._initUsingData?this.create(e,o,o.context):Rc(this._elementOrData)?this.create(this._elementOrData,o,o.context):this.create(this._editables,o,o.context)}).then(()=>{this._fire("restart")})}create(e=this._elementOrData,n=this._config,i){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(super._startErrorHandling(),this._elementOrData=e,this._initUsingData=typeof e=="string"||Object.keys(e).length>0&&typeof Object.values(e)[0]=="string",this._config=this._cloneEditorConfiguration(n)||{},this._config.context=i,this._creator(e,this._config))).then(r=>{this._editor=r,r.model.document.on("change:data",this._throttledSave),this._lastDocumentVersion=r.model.document.version,this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this.state="ready",this._fire("stateChange")}).finally(()=>{this._lifecyclePromise=null}),this._lifecyclePromise}destroy(){return this._lifecyclePromise=Promise.resolve(this._lifecyclePromise).then(()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy())).finally(()=>{this._lifecyclePromise=null}),this._lifecyclePromise}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling(),this._throttledSave.cancel();const e=this._editor;return this._editor=null,e.model.document.off("change:data",this._throttledSave),this._destructor(e)})}_save(){const e=this._editor.model.document.version;try{this._data=this._getData(),this._initUsingData||(this._editables=this._getEditables()),this._lastDocumentVersion=e}catch(n){console.error(n,"An error happened during restoring editor data. Editor will be restored from the previously saved data.")}}_setExcludedProperties(e){this._excludedProps=e}_getData(){const e=this._editor,n=e.model.document.roots.filter(a=>a.isAttached()&&a.rootName!="$graveyard"),{plugins:i}=e,r=i.has("CommentsRepository")&&i.get("CommentsRepository"),o=i.has("TrackChanges")&&i.get("TrackChanges"),s={roots:{},markers:{},commentThreads:JSON.stringify([]),suggestions:JSON.stringify([])};n.forEach(a=>{s.roots[a.rootName]={content:JSON.stringify(Array.from(a.getChildren())),attributes:JSON.stringify(Array.from(a.getAttributes())),isLoaded:a._isLoaded}});for(const a of e.model.markers)a._affectsData&&(s.markers[a.name]={rangeJSON:a.getRange().toJSON(),usingOperation:a._managedUsingOperations,affectsData:a._affectsData});return r&&(s.commentThreads=JSON.stringify(r.getCommentThreads({toJSON:!0,skipNotAttached:!0}))),o&&(s.suggestions=JSON.stringify(o.getSuggestions({toJSON:!0,skipNotAttached:!0}))),s}_getEditables(){const e={};for(const n of this.editor.model.document.getRootNames()){const i=this.editor.ui.getEditableElement(n);i&&(e[n]=i)}return e}_isErrorComingFromThisItem(e){return nY(this._editor,e.context,this._excludedProps)}_cloneEditorConfiguration(e){return dS(e,(n,i)=>{if(Rc(n)||i==="context")return n})}}class gDe{editor;_data;constructor(e){this.editor=e,this._data=e.config.get("_watchdogInitialData")}init(){this.editor.data.on("init",e=>{e.stop(),this.editor.model.enqueueChange({isUndoable:!1},n=>{this._restoreCollaborationData(),this._restoreEditorData(n)}),this.editor.data.fire("ready")},{priority:999})}_createNode(e,n){if("name"in n){const i=e.createElement(n.name,n.attributes);if(n.children)for(const r of n.children)i._appendChild(this._createNode(e,r));return i}else return e.createText(n.data,n.attributes)}_restoreEditorData(e){const n=this.editor;Object.entries(this._data.roots).forEach(([i,{content:r,attributes:o}])=>{const s=JSON.parse(r),a=JSON.parse(o),l=n.model.document.getRoot(i);for(const[u,c]of a)e.setAttribute(u,c,l);for(const u of s){const c=this._createNode(e,u);e.insert(c,l,"end")}}),Object.entries(this._data.markers).forEach(([i,r])=>{const{document:o}=n.model,{rangeJSON:{start:s,end:a},...l}=r,u=o.getRoot(s.root),c=e.createPositionFromPath(u,s.path,s.stickiness),d=e.createPositionFromPath(u,a.path,a.stickiness),f=e.createRange(c,d);e.addMarker(i,{range:f,...l})})}_restoreCollaborationData(){const e=JSON.parse(this._data.commentThreads),n=JSON.parse(this._data.suggestions);if(this.editor.plugins.has("CommentsRepository")){const i=this.editor.plugins.get("CommentsRepository");for(const r of i.getCommentThreads())i._removeCommentThread({threadId:r.id});e.forEach(r=>{const o=this.editor.config.get("collaboration.channelId");this.editor.plugins.get("CommentsRepository").addCommentThread({channelId:o,...r})})}if(this.editor.plugins.has("TrackChangesEditing")){const i=this.editor.plugins.get("TrackChangesEditing");for(const r of i.getSuggestions())i._removeSuggestion(r);n.forEach(r=>{i.addSuggestionData(r)})}}}const sv=Symbol("MainQueueId");class pDe extends tY{_watchdogs=new Map;_watchdogConfig;_context=null;_contextProps=new Set;_actionQueues=new vDe;_contextConfig;_item;constructor(e,n={}){super(n),this._watchdogConfig=n,this._creator=i=>e.create(i),this._destructor=i=>i.destroy(),this._actionQueues.onEmpty(()=>{this.state==="initializing"&&(this.state="ready",this._fire("stateChange"))})}setCreator(e){this._creator=e}setDestructor(e){this._destructor=e}get context(){return this._context}create(e={}){return this._actionQueues.enqueue(sv,()=>(this._contextConfig=e,this._create()))}getItem(e){return this._getWatchdog(e)._item}getItemState(e){return this._getWatchdog(e).state}add(e){const n=tV(e);return Promise.all(n.map(i=>this._actionQueues.enqueue(i.id,()=>{if(this.state==="destroyed")throw new Error("Cannot add items to destroyed watchdog.");if(!this._context)throw new Error("Context was not created yet. You should call the `ContextWatchdog#create()` method first.");let r;if(this._watchdogs.has(i.id))throw new Error(`Item with the given id is already added: '${i.id}'.`);if(i.type==="editor")return r=new iY(null,this._watchdogConfig),r.setCreator(i.creator),r._setExcludedProperties(this._contextProps),i.destructor&&r.setDestructor(i.destructor),this._watchdogs.set(i.id,r),r.on("error",(o,{error:s,causesRestart:a})=>{this._fire("itemError",{itemId:i.id,error:s}),a&&this._actionQueues.enqueue(i.id,()=>new Promise(l=>{const u=()=>{r.off("restart",u),this._fire("itemRestart",{itemId:i.id}),l()};r.on("restart",u)}))}),r.create(i.sourceElementOrData,i.config,this._context);throw new Error(`Not supported item type: '${i.type}'.`)})))}remove(e){const n=tV(e);return Promise.all(n.map(i=>this._actionQueues.enqueue(i,()=>{const r=this._getWatchdog(i);return this._watchdogs.delete(i),r.destroy()})))}destroy(){return this._actionQueues.enqueue(sv,()=>(this.state="destroyed",this._fire("stateChange"),super.destroy(),this._destroy()))}_restart(){return this._actionQueues.enqueue(sv,()=>(this.state="initializing",this._fire("stateChange"),this._destroy().catch(e=>{console.error("An error happened during destroying the context or items.",e)}).then(()=>this._create()).then(()=>this._fire("restart"))))}_create(){return Promise.resolve().then(()=>(this._startErrorHandling(),this._creator(this._contextConfig))).then(e=>(this._context=e,this._contextProps=xA(this._context),Promise.all(Array.from(this._watchdogs.values()).map(n=>(n._setExcludedProperties(this._contextProps),n.create(void 0,void 0,this._context))))))}_destroy(){return Promise.resolve().then(()=>{this._stopErrorHandling();const e=this._context;return this._context=null,this._contextProps=new Set,Promise.all(Array.from(this._watchdogs.values()).map(n=>n.destroy())).then(()=>this._destructor(e))})}_getWatchdog(e){const n=this._watchdogs.get(e);if(!n)throw new Error(`Item with the given id was not registered: ${e}.`);return n}_isErrorComingFromThisItem(e){for(const n of this._watchdogs.values())if(n._isErrorComingFromThisItem(e))return!1;return nY(this._context,e.context)}}class vDe{_onEmptyCallbacks=[];_queues=new Map;_activeActions=0;onEmpty(e){this._onEmptyCallbacks.push(e)}enqueue(e,n){const i=e===sv;this._activeActions++,this._queues.get(e)||this._queues.set(e,Promise.resolve());const o=(i?Promise.all(this._queues.values()):Promise.all([this._queues.get(sv),this._queues.get(e)])).then(n),s=o.catch(()=>{});return this._queues.set(e,s),o.finally(()=>{this._activeActions--,this._queues.get(e)===s&&this._activeActions===0&&this._onEmptyCallbacks.forEach(a=>a())})}}function tV(t){return Array.isArray(t)?t:[t]}class xe extends Ln(){editor;_disableStack=new Set;constructor(e){super(),this.editor=e,this.set("isEnabled",!0)}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",nV,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",nV),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}function nV(t){t.return=!1,t.stop()}class Ht extends Ln(){editor;_isEnabledBasedOnSelection;_affectsData;_disableStack;static get _throwErrorWhenUsedAsAPlugin(){return!0}constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._isEnabledBasedOnSelection=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.listenTo(e,"change:isReadOnly",()=>{this.refresh()}),this.on("set:isEnabled",n=>{if(!this.affectsData)return;const i=e.model.document.selection,o=!(i.getFirstPosition().root.rootName=="$graveyard")&&e.model.canEditAt(i);(e.isReadOnly||this._isEnabledBasedOnSelection&&!o)&&(n.return=!1,n.stop())},{priority:"highest"}),this.on("execute",n=>{this.isEnabled||n.stop()},{priority:"high"})}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),this._disableStack.size==1&&(this.on("set:isEnabled",iV,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),this._disableStack.size==0&&(this.off("set:isEnabled",iV),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function iV(t){t.return=!1,t.stop()}class rV extends Ht{_childCommandsDefinitions=[];refresh(){}execute(...e){const n=this._getFirstEnabledCommand();return!!n&&n.execute(e)}registerChildCommand(e,n={}){$K(this._childCommandsDefinitions,{command:e,priority:n.priority||"normal"}),e.on("change:isEnabled",()=>this._checkEnabled()),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find(({command:n})=>n.isEnabled);return e&&e.command}}class bDe{_commands;constructor(){this._commands=new Map}add(e,n){this._commands.set(e,n)}get(e){return this._commands.get(e)}execute(e,...n){const i=this.get(e);if(!i)throw new oe("commandcollection-command-not-found",this,{commandName:e});return i.execute(...n)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class rY extends Fn(){_context;_plugins=new Map;_availablePlugins;_contextPlugins;constructor(e,n=[],i=[]){super(),this._context=e,this._availablePlugins=new Map;for(const r of n)r.pluginName&&this._availablePlugins.set(r.pluginName,r);this._contextPlugins=new Map;for(const[r,o]of i)this._contextPlugins.set(r,o),this._contextPlugins.set(o,r),r.pluginName&&this._availablePlugins.set(r.pluginName,r)}*[Symbol.iterator](){for(const e of this._plugins)typeof e[0]=="function"&&(yield e)}get(e){const n=this._plugins.get(e);if(!n){let i=e;throw typeof e=="function"&&(i=e.pluginName||e.name),new oe("plugincollection-plugin-not-loaded",this._context,{plugin:i})}return n}has(e){return this._plugins.has(e)}async init(e,n=[],i=[]){const r=this,o=this._context;h(e),g(e);const s=e.filter(k=>!d(k,n)),a=[...m(s)];S(a,i);const l=_(a);return await C(l,"init"),await C(l,"afterInit"),l;function u(k){return typeof k=="function"}function c(k){return u(k)&&!!k.isContextPlugin}function d(k,T){return T.some(E=>E===k||f(k)===E||f(E)===k)}function f(k){return u(k)?k.pluginName||k.name:k}function h(k,T=new Set){k.forEach(E=>{u(E)&&(T.has(E)||(T.add(E),E.pluginName&&!r._availablePlugins.has(E.pluginName)&&r._availablePlugins.set(E.pluginName,E),E.requires&&h(E.requires,T)))})}function m(k,T=new Set){return k.map(E=>u(E)?E:r._availablePlugins.get(E)).reduce((E,x)=>T.has(x)?E:(T.add(x),x.requires&&(g(x.requires,x),m(x.requires,T).forEach(P=>E.add(P))),E.add(x)),new Set)}function g(k,T=null){k.map(E=>u(E)?E:r._availablePlugins.get(E)||E).forEach(E=>{v(E),p(E,T),b(E,T),y(E,T)})}function v(k){if(typeof k=="function"&&k._throwErrorWhenUsedAsAPlugin)throw new oe("plugincollection-plugin-invalid-constructor",o,{name:k.name})}function p(k,T){if(!u(k))throw T?new oe("plugincollection-soft-required",o,{missingPlugin:k,requiredBy:f(T)}):new oe("plugincollection-plugin-not-found",o,{plugin:k})}function b(k,T){if(c(T)&&!c(k))throw new oe("plugincollection-context-required",o,{plugin:f(k),requiredBy:f(T)})}function y(k,T){if(T&&d(k,n))throw new oe("plugincollection-required",o,{plugin:f(k),requiredBy:f(T)})}function _(k){return k.map(T=>{let E=r._contextPlugins.get(T);return E=E||new T(o),r._add(T,E),E})}function C(k,T){return k.reduce((E,x)=>!x[T]||r._contextPlugins.has(x)?E:E.then(x[T].bind(x)),Promise.resolve())}function S(k,T){for(const E of T){if(typeof E!="function")throw new oe("plugincollection-replace-plugin-invalid-type",null,{pluginItem:E});const x=E.pluginName;if(!x)throw new oe("plugincollection-replace-plugin-missing-name",null,{pluginItem:E});if(E.requires&&E.requires.length)throw new oe("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:x});const P=r._availablePlugins.get(x);if(!P)throw new oe("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:x});const A=k.indexOf(P);if(A===-1){if(r._contextPlugins.has(P))return;throw new oe("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:x})}if(P.requires&&P.requires.length)throw new oe("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:x});k.splice(A,1,E),r._availablePlugins.set(x,E)}}}destroy(){const e=[];for(const[,n]of this)typeof n.destroy=="function"&&!this._contextPlugins.has(n)&&e.push(n.destroy());return Promise.all(e)}_add(e,n){this._plugins.set(e,n);const i=e.pluginName;if(i){if(this._plugins.has(i))throw new oe("plugincollection-plugin-name-conflict",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:e});this._plugins.set(i,n)}}}class oV{config;plugins;locale;t;editors;static defaultConfig;static builtinPlugins;_contextOwner=null;constructor(e){const{translations:n,...i}=e||{};this.config=new KK(i,this.constructor.defaultConfig);const r=this.constructor.builtinPlugins;this.config.define("plugins",r),this.plugins=new rY(this,r);const o=this.config.get("language")||{};this.locale=new zRe({uiLanguage:typeof o=="string"?o:o.ui,contentLanguage:this.config.get("language.content"),translations:n}),this.t=this.locale.t,this.editors=new Er}initPlugins(){const e=this.config.get("plugins")||[],n=this.config.get("substitutePlugins")||[];for(const i of e.concat(n)){if(typeof i!="function")throw new oe("context-initplugins-constructor-only",null,{Plugin:i});if(i.isContextPlugin!==!0)throw new oe("context-initplugins-invalid-plugin",null,{Plugin:i})}return this.plugins.init(e,[],n)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,n){if(this._contextOwner)throw new oe("context-addeditor-private-context");this.editors.add(e),n&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const n of this.config.names())["plugins","removePlugins","extraPlugins"].includes(n)||(e[n]=this.config.get(n));return e}static create(e){return new Promise(n=>{const i=new this(e);n(i.initPlugins().then(()=>i))})}static get _throwErrorWhenUsedAsAPlugin(){return!0}}class bS extends Ln(){context;constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}static get isOfficialPlugin(){return!1}static get isPremiumPlugin(){return!1}}class yDe extends Qi{editor;constructor(e){super(),this.editor=e}set(e,n,i={}){if(typeof n=="string"){const r=n;n=(o,s)=>{this.editor.execute(r),s()}}super.set(e,n,i)}}const FT="contentEditing",sV="common";class wDe{keystrokeInfos=new Map;_editor;constructor(e){this._editor=e;const n=e.config.get("menuBar.isVisible"),i=e.locale.t;this.addKeystrokeInfoCategory({id:FT,label:i("Content editing keystrokes"),description:i("These keyboard shortcuts allow for quick access to content editing features.")});const r=[{label:i("Close contextual balloons, dropdowns, and dialogs"),keystroke:"Esc"},{label:i("Open the accessibility help dialog"),keystroke:"Alt+0"},{label:i("Move focus between form fields (inputs, buttons, etc.)"),keystroke:[["Tab"],["Shift+Tab"]]},{label:i("Move focus to the toolbar, navigate between toolbars"),keystroke:"Alt+F10",mayRequireFn:!0},{label:i("Navigate through the toolbar or menu bar"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]},{label:i("Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content."),keystroke:[["Enter"],["Space"]]}];n&&r.push({label:i("Move focus to the menu bar, navigate between menu bars"),keystroke:"Alt+F9",mayRequireFn:!0}),this.addKeystrokeInfoCategory({id:"navigation",label:i("User interface and content navigation keystrokes"),description:i("Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface."),groups:[{id:"common",keystrokes:r}]})}addKeystrokeInfoCategory({id:e,label:n,description:i,groups:r}){this.keystrokeInfos.set(e,{id:e,label:n,description:i,groups:new Map}),this.addKeystrokeInfoGroup({categoryId:e,id:sV}),r&&r.forEach(o=>{this.addKeystrokeInfoGroup({categoryId:e,...o})})}addKeystrokeInfoGroup({categoryId:e=FT,id:n,label:i,keystrokes:r}){const o=this.keystrokeInfos.get(e);if(!o)throw new oe("accessibility-unknown-keystroke-info-category",this._editor,{groupId:n,categoryId:e});o.groups.set(n,{id:n,label:i,keystrokes:r||[]})}addKeystrokeInfos({categoryId:e=FT,groupId:n=sV,keystrokes:i}){if(!this.keystrokeInfos.has(e))throw new oe("accessibility-unknown-keystroke-info-category",this._editor,{categoryId:e,keystrokes:i});const r=this.keystrokeInfos.get(e);if(!r.groups.has(n))throw new oe("accessibility-unknown-keystroke-info-group",this._editor,{groupId:n,categoryId:e,keystrokes:i});r.groups.get(n).keystrokes.push(...i)}}function _De(t){return{sessionId:EDe(),pageSessionId:xDe(),hostname:window.location.hostname,version:globalThis.CKEDITOR_VERSION,type:CDe(t),plugins:SDe(t.plugins),distribution:kDe(),env:TDe(),integration:Object.create(null),menuBar:{isVisible:!!t.config.get("menuBar.isVisible")},language:{ui:t.locale.uiLanguage,content:t.locale.contentLanguage},toolbar:{main:$T(t.config.get("toolbar")),block:$T(t.config.get("blockToolbar")),balloon:$T(t.config.get("balloonToolbar"))}}}function CDe(t){return Object.getPrototypeOf(t).constructor.editorName}function SDe(t){return Array.from(t).filter(([e])=>!!e.pluginName).map(([e])=>{const{pluginName:n,isContextPlugin:i,isOfficialPlugin:r,isPremiumPlugin:o}=e;return{isContext:!!i,isOfficial:!!r,isPremium:!!o,name:n}})}function $T(t){if(!t)return;const e=Array.isArray(t)?{items:t}:t,n=o(e.items||[]);return{isMultiline:n.includes("-"),shouldNotGroupWhenFull:!!e.shouldNotGroupWhenFull,items:r(n)};function r(s){return s.filter(a=>a!=="|"&&a!=="-")}function o(s){return s.flatMap(a=>typeof a=="string"?[a]:o(a.items))}}function kDe(){return{channel:window[Symbol.for("cke distribution")]||"sh"}}function TDe(){let t="unknown",e="unknown";return vt.isMac?t="mac":vt.isWindows?t="windows":vt.isiOS?t="ios":vt.isAndroid&&(t="android"),vt.isGecko?e="gecko":vt.isBlink?e="blink":vt.isSafari&&(e="safari"),{os:t,browser:e}}function EDe(){return localStorage.getItem("__ckeditor-session-id")||localStorage.setItem("__ckeditor-session-id",Ur()),localStorage.getItem("__ckeditor-session-id")}function xDe(){return Qe.window.CKEDITOR_PAGE_SESSION_ID=Qe.window.CKEDITOR_PAGE_SESSION_ID||Ur(),Qe.window.CKEDITOR_PAGE_SESSION_ID}class ADe extends Ln(){static get editorName(){return"Editor"}accessibility;commands;config;conversion;data;editing;locale;model;plugins;keystrokes;t;static defaultConfig;static builtinPlugins;_context;_readOnlyLocks;static get _throwErrorWhenUsedAsAPlugin(){return!0}constructor(e={}){if(super(),typeof e!="object"||Array.isArray(e))throw new oe("editor-config-invalid-type");if("sanitizeHtml"in e)throw new oe("editor-config-sanitizehtml-not-supported");const n=this.constructor,{translations:i,...r}=n.defaultConfig||{},{translations:o=i,...s}=e,a=e.language||r.language;this._context=e.context||new oV({language:a,translations:o}),this._context._addEditor(this,!e.context);const l=Array.from(n.builtinPlugins||[]);this.config=new KK(s,r),this.config.define("plugins",l),this.config.define(this._context._getEditorConfig()),c(this.config),this.plugins=new rY(this,l,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new bDe,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new D5e(this.config),this.on("change:isReadOnly",()=>{this.model.document.isReadOnly=this.isReadOnly});const u=new mMe;this.data=new FLe(this.model,u),this.editing=new pLe(this.model,u),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new zLe([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new yDe(this),this.keystrokes.listenTo(this.editing.view.document),this.accessibility=new wDe(this),d(this);function c(f){let h=f.get("licenseKey");if(!h&&window.CKEDITOR_GLOBAL_LICENSE_KEY&&(h=window.CKEDITOR_GLOBAL_LICENSE_KEY,f.set("licenseKey",h)),!h)throw new oe("license-key-missing")}function d(f){const h=f.config.get("licenseKey"),m=window[Symbol.for("cke distribution")]||"sh";function g(k,T){f.enableReadOnlyMode(Symbol("invalidLicense")),f._showLicenseError(k,T)}function v(k){return["exp","jti","vc"].every(E=>E in k)}function p(k){return Object.getOwnPropertyNames(k).sort().filter(x=>x!="vc"&&k[x]!=null).map(x=>k[x])}function b(k){const{hostname:T}=new URL(window.location.href);if(k.includes(T))return!0;const E=T.split(".");return k.filter(x=>x.includes("*")).map(x=>x.split(".")).filter(x=>x.length<=E.length).map(x=>Array(E.length-x.length).fill(x[0]==="*"?"*":"").concat(x)).some(x=>E.every((P,A)=>x[A]===P||x[A]==="*"))}function y(k){const T=k[0].toUpperCase()+k.slice(1),E=k==="evaluation"?"an":"a";console.info(`%cCKEditor 5 ${T} License`,"color: #ffffff; background: #743CCD; font-size: 14px; padding: 4px 8px; border-radius: 4px;"),console.warn(`⚠️ You are using ${E} ${k} license of CKEditor 5${k==="trial"?" which is for evaluation purposes only":""}. For production usage, please obtain a production license at https://portal.ckeditor.com/`)}if(h=="GPL"){m=="cloud"&&g("distributionChannel");return}const _=g4(h);if(!_){g("invalid");return}if(!v(_)){g("invalid");return}if(_.distributionChannel&&!li(_.distributionChannel).includes(m)){g("distributionChannel");return}if(jRe(p(_))!=_.vc.toLowerCase()){g("invalid");return}if(new Date(_.exp*1e3)<ZIe){g("expired");return}const S=_.licensedHosts;if(S&&S.length>0&&!b(S)){g("domainLimit");return}if(["evaluation","trial"].includes(_.licenseType)&&_.exp*1e3<Date.now()){g("expired");return}if(["development","evaluation","trial"].includes(_.licenseType)){const{licenseType:k}=_;window.CKEDITOR_WARNING_SUPPRESSIONS=window.CKEDITOR_WARNING_SUPPRESSIONS||{},window.CKEDITOR_WARNING_SUPPRESSIONS[k]||(y(k),window.CKEDITOR_WARNING_SUPPRESSIONS[k]=!0)}if(["evaluation","trial"].includes(_.licenseType)){const k=_.licenseType,T=setTimeout(()=>{g(`${k}Limit`)},6e5);f.on("destroy",()=>{clearTimeout(T)})}_.usageEndpoint&&f.once("ready",()=>{const k={requestId:Ur(),requestTime:Math.round(Date.now()/1e3),license:h,editor:PDe(f)};f._sendUsageRequest(_.usageEndpoint,k).then(T=>{const{status:E,message:x}=T;x&&console.warn(x),E!="ok"&&g("usageLimit")},()=>{YIe("license-key-validation-endpoint-not-reachable",{url:_.usageEndpoint})})},{priority:"high"})}}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new oe("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new oe("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),this._readOnlyLocks.size===1&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if(typeof e!="string"&&typeof e!="symbol")throw new oe("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),this._readOnlyLocks.size===0&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}setData(e){this.data.set(e)}getData(e){return this.data.get(e)}initPlugins(){const e=this.config,n=e.get("plugins"),i=e.get("removePlugins")||[],r=e.get("extraPlugins")||[],o=e.get("substitutePlugins")||[];return this.plugins.init(n.concat(r),i,o).then(a=>(s(this),a));function s(a){const l=a.config.get("licenseKey");if(l==="GPL")return;const u=g4(l);if(!u)return;const c=[...a.plugins].map(([d])=>d).find(d=>!d.pluginName||!d.licenseFeatureCode?!1:iMe(u,d.licenseFeatureCode));c&&(a.enableReadOnlyMode(Symbol("invalidLicense")),a._showLicenseError("pluginNotAllowed",c.pluginName))}}destroy(){let e=Promise.resolve();return this.state=="initializing"&&(e=new Promise(n=>this.once("ready",n))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(e,...n){try{return this.commands.execute(e,...n)}catch(i){oe.rethrowUnexpectedError(i,this)}}focus(){this.editing.view.focus()}static create(...e){throw new Error("This is an abstract method.")}static Context=oV;static EditorWatchdog=iY;static ContextWatchdog=pDe;_showLicenseError(e,n){setTimeout(()=>{if(e=="invalid")throw new oe("invalid-license-key");if(e=="expired")throw new oe("license-key-expired");if(e=="domainLimit")throw new oe("license-key-domain-limit");if(e=="pluginNotAllowed"){const i=n.replace(/(Editing|UI)$/,""),r=this.plugins.has(i);throw new oe("license-key-plugin-not-allowed",null,{pluginName:r?i:n})}if(e=="featureNotAllowed")throw new oe("license-key-feature-not-allowed",null,{featureName:n});if(e=="evaluationLimit")throw new oe("license-key-evaluation-limit");if(e=="trialLimit")throw new oe("license-key-trial-limit");if(e=="developmentLimit")throw new oe("license-key-development-limit");if(e=="usageLimit")throw new oe("license-key-usage-limit");if(e=="distributionChannel")throw new oe("license-key-invalid-distribution-channel")},0),this._showLicenseError=()=>{}}async _sendUsageRequest(e,n){const i=new Headers({"Content-Type":"application/json"}),r=await fetch(new URL(e),{method:"POST",headers:i,body:JSON.stringify(n)});if(!r.ok)throw new Error(`HTTP Response: ${r.status}`);return r.json()}}function PDe(t){const e=_De(t);function n(i,r){if(Ic(e,i)!==void 0)throw new oe("editor-usage-data-path-already-set",{path:i});LK(e,i,r)}return t.fire("collectUsageData",{setUsageData:n}),e}function IDe(t){if(!s1(t.updateSourceElement))throw new oe("attachtoform-missing-elementapi-interface",t);const e=t.sourceElement;if(RDe(e)&&e.form){let n;const i=e.form,r=()=>t.updateSourceElement();s1(i.submit)&&(n=i.submit,i.submit=()=>{r(),n.apply(i)}),i.addEventListener("submit",r),t.on("destroy",()=>{i.removeEventListener("submit",r),n&&(i.submit=n)})}}function RDe(t){return!!t&&t.tagName.toLowerCase()==="textarea"}function MDe(t){class e extends t{sourceElement;updateSourceElement(i){if(!this.sourceElement)throw new oe("editor-missing-sourceelement",this);const r=this.config.get("updateSourceElementOnDestroy"),o=this.sourceElement instanceof HTMLTextAreaElement;if(!r&&!o){o4(this.sourceElement,"");return}const s=typeof i=="string"?i:this.data.get();o4(this.sourceElement,s)}}return e}class m1 extends bS{_actions;static get pluginName(){return"PendingActions"}static get isOfficialPlugin(){return!0}init(){this.set("hasAny",!1),this._actions=new Er({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if(typeof e!="string")throw new oe("pendingactions-add-invalid-message",this);const n=new(Ln());return n.set("message",e),this._actions.add(n),this.hasAny=!0,n}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class ODe extends Ln(){total;_reader;_data;constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=n=>{this.loaded=n.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const n=this._reader;return this.total=e.size,new Promise((i,r)=>{n.onload=()=>{const o=n.result;this._data=o,i(o)},n.onerror=()=>{r("error")},n.onabort=()=>{r("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}class eu extends xe{loaders=new Er;_loadersMap=new Map;_pendingAction=null;static get pluginName(){return"FileRepository"}static get isOfficialPlugin(){return!0}static get requires(){return[m1]}init(){this.loaders.on("change",()=>this._updatePendingAction()),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,n)=>n?e/n*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return hn("filerepository-no-upload-adapter"),null;const n=new aV(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(n),this._loadersMap.set(e,n),e instanceof Promise&&n.file.then(i=>{this._loadersMap.set(i,n)}).catch(()=>{}),n.on("change:uploaded",()=>{let i=0;for(const r of this.loaders)i+=r.uploaded;this.uploaded=i}),n.on("change:uploadTotal",()=>{let i=0;for(const r of this.loaders)r.uploadTotal&&(i+=r.uploadTotal);this.uploadTotal=i}),n}destroyLoader(e){const n=e instanceof aV?e:this.getLoader(e);n._destroy(),this.loaders.remove(n),this._loadersMap.forEach((i,r)=>{i===n&&this._loadersMap.delete(r)})}_updatePendingAction(){const e=this.editor.plugins.get(m1);if(this.loaders.length){if(!this._pendingAction){const n=this.editor.t,i=r=>`${n("Upload in progress")} ${parseInt(r)}%.`;this._pendingAction=e.add(i(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else e.remove(this._pendingAction),this._pendingAction=null}}class aV extends Ln(){id;_filePromiseWrapper;_adapter;_reader;constructor(e,n){super(),this.id=Ur(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=n(this),this._reader=new ODe,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(i,r)=>r?i/r*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if(this.status!="idle")throw new oe("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if(this.status!=="reading")throw this.status;return this.status="idle",e}).catch(e=>{throw e==="aborted"?(this.status="aborted","aborted"):(this.status="error",this._reader.error?this._reader.error:e)})}upload(){if(this.status!="idle")throw new oe("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{throw this.status==="aborted"?"aborted":(this.status="error",e)})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?e=="reading"?this._reader.abort():e=="uploading"&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const n={};return n.promise=new Promise((i,r)=>{n.rejecter=r,n.isFulfilled=!1,e.then(o=>{n.isFulfilled=!0,i(o)}).catch(o=>{n.isFulfilled=!0,r(o)})}),n}}class LDe extends xe{static get requires(){return[eu]}static get pluginName(){return"Base64UploadAdapter"}static get licenseFeatureCode(){return"B64A"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){this.editor.plugins.get(eu).createUploadAdapter=e=>new DDe(e)}}let DDe=class{loader;reader;constructor(e){this.loader=e}upload(){return new Promise((e,n)=>{const i=this.reader=new window.FileReader;i.addEventListener("load",()=>{e({default:i.result})}),i.addEventListener("error",r=>{n(r)}),i.addEventListener("abort",()=>{n()}),this.loader.file.then(r=>{i.readAsDataURL(r)})})}abort(){this.reader.abort()}};var lV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 6.628a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3M8.5 9.125a.3.3 0 0 0-.253-.296L5.11 8.327a.75.75 0 1 1 .388-1.449l4.04.716c.267.072.624.08.893.009l4.066-.724a.75.75 0 1 1 .388 1.45l-3.132.5a.3.3 0 0 0-.253.296v1.357a.3.3 0 0 0 .018.102l1.615 4.438a.75.75 0 0 1-1.41.513l-1.35-3.71a.3.3 0 0 0-.281-.197h-.209a.3.3 0 0 0-.282.198l-1.35 3.711a.75.75 0 0 1-1.41-.513l1.64-4.509a.3.3 0 0 0 .019-.103z"/><path d="M10 18.5a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17m0 1.5c5.523 0 10-4.477 10-10S15.523 0 10 0 0 4.477 0 10s4.477 10 10 10" clip-rule="evenodd"/></svg>',NDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m9.239 13.938-2.88-1.663a.75.75 0 0 1 .75-1.3L9 12.067V4.75a.75.75 0 1 1 1.5 0v7.318l1.89-1.093a.75.75 0 0 1 .75 1.3l-2.879 1.663a.75.75 0 0 1-.511.187.75.75 0 0 1-.511-.187M4.25 17a.75.75 0 1 1 0-1.5h10.5a.75.75 0 0 1 0 1.5z"/></svg>',oY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m2.286 4c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.928a.75.75 0 1 0 0-1.5H5.036a.75.75 0 0 0-.75.75"/></svg>',sY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75"/></svg>',rO='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 8c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0 4c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m0-8c0 .414.336.75.75.75h9.929a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75"/></svg>',BDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.75 11.875a.75.75 0 0 1 .508.184l2.883 1.666a.75.75 0 0 1-.659 1.344l-.091-.044-1.892-1.093.001 4.318a.75.75 0 1 1-1.5 0v-4.317l-1.89 1.092a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .51-.187zM15.25 9a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM9.75.375a.75.75 0 0 1 .75.75v4.318l1.89-1.093.092-.045a.75.75 0 0 1 .659 1.344l-2.883 1.667a.75.75 0 0 1-.508.184.75.75 0 0 1-.511-.187L6.359 5.65a.75.75 0 0 1 .75-1.299L9 5.442V1.125a.75.75 0 0 1 .75-.75"/></svg>',aY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M18 3.75a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 8a.75.75 0 0 1-.75.75H2.75a.75.75 0 1 1 0-1.5h14.5a.75.75 0 0 1 .75.75m0 4a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75m0-8a.75.75 0 0 1-.75.75H7.321a.75.75 0 1 1 0-1.5h9.929a.75.75 0 0 1 .75.75"/></svg>',VDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m10.261 7.062 2.88 1.663a.75.75 0 0 1-.75 1.3L10.5 8.933v7.317a.75.75 0 1 1-1.5 0V8.932l-1.89 1.093a.75.75 0 0 1-.75-1.3l2.879-1.663a.75.75 0 0 1 .511-.187.75.75 0 0 1 .511.187M15.25 4a.75.75 0 1 1 0 1.5H4.75a.75.75 0 0 1 0-1.5z"/></svg>',lY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.187 17H5.773q-.956 0-1.364-.415-.41-.416-.409-1.323V4.738q0-.926.419-1.332.418-.405 1.354-.406h4.68q1.035 0 1.793.124.76.124 1.36.478.512.296.906.75a3.26 3.26 0 0 1 .808 2.162q0 2.102-2.167 3.075 2.846.879 2.847 3.421a3.76 3.76 0 0 1-2.296 3.504 6 6 0 0 1-1.517.377q-.857.11-2 .11zm-.217-6.217H7v4.087h3.069q2.965 0 2.965-2.072 0-1.061-.768-1.537-.768-.478-2.296-.478M7 5.13v3.619h2.606q1.093 0 1.69-.2a1.6 1.6 0 0 0 .91-.765q.247-.4.247-.897 0-1.06-.778-1.409-.778-.348-2.375-.348z"/></svg>',FDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0C1 4.784 1.777 4 2.75 4c.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75C1.784 7.5 1 6.723 1 5.75m6 9c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75m-6 0c0-.966.777-1.75 1.75-1.75.966 0 1.75.777 1.75 1.75 0 .966-.777 1.75-1.75 1.75-.966 0-1.75-.777-1.75-1.75"/></svg>',oO='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.591 10.177 4.243 4.242a1 1 0 0 1-1.415 1.415l-4.242-4.243-4.243 4.243a1 1 0 0 1-1.414-1.415l4.243-4.242L4.52 5.934A1 1 0 0 1 5.934 4.52l4.243 4.243 4.242-4.243a1 1 0 1 1 1.415 1.414z"/></svg>',uY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 16h9a1 1 0 0 1 0 2H2a1 1 0 0 1 0-2"/><path fill-opacity=".6" d="M17 1a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 1.5H3a.5.5 0 0 0-.492.41L2.5 3v9a.5.5 0 0 0 .41.492L3 12.5h14a.5.5 0 0 0 .492-.41L17.5 12V3a.5.5 0 0 0-.41-.492z"/></svg>',sO='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6.972 16.615a1 1 0 0 1-.744-.292l-4.596-4.596a1 1 0 1 1 1.414-1.414l3.926 3.926 9.937-9.937a1 1 0 0 1 1.414 1.415L7.717 16.323a1 1 0 0 1-.745.292"/></svg>',$De='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m12.5 5.7 5.2 3.9v1.3l-5.6 4c-.1.2-.3.2-.5.2-.3-.1-.6-.7-.6-1l.3-.4 4.7-3.5L11.5 7l-.2-.2c-.1-.3-.1-.6 0-.8.2-.2.5-.4.8-.4a.8.8 0 0 1 .4.1m-5.2 0L2 9.6v1.3l5.6 4c.1.2.3.2.5.2.3-.1.7-.7.6-1 0-.1 0-.3-.2-.4l-5-3.5L8.2 7l.2-.2c.1-.3.1-.6 0-.8-.2-.2-.5-.4-.8-.4a.8.8 0 0 0-.3.1"/></svg>',zDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.209 18.717A8.5 8.5 0 1 1 18.686 9.6h-.008l.002.12a3 3 0 0 1-2.866 2.997h-.268l-.046-.002v.002h-4.791a2 2 0 1 0 0 4 1 1 0 1 1-.128 1.992 9 9 0 0 1-.372.008m-3.918-7.01a1.25 1.25 0 1 0-2.415-.648 1.25 1.25 0 0 0 2.415.647ZM5.723 8.18a1.25 1.25 0 1 0 .647-2.414 1.25 1.25 0 0 0-.647 2.414M9.76 6.155a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415m4.028 1.759a1.25 1.25 0 1 0 .647-2.415 1.25 1.25 0 0 0-.647 2.415"/></svg>',HDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M16.935 5.328a2 2 0 0 1 0 2.829l-7.778 7.778a2 2 0 0 1-2.829 0L3.5 13.107a1.999 1.999 0 1 1 2.828-2.829l.707.707a1 1 0 0 0 1.414 0l5.658-5.657a2 2 0 0 1 2.828 0" class="ck-icon__fill"/><path d="M14.814 6.035 8.448 12.4a1 1 0 0 1-1.414 0l-1.413-1.415A1 1 0 1 0 4.207 12.4l2.829 2.829a1 1 0 0 0 1.414 0l7.778-7.778a1 1 0 1 0-1.414-1.415z"/></svg>',UDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5z"/><path fill-opacity=".256" d="M1 1h14v14H1z"/><g class="ck-icon__selected-indicator"><path d="M7 0h2v1H7zM0 7h1v2H0zm15 0h1v2h-1zm-8 8h2v1H7z"/><path fill-opacity=".254" d="M1 1h14v14H1z"/></g></svg>',WDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M5 3.25a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0M5 10a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m-7 6.75a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0m7 0a1.5 1.5 0 1 0 3 0 1.5 1.5 0 1 0-3 0"/></svg>',yS='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10"><path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136z"/></svg>',qDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m8.636 9.531-2.758 3.94a.5.5 0 0 0 .122.696l3.224 2.284h1.314l2.636-3.736L8.636 9.53zm.288 8.451L5.14 15.396a2 2 0 0 1-.491-2.786l6.673-9.53a2 2 0 0 1 2.785-.49l3.742 2.62a2 2 0 0 1 .491 2.785l-7.269 10.053z"/><path d="M4 18h5.523v-1H4zm-2 0h1v-1H2z"/></svg>',jDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M4 2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m8.38 9.262H7.62L10 5.506zm.532 1.285L14.34 16h1.426L10.804 4H9.196L4.234 16H5.66l1.428-3.453z"/></svg>',KDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M12.4 10.3 10 4.5l-2.4 5.8zm.5 1.2H7.1L5.7 15H4.2l5-12h1.6l5 12h-1.5L13 11.5zm3.1 7H4a1 1 0 0 1 0-2h12a1 1 0 0 1 0 2"/></svg>',uV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663zm7.55 2.279.779-.779.707.707-2.265 2.265-2.193-2.265.707-.707.765.765V4.825q0-.063.002-.123l-.77.77-.707-.707L17.207 2.5l2.265 2.265-.707.707-.782-.782q.003.065.003.135z"/></svg>',GDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6.66 9.118a.693.693 0 0 1 .956.032l3.65 3.411 2.422-2.238a.695.695 0 0 1 .945 0L17.5 13.6V2.5h-15v11.1zM17.8 1c.652 0 1.2.47 1.2 1.1v14.362c0 .64-.532 1.038-1.184 1.038H2.184C1.532 17.5 1 17.103 1 16.462V2.1C1 1.47 1.537 1 2.2 1zm-5.655 6a2.13 2.13 0 0 1 .157-2.364A2.133 2.133 0 1 1 12.145 7"/></svg>',YDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M1.201 1C.538 1 0 1.47 0 2.1v14.363c0 .64.534 1.037 1.186 1.037h9.494a3 3 0 0 1-.414-.287 3 3 0 0 1-1.055-2.03 3 3 0 0 1 .693-2.185l.383-.455-.02.018-3.65-3.41a.695.695 0 0 0-.957-.034L1.5 13.6V2.5h15v5.535a2.97 2.97 0 0 1 1.412.932l.088.105V2.1c0-.63-.547-1.1-1.2-1.1zm11.713 2.803a2.146 2.146 0 0 0-2.049 1.992 2.14 2.14 0 0 0 1.28 2.096 2.13 2.13 0 0 0 2.644-3.11 2.13 2.13 0 0 0-1.875-.978"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79"/><path d="M15.522 19.1a.79.79 0 0 0 .79-.79v-5.373l2.059 2.455a.79.79 0 1 0 1.211-1.015l-3.352-3.995a.79.79 0 0 0-.995-.179.8.8 0 0 0-.299.221l-3.35 3.99a.79.79 0 1 0 1.21 1.017l1.936-2.306v5.185c0 .436.353.79.79.79"/></svg>',XDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M19 4.5 14 0H3v12.673l.868-1.041c.185-.222.4-.402.632-.54V1.5h8v5h5v7.626a2.24 2.24 0 0 1 1.5.822zM14 5V2l3.3 3zm-3.692 12.5q.093.157.213.303L11.52 19H8v-.876a2.24 2.24 0 0 0 1.82-.624zm7.518-.657a.75.75 0 0 0-1.152-.96L15.5 17.29V12H14v5.29l-1.174-1.408a.75.75 0 0 0-1.152.96l2.346 2.816a.95.95 0 0 0 1.46 0zm-15.056-.38a.75.75 0 0 1-.096-1.056l2.346-2.815a.95.95 0 0 1 1.46 0l2.346 2.815a.75.75 0 1 1-1.152.96L6.5 14.96V20H5v-5.04l-1.174 1.408a.75.75 0 0 1-1.056.096Z"/></svg>',cV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5M1.632 6.95 5.02 9.358a.4.4 0 0 1-.013.661l-3.39 2.207A.4.4 0 0 1 1 11.892V7.275a.4.4 0 0 1 .632-.326z"/></svg>',JDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m9.586 14.633.021.004q-.054.502.393.962.123.125.274.201h1.474a.6.6 0 1 1 0 1.2H5.304a.6.6 0 0 1 0-1.2h1.15q.711-.106 1.005-.334.235-.182.404-.597l2.416-9.55a1.05 1.05 0 0 0-.281-.823 1.1 1.1 0 0 0-.442-.296H8.15a.6.6 0 0 1 0-1.2h6.443a.6.6 0 1 1 0 1.2h-1.195q-.564.084-.823.296-.323.263-.623.79z"/></svg>',ZDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184"/></svg>',QDe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 42"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098s-4.538-.083-4.538-1.678 2.032-3.43 4.538-4.098c.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556L49 17zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.99 1.99 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17m29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155zM20.6 21.375v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616v-1.616zm0 3.231v1.616h1.616V37.53zm24.233-16.155v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615v-1.616zm0 3.231v1.616h1.615V37.53zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35z"/></svg>',eNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 20"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-14.24 1h13.008v12H4.467zm-2.208 1h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003v1H2.288zm16.448 0h1.003v1h-1.003zm-16.448 2h1.003l-.029 1h-.974zm16.448 0h1.003v1h-1.003zm-16.448 2h.974v1h-.974zm16.448 0h1.003v1h-1.003z"/><path d="M8.374 6.648a.4.4 0 0 1 .395-.4.4.4 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35z"/></svg>',cY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M8.537 14.813a.888.888 0 1 1-1.254-1.255L10.84 10 7.283 6.442a.888.888 0 1 1 1.254-1.255L12.74 9.39a.888.888 0 0 1-.16 1.382z"/></svg>',tNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7 5.75c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M3.5 3v5H2V3.7H1v-1h2.5zM.343 17.857l2.59-3.257H2.92a.6.6 0 1 0-1.04 0H.302a2 2 0 1 1 3.995 0h-.001q-.073.607-.333.988-.263.381-1.244 1.312H4.3v1h-4zM7 14.75a.75.75 0 0 1 .75-.75h9.5a.75.75 0 1 1 0 1.5h-9.5a.75.75 0 0 1-.75-.75"/></svg>',AA='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M15.003 7v5.5a1 1 0 0 1-1 1H5.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H6.5V12h6.997z"/></svg>',nNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M18 7v5.5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1m-1.505.5H3.504V12h12.991z"/></svg>',dY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zm0-3H18v1.5h-4.5zm0-3H18v1.5h-4.5zM2 15h16v1.5H2z" opacity=".5"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z"/></svg>',PA='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2zm0-9h5v1.5H2zm0 3h5v1.5H2zm0 3h5v1.5H2z" opacity=".5"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z"/></svg>',fY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm11.5 9H18v1.5h-4.5zM2 15h16v1.5H2z" opacity=".5"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z"/></svg>',hY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M12.003 7v5.5a1 1 0 0 1-1 1H2.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H3.5V12h6.997z"/></svg>',mY='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3h16v1.5H2zm0 12h16v1.5H2z" opacity=".5"/><path d="M18.003 7v5.5a1 1 0 0 1-1 1H8.996a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h8.007a1 1 0 0 1 1 1m-1.506.5H9.5V12h6.997z"/></svg>',iNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.95 1.43a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h.75v6.3H.95a.95.95 0 0 0-.95.95v3.1a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-.65h1.932l1.539-1.5H5v-.95a.95.95 0 0 0-.95-.95H3.2v-6.3h.85A.95.95 0 0 0 5 5.48v-.55h10v.55a.95.95 0 0 0 .95.95h3.1a.95.95 0 0 0 .95-.95v-3.1a.95.95 0 0 0-.95-.95h-3.1a.95.95 0 0 0-.95.95v1.05H5V2.38a.95.95 0 0 0-.95-.95zm.55 3.5v-2h2v2zm0 9.3v2h2v-2zm15-11.3v2h2v-2zM8.139 20.004v-2.388l7.045-7.048 2.391 2.391-7.046 7.046zm11.421-9.101a.6.6 0 0 1-.138.206l-1.165 1.168-2.391-2.391 1.167-1.163a.6.6 0 0 1 .206-.138.6.6 0 0 1 .243-.049.63.63 0 0 1 .449.187l1.491 1.488c.059.059.108.129.138.206s.049.16.049.243a.6.6 0 0 1-.049.243"/></svg>',rNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 17v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15.5v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm-19-2v1H0v-1zm19 0v1h-1v-1zm0-2v1h-1v-1zm-19 0v1H0v-1zM14.5 2v1h-1V2zm2 0v1h-1V2zm2 0v1h-1V2zm-8 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm-2 0v1h-1V2zm8 0v1h-1V2zm-10 0v1h-1V2z"/><path d="M18.095 2H1.905C.853 2 0 2.895 0 4v12c0 1.105.853 2 1.905 2h16.19C19.147 18 20 17.105 20 16V4c0-1.105-.853-2-1.905-2m0 1.5c.263 0 .476.224.476.5v12c0 .276-.213.5-.476.5H1.905a.49.49 0 0 1-.476-.5V4c0-.276.213-.5.476-.5z"/></svg>',oNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z"/><path d="M13 5.5H2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2v-8a2 2 0 0 0-2-2M13 7a.5.5 0 0 1 .5.5v8a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-8A.5.5 0 0 1 2 7z"/></svg>',sNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z"/><path d="M10 7.5H2a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2M10 9a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-6A.5.5 0 0 1 2 9z"/></svg>',aNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 16.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zM1 15v1H0v-1zm19 0v1h-1v-1zM1 13v1H0v-1zm19 0v1h-1v-1zM1 11v1H0v-1zm19 0v1h-1v-1zM1 9v1H0V9zm19 0v1h-1V9zM1 7v1H0V7zm19 0v1h-1V7zM1 5v1H0V5zm19 0v1h-1V5zm0-2v1h-1V3zM1 3v1H0V3zm13.5-1.5v1h-1v-1zm2 0v1h-1v-1zm2 0v1h-1v-1zm-8 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm-2 0v1h-1v-1zm8 0v1h-1v-1zm-10 0v1h-1v-1z"/><path d="M7 9.5H2a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2M7 11a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-4A.5.5 0 0 1 2 11z"/></svg>',dV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2 3.75c0 .414.336.75.75.75h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 0 0-.75.75m5 6c0 .414.336.75.75.75h9.5a.75.75 0 1 0 0-1.5h-9.5a.75.75 0 0 0-.75.75M2.75 16.5h14.5a.75.75 0 1 0 0-1.5H2.75a.75.75 0 1 0 0 1.5m1.618-9.55L.98 9.358a.4.4 0 0 0 .013.661l3.39 2.207A.4.4 0 0 0 5 11.892V7.275a.4.4 0 0 0-.632-.326z"/></svg>',lNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10.5 5.5H7v5h3.5a2.5 2.5 0 1 0 0-5M5 3h6.5v.025a5 5 0 0 1 0 9.95V13H7v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"/></svg>',uNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m7.3 17.37-.061.088a1.52 1.52 0 0 1-.934.535l-4.178.663-.806-4.153a1.5 1.5 0 0 1 .187-1.058l.056-.086L8.77 2.639c.958-1.351 2.803-1.076 4.296-.03 1.497 1.047 2.387 2.693 1.433 4.055zM9.14 4.728l-5.545 8.346 3.277 2.294 5.544-8.346zM6.07 16.512l-3.276-2.295.53 2.73zM9.994 3.506 13.271 5.8c.316-.452-.16-1.333-1.065-1.966-.905-.634-1.895-.78-2.212-.328M8 18.5 9.375 17H19v1.5z"/></svg>',cNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M6.999 2H15a1 1 0 0 1 0 2h-1.004v13a1 1 0 1 1-2 0V4H8.999v13a1 1 0 1 1-2 0v-7A4 4 0 0 1 3 6a4 4 0 0 1 3.999-4"/></svg>',dNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M10 2a1 1 0 0 0-1 1v6H3a1 1 0 1 0 0 2h6v6a1 1 0 1 0 2 0v-6h6a1 1 0 1 0 0-2h-6V3a1 1 0 0 0-1-1"/></svg>',pg='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M11.463 5.187a.888.888 0 1 1 1.254 1.255L9.16 10l3.557 3.557a.888.888 0 1 1-1.254 1.255L7.26 10.61a.888.888 0 0 1 .16-1.382l4.043-4.042z"/></svg>',fNe=`<svg xmlns="http://www.w3.org/2000/svg" width="53" height="10" viewBox="0 0 53 10"><path fill="#1C2331" d="M31.724 1.492a15.139 15.139 0 0 0 .045 1.16 2.434 2.434 0 0 0-.687-.34 3.68 3.68 0 0 0-1.103-.166 2.332 2.332 0 0 0-1.14.255 1.549 1.549 0 0 0-.686.87c-.15.41-.225.98-.225 1.712 0 .939.148 1.659.444 2.161.297.503.792.754 1.487.754.452.015.9-.094 1.294-.316.296-.174.557-.4.771-.669l.14.852h1.282V.007h-1.623v1.485ZM31 6.496a1.77 1.77 0 0 1-.494.061.964.964 0 0 1-.521-.127.758.758 0 0 1-.296-.466 3.984 3.984 0 0 1-.093-.992 4.208 4.208 0 0 1 .098-1.052.753.753 0 0 1 .307-.477 1.08 1.08 0 0 1 .55-.122c.233-.004.466.026.69.089l.483.144v2.553c-.11.076-.213.143-.307.2a1.73 1.73 0 0 1-.417.189ZM35.68 0l-.702.004c-.322.002-.482.168-.48.497l.004.581c.002.33.164.493.486.49l.702-.004c.322-.002.481-.167.48-.496L36.165.49c-.002-.33-.164-.493-.486-.491ZM36.145 2.313l-1.612.01.034 5.482 1.613-.01-.035-5.482ZM39.623.79 37.989.8 38 2.306l-.946.056.006 1.009.949-.006.024 2.983c.003.476.143.844.419 1.106.275.26.658.39 1.148.387.132 0 .293-.01.483-.03.19-.02.38-.046.57-.08.163-.028.324-.068.482-.119l-.183-1.095-.702.004a.664.664 0 0 1-.456-.123.553.553 0 0 1-.14-.422l-.016-2.621 1.513-.01-.006-1.064-1.514.01-.01-1.503ZM46.226 2.388c-.41-.184-.956-.274-1.636-.27-.673.004-1.215.101-1.627.29-.402.179-.72.505-.888.91-.18.419-.268.979-.264 1.68.004.688.1 1.24.285 1.655.172.404.495.724.9.894.414.18.957.268 1.63.264.68-.004 1.224-.099 1.632-.284.4-.176.714-.501.878-.905.176-.418.263-.971.258-1.658-.004-.702-.097-1.261-.28-1.677a1.696 1.696 0 0 0-.888-.9Zm-.613 3.607a.77.77 0 0 1-.337.501 1.649 1.649 0 0 1-1.317.009.776.776 0 0 1-.343-.497 4.066 4.066 0 0 1-.105-1.02 4.136 4.136 0 0 1 .092-1.03.786.786 0 0 1 .337-.507 1.59 1.59 0 0 1 1.316-.008.79.79 0 0 1 .344.502c.078.337.113.683.105 1.03.012.343-.019.685-.092 1.02ZM52.114 2.07a2.67 2.67 0 0 0-1.128.278c-.39.191-.752.437-1.072.73l-.157-.846-1.273.008.036 5.572 1.623-.01-.024-3.78c.35-.124.646-.22.887-.286.26-.075.53-.114.8-.118l.45-.003.144-1.546-.286.001ZM22.083 7.426l-1.576-2.532a2.137 2.137 0 0 0-.172-.253 1.95 1.95 0 0 0-.304-.29.138.138 0 0 1 .042-.04 1.7 1.7 0 0 0 .328-.374l1.75-2.71c.01-.015.025-.028.024-.048-.01-.01-.021-.007-.031-.007L20.49 1.17a.078.078 0 0 0-.075.045l-.868 1.384c-.23.366-.46.732-.688 1.099a.108.108 0 0 1-.112.06c-.098-.005-.196-.001-.294-.002-.018 0-.038.006-.055-.007.002-.02.002-.039.005-.058a4.6 4.6 0 0 0 .046-.701V1.203c0-.02-.009-.032-.03-.03h-.033L16.93 1.17c-.084 0-.073-.01-.073.076v6.491c-.001.018.006.028.025.027h1.494c.083 0 .072.007.072-.071v-2.19c0-.055-.003-.11-.004-.166a3.366 3.366 0 0 0-.05-.417h.06c.104 0 .209.002.313-.002a.082.082 0 0 1 .084.05c.535.913 1.07 1.824 1.607 2.736a.104.104 0 0 0 .103.062c.554-.003 1.107-.002 1.66-.002l.069-.003-.019-.032-.188-.304ZM27.112 6.555c-.005-.08-.004-.08-.082-.08h-2.414c-.053 0-.106-.003-.159-.011a.279.279 0 0 1-.246-.209.558.558 0 0 1-.022-.15c0-.382 0-.762-.002-1.143 0-.032.007-.049.042-.044h2.504c.029.003.037-.012.034-.038V3.814c0-.089.013-.078-.076-.078h-2.44c-.07 0-.062.003-.062-.06v-.837c0-.047.004-.093.013-.14a.283.283 0 0 1 .241-.246.717.717 0 0 1 .146-.011h2.484c.024.002.035-.009.036-.033l.003-.038.03-.496c.01-.183.024-.365.034-.548.005-.085.003-.087-.082-.094-.218-.018-.437-.038-.655-.05a17.845 17.845 0 0 0-.657-.026 72.994 72.994 0 0 0-1.756-.016 1.7 1.7 0 0 0-.471.064 1.286 1.286 0 0 0-.817.655c-.099.196-.149.413-.145.633v3.875c0 .072.003.144.011.216a1.27 1.27 0 0 0 .711 1.029c.228.113.48.167.734.158.757-.005 1.515.002 2.272-.042.274-.016.548-.034.82-.053.03-.002.043-.008.04-.041-.008-.104-.012-.208-.019-.312a69.964 69.964 0 0 1-.05-.768ZM16.14 7.415l-.127-1.075c-.004-.03-.014-.04-.044-.037a13.125 13.125 0 0 1-.998.073c-.336.01-.672.02-1.008.016-.116-.001-.233-.014-.347-.039a.746.746 0 0 1-.45-.262c-.075-.1-.132-.211-.167-.33a3.324 3.324 0 0 1-.126-.773 9.113 9.113 0 0 1-.015-.749c0-.285.022-.57.065-.852.023-.158.066-.312.127-.46a.728.728 0 0 1 .518-.443 1.64 1.64 0 0 1 .397-.048c.628-.001 1.255.003 1.882.05.022.001.033-.006.036-.026l.003-.031.06-.55c.019-.177.036-.355.057-.532.004-.034-.005-.046-.04-.056a5.595 5.595 0 0 0-1.213-.21 10.783 10.783 0 0 0-.708-.02c-.24-.003-.48.01-.719.041a3.477 3.477 0 0 0-.625.14 1.912 1.912 0 0 0-.807.497c-.185.2-.33.433-.424.688a4.311 4.311 0 0 0-.24 1.096c-.031.286-.045.572-.042.86-.006.43.024.86.091 1.286.04.25.104.497.193.734.098.279.26.53.473.734.214.205.473.358.756.446.344.11.702.17 1.063.177a8.505 8.505 0 0 0 1.578-.083 6.11 6.11 0 0 0 .766-.18c.03-.008.047-.023.037-.057a.157.157 0 0 1-.003-.025Z"/><path fill="#AFE229" d="M6.016 6.69a1.592 1.592 0 0 0-.614.21c-.23.132-.422.32-.56.546-.044.072-.287.539-.287.539l-.836 1.528.009.006c.038.025.08.046.123.063.127.046.26.07.395.073.505.023 1.011-.007 1.517-.003.29.009.58.002.869-.022a.886.886 0 0 0 .395-.116.962.962 0 0 0 .312-.286c.056-.083.114-.163.164-.249.24-.408.48-.816.718-1.226.075-.128.148-.257.222-.386l.112-.192a1.07 1.07 0 0 0 .153-.518l-1.304.023s-1.258-.005-1.388.01Z"/><path fill="#771BFF" d="m2.848 9.044.76-1.39.184-.352c-.124-.067-.245-.14-.367-.21-.346-.204-.706-.384-1.045-.6a.984.984 0 0 1-.244-.207c-.108-.134-.136-.294-.144-.46-.021-.409-.002-.818-.009-1.227-.003-.195 0-.39.003-.585.004-.322.153-.553.427-.713l.833-.488c.22-.13.44-.257.662-.385.05-.029.105-.052.158-.077.272-.128.519-.047.76.085l.044.028c.123.06.242.125.358.196.318.178.635.357.952.537.095.056.187.117.275.184.194.144.254.35.266.578.016.284.007.569.006.853-.001.28.004.558 0 .838.592-.003 1.259 0 1.259 0l.723-.013c-.003-.292-.007-.584-.007-.876 0-.524.015-1.048-.016-1.571-.024-.42-.135-.8-.492-1.067a5.02 5.02 0 0 0-.506-.339A400.52 400.52 0 0 0 5.94.787C5.722.664 5.513.524 5.282.423 5.255.406 5.228.388 5.2.373 4.758.126 4.305-.026 3.807.21c-.097.046-.197.087-.29.14A699.896 699.896 0 0 0 .783 1.948c-.501.294-.773.717-.778 1.31-.004.36-.009.718-.001 1.077.016.754-.017 1.508.024 2.261.016.304.07.6.269.848.127.15.279.28.448.382.622.4 1.283.734 1.92 1.11l.183.109Z"/></svg>
`,hNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3 10.423a6.5 6.5 0 0 1 6.056-6.408l.038.67C6.448 5.423 5.354 7.663 5.22 10H9c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003zm8 0a6.5 6.5 0 0 1 6.056-6.408l.038.67c-2.646.739-3.74 2.979-3.873 5.315H17c.552 0 .5.432.5.986v4.511c0 .554-.448.503-1 .503h-5c-.552 0-.5-.449-.5-1.003z"/></svg>',fV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m14.958 9.367-2.189 1.837a.75.75 0 0 0 .965 1.149l3.788-3.18a.75.75 0 0 0 .21-.284.75.75 0 0 0-.17-.945L13.77 4.762a.75.75 0 1 0-.964 1.15l2.331 1.955H6.22A.8.8 0 0 0 6 7.9a4 4 0 1 0 1.477 7.718l-.344-1.489A2.5 2.5 0 1 1 6.039 9.4l-.008-.032z"/></svg>',mNe='<svg viewBox="0 0 10 8" xmlns="http://www.w3.org/2000/svg"><path d="M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038"/></svg>',gNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M.75 15.5a.75.75 0 0 1 .75.75V18l.008.09A.5.5 0 0 0 2 18.5h1.75a.75.75 0 1 1 0 1.5H1.5l-.144-.007a1.5 1.5 0 0 1-1.35-1.349L0 18.5v-2.25a.75.75 0 0 1 .75-.75m18.5 0a.75.75 0 0 1 .75.75v2.25l-.007.144a1.5 1.5 0 0 1-1.349 1.35L18.5 20h-2.25a.75.75 0 1 1 0-1.5H18a.5.5 0 0 0 .492-.41L18.5 18v-1.75a.75.75 0 0 1 .75-.75m-10.45 3c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2v-1.1c0-.11.09-.2.2-.2zm.45-5.5a.75.75 0 1 1 0 1.5h-8.5a.75.75 0 1 1 0-1.5zM1.3 11c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2v-1.6c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5H4.75a.75.75 0 1 1 0-1.5zM1.3 7c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2H.2a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm18.5 0c.11 0 .2.09.2.2v1.6a.2.2 0 0 1-.2.2h-1.1a.2.2 0 0 1-.2-.2V7.2c0-.11.09-.2.2-.2zm-4.55-2a.75.75 0 1 1 0 1.5h-2.5a.75.75 0 1 1 0-1.5zm-5 0a.75.75 0 1 1 0 1.5h-5.5a.75.75 0 0 1 0-1.5zm-6.5-5a.75.75 0 0 1 0 1.5H2a.5.5 0 0 0-.492.41L1.5 2v1.75a.75.75 0 0 1-1.5 0V1.5l.007-.144A1.5 1.5 0 0 1 1.356.006L1.5 0zM18.5 0l.144.007a1.5 1.5 0 0 1 1.35 1.349L20 1.5v2.25a.75.75 0 1 1-1.5 0V2l-.008-.09A.5.5 0 0 0 18 1.5h-1.75a.75.75 0 1 1 0-1.5zM8.8 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2H7.2a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2zm4 0c.11 0 .2.09.2.2v1.1a.2.2 0 0 1-.2.2h-1.6a.2.2 0 0 1-.2-.2V.2c0-.11.09-.2.2-.2z"/></svg>',pNe=`<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.734 6.375H1.75a.75.75 0 0 1 0-1.5h1.984a2.626 2.626 0 0 1 5.032 0h9.48a.75.75 0 0 1 0 1.5h-9.48a2.626 2.626 0 0 1-5.032 0Zm1.141-.75a1.375 1.375 0 1 1 2.75 0 1.375 1.375 0 0 1-2.75 0ZM16.263 14.625h1.983a.75.75 0 0 1 0 1.5h-1.983a2.626 2.626 0 0 1-5.033 0H1.75a.75.75 0 0 1 0-1.5h9.48a2.626 2.626 0 0 1 5.033 0Zm-1.142.75a1.375 1.375 0 1 1-2.75 0 1.375 1.375 0 0 1 2.75 0Z"/></svg>
`,vNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m12.5 0 5 4.5v15.003h-16V0zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692z"/><path d="M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0"/></svg>',bNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M7 16.4c-.8-.4-1.5-.9-2.2-1.5a.6.6 0 0 1-.2-.5l.3-.6h1c1 1.2 2.1 1.7 3.7 1.7 1 0 1.8-.3 2.3-.6.6-.4.6-1.2.6-1.3.2-1.2-.9-2.1-.9-2.1h2.1c.3.7.4 1.2.4 1.7v.8l-.6 1.2c-.6.8-1.1 1-1.6 1.2a6 6 0 0 1-2.4.6c-1 0-1.8-.3-2.5-.6M6.8 9 6 8.3c-.4-.5-.5-.8-.5-1.6 0-.7.1-1.3.5-1.8.4-.6 1-1 1.6-1.3a6.3 6.3 0 0 1 4.7 0 4 4 0 0 1 1.7 1l.3.7c0 .1.2.4-.2.7-.4.2-.9.1-1 0a3 3 0 0 0-1.2-1c-.4-.2-1-.3-2-.4-.7 0-1.4.2-2 .6-.8.6-1 .8-1 1.5 0 .8.5 1 1.2 1.5.6.4 1.1.7 1.9 1H6.8z"/><path d="M3 10.5V9h14v1.5z"/></svg>',yNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m7.03 10.349 3.818-3.819a.8.8 0 1 1 1.132 1.132L8.16 11.48l3.819 3.818a.8.8 0 1 1-1.132 1.132L7.03 12.61l-3.818 3.82a.8.8 0 1 1-1.132-1.132L5.9 11.48 2.08 7.662A.8.8 0 1 1 3.212 6.53zm8.147 7.829h2.549q.38 0 .58.152a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197a.62.62 0 0 1-.205-.463q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553t.405-.57.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646c.3-.289.454-.349.762-.467a3 3 0 0 1 1.081-.178q.747 0 1.274.228a1.92 1.92 0 0 1 1.004 1.032 1.98 1.98 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.584-1.008.906a3 3 0 0 0-.24.309z"/></svg>',wNe='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><path d="m7.184 10.353 3.818-3.819a.8.8 0 0 1 1.132 1.132l-3.82 3.818 3.82 3.818a.802.802 0 0 1-.873 1.306.8.8 0 0 1-.26-.174l-3.817-3.82-3.818 3.82a.8.8 0 0 1-1.305-.26.8.8 0 0 1 .173-.872l3.82-3.818-3.82-3.818a.8.8 0 0 1 1.132-1.132l3.818 3.82M15.68 6.88h2.549q.38 0 .58.153a.49.49 0 0 1 .201.413.54.54 0 0 1-.159.393q-.158.162-.48.162h-3.594q-.367 0-.572-.197A.62.62 0 0 1 14 7.34q0-.171.132-.453a1.6 1.6 0 0 1 .288-.444q.65-.654 1.172-1.122t.747-.615q.401-.275.667-.553.266-.277.405-.57.14-.291.139-.57a1.01 1.01 0 0 0-.554-.917 1.2 1.2 0 0 0-.56-.133q-.639 0-1.005.546a2.3 2.3 0 0 0-.164.39 1.6 1.6 0 0 1-.258.488q-.144.17-.423.17a.56.56 0 0 1-.405-.156.57.57 0 0 1-.161-.427q0-.327.151-.683.152-.357.452-.646t.762-.467A3 3 0 0 1 16.466 1q.747 0 1.274.228c.456.2.816.57 1.004 1.032a1.99 1.99 0 0 1-.156 1.794q-.3.48-.613.754-.312.273-1.048.857-.735.583-1.008.906-.131.146-.24.309z"/></svg>',_Ne='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5zM2 12h5V8H2zm10-4H8v4h4zM2 2v5h5V2zm0 16h5v-5H2zM13 7h5V2h-5zM8 2v5h4V2z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43zM13 6a1 1 0 0 1 1 1v3.172a2 2 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.98 1.98 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1zm-1 2H8v4h4z"/></svg>',CNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z" opacity=".6"/><path d="M18 7v1H2V7zm0 5v1H2v-1z" opacity=".6"/><path d="M14 1v18a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1m-2 1H8v4h4zm0 6H8v4h4zm0 6H8v4h4z"/></svg>',SNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z" opacity=".6"/><path d="M7 2h1v16H7zm5 0h1v7h-1zm6 5v1H2V7zM8 12v1H2v-1z" opacity=".6"/><path d="M7 7h12a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1m1 2v9h10V9z"/></svg>',kNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M2.5 1h15A1.5 1.5 0 0 1 19 2.5v15a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1M2 2v16h16V2z" opacity=".6"/><path d="M7 2h1v16H7zm5 0h1v16h-1z" opacity=".6"/><path d="M1 6h18a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1m1 2v4h4V8zm6 0v4h4V8zm6 0v4h4V8z"/></svg>',hV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3 5.5v3h4v-3zm0 4v3h4v-3zm0 4v3h4v-3zm5 3h4v-3H8zm5 0h4v-3h-4zm4-4v-3h-4v3zm0-4v-3h-4v3zm1.5 8A1.5 1.5 0 0 1 17 18H3a1.5 1.5 0 0 1-1.5-1.5V3c.222-.863 1.068-1.5 2-1.5h13c.932 0 1.778.637 2 1.5zm-6.5-4v-3H8v3zm0-4v-3H8v3z"/></svg>',TNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3.035 1C2.446 1 2 1.54 2 2.098V10.5h1.5v-8h13v8H18V2.098C18 1.539 17.48 1 16.9 1zm10.453 2.61a1.89 1.89 0 0 0-1.442.736 1.89 1.89 0 0 0 1.011 2.976 1.9 1.9 0 0 0 2.253-1.114 1.887 1.887 0 0 0-1.822-2.598M7.463 8.163a.6.6 0 0 0-.432.154L5.071 10.5h5.119L7.88 8.348a.63.63 0 0 0-.417-.185m6.236 1.059a.62.62 0 0 0-.42.164L12.07 10.5h2.969l-.92-1.113a.62.62 0 0 0-.42-.165M.91 11.5a.91.91 0 0 0-.91.912v6.877c0 .505.405.91.91.91h18.178a.91.91 0 0 0 .912-.91v-6.877a.91.91 0 0 0-.912-.912zM3.668 13h1.947l2.135 5.7H5.898l-.28-.946H3.601l-.278.945H1.516zm4.947 0h1.801v4.3h2.7v1.4h-4.5zm4.5 0h5.4v1.4h-1.798v4.3h-1.701v-4.3h-1.9zm-8.517 1.457-.614 2.059h1.262z"/></svg>',ENe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.816 11.5 7.038 4.785 4.261 11.5zm.62 1.5H3.641l-1.666 4.028H.312l5.789-14h1.875l5.789 14h-1.663z"/><path d="m12.09 17-.534-1.292.848-1.971.545 1.319L12.113 17zm1.142-5.187.545 1.319L15.5 9.13l1.858 4.316h-3.45l.398.965h3.467L18.887 17H20l-3.873-9h-1.254z"/></svg>',aO='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><circle cx="9.5" cy="4.5" r="1.5"/><circle cx="9.5" cy="10.5" r="1.5"/><circle cx="9.5" cy="16.5" r="1.5"/></svg>',xNe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M3 18v-1.5h14V18zm2.2-8V3.6c0-.4.4-.6.8-.6.3 0 .7.2.7.6v6.2c0 2 1.3 2.8 3.2 2.8s3.4-.9 3.4-2.9V3.6c0-.3.4-.5.8-.5.3 0 .7.2.7.5V10c0 2.7-2.2 4-4.9 4-2.6 0-4.7-1.2-4.7-4"/></svg>',mV='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m5.042 9.367 2.189 1.837a.75.75 0 0 1-.965 1.149l-3.788-3.18a.75.75 0 0 1-.21-.284.75.75 0 0 1 .17-.945L6.23 4.762a.75.75 0 1 1 .964 1.15L4.863 7.866h8.917A.8.8 0 0 1 14 7.9a4 4 0 1 1-1.477 7.718l.344-1.489a2.5 2.5 0 1 0 1.094-4.73l.008-.032z"/></svg>',ANe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="m11.077 15 .991-1.416a.75.75 0 1 1 1.229.86l-1.148 1.64a.8.8 0 0 1-.217.206 5.251 5.251 0 0 1-8.503-5.955.7.7 0 0 1 .12-.274l1.147-1.639a.75.75 0 1 1 1.228.86L4.933 10.7l.006.003a3.75 3.75 0 0 0 6.132 4.294zm5.494-5.335a.8.8 0 0 1-.12.274l-1.147 1.639a.75.75 0 1 1-1.228-.86l.86-1.23a3.75 3.75 0 0 0-6.144-4.301l-.86 1.229a.75.75 0 0 1-1.229-.86l1.148-1.64a.8.8 0 0 1 .217-.206 5.251 5.251 0 0 1 8.503 5.955m-4.563-2.532a.75.75 0 0 1 .184 1.045l-3.155 4.505a.75.75 0 1 1-1.229-.86l3.155-4.506a.75.75 0 0 1 1.045-.184m4.919 10.562-1.414 1.414a.75.75 0 1 1-1.06-1.06l1.414-1.415-1.415-1.414a.75.75 0 0 1 1.061-1.06l1.414 1.414 1.414-1.415a.75.75 0 0 1 1.061 1.061l-1.414 1.414 1.414 1.415a.75.75 0 0 1-1.06 1.06z"/></svg>';const IA={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(const t in IA)Object.freeze(IA[t]);const kf=Object.freeze(IA);var gV={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function pV(t){var e,n=[],i=1,r;if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(typeof t=="number")return{space:"rgb",values:[t>>>16,(t&65280)>>>8,t&255],alpha:1};if(t=String(t).toLowerCase(),kf[t])n=kf[t].slice(),r="rgb";else if(t==="transparent")i=0,r="rgb",n=[0,0,0];else if(t[0]==="#"){var o=t.slice(1),s=o.length,a=s<=4;i=1,a?(n=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],s===4&&(i=parseInt(o[3]+o[3],16)/255)):(n=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],s===8&&(i=parseInt(o[6]+o[7],16)/255)),n[0]||(n[0]=0),n[1]||(n[1]=0),n[2]||(n[2]=0),r="rgb"}else if(e=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(t)){var l=e[1];r=l.replace(/a$/,"");var u=r==="cmyk"?4:r==="gray"?1:3;n=e[2].trim().split(/\s*[,\/]\s*|\s+/),r==="color"&&(r=n.shift()),n=n.map(function(c,d){if(c[c.length-1]==="%")return c=parseFloat(c)/100,d===3?c:r==="rgb"?c*255:r[0]==="h"||r[0]==="l"&&!d?c*100:r==="lab"?c*125:r==="lch"?d<2?c*150:c*360:r[0]==="o"&&!d?c:r==="oklab"?c*.4:r==="oklch"?d<2?c*.4:c*360:c;if(r[d]==="h"||d===2&&r[r.length-1]==="h"){if(gV[c]!==void 0)return gV[c];if(c.endsWith("deg"))return parseFloat(c);if(c.endsWith("turn"))return parseFloat(c)*360;if(c.endsWith("grad"))return parseFloat(c)*360/400;if(c.endsWith("rad"))return parseFloat(c)*180/Math.PI}return c==="none"?0:parseFloat(c)}),i=n.length>u?n.pop():1}else/[0-9](?:\s|\/|,)/.test(t)&&(n=t.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),r=t.match(/([a-z])/ig)?.join("")?.toLowerCase()||"rgb");return{space:r,values:n,alpha:i}}const gY={};for(const t of Object.keys(kf))gY[kf[t]]=t;const at={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},lu=(6/29)**3;function mm(t){const e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function gm(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(const t of Object.keys(at)){if(!("channels"in at[t]))throw new Error("missing channels property: "+t);if(!("labels"in at[t]))throw new Error("missing channel labels property: "+t);if(at[t].labels.length!==at[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:n}=at[t];delete at[t].channels,delete at[t].labels,Object.defineProperty(at[t],"channels",{value:e}),Object.defineProperty(at[t],"labels",{value:n})}at.rgb.hsl=function(t){const e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=o-r;let a,l;switch(o){case r:{a=0;break}case e:{a=(n-i)/s;break}case n:{a=2+(i-e)/s;break}case i:{a=4+(e-n)/s;break}}a=Math.min(a*60,360),a<0&&(a+=360);const u=(r+o)/2;return o===r?l=0:u<=.5?l=s/(o+r):l=s/(2-o-r),[a,l*100,u*100]};at.rgb.hsv=function(t){let e,n,i,r,o;const s=t[0]/255,a=t[1]/255,l=t[2]/255,u=Math.max(s,a,l),c=u-Math.min(s,a,l),d=function(f){return(u-f)/6/c+1/2};if(c===0)r=0,o=0;else{switch(o=c/u,e=d(s),n=d(a),i=d(l),u){case s:{r=i-n;break}case a:{r=1/3+e-i;break}case l:{r=2/3+n-e;break}}r<0?r+=1:r>1&&(r-=1)}return[r*360,o*100,u*100]};at.rgb.hwb=function(t){const e=t[0],n=t[1];let i=t[2];const r=at.rgb.hsl(t)[0],o=1/255*Math.min(e,Math.min(n,i));return i=1-1/255*Math.max(e,Math.max(n,i)),[r,o*100,i*100]};at.rgb.oklab=function(t){const e=gm(t[0]/255),n=gm(t[1]/255),i=gm(t[2]/255),r=Math.cbrt(.4122214708*e+.5363325363*n+.0514459929*i),o=Math.cbrt(.2119034982*e+.6806995451*n+.1073969566*i),s=Math.cbrt(.0883024619*e+.2817188376*n+.6299787005*i),a=.2104542553*r+.793617785*o-.0040720468*s,l=1.9779984951*r-2.428592205*o+.4505937099*s,u=.0259040371*r+.7827717662*o-.808675766*s;return[a*100,l*100,u*100]};at.rgb.cmyk=function(t){const e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.min(1-e,1-n,1-i),o=(1-e-r)/(1-r)||0,s=(1-n-r)/(1-r)||0,a=(1-i-r)/(1-r)||0;return[o*100,s*100,a*100,r*100]};function PNe(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}at.rgb.keyword=function(t){const e=gY[t];if(e)return e;let n=Number.POSITIVE_INFINITY,i;for(const r of Object.keys(kf)){const o=kf[r],s=PNe(t,o);s<n&&(n=s,i=r)}return i};at.keyword.rgb=function(t){return kf[t]};at.rgb.xyz=function(t){const e=gm(t[0]/255),n=gm(t[1]/255),i=gm(t[2]/255),r=e*.4124564+n*.3575761+i*.1804375,o=e*.2126729+n*.7151522+i*.072175,s=e*.0193339+n*.119192+i*.9503041;return[r*100,o*100,s*100]};at.rgb.lab=function(t){const e=at.rgb.xyz(t);let n=e[0],i=e[1],r=e[2];n/=95.047,i/=100,r/=108.883,n=n>lu?n**(1/3):7.787*n+16/116,i=i>lu?i**(1/3):7.787*i+16/116,r=r>lu?r**(1/3):7.787*r+16/116;const o=116*i-16,s=500*(n-i),a=200*(i-r);return[o,s,a]};at.hsl.rgb=function(t){const e=t[0]/360,n=t[1]/100,i=t[2]/100;let r,o;if(n===0)return o=i*255,[o,o,o];const s=i<.5?i*(1+n):i+n-i*n,a=2*i-s,l=[0,0,0];for(let u=0;u<3;u++)r=e+1/3*-(u-1),r<0&&r++,r>1&&r--,6*r<1?o=a+(s-a)*6*r:2*r<1?o=s:3*r<2?o=a+(s-a)*(2/3-r)*6:o=a,l[u]=o*255;return l};at.hsl.hsv=function(t){const e=t[0];let n=t[1]/100,i=t[2]/100,r=n;const o=Math.max(i,.01);i*=2,n*=i<=1?i:2-i,r*=o<=1?o:2-o;const s=(i+n)/2,a=i===0?2*r/(o+r):2*n/(i+n);return[e,a*100,s*100]};at.hsv.rgb=function(t){const e=t[0]/60,n=t[1]/100;let i=t[2]/100;const r=Math.floor(e)%6,o=e-Math.floor(e),s=255*i*(1-n),a=255*i*(1-n*o),l=255*i*(1-n*(1-o));switch(i*=255,r){case 0:return[i,l,s];case 1:return[a,i,s];case 2:return[s,i,l];case 3:return[s,a,i];case 4:return[l,s,i];case 5:return[i,s,a]}};at.hsv.hsl=function(t){const e=t[0],n=t[1]/100,i=t[2]/100,r=Math.max(i,.01);let o,s;s=(2-n)*i;const a=(2-n)*r;return o=n*r,o/=a<=1?a:2-a,o=o||0,s/=2,[e,o*100,s*100]};at.hwb.rgb=function(t){const e=t[0]/360;let n=t[1]/100,i=t[2]/100;const r=n+i;let o;r>1&&(n/=r,i/=r);const s=Math.floor(6*e),a=1-i;o=6*e-s,(s&1)!==0&&(o=1-o);const l=n+o*(a-n);let u,c,d;switch(s){default:case 6:case 0:{u=a,c=l,d=n;break}case 1:{u=l,c=a,d=n;break}case 2:{u=n,c=a,d=l;break}case 3:{u=n,c=l,d=a;break}case 4:{u=l,c=n,d=a;break}case 5:{u=a,c=n,d=l;break}}return[u*255,c*255,d*255]};at.cmyk.rgb=function(t){const e=t[0]/100,n=t[1]/100,i=t[2]/100,r=t[3]/100,o=1-Math.min(1,e*(1-r)+r),s=1-Math.min(1,n*(1-r)+r),a=1-Math.min(1,i*(1-r)+r);return[o*255,s*255,a*255]};at.xyz.rgb=function(t){const e=t[0]/100,n=t[1]/100,i=t[2]/100;let r,o,s;return r=e*3.2404542+n*-1.5371385+i*-.4985314,o=e*-.969266+n*1.8760108+i*.041556,s=e*.0556434+n*-.2040259+i*1.0572252,r=mm(r),o=mm(o),s=mm(s),[r*255,o*255,s*255]};at.xyz.lab=function(t){let e=t[0],n=t[1],i=t[2];e/=95.047,n/=100,i/=108.883,e=e>lu?e**(1/3):7.787*e+16/116,n=n>lu?n**(1/3):7.787*n+16/116,i=i>lu?i**(1/3):7.787*i+16/116;const r=116*n-16,o=500*(e-n),s=200*(n-i);return[r,o,s]};at.xyz.oklab=function(t){const e=t[0]/100,n=t[1]/100,i=t[2]/100,r=Math.cbrt(.8189330101*e+.3618667424*n-.1288597137*i),o=Math.cbrt(.0329845436*e+.9293118715*n+.0361456387*i),s=Math.cbrt(.0482003018*e+.2643662691*n+.633851707*i),a=.2104542553*r+.793617785*o-.0040720468*s,l=1.9779984951*r-2.428592205*o+.4505937099*s,u=.0259040371*r+.7827717662*o-.808675766*s;return[a*100,l*100,u*100]};at.oklab.oklch=function(t){return at.lab.lch(t)};at.oklab.xyz=function(t){const e=t[0]/100,n=t[1]/100,i=t[2]/100,r=(.999999998*e+.396337792*n+.215803758*i)**3,o=(1.000000008*e-.105561342*n-.063854175*i)**3,s=(1.000000055*e-.089484182*n-1.291485538*i)**3,a=1.227013851*r-.55779998*o+.281256149*s,l=-.040580178*r+1.11225687*o-.071676679*s,u=-.076381285*r-.421481978*o+1.58616322*s;return[a*100,l*100,u*100]};at.oklab.rgb=function(t){const e=t[0]/100,n=t[1]/100,i=t[2]/100,r=(e+.3963377774*n+.2158037573*i)**3,o=(e-.1055613458*n-.0638541728*i)**3,s=(e-.0894841775*n-1.291485548*i)**3,a=mm(4.0767416621*r-3.3077115913*o+.2309699292*s),l=mm(-1.2684380046*r+2.6097574011*o-.3413193965*s),u=mm(-.0041960863*r-.7034186147*o+1.707614701*s);return[a*255,l*255,u*255]};at.oklch.oklab=function(t){return at.lch.lab(t)};at.lab.xyz=function(t){const e=t[0],n=t[1],i=t[2];let r,o,s;o=(e+16)/116,r=n/500+o,s=o-i/200;const a=o**3,l=r**3,u=s**3;return o=a>lu?a:(o-16/116)/7.787,r=l>lu?l:(r-16/116)/7.787,s=u>lu?u:(s-16/116)/7.787,r*=95.047,o*=100,s*=108.883,[r,o,s]};at.lab.lch=function(t){const e=t[0],n=t[1],i=t[2];let r;r=Math.atan2(i,n)*360/2/Math.PI,r<0&&(r+=360);const s=Math.sqrt(n*n+i*i);return[e,s,r]};at.lch.lab=function(t){const e=t[0],n=t[1],r=t[2]/360*2*Math.PI,o=n*Math.cos(r),s=n*Math.sin(r);return[e,o,s]};at.rgb.ansi16=function(t,e=null){const[n,i,r]=t;let o=e===null?at.rgb.hsv(t)[2]:e;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(r/255)<<2|Math.round(i/255)<<1|Math.round(n/255));return o===2&&(s+=60),s};at.hsv.ansi16=function(t){return at.rgb.ansi16(at.hsv.rgb(t),t[2])};at.rgb.ansi256=function(t){const e=t[0],n=t[1],i=t[2];return e>>4===n>>4&&n>>4===i>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)};at.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const n=(Math.trunc(t>50)+1)*.5,i=(e&1)*n*255,r=(e>>1&1)*n*255,o=(e>>2&1)*n*255;return[i,r,o]};at.ansi256.rgb=function(t){if(t=t[0],t>=232){const o=(t-232)*10+8;return[o,o,o]}t-=16;let e;const n=Math.floor(t/36)/5*255,i=Math.floor((e=t%36)/6)/5*255,r=e%6/5*255;return[n,i,r]};at.rgb.hex=function(t){const n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(n.length)+n};at.hex.rgb=function(t){const e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=[...n].map(a=>a+a).join(""));const i=Number.parseInt(n,16),r=i>>16&255,o=i>>8&255,s=i&255;return[r,o,s]};at.rgb.hcg=function(t){const e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.max(Math.max(e,n),i),o=Math.min(Math.min(e,n),i),s=r-o;let a;const l=s<1?o/(1-s):0;return s<=0?a=0:r===e?a=(n-i)/s%6:r===n?a=2+(i-e)/s:a=4+(e-n)/s,a/=6,a%=1,[a*360,s*100,l*100]};at.hsl.hcg=function(t){const e=t[1]/100,n=t[2]/100,i=n<.5?2*e*n:2*e*(1-n);let r=0;return i<1&&(r=(n-.5*i)/(1-i)),[t[0],i*100,r*100]};at.hsv.hcg=function(t){const e=t[1]/100,n=t[2]/100,i=e*n;let r=0;return i<1&&(r=(n-i)/(1-i)),[t[0],i*100,r*100]};at.hcg.rgb=function(t){const e=t[0]/360,n=t[1]/100,i=t[2]/100;if(n===0)return[i*255,i*255,i*255];const r=[0,0,0],o=e%1*6,s=o%1,a=1-s;let l=0;switch(Math.floor(o)){case 0:{r[0]=1,r[1]=s,r[2]=0;break}case 1:{r[0]=a,r[1]=1,r[2]=0;break}case 2:{r[0]=0,r[1]=1,r[2]=s;break}case 3:{r[0]=0,r[1]=a,r[2]=1;break}case 4:{r[0]=s,r[1]=0,r[2]=1;break}default:r[0]=1,r[1]=0,r[2]=a}return l=(1-n)*i,[(n*r[0]+l)*255,(n*r[1]+l)*255,(n*r[2]+l)*255]};at.hcg.hsv=function(t){const e=t[1]/100,n=t[2]/100,i=e+n*(1-e);let r=0;return i>0&&(r=e/i),[t[0],r*100,i*100]};at.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let r=0;return i>0&&i<.5?r=e/(2*i):i>=.5&&i<1&&(r=e/(2*(1-i))),[t[0],r*100,i*100]};at.hcg.hwb=function(t){const e=t[1]/100,n=t[2]/100,i=e+n*(1-e);return[t[0],(i-e)*100,(1-i)*100]};at.hwb.hcg=function(t){const e=t[1]/100,i=1-t[2]/100,r=i-e;let o=0;return r<1&&(o=(i-r)/(1-r)),[t[0],r*100,o*100]};at.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};at.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};at.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};at.gray.hsl=function(t){return[0,0,t[0]]};at.gray.hsv=at.gray.hsl;at.gray.hwb=function(t){return[0,100,t[0]]};at.gray.cmyk=function(t){return[0,0,0,t[0]]};at.gray.lab=function(t){return[t[0],0,0]};at.gray.hex=function(t){const e=Math.round(t[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(i.length)+i};at.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function INe(){const t={},e=Object.keys(at);for(let{length:n}=e,i=0;i<n;i++)t[e[i]]={distance:-1,parent:null};return t}function RNe(t){const e=INe(),n=[t];for(e[t].distance=0;n.length>0;){const i=n.pop(),r=Object.keys(at[i]);for(let{length:o}=r,s=0;s<o;s++){const a=r[s],l=e[a];l.distance===-1&&(l.distance=e[i].distance+1,l.parent=i,n.unshift(a))}}return e}function MNe(t,e){return function(n){return e(t(n))}}function ONe(t,e){const n=[e[t].parent,t];let i=at[e[t].parent][t],r=e[t].parent;for(;e[r].parent;)n.unshift(e[r].parent),i=MNe(at[e[r].parent][r],i),r=e[r].parent;return i.conversion=n,i}function LNe(t){const e=RNe(t),n={},i=Object.keys(e);for(let{length:r}=i,o=0;o<r;o++){const s=i[o];e[s].parent!==null&&(n[s]=ONe(s,e))}return n}const $d={},DNe=Object.keys(at);function NNe(t){const e=function(...n){const i=n[0];return i==null?i:(i.length>1&&(n=i),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function BNe(t){const e=function(...n){const i=n[0];if(i==null)return i;i.length>1&&(n=i);const r=t(n);if(typeof r=="object")for(let{length:o}=r,s=0;s<o;s++)r[s]=Math.round(r[s]);return r};return"conversion"in t&&(e.conversion=t.conversion),e}for(const t of DNe){$d[t]={},Object.defineProperty($d[t],"channels",{value:at[t].channels}),Object.defineProperty($d[t],"labels",{value:at[t].labels});const e=LNe(t),n=Object.keys(e);for(const i of n){const r=e[i];$d[t][i]=BNe(r),$d[t][i].raw=NNe(r)}}const ub=(t,e=0,n=1)=>t>n?n:t<e?e:t,wr=(t,e=0,n=Math.pow(10,e))=>Math.round(n*t)/n,VNe=t=>UNe(RA(t)),RA=t=>(t[0]==="#"&&(t=t.substring(1)),t.length<6?{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:t.length===4?wr(parseInt(t[3]+t[3],16)/255,2):1}:{r:parseInt(t.substring(0,2),16),g:parseInt(t.substring(2,4),16),b:parseInt(t.substring(4,6),16),a:t.length===8?wr(parseInt(t.substring(6,8),16)/255,2):1}),FNe=t=>HNe(zNe(t)),$Ne=({h:t,s:e,v:n,a:i})=>{const r=(200-e)*n/100;return{h:wr(t),s:wr(r>0&&r<200?e*n/100/(r<=100?r:200-r)*100:0),l:wr(r/2),a:wr(i,2)}},MA=t=>{const{h:e,s:n,l:i}=$Ne(t);return`hsl(${e}, ${n}%, ${i}%)`},zNe=({h:t,s:e,v:n,a:i})=>{t=t/360*6,e=e/100,n=n/100;const r=Math.floor(t),o=n*(1-e),s=n*(1-(t-r)*e),a=n*(1-(1-t+r)*e),l=r%6;return{r:wr([n,s,o,o,a,n][l]*255),g:wr([a,n,n,s,o,o][l]*255),b:wr([o,o,a,n,n,s][l]*255),a:wr(i,2)}},uy=t=>{const e=t.toString(16);return e.length<2?"0"+e:e},HNe=({r:t,g:e,b:n,a:i})=>{const r=i<1?uy(wr(i*255)):"";return"#"+uy(t)+uy(e)+uy(n)+r},UNe=({r:t,g:e,b:n,a:i})=>{const r=Math.max(t,e,n),o=r-Math.min(t,e,n),s=o?r===t?(e-n)/o:r===e?2+(n-t)/o:4+(t-e)/o:0;return{h:wr(60*(s<0?s+6:s)),s:wr(r?o/r*100:0),v:wr(r/255*100),a:i}},pY=(t,e)=>{if(t===e)return!0;for(const n in t)if(t[n]!==e[n])return!1;return!0},WNe=(t,e)=>t.toLowerCase()===e.toLowerCase()?!0:pY(RA(t),RA(e)),vV={},vY=t=>{let e=vV[t];return e||(e=document.createElement("template"),e.innerHTML=t,vV[t]=e),e},lO=(t,e,n)=>{t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n}))};let pm=!1;const OA=t=>"touches"in t,qNe=t=>pm&&!OA(t)?!1:(pm||(pm=OA(t)),!0),bV=(t,e)=>{const n=OA(e)?e.touches[0]:e,i=t.el.getBoundingClientRect();lO(t.el,"move",t.getMove({x:ub((n.pageX-(i.left+window.pageXOffset))/i.width),y:ub((n.pageY-(i.top+window.pageYOffset))/i.height)}))},jNe=(t,e)=>{const n=e.keyCode;n>40||t.xy&&n<37||n<33||(e.preventDefault(),lO(t.el,"move",t.getMove({x:n===39?.01:n===37?-.01:n===34?.05:n===33?-.05:n===35?1:n===36?-1:0,y:n===40?.01:n===38?-.01:0},!0)))};class bY{constructor(e,n,i,r){const o=vY(`<div role="slider" tabindex="0" part="${n}" ${i}><div part="${n}-pointer"></div></div>`);e.appendChild(o.content.cloneNode(!0));const s=e.querySelector(`[part=${n}]`);s.addEventListener("mousedown",this),s.addEventListener("touchstart",this),s.addEventListener("keydown",this),this.el=s,this.xy=r,this.nodes=[s.firstChild,s]}set dragging(e){const n=e?document.addEventListener:document.removeEventListener;n(pm?"touchmove":"mousemove",this),n(pm?"touchend":"mouseup",this)}handleEvent(e){switch(e.type){case"mousedown":case"touchstart":if(e.preventDefault(),!qNe(e)||!pm&&e.button!=0)return;this.el.focus(),bV(this,e),this.dragging=!0;break;case"mousemove":case"touchmove":e.preventDefault(),bV(this,e);break;case"mouseup":case"touchend":this.dragging=!1;break;case"keydown":jNe(this,e);break}}style(e){e.forEach((n,i)=>{for(const r in n)this.nodes[i].style.setProperty(r,n[r])})}}class KNe extends bY{constructor(e){super(e,"hue",'aria-label="Hue" aria-valuemin="0" aria-valuemax="360"',!1)}update({h:e}){this.h=e,this.style([{left:`${e/360*100}%`,color:MA({h:e,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuenow",`${wr(e)}`)}getMove(e,n){return{h:n?ub(this.h+e.x*360,0,360):360*e.x}}}class GNe extends bY{constructor(e){super(e,"saturation",'aria-label="Color"',!0)}update(e){this.hsva=e,this.style([{top:`${100-e.v}%`,left:`${e.s}%`,color:MA(e)},{"background-color":MA({h:e.h,s:100,v:100,a:1})}]),this.el.setAttribute("aria-valuetext",`Saturation ${wr(e.s)}%, Brightness ${wr(e.v)}%`)}getMove(e,n){return{s:n?ub(this.hsva.s+e.x*100,0,100):e.x*100,v:n?ub(this.hsva.v-e.y*100,0,100):Math.round(100-e.y*100)}}}const YNe=':host{display:flex;flex-direction:column;position:relative;width:200px;height:200px;user-select:none;-webkit-user-select:none;cursor:default}:host([hidden]){display:none!important}[role=slider]{position:relative;touch-action:none;user-select:none;-webkit-user-select:none;outline:0}[role=slider]:last-child{border-radius:0 0 8px 8px}[part$=pointer]{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;display:flex;place-content:center center;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}[part$=pointer]::after{content:"";width:100%;height:100%;border-radius:inherit;background-color:currentColor}[role=slider]:focus [part$=pointer]{transform:translate(-50%,-50%) scale(1.1)}',XNe="[part=hue]{flex:0 0 24px;background:linear-gradient(to right,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}[part=hue-pointer]{top:50%;z-index:2}",JNe="[part=saturation]{flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,rgba(255,255,255,0));box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}[part=saturation-pointer]{z-index:3}",cy=Symbol("same"),zT=Symbol("color"),yV=Symbol("hsva"),HT=Symbol("update"),wV=Symbol("parts"),_V=Symbol("css"),CV=Symbol("sliders");class ZNe extends HTMLElement{static get observedAttributes(){return["color"]}get[_V](){return[YNe,XNe,JNe]}get[CV](){return[GNe,KNe]}get color(){return this[zT]}set color(e){if(!this[cy](e)){const n=this.colorModel.toHsva(e);this[HT](n),this[zT]=e}}constructor(){super();const e=vY(`<style>${this[_V].join("")}</style>`),n=this.attachShadow({mode:"open"});n.appendChild(e.content.cloneNode(!0)),n.addEventListener("move",this),this[wV]=this[CV].map(i=>new i(n))}connectedCallback(){if(this.hasOwnProperty("color")){const e=this.color;delete this.color,this.color=e}else this.color||(this.color=this.colorModel.defaultColor)}attributeChangedCallback(e,n,i){const r=this.colorModel.fromAttr(i);this[cy](r)||(this.color=r)}handleEvent(e){const n=this[yV],i={...n,...e.detail};this[HT](i);let r;!pY(i,n)&&!this[cy](r=this.colorModel.fromHsva(i))&&(this[zT]=r,lO(this,"color-changed",{value:r}))}[cy](e){return this.color&&this.colorModel.equal(e,this.color)}[HT](e){this[yV]=e,this[wV].forEach(n=>n.update(e))}}const QNe={defaultColor:"#000",toHsva:VNe,fromHsva:({h:t,s:e,v:n})=>FNe({h:t,s:e,v:n,a:1}),equal:WNe,fromAttr:t=>t};class e3e extends ZNe{get colorModel(){return QNe}}class qr extends Er{_parentElement;constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(n,i,r)=>{this._renderViewIntoCollectionParent(i,r)}),this.on("remove",(n,i)=>{i.element&&this._parentElement&&i.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const n of this)this._renderViewIntoCollectionParent(n)}delegate(...e){if(!e.length||!t3e(e))throw new oe("ui-viewcollection-delegate-wrong-events",this);return{to:n=>{for(const i of this)for(const r of e)i.delegate(r).to(n);this.on("add",(i,r)=>{for(const o of e)r.delegate(o).to(n)}),this.on("remove",(i,r)=>{for(const o of e)r.stopDelegating(o,n)})}}}_renderViewIntoCollectionParent(e,n){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[n])}remove(e){return super.remove(e)}}function t3e(t){return t.every(e=>typeof e=="string")}const n3e="http://www.w3.org/1999/xhtml";class Io extends Fn(){ns;tag;text;attributes;children;eventListeners;_isRendered;_revertData;constructor(e){super(),Object.assign(this,kV(SV(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=xV(),this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new oe("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(n){if(n.children)for(const i of n.children)g1(i)?yield i:uO(i)&&(yield*e(i))}yield*e(this)}static bind(e,n){return{to(i,r){return new i3e({eventNameOrFunction:i,attribute:i,observable:e,emitter:n,callback:r})},if(i,r,o){return new yY({observable:e,emitter:n,attribute:i,valueIfTrue:r,callback:o})}}}static extend(e,n){if(e._isRendered)throw new oe("template-extend-render",[this,e]);SY(e,kV(SV(n)))}_renderNode(e){let n;if(e.node?n=this.tag&&this.text:n=this.tag?this.text:!this.text,n)throw new oe("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let n=e.node;return n||(n=e.node=document.createElementNS(this.ns||n3e,this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),n}_renderText(e){let n=e.node;return n?e.revertData.text=n.textContent:n=e.node=document.createTextNode(""),Zw(this.text)?this._bindToObservable({schema:this.text,updater:o3e(n),data:e}):n.textContent=this.text.join(""),n}_renderAttributes(e){if(!this.attributes)return;const n=e.node,i=e.revertData;for(const r in this.attributes){const o=n.getAttribute(r),s=this.attributes[r];i&&(i.attributes[r]=o);const a=EV(s)?s[0].ns:null;if(Zw(s)){const l=EV(s)?s[0].value:s;i&&AV(r)&&l.unshift(o),this._bindToObservable({schema:l,updater:s3e(n,r,a),data:e})}else if(r=="style"&&typeof s[0]!="string")this._renderStyleAttribute(s[0],e);else{i&&o&&AV(r)&&s.unshift(o);const l=s.map(u=>u&&(u.value||u)).reduce((u,c)=>u.concat(c),[]).reduce(CY,"");Ym(l)||n.setAttributeNS(a,r,l)}}}_renderStyleAttribute(e,n){const i=n.node;for(const r in e){const o=e[r];Zw(o)?this._bindToObservable({schema:[o],updater:a3e(i,r),data:n}):LA(r)?i.style.setProperty(r,o):i.style[r]=o}}_renderElementChildren(e){const n=e.node,i=e.intoFragment?document.createDocumentFragment():n,r=e.isApplying;let o=0;for(const s of this.children)if(cO(s)){if(!r){s.setParent(n);for(const a of s)i.appendChild(a.element)}}else if(g1(s))r||(s.isRendered||s.render(),i.appendChild(s.element));else if(Mc(s))i.appendChild(s);else if(r){const a=e.revertData,l=xV();a.children.push(l),s._renderNode({intoFragment:!1,node:i.childNodes[o++],isApplying:!0,revertData:l})}else i.appendChild(s.render());e.intoFragment&&n.appendChild(i)}_setUpListeners(e){if(this.eventListeners)for(const n in this.eventListeners){const i=this.eventListeners[n].map(r=>{const[o,s]=n.split("@");return r.activateDomEventListener(o,s,e)});e.revertData&&e.revertData.bindings.push(i)}}_bindToObservable({schema:e,updater:n,data:i}){const r=i.revertData;wY(e,n,i);const o=e.filter(s=>!Ym(s)).filter(s=>s.observable).map(s=>s.activateAttributeListener(e,n,i));r&&r.bindings.push(o)}_revertTemplateFromNode(e,n){for(const r of n.bindings)for(const o of r)o();if(n.text){e.textContent=n.text;return}const i=e;for(const r in n.attributes){const o=n.attributes[r];o===null?i.removeAttribute(r):i.setAttribute(r,o)}for(let r=0;r<n.children.length;++r)this._revertTemplateFromNode(i.childNodes[r],n.children[r])}}class c0{attribute;observable;emitter;callback;constructor(e){this.attribute=e.attribute,this.observable=e.observable,this.emitter=e.emitter,this.callback=e.callback}getValue(e){const n=this.observable[this.attribute];return this.callback?this.callback(n,e):n}activateAttributeListener(e,n,i){const r=()=>wY(e,n,i);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,r),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,r)}}}class i3e extends c0{eventNameOrFunction;constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,n,i){const r=(o,s)=>{(!n||s.target.matches(n))&&(typeof this.eventNameOrFunction=="function"?this.eventNameOrFunction(s):this.observable.fire(this.eventNameOrFunction,s))};return this.emitter.listenTo(i.node,e,r),()=>{this.emitter.stopListening(i.node,e,r)}}}class yY extends c0{valueIfTrue;constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){const n=super.getValue(e);return Ym(n)?!1:this.valueIfTrue||!0}}function Zw(t){return t?(t.value&&(t=t.value),Array.isArray(t)?t.some(Zw):t instanceof c0):!1}function LA(t){return/^--[a-zA-Z_-][\w-]*$/.test(t)}function r3e(t,e){return t.map(n=>n instanceof c0?n.getValue(e):n)}function wY(t,e,{node:n}){const i=r3e(t,n);let r;t.length==1&&t[0]instanceof yY?r=i[0]:r=i.reduce(CY,""),Ym(r)?e.remove():e.set(r)}function o3e(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function s3e(t,e,n){return{set(i){t.setAttributeNS(n,e,i)},remove(){t.removeAttributeNS(n,e)}}}function a3e(t,e){return{set(n){LA(e)?t.style.setProperty(e,n):t.style[e]=n},remove(){LA(e)?t.style.removeProperty(e):t.style[e]=null}}}function SV(t){return dS(t,n=>{if(n&&(n instanceof c0||uO(n)||g1(n)||cO(n)))return n})}function kV(t){if(typeof t=="string"?t=c3e(t):t.text&&d3e(t),t.on&&(t.eventListeners=u3e(t.on),delete t.on),!t.text){t.attributes&&l3e(t.attributes);const e=[];if(t.children)if(cO(t.children))e.push(t.children);else for(const n of t.children)uO(n)||g1(n)||Mc(n)?e.push(n):e.push(new Io(n));t.children=e}return t}function l3e(t){for(const e in t)t[e].value&&(t[e].value=li(t[e].value)),_Y(t,e)}function u3e(t){for(const e in t)_Y(t,e);return t}function c3e(t){return{text:[t]}}function d3e(t){t.text=li(t.text)}function _Y(t,e){t[e]=li(t[e])}function CY(t,e){return Ym(e)?t:Ym(t)?e:`${t} ${e}`}function TV(t,e){for(const n in e)t[n]?t[n].push(...e[n]):t[n]=e[n]}function SY(t,e){if(e.attributes&&(t.attributes||(t.attributes={}),TV(t.attributes,e.attributes)),e.eventListeners&&(t.eventListeners||(t.eventListeners={}),TV(t.eventListeners,e.eventListeners)),e.text&&t.text.push(...e.text),e.children&&e.children.length){if(t.children.length!=e.children.length)throw new oe("ui-template-extend-children-mismatch",t);let n=0;for(const i of e.children)SY(t.children[n++],i)}}function Ym(t){return!t&&t!==0}function g1(t){return t instanceof ut}function uO(t){return t instanceof Io}function cO(t){return t instanceof qr}function EV(t){return so(t[0])&&t[0].ns}function xV(){return{children:[],bindings:[],attributes:{}}}function AV(t){return t=="class"||t=="style"}class ut extends zo(Ln()){element;isRendered;locale;t;template;_viewCollections;_unboundChildren;_bindTemplate;constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Er,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(n,i)=>{i.locale=e,i.t=e&&e.t}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Io.bind(this,this)}createCollection(e){const n=new qr(e);return this._viewCollections.add(n),n}registerChild(e){us(e)||(e=[e]);for(const n of e)this._unboundChildren.add(n)}deregisterChild(e){us(e)||(e=[e]);for(const n of e)this._unboundChildren.remove(n)}setTemplate(e){this.template=new Io(e)}extendTemplate(e){Io.extend(this.template,e)}render(){if(this.isRendered)throw new oe("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}const PV={POLITE:"polite",ASSERTIVE:"assertive"};class f3e{editor;view;constructor(e){this.editor=e,e.once("ready",()=>{for(const n of Object.values(PV))this.announce("",n)})}announce(e,n=PV.POLITE){const i=this.editor;if(!i.ui.view)return;this.view||(this.view=new h3e(i.locale),i.ui.view.body.add(this.view));const{politeness:r,isUnsafeHTML:o}=typeof n=="string"?{politeness:n}:n;let s=this.view.regionViews.find(a=>a.politeness===r);s||(s=new m3e(i,r),this.view.regionViews.add(s)),s.announce({announcement:e,isUnsafeHTML:o})}}class h3e extends ut{regionViews;constructor(e){super(e),this.regionViews=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-aria-live-announcer"]},children:this.regionViews})}}class m3e extends ut{politeness;_domConverter;_pruneAnnouncementsInterval;constructor(e,n){super(e.locale),this.setTemplate({tag:"div",attributes:{"aria-live":n,"aria-relevant":"additions"},children:[{tag:"ul",attributes:{class:["ck","ck-aria-live-region-list"]}}]}),e.on("destroy",()=>{this._pruneAnnouncementsInterval!==null&&(clearInterval(this._pruneAnnouncementsInterval),this._pruneAnnouncementsInterval=null)}),this.politeness=n,this._domConverter=e.data.htmlProcessor.domConverter,this._pruneAnnouncementsInterval=setInterval(()=>{this.element&&this._listElement.firstChild&&this._listElement.firstChild.remove()},5e3)}announce({announcement:e,isUnsafeHTML:n}){if(!e.trim().length)return;const i=document.createElement("li");n?this._domConverter.setContentOf(i,e):i.innerText=e,this._listElement.appendChild(i)}get _listElement(){return this.element.querySelector("ul")}}function Wf({emitter:t,activator:e,callback:n,contextElements:i,listenerOptions:r}){t.listenTo(document,"mousedown",(o,s)=>{if(!e())return;const a=typeof s.composedPath=="function"?s.composedPath():[],l=typeof i=="function"?i():i;for(const u of l)if(u.contains(s.target)||a.includes(u))return;n()},r)}function cb(t){class e extends t{disableCssTransitions(){this._isCssTransitionsDisabled=!0}enableCssTransitions(){this._isCssTransitionsDisabled=!1}constructor(...i){super(...i),this.set("_isCssTransitionsDisabled",!1),this.initializeCssTransitionDisablerMixin()}initializeCssTransitionDisablerMixin(){this.template&&this.extendTemplate({attributes:{class:[this.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}}return e}function g3e(t){class e extends t{_onDragBound=this._onDrag.bind(this);_onDragEndBound=this._onDragEnd.bind(this);_lastDraggingCoordinates={x:0,y:0};constructor(...i){super(...i),this.on("render",()=>{this._attachListeners()}),this.set("isDragging",!1)}_attachListeners(){this.listenTo(this.element,"mousedown",this._onDragStart.bind(this)),this.listenTo(this.element,"touchstart",this._onDragStart.bind(this))}_attachDragListeners(){this.listenTo(Qe.document,"mouseup",this._onDragEndBound),this.listenTo(Qe.document,"touchend",this._onDragEndBound),this.listenTo(Qe.document,"mousemove",this._onDragBound),this.listenTo(Qe.document,"touchmove",this._onDragBound)}_detachDragListeners(){this.stopListening(Qe.document,"mouseup",this._onDragEndBound),this.stopListening(Qe.document,"touchend",this._onDragEndBound),this.stopListening(Qe.document,"mousemove",this._onDragBound),this.stopListening(Qe.document,"touchmove",this._onDragBound)}_onDragStart(i,r){if(!this._isHandleElementPressed(r))return;this._attachDragListeners();let o=0,s=0;r instanceof MouseEvent?(o=r.clientX,s=r.clientY):(o=r.touches[0].clientX,s=r.touches[0].clientY),this._lastDraggingCoordinates={x:o,y:s},this.isDragging=!0}_onDrag(i,r){if(!this.isDragging){this._detachDragListeners();return}let o=0,s=0;r instanceof MouseEvent?(o=r.clientX,s=r.clientY):(o=r.touches[0].clientX,s=r.touches[0].clientY),r.preventDefault(),this.fire("drag",{deltaX:Math.round(o-this._lastDraggingCoordinates.x),deltaY:Math.round(s-this._lastDraggingCoordinates.y)}),this._lastDraggingCoordinates={x:o,y:s}}_onDragEnd(){this._detachDragListeners(),this.isDragging=!1}_isHandleElementPressed(i){return this.dragHandleElement?this.dragHandleElement===i.target||i.target instanceof HTMLElement&&this.dragHandleElement.contains(i.target):!1}}return e}function vg({view:t}){t.listenTo(t.element,"submit",(e,n)=>{n.preventDefault(),t.fire("submit")},{useCapture:!0})}function kY({keystrokeHandler:t,focusTracker:e,gridItems:n,numberOfColumns:i,uiLanguageDirection:r}){const o=typeof i=="number"?()=>i:i;t.set("arrowright",s((u,c)=>r==="rtl"?l(u,c.length):a(u,c.length))),t.set("arrowleft",s((u,c)=>r==="rtl"?a(u,c.length):l(u,c.length))),t.set("arrowup",s((u,c)=>{let d=u-o();return d<0&&(d=u+o()*Math.floor(c.length/o()),d>c.length-1&&(d-=o())),d})),t.set("arrowdown",s((u,c)=>{let d=u+o();return d>c.length-1&&(d=u%o()),d}));function s(u){return c=>{const d=n.find(m=>m.element===e.focusedElement),f=n.getIndex(d),h=u(f,n);n.get(h).focus(),c.stopPropagation(),c.preventDefault()}}function a(u,c){return u===c-1?0:u+1}function l(u,c){return u===0?c-1:u-1}}class mc extends ut{id;constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${Ur()}`;const n=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:n.to("for")},children:[{text:n.to("text")}]})}}class p3e extends ut{constructor(e,n){super(e);const i=e.t,r=new mc;r.text=i("Help Contents. To close this dialog press ESC."),this.setTemplate({tag:"div",attributes:{class:["ck","ck-accessibility-help-dialog__content"],"aria-labelledby":r.id,role:"document",tabindex:-1},children:[Ko(document,"p",{},i("Below, you can find a list of keyboard shortcuts that can be used in the editor.")),...this._createCategories(Array.from(n.values())),r]})}focus(){this.element.focus()}_createCategories(e){return e.map(n=>{const i=[Ko(document,"h3",{},n.label),...Array.from(n.groups.values()).map(r=>this._createGroup(r)).flat()];return n.description&&i.splice(1,0,Ko(document,"p",{},n.description)),Ko(document,"section",{},i)})}_createGroup(e){const n=e.keystrokes.sort((r,o)=>r.label.localeCompare(o.label)).map(r=>this._createGroupRow(r)).flat(),i=[Ko(document,"dl",{},n)];return e.label&&i.unshift(Ko(document,"h4",{},e.label)),i}_createGroupRow(e){const n=this.locale.t,i=Ko(document,"dt"),r=Ko(document,"dd"),o=b3e(e.keystroke),s=[];for(const a of o)s.push(a.map(v3e).join(""));return i.innerHTML=e.label,r.innerHTML=s.join(", ")+(e.mayRequireFn&&vt.isMac?` ${n("(may require <kbd>Fn</kbd>)")}`:""),[i,r]}}function v3e(t){return l1(t).split("+").map(e=>`<kbd>${e}</kbd>`).join("+")}function b3e(t){return typeof t=="string"?[[t]]:typeof t[0]=="string"?[t]:t}class Sa extends ut{static presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"];constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.set("isVisible",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon",e.if("isVisible","ck-hidden",n=>!n),"ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox"),"aria-hidden":!0}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const n=new DOMParser().parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg");if(!n)throw new oe("ui-iconview-invalid-svg",this);const i=n.getAttribute("viewBox");i&&(this.viewBox=i);for(const{name:r,value:o}of Array.from(n.attributes))Sa.presentationalAttributeNames.includes(r)&&this.element.setAttribute(r,o);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;n.childNodes.length>0;)this.element.appendChild(n.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}class TY extends ut{constructor(){super(),this.set({style:void 0,text:void 0,id:void 0});const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:e.to("style"),id:e.to("id")},children:[{text:e.to("text")}]})}}class wt extends ut{children;labelView;iconView;keystrokeView;_focusDelayed=null;constructor(e,n=new TY){super(e);const i=this.bindTemplate,r=Ur();this.set("_ariaPressed",!1),this.set("_ariaChecked",!1),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",`ck-editor__aria-label_${r}`),this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("role",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._setupLabelView(n),this.iconView=new Sa,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.iconView.bind("content").to(this,"icon"),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const o={tag:"button",attributes:{class:["ck","ck-button",i.to("class"),i.if("isEnabled","ck-disabled",s=>!s),i.if("isVisible","ck-hidden",s=>!s),i.to("isOn",s=>s?"ck-on":"ck-off"),i.if("withText","ck-button_with-text"),i.if("withKeystroke","ck-button_with-keystroke")],role:i.to("role"),type:i.to("type",s=>s||"button"),tabindex:i.to("tabindex"),"aria-checked":i.to("_ariaChecked"),"aria-pressed":i.to("_ariaPressed"),"aria-label":i.to("ariaLabel"),"aria-labelledby":i.to("ariaLabelledBy"),"aria-disabled":i.if("isEnabled",!0,s=>!s),"data-cke-tooltip-text":i.to("_tooltipString"),"data-cke-tooltip-position":i.to("tooltipPosition")},children:this.children,on:{click:i.to(s=>{this.isEnabled?this.fire("execute"):s.preventDefault()})}};this.bind("_ariaPressed").to(this,"isOn",this,"isToggleable",this,"role",(s,a,l)=>!a||IV(l)?!1:String(!!s)),this.bind("_ariaChecked").to(this,"isOn",this,"isToggleable",this,"role",(s,a,l)=>!a||!IV(l)?!1:String(!!s)),vt.isSafari&&(this._focusDelayed||(this._focusDelayed=zM(()=>this.focus(),0)),o.on.mousedown=i.to(()=>{this._focusDelayed()}),o.on.mouseup=i.to(()=>{this._focusDelayed.cancel()})),this.setTemplate(o)}render(){super.render(),this.icon&&this.children.add(this.iconView),this.on("change:icon",(e,n,i,r)=>{i&&!r?this.children.add(this.iconView,0):!i&&r&&this.children.remove(this.iconView)}),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}destroy(){this._focusDelayed&&this._focusDelayed.cancel(),super.destroy()}_setupLabelView(e){return e.bind("text","style","id").to(this,"label","labelStyle","ariaLabelledBy"),e}_createKeystrokeView(){const e=new ut;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",n=>l1(n))}]}),e}_getTooltipString(e,n,i){return e?typeof e=="string"?e:(i&&(i=l1(i)),e instanceof Function?e(n,i):`${n}${i?` (${i})`:""}`):""}}function IV(t){switch(t){case"radio":case"checkbox":case"option":case"switch":case"menuitemcheckbox":case"menuitemradio":return!0;default:return!1}}class qf extends ut{children;iconView;constructor(e,n={}){super(e);const i=this.bindTemplate;this.set("label",n.label||""),this.set("class",n.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",i.to("class")]},children:this.children}),n.icon&&(this.iconView=new Sa,this.iconView.content=n.icon,this.children.add(this.iconView));const r=new ut(e);r.setTemplate({tag:"h2",attributes:{class:["ck","ck-form__header__label"],role:"presentation"},children:[{text:i.to("label")}]}),this.children.add(r)}}class Ho extends Fn(){focusables;focusTracker;keystrokeHandler;actions;constructor(e){if(super(),this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const n in e.actions){let i=e.actions[n];typeof i=="string"&&(i=[i]);for(const r of i)e.keystrokeHandler.set(r,(o,s)=>{this[n](),s()},e.keystrokeHandlerOptions)}this.on("forwardCycle",()=>this.focusFirst(),{priority:"low"}),this.on("backwardCycle",()=>this.focusLast(),{priority:"low"})}get first(){return this.focusables.find(UT)||null}get last(){return this.focusables.filter(UT).slice(-1)[0]||null}get next(){return this._getDomFocusableItem(1)}get previous(){return this._getDomFocusableItem(-1)}get current(){let e=null;return this.focusTracker.focusedElement===null?null:(this.focusables.find((n,i)=>{const r=n.element===this.focusTracker.focusedElement;return r&&(e=i),r}),e)}focusFirst(){this._focus(this.first,1)}focusLast(){this._focus(this.last,-1)}focusNext(){const e=this.next;if(e&&this.focusables.getIndex(e)===this.current){this.fire("forwardCycle");return}e===this.first?this.fire("forwardCycle"):this._focus(e,1)}focusPrevious(){const e=this.previous;if(e&&this.focusables.getIndex(e)===this.current){this.fire("backwardCycle");return}e===this.last?this.fire("backwardCycle"):this._focus(e,-1)}chain(e){const n=()=>this.current===null?null:this.focusables.get(this.current);this.listenTo(e,"forwardCycle",i=>{const r=n();this.focusNext(),r!==n()&&i.stop()},{priority:"low"}),this.listenTo(e,"backwardCycle",i=>{const r=n();this.focusPrevious(),r!==n()&&i.stop()},{priority:"low"})}unchain(e){this.stopListening(e)}_focus(e,n){e&&this.focusTracker.focusedElement!==e.element&&e.focus(n)}_getDomFocusableItem(e){const n=this.focusables.length;if(!n)return null;const i=this.current;if(i===null)return this[e===1?"first":"last"];let r=this.focusables.get(i),o=(i+n+e)%n;do{const s=this.focusables.get(o);if(UT(s)){r=s;break}o=(o+n+e)%n}while(o!==i);return r}}function UT(t){return d0(t)&&vu(t.element)}function d0(t){return"focus"in t&&typeof t.focus=="function"}function y3e(t){return d0(t)&&"focusCycler"in t&&t.focusCycler instanceof Ho}class w3e extends ut{children;keystrokes;focusCycler;_focusTracker;_focusables;constructor(e){super(e),this.children=this.createCollection(),this.keystrokes=new Qi,this._focusTracker=new wi,this._focusables=new qr,this.focusCycler=new Ho({focusables:this._focusables,focusTracker:this._focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__actions"]},children:this.children})}render(){super.render(),this.keystrokes.listenTo(this.element)}setButtons(e){for(const n of e){const i=new wt(this.locale);let r;i.on("execute",()=>n.onExecute()),n.onCreate&&n.onCreate(i);for(r in n)r!="onExecute"&&r!="onCreate"&&i.set(r,n[r]);this.children.add(i)}this._updateFocusCyclableItems()}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}_updateFocusCyclableItems(){Array.from(this.children).forEach(e=>{this._focusables.add(e),this._focusTracker.add(e.element)})}}class _3e extends ut{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog__content"]},children:this.children})}reset(){for(;this.children.length;)this.children.remove(0)}}const js={SCREEN_CENTER:"screen-center",EDITOR_CENTER:"editor-center",EDITOR_TOP_SIDE:"editor-top-side",EDITOR_TOP_CENTER:"editor-top-center",EDITOR_BOTTOM_CENTER:"editor-bottom-center",EDITOR_ABOVE_CENTER:"editor-above-center",EDITOR_BELOW_CENTER:"editor-below-center"},RV=gg("px");class db extends g3e(ut){parts;headerView;closeButtonView;actionsView;static defaultOffset=15;contentView;keystrokes;focusTracker;wasMoved=!1;_getCurrentDomRoot;_getViewportOffset;_focusables;_focusCycler;constructor(e,{getCurrentDomRoot:n,getViewportOffset:i,keystrokeHandlerOptions:r}){super(e);const o=this.bindTemplate,s=e.t;this.set("className",""),this.set("ariaLabel",s("Editor dialog")),this.set("isModal",!1),this.set("position",js.SCREEN_CENTER),this.set("_isVisible",!1),this.set("_isTransparent",!1),this.set("_top",0),this.set("_left",0),this._getCurrentDomRoot=n,this._getViewportOffset=i,this.decorate("moveTo"),this.parts=this.createCollection(),this.keystrokes=new Qi,this.focusTracker=new wi,this._focusables=new qr,this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"},keystrokeHandlerOptions:r}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-dialog-overlay",o.if("isModal","ck-dialog-overlay__transparent",a=>!a),o.if("_isVisible","ck-hidden",a=>!a)],tabindex:"-1"},children:[{tag:"div",attributes:{tabindex:"-1",class:["ck","ck-dialog",o.if("isModal","ck-dialog_modal"),o.to("className")],role:"dialog","aria-label":o.to("ariaLabel"),style:{top:o.to("_top",a=>RV(a)),left:o.to("_left",a=>RV(a)),visibility:o.if("_isTransparent","hidden")}},children:this.parts}]})}render(){super.render(),this.keystrokes.set("Esc",(e,n)=>{e.defaultPrevented||(this.fire("close",{source:"escKeyPress"}),n())}),this.on("drag",(e,{deltaX:n,deltaY:i})=>{this.wasMoved=!0,this.moveBy(n,i)}),this.listenTo(Qe.window,"resize",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.listenTo(Qe.document,"scroll",()=>{this._isVisible&&!this.wasMoved&&this.updatePosition()}),this.on("change:_isVisible",(e,n,i)=>{i&&(this._isTransparent=!0,setTimeout(()=>{this.updatePosition(),this._isTransparent=!1,this.focus()},10))}),this.keystrokes.listenTo(this.element)}get dragHandleElement(){return this.headerView&&!this.isModal?this.headerView.element:null}setupParts({icon:e,title:n,hasCloseButton:i=!0,content:r,actionButtons:o}){n&&(this.headerView=new qf(this.locale,{icon:e}),i&&(this.closeButtonView=this._createCloseButton(),this.headerView.children.add(this.closeButtonView)),this.headerView.label=n,this.ariaLabel=n,this.parts.add(this.headerView,0)),r&&(r instanceof ut&&(r=[r]),this.contentView=new _3e(this.locale),this.contentView.children.addMany(r),this.parts.add(this.contentView)),o&&(this.actionsView=new w3e(this.locale),this.actionsView.setButtons(o),this.parts.add(this.actionsView)),this._updateFocusCyclableItems()}focus(){this._focusCycler.focusFirst()}moveTo(e,n){const i=this._getViewportRect(),r=this._getDialogRect();e+r.width>i.right&&(e=i.right-r.width),e<i.left&&(e=i.left),n<i.top&&(n=i.top),this._moveTo(e,n)}_moveTo(e,n){this._left=e,this._top=n}moveBy(e,n){this.moveTo(this._left+e,this._top+n)}_moveOffScreen(){this._moveTo(-9999,-9999)}updatePosition(){if(!this.element||!this.element.parentNode)return;const e=this._getViewportRect();let n=this.position,i;this._getCurrentDomRoot()?i=this._getVisibleDomRootRect(e):n=js.SCREEN_CENTER;const r=db.defaultOffset,o=this._getDialogRect();if(this.position!=null){if(typeof this.position=="function"){const s=this.position(o,i);if(s==null){this._moveOffScreen();return}this._moveTo(s.left,s.top);return}switch(n){case js.EDITOR_TOP_SIDE:{if(i){const s=this.locale.contentLanguageDirection==="ltr"?i.right-o.width-r:i.left+r;this.moveTo(s,i.top+r)}else this._moveOffScreen();break}case js.EDITOR_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-o.width/2),Math.round(i.top+i.height/2-o.height/2)):this._moveOffScreen();break}case js.SCREEN_CENTER:{this.moveTo(Math.round((e.width-o.width)/2),Math.round((e.height-o.height)/2));break}case js.EDITOR_TOP_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-o.width/2),i.top+r):this._moveOffScreen();break}case js.EDITOR_BOTTOM_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-o.width/2),i.bottom-o.height-r):this._moveOffScreen();break}case js.EDITOR_ABOVE_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-o.width/2),i.top-o.height-r):this._moveOffScreen();break}case js.EDITOR_BELOW_CENTER:{i?this.moveTo(Math.round(i.left+i.width/2-o.width/2),i.bottom+r):this._moveOffScreen();break}}}}_getVisibleDomRootRect(e){let n=new Wt(this._getCurrentDomRoot()).getVisible();if(n){if(n=e.getIntersection(n),!n)return null}else return null;return n}_getDialogRect(){return new Wt(this.element.firstElementChild)}_getViewportRect(){const e=new Wt(Qe.window);return this.isModal?e:tG(this._getViewportOffset())}_updateFocusCyclableItems(){const e=[];if(this.contentView)for(const n of this.contentView.children)d0(n)&&e.push(n);this.actionsView&&e.push(this.actionsView),this.closeButtonView&&e.push(this.closeButtonView),e.forEach(n=>{this._focusables.add(n),this.focusTracker.add(n.element),y3e(n)&&this._focusCycler.chain(n.focusCycler)})}_createCloseButton(){const e=new wt(this.locale),n=this.locale.t;return e.set({label:n("Close"),tooltip:!0,icon:oO}),e.on("execute",()=>this.fire("close",{source:"closeButton"})),e}}let EY=class Vl extends xe{view;static _visibleDialogPlugin;_onHide;static get pluginName(){return"Dialog"}static get isOfficialPlugin(){return!0}constructor(e){super(e);const n=e.t;this._initShowHideListeners(),this._initFocusToggler(),this._initMultiRootIntegration(),this.set({id:null,isOpen:!1}),e.accessibility.addKeystrokeInfos({categoryId:"navigation",keystrokes:[{label:n("Move focus in and out of an active dialog window"),keystroke:"Ctrl+F6",mayRequireFn:!0}]})}destroy(){super.destroy(),Vl._visibleDialogPlugin===this&&this._unlockBodyScroll()}_initShowHideListeners(){this.on("show",(e,n)=>{this._show(n)}),this.on("show",(e,n)=>{n.onShow&&n.onShow(this)},{priority:"low"}),this.on("hide",()=>{Vl._visibleDialogPlugin&&Vl._visibleDialogPlugin._hide()}),this.on("hide",()=>{this._onHide&&(this._onHide(this),this._onHide=void 0)},{priority:"low"})}_initFocusToggler(){const e=this.editor;e.keystrokes.set("Ctrl+F6",(n,i)=>{!this.isOpen||this.view.isModal||(this.view.focusTracker.isFocused?e.editing.view.focus():this.view.focus(),i())})}_initMultiRootIntegration(){const e=this.editor.model;e.document.on("change:data",()=>{if(!this.view)return;const n=e.document.differ.getChangedRoots();for(const i of n)i.state&&this.view.updatePosition()})}show(e){this.hide(),this.fire(`show:${e.id}`,e)}_show({id:e,icon:n,title:i,hasCloseButton:r=!0,content:o,actionButtons:s,className:a,isModal:l,position:u,onHide:c,keystrokeHandlerOptions:d}){const f=this.editor;this.view=new db(f.locale,{getCurrentDomRoot:()=>f.editing.view.getDomRoot(f.model.document.selection.anchor.root.rootName),getViewportOffset:()=>f.ui.viewportOffset,keystrokeHandlerOptions:d});const h=this.view;h.on("close",()=>{this.hide()}),f.ui.view.body.add(h),f.keystrokes.listenTo(h.element),u||(u=l?js.SCREEN_CENTER:js.EDITOR_CENTER),l&&this._lockBodyScroll(),h.set({position:u,_isVisible:!0,className:a,isModal:l}),h.setupParts({icon:n,title:i,hasCloseButton:r,content:o,actionButtons:s}),this.id=e,c&&(this._onHide=c),this.isOpen=!0,Vl._visibleDialogPlugin=this}hide(){Vl._visibleDialogPlugin&&Vl._visibleDialogPlugin.fire(`hide:${Vl._visibleDialogPlugin.id}`)}_hide(){if(!this.view)return;const e=this.editor,n=this.view;n.isModal&&this._unlockBodyScroll(),n.contentView&&n.contentView.reset(),e.ui.view.body.remove(n),e.ui.focusTracker.remove(n.element),e.keystrokes.stopListening(n.element),n.destroy(),e.editing.view.focus(),this.id=null,this.isOpen=!1,Vl._visibleDialogPlugin=null}_lockBodyScroll(){document.documentElement.classList.add("ck-dialog-scroll-locked")}_unlockBodyScroll(){document.documentElement.classList.remove("ck-dialog-scroll-locked")}};class bg extends wt{_checkIconHolderView=new C3e;constructor(e,n=new TY){super(e,n),this.set({hasCheckSpace:!1,_hasCheck:this.isToggleable});const i=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-list-item-button",i.if("isToggleable","ck-list-item-button_toggleable")]}}),this.bind("_hasCheck").to(this,"hasCheckSpace",this,"isToggleable",(r,o)=>r||o)}render(){super.render(),this._hasCheck&&this.children.add(this._checkIconHolderView,0),this._watchCheckIconHolderMount()}_watchCheckIconHolderMount(){this._checkIconHolderView.bind("isOn").to(this,"isOn",e=>this.isToggleable&&e),this.on("change:_hasCheck",(e,n,i)=>{const{children:r,_checkIconHolderView:o}=this;i?r.add(o,0):r.remove(o)})}}class C3e extends ut{children;_checkIconView=this._createCheckIconView();constructor(){super();const e=this.bindTemplate;this.children=this.createCollection(),this.set("isOn",!1),this.setTemplate({tag:"span",children:this.children,attributes:{class:["ck","ck-list-item-button__check-holder",e.to("isOn",n=>n?"ck-on":"ck-off")]}})}render(){super.render(),this.isOn&&this.children.add(this._checkIconView,0),this._watchCheckIconMount()}_watchCheckIconMount(){this.on("change:isOn",(e,n,i)=>{const{children:r,_checkIconView:o}=this;i&&!r.has(o)?r.add(o):!i&&r.has(o)&&r.remove(o)})}_createCheckIconView(){const e=new Sa;return e.content=sO,e.extendTemplate({attributes:{class:"ck-list-item-button__check-icon"}}),e}}class Wi extends bg{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}class S3e extends xe{contentView=null;static get requires(){return[EY]}static get pluginName(){return"AccessibilityHelp"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t;e.ui.componentFactory.add("accessibilityHelp",()=>{const i=this._createButton(wt);return i.set({tooltip:!0,withText:!1,label:n("Accessibility help")}),i}),e.ui.componentFactory.add("menuBar:accessibilityHelp",()=>{const i=this._createButton(Wi);return i.label=n("Accessibility"),i}),e.keystrokes.set("Alt+0",(i,r)=>{this._toggleDialog(),r()}),this._setupRootLabels()}_createButton(e){const n=this.editor,i=n.plugins.get("Dialog"),r=n.locale,o=new e(r);return o.set({keystroke:"Alt+0",icon:lV,isToggleable:!0}),o.on("execute",()=>this._toggleDialog()),o.bind("isOn").to(i,"id",s=>s==="accessibilityHelp"),o}_setupRootLabels(){const e=this.editor,n=e.editing.view,i=e.t;e.ui.on("ready",()=>{n.change(o=>{for(const s of n.document.roots)r(o,s)}),e.on("addRoot",(o,s)=>{const a=e.editing.view.document.getRoot(s.rootName);n.change(l=>r(l,a))},{priority:"low"})});function r(o,s){const l=[s.getAttribute("aria-label"),i("Press %0 for help.",[l1("Alt+0")])].filter(u=>u).join(". ");o.setAttribute("aria-label",l,s)}}_toggleDialog(){const e=this.editor,n=e.plugins.get("Dialog"),i=e.locale.t;this.contentView||(this.contentView=new p3e(e.locale,e.accessibility.keystrokeInfos)),n.id==="accessibilityHelp"?n.hide():n.show({id:"accessibilityHelp",className:"ck-accessibility-help-dialog",title:i("Accessibility help"),icon:lV,hasCloseButton:!0,content:this.contentView})}}class Ks extends qr{locale;_bodyCollectionContainer;static _bodyWrapper;constructor(e,n=[]){super(n),this.locale=e}get bodyCollectionContainer(){return this._bodyCollectionContainer}attachToDom(){this._bodyCollectionContainer=new Io({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection,role:"application"},children:this}).render(),(!Ks._bodyWrapper||!Ks._bodyWrapper.isConnected)&&(Ks._bodyWrapper=Ko(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(Ks._bodyWrapper)),Ks._bodyWrapper.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove(),Ks._bodyWrapper&&!Ks._bodyWrapper.childElementCount&&(Ks._bodyWrapper.remove(),delete Ks._bodyWrapper)}}const MV=gg("px"),k3e={top:-99999,left:-99999,name:"arrowless",config:{withArrow:!1}};class Ki extends ut{content;_pinWhenIsVisibleCallback;_resizeObserver;constructor(e){super(e);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this._resizeObserver=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",n.to("position",i=>`ck-balloon-panel_${i}`),n.if("isVisible","ck-balloon-panel_visible"),n.if("withArrow","ck-balloon-panel_with-arrow"),n.to("class")],style:{top:n.to("top",MV),left:n.to("left",MV)}},children:this.content})}destroy(){this.hide(),super.destroy()}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){const n=Qw(e.target);if(n&&!vu(n))return!1;this.show();const i=Ki.defaultPositions,r=Object.assign({},{element:this.element,positions:[i.southArrowNorth,i.southArrowNorthMiddleWest,i.southArrowNorthMiddleEast,i.southArrowNorthWest,i.southArrowNorthEast,i.northArrowSouth,i.northArrowSouthMiddleWest,i.northArrowSouthMiddleEast,i.northArrowSouthWest,i.northArrowSouthEast,i.viewportStickyNorth],limiter:Qe.document.body,fitInViewport:!0},e),o=Ki._getOptimalPosition(r)||k3e,s=parseInt(o.left),a=parseInt(o.top),l=o.name,u=o.config||{},{withArrow:c=!0}=u;return this.top=a,this.left=s,this.position=l,this.withArrow=c,!0}pin(e){this.unpin(),this._startPinning(e)&&(this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback))}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){if(!this.attachTo(e))return!1;let n=Qw(e.target);const i=e.limiter?Qw(e.limiter):Qe.document.body;if(this.listenTo(Qe.document,"scroll",(r,o)=>{const s=o.target,a=n&&s.contains(n),l=i&&s.contains(i);(a||l||!n||!i)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(Qe.window,"resize",()=>{this.attachTo(e)}),!this._resizeObserver&&(n&&fi(n)&&(n=n.parentElement),n)){const r=()=>{vu(n)||this.unpin()};this._resizeObserver=new NM(n,r)}return!0}_stopPinning(){this.stopListening(Qe.document,"scroll"),this.stopListening(Qe.window,"resize"),this._resizeObserver&&(this._resizeObserver.destroy(),this._resizeObserver=null)}static generatePositions(e={}){const{sideOffset:n=Ki.arrowSideOffset,heightOffset:i=Ki.arrowHeightOffset,stickyVerticalOffset:r=Ki.stickyVerticalOffset,config:o}=e;return{northWestArrowSouthWest:(l,u)=>({top:s(l,u),left:l.left-n,name:"arrow_sw",...o&&{config:o}}),northWestArrowSouthMiddleWest:(l,u)=>({top:s(l,u),left:l.left-u.width*.25-n,name:"arrow_smw",...o&&{config:o}}),northWestArrowSouth:(l,u)=>({top:s(l,u),left:l.left-u.width/2,name:"arrow_s",...o&&{config:o}}),northWestArrowSouthMiddleEast:(l,u)=>({top:s(l,u),left:l.left-u.width*.75+n,name:"arrow_sme",...o&&{config:o}}),northWestArrowSouthEast:(l,u)=>({top:s(l,u),left:l.left-u.width+n,name:"arrow_se",...o&&{config:o}}),northArrowSouthWest:(l,u)=>({top:s(l,u),left:l.left+l.width/2-n,name:"arrow_sw",...o&&{config:o}}),northArrowSouthMiddleWest:(l,u)=>({top:s(l,u),left:l.left+l.width/2-u.width*.25-n,name:"arrow_smw",...o&&{config:o}}),northArrowSouth:(l,u)=>({top:s(l,u),left:l.left+l.width/2-u.width/2,name:"arrow_s",...o&&{config:o}}),northArrowSouthMiddleEast:(l,u)=>({top:s(l,u),left:l.left+l.width/2-u.width*.75+n,name:"arrow_sme",...o&&{config:o}}),northArrowSouthEast:(l,u)=>({top:s(l,u),left:l.left+l.width/2-u.width+n,name:"arrow_se",...o&&{config:o}}),northEastArrowSouthWest:(l,u)=>({top:s(l,u),left:l.right-n,name:"arrow_sw",...o&&{config:o}}),northEastArrowSouthMiddleWest:(l,u)=>({top:s(l,u),left:l.right-u.width*.25-n,name:"arrow_smw",...o&&{config:o}}),northEastArrowSouth:(l,u)=>({top:s(l,u),left:l.right-u.width/2,name:"arrow_s",...o&&{config:o}}),northEastArrowSouthMiddleEast:(l,u)=>({top:s(l,u),left:l.right-u.width*.75+n,name:"arrow_sme",...o&&{config:o}}),northEastArrowSouthEast:(l,u)=>({top:s(l,u),left:l.right-u.width+n,name:"arrow_se",...o&&{config:o}}),southWestArrowNorthWest:l=>({top:a(l),left:l.left-n,name:"arrow_nw",...o&&{config:o}}),southWestArrowNorthMiddleWest:(l,u)=>({top:a(l),left:l.left-u.width*.25-n,name:"arrow_nmw",...o&&{config:o}}),southWestArrowNorth:(l,u)=>({top:a(l),left:l.left-u.width/2,name:"arrow_n",...o&&{config:o}}),southWestArrowNorthMiddleEast:(l,u)=>({top:a(l),left:l.left-u.width*.75+n,name:"arrow_nme",...o&&{config:o}}),southWestArrowNorthEast:(l,u)=>({top:a(l),left:l.left-u.width+n,name:"arrow_ne",...o&&{config:o}}),southArrowNorthWest:l=>({top:a(l),left:l.left+l.width/2-n,name:"arrow_nw",...o&&{config:o}}),southArrowNorthMiddleWest:(l,u)=>({top:a(l),left:l.left+l.width/2-u.width*.25-n,name:"arrow_nmw",...o&&{config:o}}),southArrowNorth:(l,u)=>({top:a(l),left:l.left+l.width/2-u.width/2,name:"arrow_n",...o&&{config:o}}),southArrowNorthMiddleEast:(l,u)=>({top:a(l),left:l.left+l.width/2-u.width*.75+n,name:"arrow_nme",...o&&{config:o}}),southArrowNorthEast:(l,u)=>({top:a(l),left:l.left+l.width/2-u.width+n,name:"arrow_ne",...o&&{config:o}}),southEastArrowNorthWest:l=>({top:a(l),left:l.right-n,name:"arrow_nw",...o&&{config:o}}),southEastArrowNorthMiddleWest:(l,u)=>({top:a(l),left:l.right-u.width*.25-n,name:"arrow_nmw",...o&&{config:o}}),southEastArrowNorth:(l,u)=>({top:a(l),left:l.right-u.width/2,name:"arrow_n",...o&&{config:o}}),southEastArrowNorthMiddleEast:(l,u)=>({top:a(l),left:l.right-u.width*.75+n,name:"arrow_nme",...o&&{config:o}}),southEastArrowNorthEast:(l,u)=>({top:a(l),left:l.right-u.width+n,name:"arrow_ne",...o&&{config:o}}),westArrowEast:(l,u)=>({top:l.top+l.height/2-u.height/2,left:l.left-u.width-i,name:"arrow_e",...o&&{config:o}}),eastArrowWest:(l,u)=>({top:l.top+l.height/2-u.height/2,left:l.right+i,name:"arrow_w",...o&&{config:o}}),viewportStickyNorth:(l,u,c)=>{const d=new Wt(Qe.document.body).getIntersection(c.getVisible());if(!d)return null;const f=d.getVisible();return!l.getIntersection(f)||!(f.top-l.top-r<u.height&&f.bottom-l.bottom<u.height)?null:{top:f.top+r,left:l.left+l.width/2-u.width/2,name:"arrowless",config:{withArrow:!1,...o}}}};function s(l,u){return l.top-u.height-i}function a(l){return l.bottom+i}}static arrowSideOffset=25;static arrowHeightOffset=10;static stickyVerticalOffset=20;static _getOptimalPosition=BM;static defaultPositions=Ki.generatePositions()}function Qw(t){return Rc(t)?t:fS(t)?t.commonAncestorContainer:typeof t=="function"?Qw(t()):null}const T3e=50,E3e=350;class xY extends zo(){editor;_balloonView=null;_showBalloonThrottled=Km(()=>this._showBalloon(),50,{leading:!0});_lastFocusedEditableElement=null;_balloonClass;constructor(e,n={}){super(),this.editor=e,this._balloonClass=n.balloonClass,e.on("ready",()=>this._handleEditorReady())}destroy(){const e=this._balloonView;e&&(e.unpin(),this._balloonView=null),this._showBalloonThrottled.cancel(),this.stopListening()}_handleEditorReady(){const e=this.editor;this._isEnabled()&&e.ui.view&&(e.ui.focusTracker.on("change:isFocused",(n,i,r)=>{this._updateLastFocusedEditableElement(),r?this._showBalloon():this._hideBalloon()}),e.ui.focusTracker.on("change:focusedElement",(n,i,r)=>{this._updateLastFocusedEditableElement(),r&&this._showBalloon()}),e.ui.on("update",()=>{this._showBalloonThrottled()}))}_getNormalizedConfig(){return{side:this.editor.locale.contentLanguageDirection==="ltr"?"right":"left",position:"border",verticalOffset:0,horizontalOffset:5}}_showBalloon(){const e=this._getBalloonAttachOptions();e&&(this._balloonView||(this._balloonView=this._createBalloonView()),this._balloonView.pin(e))}_hideBalloon(){this._balloonView&&this._balloonView.unpin()}_createBalloonView(){const e=this.editor,n=new Ki,i=this._createBadgeContent();return n.content.add(i),this._balloonClass&&(n.class=this._balloonClass),e.ui.view.body.add(n),n}_getBalloonAttachOptions(){if(!this._lastFocusedEditableElement)return null;const e=this._getNormalizedConfig(),n=e.side==="right"?x3e(this._lastFocusedEditableElement,e):A3e(this._lastFocusedEditableElement,e);return{target:this._lastFocusedEditableElement,positions:[n]}}_updateLastFocusedEditableElement(){const e=this.editor,n=e.ui.focusTracker.isFocused,i=e.ui.focusTracker.focusedElement;if(!n||!i){this._lastFocusedEditableElement=null;return}const r=Array.from(e.ui.getEditableElementsNames()).map(o=>e.ui.getEditableElement(o));r.includes(i)?this._lastFocusedEditableElement=i:this._lastFocusedEditableElement=r[0]}}function x3e(t,e){return AY(t,e,(n,i)=>n.left+n.width-i.width-e.horizontalOffset)}function A3e(t,e){return AY(t,e,n=>n.left+e.horizontalOffset)}function AY(t,e,n){return(i,r)=>{const o=new Wt(t);if(o.width<E3e||o.height<T3e)return null;let s;e.position==="inside"?s=o.bottom-r.height:s=o.bottom-r.height/2,s-=e.verticalOffset;const a=n(o,r),u=i.clone().moveTo(a,s).getIntersection(r.clone().moveTo(a,s)).getVisible();return!u||u.getArea()<r.getArea()?null:{top:s,left:a,name:`position_${e.position}-side_${e.side}`,config:{withArrow:!1}}}}const P3e="Powered by";class I3e extends xY{constructor(e){super(e,{balloonClass:"ck-powered-by-balloon"})}_isEnabled(){const e=this.editor;if(e.config.get("ui.poweredBy.forceVisible"))return!0;const i=e.config.get("licenseKey");if(i=="GPL")return!0;const r=HM(i.split(".")[1]);return r?!r.whiteLabel:!0}_createBadgeContent(){return new R3e(this.editor.locale,this._getNormalizedConfig().label)}_getNormalizedConfig(){const e=super._getNormalizedConfig(),n=this.editor.config.get("ui.poweredBy")||{},i=n.position||e.position,r=i==="inside"?5:e.verticalOffset;return{position:i,side:n.side||e.side,label:n.label===void 0?P3e:n.label,verticalOffset:n.verticalOffset!==void 0?n.verticalOffset:r,horizontalOffset:n.horizontalOffset!==void 0?n.horizontalOffset:e.horizontalOffset,forceVisible:!!n.forceVisible}}}class R3e extends ut{constructor(e,n){super(e);const i=new Sa,r=this.bindTemplate;i.set({content:fNe,isColorInherited:!1}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-powered-by"],"aria-hidden":!0},children:[{tag:"a",attributes:{href:"https://ckeditor.com/powered-by-ckeditor/?utm_source=ckeditor&utm_medium=referral&utm_campaign=701Dn000000hVgmIAE_powered_by_ckeditor_logo",target:"_blank",tabindex:"-1"},children:[...n?[{tag:"span",attributes:{class:["ck","ck-powered-by__label"]},children:[n]}]:[],i],on:{dragstart:r.to(o=>o.preventDefault())}}]})}}class wS extends wt{toggleSwitchView;constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new ut;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}class OV extends PY(wt){}class M3e extends PY(bg){}function PY(t){class e extends t{_fileInputView;constructor(...i){super(...i),this._fileInputView=new O3e(this.locale),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.on("execute",()=>{this._fileInputView.open()}),this.extendTemplate({attributes:{class:"ck-file-dialog-button"}})}render(){super.render(),this.children.add(this._fileInputView)}}return e}class O3e extends ut{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const n=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:n.to("acceptedType"),multiple:n.to("allowMultipleFiles")},on:{change:n.to(()=>{this.element?.files?.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}class L3e extends ut{buttonView;children;constructor(e,n){super(e);const i=this.bindTemplate;this.set("isCollapsed",!1),this.set("label",""),this.buttonView=this._createButtonView(),this.children=this.createCollection(),this.set("_collapsibleAriaLabelUid",void 0),n&&this.children.addMany(n),this.setTemplate({tag:"div",attributes:{class:["ck","ck-collapsible",i.if("isCollapsed","ck-collapsible_collapsed")]},children:[this.buttonView,{tag:"div",attributes:{class:["ck","ck-collapsible__children"],role:"region",hidden:i.if("isCollapsed","hidden"),"aria-labelledby":i.to("_collapsibleAriaLabelUid")},children:this.children}]})}render(){super.render(),this._collapsibleAriaLabelUid=this.buttonView.labelView.element.id}focus(){this.buttonView.focus()}_createButtonView(){const e=new wt(this.locale),n=e.bindTemplate;return e.set({withText:!0,icon:yS}),e.extendTemplate({attributes:{"aria-expanded":n.to("isOn",i=>String(i))}}),e.bind("label").to(this),e.bind("isOn").to(this,"isCollapsed",i=>!i),e.on("execute",()=>{this.isCollapsed=!this.isCollapsed}),e}}function DA(t,e){const n=t.t,i={Black:n("Black"),"Dim grey":n("Dim grey"),Grey:n("Grey"),"Light grey":n("Light grey"),White:n("White"),Red:n("Red"),Orange:n("Orange"),Yellow:n("Yellow"),"Light green":n("Light green"),Green:n("Green"),Aquamarine:n("Aquamarine"),Turquoise:n("Turquoise"),"Light blue":n("Light blue"),Blue:n("Blue"),Purple:n("Purple")};return e.map(r=>{const o=i[r.label];return o&&o!=r.label&&(r.label=o),r})}function NA(t){return t.map(D3e).filter(e=>!!e)}function D3e(t){return typeof t=="string"?{model:t,label:t,hasBorder:!1,view:{name:"span",styles:{color:t}}}:{model:t.color,label:t.label||t.color,hasBorder:t.hasBorder===void 0?!1:t.hasBorder,view:{name:"span",styles:{color:`${t.color}`}}}}class IY extends wt{constructor(e){super(e);const n=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon=HDe,this.extendTemplate({attributes:{style:{backgroundColor:n.to("color",i=>vt.isMediaForcedColors?null:i)},class:["ck","ck-color-grid__tile",n.if("hasBorder","ck-color-selector__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}class LV extends ut{columns;items;focusTracker;keystrokes;constructor(e,n){super(e);const i=n&&n.colorDefinitions?n.colorDefinitions:[];this.columns=n?.columns||5;const r={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new wi,this.keystrokes=new Qi,this.items.on("add",(o,s)=>{s.isOn=s.color===this.selectedColor}),i.forEach(o=>{const s=new IY;s.set({color:o.color,label:o.label,tooltip:!0,hasBorder:o.options.hasBorder}),s.on("execute",()=>{this.fire("execute",{value:o.color,hasBorder:o.options.hasBorder,label:o.label})}),this.items.add(s)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:r}}),this.on("change:selectedColor",(o,s,a)=>{for(const l of this.items)l.isOn=l.color===a})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,n)=>{this.focusTracker.add(n.element)}),this.items.on("remove",(e,n)=>{this.focusTracker.remove(n.element)}),this.keystrokes.listenTo(this.element),kY({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns,uiLanguageDirection:this.locale?.uiLanguageDirection})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}function RY(t,e){if(!t)return"";const n=MY(t);if(!n)return"";if(n.space===e)return t;if(!F3e(n))return"";const r=$d[n.space][e];if(!r)return"";const o=r(n.space==="hex"?n.hexValue:n.values);return V3e(o,e)}function N3e(t){if(!t)return"";const e=MY(t);return e?e.space==="hex"?e.hexValue:RY(t,"hex"):"#000"}function B3e(t,e){customElements.get(t)===void 0&&customElements.define(t,e)}function V3e(t,e){switch(e){case"hex":return`#${t}`;case"rgb":return`rgb(${t[0]}, ${t[1]}, ${t[2]})`;case"hsl":return`hsl(${t[0]}, ${t[1]}%, ${t[2]}%)`;case"hwb":return`hwb(${t[0]}, ${t[1]}, ${t[2]})`;case"lab":return`lab(${t[0]}% ${t[1]} ${t[2]})`;case"lch":return`lch(${t[0]}% ${t[1]} ${t[2]})`;default:return""}}function MY(t){if(t.startsWith("#")){const n=pV(t);return{space:"hex",values:n.values,hexValue:t,alpha:n.alpha}}const e=pV(t);return e.space?e:null}function F3e(t){return Object.keys($d).includes(t.space)}class Go extends ut{fieldView;labelView;statusView;fieldWrapperChildren;constructor(e,n){super(e);const i=`ck-labeled-field-view-${Ur()}`,r=`ck-labeled-field-view-status-${Ur()}`;this.fieldView=n(this,i,r),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(i),this.statusView=this._createStatusView(r),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",(s,a)=>s||a);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",s=>!s),o.if("isEmpty","ck-labeled-field-view_empty"),o.if("isFocused","ck-labeled-field-view_focused"),o.if("placeholder","ck-labeled-field-view_placeholder"),o.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const n=new mc(this.locale);return n.for=e,n.bind("text").to(this,"label"),n}_createStatusView(e){const n=new ut(this.locale),i=this.bindTemplate;return n.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",i.if("errorText","ck-labeled-field-view__status_error"),i.if("_statusText","ck-hidden",r=>!r)],id:e,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]}),n}focus(e){this.fieldView.focus(e)}}class $3e extends ut{focusTracker;constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("tabIndex",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.set("ariaLabel",void 0),this.focusTracker=new wi,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0);const n=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",n.if("isFocused","ck-input_focused"),n.if("isEmpty","ck-input-text_empty"),n.if("hasError","ck-error")],id:n.to("id"),placeholder:n.to("placeholder"),tabindex:n.to("tabIndex"),readonly:n.to("isReadOnly"),"aria-invalid":n.if("hasError",!0),"aria-describedby":n.to("ariaDescribedById"),"aria-label":n.to("ariaLabel")},on:{input:n.to((...i)=>{this.fire("input",...i),this._updateIsEmpty()}),change:n.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,n,i)=>{this._setDomElementValue(i),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}reset(){this.value=this.element.value="",this._updateIsEmpty()}_updateIsEmpty(){this.isEmpty=z3e(this.element)}_setDomElementValue(e){this.element.value=!e&&e!==0?"":e}}function z3e(t){return!t.value}class OY extends $3e{constructor(e){super(e),this.set("inputMode","text");const n=this.bindTemplate;this.extendTemplate({attributes:{inputmode:n.to("inputMode")}})}}class LY extends OY{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class H3e extends OY{constructor(e,{min:n,max:i,step:r}={}){super(e);const o=this.bindTemplate;this.set("min",n),this.set("max",i),this.set("step",r),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:o.to("min"),max:o.to("max"),step:o.to("step")}})}}class U3e extends ut{children;constructor(e){super(e);const n=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",n.to("position",i=>`ck-dropdown__panel_${i}`),n.if("isVisible","ck-dropdown__panel-visible")],tabindex:"-1"},children:this.children,on:{selectstart:n.to(i=>{const r=i.target;r instanceof Element&&r.tagName.toLocaleLowerCase()==="input"||i.preventDefault()})}})}focus(){if(this.children.length){const e=this.children.first;typeof e.focus=="function"?e.focus():hn("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;typeof e.focusLast=="function"?e.focusLast():e.focus()}}}class p1 extends ut{buttonView;panelView;focusTracker;keystrokes;listView;toolbarView;menuView;constructor(e,n,i){super(e);const r=this.bindTemplate;this.buttonView=n,this.panelView=i,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Qi,this.focusTracker=new wi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",r.to("class"),r.if("isEnabled","ck-disabled",o=>!o)],id:r.to("id"),"aria-describedby":r.to("ariaDescribedById")},children:[n,i]}),n.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":r.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.on("change:isOpen",(n,i,r)=>{if(r)if(this.panelPosition==="auto"){const o=p1._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=o?o.name:this._defaultPanelPositionName}else this.panelView.position=this.panelPosition}),this.keystrokes.listenTo(this.element);const e=(n,i)=>{this.isOpen&&(this.isOpen=!1,i())};this.keystrokes.set("arrowdown",(n,i)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,i())}),this.keystrokes.set("arrowright",(n,i)=>{this.isOpen&&i()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:n,southEast:i,southWest:r,northEast:o,northWest:s,southMiddleEast:a,southMiddleWest:l,northMiddleEast:u,northMiddleWest:c}=p1.defaultPanelPositions;return this.locale.uiLanguageDirection!=="rtl"?[i,r,a,l,e,o,s,u,c,n]:[r,i,l,a,e,s,o,c,u,n]}get _defaultPanelPositionName(){return this.locale.uiLanguageDirection==="rtl"?"sw":"se"}static defaultPanelPositions={south:(e,n)=>({top:e.bottom,left:e.left-(n.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,n)=>({top:e.bottom,left:e.left-n.width+e.width,name:"sw"}),southMiddleEast:(e,n)=>({top:e.bottom,left:e.left-(n.width-e.width)/4,name:"sme"}),southMiddleWest:(e,n)=>({top:e.bottom,left:e.left-(n.width-e.width)*3/4,name:"smw"}),north:(e,n)=>({top:e.top-n.height,left:e.left-(n.width-e.width)/2,name:"n"}),northEast:(e,n)=>({top:e.top-n.height,left:e.left,name:"ne"}),northWest:(e,n)=>({top:e.top-n.height,left:e.left-n.width+e.width,name:"nw"}),northMiddleEast:(e,n)=>({top:e.top-n.height,left:e.left-(n.width-e.width)/4,name:"nme"}),northMiddleWest:(e,n)=>({top:e.top-n.height,left:e.left-(n.width-e.width)*3/4,name:"nmw"})};static _getOptimalPosition=BM}class DY extends wt{arrowView;constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",n=>String(n))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Sa;return e.content=yS,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}class $s extends ut{children;constructor(e){super(e);const n=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",n.if("isVisible","ck-hidden",i=>!i)],role:"presentation"},children:this.children})}focus(){this.children.first&&this.children.first.focus()}}class dO extends ut{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}class e_ extends ut{labelView;items;children;constructor(e,n=new mc){super(e);const i=this.bindTemplate,r=new jf(e);this.set({label:"",isVisible:!0}),this.labelView=n,this.labelView.bind("text").to(this,"label"),this.children=this.createCollection(),this.children.addMany([this.labelView,r]),r.set({role:"group",ariaLabelledBy:n.id}),r.focusTracker.destroy(),r.keystrokes.destroy(),this.items=r.items,this.setTemplate({tag:"li",attributes:{role:"presentation",class:["ck","ck-list__group",i.if("isVisible","ck-hidden",o=>!o)]},children:this.children})}focus(){if(this.items){const e=this.items.find(n=>!(n instanceof dO));e&&e.focus()}}}class jf extends ut{focusables;items;focusTracker;keystrokes;_focusCycler;_listItemGroupToChangeListeners=new WeakMap;constructor(e){super(e);const n=this.bindTemplate;this.focusables=new qr,this.items=this.createCollection(),this.focusTracker=new wi,this.keystrokes=new Qi,this._focusCycler=new Ho({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.set("ariaLabel",void 0),this.set("ariaLabelledBy",void 0),this.set("role",void 0),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"],role:n.to("role"),"aria-label":n.to("ariaLabel"),"aria-labelledby":n.to("ariaLabelledBy")},children:this.items})}render(){super.render();for(const e of this.items)e instanceof e_?this._registerFocusableItemsGroup(e):e instanceof $s&&this._registerFocusableListItem(e);this.items.on("change",(e,n)=>{for(const i of n.removed)i instanceof e_?this._deregisterFocusableItemsGroup(i):i instanceof $s&&this._deregisterFocusableListItem(i);for(const i of Array.from(n.added).reverse())i instanceof e_?this._registerFocusableItemsGroup(i,n.index):this._registerFocusableListItem(i,n.index)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusFirst(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_registerFocusableListItem(e,n){this.focusTracker.add(e.element),this.focusables.add(e,n)}_deregisterFocusableListItem(e){this.focusTracker.remove(e.element),this.focusables.remove(e)}_getOnGroupItemsChangeCallback(e){return(n,i)=>{for(const r of i.removed)this._deregisterFocusableListItem(r);for(const r of Array.from(i.added).reverse())this._registerFocusableListItem(r,this.items.getIndex(e)+i.index)}}_registerFocusableItemsGroup(e,n){Array.from(e.items).forEach((r,o)=>{const s=typeof n<"u"?n+o:void 0;this._registerFocusableListItem(r,s)});const i=this._getOnGroupItemsChangeCallback(e);this._listItemGroupToChangeListeners.set(e,i),e.items.on("change",i)}_deregisterFocusableItemsGroup(e){for(const n of e.items)this._deregisterFocusableListItem(n);e.items.off("change",this._listItemGroupToChangeListeners.get(e)),this._listItemGroupToChangeListeners.delete(e)}}class NY extends ut{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class W3e extends ut{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function q3e(t){return t.bindTemplate.to(e=>{e.target===t.element&&e.preventDefault()})}function BY(t){if(Array.isArray(t))return{items:t,removeItems:[]};const e={items:[],removeItems:[]};return t?{...e,...t}:e}const j3e={alignLeft:rO,bold:lY,importExport:XDe,paragraph:lNe,plus:dNe,text:ENe,threeVerticalDots:aO,pilcrow:cNe,dragIndicator:WDe};class Xm extends ut{options;items;focusTracker;keystrokes;itemsView;children;focusables;_focusCycler;_behavior;constructor(e,n){super(e);const i=this.bindTemplate,r=this.t;this.options=n||{},this.set("ariaLabel",r("Editor toolbar")),this.set("maxWidth","auto"),this.set("role","toolbar"),this.set("isGrouping",!!this.options.shouldGroupWhenFull),this.items=this.createCollection(),this.focusTracker=new wi,this.keystrokes=new Qi,this.set("class",void 0),this.set("isCompact",!1),this.set("isVertical",!1),this.itemsView=new K3e(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const o=e.uiLanguageDirection==="rtl";this._focusCycler=new Ho({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[o?"arrowright":"arrowleft","arrowup"],focusNext:[o?"arrowleft":"arrowright","arrowdown"]}});const s=["ck","ck-toolbar",i.to("class"),i.if("isCompact","ck-toolbar_compact"),i.if("isGrouping","ck-toolbar_grouping"),i.if("isVertical","ck-toolbar_vertical")];this.options.shouldGroupWhenFull&&this.options.isFloating&&s.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:s,role:i.to("role"),"aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")},tabindex:-1},children:this.children,on:{mousedown:q3e(this)}}),this._behavior=this.options.shouldGroupWhenFull?new NV(this):new DV(this)}render(){super.render(),this.focusTracker.add(this.element);for(const e of this.items)this.focusTracker.add(e);this.items.on("add",(e,n)=>{this.focusTracker.add(n)}),this.items.on("remove",(e,n)=>{this.focusTracker.remove(n)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,n,i){this.items.addMany(this._buildItemsFromConfig(e,n,i))}switchBehavior(e){this._behavior.type!==e&&(this._behavior.destroy(),this.itemsView.children.clear(),this.focusables.clear(),e==="dynamic"?(this._behavior=new NV(this),this._behavior.render(this),this._behavior.refreshItems()):(this._behavior=new DV(this),this._behavior.render(this)))}_buildItemsFromConfig(e,n,i){const r=BY(e),o=i||r.removeItems;return this._cleanItemsConfiguration(r.items,n,o).map(a=>so(a)?this._createNestedToolbarDropdown(a,n,o):a==="|"?new NY:a==="-"?new W3e:n.create(a)).filter(a=>!!a)}_cleanItemsConfiguration(e,n,i){const r=e.filter((o,s,a)=>o==="|"?!0:i.indexOf(o)!==-1?!1:o==="-"?this.options.shouldGroupWhenFull?(hn("toolbarview-line-break-ignored-when-grouping-items",a),!1):!0:!so(o)&&!n.has(o)?(hn("toolbarview-item-unavailable",{item:o}),!1):!0);return this._cleanSeparatorsAndLineBreaks(r)}_cleanSeparatorsAndLineBreaks(e){const n=s=>s!=="-"&&s!=="|",i=e.length,r=e.findIndex(n);if(r===-1)return[];const o=i-e.slice().reverse().findIndex(n);return e.slice(r,o).filter((s,a,l)=>n(s)?!0:!(a>0&&l[a-1]===s))}_createNestedToolbarDropdown(e,n,i){let{label:r,icon:o,items:s,tooltip:a=!0,withText:l=!1}=e;if(s=this._cleanItemsConfiguration(s,n,i),!s.length)return null;const u=this.locale,c=Ro(u);return r||hn("toolbarview-nested-toolbar-dropdown-missing-label",e),c.class="ck-toolbar__nested-toolbar-dropdown",c.buttonView.set({label:r,tooltip:a,withText:!!l}),o!==!1?c.buttonView.icon=j3e[o]||o||aO:c.buttonView.withText=!0,CS(c,()=>c.toolbarView._buildItemsFromConfig(s,n,i)),c}}class K3e extends ut{children;constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class DV{type="static";constructor(e){e.isGrouping=!1,e.itemsView.children.bindTo(e.items).using(n=>n),e.focusables.bindTo(e.items).using(n=>d0(n)?n:null)}render(){}destroy(){}}class NV{type="dynamic";view;viewChildren;viewFocusables;viewItemsView;viewFocusTracker;viewLocale;ungroupedItems;groupedItems;groupedItemsDropdown;resizeObserver=null;cachedPadding=null;shouldUpdateGroupingOnNextResize=!1;viewElement;constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.view.isGrouping=!0,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),e.itemsView.children.bindTo(this.ungroupedItems).using(n=>n),this.ungroupedItems.on("change",this._updateFocusCyclableItems.bind(this)),e.children.on("change",this._updateFocusCyclableItems.bind(this)),e.items.on("change",(n,i)=>{const r=i.index,o=Array.from(i.added);for(const s of i.removed)r>=this.ungroupedItems.length?this.groupedItems.remove(s):this.ungroupedItems.remove(s);for(let s=r;s<r+o.length;s++){const a=o[s-r];s>this.ungroupedItems.length?this.groupedItems.add(a,s-this.ungroupedItems.length):this.ungroupedItems.add(a,s)}this._updateGrouping()})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.viewChildren.length>1&&(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last)),this.resizeObserver.destroy()}refreshItems(){const e=this.view;if(e.items.length){for(let n=0;n<e.items.length;n++){const i=[...e.items][n];this.ungroupedItems.add(i,n)}this._updateGrouping()}}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!vu(this.viewElement)){this.shouldUpdateGroupingOnNextResize=!0;return}const e=this.groupedItems.length;let n;for(;this._areItemsOverflowing;)this._groupLastItem(),n=!0;if(!n&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,n=this.viewLocale.uiLanguageDirection,i=new Wt(e.lastChild),r=new Wt(e);if(!this.cachedPadding){const o=Qe.window.getComputedStyle(e),s=n==="ltr"?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(o[s])}return n==="ltr"?i.right>r.right-this.cachedPadding:i.left<r.left+this.cachedPadding}_enableGroupingOnResize(){let e;this.resizeObserver=new NM(this.viewElement,n=>{(!e||e!==n.contentRect.width||this.shouldUpdateGroupingOnNextResize)&&(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=n.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new NY),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,n=e.t,i=Ro(e);return i.class="ck-toolbar__grouped-dropdown",i.panelPosition=e.uiLanguageDirection==="ltr"?"sw":"se",CS(i,this.groupedItems),i.buttonView.set({label:n("Show more items"),tooltip:!0,tooltipPosition:e.uiLanguageDirection==="rtl"?"se":"sw",icon:aO}),i}_updateFocusCyclableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{d0(e)&&this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}class _S extends ut{children;actionView;arrowView;keystrokes;focusTracker;constructor(e,n){super(e);const i=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(n),this.arrowView=this._createArrowView(),this.keystrokes=new Qi,this.focusTracker=new wi,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",i.to("class"),i.if("isVisible","ck-hidden",r=>!r),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",(e,n)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),n())}),this.keystrokes.set("arrowleft",(e,n)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),n())})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(e){const n=e||new wt;return e||n.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),n.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),n.delegate("execute").to(this),n}_createArrowView(){const e=new wt,n=e.bindTemplate;return e.icon=yS,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":n.to("isOn"),"aria-haspopup":!0,"aria-expanded":n.to("isOn",i=>String(i))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}function Ro(t,e=DY){const n=typeof e=="function"?new e(t):e,i=new U3e(t),r=new p1(t,n,i);return n.bind("isEnabled").to(r),n instanceof _S?n.arrowView.bind("isOn").to(r,"isOpen"):n.bind("isOn").to(r,"isOpen"),G3e(r),r}function CS(t,e,n={}){t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.isOpen?BV(t,e,n):t.once("change:isOpen",()=>BV(t,e,n),{priority:"highest"}),n.enableActiveItemFocusOnDropdownOpen&&fO(t,()=>t.toolbarView.items.find(i=>i.isOn))}function BV(t,e,n){const i=t.locale,r=i.t,o=t.toolbarView=new Xm(i),s=typeof e=="function"?e():e;o.ariaLabel=n.ariaLabel||r("Dropdown toolbar"),n.maxWidth&&(o.maxWidth=n.maxWidth),n.class&&(o.class=n.class),n.isCompact&&(o.isCompact=n.isCompact),n.isVertical&&(o.isVertical=!0),s instanceof qr?o.items.bindTo(s).using(a=>a):o.items.addMany(s),t.panelView.children.add(o),t.focusTracker.add(o),o.items.delegate("execute").to(t)}function f0(t,e,n={}){t.isOpen?VV(t,e,n):t.once("change:isOpen",()=>VV(t,e,n),{priority:"highest"}),fO(t,()=>t.listView.items.find(i=>i instanceof $s?i.children.first.isOn:!1))}function VV(t,e,n){const i=t.locale,r=t.listView=new jf(i),o=typeof e=="function"?e():e;r.ariaLabel=n.ariaLabel,r.role=n.role,FY(t,r.items,o,i),t.panelView.children.add(r),r.items.delegate("execute").to(t)}function fO(t,e){t.on("change:isOpen",()=>{if(!t.isOpen)return;const n=e();n&&(typeof n.focus=="function"?n.focus():hn("ui-dropdown-focus-child-on-open-child-missing-focus",{view:n}))},{priority:ou.low-10})}function G3e(t){Y3e(t),X3e(t),J3e(t),Z3e(t),Q3e(t),eBe(t)}function Y3e(t){Wf({emitter:t,activator:()=>t.isRendered&&t.isOpen,callback:()=>{t.isOpen=!1},contextElements:()=>[t.element,...VY(t.focusTracker).filter(e=>!t.element.contains(e))]})}function VY(t){return[...t.elements,...t.externalViews.flatMap(e=>VY(e.focusTracker))]}function X3e(t){t.on("execute",e=>{e.source instanceof wS||(t.isOpen=!1)})}function J3e(t){t.focusTracker.on("change:isFocused",(e,n,i)=>{i||!t.isOpen||(t.isOpen=!1)})}function Z3e(t){t.keystrokes.set("arrowdown",(e,n)=>{t.isOpen&&(t.panelView.focus(),n())}),t.keystrokes.set("arrowup",(e,n)=>{t.isOpen&&(t.panelView.focusLast(),n())})}function Q3e(t){t.on("change:isOpen",(e,n,i)=>{if(i)return;t.focusTracker.elements.some(o=>o.contains(Qe.document.activeElement))&&t.buttonView.focus()})}function eBe(t){t.on("change:isOpen",(e,n,i)=>{i&&t.panelView.focus()},{priority:"low"})}function FY(t,e,n,i){tBe(e),e.bindTo(n).using(r=>{if(r.type==="separator")return new dO(i);if(r.type==="group"){const o=new e_(i);return o.set({label:r.label}),FY(t,o.items,r.items,i),o.items.delegate("execute").to(t),o}else if(r.type==="button"||r.type==="switchbutton"){const o=r.model.role==="menuitemcheckbox"||r.model.role==="menuitemradio",s=new $s(i);let a;return r.type==="button"?(a=new bg(i,r.labelView),a.set({isToggleable:o})):a=new wS(i),a.bind(...Object.keys(r.model)).to(r.model),a.delegate("execute").to(s),s.children.add(a),s}return null})}function tBe(t){let e=0;const n=o=>!(o instanceof $s)||!(o.children.first instanceof bg)?null:o.children.first,i=o=>{const s=n(o);return!s||!s.isToggleable?null:s},r=o=>{for(const s of t){const a=n(s);a&&(a.hasCheckSpace=o)}};t.on("change",(o,s)=>{const a=e>0;for(const u of s.removed)i(u)&&e--;for(const u of s.added){const c=n(u);c&&(c.isToggleable&&e++,c.hasCheckSpace=e>0)}const l=e>0;a!==l&&r(l)})}const tu=(t,e,n)=>{const i=new LY(t.locale);return i.set({id:e,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",r=>!r),i.bind("hasError").to(t,"errorText",r=>!!r),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused","placeholder").to(i),i},nBe=(t,e,n)=>{const i=new H3e(t.locale);return i.set({id:e,ariaDescribedById:n,inputMode:"numeric"}),i.bind("isReadOnly").to(t,"isEnabled",r=>!r),i.bind("hasError").to(t,"errorText",r=>!!r),i.on("input",()=>{t.errorText=null}),t.bind("isEmpty","isFocused","placeholder").to(i),i},iBe=(t,e,n)=>{const i=Ro(t.locale);return i.set({id:e,ariaDescribedById:n}),i.bind("isEnabled").to(t),i},rBe=150;class oBe extends ut{hexInputRow;_debounceColorPickerEvent;_config;constructor(e,n={}){super(e),this.set({color:"",_hexColor:""}),this.hexInputRow=this._createInputRow();const i=this.createCollection();n.hideInput||i.add(this.hexInputRow),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker"],tabindex:-1},children:i}),this._config=n,this._debounceColorPickerEvent=ml(r=>{this.set("color",r),this.fire("colorSelected",{color:this.color})},rBe,{leading:!0}),this.on("set:color",(r,o,s)=>{r.return=RY(s,this._config.format||"hsl")}),this.on("change:color",()=>{this._hexColor=WT(this.color)}),this.on("change:_hexColor",()=>{document.activeElement!==this.picker&&this.picker.setAttribute("color",this._hexColor),WT(this.color)!=WT(this._hexColor)&&(this.color=this._hexColor)})}render(){if(super.render(),B3e("hex-color-picker",e3e),this.picker=Qe.document.createElement("hex-color-picker"),this.picker.setAttribute("class","hex-color-picker"),this.picker.setAttribute("tabindex","-1"),this._createSlidersView(),this.element){this.hexInputRow.element?this.element.insertBefore(this.picker,this.hexInputRow.element):this.element.appendChild(this.picker);const e=document.createElement("style");e.textContent='[role="slider"]:focus [part$="pointer"] {border: 1px solid #fff;outline: 1px solid var(--ck-color-focus-border);box-shadow: 0 0 0 2px #fff;}',this.picker.shadowRoot.appendChild(e)}this.picker.addEventListener("color-changed",e=>{const n=e.detail.value;this._debounceColorPickerEvent(n)})}focus(){!this._config.hideInput&&(vt.isGecko||vt.isiOS||vt.isSafari||vt.isBlink)&&this.hexInputRow.children.get(1).focus(),this.slidersView.first.focus()}_createSlidersView(){const i=[...this.picker.shadowRoot.children].filter(r=>r.getAttribute("role")==="slider").map(r=>new sBe(r));this.slidersView=this.createCollection(),i.forEach(r=>{this.slidersView.add(r)})}_createInputRow(){const e=this._createColorInput();return new lBe(this.locale,e)}_createColorInput(){const e=new Go(this.locale,tu),{t:n}=this.locale;return e.set({label:n("HEX"),class:"color-picker-hex-input"}),e.fieldView.bind("value").to(this,"_hexColor",i=>e.isFocused?e.fieldView.value:i.startsWith("#")?i.substring(1):i),e.fieldView.on("input",()=>{const i=e.fieldView.element.value;if(i){const r=$Y(i);r&&this._debounceColorPickerEvent(r)}}),e}isValid(){const{t:e}=this.locale;return this._config.hideInput?!0:(this.resetValidationStatus(),this.hexInputRow.getParsedColor()?!0:(this.hexInputRow.inputView.errorText=e('Please enter a valid color (e.g. "ff0000").'),!1))}resetValidationStatus(){this.hexInputRow.inputView.errorText=null}}function WT(t){let e=N3e(t);return e||(e="#000"),e.length===4&&(e="#"+[e[1],e[1],e[2],e[2],e[3],e[3]].join("")),e.toLowerCase()}class sBe extends ut{constructor(e){super(),this.element=e}focus(){this.element.focus()}}class aBe extends ut{constructor(e){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__hash-view"]},children:"#"})}}class lBe extends ut{children;inputView;constructor(e,n){super(e),this.inputView=n,this.children=this.createCollection([new aBe,this.inputView]),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-picker__row"]},children:this.children})}getParsedColor(){return $Y(this.inputView.fieldView.element.value)}}function $Y(t){if(!t)return null;const e=t.trim().replace(/^#/,"");return![3,4,6,8].includes(e.length)||!/^(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/.test(e)?null:`#${e}`}class uBe extends Ln(Er){constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",this.length===0)})}add(e,n){return this.find(i=>i.color===e.color)?this:super.add(e,n)}hasColor(e){return!!this.find(n=>n.color===e)}}class cBe extends ut{items;colorDefinitions;focusTracker;columns;documentColors;documentColorsCount;staticColorsGrid;documentColorsGrid;colorPickerButtonView;removeColorButtonView;_focusables;_documentColorsLabel;_removeButtonLabel;_colorPickerLabel;constructor(e,{colors:n,columns:i,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerLabel:a,focusTracker:l,focusables:u}){super(e);const c=this.bindTemplate;this.set("isVisible",!0),this.focusTracker=l,this.items=this.createCollection(),this.colorDefinitions=n,this.columns=i,this.documentColors=new uBe,this.documentColorsCount=s,this._focusables=u,this._removeButtonLabel=r,this._colorPickerLabel=a,this._documentColorsLabel=o,this.setTemplate({tag:"div",attributes:{class:["ck-color-grids-fragment",c.if("isVisible","ck-hidden",d=>!d)]},children:this.items}),this.removeColorButtonView=this._createRemoveColorButton(),this.items.add(this.removeColorButtonView)}updateDocumentColors(e,n){const i=e.document,r=this.documentColorsCount;this.documentColors.clear();for(const o of i.getRoots()){const s=e.createRangeIn(o);for(const a of s.getItems())if(a.is("$textProxy")&&a.hasAttribute(n)&&(this._addColorToDocumentColors(a.getAttribute(n)),this.documentColors.length>=r))return}}updateSelectedColors(){const e=this.documentColorsGrid,n=this.staticColorsGrid,i=this.selectedColor;n.selectedColor=i,e&&(e.selectedColor=i)}render(){if(super.render(),this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount){const e=Io.bind(this.documentColors,this.documentColors),n=new ut(this.locale);n.setTemplate({tag:"span",attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]},children:[{text:this._documentColorsLabel}]}),this.items.add(n),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}this._createColorPickerButton(),this._addColorSelectorElementsToFocusTracker()}focus(){this.removeColorButtonView.focus()}destroy(){super.destroy()}addColorPickerButton(){this.colorPickerButtonView&&(this.items.add(this.colorPickerButtonView),this.focusTracker.add(this.colorPickerButtonView.element),this._focusables.add(this.colorPickerButtonView))}_addColorSelectorElementsToFocusTracker(){this.focusTracker.add(this.removeColorButtonView.element),this._focusables.add(this.removeColorButtonView),this.staticColorsGrid&&(this.focusTracker.add(this.staticColorsGrid.element),this._focusables.add(this.staticColorsGrid)),this.documentColorsGrid&&(this.focusTracker.add(this.documentColorsGrid.element),this._focusables.add(this.documentColorsGrid))}_createColorPickerButton(){this.colorPickerButtonView=new wt,this.colorPickerButtonView.set({label:this._colorPickerLabel,withText:!0,icon:zDe,class:"ck-color-selector__color-picker"}),this.colorPickerButtonView.on("execute",()=>{this.fire("colorPicker:show")})}_createRemoveColorButton(){const e=new wt;return e.set({withText:!0,icon:qDe,label:this._removeButtonLabel}),e.class="ck-color-selector__remove-color",e.on("execute",()=>{this.fire("execute",{value:null,source:"removeColorButton"})}),e.render(),e}_createStaticColorsGrid(){const e=new LV(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.on("execute",(n,i)=>{this.fire("execute",{value:i.value,source:"staticColorsGrid"})}),e}_createDocumentColorsGrid(){const e=Io.bind(this.documentColors,this.documentColors),n=new LV(this.locale,{columns:this.columns});return n.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),n.items.bindTo(this.documentColors).using(i=>{const r=new IY;return r.set({color:i.color,hasBorder:i.options?.hasBorder}),i.label&&r.set({label:i.label,tooltip:!0}),r.on("execute",()=>{this.fire("execute",{value:i.color,source:"documentColorsGrid"})}),r}),this.documentColors.on("change:isEmpty",(i,r,o)=>{o&&(n.selectedColor=null)}),n}_addColorToDocumentColors(e){const n=this.colorDefinitions.find(i=>i.color===e);n?this.documentColors.add(Object.assign({},n)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}class dBe extends ut{items;colorPickerView;saveButtonView;cancelButtonView;actionBarView;focusTracker;keystrokes;_focusables;_colorPickerViewConfig;constructor(e,{focusTracker:n,focusables:i,keystrokes:r,colorPickerViewConfig:o}){super(e),this.items=this.createCollection(),this.focusTracker=n,this.keystrokes=r,this.set("isVisible",!1),this.set("selectedColor",void 0),this._focusables=i,this._colorPickerViewConfig=o;const s=this.bindTemplate,{saveButtonView:a,cancelButtonView:l}=this._createActionButtons();this.saveButtonView=a,this.cancelButtonView=l,this.actionBarView=this._createActionBarView({saveButtonView:a,cancelButtonView:l}),this.setTemplate({tag:"div",attributes:{class:["ck-color-picker-fragment",s.if("isVisible","ck-hidden",u=>!u)]},children:this.items})}render(){super.render();const e=new oBe(this.locale,{...this._colorPickerViewConfig});this.colorPickerView=e,this.colorPickerView.render(),this.selectedColor&&(e.color=this.selectedColor),this.listenTo(this,"change:selectedColor",(n,i,r)=>{e.color=r}),this.items.add(this.colorPickerView),this.items.add(this.actionBarView),this._addColorPickersElementsToFocusTracker(),this._stopPropagationOnArrowsKeys(),this._executeOnEnterPress(),this._executeUponColorChange()}destroy(){super.destroy()}focus(){this.colorPickerView.focus()}resetValidationStatus(){this.colorPickerView.resetValidationStatus()}_executeOnEnterPress(){this.keystrokes.set("enter",e=>{this.isVisible&&this.focusTracker.focusedElement!==this.cancelButtonView.element&&this.colorPickerView.isValid()&&(this.fire("execute",{value:this.selectedColor}),e.stopPropagation(),e.preventDefault())})}_stopPropagationOnArrowsKeys(){const e=n=>n.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}_addColorPickersElementsToFocusTracker(){for(const n of this.colorPickerView.slidersView)this.focusTracker.add(n.element),this._focusables.add(n);const e=this.colorPickerView.hexInputRow.children.get(1);e.element&&(this.focusTracker.add(e.element),this._focusables.add(e)),this.focusTracker.add(this.saveButtonView.element),this._focusables.add(this.saveButtonView),this.focusTracker.add(this.cancelButtonView.element),this._focusables.add(this.cancelButtonView)}_createActionBarView({saveButtonView:e,cancelButtonView:n}){const i=new ut,r=this.createCollection();return r.add(e),r.add(n),i.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector_action-bar"]},children:r}),i}_createActionButtons(){const e=this.locale,n=e.t,i=new wt(e),r=new wt(e);return i.set({icon:sO,class:"ck-button-save",type:"button",withText:!1,label:n("Accept")}),r.set({icon:oO,class:"ck-button-cancel",type:"button",withText:!1,label:n("Cancel")}),i.on("execute",()=>{this.colorPickerView.isValid()&&this.fire("execute",{source:"colorPickerSaveButton",value:this.selectedColor})}),r.on("execute",()=>{this.fire("colorPicker:cancel")}),{saveButtonView:i,cancelButtonView:r}}_executeUponColorChange(){this.colorPickerView.on("colorSelected",(e,n)=>{this.fire("execute",{value:n.color,source:"colorPicker"}),this.set("selectedColor",n.color)})}}class hO extends ut{focusTracker;keystrokes;items;colorGridsFragmentView;colorPickerFragmentView;_focusCycler;_focusables;_colorPickerViewConfig;constructor(e,{colors:n,columns:i,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerLabel:a,colorPickerViewConfig:l}){super(e),this.items=this.createCollection(),this.focusTracker=new wi,this.keystrokes=new Qi,this._focusables=new qr,this._colorPickerViewConfig=l,this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.colorGridsFragmentView=new cBe(e,{colors:n,columns:i,removeButtonLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerLabel:a,focusTracker:this.focusTracker,focusables:this._focusables}),this.colorPickerFragmentView=new dBe(e,{focusables:this._focusables,focusTracker:this.focusTracker,keystrokes:this.keystrokes,colorPickerViewConfig:l}),this.set("_isColorGridsFragmentVisible",!0),this.set("_isColorPickerFragmentVisible",!1),this.set("selectedColor",void 0),this.colorGridsFragmentView.bind("isVisible").to(this,"_isColorGridsFragmentVisible"),this.colorPickerFragmentView.bind("isVisible").to(this,"_isColorPickerFragmentVisible"),this.on("change:selectedColor",(u,c,d)=>{this.colorGridsFragmentView.set("selectedColor",d),this.colorPickerFragmentView.set("selectedColor",d)}),this.colorGridsFragmentView.on("change:selectedColor",(u,c,d)=>{this.set("selectedColor",d)}),this.colorPickerFragmentView.on("change:selectedColor",(u,c,d)=>{this.set("selectedColor",d)}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-selector"]},children:this.items})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendUI(){this._appendColorGridsFragment(),this._colorPickerViewConfig&&this._appendColorPickerFragment()}showColorPickerFragment(){!this.colorPickerFragmentView.colorPickerView||this._isColorPickerFragmentVisible||(this._isColorPickerFragmentVisible=!0,this.colorPickerFragmentView.focus(),this.colorPickerFragmentView.resetValidationStatus(),this._isColorGridsFragmentVisible=!1)}showColorGridsFragment(){this._isColorGridsFragmentVisible||(this._isColorGridsFragmentVisible=!0,this.colorGridsFragmentView.focus(),this._isColorPickerFragmentVisible=!1)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}updateDocumentColors(e,n){this.colorGridsFragmentView.updateDocumentColors(e,n)}updateSelectedColors(){this.colorGridsFragmentView.updateSelectedColors()}_appendColorGridsFragment(){this.items.length||(this.items.add(this.colorGridsFragmentView),this.colorGridsFragmentView.delegate("execute").to(this),this.colorGridsFragmentView.delegate("colorPicker:show").to(this))}_appendColorPickerFragment(){this.items.length!==2&&(this.items.add(this.colorPickerFragmentView),this.colorGridsFragmentView.colorPickerButtonView&&this.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{this.showColorPickerFragment()}),this.colorGridsFragmentView.addColorPickerButton(),this.colorPickerFragmentView.delegate("execute").to(this),this.colorPickerFragmentView.delegate("colorPicker:cancel").to(this))}}class fBe{editor;_components=new Map;constructor(e){this.editor=e}*names(){for(const e of this._components.values())yield e.originalName}add(e,n){this._components.set(qT(e),{callback:n,originalName:e})}create(e){if(!this.has(e))throw new oe("componentfactory-item-missing",this,{name:e});return this._components.get(qT(e)).callback(this.editor.locale)}has(e){return this._components.has(qT(e))}}function qT(t){return String(t).toLowerCase()}const FV="ck-tooltip";class Yr extends zo(){tooltipTextView;balloonPanelView;static defaultBalloonPositions=Ki.generatePositions({heightOffset:5,sideOffset:13});_currentElementWithTooltip=null;_currentTooltipPosition=null;_mutationObserver=null;_pinTooltipDebounced;_unpinTooltipDebounced;_watchdogExcluded;static _editors=new Set;static _instance=null;constructor(e){if(super(),Yr._editors.add(e),Yr._instance)return Yr._instance;Yr._instance=this,this.tooltipTextView=new ut(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new Ki(e.locale),this.balloonPanelView.class=FV,this.balloonPanelView.content.add(this.tooltipTextView),this._mutationObserver=hBe(()=>{this._updateTooltipPosition()}),this._pinTooltipDebounced=ml(this._pinTooltip,600),this._unpinTooltipDebounced=ml(this._unpinTooltip,400),this.listenTo(Qe.document,"keydown",this._onKeyDown.bind(this),{useCapture:!0}),this.listenTo(Qe.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Qe.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Qe.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(Qe.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(Qe.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const n=e.ui.view&&e.ui.view.body;Yr._editors.delete(e),this.stopListening(e.ui),n&&n.has(this.balloonPanelView)&&n.remove(this.balloonPanelView),Yr._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),Yr._instance=null)}static getPositioningFunctions(e){const n=Yr.defaultBalloonPositions;return{s:[n.southArrowNorth,n.southArrowNorthEast,n.southArrowNorthWest],n:[n.northArrowSouth],e:[n.eastArrowWest],w:[n.westArrowEast],sw:[n.southArrowNorthEast],se:[n.southArrowNorthWest]}[e]}_onKeyDown(e,n){n.key==="Escape"&&this._currentElementWithTooltip&&(this._unpinTooltip(),n.stopPropagation())}_onEnterOrFocus(e,{target:n}){const i=jT(n);if(!i){e.name==="focus"&&this._unpinTooltip();return}if(i===this._currentElementWithTooltip){this._unpinTooltipDebounced.cancel();return}this._unpinTooltip(),e.name==="focus"&&!i.matches(":hover")||i.matches("[data-cke-tooltip-instant]")?this._pinTooltip(i,KT(i)):this._pinTooltipDebounced(i,KT(i))}_onLeaveOrBlur(e,{target:n,relatedTarget:i}){if(e.name==="mouseleave"){if(!Rc(n))return;const r=this.balloonPanelView.element,o=r&&(r===i||r.contains(i)),s=!o&&n===r;if(o){this._unpinTooltipDebounced.cancel();return}if(!s&&this._currentElementWithTooltip&&n!==this._currentElementWithTooltip)return;const a=jT(n),l=jT(i);(s||a&&a!==l)&&(this._pinTooltipDebounced.cancel(),this._currentElementWithTooltip&&this._currentElementWithTooltip.matches("[data-cke-tooltip-instant]")||a&&a.matches("[data-cke-tooltip-instant]")?this._unpinTooltip():this._unpinTooltipDebounced())}else{if(this._currentElementWithTooltip&&n!==this._currentElementWithTooltip)return;this._pinTooltipDebounced.cancel(),this._unpinTooltipDebounced()}}_onScroll(e,{target:n}){this._currentElementWithTooltip&&(n.contains(this.balloonPanelView.element)&&n.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:n,position:i,cssClass:r}){this._unpinTooltip();const o=Mi(Yr._editors.values()).ui.view.body;o.has(this.balloonPanelView)||o.add(this.balloonPanelView),this.tooltipTextView.text=n,this.balloonPanelView.class=[FV,r].filter(s=>s).join(" "),this.balloonPanelView.pin({target:e,positions:Yr.getPositioningFunctions(i)}),this._mutationObserver.attach(e);for(const s of Yr._editors)this.listenTo(s.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=i}_unpinTooltip(){this._unpinTooltipDebounced.cancel(),this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of Yr._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this.tooltipTextView.text="",this._mutationObserver.detach()}_updateTooltipPosition(){if(!this._currentElementWithTooltip)return;const e=KT(this._currentElementWithTooltip);if(!vu(this._currentElementWithTooltip)||!e.text){this._unpinTooltip();return}this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:Yr.getPositioningFunctions(e.position)})}}function jT(t){return Rc(t)?t.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}function KT(t){return{text:t.dataset.ckeTooltipText,position:t.dataset.ckeTooltipPosition||"s",cssClass:t.dataset.ckeTooltipClass||""}}function hBe(t){const e=new MutationObserver(()=>{t()});return{attach(n){e.observe(n,{attributes:!0,attributeFilter:["data-cke-tooltip-text","data-cke-tooltip-position"]})},detach(){e.disconnect()}}}class mBe extends xY{licenseTypeMessage={evaluation:"For evaluation purposes only",trial:"For evaluation purposes only",development:"For development purposes only"};constructor(e){super(e,{balloonClass:"ck-evaluation-badge-balloon"})}_isEnabled(){const n=this.editor.config.get("licenseKey"),i=$V(n);return!!(i&&this.licenseTypeMessage[i])}_createBadgeContent(){const e=this.editor.config.get("licenseKey"),n=$V(e);return new gBe(this.editor.locale,this.licenseTypeMessage[n])}_getNormalizedConfig(){const e=super._getNormalizedConfig(),n=this.editor.config.get("ui.poweredBy")||{},i=n.position||e.position,r=n.side||e.side;return{position:i,side:r==="left"?"right":"left",verticalOffset:e.verticalOffset,horizontalOffset:e.horizontalOffset}}}class gBe extends ut{constructor(e,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-evaluation-badge"],"aria-hidden":!0},children:[{tag:"span",attributes:{class:["ck","ck-evaluation-badge__label"]},children:[n]}]})}}function $V(t){if(t=="GPL")return"GPL";const e=HM(t.split(".")[1]);return e?e.licenseType||"production":null}class yg extends $s{constructor(e,n){super(e);const i=this.bindTemplate;this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item"]},on:{mouseenter:i.to("mouseenter")}}),this.delegate("mouseenter").to(n)}}const dy=5,uh={toggleMenusAndFocusItemsOnHover(t){t.on("menu:mouseenter",e=>{if(!(!t.isFocusBorderEnabled&&!t.isOpen)){if(t.isOpen)for(const n of t.menus){const i=e.path[0],r=i instanceof yg&&i.children.first===n;n.isOpen=(e.path.includes(n)||r)&&n.isEnabled}e.source.focus()}})},focusCycleMenusOnArrows(t){const e=t.locale.uiLanguageDirection==="rtl";t.on("menu:arrowright",i=>{n(i.source,e?-1:1)}),t.on("menu:arrowleft",i=>{n(i.source,e?1:-1)});function n(i,r){const o=t.children.getIndex(i),s=i.isOpen,a=t.children.length,l=t.children.get((o+a+r)%a);i.isOpen=!1,s&&(l.isOpen=!0),l.buttonView.focus()}},closeMenusWhenTheBarCloses(t){t.on("change:isOpen",()=>{t.isOpen||t.menus.forEach(e=>{e.isOpen=!1})})},closeMenuWhenAnotherOnTheSameLevelOpens(t){t.on("menu:change:isOpen",(e,n,i)=>{i&&t.menus.filter(r=>e.source.parentMenuView===r.parentMenuView&&e.source!==r&&r.isOpen).forEach(r=>{r.isOpen=!1})})},closeOnClickOutside(t){Wf({emitter:t,activator:()=>t.isOpen,callback:()=>t.close(),contextElements:()=>t.children.map(e=>e.element)})},enableFocusHighlightOnInteraction(t){let e=!1;t.on("change:isOpen",(n,i,r)=>{r||(e||(t.isFocusBorderEnabled=!1),e=!1)}),t.listenTo(t.element,"keydown",()=>{e=!0},{useCapture:!0}),t.listenTo(t.element,"keyup",()=>{e=!1},{useCapture:!0}),t.listenTo(t.element,"focus",()=>{e&&(t.isFocusBorderEnabled=!0)},{useCapture:!0})}},Du={openAndFocusPanelOnArrowDownKey(t){t.keystrokes.set("arrowdown",(e,n)=>{t.isEnabled&&t.focusTracker.focusedElement===t.buttonView.element&&(t.isOpen||(t.isOpen=!0),t.panelView.focus(),n())})},openOnArrowRightKey(t){const e=t.locale.uiLanguageDirection==="rtl"?"arrowleft":"arrowright";t.keystrokes.set(e,(n,i)=>{t.focusTracker.focusedElement!==t.buttonView.element||!t.isEnabled||(t.isOpen||(t.isOpen=!0),t.panelView.focus(),i())})},openOnButtonClick(t){t.buttonView.on("execute",()=>{t.isOpen=!0})},toggleOnButtonClick(t){t.buttonView.on("execute",()=>{t.isOpen=!t.isOpen})},openAndFocusOnEnterKeyPress(t){t.keystrokes.set("enter",(e,n)=>{t.focusTracker.focusedElement===t.buttonView.element&&(t.isOpen=!0,t.panelView.focus(),n())})},closeOnArrowLeftKey(t){const e=t.locale.uiLanguageDirection==="rtl"?"arrowright":"arrowleft";t.keystrokes.set(e,(n,i)=>{t.isOpen&&(t.isOpen=!1,t.focus(),i())})},closeOnEscKey(t){t.keystrokes.set("esc",(e,n)=>{t.isOpen&&(t.isOpen=!1,t.focus(),n())})},closeOnParentClose(t){t.parentMenuView.on("change:isOpen",(e,n,i)=>{!i&&e.source===t.parentMenuView&&(t.isOpen=!1)})}},pBe={southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.top-e.height,left:t.left-e.width+t.width,name:"nw"}),eastSouth:t=>({top:t.top,left:t.right-dy,name:"es"}),eastNorth:(t,e)=>({top:t.top-e.height,left:t.right-dy,name:"en"}),westSouth:(t,e)=>({top:t.top,left:t.left-e.width+dy,name:"ws"}),westNorth:(t,e)=>({top:t.top-e.height,left:t.left-e.width+dy,name:"wn"})},vBe=[{menuId:"file",label:"File",groups:[{groupId:"export",items:["menuBar:exportPdf","menuBar:exportWord"]},{groupId:"import",items:["menuBar:importWord"]},{groupId:"revisionHistory",items:["menuBar:revisionHistory"]}]},{menuId:"edit",label:"Edit",groups:[{groupId:"undo",items:["menuBar:undo","menuBar:redo"]},{groupId:"selectAll",items:["menuBar:selectAll"]},{groupId:"findAndReplace",items:["menuBar:findAndReplace"]}]},{menuId:"view",label:"View",groups:[{groupId:"sourceEditingEnhanced",items:["menuBar:sourceEditingEnhanced"]},{groupId:"sourceEditing",items:["menuBar:sourceEditing"]},{groupId:"showBlocks",items:["menuBar:showBlocks"]},{groupId:"previewMergeFields",items:["menuBar:previewMergeFields"]},{groupId:"fullscreen",items:["menuBar:fullscreen"]},{groupId:"restrictedEditing",items:["menuBar:restrictedEditing"]}]},{menuId:"insert",label:"Insert",groups:[{groupId:"insertMainWidgets",items:["menuBar:insertImage","menuBar:ckbox","menuBar:ckfinder","menuBar:insertTable","menuBar:insertTableLayout"]},{groupId:"insertInline",items:["menuBar:link","menuBar:insertFootnote","menuBar:bookmark","menuBar:comment","menuBar:insertMergeField","menuBar:emoji"]},{groupId:"insertMinorWidgets",items:["menuBar:mediaEmbed","menuBar:insertTemplate","menuBar:specialCharacters","menuBar:blockQuote","menuBar:codeBlock","menuBar:htmlEmbed"]},{groupId:"insertStructureWidgets",items:["menuBar:horizontalLine","menuBar:pageBreak","menuBar:tableOfContents"]},{groupId:"restrictedEditingException",items:["menuBar:restrictedEditingException:inline","menuBar:restrictedEditingException:block"]}]},{menuId:"format",label:"Format",groups:[{groupId:"textAndFont",items:[{menuId:"text",label:"Text",groups:[{groupId:"basicStyles",items:["menuBar:bold","menuBar:italic","menuBar:underline","menuBar:strikethrough","menuBar:superscript","menuBar:subscript","menuBar:code"]},{groupId:"textPartLanguage",items:["menuBar:textPartLanguage"]}]},{menuId:"font",label:"Font",groups:[{groupId:"fontProperties",items:["menuBar:fontSize","menuBar:fontFamily"]},{groupId:"fontColors",items:["menuBar:fontColor","menuBar:fontBackgroundColor"]},{groupId:"highlight",items:["menuBar:highlight"]}]},"menuBar:heading"]},{groupId:"list",items:["menuBar:bulletedList","menuBar:numberedList","menuBar:multiLevelList","menuBar:todoList"]},{groupId:"indent",items:["menuBar:alignment","menuBar:lineHeight","menuBar:indent","menuBar:outdent"]},{groupId:"caseChange",items:["menuBar:caseChange"]},{groupId:"removeFormat",items:["menuBar:removeFormat"]}]},{menuId:"tools",label:"Tools",groups:[{groupId:"aiTools",items:["menuBar:aiAssistant","menuBar:aiCommands","menuBar:toggleAi","menuBar:aiQuickActions"]},{groupId:"tools",items:["menuBar:trackChanges","menuBar:commentsArchive"]}]},{menuId:"help",label:"Help",groups:[{groupId:"help",items:["menuBar:accessibilityHelp"]}]}];function bBe(t){let e;return!("items"in t)||!t.items?e={items:Bo(vBe),addItems:[],removeItems:[],isVisible:!0,isUsingDefaultConfig:!0,...t}:e={items:t.items,removeItems:[],addItems:[],isVisible:!0,isUsingDefaultConfig:!1,...t},e}function yBe({normalizedConfig:t,locale:e,componentFactory:n,extraItems:i}){const r=Bo(t);return zV(t,r,i),wBe(t,r),zV(t,r,r.addItems),_Be(t,r,n),zY(t,r),CBe(r,e),r}function wBe(t,e){const n=e.removeItems,i=[];e.items=e.items.filter(({menuId:r})=>n.includes(r)?(i.push(r),!1):!0),wg(e.items,r=>{r.groups=r.groups.filter(({groupId:o})=>n.includes(o)?(i.push(o),!1):!0);for(const o of r.groups)o.items=o.items.filter(s=>{const a=HY(s);return n.includes(a)?(i.push(a),!1):!0})});for(const r of n)i.includes(r)||hn("menu-bar-item-could-not-be-removed",{menuBarConfig:t,itemName:r})}function zV(t,e,n){const i=[];if(n.length!=0){for(const r of n){const o=TBe(r.position),s=EBe(r.position);if(SBe(r))if(!s)o==="start"?(e.items.unshift(r.menu),i.push(r)):o==="end"&&(e.items.push(r.menu),i.push(r));else{const a=e.items.findIndex(l=>l.menuId===s);a!=-1?o==="before"?(e.items.splice(a,0,r.menu),i.push(r)):o==="after"&&(e.items.splice(a+1,0,r.menu),i.push(r)):HV(e,r.menu,s,o)&&i.push(r)}else kBe(r)?wg(e.items,a=>{if(a.menuId===s)o==="start"?(a.groups.unshift(r.group),i.push(r)):o==="end"&&(a.groups.push(r.group),i.push(r));else{const l=a.groups.findIndex(u=>u.groupId===s);l!==-1&&(o==="before"?(a.groups.splice(l,0,r.group),i.push(r)):o==="after"&&(a.groups.splice(l+1,0,r.group),i.push(r)))}}):HV(e,r.item,s,o)&&i.push(r)}for(const r of n)i.includes(r)||hn("menu-bar-item-could-not-be-added",{menuBarConfig:t,addedItemConfig:r})}}function HV(t,e,n,i){let r=!1;return wg(t.items,o=>{for(const{groupId:s,items:a}of o.groups){if(r)return;if(s===n)i==="start"?(a.unshift(e),r=!0):i==="end"&&(a.push(e),r=!0);else{const l=a.findIndex(u=>HY(u)===n);l!==-1&&(i==="before"?(a.splice(l,0,e),r=!0):i==="after"&&(a.splice(l+1,0,e),r=!0))}}}),r}function _Be(t,e,n){wg(e.items,i=>{for(const r of i.groups)r.items=r.items.filter(o=>{const s=typeof o=="string"&&!n.has(o);return s&&!e.isUsingDefaultConfig&&hn("menu-bar-item-unavailable",{menuBarConfig:t,parentMenuConfig:Bo(i),componentName:o}),!s})})}function zY(t,e){const n=e.isUsingDefaultConfig;let i=!1;if(e.items=e.items.filter(r=>r.groups.length?!0:(GT(t,r,n),!1)),!e.items.length){GT(t,t,n);return}wg(e.items,r=>{r.groups=r.groups.filter(o=>o.items.length?!0:(i=!0,!1));for(const o of r.groups)o.items=o.items.filter(s=>UY(s)&&!s.groups.length?(GT(t,s,n),i=!0,!1):!0)}),i&&zY(t,e)}function GT(t,e,n){n||hn("menu-bar-menu-empty",{menuBarConfig:t,emptyMenuConfig:e})}function CBe(t,e){const n=e.t,i={File:n({string:"File",id:"MENU_BAR_MENU_FILE"}),Edit:n({string:"Edit",id:"MENU_BAR_MENU_EDIT"}),View:n({string:"View",id:"MENU_BAR_MENU_VIEW"}),Insert:n({string:"Insert",id:"MENU_BAR_MENU_INSERT"}),Format:n({string:"Format",id:"MENU_BAR_MENU_FORMAT"}),Tools:n({string:"Tools",id:"MENU_BAR_MENU_TOOLS"}),Help:n({string:"Help",id:"MENU_BAR_MENU_HELP"}),Text:n({string:"Text",id:"MENU_BAR_MENU_TEXT"}),Font:n({string:"Font",id:"MENU_BAR_MENU_FONT"})};wg(t.items,r=>{r.label in i&&(r.label=i[r.label])})}function wg(t,e){if(Array.isArray(t))for(const i of t)n(i);function n(i){e(i);for(const r of i.groups)for(const o of r.items)UY(o)&&n(o)}}function SBe(t){return typeof t=="object"&&"menu"in t}function kBe(t){return typeof t=="object"&&"group"in t}function TBe(t){return t.startsWith("start")?"start":t.startsWith("end")?"end":t.startsWith("after")?"after":"before"}function EBe(t){const e=t.match(/^[^:]+:(.+)/);return e?e[1]:null}function HY(t){return typeof t=="string"?t:t.menuId}function UY(t){return typeof t=="object"&&"menuId"in t}class xBe extends Ln(){editor;componentFactory;focusTracker;tooltipManager;poweredBy;evaluationBadge;ariaLiveAnnouncer;isReady=!1;_editableElementsMap=new Map;_focusableToolbarDefinitions=[];_extraMenuBarElements=[];_lastFocusedForeignElement=null;_domEmitter;constructor(e){super();const n=e.editing.view;this.editor=e,this.componentFactory=new fBe(e),this.focusTracker=new wi,this.tooltipManager=new Yr(e),this.poweredBy=new I3e(e),this.evaluationBadge=new mBe(e),this.ariaLiveAnnouncer=new f3e(e),this._initViewportOffset(this._readViewportOffsetFromConfig()),this.once("ready",()=>{this._bindBodyCollectionWithFocusTracker(),this.isReady=!0}),this.listenTo(n.document,"layoutChanged",this.update.bind(this)),this.listenTo(n,"scrollToTheSelection",this._handleScrollToTheSelection.bind(this)),this._initFocusTracking(),this._initVisualViewportSupport()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor),this.poweredBy.destroy(),this.evaluationBadge.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null,this.editor.keystrokes.stopListening(e);this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this._domEmitter&&this._domEmitter.stopListening()}setEditableElement(e,n){this._editableElementsMap.set(e,n),n.ckeditorInstance||(n.ckeditorInstance=this.editor),this.focusTracker.add(n);const i=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(n)};this.isReady?i():this.once("ready",i)}removeEditableElement(e){const n=this._editableElementsMap.get(e);n&&(this._editableElementsMap.delete(e),this.editor.keystrokes.stopListening(n),this.focusTracker.remove(n),n.ckeditorInstance=null)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,n={}){e.isRendered?(this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)):e.once("render",()=>{this.focusTracker.add(e),this.editor.keystrokes.listenTo(e.element)}),this._focusableToolbarDefinitions.push({toolbarView:e,options:n})}extendMenuBar(e){this._extraMenuBarElements.push(e)}initMenuBar(e){const n=e.element;this.focusTracker.add(n),this.editor.keystrokes.listenTo(n);const i=bBe(this.editor.config.get("menuBar")||{});e.fillFromConfig(i,this.componentFactory,this._extraMenuBarElements),this.editor.keystrokes.set("Esc",(r,o)=>{n.contains(this.editor.ui.focusTracker.focusedElement)&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):this.editor.editing.view.focus(),o())}),this.editor.keystrokes.set("Alt+F9",(r,o)=>{n.contains(this.editor.ui.focusTracker.focusedElement)||(this._saveLastFocusedForeignElement(),e.isFocusBorderEnabled=!0,e.focus(),o())})}_readViewportOffsetFromConfig(){const e=this.editor,n=e.config.get("ui.viewportOffset");if(n)return n;const i=e.config.get("toolbar.viewportTopOffset");return i?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:i}):{top:0}}_initFocusTracking(){const e=this.editor;let n;e.keystrokes.set("Alt+F10",(i,r)=>{this._saveLastFocusedForeignElement();const o=this._getCurrentFocusedToolbarDefinition();(!o||!n)&&(n=this._getFocusableCandidateToolbarDefinitions());for(let s=0;s<n.length;s++){const a=n.shift();if(n.push(a),a!==o&&this._focusFocusableCandidateToolbar(a)){o&&o.options.afterBlur&&o.options.afterBlur();break}}r()}),e.keystrokes.set("Esc",(i,r)=>{const o=this._getCurrentFocusedToolbarDefinition();o&&(this._lastFocusedForeignElement?(this._lastFocusedForeignElement.focus(),this._lastFocusedForeignElement=null):e.editing.view.focus(),o.options.afterBlur&&o.options.afterBlur(),r())})}_saveLastFocusedForeignElement(){const e=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(e)&&!Array.from(this.editor.editing.view.domRoots.values()).includes(e)&&(this._lastFocusedForeignElement=e)}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const n of this._focusableToolbarDefinitions){const{toolbarView:i,options:r}=n;(vu(i.element)||r.beforeFocus)&&e.push(n)}return e.sort((n,i)=>UV(n)-UV(i)),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:n,options:{beforeFocus:i}}=e;return i&&i(),vu(n.element)?(n.focus(),!0):!1}_handleScrollToTheSelection(e,n){const i={top:0,bottom:0,left:0,right:0,...this.viewportOffset};n.viewportOffset.top+=i.top,n.viewportOffset.bottom+=i.bottom,n.viewportOffset.left+=i.left,n.viewportOffset.right+=i.right}_bindBodyCollectionWithFocusTracker(){const e=this.view.body;for(const n of e)this.focusTracker.add(n.element);e.on("add",(n,i)=>{this.focusTracker.add(i.element)}),e.on("remove",(n,i)=>{this.focusTracker.remove(i.element)})}_initViewportOffset(e){this.on("set:viewportOffset",(n,i,r)=>{const o=this._getVisualViewportTopOffset(r);r.visualTop!==o&&(n.return={...r,visualTop:o})}),this.set("viewportOffset",e)}_initVisualViewportSupport(){if(!Qe.window.visualViewport)return;const e=()=>{const n=this._getVisualViewportTopOffset(this.viewportOffset);this.viewportOffset.visualTop!==n&&(this.viewportOffset={...this.viewportOffset,visualTop:n})};this._domEmitter=new(zo()),this._domEmitter.listenTo(Qe.window.visualViewport,"scroll",e),this._domEmitter.listenTo(Qe.window.visualViewport,"resize",e)}_getVisualViewportTopOffset(e){const n=Xw().top,i=e.top||0;return n>i?0:i-n}}function UV(t){const{toolbarView:e,options:n}=t;let i=10;return vu(e.element)&&i--,n.isContextual&&(i-=2),i}class ABe extends ut{body;menuBarView;toolbar;constructor(e){super(e),this.body=new Ks(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}class PBe extends ABe{top;main;_voiceLabelView;constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,n=new mc;return n.text=e("Rich Text Editor"),n.extendTemplate({attributes:{class:"ck-voice-label"}}),n}}class IBe extends ut{name=null;_editingView;_editableElement;_hasExternalElement;constructor(e,n,i){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.set("isFocused",!1),this._editableElement=i,this._hasExternalElement=!!this._editableElement,this._editingView=n}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}get hasExternalElement(){return this._hasExternalElement}_updateIsFocusedClasses(){const e=this._editingView;e.isRenderingInProgress?i(this):n(this);function n(r){e.change(o=>{const s=e.document.getRoot(r.name);o.addClass(r.isFocused?"ck-focused":"ck-blurred",s),o.removeClass(r.isFocused?"ck-blurred":"ck-focused",s)})}function i(r){e.once("change:isRenderingInProgress",(o,s,a)=>{a?i(r):n(r)})}}}class RBe extends IBe{_options;constructor(e,n,i,r={}){super(e,n,i),this._options=r,this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView;e.change(n=>{const i=e.document.getRoot(this.name);n.setAttribute("aria-label",this.getEditableAriaLabel(),i)})}getEditableAriaLabel(){const e=this.locale.t,n=this._options.label,i=this._editableElement,r=this.name;if(typeof n=="string")return n;if(typeof n=="object")return n[r];if(typeof n=="function")return n(this);if(i){const o=i.getAttribute("aria-label");if(o)return o}return e("Rich Text Editor. Editing area: %0",r)}}class Xs extends ut{children;constructor(e,n={}){super(e);const i=this.bindTemplate;this.set("class",["ck","ck-form__row",...li(n.class||[])]),this.children=this.createCollection(),n.children&&n.children.forEach(r=>this.children.add(r)),this.set("_role",null),this.set("_ariaLabelledBy",null),n.labelView&&this.set({_role:"group",_ariaLabelledBy:n.labelView.id}),this.setTemplate({tag:"div",attributes:{class:i.to("class",r=>r.join(" ")),role:i.to("_role"),"aria-labelledby":i.to("_ariaLabelledBy")},children:this.children})}}class WV extends bS{static get pluginName(){return"Notification"}static get isOfficialPlugin(){return!0}init(){this.on("show:warning",(e,n)=>{window.alert(n.message)},{priority:"lowest"})}showSuccess(e,n={}){this._showNotification({message:e,type:"success",namespace:n.namespace,title:n.title})}showInfo(e,n={}){this._showNotification({message:e,type:"info",namespace:n.namespace,title:n.title})}showWarning(e,n={}){this._showNotification({message:e,type:"warning",namespace:n.namespace,title:n.title})}_showNotification(e){const n=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(n,{message:e.message,type:e.type,title:e.title||""})}}class Jm extends Ln(){constructor(e,n){super(),n&&BK(this,n),e&&this.set(e)}}const fy=gg("px");class bu extends xe{positionLimiter;visibleStack;_viewToStack=new Map;_idToStack=new Map;_view=null;_rotatorView=null;_fakePanelsView=null;static get pluginName(){return"ContextualBalloon"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.positionLimiter=()=>{const n=this.editor.editing.view,r=n.document.selection.editableElement;return r?n.domConverter.mapViewToDom(r.root):null},this.decorate("getPositionOptions"),this.set("visibleView",null),this.set("_numberOfStacks",0),this.set("_singleViewMode",!1)}destroy(){super.destroy(),this._view&&this._view.destroy(),this._rotatorView&&this._rotatorView.destroy(),this._fakePanelsView&&this._fakePanelsView.destroy()}get view(){return this._view||this._createPanelView(),this._view}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this._view||this._createPanelView(),this.hasView(e.view))throw new oe("contextualballoon-add-view-exist",[this,e]);const n=e.stackId||"main";if(!this._idToStack.has(n)){this._idToStack.set(n,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(n)),this._numberOfStacks=this._idToStack.size,(!this._visibleStack||e.singleViewMode)&&this.showStack(n);return}const i=this._idToStack.get(n);e.singleViewMode&&this.showStack(n),i.set(e.view,e),this._viewToStack.set(e.view,i),i===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new oe("contextualballoon-remove-view-not-exist",[this,e]);const n=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(n.size===1?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(n.values())[n.size-2])),n.size===1?(this._idToStack.delete(this._getStackId(n)),this._numberOfStacks=this._idToStack.size):n.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition()}getPositionOptions(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:{...this.editor.ui.viewportOffset,top:this.editor.ui.viewportOffset.visualTop}})),e}showStack(e){this.visibleStack=e;const n=this._idToStack.get(e);if(!n)throw new oe("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==n&&this._showView(Array.from(n.values()).pop())}_createPanelView(){this._view=new Ki(this.editor.locale),this.editor.ui.view.body.add(this._view),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(i=>i[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let n=e.indexOf(this._visibleStack)+1;e[n]||(n=0),this.showStack(this._getStackId(e[n]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let n=e.indexOf(this._visibleStack)-1;e[n]||(n=e.length-1),this.showStack(this._getStackId(e[n]))}_createRotatorView(){const e=new MBe(this.editor.locale),n=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(i,r)=>!r&&i>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(i,r)=>{if(r<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return n("%0 of %1",[o,r])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new OBe(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(n,i)=>!i&&n>=2?Math.min(n-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:n="",withArrow:i=!0,singleViewMode:r=!1}){this.view.class=n,this.view.withArrow=i,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this.getPositionOptions()),this._fakePanelsView.updatePosition(),r&&(this._singleViewMode=!0)}}class MBe extends ut{focusTracker;buttonPrevView;buttonNextView;content;constructor(e){super(e);const n=e.t,i=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new wi,this.buttonPrevView=this._createButtonView(n("Previous"),pg),this.buttonNextView=this._createButtonView(n("Next"),cY),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",r=>r?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,n){const i=new wt(this.locale);return i.set({label:e,icon:n,tooltip:!0}),i}}class OBe extends ut{content;_balloonPanelView;constructor(e,n){super(e);const i=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=n,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",r=>r?"":"ck-hidden")],style:{top:i.to("top",fy),left:i.to("left",fy),width:i.to("width",fy),height:i.to("height",fy)}},children:this.content}),this.on("change:numberOfPanels",(r,o,s,a)=>{s>a?this._addPanels(s-a):this._removePanels(a-s),this.updatePosition()})}_addPanels(e){for(;e--;){const n=new ut;n.setTemplate({tag:"div"}),this.content.add(n),this.registerChild(n)}}_removePanels(e){for(;e--;){const n=this.content.last;this.content.remove(n),this.deregisterChild(n),n.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:n}=this._balloonPanelView,{width:i,height:r}=new Wt(this._balloonPanelView.element);Object.assign(this,{top:e,left:n,width:i,height:r})}}}const ch=gg("px");class LBe extends ut{content;contentPanelElement;_contentPanelPlaceholder;constructor(e){super(e);const n=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheBottomOfLimiter",!1),this.set("_stickyTopOffset",null),this.set("_stickyBottomOffset",null),this.content=this.createCollection(),this._contentPanelPlaceholder=new Io({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:n.to("isSticky",i=>i?"block":"none"),height:n.to("isSticky",i=>i?ch(this._contentPanelRect.height):null)}}}).render(),this.contentPanelElement=new Io({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",n.if("isSticky","ck-sticky-panel__content_sticky"),n.if("_isStickyToTheBottomOfLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:n.to("isSticky",i=>i?ch(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:n.to("_stickyTopOffset",i=>i&&ch(i)),bottom:n.to("_stickyBottomOffset",i=>i&&ch(i)),marginLeft:n.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this.contentPanelElement]})}render(){super.render(),this.checkIfShouldBeSticky(),this.listenTo(Qe.document,"scroll",()=>{this.checkIfShouldBeSticky()},{useCapture:!0}),this.listenTo(this,"change:isActive",()=>{this.checkIfShouldBeSticky()}),Qe.window.visualViewport&&(this.listenTo(Qe.window.visualViewport,"scroll",()=>{this.checkIfShouldBeSticky()}),this.listenTo(Qe.window.visualViewport,"resize",()=>{this.checkIfShouldBeSticky()}))}checkIfShouldBeSticky(){if(!this.limiterElement||!this.isActive){this._unstick();return}const e=new Wt(this.limiterElement);let n=e.getVisible();if(n){const o=new Wt(Qe.window);o.top+=this.viewportTopOffset,o.height-=this.viewportTopOffset,n=n.getIntersection(o)}const{left:i,top:r}=Xw();if(e.moveBy(i,r),n&&n.moveBy(i,r),n&&e.top<n.top)if(this._contentPanelRect.height+this.limiterBottomOffset>n.height){const o=Math.max(e.bottom-n.bottom,0)+this.limiterBottomOffset;this._contentPanelRect.height+o+1<e.height?this._stickToBottomOfLimiter(o):this._unstick()}else this._contentPanelRect.height+this.limiterBottomOffset<e.height?this._stickToTopOfAncestors(n.top):this._unstick();else this._unstick()}_stickToTopOfAncestors(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=e,this._stickyBottomOffset=null,this._marginLeft=ch(-Qe.window.scrollX+Xw().left)}_stickToBottomOfLimiter(e){this.isSticky=!0,this._isStickyToTheBottomOfLimiter=!0,this._stickyTopOffset=null,this._stickyBottomOffset=e,this._marginLeft=ch(-Qe.window.scrollX+Xw().left)}_unstick(){this.isSticky=!1,this._isStickyToTheBottomOfLimiter=!1,this._stickyTopOffset=null,this._stickyBottomOffset=null,this._marginLeft=null}get _contentPanelRect(){return new Wt(this.contentPanelElement)}}class DBe extends bg{arrowView;constructor(e){super(e);const n=this.bindTemplate;this.set({withText:!0,role:"menuitem"}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__button"],"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",i=>String(i)),"data-cke-tooltip-disabled":n.to("isOn")},on:{mouseenter:n.to("mouseenter")}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Sa;return e.content=yS,e.extendTemplate({attributes:{class:"ck-menu-bar__menu__button__arrow"}}),e}}class NBe extends ut{children;constructor(e){super(e);const n=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-menu-bar__menu__panel",n.to("position",i=>`ck-menu-bar__menu__panel_position_${i}`),n.if("isVisible","ck-hidden",i=>!i)],tabindex:"-1"},children:this.children,on:{selectstart:n.to(i=>{i.target.tagName.toLocaleLowerCase()!=="input"&&i.preventDefault()})}})}focus(e=1){this.children.length&&(e===1?this.children.first.focus():this.children.last.focus())}}class la extends ut{buttonView;panelView;focusTracker;keystrokes;constructor(e){super(e);const n=this.bindTemplate;this.buttonView=new DBe(e),this.buttonView.delegate("mouseenter").to(this),this.buttonView.bind("isOn","isEnabled").to(this,"isOpen","isEnabled"),this.panelView=new NBe(e),this.panelView.bind("isVisible").to(this,"isOpen"),this.keystrokes=new Qi,this.focusTracker=new wi,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("panelPosition","w"),this.set("class",void 0),this.set("parentMenuView",null),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar__menu",n.to("class"),n.if("isEnabled","ck-disabled",i=>!i),n.if("parentMenuView","ck-menu-bar__menu_top-level",i=>!i)]},children:[this.buttonView,this.panelView]})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.keystrokes.listenTo(this.element),Du.closeOnEscKey(this),this._repositionPanelOnOpen()}_attachBehaviors(){this.parentMenuView?(Du.openOnButtonClick(this),Du.openOnArrowRightKey(this),Du.closeOnArrowLeftKey(this),Du.openAndFocusOnEnterKeyPress(this),Du.closeOnParentClose(this)):(this._propagateArrowKeystrokeEvents(),Du.openAndFocusPanelOnArrowDownKey(this),Du.toggleOnButtonClick(this))}_propagateArrowKeystrokeEvents(){this.keystrokes.set("arrowright",(e,n)=>{this.fire("arrowright"),n()}),this.keystrokes.set("arrowleft",(e,n)=>{this.fire("arrowleft"),n()})}_repositionPanelOnOpen(){this.on("change:isOpen",(e,n,i)=>{if(!i)return;const r=la._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions});this.panelView.position=r?r.name:this._defaultMenuPositionName})}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:n,northEast:i,northWest:r,westSouth:o,eastSouth:s,westNorth:a,eastNorth:l}=pBe;return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?[s,l,o,a]:[e,n,i,r]:this.parentMenuView?[o,a,s,l]:[n,e,r,i]}get _defaultMenuPositionName(){return this.locale.uiLanguageDirection==="ltr"?this.parentMenuView?"es":"se":this.parentMenuView?"ws":"sw"}static _getOptimalPosition=BM}class Zm extends jf{constructor(e){super(e),this.role="menu",this.items.on("change",this._setItemsCheckSpace.bind(this))}_setItemsCheckSpace(){const e=Array.from(this.items).some(n=>{const i=qV(n);return i&&i.isToggleable});this.items.forEach(n=>{const i=qV(n);i&&(i.hasCheckSpace=e)})}}function qV(t){return t instanceof $s?t.children.map(e=>BBe(e)?e.buttonView:e).find(e=>e instanceof bg):null}function BBe(t){return typeof t=="object"&&"buttonView"in t&&t.buttonView instanceof wt}class WY extends M3e{constructor(e){super(e),this.set({withText:!0,withKeystroke:!0,tooltip:!1,role:"menuitem"}),this.extendTemplate({attributes:{class:["ck-menu-bar__menu__item__button"]}})}}const jV=["mouseenter","arrowleft","arrowright","change:isOpen"];class VBe extends ut{children;menus=[];constructor(e){super(e);const n=e.t,i=this.bindTemplate;this.set({isOpen:!1,isFocusBorderEnabled:!1}),this._setupIsOpenUpdater(),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-menu-bar",i.if("isFocusBorderEnabled","ck-menu-bar_focus-border-enabled")],"aria-label":n("Editor menu bar"),role:"menubar"},children:this.children})}fillFromConfig(e,n,i=[]){const r=this.locale,s=yBe({normalizedConfig:e,locale:r,componentFactory:n,extraItems:i}).items.map(a=>this._createMenu({componentFactory:n,menuDefinition:a}));this.children.addMany(s)}render(){super.render(),uh.toggleMenusAndFocusItemsOnHover(this),uh.closeMenusWhenTheBarCloses(this),uh.closeMenuWhenAnotherOnTheSameLevelOpens(this),uh.focusCycleMenusOnArrows(this),uh.closeOnClickOutside(this),uh.enableFocusHighlightOnInteraction(this)}focus(){this.children.first&&this.children.first.focus()}close(){for(const e of this.children)e.isOpen=!1}disable(){for(const e of this.children)e.isEnabled=!1}enable(){for(const e of this.children)e.isEnabled=!0}registerMenu(e,n=null){n?(e.delegate(...jV).to(n),e.parentMenuView=n):e.delegate(...jV).to(this,i=>"menu:"+i),e._attachBehaviors(),this.menus.push(e)}_createMenu({componentFactory:e,menuDefinition:n,parentMenuView:i}){const r=this.locale,o=new la(r);return this.registerMenu(o,i),o.buttonView.set({label:n.label}),o.once("change:isOpen",()=>{const s=new Zm(r);s.ariaLabel=n.label,o.panelView.children.add(s),s.items.addMany(this._createMenuItems({menuDefinition:n,parentMenuView:o,componentFactory:e}))}),o}_createMenuItems({menuDefinition:e,parentMenuView:n,componentFactory:i}){const r=this.locale,o=[];for(const s of e.groups){for(const a of s.items){const l=new yg(r,n);if(so(a))l.children.add(this._createMenu({componentFactory:i,menuDefinition:a,parentMenuView:n}));else{const u=this._createMenuItemContentFromFactory({componentName:a,componentFactory:i,parentMenuView:n});if(!u)continue;l.children.add(u)}o.push(l)}s!==e.groups[e.groups.length-1]&&o.push(new dO(r))}return o}_createMenuItemContentFromFactory({componentName:e,parentMenuView:n,componentFactory:i}){const r=i.create(e);return r instanceof la||r instanceof Wi||r instanceof WY?(this._registerMenuTree(r,n),r.on("execute",()=>{this.close()}),r):(hn("menu-bar-component-unsupported",{componentName:e,componentView:r}),null)}_registerMenuTree(e,n){if(!(e instanceof la)){e.delegate("mouseenter").to(n);return}this.registerMenu(e,n);const i=e.panelView.children.filter(o=>o instanceof Zm)[0];if(!i){e.delegate("mouseenter").to(n);return}const r=i.items.filter(o=>o instanceof $s);for(const o of r)this._registerMenuTree(o.children.get(0),e)}_setupIsOpenUpdater(){let e;this.on("menu:change:isOpen",(n,i,r)=>{clearTimeout(e),r?this.isOpen=!0:e=setTimeout(()=>{this.isOpen=Array.from(this.children).some(o=>o.isOpen)},0)})}}const mO=["left","right","center","justify"];function qY(t){return mO.includes(t)}function jY(t,e){return e.contentLanguageDirection=="rtl"?t==="right":t==="left"}function KY(t){const e=t.map(i=>{let r;return typeof i=="string"?r={name:i}:r=i,r}).filter(i=>{const r=mO.includes(i.name);return r||hn("alignment-config-name-not-recognized",{option:i}),r}),n=e.filter(i=>!!i.className).length;if(n&&n<e.length)throw new oe("alignment-config-classnames-are-missing",{configuredOptions:t});return e.forEach((i,r,o)=>{const s=o.slice(r+1);if(s.some(l=>l.name==i.name))throw new oe("alignment-config-name-already-defined",{option:i,configuredOptions:t});if(i.className&&s.some(u=>u.className==i.className))throw new oe("alignment-config-classname-already-defined",{option:i,configuredOptions:t})}),e}const gO="alignment";class FBe extends Ht{refresh(){const n=this.editor.locale,i=Mi(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!i&&this._canBeAligned(i),this.isEnabled&&i.hasAttribute("alignment")?this.value=i.getAttribute("alignment"):this.value=n.contentLanguageDirection==="rtl"?"right":"left"}execute(e={}){const n=this.editor,i=n.locale,r=n.model,o=r.document,s=e.value;r.change(a=>{const l=Array.from(o.selection.getSelectedBlocks()).filter(d=>this._canBeAligned(d)),u=l[0].getAttribute("alignment");jY(s,i)||u===s||!s?$Be(l,a):zBe(l,a,s)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,gO)}}function $Be(t,e){for(const n of t)e.removeAttribute(gO,n)}function zBe(t,e,n){for(const i of t)e.setAttribute(gO,n,i)}class HBe extends xe{static get pluginName(){return"AlignmentEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("alignment",{options:mO.map(n=>({name:n}))})}init(){const e=this.editor,n=e.locale,i=e.model.schema,o=KY(e.config.get("alignment.options")).filter(u=>qY(u.name)&&!jY(u.name,n)),s=o.some(u=>!!u.className);i.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),s?e.conversion.attributeToAttribute(jBe(o)):e.conversion.for("downcast").attributeToAttribute(UBe(o));const a=WBe(o);for(const u of a)e.conversion.for("upcast").attributeToAttribute(u);const l=qBe(o);for(const u of l)e.conversion.for("upcast").attributeToAttribute(u);e.commands.add("alignment",new FBe(e))}}function UBe(t){const e={};for(const{name:i}of t)e[i]={key:"style",value:{"text-align":i}};return{model:{key:"alignment",values:t.map(i=>i.name)},view:e}}function WBe(t){const e=[];for(const{name:n}of t)e.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return e}function qBe(t){const e=[];for(const{name:n}of t)e.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return e}function jBe(t){const e={};for(const i of t)e[i.name]={key:"class",value:i.className};return{model:{key:"alignment",values:t.map(i=>i.name)},view:e}}const qg=new Map([["left",rO],["right",aY],["center",oY],["justify",sY]]);class KBe extends xe{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=KY(e.config.get("alignment.options"));n.map(i=>i.name).filter(qY).forEach(i=>this._addButton(i)),this._addToolbarDropdown(n),this._addMenuBarMenu(n)}_addButton(e){this.editor.ui.componentFactory.add(`alignment:${e}`,i=>this._createButton(i,e))}_createButton(e,n,i={}){const r=this.editor,o=r.commands.get("alignment"),s=new wt(e);return s.set({label:this.localizedOptionTitles[n],icon:qg.get(n),tooltip:!0,isToggleable:!0,...i}),s.bind("isEnabled").to(o),s.bind("isOn").to(o,"value",a=>a===n),this.listenTo(s,"execute",()=>{r.execute("alignment",{value:n}),r.editing.view.focus()}),s}_addToolbarDropdown(e){const n=this.editor;n.ui.componentFactory.add("alignment",r=>{const o=Ro(r),s=r.uiLanguageDirection==="rtl"?"w":"e",a=r.t;CS(o,()=>e.map(c=>this._createButton(r,c.name,{tooltipPosition:s})),{enableActiveItemFocusOnDropdownOpen:!0,isVertical:!0,ariaLabel:a("Text alignment toolbar")}),o.buttonView.set({label:a("Text alignment"),tooltip:!0}),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const l=r.contentLanguageDirection==="rtl"?qg.get("right"):qg.get("left"),u=n.commands.get("alignment");return o.buttonView.bind("icon").to(u,"value",c=>qg.get(c)||l),o.bind("isEnabled").to(u,"isEnabled"),this.listenTo(o,"execute",()=>{n.editing.view.focus()}),o})}_addMenuBarMenu(e){const n=this.editor;n.ui.componentFactory.add("menuBar:alignment",i=>{const r=n.commands.get("alignment"),o=i.t,s=new la(i),a=new Zm(i);s.bind("isEnabled").to(r),a.set({ariaLabel:o("Text alignment"),role:"menu"}),s.buttonView.set({label:o("Text alignment")});for(const l of e){const u=new yg(i,s),c=new Wi(i);c.delegate("execute").to(s),c.set({label:this.localizedOptionTitles[l.name],icon:qg.get(l.name),role:"menuitemcheckbox",isToggleable:!0}),c.on("execute",()=>{n.execute("alignment",{value:l.name}),n.editing.view.focus()}),c.bind("isOn").to(r,"value",d=>d===l.name),c.bind("isEnabled").to(r,"isEnabled"),u.children.add(c),a.items.add(u)}return s.panelView.children.add(a),s})}}class GBe extends xe{static get requires(){return[HBe,KBe]}static get pluginName(){return"Alignment"}static get isOfficialPlugin(){return!0}}class GY{model;limit;_isLocked;_size;_batch=null;_changeCallback;_selectionChangeCallback;constructor(e,n=20){this.model=e,this._size=0,this.limit=n,this._isLocked=!1,this._changeCallback=(i,r)=>{r.isLocal&&r.isUndoable&&r!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){(!this.isLocked||e)&&(this._batch=null,this._size=0)}}class YBe extends Ht{_buffer;constructor(e,n){super(e),this._buffer=new GY(e.model,n),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const n=this.editor.model,i=n.document,r=e.text||"",o=r.length;let s=i.selection;if(e.selection?s=e.selection:e.range&&(s=n.createSelection(e.range)),!n.canEditAt(s))return;const a=e.resultRange;n.enqueueChange(this._buffer.batch,l=>{this._buffer.lock();const u=Array.from(i.selection.getAttributes());n.deleteContent(s),r&&n.insertContent(l.createText(r,u),s),a?l.setSelection(a):s.is("documentSelection")||l.setSelection(s),this._buffer.unlock(),this._buffer.input(o)})}}const YY=["insertText","insertReplacementText"],XBe=[...YY,"insertCompositionText"];class JBe extends _l{focusObserver;constructor(e){super(e),this.focusObserver=e.getObserver(d1);const n=vt.isAndroid?XBe:YY,i=e.document;i.on("beforeinput",(r,o)=>{if(!this.isEnabled)return;const{data:s,targetRanges:a,inputType:l,domEvent:u,isComposing:c}=o;if(!n.includes(l))return;this.focusObserver.flush();const d=new pu(i,"insertText");i.fire(d,new Sf(e,u,{text:s,selection:e.createSelection(a),isComposing:c})),d.stop.called&&r.stop()}),vt.isAndroid||i.on("compositionend",(r,{data:o,domEvent:s})=>{this.isEnabled&&o&&i.fire("insertText",new Sf(e,s,{text:o,isComposing:!0}))},{priority:"low"})}observe(){}stopObserving(){}}class XY extends xe{_typingQueue;static get pluginName(){return"Input"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model,i=e.editing.view,r=e.editing.mapper,o=n.document.selection;this._typingQueue=new ZBe(e),i.addObserver(JBe);const s=new YBe(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",s),e.commands.add("input",s),this.listenTo(i.document,"beforeinput",()=>{this._typingQueue.flush("next beforeinput")},{priority:"high"}),this.listenTo(i.document,"insertText",(a,l)=>{const{text:u,selection:c}=l;if(i.document.selection.isFake&&c&&i.document.selection.isSimilar(c)&&l.preventDefault(),c&&Array.from(c.getRanges()).some(m=>!m.isCollapsed)&&l.preventDefault(),!s.isEnabled){l.preventDefault();return}let d;c&&(d=Array.from(c.getRanges()).filter(m=>m.root.is("rootElement")).map(m=>r.toModelRange(m)).map(m=>eO(m,n.schema)||m)),(!d||!d.length)&&(d=Array.from(o.getRanges()));let f=u;if(vt.isAndroid){const m=Array.from(d[0].getItems()).reduce((g,v)=>g+(v.is("$textProxy")?v.data:""),"");if(m&&(m.length<=f.length?f.startsWith(m)&&(f=f.substring(m.length),d[0].start=d[0].start.getShiftedBy(m.length)):m.startsWith(f)&&(d[0].start=d[0].start.getShiftedBy(f.length),f="")),f.length==0&&d[0].isCollapsed)return}const h={text:f,selection:n.createSelection(d)};this._typingQueue.push(h,!!l.isComposing),l.domEvent.defaultPrevented&&this._typingQueue.flush("beforeinput default prevented")}),vt.isAndroid?this.listenTo(i.document,"keydown",(a,l)=>{o.isCollapsed||l.keyCode!=229||!i.document.isComposing||KV(n,s)}):this.listenTo(i.document,"compositionstart",()=>{o.isCollapsed||KV(n,s)},{priority:"high"}),this.listenTo(i.document,"mutations",(a,{mutations:l})=>{if(this._typingQueue.hasAffectedElements())for(const{node:u}of l){const c=e4e(u,r),d=r.toModelElement(c);if(this._typingQueue.isElementAffected(d)){this._typingQueue.flush("mutations");return}}}),this.listenTo(i.document,"compositionend",()=>{this._typingQueue.flush("before composition end")},{priority:"high"}),this.listenTo(i.document,"compositionend",()=>{this._typingQueue.flush("after composition end");const a=[];if(this._typingQueue.hasAffectedElements())for(const l of this._typingQueue.flushAffectedElements()){const u=r.toViewElement(l);u&&a.push({type:"children",node:u})}(a.length||!vt.isAndroid)&&i.document.fire("mutations",{mutations:a})},{priority:"lowest"})}destroy(){super.destroy(),this._typingQueue.destroy()}}class ZBe{editor;flushDebounced=ml(()=>this.flush("timeout"),50);_queue=[];_isComposing=!1;_affectedElements=new Set;constructor(e){this.editor=e}destroy(){for(this.flushDebounced.cancel(),this._affectedElements.clear();this._queue.length;)this.shift()}get length(){return this._queue.length}push(e,n){const i={text:e.text};if(e.selection){i.selectionRanges=[];for(const r of e.selection.getRanges())i.selectionRanges.push(ko.fromRange(r)),this._affectedElements.add(r.start.parent)}this._queue.push(i),this._isComposing||=n,this.flushDebounced()}shift(){const e=this._queue.shift(),n={text:e.text};if(e.selectionRanges){const i=e.selectionRanges.map(r=>QBe(r)).filter(r=>!!r);i.length&&(n.selection=this.editor.model.createSelection(i))}return n}flush(e){const n=this.editor,i=n.model,r=n.editing.view;if(this.flushDebounced.cancel(),!this._queue.length)return;const s=n.commands.get("insertText").buffer;i.enqueueChange(s.batch,()=>{for(s.lock();this._queue.length;){const a=this.shift();n.execute("insertText",a)}s.unlock(),this._isComposing||this._affectedElements.clear(),this._isComposing=!1}),r.scrollToTheSelection()}isElementAffected(e){return this._affectedElements.has(e)}hasAffectedElements(){return this._affectedElements.size>0}flushAffectedElements(){const e=Array.from(this._affectedElements);return this._affectedElements.clear(),e}}function KV(t,e){if(!e.isEnabled)return;const n=e.buffer;n.lock(),t.enqueueChange(n.batch,()=>{t.deleteContent(t.document.selection)}),n.unlock()}function QBe(t){const e=t.toRange();return t.detach(),e.root.rootName=="$graveyard"?null:e}function e4e(t,e){let n=t.is("$text")?t.parent:t;for(;!e.toModelElement(n);)n=n.parent;return n}class GV extends Ht{direction;_buffer;constructor(e,n){super(e),this.direction=n,this._buffer=new GY(e.model,e.config.get("typing.undoStep")),this._isEnabledBasedOnSelection=!1}get buffer(){return this._buffer}execute(e={}){const n=this.editor.model,i=n.document;n.enqueueChange(this._buffer.batch,r=>{this._buffer.lock();const o=r.createSelection(e.selection||i.selection);if(!n.canEditAt(o))return;const s=e.sequence||1,a=o.isCollapsed;if(o.isCollapsed&&n.modifySelection(o,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(s)){this._replaceEntireContentWithParagraph(r);return}if(this._shouldReplaceFirstBlockWithParagraph(o,s)){this.editor.execute("paragraph",{selection:o});return}if(o.isCollapsed)return;let l=0;o.getFirstRange().getMinimalFlatRanges().forEach(u=>{l+=yA(u.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),n.deleteContent(o,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(l),r.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const n=this.editor.model,r=n.document.selection,o=n.schema.getLimitElement(r);if(!(r.isCollapsed&&r.containsEntireContent(o))||!n.schema.checkChild(o,"paragraph"))return!1;const a=o.getChild(0);return!(a&&a.is("element","paragraph"))}_replaceEntireContentWithParagraph(e){const n=this.editor.model,r=n.document.selection,o=n.schema.getLimitElement(r),s=e.createElement("paragraph");e.remove(e.createRangeIn(o)),e.insert(s,o),e.setSelection(s,0)}_shouldReplaceFirstBlockWithParagraph(e,n){const i=this.editor.model;if(n>1||this.direction!="backward"||!e.isCollapsed)return!1;const r=e.getFirstPosition(),o=i.schema.getLimitElement(r),s=o.getChild(0);return!(r.parent!=s||!e.containsEntireContent(s)||!i.schema.checkChild(o,"paragraph")||s.name=="paragraph")}}const t4e="character",YV="word",n4e="codePoint",uc="selection",Fh="backward",Cp="forward",JY={deleteContent:{unit:uc,direction:Fh},deleteContentBackward:{unit:n4e,direction:Fh},deleteWordBackward:{unit:YV,direction:Fh},deleteHardLineBackward:{unit:uc,direction:Fh},deleteSoftLineBackward:{unit:uc,direction:Fh},deleteContentForward:{unit:t4e,direction:Cp},deleteWordForward:{unit:YV,direction:Cp},deleteHardLineForward:{unit:uc,direction:Cp},deleteSoftLineForward:{unit:uc,direction:Cp}};class i4e extends _l{constructor(e){super(e);const n=e.document;let i=0;n.on("keydown",()=>{i++}),n.on("keyup",()=>{i=0}),n.on("beforeinput",(r,o)=>{if(!this.isEnabled)return;const{targetRanges:s,domEvent:a,inputType:l}=o,u=JY[l];if(!u)return;const c={direction:u.direction,unit:u.unit,sequence:i};c.unit==uc&&(c.selectionToRemove=e.createSelection(s[0])),l==="deleteContentBackward"&&(vt.isAndroid&&(c.sequence=1),o4e(s)&&(c.unit=uc,c.selectionToRemove=e.createSelection(s)));const d=new Hf(n,"delete",s[0]);n.fire(d,new Sf(e,a,c)),d.stop.called&&r.stop()}),vt.isBlink&&r4e(this)}observe(){}stopObserving(){}}function r4e(t){const e=t.view,n=e.document;let i=null,r=!1;n.on("keydown",(a,{keyCode:l})=>{i=l,r=!1}),n.on("keyup",(a,{keyCode:l,domEvent:u})=>{const c=n.selection,d=t.isEnabled&&l==i&&o(l)&&!c.isCollapsed&&!r;if(i=null,d){const f=c.getFirstRange(),h=new Hf(n,"delete",f),m={unit:uc,direction:s(l),selectionToRemove:c};n.fire(h,new Sf(e,u,m))}}),n.on("beforeinput",(a,{inputType:l})=>{const u=JY[l];o(i)&&u&&u.direction==s(i)&&(r=!0)},{priority:"high"}),n.on("beforeinput",(a,{inputType:l,data:u})=>{i==Yt.delete&&l=="insertText"&&u==""&&a.stop()},{priority:"high"});function o(a){return a==Yt.backspace||a==Yt.delete}function s(a){return a==Yt.backspace?Fh:Cp}}function o4e(t){if(t.length!=1||t[0].isCollapsed)return!1;const e=t[0].getWalker({direction:"backward",singleCharacters:!0,ignoreElementEnd:!0});let n=0;for(const{nextPosition:i,item:r}of e){if(i.parent.is("$text")){const o=i.parent.data,s=i.offset;if(UM(o,s)||WM(o,s)||aG(o,s))continue;n++}else(r.is("containerElement")||r.is("emptyElement"))&&n++;if(n>1)return!0}return!1}class yu extends xe{_undoOnBackspace;static get pluginName(){return"Delete"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.editing.view,i=n.document,r=e.model.document;n.addObserver(i4e),this._undoOnBackspace=!1;const o=new GV(e,"forward");e.commands.add("deleteForward",o),e.commands.add("forwardDelete",o),e.commands.add("delete",new GV(e,"backward")),this.listenTo(i,"delete",(s,a)=>{i.isComposing||a.preventDefault();const{direction:l,sequence:u,selectionToRemove:c,unit:d}=a,f=l==="forward"?"deleteForward":"delete",h={sequence:u};if(d=="selection"){const m=Array.from(c.getRanges()).map(g=>e.editing.mapper.toModelRange(g)).map(g=>eO(g,e.model.schema)||g);h.selection=e.model.createSelection(m)}else h.unit=d;e.execute(f,h),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(i,"keydown",(s,a)=>{if(i.isComposing||a.keyCode!=Yt.backspace||!r.selection.isCollapsed)return;const l=e.model.schema.getLimitElement(r.selection),u=e.model.createPositionAt(l,0);if(u.isTouching(r.selection.getFirstPosition())){a.preventDefault();const c=e.model.schema.getNearestSelectionRange(u,"forward");if(!c)return;const d=n.createSelection(e.editing.mapper.toViewRange(c)),f=d.getFirstRange(),h=new Hf(document,"delete",f),m={unit:"selection",direction:"backward",selectionToRemove:d};i.fire(h,new Sf(n,a.domEvent,m))}}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(i,"delete",(s,a)=>{this._undoOnBackspace&&a.direction=="backward"&&a.sequence==1&&a.unit=="codePoint"&&(this._undoOnBackspace=!1,e.execute("undo"),a.preventDefault(),s.stop())},{context:"$capture"}),this.listenTo(r,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class s4e extends xe{static get requires(){return[XY,yu]}static get pluginName(){return"Typing"}static get isOfficialPlugin(){return!0}}function ZY(t,e){let n=t.start;return{text:Array.from(t.getWalker({ignoreElementEnd:!1})).reduce((r,{item:o})=>o.is("$text")||o.is("$textProxy")?r+o.data:(n=e.createPositionAfter(o),""),""),range:e.createRange(n,t.end)}}class pO extends Ln(){model;testCallback;_hasMatch;constructor(e,n){super(),this.model=e,this.testCallback=n,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const n=this.model.document;this.listenTo(n.selection,"change:range",(i,{directChange:r})=>{if(r){if(!n.selection.isCollapsed){this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1);return}this._evaluateTextBeforeSelection("selection")}}),this.listenTo(n,"change:data",(i,r)=>{r.isUndo||!r.isLocal||this._evaluateTextBeforeSelection("data",{batch:r})})}_evaluateTextBeforeSelection(e,n={}){const i=this.model,o=i.document.selection,s=i.createRange(i.createPositionAt(o.focus.parent,0),o.focus),{text:a,range:l}=ZY(s,i),u=this.testCallback(a);if(!u&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!u,u){const c=Object.assign(n,{text:a,range:l});typeof u=="object"&&Object.assign(c,u),this.fire(`matched:${e}`,c)}}}class v1 extends xe{attributes;_overrideUid;_isNextGravityRestorationSkipped=!1;static get pluginName(){return"TwoStepCaretMovement"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,n=e.model,i=e.editing.view,r=e.locale,o=n.document.selection;this.listenTo(i.document,"arrowKey",(s,a)=>{if(!o.isCollapsed||a.shiftKey||a.altKey||a.ctrlKey)return;const l=a.keyCode==Yt.arrowright,u=a.keyCode==Yt.arrowleft;if(!l&&!u)return;const c=r.contentLanguageDirection;let d=!1;c==="ltr"&&l||c==="rtl"&&u?d=this._handleForwardMovement(a):d=this._handleBackwardMovement(a),d===!0&&s.stop()},{context:"$text",priority:"highest"}),this.listenTo(o,"change:range",(s,a)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=!1;return}this._isGravityOverridden&&(!a.directChange&&ys(o.getFirstPosition(),this.attributes)||this._restoreGravity())}),this._enableClickingAfterNode(),this._enableInsertContentSelectionAttributesFixer(),this._handleDeleteContentAfterNode()}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const n=this.attributes,i=this.editor.model,r=i.document.selection,o=r.getFirstPosition();return this._isGravityOverridden||o.isAtStart&&Ml(r,n)?!1:ys(o,n)?(e&&Kg(e),Ml(r,n)&&ys(o,n,!0)?jg(i,n):this._overrideGravity(),!0):!1}_handleBackwardMovement(e){const n=this.attributes,i=this.editor.model,r=i.document.selection,o=r.getFirstPosition();return this._isGravityOverridden?(e&&Kg(e),this._restoreGravity(),ys(o,n,!0)?jg(i,n):hy(i,n,o),!0):o.isAtStart?Ml(r,n)?(e&&Kg(e),hy(i,n,o),!0):!1:!Ml(r,n)&&ys(o,n,!0)?(e&&Kg(e),hy(i,n,o),!0):XV(o,n)?o.isAtEnd&&!Ml(r,n)&&ys(o,n)?(e&&Kg(e),hy(i,n,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):!1}_enableClickingAfterNode(){const e=this.editor,n=e.model,i=n.document.selection,r=e.editing.view.document;e.editing.view.addObserver(nO),e.editing.view.addObserver(B5e);let o=!1,s=!1;this.listenTo(r,"touchstart",()=>{s=!1,o=!0}),this.listenTo(r,"mousedown",()=>{s=!0}),this.listenTo(r,"selectionChange",()=>{const a=this.attributes;if(!s&&!o||(s=!1,o=!1,!i.isCollapsed)||!Ml(i,a))return;const l=i.getFirstPosition();ys(l,a)&&(l.isAtStart||ys(l,a,!0)?jg(n,a):this._isGravityOverridden||this._overrideGravity())})}_enableInsertContentSelectionAttributesFixer(){const n=this.editor.model,i=n.document.selection,r=this.attributes;this.listenTo(n,"insertContent",()=>{const o=i.getFirstPosition();Ml(i,r)&&ys(o,r)&&jg(n,r)},{priority:"low"})}_handleDeleteContentAfterNode(){const e=this.editor,n=e.model,i=n.document.selection,r=e.editing.view;let o=!1,s=!1;this.listenTo(r.document,"delete",(a,l)=>{o=l.direction==="backward"},{priority:"high"}),this.listenTo(n,"deleteContent",()=>{if(!o)return;const a=i.getFirstPosition();s=Ml(i,this.attributes)&&!XV(a,this.attributes)},{priority:"high"}),this.listenTo(n,"deleteContent",()=>{o&&(o=!1,!s&&e.model.enqueueChange(()=>{const a=i.getFirstPosition();Ml(i,this.attributes)&&ys(a,this.attributes)&&(a.isAtStart||ys(a,this.attributes,!0)?jg(n,this.attributes):this._isGravityOverridden||this._overrideGravity())}))},{priority:"low"})}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function Ml(t,e){for(const n of e)if(t.hasAttribute(n))return!0;return!1}function hy(t,e,n){const i=n.nodeBefore;t.change(r=>{if(i){const o=[],s=t.schema.isObject(i)&&t.schema.isInline(i);for(const[a,l]of i.getAttributes())t.schema.checkAttribute("$text",a)&&(!s||t.schema.getAttributeProperties(a).copyFromObject!==!1)&&o.push([a,l]);r.setSelectionAttribute(o)}else r.removeSelectionAttribute(e)})}function jg(t,e){t.change(n=>{n.removeSelectionAttribute(e)})}function Kg(t){t.preventDefault()}function XV(t,e){const n=t.getShiftedBy(-1);return ys(n,e)}function ys(t,e,n=!1){const{nodeBefore:i,nodeAfter:r}=t;for(const o of e){const s=i?i.getAttribute(o):void 0,a=r?r.getAttribute(o):void 0;if(!(n&&(s===void 0||a===void 0))&&a!==s)return!0}return!1}const JV={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:dh('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:dh("'"),to:[null,"",null,""]},quotesPrimaryEnGb:{from:dh("'"),to:[null,"",null,""]},quotesSecondaryEnGb:{from:dh('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:dh('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:dh("'"),to:[null,"",null,""]}},ZV={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},a4e=["symbols","mathematical","typography","quotes"];class l4e extends xe{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("typing",{transformations:{include:a4e}})}init(){const n=this.editor.model.document.selection;n.on("change:range",()=>{const i=n.anchor,r=!!i&&i.parent.is("element","codeBlock"),o=n.hasAttribute("code");this.isEnabled=!(r||o)}),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,n=e.model,i=e.plugins.get("Delete"),r=f4e(e.config.get("typing.transformations")),o=a=>{for(const l of r)if(l.from.test(a))return{normalizedTransformation:l}},s=new pO(e.model,o);s.on("matched:data",(a,l)=>{if(!l.batch.isTyping)return;const{from:u,to:c}=l.normalizedTransformation,d=u.exec(l.text),f=c(d.slice(1)),h=l.range;let m=d.index;n.enqueueChange(g=>{for(let v=1;v<d.length;v++){const p=d[v],b=f[v-1];if(b==null){m+=p.length;continue}const y=h.start.getShiftedBy(m),_=n.createRange(y,y.getShiftedBy(p.length)),C=d4e(y);n.insertContent(g.createText(b,C),_),m+=b.length}n.enqueueChange(()=>{i.requestUndoOnBackspace()})})}),s.bind("isEnabled").to(this)}}function u4e(t){return typeof t=="string"?new RegExp(`(${OIe(t)})$`):t}function c4e(t){return typeof t=="string"?()=>[t]:t instanceof Array?()=>t:t}function d4e(t){return(t.textNode?t.textNode:t.nodeAfter).getAttributes()}function dh(t){return new RegExp(`(^|\\s)(${t})([^${t}]*)(${t})$`)}function f4e(t){const e=t.extra||[],n=t.remove||[],i=o=>!n.includes(o),r=t.include.concat(e).filter(i);return h4e(r).filter(i).map(o=>typeof o=="string"&&JV[o]?JV[o]:o).filter(o=>typeof o=="object").map(o=>({from:u4e(o.from),to:c4e(o.to)}))}function h4e(t){const e=new Set;for(const n of t)if(typeof n=="string"&&ZV[n])for(const i of ZV[n])e.add(i);else e.add(n);return Array.from(e)}function SS(t,e,n,i){return i.createRange(QV(t,e,n,!0,i),QV(t,e,n,!1,i))}function QV(t,e,n,i,r){let o=t.textNode||(i?t.nodeBefore:t.nodeAfter),s=null;for(;o&&o.getAttribute(e)==n;)s=o,o=i?o.previousSibling:o.nextSibling;return s?r.createPositionAt(s,i?"before":"after"):t}function QY(t,e,n,i){const r=t.editing.view,o=new Set;r.document.registerPostFixer(s=>{const a=t.model.document.selection;let l=!1;if(a.hasAttribute(e)){const u=SS(a.getFirstPosition(),e,a.getAttribute(e),t.model),c=t.editing.mapper.toViewRange(u);for(const d of c.getItems())d.is("element",n)&&!d.hasClass(i)&&(s.addClass(i,d),o.add(d),l=!0)}return l}),t.conversion.for("editingDowncast").add(s=>{s.on("insert",a,{priority:"highest"}),s.on("remove",a,{priority:"highest"}),s.on("attribute",a,{priority:"highest"}),s.on("selection",a,{priority:"highest"});function a(){r.change(l=>{for(const u of o.values())l.removeClass(i,u),o.delete(u)})}})}function Nu(t,e,n,i){let r,o=null;typeof i=="function"?r=i:(o=t.commands.get(i),r=()=>{t.execute(i)}),t.model.document.on("change:data",(s,a)=>{if(o&&!o.isEnabled||!e.isEnabled)return;const l=Mi(t.model.document.selection.getRanges());if(!l.isCollapsed||a.isUndo||!a.isLocal)return;const u=Array.from(t.model.document.differ.getChanges()),c=u[0];if(u.length!=1||c.type!=="insert"||c.name!="$text"||c.length!=1)return;const d=c.position.parent;if(d.is("element","codeBlock")||d.is("element","listItem")&&typeof i!="function"&&!["numberedList","bulletedList","todoList"].includes(i)||o&&o.value===!0)return;const f=d.getChild(0),h=t.model.createRangeOn(f);if(!h.containsRange(l)&&!l.end.isEqual(h.end))return;const m=n.exec(f.data.substr(0,l.end.offset));m&&t.model.enqueueChange(g=>{const v=t.model.document.selection,p=g.createPositionAt(d,0),b=g.createPositionAt(d,m[0].length),y=new ko(p,b);if(r({match:m})!==!1){const C=Array.from(v.getAttributes());g.remove(y);const S=v.getFirstRange(),k=g.createRangeIn(d);d.isEmpty&&!k.isEqual(S)&&!k.containsRange(S,!0)&&g.remove(d),m4e(g,v,C)}y.detach(),t.model.enqueueChange(()=>{t.plugins.get("Delete").requestUndoOnBackspace()})})})}function m4e(t,e,n){const i=t.model.schema,r=e.getFirstPosition();let o=new su(r);i.checkChild(o,"$text")&&(o=o.push("$text"));for(const[s,a]of n)i.checkAttribute(o,s)&&t.setSelectionAttribute(s,a)}function fh(t,e,n,i){let r,o;n instanceof RegExp?r=n:o=n,o=o||(s=>{let a;const l=[],u=[];for(;(a=r.exec(s))!==null&&!(a&&a.length<4);){let{index:c,"1":d,"2":f,"3":h}=a;const m=d+f+h;c+=a[0].length-m.length;const g=[c,c+d.length],v=[c+d.length+f.length,c+d.length+f.length+h.length];l.push(g),l.push(v),u.push([c+d.length,c+d.length+f.length])}return{remove:l,format:u}}),t.model.document.on("change:data",(s,a)=>{if(a.isUndo||!a.isLocal||!e.isEnabled)return;const l=t.model,u=l.document.selection;if(!u.isCollapsed)return;const c=Array.from(l.document.differ.getChanges()),d=c[0];if(c.length!=1||d.type!=="insert"||d.name!="$text"||d.length!=1)return;const f=u.focus,h=f.parent,{text:m,range:g}=g4e(l.createRange(l.createPositionAt(h,0),f),l),v=o(m),p=eF(g.start,v.format,l),b=eF(g.start,v.remove,l);p.length&&b.length&&l.enqueueChange(y=>{if(i(y,p)!==!1){for(const C of b.reverse())y.remove(C);l.enqueueChange(()=>{t.plugins.get("Delete").requestUndoOnBackspace()})}})})}function eF(t,e,n){return e.filter(i=>i[0]!==void 0&&i[1]!==void 0).map(i=>n.createRange(t.getShiftedBy(i[0]),t.getShiftedBy(i[1])))}function g4e(t,e){let n=t.start;return{text:Array.from(t.getItems()).reduce((r,o)=>!(o.is("$text")||o.is("$textProxy"))||o.getAttribute("code")?(n=e.createPositionAfter(o),""):r+o.data,""),range:e.createRange(n,t.end)}}class p4e extends xe{static get requires(){return[yu]}static get pluginName(){return"Autoformat"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,n=this.editor.t;this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats(),this._addCodeBlockAutoformats(),this._addHorizontalLineAutoformats(),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Revert autoformatting action"),keystroke:"Backspace"}]})}_addListAutoformats(){const e=this.editor.commands;e.get("bulletedList")&&Nu(this.editor,this,/^[*-]\s$/,"bulletedList"),e.get("numberedList")&&Nu(this.editor,this,/^1[.|)]\s$/,"numberedList"),e.get("todoList")&&Nu(this.editor,this,/^\[\s?\]\s$/,"todoList"),e.get("checkTodoList")&&Nu(this.editor,this,/^\[\s?x\s?\]\s$/,()=>{this.editor.execute("todoList"),this.editor.execute("checkTodoList")})}_addBasicStylesAutoformats(){const e=this.editor.commands;if(e.get("bold")){const n=my(this.editor,"bold");fh(this.editor,this,/(?:^|\s)(\*\*)([^*]+)(\*\*)$/g,n),fh(this.editor,this,/(?:^|\s)(__)([^_]+)(__)$/g,n)}if(e.get("italic")){const n=my(this.editor,"italic");fh(this.editor,this,/(?:^|\s)(\*)([^*_]+)(\*)$/g,n),fh(this.editor,this,/(?:^|\s)(_)([^_]+)(_)$/g,n)}if(e.get("code")){const n=my(this.editor,"code");fh(this.editor,this,/(`)([^`]+)(`)$/g,n)}if(e.get("strikethrough")){const n=my(this.editor,"strikethrough");fh(this.editor,this,/(~~)([^~]+)(~~)$/g,n)}}_addHeadingAutoformats(){const e=this.editor.commands.get("heading");e&&e.modelElements.filter(n=>n.match(/^heading[1-6]$/)).forEach(n=>{const i=n[7],r=new RegExp(`^(#{${i}})\\s$`);Nu(this.editor,this,r,()=>{if(!e.isEnabled||e.value===n)return!1;this.editor.execute("heading",{value:n})})})}_addBlockQuoteAutoformats(){this.editor.commands.get("blockQuote")&&Nu(this.editor,this,/^>\s$/,"blockQuote")}_addCodeBlockAutoformats(){const e=this.editor,n=e.model.document.selection;e.commands.get("codeBlock")&&Nu(e,this,/^```$/,()=>{if(n.getFirstPosition().parent.is("element","listItem"))return!1;this.editor.execute("codeBlock",{usePreviousLanguageChoice:!0})})}_addHorizontalLineAutoformats(){this.editor.commands.get("horizontalLine")&&Nu(this.editor,this,/^---$/,"horizontalLine")}}function my(t,e){return(n,i)=>{if(!t.commands.get(e).isEnabled)return!1;const o=t.model.schema.getValidRanges(i,e);for(const s of o)n.setAttribute(e,!0,s);n.removeSelectionAttribute(e)}}class Kf extends Ht{attributeKey;constructor(e,n){super(e),this.attributeKey=n}refresh(){const e=this.editor.model,n=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(n.selection,this.attributeKey)}execute(e={}){const n=this.editor.model,r=n.document.selection,o=e.forceValue===void 0?!this.value:e.forceValue;n.change(s=>{if(r.isCollapsed)o?s.setSelectionAttribute(this.attributeKey,!0):s.removeSelectionAttribute(this.attributeKey);else{const a=n.schema.getValidRanges(r.getRanges(),this.attributeKey,{includeEmptyRanges:!0});for(const l of a){let u=l,c=this.attributeKey;l.isCollapsed&&(u=l.start.parent,c=cs._getStoreAttributeKey(this.attributeKey)),o?s.setAttribute(c,o,u):s.removeAttribute(c,u)}}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,n=e.schema,i=e.document.selection;if(i.isCollapsed)return i.hasAttribute(this.attributeKey);for(const r of i.getRanges())for(const o of r.getItems())if(n.checkAttribute(o,this.attributeKey))return o.hasAttribute(this.attributeKey);return!1}}const hh="bold";class v4e extends xe{static get pluginName(){return"BoldEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=this.editor.t;e.model.schema.extend("$text",{allowAttributes:hh}),e.model.schema.setAttributeProperties(hh,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:hh,view:"strong",upcastAlso:["b",i=>{const r=i.getStyle("font-weight");return r&&(r=="bold"||Number(r)>=600)?{name:!0,styles:["font-weight"]}:null}]}),e.commands.add(hh,new Kf(e,hh)),e.keystrokes.set("CTRL+B",hh),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Bold text"),keystroke:"CTRL+B"}]})}}function Gf({editor:t,commandName:e,plugin:n,icon:i,label:r,keystroke:o}){return s=>{const a=t.commands.get(e),l=new s(t.locale);return l.set({label:r,icon:i,keystroke:o,isToggleable:!0}),l.bind("isEnabled").to(a,"isEnabled"),l.bind("isOn").to(a,"value"),l instanceof Wi?l.set({role:"menuitemcheckbox"}):l.set({tooltip:!0}),n.listenTo(l,"execute",()=>{t.execute(e),t.editing.view.focus()}),l}}const YT="bold";class b4e extends xe{static get pluginName(){return"BoldUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:YT,plugin:this,icon:lY,label:n("Bold"),keystroke:"CTRL+B"});e.ui.componentFactory.add(YT,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+YT,()=>i(Wi))}}class y4e extends xe{static get requires(){return[v4e,b4e]}static get pluginName(){return"Bold"}static get isOfficialPlugin(){return!0}}const ld="code",w4e="ck-code_selected";class _4e extends xe{static get pluginName(){return"CodeEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[v1]}init(){const e=this.editor,n=this.editor.t;e.model.schema.extend("$text",{allowAttributes:ld}),e.model.schema.setAttributeProperties(ld,{isFormatting:!0,copyOnEnter:!1}),e.conversion.attributeToElement({model:ld,view:"code"}),e.commands.add(ld,new Kf(e,ld)),e.plugins.get(v1).registerAttribute(ld),QY(e,ld,"code",w4e),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Move out of an inline code style"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}}const XT="code";class C4e extends xe{static get pluginName(){return"CodeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:XT,plugin:this,icon:$De,label:n("Code")});e.ui.componentFactory.add(XT,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+XT,()=>i(Wi))}}class S4e extends xe{static get requires(){return[_4e,C4e]}static get pluginName(){return"Code"}static get isOfficialPlugin(){return!0}}const mh="italic";class k4e extends xe{static get pluginName(){return"ItalicEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=this.editor.t;e.model.schema.extend("$text",{allowAttributes:mh}),e.model.schema.setAttributeProperties(mh,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:mh,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(mh,new Kf(e,mh)),e.keystrokes.set("CTRL+I",mh),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Italic text"),keystroke:"CTRL+I"}]})}}const JT="italic";class T4e extends xe{static get pluginName(){return"ItalicUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:JT,plugin:this,icon:JDe,keystroke:"CTRL+I",label:n("Italic")});e.ui.componentFactory.add(JT,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+JT,()=>i(Wi))}}class E4e extends xe{static get requires(){return[k4e,T4e]}static get pluginName(){return"Italic"}static get isOfficialPlugin(){return!0}}const Gg="strikethrough";class x4e extends xe{static get pluginName(){return"StrikethroughEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Gg}),e.model.schema.setAttributeProperties(Gg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Gg,view:"s",upcastAlso:["del","strike",{styles:{"text-decoration":"line-through"}}]}),e.commands.add(Gg,new Kf(e,Gg)),e.keystrokes.set("CTRL+SHIFT+X","strikethrough"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Strikethrough text"),keystroke:"CTRL+SHIFT+X"}]})}}const ZT="strikethrough";class A4e extends xe{static get pluginName(){return"StrikethroughUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:ZT,plugin:this,icon:bNe,keystroke:"CTRL+SHIFT+X",label:n("Strikethrough")});e.ui.componentFactory.add(ZT,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+ZT,()=>i(Wi))}}class P4e extends xe{static get requires(){return[x4e,A4e]}static get pluginName(){return"Strikethrough"}static get isOfficialPlugin(){return!0}}const Yg="subscript";class I4e extends xe{static get pluginName(){return"SubscriptEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Yg}),e.model.schema.setAttributeProperties(Yg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Yg,view:"sub",upcastAlso:[{styles:{"vertical-align":"sub"}}]}),e.commands.add(Yg,new Kf(e,Yg))}}const QT="subscript";class R4e extends xe{static get pluginName(){return"SubscriptUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:QT,plugin:this,icon:yNe,label:n("Subscript")});e.ui.componentFactory.add(QT,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+QT,()=>i(Wi))}}class M4e extends xe{static get requires(){return[I4e,R4e]}static get pluginName(){return"Subscript"}static get isOfficialPlugin(){return!0}}const Xg="superscript";class O4e extends xe{static get pluginName(){return"SuperscriptEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Xg}),e.model.schema.setAttributeProperties(Xg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Xg,view:"sup",upcastAlso:[{styles:{"vertical-align":"super"}}]}),e.commands.add(Xg,new Kf(e,Xg))}}const eE="superscript";class L4e extends xe{static get pluginName(){return"SuperscriptUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:eE,plugin:this,icon:wNe,label:n("Superscript")});e.ui.componentFactory.add(eE,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+eE,()=>i(Wi))}}class D4e extends xe{static get requires(){return[O4e,L4e]}static get pluginName(){return"Superscript"}static get isOfficialPlugin(){return!0}}const Jg="underline";class N4e extends xe{static get pluginName(){return"UnderlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=this.editor.t;e.model.schema.extend("$text",{allowAttributes:Jg}),e.model.schema.setAttributeProperties(Jg,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Jg,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(Jg,new Kf(e,Jg)),e.keystrokes.set("CTRL+U","underline"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Underline text"),keystroke:"CTRL+U"}]})}}const tE="underline";class B4e extends xe{static get pluginName(){return"UnderlineUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale.t,i=Gf({editor:e,commandName:tE,plugin:this,icon:xNe,label:n("Underline"),keystroke:"CTRL+U"});e.ui.componentFactory.add(tE,()=>i(wt)),e.ui.componentFactory.add("menuBar:"+tE,()=>i(Wi))}}class V4e extends xe{static get requires(){return[N4e,B4e]}static get pluginName(){return"Underline"}static get isOfficialPlugin(){return!0}}function*eX(t,e){for(const n of e)n&&t.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class F4e extends Ht{execute(){this.editor.model.change(e=>{this.enterBlock(e),this.fire("afterExecute",{writer:e})})}enterBlock(e){const n=this.editor.model,i=n.document.selection,r=n.schema,o=i.isCollapsed,s=i.getFirstRange(),a=s.start.parent,l=s.end.parent;if(r.isLimit(a)||r.isLimit(l))return!o&&a==l&&n.deleteContent(i),!1;if(o){const u=eX(e.model.schema,i.getAttributes());return tF(e,s.start),e.setSelectionAttribute(u),!0}else{const u=!(s.start.isAtStart&&s.end.isAtEnd),c=a==l;if(n.deleteContent(i,{leaveUnmerged:u}),u){if(c)return tF(e,i.focus),!0;e.setSelection(l,0)}}return!1}}function tF(t,e){t.split(e),t.setSelection(e.parent.nextSibling,0)}const $4e={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class tX extends _l{constructor(e){super(e);const n=this.document;let i=!1;n.on("keydown",(r,o)=>{i=o.shiftKey}),n.on("beforeinput",(r,o)=>{if(!this.isEnabled)return;let s=o.inputType;vt.isSafari&&i&&s=="insertParagraph"&&(s="insertLineBreak");const a=o.domEvent,l=$4e[s];if(!l)return;const u=new Hf(n,"enter",o.targetRanges[0]);n.fire(u,new Sf(e,a,{isSoft:l.isSoft})),u.stop.called&&r.stop()})}observe(){}stopObserving(){}}class kS extends xe{static get pluginName(){return"Enter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.editing.view,i=n.document,r=this.editor.t;n.addObserver(tX),e.commands.add("enter",new F4e(e)),this.listenTo(i,"enter",(o,s)=>{i.isComposing||s.preventDefault(),!s.isSoft&&(e.execute("enter"),n.scrollToTheSelection())},{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:r("Insert a hard break (a new paragraph)"),keystroke:"Enter"}]})}}class z4e extends Ht{execute(){const e=this.editor.model,n=e.document;e.change(i=>{U4e(e,i,n.selection),this.fire("afterExecute",{writer:i})})}refresh(){const e=this.editor.model,n=e.document;this.isEnabled=H4e(e.schema,n.selection)}}function H4e(t,e){if(e.rangeCount>1)return!1;const n=e.anchor;if(!n||!t.checkChild(n,"softBreak"))return!1;const i=e.getFirstRange(),r=i.start.parent,o=i.end.parent;return!((BA(r,t)||BA(o,t))&&r!==o)}function U4e(t,e,n){const i=n.isCollapsed,r=n.getFirstRange(),o=r.start.parent,s=r.end.parent,a=o==s;if(i){const l=eX(t.schema,n.getAttributes());nF(t,e,r.end),e.removeSelectionAttribute(n.getAttributeKeys()),e.setSelectionAttribute(l)}else{const l=!(r.start.isAtStart&&r.end.isAtEnd);t.deleteContent(n,{leaveUnmerged:l}),a?nF(t,e,n.focus):l&&e.setSelection(s,0)}}function nF(t,e,n){const i=e.createElement("softBreak");t.insertContent(i,n),e.setSelection(i,"after")}function BA(t,e){return t.is("rootElement")?!1:e.isLimit(t)||BA(t.parent,e)}class W4e extends xe{static get pluginName(){return"ShiftEnter"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model.schema,i=e.conversion,r=e.editing.view,o=r.document,s=this.editor.t;n.register("softBreak",{allowWhere:"$text",isInline:!0}),i.for("upcast").elementToElement({model:"softBreak",view:"br"}),i.for("downcast").elementToElement({model:"softBreak",view:(a,{writer:l})=>l.createEmptyElement("br")}),r.addObserver(tX),e.commands.add("shiftEnter",new z4e(e)),this.listenTo(o,"enter",(a,l)=>{o.isComposing||l.preventDefault(),l.isSoft&&(e.execute("shiftEnter"),r.scrollToTheSelection())},{priority:"low"}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:s("Insert a soft break (a <code>&lt;br&gt;</code> element)"),keystroke:"Shift+Enter"}]})}}class q4e extends Ht{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const n=this.editor.model,i=n.schema,r=n.document.selection,o=Array.from(r.getSelectedBlocks()),s=e.forceValue===void 0?!this.value:e.forceValue;n.change(a=>{if(!s)this._removeQuote(a,o.filter(gy));else{const l=o.filter(u=>gy(u)||rF(i,u));this._applyQuote(a,l)}})}_getValue(){const e=this.editor.model.document.selection,n=Mi(e.getSelectedBlocks());return!!(n&&gy(n))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,n=this.editor.model.schema,i=Mi(e.getSelectedBlocks());return i?rF(n,i):!1}_removeQuote(e,n){iF(e,n).reverse().forEach(i=>{if(i.start.isAtStart&&i.end.isAtEnd){e.unwrap(i.start.parent);return}if(i.start.isAtStart){const o=e.createPositionBefore(i.start.parent);e.move(i,o);return}i.end.isAtEnd||e.split(i.end);const r=e.createPositionAfter(i.end.parent);e.move(i,r)})}_applyQuote(e,n){const i=[];iF(e,n).reverse().forEach(r=>{let o=gy(r.start);o||(o=e.createElement("blockQuote"),e.wrap(r,o)),i.push(o)}),i.reverse().reduce((r,o)=>r.nextSibling==o?(e.merge(e.createPositionAfter(r)),r):o)}}function gy(t){return t.parent.name=="blockQuote"?t.parent:null}function iF(t,e){let n,i=0;const r=[];for(;i<e.length;){const o=e[i],s=e[i+1];n||(n=t.createPositionBefore(o)),(!s||o.nextSibling!=s)&&(r.push(t.createRange(n,t.createPositionAfter(o))),n=null),i++}return r}function rF(t,e){const n=t.checkChild(e.parent,"blockQuote"),i=t.checkChild(["$root","blockQuote"],e);return n&&i}class j4e extends xe{static get pluginName(){return"BlockQuoteEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[kS,yu]}init(){const e=this.editor,n=e.model.schema;e.commands.add("blockQuote",new q4e(e)),n.register("blockQuote",{inheritAllFrom:"$container"}),e.conversion.elementToElement({model:"blockQuote",view:"blockquote"}),e.model.document.registerPostFixer(s=>{const a=e.model.document.differ.getChanges();for(const l of a)if(l.type=="insert"){const u=l.position.nodeAfter;if(!u)continue;if(u.is("element","blockQuote")&&u.isEmpty)return s.remove(u),!0;if(u.is("element","blockQuote")&&!n.checkChild(l.position,u))return s.unwrap(u),!0;if(u.is("element")){const c=s.createRangeIn(u);for(const d of c.getItems())if(d.is("element","blockQuote")&&!n.checkChild(s.createPositionBefore(d),d))return s.unwrap(d),!0}}else if(l.type=="remove"){const u=l.position.parent;if(u.is("element","blockQuote")&&u.isEmpty)return s.remove(u),!0}return!1});const i=this.editor.editing.view.document,r=e.model.document.selection,o=e.commands.get("blockQuote");this.listenTo(i,"enter",(s,a)=>{if(!r.isCollapsed||!o.value)return;r.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),a.preventDefault(),s.stop())},{context:"blockquote"}),this.listenTo(i,"delete",(s,a)=>{if(a.direction!="backward"||!r.isCollapsed||!o.value)return;const l=r.getLastPosition().parent;l.isEmpty&&!l.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),a.preventDefault(),s.stop())},{context:"blockquote"})}}class K4e extends xe{static get pluginName(){return"BlockQuoteUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("blockQuote",()=>{const n=this._createButton(wt);return n.set({tooltip:!0}),n}),e.ui.componentFactory.add("menuBar:blockQuote",()=>{const n=this._createButton(Wi);return n.set({role:"menuitemcheckbox"}),n})}_createButton(e){const n=this.editor,i=n.locale,r=n.commands.get("blockQuote"),o=new e(n.locale),s=i.t;return o.set({label:s("Block quote"),icon:hNe,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value"),this.listenTo(o,"execute",()=>{n.execute("blockQuote"),n.editing.view.focus()}),o}}class G4e extends xe{static get requires(){return[j4e,K4e]}static get pluginName(){return"BlockQuote"}static get isOfficialPlugin(){return!0}}class Y4e extends Fn(){_stack=[];add(e,n){const i=this._stack,r=i[0];this._insertDescriptor(e);const o=i[0];r!==o&&!nE(r,o)&&this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:n})}remove(e,n){const i=this._stack,r=i[0];this._removeDescriptor(e);const o=i[0];r!==o&&!nE(r,o)&&this.fire("change:top",{oldDescriptor:r,newDescriptor:o,writer:n})}_insertDescriptor(e){const n=this._stack,i=n.findIndex(o=>o.id===e.id);if(nE(e,n[i]))return;i>-1&&n.splice(i,1);let r=0;for(;n[r]&&X4e(n[r],e);)r++;n.splice(r,0,e)}_removeDescriptor(e){const n=this._stack,i=n.findIndex(r=>r.id===e);i>-1&&n.splice(i,1)}}function nE(t,e){return t&&e&&t.priority==e.priority&&b1(t.classes)==b1(e.classes)}function X4e(t,e){return t.priority>e.priority?!0:t.priority<e.priority?!1:b1(t.classes)>b1(e.classes)}function b1(t){return Array.isArray(t)?t.sort().join(","):t}const J4e="ck-widget",oF="ck-widget_selected";function ci(t){return t.is("element")?!!t.getCustomProperty("widget"):!1}function vO(t,e,n={}){if(!t.is("containerElement"))throw new oe("widget-to-widget-wrong-element-type",null,{element:t});return e.setAttribute("contenteditable","false",t),e.addClass(J4e,t),e.setCustomProperty("widget",!0,t),t.getFillerOffset=nVe,e.setCustomProperty("widgetLabel",[],t),n.label&&eVe(t,n.label),n.hasSelectionHandle&&iVe(t,e),nX(t,e),t}function Z4e(t,e,n){if(e.classes&&n.addClass(li(e.classes),t),e.attributes)for(const i in e.attributes)n.setAttribute(i,e.attributes[i],t)}function Q4e(t,e,n){if(e.classes&&n.removeClass(li(e.classes),t),e.attributes)for(const i in e.attributes)n.removeAttribute(i,t)}function nX(t,e,n=Z4e,i=Q4e){const r=new Y4e;r.on("change:top",(a,l)=>{l.oldDescriptor&&i(t,l.oldDescriptor,l.writer),l.newDescriptor&&n(t,l.newDescriptor,l.writer)});const o=(a,l,u)=>r.add(l,u),s=(a,l,u)=>r.remove(l,u);e.setCustomProperty("addHighlight",o,t),e.setCustomProperty("removeHighlight",s,t)}function eVe(t,e){t.getCustomProperty("widgetLabel").push(e)}function tVe(t){return t.getCustomProperty("widgetLabel").reduce((n,i)=>typeof i=="function"?n?n+". "+i():i():n?n+". "+i:i,"")}function bO(t,e,n={}){return e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t),n.withAriaRole!==!1&&e.setAttribute("role","textbox",t),t.isReadOnly||e.setAttribute("tabindex","-1",t),n.label&&e.setAttribute("aria-label",n.label,t),e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t),t.on("change:isReadOnly",(i,r,o)=>{e.setAttribute("contenteditable",o?"false":"true",t),o?e.removeAttribute("tabindex",t):e.setAttribute("tabindex","-1",t)}),t.on("change:isFocused",(i,r,o)=>{o?e.addClass("ck-editor__nested-editable_focused",t):e.removeClass("ck-editor__nested-editable_focused",t)}),nX(t,e),t}function iX(t,e){const n=t.getSelectedElement();if(n){const i=zl(t);if(i)return e.createRange(e.createPositionAt(n,i))}return e.schema.findOptimalInsertionRange(t)}function nVe(){return null}function iVe(t,e){const n=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(i){const r=this.toDomElement(i),o=new Sa;return o.set("content",UDe),o.render(),r.appendChild(o.element),r});e.insert(e.createPositionAt(t,0),n),e.addClass(["ck-widget_with-selection-handle"],t)}function yO(t){const e=a=>{const{width:l,paddingLeft:u,paddingRight:c}=a.ownerDocument.defaultView.getComputedStyle(a);return parseFloat(l)-(parseFloat(u)||0)-(parseFloat(c)||0)},n=t.parentElement;if(!n)return 0;let i=e(n);const r=5;let o=0,s=n;for(;isNaN(i);){if(s=s.parentElement,++o>r)return 0;i=e(s)}return i}function rVe(t,e=new Wt(t)){const n=yO(t);return n?e.width/n*100:0}const Fl="widget-type-around";function ud(t,e,n){return!!t&&ci(t)&&!n.isInline(e)}function oVe(t){return t.closest(".ck-widget__type-around__button")}function sVe(t){return t.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function aVe(t,e){const n=t.closest(".ck-widget");return e.mapDomToView(n)}function zl(t){return t.getAttribute(Fl)}const rX=["before","after"],lVe=new DOMParser().parseFromString(mNe,"image/svg+xml").firstChild,sF="ck-widget__type-around_disabled";class uVe extends xe{_currentFakeCaretModelElement=null;static get pluginName(){return"WidgetTypeAround"}static get isOfficialPlugin(){return!0}static get requires(){return[kS,yu]}init(){const e=this.editor,n=e.editing.view;this.on("change:isEnabled",(i,r,o)=>{n.change(s=>{for(const a of n.document.roots)o?s.removeClass(sF,a):s.addClass(sF,a)}),o||e.model.change(s=>{s.removeSelectionAttribute(Fl)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,n){const i=this.editor,r=i.editing.view,o=i.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);i.execute("insertParagraph",{position:i.model.createPositionAt(e,n),attributes:o}),r.focus(),r.scrollToTheSelection()}_listenToIfEnabled(e,n,i,r){this.listenTo(e,n,(...o)=>{this.isEnabled&&i(...o)},r)}_insertParagraphAccordingToFakeCaretPosition(){const i=this.editor.model.document.selection,r=zl(i);if(!r)return!1;const o=i.getSelectedElement();return this._insertParagraph(o,r),!0}_enableTypeAroundUIInjection(){const e=this.editor,n=e.model.schema,i=e.locale.t,r={before:i("Insert paragraph before block"),after:i("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(o,s,a)=>{const l=a.mapper.toViewElement(s.item);l&&ud(l,s.item,n)&&(cVe(a.writer,r,l),l.getCustomProperty("widgetLabel").push(()=>this.isEnabled?i("Press Enter to type after or press Shift + Enter to type before the widget"):""))},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,n=e.model,i=n.document.selection,r=n.schema,o=e.editing.view;this._listenToIfEnabled(o.document,"arrowKey",(a,l)=>{this._handleArrowKeyPress(a,l)},{context:[ci,"$text"],priority:"high"}),this._listenToIfEnabled(i,"change:range",(a,l)=>{l.directChange&&e.model.change(u=>{u.removeSelectionAttribute(Fl)})}),this._listenToIfEnabled(n.document,"change:data",()=>{const a=i.getSelectedElement();if(a){const l=e.editing.mapper.toViewElement(a);if(ud(l,a,r))return}e.model.change(l=>{l.removeSelectionAttribute(Fl)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(a,l,u)=>{const c=u.writer;if(this._currentFakeCaretModelElement){const m=u.mapper.toViewElement(this._currentFakeCaretModelElement);m&&(c.removeClass(rX.map(s),m),this._currentFakeCaretModelElement=null)}const d=l.selection.getSelectedElement();if(!d)return;const f=u.mapper.toViewElement(d);if(!ud(f,d,r))return;const h=zl(l.selection);h&&(c.addClass(s(h),f),this._currentFakeCaretModelElement=d)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(a,l,u)=>{u||e.model.change(c=>{c.removeSelectionAttribute(Fl)})});function s(a){return`ck-widget_type-around_show-fake-caret_${a}`}}_handleArrowKeyPress(e,n){const i=this.editor,r=i.model,o=r.document.selection,s=r.schema,a=i.editing.view;if(n.shiftKey)return;const l=n.keyCode,u=ORe(l,i.locale.contentLanguageDirection),c=a.document.selection.getSelectedElement(),d=i.editing.mapper.toModelElement(c);let f;ud(c,d,s)?f=this._handleArrowKeyPressOnSelectedWidget(u):o.isCollapsed?f=this._handleArrowKeyPressWhenSelectionNextToAWidget(u):n.shiftKey||(f=this._handleArrowKeyPressWhenNonCollapsedSelection(u)),f&&(n.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const i=this.editor.model,r=i.document.selection,o=zl(r);return i.change(s=>{if(o){if(!(o===(e?"after":"before")))return s.removeSelectionAttribute(Fl),!0}else return s.setSelectionAttribute(Fl,e?"after":"before"),!0;return!1})}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const n=this.editor,i=n.model,r=i.schema,o=n.plugins.get("Widget"),s=o._getObjectElementNextToSelection(e),a=n.editing.mapper.toViewElement(s);return ud(a,s,r)?(i.change(l=>{o._setSelectionOverElement(s),l.setSelectionAttribute(Fl,e?"before":"after")}),!0):!1}_handleArrowKeyPressWhenNonCollapsedSelection(e){const n=this.editor,i=n.model,r=i.schema,o=n.editing.mapper,s=i.document.selection,a=e?s.getLastPosition().nodeBefore:s.getFirstPosition().nodeAfter,l=o.toViewElement(a);return ud(l,a,r)?(i.change(u=>{u.setSelection(a,"on"),u.setSelectionAttribute(Fl,e?"after":"before")}),!0):!1}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,n=e.editing.view;this._listenToIfEnabled(n.document,"mousedown",(i,r)=>{const o=oVe(r.domTarget);if(!o)return;const s=sVe(o),a=aVe(o,n.domConverter),l=e.editing.mapper.toModelElement(a);this._insertParagraph(l,s),r.preventDefault(),i.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,n=e.model.document.selection,i=e.editing.view;this._listenToIfEnabled(i.document,"enter",(r,o)=>{if(r.eventPhase!="atTarget")return;const s=n.getSelectedElement(),a=e.editing.mapper.toViewElement(s),l=e.model.schema;let u;this._insertParagraphAccordingToFakeCaretPosition()?u=!0:ud(a,s,l)&&(this._insertParagraph(s,o.isSoft?"before":"after"),u=!0),u&&(o.preventDefault(),r.stop())},{context:ci})}_enableInsertingParagraphsOnTypingKeystroke(){const n=this.editor.editing.view.document;this._listenToIfEnabled(n,"insertText",(i,r)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(r.selection=n.selection)},{priority:"high"}),vt.isAndroid?this._listenToIfEnabled(n,"keydown",(i,r)=>{r.keyCode==229&&this._insertParagraphAccordingToFakeCaretPosition()}):this._listenToIfEnabled(n,"compositionstart",()=>{this._insertParagraphAccordingToFakeCaretPosition()},{priority:"highest"})}_enableDeleteIntegration(){const e=this.editor,n=e.editing.view,i=e.model,r=i.schema;this._listenToIfEnabled(n.document,"delete",(o,s)=>{if(o.eventPhase!="atTarget")return;const a=zl(i.document.selection);if(!a)return;const l=s.direction,u=i.document.selection.getSelectedElement(),c=a==="before",d=l=="forward";if(c===d)e.execute("delete",{selection:i.createSelection(u,"on")});else{const h=r.getNearestSelectionRange(i.createPositionAt(u,a),l);if(h)if(!h.isCollapsed)i.change(m=>{m.setSelection(h),e.execute(d?"deleteForward":"delete")});else{const m=i.createSelection(h.start);if(i.modifySelection(m,{direction:l}),!m.focus.isEqual(h.start))i.change(g=>{g.setSelection(h),e.execute(d?"deleteForward":"delete")});else{const g=hVe(r,h.start.parent);i.deleteContent(i.createSelection(g,"on"),{doNotAutoparagraph:!0})}}}s.preventDefault(),o.stop()},{context:ci})}_enableInsertContentIntegration(){const e=this.editor,n=this.editor.model,i=n.document.selection;this._listenToIfEnabled(e.model,"insertContent",(r,[o,s])=>{if(s&&!s.is("documentSelection"))return;const a=zl(i);if(a)return r.stop(),n.change(l=>{const u=i.getSelectedElement(),c=n.createPositionAt(u,a),d=l.createSelection(c),f=n.insertContent(o,d);return l.setSelection(d),f})},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(r,o)=>{const[,s,a={}]=o;if(s&&!s.is("documentSelection"))return;const l=zl(i);l&&(a.findOptimalPosition=l,o[3]=a)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,i=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(r,[o])=>{if(o&&!o.is("documentSelection"))return;zl(i)&&r.stop()},{priority:"high"})}}function cVe(t,e,n){const i=t.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(r){const o=this.toDomElement(r);return dVe(o,e),fVe(o),o});t.insert(t.createPositionAt(n,"end"),i)}function dVe(t,e){for(const n of rX){const i=new Io({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:e[n],"aria-hidden":"true"},children:[t.ownerDocument.importNode(lVe,!0)]});t.appendChild(i.render())}}function fVe(t){const e=new Io({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});t.appendChild(e.render())}function hVe(t,e){let n=e;for(const i of e.getAncestors({parentFirst:!0})){if(i.childCount>1||t.isLimit(i))break;n=i}return n}function mVe(t){const e=t.model;return(n,i)=>{const r=i.keyCode==Yt.arrowup,o=i.keyCode==Yt.arrowdown,s=i.shiftKey,a=e.document.selection;if(!r&&!o)return;const l=o,u=gVe(t,a,l);if(u){if(u.isCollapsed){if(a.isCollapsed)return;if(s)return}(u.isCollapsed||pVe(t,u,l))&&(e.change(c=>{const d=l?u.end:u.start;if(s){const f=e.createSelection(a.anchor);f.setFocus(d),c.setSelection(f)}else c.setSelection(d)}),n.stop(),i.preventDefault(),i.stopPropagation())}}}function gVe(t,e,n){const i=t.model;if(n){const r=e.focus,o=aF(i,r,"forward");if(!o)return;const s=i.createRange(r,o),a=lF(i.schema,s,"backward");if(a)return i.createRange(r,a)}else{const r=e.focus,o=aF(i,r,"backward");if(!o)return;const s=i.createRange(o,r),a=lF(i.schema,s,"forward");if(a)return i.createRange(a,r)}}function aF(t,e,n){const i=t.schema,r=t.createRangeIn(e.root),o=n=="forward"?"elementStart":"elementEnd";for(const{previousPosition:s,item:a,type:l}of r.getWalker({startPosition:e,direction:n})){if(i.isLimit(a)&&!i.isInline(a))return s;if(l==o&&i.isBlock(a))return null}return null}function lF(t,e,n){const i=n=="backward"?e.end:e.start;if(t.checkChild(i,"$text"))return i;for(const{nextPosition:r}of e.getWalker({direction:n}))if(t.checkChild(r,"$text"))return r}function pVe(t,e,n){const i=t.model,r=t.view.domConverter;if(n){const u=i.createSelection(e.start);i.modifySelection(u),!u.focus.isAtEnd&&!e.start.isEqual(u.focus)&&(e=i.createRange(u.focus,e.end))}const o=t.mapper.toViewRange(e),s=r.viewRangeToDom(o),a=Wt.getDomRangeRects(s);let l;for(const u of a){if(l===void 0){l=Math.round(u.bottom);continue}if(Math.round(u.top)>=l)return!1;l=Math.max(l,Math.round(u.bottom))}return!0}class h0 extends xe{_previouslySelected=new Set;static get pluginName(){return"Widget"}static get isOfficialPlugin(){return!0}static get requires(){return[uVe,yu]}init(){const e=this.editor,n=e.editing.view,i=n.document,r=e.t;this.editor.editing.downcastDispatcher.on("selection",(o,s,a)=>{const l=a.writer,u=s.selection;if(u.isCollapsed)return;const c=u.getSelectedElement();if(!c)return;const d=e.editing.mapper.toViewElement(c);ci(d)&&a.consumable.consume(u,"selection")&&l.setSelection(l.createRangeOn(d),{fake:!0,label:tVe(d)})}),this.editor.editing.downcastDispatcher.on("selection",(o,s,a)=>{this._clearPreviouslySelectedWidgets(a.writer);const l=a.writer,u=l.document.selection;let c=null;for(const d of u.getRanges())for(const f of d){const h=f.item;ci(h)&&!_Ve(h,c)&&(l.addClass(oF,h),this._previouslySelected.add(h),c=h)}},{priority:"low"}),n.addObserver(nO),n.addObserver(YG),this.listenTo(i,"mousedown",(...o)=>this._onMousedown(...o)),this.listenTo(i,"pointerdown",(...o)=>this._onPointerdown(...o)),this.listenTo(i,"arrowKey",(...o)=>{this._handleSelectionChangeOnArrowKeyPress(...o)},{context:[ci,"$text"]}),this.listenTo(i,"arrowKey",(...o)=>{this._preventDefaultOnArrowKeyPress(...o)},{context:"$root"}),this.listenTo(i,"arrowKey",mVe(this.editor.editing),{context:"$text"}),this.listenTo(i,"delete",(o,s)=>{this._handleDelete(s.direction=="forward")&&(s.preventDefault(),o.stop())},{context:"$root"}),this.listenTo(i,"tab",(o,s)=>{this._selectNextEditable(s.shiftKey?"backward":"forward")&&(n.scrollToTheSelection(),s.preventDefault(),o.stop())},{context:o=>ci(o)||o.is("editableElement"),priority:"low"}),this.listenTo(i,"keydown",(o,s)=>{s.keystroke==Yt.esc&&this._selectAncestorWidget()&&(s.preventDefault(),o.stop())},{context:o=>o.is("editableElement"),priority:"low"}),e.accessibility.addKeystrokeInfoGroup({id:"widget",label:r("Keystrokes that can be used when a widget is selected (for example: image, table, etc.)"),keystrokes:[{label:r("Move focus from an editable area back to the parent widget"),keystroke:"Esc"},{label:r("Insert a new paragraph directly after a widget"),keystroke:"Enter"},{label:r("Insert a new paragraph directly before a widget"),keystroke:"Shift+Enter"},{label:r("Move the caret to allow typing directly before a widget"),keystroke:[["arrowup"],["arrowleft"]]},{label:r("Move the caret to allow typing directly after a widget"),keystroke:[["arrowdown"],["arrowright"]]}]})}_onMousedown(e,n){const i=n.target;i&&n.domEvent.detail>=3&&this._selectBlockContent(i)&&n.preventDefault()}_onPointerdown(e,n){if(!n.domEvent.isPrimary)return;const i=this.editor,r=i.editing.view,o=r.document;let s=n.target;if(!s)return;if(!ci(s)){const l=yVe(s);if(!l)return;if(ci(l))s=l;else{const u=wVe(r,n);if(u&&ci(u))s=u;else return}}(vt.isAndroid||vt.isiOS)&&n.preventDefault(),o.isFocused||r.focus();const a=i.editing.mapper.toModelElement(s);this._setSelectionOverElement(a)}_selectBlockContent(e){const n=this.editor,i=n.model,r=n.editing.mapper,o=i.schema,s=r.findMappedViewAncestor(this.editor.editing.view.createPositionAt(e,0)),a=CVe(r.toModelElement(s),i.schema);return a?(i.change(l=>{const u=o.isLimit(a)?null:SVe(l.createPositionAfter(a),o),c=l.createPositionAt(a,0),d=u?l.createPositionAt(u,0):l.createPositionAt(a,"end");l.setSelection(l.createRange(c,d))}),!0):!1}_handleSelectionChangeOnArrowKeyPress(e,n){const i=n.keyCode,r=this.editor.model,o=r.schema,s=r.document.selection,a=s.getSelectedElement(),l=$M(i,this.editor.locale.contentLanguageDirection),u=l=="down"||l=="right",c=l=="up"||l=="down";if(!n.shiftKey&&!s.isCollapsed){if(vVe(s,o)){const p=u?s.getLastPosition():s.getFirstPosition(),b=o.getNearestSelectionRange(p,u?"forward":"backward");b&&(r.change(y=>{y.setSelection(b)}),n.preventDefault(),e.stop())}return}const d=bVe(r,u),f=r.createSelection(d);if(r.modifySelection(f,{direction:u?"forward":"backward"}),f.isEqual(d))return;f.focus.isTouching(d.focus)&&r.modifySelection(f,{direction:u?"forward":"backward"});const h=u?d.focus.nodeBefore:d.focus.nodeAfter,m=f.focus.nodeBefore,g=f.focus.nodeAfter,v=u?m:g;if(n.shiftKey)(a&&o.isObject(a)||v&&o.isObject(v)||h&&o.isObject(h))&&(r.change(p=>{p.setSelection(f)}),n.preventDefault(),e.stop());else if(v&&o.isObject(v)){if(o.isInline(v)&&c)return;r.change(p=>{p.setSelection(v,"on")}),n.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,n){const i=this.editor.model,r=i.schema,o=i.document.selection.getSelectedElement();o&&r.isObject(o)&&(n.preventDefault(),e.stop())}_handleDelete(e){const i=this.editor.model.document.selection;if(!this.editor.model.canEditAt(i)||!i.isCollapsed)return;const r=this._getObjectElementNextToSelection(e);if(r)return this.editor.model.change(o=>{let s=i.anchor.parent;for(;s.isEmpty;){const a=s;s=a.parent,o.remove(a)}this._setSelectionOverElement(r)}),!0}_setSelectionOverElement(e){this.editor.model.change(n=>{n.setSelection(n.createRangeOn(e))})}_getObjectElementNextToSelection(e){const n=this.editor.model,i=n.schema,r=n.document.selection,o=n.createSelection(r);if(n.modifySelection(o,{direction:e?"forward":"backward"}),o.isEqual(r))return null;const s=e?o.focus.nodeBefore:o.focus.nodeAfter;return s&&i.isObject(s)?s:null}_clearPreviouslySelectedWidgets(e){for(const n of this._previouslySelected)e.removeClass(oF,n);this._previouslySelected.clear()}_selectNextEditable(e){const n=this.editor.editing,i=n.view,r=this.editor.model,o=i.document.selection,s=r.document.selection;let a;if(s.rangeCount>1){const u=s.isBackward?s.getFirstRange():s.getLastRange();a=n.mapper.toViewPosition(e=="forward"?u.end:u.start)}else a=e=="forward"?o.getFirstPosition():o.getLastPosition();const l=this._findNextFocusRange(a,e);return l?(r.change(u=>{u.setSelection(l)}),!0):!1}_findNextFocusRange(e,n){const i=this.editor.editing,r=i.view,o=this.editor.model,s=r.document.selection,a=s.editableElement,l=a.getPath();let u=s.getSelectedElement();u&&!ci(u)&&(u=null);const c=n=="forward"?r.createRange(e,r.createPositionAt(e.root,"end")):r.createRange(r.createPositionAt(e.root,0),e);for(const{nextPosition:d}of c.getWalker({direction:n})){const f=d.parent;if(ci(f)&&f!=u){const h=i.mapper.toModelElement(f);if(!o.schema.isBlock(h))continue;if(ur(l,f.getPath())!="extension")return o.createRangeOn(h)}else if(f.is("editableElement")){if(f==a&&!u)continue;const h=i.mapper.toModelPosition(d),m=o.schema.getNearestSelectionRange(h,n);if(!m)continue;return f==a&&u?m:ur(l,f.getPath())!="extension"?o.createRangeIn(o.schema.getLimitElement(m)):m}}return null}_selectAncestorWidget(){const e=this.editor,n=e.editing.mapper,r=e.editing.view.document.selection.getFirstPosition().parent,s=(r.is("$text")?r.parent:r).findAncestor(ci);if(!s)return!1;const a=n.toModelElement(s);return a?(e.model.change(l=>{l.setSelection(a,"on")}),!0):!1}}function vVe(t,e){const n=t.getFirstPosition(),i=t.getLastPosition(),r=n.nodeAfter,o=i.nodeBefore;return!!r&&e.isObject(r)||!!o&&e.isObject(o)}function bVe(t,e){const n=t.document.selection,i=n.getSelectedElement(),r=zl(n);return i&&r=="before"?t.createSelection(i,"before"):i&&r=="after"?t.createSelection(i,"after"):t.createSelection(n.getRanges(),{backward:i&&t.schema.isObject(i)?!e:n.isBackward})}function yVe(t){let e=t;for(;e;){if(e.is("editableElement")||ci(e))return e;e=e.parent}return null}function wVe(t,e){const n=XK(e.domEvent);let i=null;if(n?i=t.domConverter.domRangeToView(n):i=t.createRange(t.createPositionAt(e.target,0)),!i)return null;const r=i.start;if(!r.parent)return null;let o=r.parent;return r.parent.is("editableElement")&&(r.isAtEnd&&r.nodeBefore?o=r.nodeBefore:r.isAtStart&&r.nodeAfter&&(o=r.nodeAfter)),o.is("$text")?o.parent:o}function _Ve(t,e){return e?Array.from(t.getAncestors()).includes(e):!1}function CVe(t,e){for(const n of t.getAncestors({includeSelf:!0,parentFirst:!0})){if(e.checkChild(n,"$text"))return n;if(e.isLimit(n)&&!e.isObject(n))break}return null}function SVe(t,e){const n=new Ql({startPosition:t});for(const{item:i}of n){if(e.isLimit(i)||!i.is("element"))return null;if(e.checkChild(i,"$text"))return i}return null}class y1 extends xe{_toolbarDefinitions=new Map;_balloon;static get requires(){return[bu]}static get pluginName(){return"WidgetToolbarRepository"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const n=e.plugins.get("BalloonToolbar");this.listenTo(n,"show",i=>{kVe(e.editing.view.document.selection)&&i.stop()},{priority:"high"})}this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui,"update",()=>{this._updateToolbarsVisibility()}),this.listenTo(e.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:n,items:i,getRelatedElement:r,balloonClassName:o="ck-toolbar-container",positions:s}){if(!i.length){hn("widget-toolbar-no-items",{toolbarId:e});return}const a=this.editor,l=a.t,u=new Xm(a.locale);if(u.ariaLabel=n||l("Widget toolbar"),this._toolbarDefinitions.has(e))throw new oe("widget-toolbar-duplicated",this,{toolbarId:e});const c={view:u,getRelatedElement:r,balloonClassName:o,itemsConfig:i,positions:s,initialized:!1};a.ui.addToolbar(u,{isContextual:!0,beforeFocus:()=>{const d=r(a.editing.view.document.selection);d&&this._showToolbar(c,d)},afterBlur:()=>{this._hideToolbar(c)}}),this._toolbarDefinitions.set(e,c)}_updateToolbarsVisibility(){let e=0,n=null,i=null;for(const r of this._toolbarDefinitions.values()){const o=r.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!o)this._isToolbarInBalloon(r)&&this._hideToolbar(r);else if(!this.editor.ui.focusTracker.isFocused)this._isToolbarVisible(r)&&this._hideToolbar(r);else{const s=o.getAncestors().length;s>e&&(e=s,n=o,i=r)}}i&&this._showToolbar(i,n)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,n){this._isToolbarVisible(e)?uF(this.editor,n,e.positions):this._isToolbarInBalloon(e)||(e.initialized||(e.initialized=!0,e.view.fillFromConfig(e.itemsConfig,this.editor.ui.componentFactory)),this._balloon.add({view:e.view,position:oX(this.editor,n,e.positions),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",()=>{for(const i of this._toolbarDefinitions.values())if(this._isToolbarVisible(i)){const r=i.getRelatedElement(this.editor.editing.view.document.selection);uF(this.editor,r,e.positions)}}))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function uF(t,e,n){const i=t.plugins.get("ContextualBalloon"),r=oX(t,e,n);i.updatePosition(r)}function oX(t,e,n){const i=t.editing.view,r=Ki.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:n||[r.northArrowSouth,r.northArrowSouthWest,r.northArrowSouthEast,r.southArrowNorth,r.southArrowNorthWest,r.southArrowNorthEast,r.viewportStickyNorth]}}function kVe(t){const e=t.getSelectedElement();return!!(e&&ci(e))}class TVe extends Ln(){_referenceCoordinates;_options;_originalWidth;_originalHeight;_originalWidthPercents;_aspectRatio;constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,n,i){const r=new Wt(n);this.activeHandlePosition=AVe(e),this._referenceCoordinates=EVe(n,PVe(this.activeHandlePosition)),this._originalWidth=r.width,this._originalHeight=r.height,this._aspectRatio=r.width/r.height;const o=i.style.width;o&&o.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(o):this._originalWidthPercents=rVe(i,r)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function EVe(t,e){const n=new Wt(t),i=e.split("-"),r={x:i[1]=="right"?n.right:n.left,y:i[0]=="bottom"?n.bottom:n.top};return r.x+=t.ownerDocument.defaultView.scrollX,r.y+=t.ownerDocument.defaultView.scrollY,r}function xVe(t){return`ck-widget__resizer__handle-${t}`}function AVe(t){const e=["top-left","top-right","bottom-right","bottom-left"];for(const n of e)if(t.classList.contains(xVe(n)))return n}function PVe(t){const e=t.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[e[0]]}-${n[e[1]]}`}class IVe extends ut{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",n=>n?`ck-orientation-${n}`:"")],style:{display:e.if("_isVisible","none",n=>!n)}},children:[{text:e.to("_label")}]})}_bindToState(e,n){this.bind("_isVisible").to(n,"proposedWidth",n,"proposedHeight",(i,r)=>i!==null&&r!==null),this.bind("_label").to(n,"proposedHandleHostWidth",n,"proposedHandleHostHeight",n,"proposedWidthPercents",(i,r,o)=>e.unit==="px"?`${i}×${r}`:`${o}%`),this.bind("_viewPosition").to(n,"activeHandlePosition",n,"proposedHandleHostWidth",n,"proposedHandleHostHeight",(i,r,o)=>r<50||o<50?"above-center":i)}_dismiss(){this.unbind(),this._isVisible=!1}}class cF extends Ln(){_state;_sizeView;_options;_viewResizerWrapper=null;_initialViewWidth;constructor(e){super(),this._options=e,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",(n,i)=>n&&i),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",n=>{!this.state.proposedWidth&&!this.state.proposedWidthPercents&&(this._cleanup(),n.stop())},{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change(n=>{n.removeClass("ck-hidden",this._viewResizerWrapper)})}hide(){this._options.editor.editing.view.change(n=>{n.addClass("ck-hidden",this._viewResizerWrapper)})}attach(){const e=this,n=this._options.viewElement;this._options.editor.editing.view.change(r=>{const o=r.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(s){const a=this.toDomElement(s);return e._appendHandles(a),e._appendSizeUI(a),a});r.insert(r.createPositionAt(n,"end"),o),r.addClass("ck-widget_with-resizer",n),this._viewResizerWrapper=o,this.isVisible||this.hide()}),this.on("change:isVisible",()=>{this.isVisible?(this.show(),this.redraw()):this.hide()})}begin(e){this._state=new TVe(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const n=this._proposeNewSize(e);this._options.editor.editing.view.change(u=>{const c=this._options.unit||"%",d=(c==="%"?n.widthPercents:n.width)+c;u.setStyle("width",d,this._options.viewElement)});const r=this._getHandleHost(),o=new Wt(r),s=Math.round(o.width),a=Math.round(o.height),l=new Wt(r);n.width=Math.round(l.width),n.height=Math.round(l.height),this.redraw(o),this.state.update({...n,handleHostWidth:s,handleHostHeight:a})}commit(){const e=this._options.unit||"%",n=(e==="%"?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(n)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const n=this._domResizerWrapper;if(!OVe(n))return;const i=n.parentElement,r=this._getHandleHost(),o=this._viewResizerWrapper,s=[o.getStyle("width"),o.getStyle("height"),o.getStyle("left"),o.getStyle("top")];let a;if(i.isSameNode(r)){const l=e||new Wt(r);a=[l.width+"px",l.height+"px",void 0,void 0]}else a=[r.offsetWidth+"px",r.offsetHeight+"px",r.offsetLeft+"px",r.offsetTop+"px"];ur(s,a)!=="same"&&this._options.editor.editing.view.change(l=>{l.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},o)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(n=>{n.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const n=this.state,i=MVe(e),r=this._options.isCentered?this._options.isCentered(this):!0,o={x:n._referenceCoordinates.x-(i.x+n.originalWidth),y:i.y-n.originalHeight-n._referenceCoordinates.y};r&&n.activeHandlePosition.endsWith("-right")&&(o.x=i.x-(n._referenceCoordinates.x+n.originalWidth)),r&&(o.x*=2);let s=Math.abs(n.originalWidth+o.x),a=Math.abs(n.originalHeight+o.y);return(s/n.aspectRatio>a?"width":"height")=="width"?a=s/n.aspectRatio:s=a*n.aspectRatio,{width:Math.round(s),height:Math.round(a),widthPercents:Math.min(Math.round(n.originalWidthPercents/n.originalWidth*s*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const n=["top-left","top-right","bottom-right","bottom-left"];for(const i of n)e.appendChild(new Io({tag:"div",attributes:{class:`ck-widget__resizer__handle ${RVe(i)}`}}).render())}_appendSizeUI(e){this._sizeView=new IVe,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function RVe(t){return`ck-widget__resizer__handle-${t}`}function MVe(t){return{x:t.pageX,y:t.pageY}}function OVe(t){return t&&t.ownerDocument&&t.ownerDocument.contains(t)}class iE extends xe{_resizers=new Map;_observer;_redrawSelectedResizerThrottled;static get pluginName(){return"WidgetResize"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.editing,n=Qe.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),e.view.addObserver(nO),this._observer=new(zo()),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(n,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(n,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=Km(()=>this.redrawSelectedResizer(),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[r,o]of this._resizers)r.isAttached()||(this._resizers.delete(r),o.destroy())},{priority:"lowest"}),this._observer.listenTo(Qe.window,"resize",this._redrawSelectedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const r=i.getSelectedElement(),o=this.getResizerByViewElement(r)||null;o?this.select(o):this.deselect()})}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const n=new cF(e),i=this.editor.plugins;if(n.attach(),i.has("WidgetToolbarRepository")){const s=i.get("WidgetToolbarRepository");n.on("begin",()=>{s.forceDisabled("resize")},{priority:"lowest"}),n.on("cancel",()=>{s.clearForceDisabled("resize")},{priority:"highest"}),n.on("commit",()=>{s.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,n);const o=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(o)==n&&this.select(n),n}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const n of this._resizers.values())if(n.containsHandle(e))return n}_mouseDownListener(e,n){const i=n.domTarget;cF.isResizeHandle(i)&&(this._activeResizer=this._getResizerByHandle(i)||null,this._activeResizer&&(this._activeResizer.begin(i),e.stop(),n.preventDefault()))}_mouseMoveListener(e,n){this._activeResizer&&this._activeResizer.updateSize(n)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}class fb extends Cl{domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"];constructor(e){super(e);const n=this.document;this.listenTo(n,"paste",i("clipboardInput"),{priority:"low"}),this.listenTo(n,"drop",i("clipboardInput"),{priority:"low"}),this.listenTo(n,"dragover",i("dragging"),{priority:"low"});function i(r){return(o,s)=>{s.preventDefault();const a=s.dropRange?[s.dropRange]:null,l=new pu(n,r);n.fire(l,{dataTransfer:s.dataTransfer,method:o.name,targetRanges:a,target:s.target,domEvent:s.domEvent}),l.stop.called&&s.stopPropagation()}}}onDomEvent(e){const n="clipboardData"in e?e.clipboardData:e.dataTransfer,i=e.type=="drop"||e.type=="paste",r={dataTransfer:new bG(n,{cacheFiles:i})};if(e.type=="drop"||e.type=="dragover"){const o=XK(e);r.dropRange=o&&this.view.domConverter.domRangeToView(o)}this.fire(e.type,e,r)}}function LVe(t){return t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br>").replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/^\s/,"&nbsp;").replace(/\s$/,"&nbsp;").replace(/\s\s/g," &nbsp;"),(t.includes("</p><p>")||t.includes("<br>"))&&(t=`<p>${t}</p>`),t}function DVe(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,n)=>n.length==1?" ":n).replace(/<!--[\s\S]*?-->/g,"")}const dF=["figcaption","li"],fF=["ol","ul"];function sX(t,e){if(e.is("$text")||e.is("$textProxy"))return e.data;if(e.is("element","img")&&e.hasAttribute("alt"))return e.getAttribute("alt");if(e.is("element","br"))return`
`;let n="",i=null;for(const r of e.getChildren())n+=NVe(r,i)+sX(t,r),i=r;if(e.is("rawElement")){const o=document.implementation.createHTMLDocument("").createElement("div");e.render(o,t),n+=aX(o)}return n}function aX(t){let e="";if(t.nodeType===Node.TEXT_NODE)return t.textContent;if(t.tagName==="BR")return`
`;for(const n of t.childNodes)e+=aX(n);return e}function NVe(t,e){return e?t.is("element","li")&&!t.isEmpty&&t.getChild(0).is("containerElement")||fF.includes(t.name)&&fF.includes(e.name)?`
`:!t.is("containerElement")&&!e.is("containerElement")?"":dF.includes(t.name)||dF.includes(e.name)?`
`:t.is("element")&&t.getCustomProperty("dataPipeline:transparentRendering")||e.is("element")&&e.getCustomProperty("dataPipeline:transparentRendering")?"":`
`:""}class av extends xe{_markersToCopy=new Map;static get pluginName(){return"ClipboardMarkersUtils"}static get isOfficialPlugin(){return!0}_registerMarkerToCopy(e,n){this._markersToCopy.set(e,n)}_copySelectedFragmentWithMarkers(e,n,i=r=>r.model.getSelectedContent(r.model.document.selection)){return this.editor.model.change(r=>{const o=r.model.document.selection;r.setSelection(n);const s=this._insertFakeMarkersIntoSelection(r,r.model.document.selection,e),a=i(r),l=this._removeFakeMarkersInsideElement(r,a);for(const[u,c]of Object.entries(s)){l[u]||=r.createRangeIn(a);for(const d of c)r.remove(d)}a.markers.clear();for(const[u,c]of Object.entries(l))a.markers.set(u,c);return r.setSelection(o),a})}_pasteMarkersIntoTransformedElement(e,n){const i=this._getPasteMarkersFromRangeMap(e);return this.editor.model.change(r=>{const o=this._insertFakeMarkersElements(r,i),s=n(r),a=this._removeFakeMarkersInsideElement(r,s);for(const l of Object.values(o).flat())r.remove(l);for(const[l,u]of Object.entries(a))r.model.markers.has(l)||r.addMarker(l,{usingOperation:!0,affectsData:!0,range:u});return s})}_pasteFragmentWithMarkers(e){const n=this._getPasteMarkersFromRangeMap(e.markers);e.markers.clear();for(const i of n)e.markers.set(i.name,i.range);return this.editor.model.insertContent(e)}_forceMarkersCopy(e,n,i={allowedActions:"all",copyPartiallySelected:!0,duplicateOnPaste:!0}){const r=this._markersToCopy.get(e);this._markersToCopy.set(e,i),n(),r?this._markersToCopy.set(e,r):this._markersToCopy.delete(e)}_isMarkerCopyable(e,n){const i=this._getMarkerClipboardConfig(e);if(!i)return!1;if(!n)return!0;const{allowedActions:r}=i;return r==="all"||r.includes(n)}_hasMarkerConfiguration(e){return!!this._getMarkerClipboardConfig(e)}_getMarkerClipboardConfig(e){const[n]=e.split(":");return this._markersToCopy.get(n)||null}_insertFakeMarkersIntoSelection(e,n,i){const r=this._getCopyableMarkersFromSelection(e,n,i);return this._insertFakeMarkersElements(e,r)}_getCopyableMarkersFromSelection(e,n,i){const r=Array.from(n.getRanges()),o=new Set(r.flatMap(a=>Array.from(e.model.markers.getMarkersIntersectingRange(a)))),s=a=>{if(!this._isMarkerCopyable(a.name,i))return!1;const{copyPartiallySelected:u}=this._getMarkerClipboardConfig(a.name);if(!u){const c=a.getRange();return r.some(d=>d.containsRange(c,!0))}return!0};return Array.from(o).filter(s).map(a=>({name:i==="dragstart"?this._getUniqueMarkerName(a.name):a.name,range:a.getRange()}))}_getPasteMarkersFromRangeMap(e,n=null){const{model:i}=this.editor;return(e instanceof Map?Array.from(e.entries()):Object.entries(e)).flatMap(([o,s])=>{if(!this._hasMarkerConfiguration(o))return[{name:o,range:s}];if(this._isMarkerCopyable(o,n)){const a=this._getMarkerClipboardConfig(o),l=i.markers.has(o)&&i.markers.get(o).getRange().root.rootName==="$graveyard";return(a.duplicateOnPaste||l)&&(o=this._getUniqueMarkerName(o)),[{name:o,range:s}]}return[]})}_insertFakeMarkersElements(e,n){const i={},r=n.flatMap(o=>{const{start:s,end:a}=o.range;return[{position:s,marker:o,type:"start"},{position:a,marker:o,type:"end"}]}).sort(({position:o},{position:s})=>o.isBefore(s)?1:-1);for(const{position:o,marker:s,type:a}of r){const l=e.createElement("$marker",{"data-name":s.name,"data-type":a});i[s.name]||(i[s.name]=[]),i[s.name].push(l),e.insert(l,o)}return i}_removeFakeMarkersInsideElement(e,n){const r=this._getAllFakeMarkersFromElement(e,n).reduce((o,s)=>{const a=s.markerElement&&e.createPositionBefore(s.markerElement);let l=o[s.name],u=!1;return l?.start&&l?.end&&(this._getMarkerClipboardConfig(s.name).duplicateOnPaste?o[this._getUniqueMarkerName(s.name)]=o[s.name]:u=!0,l=null),u||(o[s.name]={...l,[s.type]:a}),s.markerElement&&e.remove(s.markerElement),o},{});return PIe(r,o=>new Ee(o.start||e.createPositionFromPath(n,[0]),o.end||e.createPositionAt(n,"end")))}_getAllFakeMarkersFromElement(e,n){const i=Array.from(e.createRangeIn(n)).flatMap(({item:s})=>{if(!s.is("element","$marker"))return[];const a=s.getAttribute("data-name"),l=s.getAttribute("data-type");return[{markerElement:s,name:a,type:l}]}),r=[],o=[];for(const s of i)s.type==="end"&&(i.some(l=>l.name===s.name&&l.type==="start")||r.push({markerElement:null,name:s.name,type:"start"})),s.type==="start"&&(i.some(l=>l.name===s.name&&l.type==="end")||o.unshift({markerElement:null,name:s.name,type:"end"}));return[...r,...i,...o]}_getUniqueMarkerName(e){const n=e.split(":"),i=Ur().substring(1,6);return n.length===3?`${n.slice(0,2).join(":")}:${i}`:`${n.join(":")}:${i}`}}class fs extends xe{static get pluginName(){return"ClipboardPipeline"}static get isOfficialPlugin(){return!0}static get requires(){return[av]}init(){this.editor.editing.view.addObserver(fb),this._setupPasteDrop(),this._setupCopyCut()}_fireOutputTransformationEvent(e,n,i){const r=this.editor.plugins.get("ClipboardMarkersUtils");this.editor.model.enqueueChange({isUndoable:i==="cut"},()=>{const o=r._copySelectedFragmentWithMarkers(i,n);this.fire("outputTransformation",{dataTransfer:e,content:o,method:i})})}_setupPasteDrop(){const e=this.editor,n=e.model,i=e.editing.view,r=i.document,o=this.editor.plugins.get("ClipboardMarkersUtils");this.listenTo(r,"clipboardInput",(s,a)=>{a.method=="paste"&&!e.model.canEditAt(e.model.document.selection)&&s.stop()},{priority:"highest"}),this.listenTo(r,"clipboardInput",(s,a)=>{const l=a.dataTransfer;let u;if(a.content)u=a.content;else{let f="";l.getData("text/html")?f=DVe(l.getData("text/html")):l.getData("text/plain")&&(f=LVe(l.getData("text/plain"))),u=this.editor.data.htmlProcessor.toView(f)}const c=new pu(this,"inputTransformation"),d=l.getData("application/ckeditor5-editor-id")||null;this.fire(c,{content:u,dataTransfer:l,sourceEditorId:d,targetRanges:a.targetRanges,method:a.method}),c.stop.called&&s.stop(),i.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(s,a)=>{if(a.content.isEmpty)return;const u=this.editor.data.toModel(a.content,"$clipboardHolder");u.childCount!=0&&(s.stop(),n.change(()=>{this.fire("contentInsertion",{content:u,method:a.method,sourceEditorId:a.sourceEditorId,dataTransfer:a.dataTransfer,targetRanges:a.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(s,a)=>{a.resultRange=o._pasteFragmentWithMarkers(a.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,n=e.model.document,r=e.editing.view.document,o=(s,a)=>{const l=a.dataTransfer;a.preventDefault(),this._fireOutputTransformationEvent(l,n.selection,s.name)};this.listenTo(r,"copy",o,{priority:"low"}),this.listenTo(r,"cut",(s,a)=>{e.model.canEditAt(e.model.document.selection)?o(s,a):a.preventDefault()},{priority:"low"}),this.listenTo(this,"outputTransformation",(s,a)=>{const l=e.data.toView(a.content,{isClipboardPipeline:!0});r.fire("clipboardOutput",{dataTransfer:a.dataTransfer,content:l,method:a.method})},{priority:"low"}),this.listenTo(r,"clipboardOutput",(s,a)=>{a.content.isEmpty||(a.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(a.content)),a.dataTransfer.setData("text/plain",sX(e.data.htmlProcessor.domConverter,a.content)),a.dataTransfer.setData("application/ckeditor5-editor-id",this.editor.id)),a.method=="cut"&&e.model.deleteContent(n.selection)},{priority:"low"})}}const rE=gg("px");let BVe=class extends ut{constructor(){super();const e=this.bindTemplate;this.set({isVisible:!1,left:null,top:null,width:null}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-clipboard-drop-target-line",e.if("isVisible","ck-hidden",n=>!n)],style:{left:e.to("left",n=>rE(n)),top:e.to("top",n=>rE(n)),width:e.to("width",n=>rE(n))}}})}};class py extends xe{removeDropMarkerDelayed=zM(()=>this.removeDropMarker(),40);_updateDropMarkerThrottled=Km(e=>this._updateDropMarker(e),40);_reconvertMarkerThrottled=Km(()=>{this.editor.model.markers.has("drop-target")&&this.editor.editing.reconvertMarker("drop-target")},0);_dropTargetLineView=new BVe;_domEmitter=new(zo());_scrollables=new Map;static get pluginName(){return"DragDropTarget"}static get isOfficialPlugin(){return!0}init(){this._setupDropMarker()}destroy(){this._domEmitter.stopListening();for(const{resizeObserver:e}of this._scrollables.values())e.destroy();return this._updateDropMarkerThrottled.cancel(),this.removeDropMarkerDelayed.cancel(),this._reconvertMarkerThrottled.cancel(),super.destroy()}updateDropMarker(e,n,i,r,o,s){this.removeDropMarkerDelayed.cancel();const a=hF(this.editor,e,n,i,r,o,s);return a?s&&s.containsRange(a)?(this.removeDropMarker(),null):a&&!this.editor.model.canEditAt(a)?(this.removeDropMarker(),null):(this._updateDropMarkerThrottled(a),a):null}getFinalDropRange(e,n,i,r,o,s){const a=hF(this.editor,e,n,i,r,o,s);return this.removeDropMarker(),a}removeDropMarker(){const e=this.editor.model;this.removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),this._dropTargetLineView.isVisible=!1,e.markers.has("drop-target")&&e.change(n=>{n.removeMarker("drop-target")})}_setupDropMarker(){const e=this.editor;e.ui.view.body.add(this._dropTargetLineView),e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(n,{writer:i})=>{if(e.model.schema.checkChild(n.markerRange.start,"$text"))return this._dropTargetLineView.isVisible=!1,this._createDropTargetPosition(i);n.markerRange.isCollapsed?this._updateDropTargetLine(n.markerRange):this._dropTargetLineView.isVisible=!1}})}_updateDropMarker(e){const n=this.editor,i=n.model.markers;n.model.change(r=>{i.has("drop-target")?i.get("drop-target").getRange().isEqual(e)||r.updateMarker("drop-target",{range:e}):r.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_createDropTargetPosition(e){return e.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(n){const i=this.toDomElement(n);return i.append("",n.createElement("span"),""),i})}_updateDropTargetLine(e){const n=this.editor.editing,i=e.start.nodeBefore,r=e.start.nodeAfter,o=e.start.parent,s=i?n.mapper.toViewElement(i):null,a=s?n.view.domConverter.mapViewToDom(s):null,l=r?n.mapper.toViewElement(r):null,u=l?n.view.domConverter.mapViewToDom(l):null,c=n.mapper.toViewElement(o);if(!c)return;const d=n.view.domConverter.mapViewToDom(c),f=this._getScrollableRect(c),{scrollX:h,scrollY:m}=Qe.window,g=a?new Wt(a):null,v=u?new Wt(u):null,p=new Wt(d).excludeScrollbarsAndBorders(),b=g?g.bottom:p.top,y=v?v.top:p.bottom,_=Qe.window.getComputedStyle(d),C=b<=y?(b+y)/2:y;if(f.top<C&&C<f.bottom){const S=p.left+parseFloat(_.paddingLeft),k=p.right-parseFloat(_.paddingRight),T=Math.max(S+h,f.left),E=Math.min(k+h,f.right);this._dropTargetLineView.set({isVisible:!0,left:T,top:C+m,width:E-T})}else this._dropTargetLineView.isVisible=!1}_getScrollableRect(e){const n=e.root.rootName;let i;if(this._scrollables.has(n))i=this._scrollables.get(n).domElement;else{const r=this.editor.editing.view.domConverter.mapViewToDom(e);i=FVe(r),this._domEmitter.listenTo(i,"scroll",this._reconvertMarkerThrottled,{usePassive:!0});const o=new NM(i,this._reconvertMarkerThrottled);this._scrollables.set(n,{domElement:i,resizeObserver:o})}return new Wt(i).excludeScrollbarsAndBorders()}}function hF(t,e,n,i,r,o,s){const a=t.model,l=t.editing.mapper;let c=mF(t,e);for(;c;){if(!o){if(a.schema.checkChild(c,"$text")){if(n){const d=n[0].start,f=l.toModelPosition(d);if(!s||Array.from(s.getItems({shallow:!0})).some(m=>a.schema.checkChild(f,m))){if(a.schema.checkChild(f,"$text"))return a.createRange(f);if(d)return vy(t,mF(t,d.parent),i,r)}}}else if(a.schema.isInline(c))return vy(t,c,i,r)}if(a.schema.isBlock(c))return vy(t,c,i,r);if(a.schema.checkChild(c,"$block")){const d=Array.from(c.getChildren()).filter(m=>m.is("element")&&!VVe(t,m));let f=0,h=d.length;if(h==0)return a.createRange(a.createPositionAt(c,"end"));for(;f<h-1;){const m=Math.floor((f+h)/2);lX(t,d[m],i,r)=="before"?h=m:f=m}return vy(t,d[f],i,r)}c=c.parent}return null}function VVe(t,e){const n=t.editing.mapper,i=t.editing.view.domConverter,r=n.toViewElement(e);if(!r)return!0;const o=i.mapViewToDom(r);return Qe.window.getComputedStyle(o).float!="none"}function vy(t,e,n,i){const r=t.model;return r.createRange(r.createPositionAt(e,lX(t,e,n,i)))}function lX(t,e,n,i){const r=t.editing.mapper,o=t.editing.view.domConverter,s=r.toViewElement(e),a=o.mapViewToDom(s),l=new Wt(a);return t.model.schema.isInline(e)?n<(l.left+l.right)/2?"before":"after":i<(l.top+l.bottom)/2?"before":"after"}function mF(t,e){const n=t.editing.mapper,i=t.editing.view,r=n.toModelElement(e);if(r)return r;const o=i.createPositionBefore(e),s=n.findMappedViewAncestor(o);return n.toModelElement(s)}function FVe(t){let e=t;do{e=e.parentElement;const n=Qe.window.getComputedStyle(e).overflowY;if(n=="auto"||n=="scroll")break}while(e.tagName!="BODY");return e}class $Ve extends xe{_isBlockDragging=!1;_domEmitter=new(zo());static get pluginName(){return"DragDropBlockToolbar"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;if(this.listenTo(e,"change:isReadOnly",(n,i,r)=>{r?(this.forceDisabled("readOnlyMode"),this._isBlockDragging=!1):this.clearForceDisabled("readOnlyMode")}),vt.isAndroid&&this.forceDisabled("noAndroidSupport"),e.plugins.has("BlockToolbar")){const i=e.plugins.get("BlockToolbar").buttonView.element;this._domEmitter.listenTo(i,"dragstart",(r,o)=>this._handleBlockDragStart(o)),this._domEmitter.listenTo(Qe.document,"dragover",(r,o)=>this._handleBlockDragging(o)),this._domEmitter.listenTo(Qe.document,"drop",(r,o)=>this._handleBlockDragging(o)),this._domEmitter.listenTo(Qe.document,"dragend",()=>this._handleBlockDragEnd(),{useCapture:!0}),this.isEnabled&&i.setAttribute("draggable","true"),this.on("change:isEnabled",(r,o,s)=>{i.setAttribute("draggable",s?"true":"false")})}}destroy(){return this._domEmitter.stopListening(),super.destroy()}_handleBlockDragStart(e){if(!this.isEnabled)return;const n=this.editor.model,i=n.document.selection,r=this.editor.editing.view,o=Array.from(i.getSelectedBlocks()),s=n.createRange(n.createPositionBefore(o[0]),n.createPositionAfter(o[o.length-1]));n.change(a=>a.setSelection(s)),this._isBlockDragging=!0,r.focus(),r.getObserver(fb).onDomEvent(e)}_handleBlockDragging(e){if(!this.isEnabled||!this._isBlockDragging)return;const n=e.clientX+(this.editor.locale.contentLanguageDirection=="ltr"?100:-100),i=e.clientY,r=document.elementFromPoint(n,i),o=this.editor.editing.view;!r||!r.closest(".ck-editor__editable")||o.getObserver(fb).onDomEvent({...e,type:e.type,dataTransfer:e.dataTransfer,target:r,clientX:n,clientY:i,preventDefault:()=>e.preventDefault(),stopPropagation:()=>e.stopPropagation()})}_handleBlockDragEnd(){this._isBlockDragging=!1}}class zVe extends xe{_draggedRange;_draggingUid;_draggableElement;_clearDraggableAttributesDelayed=zM(()=>this._clearDraggableAttributes(),40);_blockMode=!1;_domEmitter=new(zo());_previewContainer;static get pluginName(){return"DragDrop"}static get isOfficialPlugin(){return!0}static get requires(){return[fs,h0,py,$Ve]}init(){const e=this.editor,n=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,n.addObserver(fb),n.addObserver(YG),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(i,r,o)=>{o?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(i,r,o)=>{o||this._finalizeDragging(!1)}),vt.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._previewContainer&&this._previewContainer.remove(),this._domEmitter.stopListening(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,n=e.model,i=e.editing.view,r=i.document,o=e.plugins.get(py);this.listenTo(r,"dragstart",(s,a)=>{if(a.target?.is("editableElement")){a.preventDefault();return}if(this._prepareDraggedRange(a.target),!this._draggedRange){a.preventDefault();return}this._draggingUid=Ur();const l=this.isEnabled&&e.model.canEditAt(this._draggedRange);a.dataTransfer.effectAllowed=l?"copyMove":"copy",a.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const u=n.createSelection(this._draggedRange.toRange());this.editor.plugins.get("ClipboardPipeline")._fireOutputTransformationEvent(a.dataTransfer,u,"dragstart");const{dataTransfer:d,domTarget:f,domEvent:h}=a,{clientX:m}=h;this._updatePreview({dataTransfer:d,domTarget:f,clientX:m}),a.stopPropagation(),l||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(r,"dragend",(s,a)=>{this._finalizeDragging(!a.dataTransfer.isCanceled&&a.dataTransfer.dropEffect=="move")},{priority:"low"}),this._domEmitter.listenTo(Qe.document,"dragend",()=>{this._blockMode=!1},{useCapture:!0}),this.listenTo(r,"dragenter",()=>{this.isEnabled&&i.focus()}),this.listenTo(r,"dragleave",()=>{o.removeDropMarkerDelayed()}),this.listenTo(r,"dragging",(s,a)=>{if(!this.isEnabled){a.dataTransfer.dropEffect="none";return}const{clientX:l,clientY:u}=a.domEvent;if(!o.updateDropMarker(a.target,a.targetRanges,l,u,this._blockMode,this._draggedRange)){a.dataTransfer.dropEffect="none";return}this._draggedRange||(a.dataTransfer.dropEffect="copy"),vt.isGecko||(a.dataTransfer.effectAllowed=="copy"?a.dataTransfer.dropEffect="copy":["all","copyMove"].includes(a.dataTransfer.effectAllowed)&&(a.dataTransfer.dropEffect="move")),s.stop()},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,i=e.editing.view.document,r=e.plugins.get(py);this.listenTo(i,"clipboardInput",(o,s)=>{if(s.method!="drop")return;const{clientX:a,clientY:l}=s.domEvent,u=r.getFinalDropRange(s.target,s.targetRanges,a,l,this._blockMode,this._draggedRange);if(!u){this._finalizeDragging(!1),o.stop();return}if(this._draggedRange&&this._draggingUid!=s.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),gF(s.dataTransfer)=="move"&&this._draggedRange&&this._draggedRange.containsRange(u,!0)){this._finalizeDragging(!1),o.stop();return}s.targetRanges=[e.editing.mapper.toViewRange(u)]},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(fs);e.on("contentInsertion",(n,i)=>{if(!this.isEnabled||i.method!=="drop")return;const r=i.targetRanges.map(o=>this.editor.editing.mapper.toModelRange(o));this.editor.model.change(o=>o.setSelection(r))},{priority:"high"}),e.on("contentInsertion",(n,i)=>{if(!this.isEnabled||i.method!=="drop")return;const r=gF(i.dataTransfer)=="move",o=!i.resultRange||!i.resultRange.isCollapsed;this._finalizeDragging(o&&r)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,n=e.editing.view,i=n.document;this.listenTo(i,"pointerdown",(r,o)=>{if(vt.isAndroid||!o)return;this._clearDraggableAttributesDelayed.cancel();let s=pF(o.target);if(vt.isBlink&&!e.isReadOnly&&!s&&!i.selection.isCollapsed){const a=i.selection.getSelectedElement();(!a||!ci(a))&&(s=i.selection.editableElement)}s&&(n.change(a=>{a.setAttribute("draggable","true",s)}),this._draggableElement=e.editing.mapper.toModelElement(s))}),this.listenTo(i,"pointerup",()=>{vt.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change(n=>{this._draggableElement&&this._draggableElement.root.rootName!="$graveyard"&&n.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_finalizeDragging(e){const n=this.editor,i=n.model;n.plugins.get(py).removeDropMarker(),this._clearDraggableAttributes(),n.plugins.has("WidgetToolbarRepository")&&n.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._previewContainer&&(this._previewContainer.remove(),this._previewContainer=void 0),this._draggedRange&&(e&&this.isEnabled&&i.change(o=>{const s=i.createSelection(this._draggedRange);i.deleteContent(s,{doNotAutoparagraph:!0});const a=s.getFirstPosition().parent;a.isEmpty&&!i.schema.checkChild(a,"$text")&&i.schema.checkChild(a,"paragraph")&&o.insertElement("paragraph",a,0)}),this._draggedRange.detach(),this._draggedRange=null)}_prepareDraggedRange(e){const n=this.editor,i=n.model,r=i.document.selection,o=e?pF(e):null;if(o){const u=n.editing.mapper.toModelElement(o);this._draggedRange=ko.fromRange(i.createRangeOn(u)),this._blockMode=i.schema.isBlock(u),n.plugins.has("WidgetToolbarRepository")&&n.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop");return}if(r.isCollapsed&&!r.getFirstPosition().parent.isEmpty)return;const s=Array.from(r.getSelectedBlocks()),a=r.getFirstRange();if(s.length==0){this._draggedRange=ko.fromRange(a);return}const l=uX(i,s);if(s.length>1)this._draggedRange=ko.fromRange(l),this._blockMode=!0;else if(s.length==1){const u=a.start.isTouching(l.start)&&a.end.isTouching(l.end);this._draggedRange=ko.fromRange(u?l:a),this._blockMode=u}i.change(u=>u.setSelection(this._draggedRange.toRange()))}_updatePreview({dataTransfer:e,domTarget:n,clientX:i}){const r=this.editor.editing.view,o=r.document.selection.editableElement,s=r.domConverter.mapViewToDom(o),a=Qe.window.getComputedStyle(s);this._previewContainer?this._previewContainer.firstElementChild&&this._previewContainer.removeChild(this._previewContainer.firstElementChild):(this._previewContainer=Ko(Qe.document,"div",{style:"position: fixed; left: -999999px;"}),Qe.document.body.appendChild(this._previewContainer));const l=Ko(Qe.document,"div");l.className="ck ck-content ck-clipboard-preview";const u=new Wt(s),c=parseFloat(a.paddingLeft),d=parseFloat(a.paddingRight),f=parseFloat(a.width)-c-d;if(s.contains(n))if(vt.isiOS)l.style.maxWidth=`${f}px`,l.style.padding="10px",l.style.minWidth="200px",l.style.minHeight="20px",l.style.boxSizing="border-box",l.style.backgroundColor="var(--ck-color-base-background)";else return;else if(vt.isiOS)l.style.width=`${f}px`,l.style.backgroundColor="var(--ck-color-base-background)";else{const h=u.left-i+c;l.style.width=`${f+h}px`,l.style.paddingLeft=`${h}px`}r.domConverter.setContentOf(l,e.getData("text/html")),e.setDragImage(l,0,0),this._previewContainer.appendChild(l)}}function gF(t){return vt.isGecko?t.dropEffect:["all","copyMove"].includes(t.effectAllowed)?"move":"copy"}function pF(t){if(t.is("editableElement"))return null;if(t.hasClass("ck-widget__selection-handle"))return t.findAncestor(ci);if(ci(t))return t;const e=t.findAncestor(n=>ci(n)||n.is("editableElement"));return ci(e)?e:null}function uX(t,e){const n=e[0],i=e[e.length-1],r=n.getCommonAncestor(i),o=t.createPositionBefore(n),s=t.createPositionAfter(i);if(r&&r.is("element")&&!t.schema.isLimit(r)){const a=t.createRangeOn(r),l=o.isTouching(a.start),u=s.isTouching(a.end);if(l&&u)return uX(t,[r])}return t.createRange(o,s)}class HVe extends xe{static get pluginName(){return"PastePlainText"}static get isOfficialPlugin(){return!0}static get requires(){return[fs]}init(){const e=this.editor,n=e.model,i=e.editing.view,r=n.document.selection;i.addObserver(fb),e.plugins.get(fs).on("contentInsertion",(o,s)=>{UVe(s.content,n)&&n.change(a=>{const l=Array.from(r.getAttributes()).filter(([c])=>n.schema.getAttributeProperties(c).isFormatting);r.isCollapsed||n.deleteContent(r,{doNotAutoparagraph:!0}),l.push(...r.getAttributes());const u=a.createRangeIn(s.content);for(const c of u.getItems())for(const d of l)n.schema.checkAttribute(c,d[0])&&a.setAttribute(d[0],d[1],c)})})}}function UVe(t,e){let n=e.createRangeIn(t);if(t.childCount==1){const i=t.getChild(0);i.is("element")&&e.schema.isBlock(i)&&!e.schema.isObject(i)&&!e.schema.isLimit(i)&&(n=e.createRangeIn(i))}for(const i of n.getItems())if(!e.schema.isInline(i)||Array.from(i.getAttributeKeys()).find(o=>e.schema.getAttributeProperties(o).isFormatting))return!1;return!0}class cX extends xe{static get pluginName(){return"Clipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[av,fs,zVe,HVe]}init(){const e=this.editor,n=this.editor.t;e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Copy selected content"),keystroke:"CTRL+C"},{label:n("Paste content"),keystroke:"CTRL+V"},{label:n("Paste content as plain text"),keystroke:"CTRL+SHIFT+V"}]})}}const WVe={autoRefresh:!0},vF=36e5,qVe=5e3;class wO extends Ln(){_refresh;_options;_tokenRefreshTimeout;_isDestroyed=!1;constructor(e,n={}){if(super(),!e)throw new oe("token-missing-token-url",this);n.initValue&&this._validateTokenValue(n.initValue),this.set("value",n.initValue),typeof e=="function"?this._refresh=e:this._refresh=()=>jVe(e),this._options={...WVe,...n}}init(){return new Promise((e,n)=>{if(!this.value){this.refreshToken().then(e).catch(n);return}this._options.autoRefresh&&this._registerRefreshTokenTimeout(),e(this)})}refreshToken(){const e=this._options.autoRefresh;return this._refresh().then(n=>(this._validateTokenValue(n),this.set("value",n),e&&this._registerRefreshTokenTimeout(),this)).catch(n=>{throw hn("token-refresh-failed",{autoRefresh:e}),e&&this._registerRefreshTokenTimeout(qVe),n})}destroy(){this._isDestroyed=!0,clearTimeout(this._tokenRefreshTimeout)}_validateTokenValue(e){const n=typeof e=="string",i=!/^".*"$/.test(e),r=n&&e.split(".").length===3;if(!(i&&r))throw new oe("token-not-in-jwt-format",this)}_registerRefreshTokenTimeout(e){if(clearTimeout(this._tokenRefreshTimeout),this._isDestroyed)return;const n=e||this._getTokenRefreshTimeoutTime();this._tokenRefreshTimeout=setTimeout(()=>{this.refreshToken()},n)}_getTokenRefreshTimeoutTime(){try{const[,e]=this.value.split("."),{exp:n}=JSON.parse(atob(e));return n?(n>2147483647&&console.warn("Token expiration time exceeds 32-bit integer range. This might cause unpredictable token refresh timing. Token expiration time should always be provided in seconds.",{tokenExpireTime:n}),Math.floor((n*1e3-Date.now())/2)):vF}catch{return vF}}static create(e,n={}){return new wO(e,n).init()}}function jVe(t){return new Promise((e,n)=>{const i=new XMLHttpRequest;i.open("GET",t),i.addEventListener("load",()=>{const r=i.status,o=i.response;return r<200||r>299?n(new oe("token-cannot-download-new-token",null)):e(o)}),i.addEventListener("error",()=>n(new Error("Network Error"))),i.addEventListener("abort",()=>n(new Error("Abort"))),i.send()})}const VA=/^data:(\S*?);base64,/;class KVe extends Fn(){file;xhr;_token;_apiAddress;constructor(e,n,i){if(super(),!e)throw new oe("fileuploader-missing-file",null);if(!n)throw new oe("fileuploader-missing-token",null);if(!i)throw new oe("fileuploader-missing-api-address",null);this.file=YVe(e)?GVe(e):e,this._token=n,this._apiAddress=i}onProgress(e){return this.on("progress",(n,i)=>e(i)),this}onError(e){return this.once("error",(n,i)=>e(i)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open("POST",this._apiAddress),e.setRequestHeader("Authorization",this._token.value),e.responseType="json",this.xhr=e}_attachXHRListeners(){const e=this.xhr,n=i=>()=>this.fire("error",i);e.addEventListener("error",n("Network Error")),e.addEventListener("abort",n("Abort"));e.upload&&e.upload.addEventListener("progress",i=>{i.lengthComputable&&this.fire("progress",{total:i.total,uploaded:i.loaded})}),e.addEventListener("load",()=>{const i=e.status,r=e.response;if(i<200||i>299)return this.fire("error",r.message||r.error)})}_sendRequest(){const e=new FormData,n=this.xhr;return e.append("file",this.file),new Promise((i,r)=>{n.addEventListener("load",()=>{const o=n.status,s=n.response;return o<200||o>299?s.message?r(new oe("fileuploader-uploading-data-failed",this,{message:s.message})):r(s.error):i(s)}),n.addEventListener("error",()=>r(new Error("Network Error"))),n.addEventListener("abort",()=>r(new Error("Abort"))),n.send(e)})}}function GVe(t,e=512){try{const n=t.match(VA)[1],i=atob(t.replace(VA,"")),r=[];for(let o=0;o<i.length;o+=e){const s=i.slice(o,o+e),a=new Array(s.length);for(let l=0;l<s.length;l++)a[l]=s.charCodeAt(l);r.push(new Uint8Array(a))}return new Blob(r,{type:n})}catch{throw new oe("fileuploader-decoding-image-data-error",null)}}function YVe(t){return typeof t!="string"?!1:!!t.match(VA)?.length}class XVe{_token;_apiAddress;constructor(e,n){if(!e)throw new oe("uploadgateway-missing-token",null);if(!n)throw new oe("uploadgateway-missing-api-address",null);this._token=e,this._apiAddress=n}upload(e){return new KVe(e,this._token,this._apiAddress)}}class JVe extends bS{static get pluginName(){return"CloudServicesCore"}static get isOfficialPlugin(){return!0}createToken(e,n){return new wO(e,n)}createUploadGateway(e,n){return new XVe(e,n)}}class ZVe extends bS{tokenUrl;uploadUrl;webSocketUrl;bundleVersion;autoRefresh=!0;token=null;_tokens=new Map;static get pluginName(){return"CloudServices"}static get isOfficialPlugin(){return!0}static get requires(){return[JVe]}async init(){const n=this.context.config.get("cloudServices")||{};for(const[o,s]of Object.entries(n))this[o]=s;if(!this.tokenUrl){this.token=null;return}const r=this.context.plugins.get("CloudServicesCore").createToken(this.tokenUrl,{autoRefresh:this.autoRefresh});try{this.token=await r.init(),this._tokens.set(this.tokenUrl,this.token)}catch(o){throw r.destroy(),o}}async registerTokenUrl(e){if(this._tokens.has(e))return this.getTokenFor(e);const i=await this.context.plugins.get("CloudServicesCore").createToken(e,{autoRefresh:this.autoRefresh}).init();return this._tokens.set(e,i),i}getTokenFor(e){const n=this._tokens.get(e);if(!n)throw new oe("cloudservices-token-not-registered",this);return n}destroy(){super.destroy();for(const e of this._tokens.values())e.destroy()}}class QVe extends xBe{view;_toolbarConfig;_elementReplacer;constructor(e,n){super(e),this.view=n,this._toolbarConfig=BY(e.config.get("toolbar")),this._elementReplacer=new jK,this.listenTo(e.editing.view,"scrollToTheSelection",this._handleScrollToTheSelectionWithStickyPanel.bind(this))}get element(){return this.view.element}init(e){const n=this.editor,i=this.view,r=n.editing.view,o=i.editable,s=r.document.getRoot();o.name=s.rootName,i.render();const a=o.element;this.setEditableElement(o.name,a),i.editable.bind("isFocused").to(this.focusTracker),r.attachDomRoot(a),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),i.menuBarView&&this.initMenuBar(i.menuBarView),this._initDialogPluginIntegration(),this._initContextualBalloonIntegration(),this.fire("ready")}destroy(){super.destroy();const e=this.view,n=this.editor.editing.view;this._elementReplacer.restore(),n.getDomRoot(e.editable.name)&&n.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({visualTop:n})=>n||0),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,n=e.editing.view,i=n.document.getRoot(),r=e.sourceElement;let o;const s=e.config.get("placeholder");s&&(o=typeof s=="string"?s:s[this.view.editable.name]),!o&&r&&r.tagName.toLowerCase()==="textarea"&&(o=r.getAttribute("placeholder")),o&&(i.placeholder=o),qM({view:n,element:i,isDirectHost:!1,keepOnFocus:!0})}_initContextualBalloonIntegration(){if(!this.editor.plugins.has("ContextualBalloon"))return;const{stickyPanel:e}=this.view,n=this.editor.plugins.get("ContextualBalloon");n.on("getPositionOptions",r=>{const o=r.return;if(!o||!e.isSticky||!e.element)return;const s=new Wt(e.element).height,a=typeof o.target=="function"?o.target():o.target,l=typeof o.limiter=="function"?o.limiter():o.limiter;if(a&&l&&new Wt(a).height>=new Wt(l).height-s)return;const u={...o.viewportOffsetConfig},c=(u.top||0)+s;r.return={...o,viewportOffsetConfig:{...u,top:c}}},{priority:"low"});const i=()=>{n.visibleView&&n.updatePosition()};this.listenTo(e,"change:isSticky",i),this.listenTo(this.editor.ui,"change:viewportOffset",i)}_handleScrollToTheSelectionWithStickyPanel(e,n,i){const r=this.view.stickyPanel;if(r.isSticky){const o=new Wt(r.element).height;n.viewportOffset.top+=o}else{const o=()=>{this.editor.editing.view.scrollToTheSelection(i)};this.listenTo(r,"change:isSticky",o),setTimeout(()=>{this.stopListening(r,"change:isSticky",o)},20)}}_initDialogPluginIntegration(){if(!this.editor.plugins.has("Dialog"))return;const e=this.view.stickyPanel,n=this.editor.plugins.get("Dialog");n.on("show",()=>{const i=n.view;i.on("moveTo",(r,o)=>{if(!e.isSticky||i.wasMoved||i.isModal)return;const s=new Wt(e.contentPanelElement);o[1]<s.bottom+db.defaultOffset&&(o[1]=s.bottom+db.defaultOffset)},{priority:"high"})},{priority:"low"})}}class eFe extends PBe{stickyPanel;toolbar;editable;constructor(e,n,i={}){super(e),this.stickyPanel=new LBe(e),this.toolbar=new Xm(e,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull}),i.useMenuBar&&(this.menuBarView=new VBe(e)),this.editable=new RBe(e,n,void 0,{label:i.label})}render(){super.render(),this.menuBarView?this.stickyPanel.content.addMany([this.menuBarView,this.toolbar]):this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class tFe extends MDe(ADe){static get editorName(){return"ClassicEditor"}ui;constructor(e,n={}){if(!t_(e)&&n.initialData!==void 0)throw new oe("editor-create-initial-data",null);super(n),this.config.define("menuBar.isVisible",!1),this.config.get("initialData")===void 0&&this.config.set("initialData",nFe(e)),t_(e)&&(this.sourceElement=e),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),r=this.config.get("menuBar"),o=new eFe(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i,useMenuBar:r.isVisible,label:this.config.get("label")});this.ui=new QVe(this,o),IDe(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,n={}){return new Promise(i=>{const r=new this(e,n);i(r.initPlugins().then(()=>r.ui.init(t_(e)?e:null)).then(()=>r.data.init(r.config.get("initialData"))).then(()=>r.fire("ready")).then(()=>r))})}}function nFe(t){return t_(t)?bRe(t):t}function t_(t){return Rc(t)}class iFe extends Ht{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,n=e.document.selection;let i=e.schema.getLimitElement(n);if(n.containsEntireContent(i)||!bF(e.schema,i))do if(i=i.parent,!i)return;while(!bF(e.schema,i));e.change(r=>{r.setSelection(i,"in")})}}function bF(t,e){return t.isLimit(e)&&(t.checkChild(e,"$text")||t.checkChild(e,"paragraph"))}const rFe=FM("Ctrl+A");class oFe extends xe{static get pluginName(){return"SelectAllEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.t,r=e.editing.view.document;e.commands.add("selectAll",new iFe(e)),this.listenTo(r,"keydown",(o,s)=>{Gm(s)===rFe&&(e.execute("selectAll"),s.preventDefault())}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Select all"),keystroke:"CTRL+A"}]})}}class sFe extends xe{static get pluginName(){return"SelectAllUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",()=>{const n=this._createButton(wt);return n.set({tooltip:!0}),n}),e.ui.componentFactory.add("menuBar:selectAll",()=>this._createButton(Wi))}_createButton(e){const n=this.editor,i=n.locale,r=n.commands.get("selectAll"),o=new e(n.locale),s=i.t;return o.set({label:s("Select all"),icon:gNe,keystroke:"Ctrl+A"}),o.bind("isEnabled").to(r,"isEnabled"),this.listenTo(o,"execute",()=>{n.execute("selectAll"),n.editing.view.focus()}),o}}class aFe extends xe{static get requires(){return[oFe,sFe]}static get pluginName(){return"SelectAll"}static get isOfficialPlugin(){return!0}}class dX extends Ht{_stack=[];_createdBatches=new WeakSet;constructor(e){super(e),this.refresh(),this._isEnabledBasedOnSelection=!1,this.listenTo(e.data,"set",(n,i)=>{i[1]={...i[1]};const r=i[1];r.batchType||(r.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(n,i)=>{i[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}get createdBatches(){return this._createdBatches}addBatch(e){const n=this.editor.model.document.selection,i={ranges:n.hasOwnRange?Array.from(n.getRanges()):[],isBackward:n.isBackward};this._stack.push({batch:e,selection:i}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,n,i){const r=this.editor.model,o=r.document,s=[],a=e.map(u=>u.getTransformedByOperations(i)),l=a.flat();for(const u of a){const c=u.filter(d=>d.root!=o.graveyard).filter(d=>!uFe(d,l));c.length&&(lFe(c),s.push(c[0]))}s.length&&r.change(u=>{u.setSelection(s,{backward:n})})}_undo(e,n){const i=this.editor.model,r=i.document;this._createdBatches.add(n);const o=e.operations.slice().filter(s=>s.isDocumentOperation);o.reverse();for(const s of o){const a=s.baseVersion+1,l=Array.from(r.history.getOperations(a)),c=jLe([s.getReversed()],l,{useRelations:!0,document:this.editor.model.document,forceWeakRemove:!0}).operationsA;for(let d of c){const f=d.affectedSelectable;f&&!i.canEditAt(f)&&(d=new or(d.baseVersion)),n.addOperation(d),i.applyOperation(d),r.history.setOperationAsUndone(s,d)}}}}function lFe(t){t.sort((e,n)=>e.start.isBefore(n.start)?-1:1);for(let e=1;e<t.length;e++){const i=t[e-1].getJoined(t[e],!0);i&&(e--,t.splice(e,2,i))}}function uFe(t,e){return e.some(n=>n!==t&&n.containsRange(t,!0))}class cFe extends dX{execute(e=null){const n=e?this._stack.findIndex(o=>o.batch==e):this._stack.length-1,i=this._stack.splice(n,1)[0],r=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(r,()=>{this._undo(i.batch,r);const o=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,o)}),this.fire("revert",i.batch,r),this.refresh()}}class dFe extends dX{execute(){const e=this._stack.pop(),n=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(n,()=>{const r=e.batch.operations[e.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(r);this._restoreSelection(e.selection.ranges,e.selection.isBackward,o),this._undo(e.batch,n)}),this.fire("revert",e.batch,n),this.refresh()}}class fFe extends xe{_undoCommand;_redoCommand;_batchRegistry=new WeakSet;static get pluginName(){return"UndoEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.t;this._undoCommand=new cFe(e),this._redoCommand=new dFe(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(i,r)=>{const o=r[0];if(!o.isDocumentOperation)return;const s=o.batch,a=this._redoCommand.createdBatches.has(s),l=this._undoCommand.createdBatches.has(s);this._batchRegistry.has(s)||(this._batchRegistry.add(s),s.isUndoable&&(a?this._undoCommand.addBatch(s):l||(this._undoCommand.addBatch(s),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(i,r,o)=>{this._redoCommand.addBatch(o)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo"),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Undo"),keystroke:"CTRL+Z"},{label:n("Redo"),keystroke:[["CTRL+Y"],["CTRL+SHIFT+Z"]]}]})}}class hFe extends xe{static get pluginName(){return"UndoUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale,i=e.t,r=n.uiLanguageDirection=="ltr"?mV:fV,o=n.uiLanguageDirection=="ltr"?fV:mV;this._addButtonsToFactory("undo",i("Undo"),"CTRL+Z",r),this._addButtonsToFactory("redo",i("Redo"),"CTRL+Y",o)}_addButtonsToFactory(e,n,i,r){const o=this.editor;o.ui.componentFactory.add(e,()=>{const s=this._createButton(wt,e,n,i,r);return s.set({tooltip:!0}),s}),o.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(Wi,e,n,i,r))}_createButton(e,n,i,r,o){const s=this.editor,a=s.locale,l=s.commands.get(n),u=new e(a);return u.set({label:i,icon:o,keystroke:r}),u.bind("isEnabled").to(l,"isEnabled"),this.listenTo(u,"execute",()=>{s.execute(n),s.editing.view.focus()}),u}}class _O extends xe{static get requires(){return[fFe,hFe]}static get pluginName(){return"Undo"}static get isOfficialPlugin(){return!0}}class mFe extends xe{static get requires(){return[S3e,cX,kS,aFe,W4e,s4e,_O]}static get pluginName(){return"Essentials"}static get isOfficialPlugin(){return!0}}class CO extends Ht{attributeKey;constructor(e,n){super(e),this.attributeKey=n}refresh(){const e=this.editor.model,n=e.document;this.value=n.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(n.selection,this.attributeKey)}execute(e={}){const n=this.editor.model,r=n.document.selection,o=e.value,s=e.batch,a=l=>{if(r.isCollapsed)o?l.setSelectionAttribute(this.attributeKey,o):l.removeSelectionAttribute(this.attributeKey);else{const u=n.schema.getValidRanges(r.getRanges(),this.attributeKey,{includeEmptyRanges:!0});for(const c of u){let d=c,f=this.attributeKey;c.isCollapsed&&(d=c.start.parent,f=cs._getStoreAttributeKey(this.attributeKey)),o?l.setAttribute(f,o,d):l.removeAttribute(f,d)}}};s?n.enqueueChange(s,l=>{a(l)}):n.change(l=>{a(l)})}}const po="fontSize",Ha="fontColor",ql="fontBackgroundColor";function gFe(t,e){const n={model:{key:t,values:[]},view:{},upcastAlso:{}};for(const i of e)n.model.values.push(i.model),n.view[i.model]=i.view,i.upcastAlso&&(n.upcastAlso[i.model]=i.upcastAlso);return n}function fX(t){return e=>vFe(e.getStyle(t))}function hX(t){return(e,{writer:n})=>n.createAttributeElement("span",{style:`${t}:${e}`},{priority:7})}function pFe({dropdownView:t,colors:e,columns:n,removeButtonLabel:i,colorPickerLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerViewConfig:a}){const l=t.locale,u=new hO(l,{colors:e,columns:n,removeButtonLabel:i,colorPickerLabel:r,documentColorsLabel:o,documentColorsCount:s,colorPickerViewConfig:a});return t.colorSelectorView=u,t.panelView.children.add(u),u}function vFe(t){return t.replace(/\s/g,"")}class bFe extends CO{constructor(e){super(e,po)}}function hb(t){return t.map(e=>yFe(e)).filter(e=>e!==void 0)}const yF={get tiny(){return{title:"Tiny",model:"tiny",view:{name:"span",classes:"text-tiny",priority:7}}},get small(){return{title:"Small",model:"small",view:{name:"span",classes:"text-small",priority:7}}},get big(){return{title:"Big",model:"big",view:{name:"span",classes:"text-big",priority:7}}},get huge(){return{title:"Huge",model:"huge",view:{name:"span",classes:"text-huge",priority:7}}}};function yFe(t){if(typeof t=="number"&&(t=String(t)),typeof t=="object"&&CFe(t))return FA(t);const e=_Fe(t);if(e)return FA(e);if(t==="default")return{model:void 0,title:"Default"};if(!SFe(t))return wFe(t)}function wFe(t){return typeof t=="string"&&(t={title:t,model:`${parseFloat(t)}px`}),t.view={name:"span",styles:{"font-size":t.model}},FA(t)}function FA(t){return t.view&&typeof t.view!="string"&&!t.view.priority&&(t.view.priority=7),t}function _Fe(t){return typeof t=="string"?yF[t]:yF[t.model]}function CFe(t){return t.title&&t.model&&t.view}function SFe(t){let e;if(typeof t=="object")if(t.model)e=parseFloat(t.model);else throw new oe("font-size-invalid-definition",null,t);else e=parseFloat(t);return isNaN(e)}const wF=["x-small","x-small","small","medium","large","x-large","xx-large","xxx-large"];class kFe extends xe{static get pluginName(){return"FontSizeEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(po,{options:["tiny","small","default","big","huge"],supportAllValues:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:po}),e.model.schema.setAttributeProperties(po,{isFormatting:!0,copyOnEnter:!0});const n=e.config.get("fontSize.supportAllValues"),i=hb(this.editor.config.get("fontSize.options")).filter(o=>o.model),r=gFe(po,i);n?(this._prepareAnyValueConverters(r),this._prepareCompatibilityConverter()):e.conversion.attributeToElement(r),e.commands.add(po,new bFe(e))}_prepareAnyValueConverters(e){const n=this.editor,i=e.model.values.filter(r=>!vS(String(r))&&!JG(String(r)));if(i.length)throw new oe("font-size-invalid-use-of-named-presets",null,{presets:i});n.conversion.for("downcast").attributeToElement({model:po,view:(r,{writer:o})=>{if(r)return o.createAttributeElement("span",{style:"font-size:"+r},{priority:7})}}),n.conversion.for("upcast").elementToAttribute({model:{key:po,value:r=>r.getStyle("font-size")},view:{name:"span",styles:{"font-size":/.*/}}})}_prepareCompatibilityConverter(){this.editor.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{size:/^[+-]?\d{1,3}$/}},model:{key:po,value:n=>{const i=n.getAttribute("size"),r=i[0]==="-"||i[0]==="+";let o=parseInt(i,10);r&&(o=3+o);const s=wF.length-1,a=Math.min(Math.max(o,0),s);return wF[a]}}})}}class TFe extends xe{static get pluginName(){return"FontSizeUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.t,i=this._getLocalizedOptions(),r=e.commands.get(po),o=n("Font Size"),s=EFe(i,r);e.ui.componentFactory.add(po,a=>{const l=Ro(a);return f0(l,s,{role:"menu",ariaLabel:o}),l.buttonView.set({label:o,icon:uV,tooltip:!0}),l.extendTemplate({attributes:{class:["ck-font-size-dropdown"]}}),l.bind("isEnabled").to(r),this.listenTo(l,"execute",u=>{e.execute(u.source.commandName,{value:u.source.commandParam}),e.editing.view.focus()}),l}),e.ui.componentFactory.add(`menuBar:${po}`,a=>{const l=new la(a);l.buttonView.set({label:o,icon:uV}),l.bind("isEnabled").to(r);const u=new Zm(a);for(const c of s){const d=new yg(a,l),f=new Wi(a);f.set({role:"menuitemradio",isToggleable:!0}),f.bind(...Object.keys(c.model)).to(c.model),f.delegate("execute").to(l),f.on("execute",()=>{e.execute(c.model.commandName,{value:c.model.commandParam}),e.editing.view.focus()}),d.children.add(f),u.items.add(d)}return l.panelView.children.add(u),l})}_getLocalizedOptions(){const e=this.editor,n=e.t,i={Default:n("Default"),Tiny:n("Tiny"),Small:n("Small"),Big:n("Big"),Huge:n("Huge")};return hb(e.config.get(po).options).map(o=>{const s=i[o.title];return s&&s!=o.title&&(o=Object.assign({},o,{title:s})),o})}}function EFe(t,e){const n=new Er;for(const i of t){const r={type:"button",model:new Jm({commandName:po,commandParam:i.model,label:i.title,class:"ck-fontsize-option",role:"menuitemradio",withText:!0})};i.view&&typeof i.view!="string"&&(i.view.styles&&r.model.set("labelStyle",`font-size:${i.view.styles["font-size"]}`),i.view.classes&&r.model.set("class",`${r.model.class} ${i.view.classes}`)),r.model.bind("isOn").to(e,"value",o=>o===i.model),n.add(r)}return n}class xFe extends xe{static get requires(){return[kFe,TFe]}static get pluginName(){return"FontSize"}static get isOfficialPlugin(){return!0}normalizeSizeOptions(e){return hb(e)}}class AFe extends CO{constructor(e){super(e,Ha)}}class PFe extends xe{static get pluginName(){return"FontColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(Ha,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Ha,value:fX("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Ha,value:n=>n.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:Ha,view:hX("color")}),e.commands.add(Ha,new AFe(e)),e.model.schema.extend("$text",{allowAttributes:Ha}),e.model.schema.setAttributeProperties(Ha,{isFormatting:!0,copyOnEnter:!0})}}class mX extends xe{commandName;componentName;icon;dropdownLabel;columns;constructor(e,{commandName:n,componentName:i,icon:r,dropdownLabel:o}){super(e),this.commandName=n,this.componentName=i,this.icon=r,this.dropdownLabel=o,this.columns=e.config.get(`${this.componentName}.columns`)}init(){const e=this.editor,n=e.locale,i=n.t,r=e.commands.get(this.commandName),o=e.config.get(this.componentName),s=NA(o.colors),a=DA(n,s),l=o.documentColors,u=o.colorPicker!==!1;e.ui.componentFactory.add(this.componentName,c=>{const d=Ro(c);let f=!1;const h=pFe({dropdownView:d,colors:a.map(m=>({label:m.label,color:m.model,options:{hasBorder:m.hasBorder}})),columns:this.columns,removeButtonLabel:i("Remove color"),colorPickerLabel:i("Color picker"),documentColorsLabel:l!==0?i("Document colors"):"",documentColorsCount:l===void 0?this.columns:l,colorPickerViewConfig:u?o.colorPicker||{}:!1});return h.bind("selectedColor").to(r,"value"),d.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),d.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),d.bind("isEnabled").to(r),h.on("execute",(m,g)=>{d.isOpen&&e.execute(this.commandName,{value:g.value,batch:this._undoStepBatch}),g.source!=="colorPicker"&&e.editing.view.focus(),g.source==="colorPickerSaveButton"&&(d.isOpen=!1)}),h.on("colorPicker:show",()=>{this._undoStepBatch=e.model.createBatch()}),h.on("colorPicker:cancel",()=>{this._undoStepBatch.operations.length&&(d.isOpen=!1,e.execute("undo",this._undoStepBatch)),e.editing.view.focus()}),d.on("change:isOpen",(m,g,v)=>{f||(f=!0,d.colorSelectorView.appendUI()),v&&(l!==0&&h.updateDocumentColors(e.model,this.componentName),h.updateSelectedColors(),h.showColorGridsFragment())}),fO(d,()=>d.colorSelectorView.colorGridsFragmentView.staticColorsGrid.items.find(m=>m.isOn)),d}),e.ui.componentFactory.add(`menuBar:${this.componentName}`,c=>{const d=new la(c);d.buttonView.set({label:this.dropdownLabel,icon:this.icon}),d.bind("isEnabled").to(r);let f=!1;const h=new hO(c,{colors:a.map(m=>({label:m.label,color:m.model,options:{hasBorder:m.hasBorder}})),columns:this.columns,removeButtonLabel:i("Remove color"),colorPickerLabel:i("Color picker"),documentColorsLabel:l!==0?i("Document colors"):"",documentColorsCount:l===void 0?this.columns:l,colorPickerViewConfig:!1});return h.bind("selectedColor").to(r,"value"),h.delegate("execute").to(d),h.on("execute",(m,g)=>{e.execute(this.commandName,{value:g.value,batch:this._undoStepBatch}),e.editing.view.focus()}),d.on("change:isOpen",(m,g,v)=>{f||(f=!0,h.appendUI()),v&&(l!==0&&h.updateDocumentColors(e.model,this.componentName),h.updateSelectedColors(),h.showColorGridsFragment())}),d.panelView.children.add(h),d})}}class IFe extends mX{constructor(e){const n=e.locale.t;super(e,{commandName:Ha,componentName:Ha,icon:KDe,dropdownLabel:n("Font Color")})}static get pluginName(){return"FontColorUI"}}class RFe extends xe{static get requires(){return[PFe,IFe]}static get pluginName(){return"FontColor"}static get isOfficialPlugin(){return!0}}class MFe extends CO{constructor(e){super(e,ql)}}class OFe extends xe{static get pluginName(){return"FontBackgroundColorEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define(ql,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(QG),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:ql,value:fX("background-color")}}),e.conversion.for("downcast").attributeToElement({model:ql,view:hX("background-color")}),e.commands.add(ql,new MFe(e)),e.model.schema.extend("$text",{allowAttributes:ql}),e.model.schema.setAttributeProperties(ql,{isFormatting:!0,copyOnEnter:!0})}}class LFe extends mX{constructor(e){const n=e.locale.t;super(e,{commandName:ql,componentName:ql,icon:jDe,dropdownLabel:n("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class DFe extends xe{static get requires(){return[OFe,LFe]}static get pluginName(){return"FontBackgroundColor"}static get isOfficialPlugin(){return!0}}class NFe extends Ht{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,n=e.document,i=Mi(n.selection.getSelectedBlocks());this.value=!!i&&i.is("element","paragraph"),this.isEnabled=!!i&&_F(i,e.schema)}execute(e={}){const n=this.editor.model,i=n.document,r=e.selection||i.selection;n.canEditAt(r)&&n.change(o=>{const s=r.getSelectedBlocks();for(const a of s)!a.is("element","paragraph")&&_F(a,n.schema)&&o.rename(a,"paragraph")})}}function _F(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class BFe extends Ht{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}execute(e){const n=this.editor.model,i=e.attributes;let r=e.position;return n.canEditAt(r)?n.change(o=>{if(r=this._findPositionToInsertParagraph(r,o),!r)return null;const s=o.createElement("paragraph");return i&&n.schema.setAllowedAttributes(s,i,o),n.insertContent(s,r),o.setSelection(s,"in"),o.createPositionAt(s,0)}):null}_findPositionToInsertParagraph(e,n){const i=this.editor.model;if(i.schema.checkChild(e,"paragraph"))return e;const r=i.schema.findAllowedParent(e,"paragraph");if(!r)return null;const o=e.parent,s=i.schema.checkChild(o,"$text");return o.isEmpty||s&&e.isAtEnd?i.createPositionAfter(o):!o.isEmpty&&s&&e.isAtStart?i.createPositionBefore(o):n.split(e,r).position}}class TS extends xe{static get pluginName(){return"Paragraph"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model;e.commands.add("paragraph",new NFe(e)),e.commands.add("insertParagraph",new BFe(e)),n.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(i,{writer:r})=>!TS.paragraphLikeElements.has(i.name)||i.isEmpty?null:r.createElement("paragraph"),view:/.+/,converterPriority:"low"})}static paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"])}class VFe extends Ht{modelElements;constructor(e,n){super(e),this.modelElements=n}refresh(){const e=Mi(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(n=>CF(e,n,this.editor.model.schema))}execute(e){const n=this.editor.model,i=n.document,r=e.value;n.change(o=>{const s=Array.from(i.selection.getSelectedBlocks()).filter(a=>CF(a,r,n.schema));for(const a of s)a.is("element",r)||o.rename(a,r)})}}function CF(t,e,n){return n.checkChild(t.parent,e)&&!n.isObject(t)}const SF="paragraph";class FFe extends xe{static get pluginName(){return"HeadingEditing"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[TS]}init(){const e=this.editor,n=e.config.get("heading.options"),i=[];for(const r of n)r.model!=="paragraph"&&(e.model.schema.register(r.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(r),i.push(r.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new VFe(e,i))}afterInit(){const e=this.editor,n=e.commands.get("enter"),i=e.config.get("heading.options");n&&this.listenTo(n,"afterExecute",(r,o)=>{const s=e.model.document.selection.getFirstPosition().parent;i.some(l=>s.is("element",l.model))&&!s.is("element",SF)&&s.childCount===0&&o.writer.rename(s,SF)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:ou.low+1})}}function $Fe(t){const e=t.t,n={Paragraph:e("Paragraph"),"Heading 1":e("Heading 1"),"Heading 2":e("Heading 2"),"Heading 3":e("Heading 3"),"Heading 4":e("Heading 4"),"Heading 5":e("Heading 5"),"Heading 6":e("Heading 6")};return t.config.get("heading.options").map(i=>{const r=n[i.title];return r&&r!=i.title&&(i.title=r),i})}class zFe extends xe{static get pluginName(){return"HeadingUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.t,i=$Fe(e),r=n("Choose heading"),o=n("Heading");e.ui.componentFactory.add("heading",s=>{const a={},l=new Er,u=e.commands.get("heading"),c=e.commands.get("paragraph"),d=[u];for(const h of i){const m={type:"button",model:new Jm({label:h.title,class:h.class,role:"menuitemradio",withText:!0})};h.model==="paragraph"?(m.model.bind("isOn").to(c,"value"),m.model.set("commandName","paragraph"),d.push(c)):(m.model.bind("isOn").to(u,"value",g=>g===h.model),m.model.set({commandName:"heading",commandValue:h.model})),l.add(m),a[h.model]=h.title}const f=Ro(s);return f0(f,l,{ariaLabel:o,role:"menu"}),f.buttonView.set({ariaLabel:o,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:o}),f.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),f.bind("isEnabled").toMany(d,"isEnabled",(...h)=>h.some(m=>m)),f.buttonView.bind("label").to(u,"value",c,"value",(h,m)=>{const g=m?"paragraph":h;return typeof g=="boolean"||!a[g]?r:a[g]}),f.buttonView.bind("ariaLabel").to(u,"value",c,"value",(h,m)=>{const g=m?"paragraph":h;return typeof g=="boolean"||!a[g]?o:`${a[g]}, ${o}`}),this.listenTo(f,"execute",h=>{const{commandName:m,commandValue:g}=h.source;e.execute(m,g?{value:g}:void 0),e.editing.view.focus()}),f}),e.ui.componentFactory.add("menuBar:heading",s=>{const a=new la(s),l=e.commands.get("heading"),u=e.commands.get("paragraph"),c=[l],d=new Zm(s);a.set({class:"ck-heading-dropdown"}),d.set({ariaLabel:n("Heading"),role:"menu"}),a.buttonView.set({label:n("Heading")}),a.panelView.children.add(d);for(const f of i){const h=new yg(s,a),m=new Wi(s);h.children.add(m),d.items.add(h),m.set({isToggleable:!0,label:f.title,role:"menuitemradio",class:f.class}),m.delegate("execute").to(a),m.on("execute",()=>{const g=f.model==="paragraph"?"paragraph":"heading";e.execute(g,{value:f.model}),e.editing.view.focus()}),f.model==="paragraph"?(m.bind("isOn").to(u,"value"),c.push(u)):m.bind("isOn").to(l,"value",g=>g===f.model)}return a.bind("isEnabled").toMany(c,"isEnabled",(...f)=>f.some(h=>h)),a})}}class HFe extends xe{static get requires(){return[FFe,zFe]}static get pluginName(){return"Heading"}static get isOfficialPlugin(){return!0}}var oE={},sE={},aE={},kF;function UFe(){return kF||(kF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){if(!n||typeof n!="object")return!1;const i=Object.getPrototypeOf(n);return i===null||i===Object.prototype||Object.getPrototypeOf(i)===null?Object.prototype.toString.call(n)==="[object Object]":!1}t.isPlainObject=e})(aE)),aE}var lE={},TF;function WFe(){return TF||(TF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return Object.getOwnPropertySymbols(n).filter(i=>Object.prototype.propertyIsEnumerable.call(n,i))}t.getSymbols=e})(lE)),lE}var uE={},EF;function qFe(){return EF||(EF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}t.getTag=e})(uE)),uE}var cE={},xF;function jFe(){return xF||(xF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e="[object RegExp]",n="[object String]",i="[object Number]",r="[object Boolean]",o="[object Arguments]",s="[object Symbol]",a="[object Date]",l="[object Map]",u="[object Set]",c="[object Array]",d="[object Function]",f="[object ArrayBuffer]",h="[object Object]",m="[object Error]",g="[object DataView]",v="[object Uint8Array]",p="[object Uint8ClampedArray]",b="[object Uint16Array]",y="[object Uint32Array]",_="[object BigUint64Array]",C="[object Int8Array]",S="[object Int16Array]",k="[object Int32Array]",T="[object BigInt64Array]",E="[object Float32Array]",x="[object Float64Array]";t.argumentsTag=o,t.arrayBufferTag=f,t.arrayTag=c,t.bigInt64ArrayTag=T,t.bigUint64ArrayTag=_,t.booleanTag=r,t.dataViewTag=g,t.dateTag=a,t.errorTag=m,t.float32ArrayTag=E,t.float64ArrayTag=x,t.functionTag=d,t.int16ArrayTag=S,t.int32ArrayTag=k,t.int8ArrayTag=C,t.mapTag=l,t.numberTag=i,t.objectTag=h,t.regexpTag=e,t.setTag=u,t.stringTag=n,t.symbolTag=s,t.uint16ArrayTag=b,t.uint32ArrayTag=y,t.uint8ArrayTag=v,t.uint8ClampedArrayTag=p})(cE)),cE}var dE={},AF;function KFe(){return AF||(AF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(n,i){return n===i||Number.isNaN(n)&&Number.isNaN(i)}t.eq=e})(dE)),dE}var PF;function GFe(){return PF||(PF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=UFe(),n=WFe(),i=qFe(),r=jFe(),o=KFe();function s(u,c,d){return a(u,c,void 0,void 0,void 0,void 0,d)}function a(u,c,d,f,h,m,g){const v=g(u,c,d,f,h,m);if(v!==void 0)return v;if(typeof u==typeof c)switch(typeof u){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return u===c;case"number":return u===c||Object.is(u,c);case"function":return u===c;case"object":return l(u,c,m,g)}return l(u,c,m,g)}function l(u,c,d,f){if(Object.is(u,c))return!0;let h=i.getTag(u),m=i.getTag(c);if(h===r.argumentsTag&&(h=r.objectTag),m===r.argumentsTag&&(m=r.objectTag),h!==m)return!1;switch(h){case r.stringTag:return u.toString()===c.toString();case r.numberTag:{const p=u.valueOf(),b=c.valueOf();return o.eq(p,b)}case r.booleanTag:case r.dateTag:case r.symbolTag:return Object.is(u.valueOf(),c.valueOf());case r.regexpTag:return u.source===c.source&&u.flags===c.flags;case r.functionTag:return u===c}d=d??new Map;const g=d.get(u),v=d.get(c);if(g!=null&&v!=null)return g===c;d.set(u,c),d.set(c,u);try{switch(h){case r.mapTag:{if(u.size!==c.size)return!1;for(const[p,b]of u.entries())if(!c.has(p)||!a(b,c.get(p),p,u,c,d,f))return!1;return!0}case r.setTag:{if(u.size!==c.size)return!1;const p=Array.from(u.values()),b=Array.from(c.values());for(let y=0;y<p.length;y++){const _=p[y],C=b.findIndex(S=>a(_,S,void 0,u,c,d,f));if(C===-1)return!1;b.splice(C,1)}return!0}case r.arrayTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:case r.bigUint64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.bigInt64ArrayTag:case r.float32ArrayTag:case r.float64ArrayTag:{if(typeof Buffer<"u"&&Buffer.isBuffer(u)!==Buffer.isBuffer(c)||u.length!==c.length)return!1;for(let p=0;p<u.length;p++)if(!a(u[p],c[p],p,u,c,d,f))return!1;return!0}case r.arrayBufferTag:return u.byteLength!==c.byteLength?!1:l(new Uint8Array(u),new Uint8Array(c),d,f);case r.dataViewTag:return u.byteLength!==c.byteLength||u.byteOffset!==c.byteOffset?!1:l(new Uint8Array(u),new Uint8Array(c),d,f);case r.errorTag:return u.name===c.name&&u.message===c.message;case r.objectTag:{if(!(l(u.constructor,c.constructor,d,f)||e.isPlainObject(u)&&e.isPlainObject(c)))return!1;const b=[...Object.keys(u),...n.getSymbols(u)],y=[...Object.keys(c),...n.getSymbols(c)];if(b.length!==y.length)return!1;for(let _=0;_<b.length;_++){const C=b[_],S=u[C];if(!Object.hasOwn(c,C))return!1;const k=c[C];if(!a(S,k,C,u,c,d,f))return!1}return!0}default:return!1}}finally{d.delete(u),d.delete(c)}}t.isEqualWith=s})(sE)),sE}var fE={},IF;function YFe(){return IF||(IF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});function e(){}t.noop=e})(fE)),fE}var RF;function XFe(){return RF||(RF=1,(function(t){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const e=GFe(),n=YFe();function i(r,o){return e.isEqualWith(r,o,n.noop)}t.isEqual=i})(oE)),oE}var hE,MF;function JFe(){return MF||(MF=1,hE=XFe().isEqual),hE}var ZFe=JFe();const QFe=wl(ZFe);function e6e(t){return t.createContainerElement("span",{class:"image-inline"},t.createEmptyElement("img"))}function OF(t){return t.createContainerElement("figure",{class:"image"},[t.createEmptyElement("img"),t.createSlot("children")])}function gX(t,e){const n=t.plugins.get("ImageUtils"),i=t.plugins.has("ImageInlineEditing")&&t.plugins.has("ImageBlockEditing");return o=>n.isInlineImageView(o)?i&&(o.getStyle("display")=="block"||o.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==e?null:r(o):null;function r(o){const s={name:!0};return o.hasAttribute("src")&&(s.attributes=["src"]),s}}function SO(t,e){const n=Mi(e.getSelectedBlocks());return!n||t.isObject(n)||n.isEmpty&&n.name!="listItem"?"imageBlock":"imageInline"}function w1(t){return t&&t.endsWith("px")?parseInt(t):null}function _1(t){const e=w1(t.getStyle("width")),n=w1(t.getStyle("height"));return!!(e&&n)}const t6e=/^(image|image-inline)$/;class kr extends xe{_domEmitter=new(zo());static get pluginName(){return"ImageUtils"}static get isOfficialPlugin(){return!0}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},n=null,i=null,r={}){const o=this.editor,s=o.model,a=s.document.selection,l=pX(o,n||a,i);e={...Object.fromEntries(a.getAttributes()),...e};for(const u in e)s.schema.checkAttribute(l,u)||delete e[u];return s.change(u=>{const{setImageSizes:c=!0}=r,d=u.createElement(l,e);return s.insertObject(d,n,null,{setSelection:"on",findOptimalPosition:!n&&l!="imageInline"?"auto":void 0}),d.parent?(c&&this.setImageNaturalSizeAttributes(d),d):null})}setImageNaturalSizeAttributes(e){const n=e.getAttribute("src");n&&(e.getAttribute("width")||e.getAttribute("height")||this.editor.model.change(i=>{const r=new Qe.window.Image;this._domEmitter.listenTo(r,"load",()=>{!e.getAttribute("width")&&!e.getAttribute("height")&&this.editor.model.enqueueChange(i.batch,o=>{o.setAttribute("width",r.naturalWidth,e),o.setAttribute("height",r.naturalHeight,e)}),this._domEmitter.stopListening(r,"load")}),r.src=n}))}getClosestSelectedImageWidget(e){const n=e.getFirstPosition();if(!n)return null;const i=e.getSelectedElement();if(i&&this.isImageWidget(i))return i;let r=n.parent;for(;r;){if(r.is("element")&&this.isImageWidget(r))return r;r=r.parent}return null}getClosestSelectedImageElement(e){const n=e.getSelectedElement();return this.isImage(n)?n:e.getFirstPosition().findAncestor("imageBlock")}getImageWidgetFromImageView(e){return e.findAncestor({classes:t6e})}isImageAllowed(){const n=this.editor.model.document.selection;return n6e(this.editor,n)&&i6e(n)}toImageWidget(e,n,i){return n.setCustomProperty("image",!0,e),vO(e,n,{label:()=>{const s=this.findViewImgElement(e).getAttribute("alt");return s?`${s} ${i}`:i}})}isImageWidget(e){return!!e.getCustomProperty("image")&&ci(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const n=this.editor.editing.view;for(const{item:i}of n.createRangeIn(e))if(this.isInlineImageView(i))return i}destroy(){return this._domEmitter.stopListening(),super.destroy()}}function n6e(t,e){if(pX(t,e,null)=="imageBlock"){const i=r6e(e,t.model);if(t.model.schema.checkChild(i,"imageBlock"))return!0}else if(t.model.schema.checkChild(e.focus,"imageInline"))return!0;return!1}function i6e(t){return[...t.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}function r6e(t,e){const i=iX(t,e).start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}function pX(t,e,n){const i=t.model.schema,r=t.config.get("image.insert.type");return t.plugins.has("ImageBlockEditing")?t.plugins.has("ImageInlineEditing")?n||(r==="inline"?"imageInline":r!=="auto"?"imageBlock":e.is("selection")?SO(i,e):i.checkChild(e,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class o6e extends Ht{refresh(){const i=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!i,this.isEnabled&&i.hasAttribute("alt")?this.value=i.getAttribute("alt"):this.value=!1}execute(e){const n=this.editor,i=n.plugins.get("ImageUtils"),r=n.model,o=i.getClosestSelectedImageElement(r.document.selection);r.change(s=>{s.setAttribute("alt",e.newValue,o)})}}class s6e extends xe{static get requires(){return[kr]}static get pluginName(){return"ImageTextAlternativeEditing"}static get isOfficialPlugin(){return!0}init(){this.editor.commands.add("imageTextAlternative",new o6e(this.editor))}}class a6e extends ut{focusTracker;keystrokes;labeledInput;backButtonView;saveButtonView;children;_focusables;_focusCycler;constructor(e){super(e),this.focusTracker=new wi,this.keystrokes=new Qi,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new Xs(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new qr,this.keystrokes.set("Esc",(n,i)=>{this.fire("cancel"),i()}),this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),vg({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(n=>{this._focusables.add(n),this.focusTracker.add(n.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({class:"ck-button-back",label:e("Back"),icon:pg,tooltip:!0}),n.delegate("execute").to(this,"cancel"),n}_createSaveButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),n}_createHeaderView(){const e=this.locale.t,n=new qf(this.locale,{label:e("Text Alternative")});return n.children.add(this.backButtonView,0),n}_createLabeledInputView(){const e=this.locale.t,n=new Go(this.locale,tu);return n.label=e("Text alternative"),n.class="ck-labeled-field-view_full-width",n}}function l6e(t){const e=t.plugins.get("ContextualBalloon");if(t.plugins.get("ImageUtils").getClosestSelectedImageWidget(t.editing.view.document.selection)){const i=kO(t);e.updatePosition(i)}}function kO(t){const e=t.editing.view,n=Ki.defaultPositions,i=t.plugins.get("ImageUtils");return{target:e.domConverter.mapViewToDom(i.getClosestSelectedImageWidget(e.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class u6e extends xe{_balloon;_form;static get requires(){return[bu]}static get pluginName(){return"ImageTextAlternativeUI"}static get isOfficialPlugin(){return!0}init(){this._createButton()}destroy(){super.destroy(),this._form&&this._form.destroy()}_createButton(){const e=this.editor,n=e.t;e.ui.componentFactory.add("imageTextAlternative",i=>{const r=e.commands.get("imageTextAlternative"),o=new wt(i);return o.set({label:n("Change image text alternative"),icon:TNe,tooltip:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",s=>!!s),this.listenTo(o,"execute",()=>{this._showForm()}),o})}_createForm(){const e=this.editor,i=e.editing.view.document,r=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(cb(a6e))(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this.listenTo(e.ui,"update",()=>{r.getClosestSelectedImageWidget(i.selection)?this._isVisible&&l6e(e):this._hideForm(!0)}),Wf({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;this._form||this._createForm();const e=this.editor,n=e.commands.get("imageTextAlternative"),i=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:kO(e)}),i.fieldView.value=i.fieldView.element.value=n.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}class vX extends xe{static get requires(){return[s6e,u6e]}static get pluginName(){return"ImageTextAlternative"}static get isOfficialPlugin(){return!0}}function c6e(t){const e=(n,i,r)=>{if(!r.consumable.test(i.viewItem,{name:!0,classes:"image"}))return;const o=t.findViewImgElement(i.viewItem);if(!o||!r.consumable.test(o,{name:!0}))return;r.consumable.consume(i.viewItem,{name:!0,classes:"image"});const s=r.convertItem(o,i.modelCursor),a=Mi(s.modelRange.getItems());if(!a){r.consumable.revert(i.viewItem,{name:!0,classes:"image"});return}r.convertChildren(i.viewItem,a),r.updateConversionResult(a,i)};return n=>{n.on("element:figure",e)}}function d6e(t){const e=["srcset","media","type","sizes"],n=(i,r,o)=>{const s=r.viewItem;if(!o.consumable.test(s,{name:!0}))return;const a=new Map;for(const c of s.getChildren())if(c.is("element","source")){const d={};for(const f of e)c.hasAttribute(f)&&o.consumable.test(c,{attributes:f})&&(d[f]=c.getAttribute(f));Object.keys(d).length&&a.set(c,d)}const l=t.findViewImgElement(s);if(!l)return;let u=r.modelCursor.parent;if(!u.is("element","imageBlock")){const c=o.convertItem(l,r.modelCursor);r.modelRange=c.modelRange,r.modelCursor=c.modelCursor,u=Mi(c.modelRange.getItems())}o.consumable.consume(s,{name:!0});for(const[c,d]of a)o.consumable.consume(c,{attributes:Object.keys(d)});a.size&&o.writer.setAttribute("sources",Array.from(a.values()),u),o.convertChildren(s,u)};return i=>{i.on("element:picture",n)}}function bX(t,e){const n=(i,r,o)=>{if(!o.consumable.consume(r.item,i.name))return;const s=o.writer,a=o.mapper.toViewElement(r.item),l=t.findViewImgElement(a);r.attributeNewValue===null?(s.removeAttribute("srcset",l),s.removeAttribute("sizes",l)):r.attributeNewValue&&(s.setAttribute("srcset",r.attributeNewValue,l),s.setAttribute("sizes","100vw",l))};return i=>{i.on(`attribute:srcset:${e}`,n)}}function f6e(t){const e=(n,i,r)=>{if(!r.consumable.consume(i.item,n.name))return;const o=r.writer,s=r.mapper.toViewElement(i.item),a=t.findViewImgElement(s),l=i.attributeNewValue;if(l&&l.length){const u=[];let c=a.parent;for(;c&&c.is("attributeElement");){const h=c.parent;o.unwrap(o.createRangeOn(a),c),u.unshift(c),c=h}const d=a.parent.is("element","picture"),f=d?a.parent:o.createContainerElement("picture",null);d||o.insert(o.createPositionBefore(a),f),o.remove(o.createRangeIn(f)),o.insert(o.createPositionAt(f,"end"),l.map(h=>o.createEmptyElement("source",h))),o.move(o.createRangeOn(a),o.createPositionAt(f,"end"));for(const h of u)o.wrap(o.createRangeOn(f),h)}else if(a.parent.is("element","picture")){const u=a.parent;o.move(o.createRangeOn(a),o.createPositionBefore(u)),o.remove(u)}};return n=>{n.on("attribute:sources:imageBlock",e),n.on("attribute:sources:imageInline",e)}}function C1(t,e,n){const i=(r,o,s)=>{if(!s.consumable.consume(o.item,r.name))return;const a=s.writer,l=s.mapper.toViewElement(o.item),u=t.findViewImgElement(l);a.setAttribute(o.attributeKey,o.attributeNewValue||"",u)};return r=>{r.on(`attribute:${n}:${e}`,i)}}class TO extends _l{observe(e){this.listenTo(e,"load",(n,i)=>{const r=i.target;this.checkShouldIgnoreEventFromTarget(r)||r.tagName=="IMG"&&this._fireEvents(i)},{useCapture:!0})}stopObserving(e){this.stopListening(e)}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class h6e extends Ht{constructor(e){super(e);const n=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||n==="block"&&hn("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||n==="inline"&&hn("image-inline-plugin-required")}refresh(){const e=this.editor.plugins.get("ImageUtils");this.isEnabled=e.isImageAllowed()}execute(e){const n=li(e.source),i=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(i.getAttributes());n.forEach((s,a)=>{const l=i.getSelectedElement();if(typeof s=="string"&&(s={src:s}),a&&l&&r.isImage(l)){const u=this.editor.model.createPositionAfter(l);r.insertImage({...s,...o},u,e.imageType)}else e.breakBlock?r.insertImage({...s,...o},i.getFirstPosition(),e.imageType):r.insertImage({...s,...o},null,e.imageType)})}}class m6e extends Ht{constructor(e){super(e),this.decorate("cleanupImage")}refresh(){const n=this.editor.plugins.get("ImageUtils"),i=this.editor.model.document.selection.getSelectedElement();this.isEnabled=n.isImage(i),this.value=this.isEnabled?i.getAttribute("src"):null}execute(e){const n=this.editor.model.document.selection.getSelectedElement(),i=this.editor.plugins.get("ImageUtils");this.editor.model.change(r=>{r.setAttribute("src",e.source,n),this.cleanupImage(r,n),i.setImageNaturalSizeAttributes(n)})}cleanupImage(e,n){e.removeAttribute("srcset",n),e.removeAttribute("sizes",n),e.removeAttribute("sources",n),e.removeAttribute("width",n),e.removeAttribute("height",n),e.removeAttribute("alt",n)}}class EO extends xe{static get requires(){return[kr]}static get pluginName(){return"ImageEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.conversion;e.editing.view.addObserver(TO),n.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:"srcset"});const i=new h6e(e),r=new m6e(e);e.commands.add("insertImage",i),e.commands.add("replaceImageSource",r),e.commands.add("imageInsert",i)}}class yX extends xe{static get requires(){return[kr]}static get pluginName(){return"ImageSizeAttributes"}static get isOfficialPlugin(){return!0}afterInit(){this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline")}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["width","height"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["width","height"]})}_registerConverters(e){const n=this.editor,i=n.plugins.get("ImageUtils"),r=e==="imageBlock"?"figure":"img";n.conversion.for("upcast").attributeToAttribute({view:{name:r,styles:{width:/.+/}},model:{key:"width",value:s=>_1(s)?w1(s.getStyle("width")):null}}).attributeToAttribute({view:{name:r,key:"width"},model:"width"}).attributeToAttribute({view:{name:r,styles:{height:/.+/}},model:{key:"height",value:s=>_1(s)?w1(s.getStyle("height")):null}}).attributeToAttribute({view:{name:r,key:"height"},model:"height"}),n.conversion.for("editingDowncast").add(s=>{o(s,"width","width",!0,!0),o(s,"height","height",!0,!0)}),n.conversion.for("dataDowncast").add(s=>{o(s,"width","width",!1),o(s,"height","height",!1)}),n.conversion.for("upcast").add(s=>{s.on("element:img",(a,l,u)=>{const c=l.viewItem.getAttribute("width"),d=l.viewItem.getAttribute("height");c&&d&&u.consumable.consume(l.viewItem,{styles:["aspect-ratio"]})})});function o(s,a,l,u,c=!1){s.on(`attribute:${a}:${e}`,(d,f,h)=>{if(!h.consumable.consume(f.item,d.name))return;const m=h.writer,g=h.mapper.toViewElement(f.item),v=i.findViewImgElement(g);f.attributeNewValue!==null?m.setAttribute(l,f.attributeNewValue,v):m.removeAttribute(l,v);const p=f.item.getAttribute("width"),b=f.item.getAttribute("height"),y=p&&b;if(y&&c&&m.setAttribute("loading","lazy",v),f.item.hasAttribute("sources"))return;const _=f.item.hasAttribute("resizedWidth");e==="imageInline"&&!_&&!u||y&&m.setStyle("aspect-ratio",`${p}/${b}`,v)})}}}class wX extends Ht{_modelElementName;constructor(e,n){super(e),this._modelElementName=n}refresh(){const n=this.editor.plugins.get("ImageUtils"),i=n.getClosestSelectedImageElement(this.editor.model.document.selection);this._modelElementName==="imageBlock"?this.isEnabled=n.isInlineImage(i):this.isEnabled=n.isBlockImage(i)}execute(e={}){const n=this.editor,i=this.editor.model,r=n.plugins.get("ImageUtils"),o=r.getClosestSelectedImageElement(i.document.selection),s=Object.fromEntries(o.getAttributes());return!s.src&&!s.uploadId?null:i.change(a=>{const{setImageSizes:l=!0}=e,u=Array.from(i.markers).filter(f=>f.getRange().containsItem(o)),c=r.insertImage(s,i.createSelection(o,"on"),this._modelElementName,{setImageSizes:l});if(!c)return null;const d=a.createRangeOn(c);for(const f of u){const h=f.getRange(),m=h.root.rootName!="$graveyard"?h.getJoined(d,!0):d;a.updateMarker(f,{range:m})}return{oldElement:o,newElement:c}})}}class _X extends xe{static get requires(){return[kr]}static get pluginName(){return"ImagePlaceholder"}static get isOfficialPlugin(){return!0}afterInit(){this._setupSchema(),this._setupConversion(),this._setupLoadListener()}_setupSchema(){const e=this.editor.model.schema;e.isRegistered("imageBlock")&&e.extend("imageBlock",{allowAttributes:["placeholder"]}),e.isRegistered("imageInline")&&e.extend("imageInline",{allowAttributes:["placeholder"]})}_setupConversion(){const e=this.editor,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("editingDowncast").add(r=>{r.on("attribute:placeholder",(o,s,a)=>{if(!a.consumable.test(s.item,o.name)||!s.item.is("element","imageBlock")&&!s.item.is("element","imageInline"))return;a.consumable.consume(s.item,o.name);const l=a.writer,u=a.mapper.toViewElement(s.item),c=i.findViewImgElement(u);s.attributeNewValue?(l.addClass("image_placeholder",c),l.setStyle("background-image",`url(${s.attributeNewValue})`,c),l.setCustomProperty("editingPipeline:doNotReuseOnce",!0,c)):(l.removeClass("image_placeholder",c),l.removeStyle("background-image",c))})})}_setupLoadListener(){const e=this.editor,n=e.model,i=e.editing,r=i.view,o=e.plugins.get("ImageUtils");r.addObserver(TO),this.listenTo(r.document,"imageLoaded",(s,a)=>{const l=r.domConverter.mapDomToView(a.target);if(!l)return;const u=o.getImageWidgetFromImageView(l);if(!u)return;const c=i.mapper.toModelElement(u);!c||!c.hasAttribute("placeholder")||n.enqueueChange({isUndoable:!1},d=>{d.removeAttribute("placeholder",c)})})}}class CX extends xe{static get requires(){return[EO,yX,kr,_X,fs]}static get pluginName(){return"ImageBlockEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new wX(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,n=e.t,i=e.conversion,r=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToStructure({model:"imageBlock",view:(o,{writer:s})=>OF(s)}),i.for("editingDowncast").elementToStructure({model:"imageBlock",view:(o,{writer:s})=>r.toImageWidget(OF(s),s,n("image widget"))}),i.for("downcast").add(C1(r,"imageBlock","src")).add(C1(r,"imageBlock","alt")).add(bX(r,"imageBlock")),i.for("upcast").elementToElement({view:gX(e,"imageBlock"),model:(o,{writer:s})=>s.createElement("imageBlock",o.hasAttribute("src")?{src:o.getAttribute("src")}:void 0)}).add(c6e(r))}_setupClipboardIntegration(){const e=this.editor,n=e.model,i=e.editing.view,r=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline");this.listenTo(o,"inputTransformation",(s,a)=>{const l=Array.from(a.content.getChildren());let u;if(!l.every(r.isInlineImageView))return;a.targetRanges?u=e.editing.mapper.toModelRange(a.targetRanges[0]):u=n.document.selection.getFirstRange();const c=n.createSelection(u);if(SO(n.schema,c)==="imageBlock"){const d=new Pu(i.document),f=l.map(h=>d.createElement("figure",{class:"image"},h));a.content=d.createDocumentFragment(f)}}),this.listenTo(o,"contentInsertion",(s,a)=>{a.method==="paste"&&n.change(l=>{const u=l.createRangeIn(a.content);for(const c of u.getItems())c.is("element","imageBlock")&&r.setImageNaturalSizeAttributes(c)})})}}class g6e extends ut{focusTracker;keystrokes;_focusables;_focusCycler;children;constructor(e,n=[]){super(e),this.focusTracker=new wi,this.keystrokes=new Qi,this._focusables=new qr,this.children=this.createCollection(),this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});for(const i of n)this.children.add(i),this._focusables.add(i),i instanceof L3e&&this._focusables.addMany(i.children);this.setTemplate({tag:"form",attributes:{class:["ck","ck-image-insert-form"],tabindex:-1},children:this.children})}render(){super.render(),vg({view:this});for(const n of this._focusables)this.focusTracker.add(n.element);this.keystrokes.listenTo(this.element);const e=n=>n.stopPropagation();this.keystrokes.set("arrowright",e),this.keystrokes.set("arrowleft",e),this.keystrokes.set("arrowup",e),this.keystrokes.set("arrowdown",e)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}}class SX extends xe{static get pluginName(){return"ImageInsertUI"}static get isOfficialPlugin(){return!0}static get requires(){return[kr]}dropdownView;_integrations=new Map;constructor(e){super(e),e.config.define("image.insert.integrations",["upload","assetManager","url"])}init(){const e=this.editor,n=e.model.document.selection,i=e.plugins.get("ImageUtils");this.set("isImageSelected",!1),this.listenTo(e.model.document,"change",()=>{this.isImageSelected=i.isImage(n.getSelectedElement())});const r=s=>this._createToolbarComponent(s),o=s=>this._createMenuBarComponent(s);e.ui.componentFactory.add("insertImage",r),e.ui.componentFactory.add("imageInsert",r),e.ui.componentFactory.add("menuBar:insertImage",o)}registerIntegration({name:e,observable:n,buttonViewCreator:i,formViewCreator:r,menuBarButtonViewCreator:o,requiresForm:s=!1,override:a=!1}){this._integrations.has(e)&&!a&&hn("image-insert-integration-exists",{name:e}),this._integrations.set(e,{observable:n,buttonViewCreator:i,menuBarButtonViewCreator:o,formViewCreator:r,requiresForm:s})}_createToolbarComponent(e){const n=this.editor,i=e.t,r=this._prepareIntegrations();if(!r.length)return null;let o;const s=r[0];if(r.length==1){if(!s.requiresForm)return s.buttonViewCreator(!0);o=s.buttonViewCreator(!0)}else{const u=s.buttonViewCreator(!1);o=new _S(e,u),o.tooltip=!0,o.bind("label").to(this,"isImageSelected",c=>i(c?"Replace image":"Insert image"))}const a=this.dropdownView=Ro(e,o),l=r.map(({observable:u})=>typeof u=="function"?u():u);return a.bind("isEnabled").toMany(l,"isEnabled",(...u)=>u.some(c=>c)),a.once("change:isOpen",()=>{const u=r.flatMap(({formViewCreator:d})=>d(r.length==1)),c=new g6e(n.locale,u);a.panelView.children.add(c)}),a}_createMenuBarComponent(e){const n=e.t,i=this._prepareIntegrations();if(!i.length)return null;const r=i.flatMap(({menuBarButtonViewCreator:a})=>a(i.length==1)),o=new la(e),s=new Zm(e);o.panelView.children.add(s),o.buttonView.set({icon:GDe,label:n("Image")});for(const a of r){const l=new yg(e,o);l.children.add(a),s.items.add(l),a.delegate("execute").to(o)}return o}_prepareIntegrations(){const n=this.editor.config.get("image.insert.integrations"),i=[];if(!n.length)return hn("image-insert-integrations-not-specified"),i;for(const r of n){if(!this._integrations.has(r)){["upload","assetManager","url"].includes(r)||hn("image-insert-unknown-integration",{item:r});continue}i.push(this._integrations.get(r))}return i.length||hn("image-insert-integrations-not-registered"),i}}class p6e extends xe{static get requires(){return[CX,h0,vX,SX]}static get pluginName(){return"ImageBlock"}static get isOfficialPlugin(){return!0}}class v6e extends xe{static get requires(){return[EO,yX,kr,_X,fs]}static get pluginName(){return"ImageInlineEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.model.schema.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"],disallowIn:["caption"]}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new wX(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,n=e.t,i=e.conversion,r=e.plugins.get("ImageUtils");i.for("dataDowncast").elementToElement({model:"imageInline",view:(o,{writer:s})=>s.createEmptyElement("img")}),i.for("editingDowncast").elementToStructure({model:"imageInline",view:(o,{writer:s})=>r.toImageWidget(e6e(s),s,n("image widget"))}),i.for("downcast").add(C1(r,"imageInline","src")).add(C1(r,"imageInline","alt")).add(bX(r,"imageInline")),i.for("upcast").elementToElement({view:gX(e,"imageInline"),model:(o,{writer:s})=>s.createElement("imageInline",o.hasAttribute("src")?{src:o.getAttribute("src")}:void 0)})}_setupClipboardIntegration(){const e=this.editor,n=e.model,i=e.editing.view,r=e.plugins.get("ImageUtils"),o=e.plugins.get("ClipboardPipeline");this.listenTo(o,"inputTransformation",(s,a)=>{const l=Array.from(a.content.getChildren());let u;if(!l.every(r.isBlockImageView))return;a.targetRanges?u=e.editing.mapper.toModelRange(a.targetRanges[0]):u=n.document.selection.getFirstRange();const c=n.createSelection(u);if(SO(n.schema,c)==="imageInline"){const d=new Pu(i.document),f=l.map(h=>h.childCount===1?(Array.from(h.getAttributes()).forEach(m=>d.setAttribute(...m,r.findViewImgElement(h))),h.getChild(0)):h);a.content=d.createDocumentFragment(f)}}),this.listenTo(o,"contentInsertion",(s,a)=>{a.method==="paste"&&n.change(l=>{const u=l.createRangeIn(a.content);for(const c of u.getItems())c.is("element","imageInline")&&r.setImageNaturalSizeAttributes(c)})})}}class b6e extends xe{static get requires(){return[v6e,h0,vX,SX]}static get pluginName(){return"ImageInline"}static get isOfficialPlugin(){return!0}}let y6e=class extends xe{static get requires(){return[p6e,b6e]}static get pluginName(){return"Image"}static get isOfficialPlugin(){return!0}};class kX extends xe{static get pluginName(){return"ImageCaptionUtils"}static get isOfficialPlugin(){return!0}static get requires(){return[kr]}getCaptionFromImageModelElement(e){for(const n of e.getChildren())if(n&&n.is("element","caption"))return n;return null}getCaptionFromModelSelection(e){const n=this.editor.plugins.get("ImageUtils"),i=e.getFirstPosition().findAncestor("caption");return i&&n.isBlockImage(i.parent)?i:null}matchImageCaptionViewElement(e){const n=this.editor.plugins.get("ImageUtils");return e.name=="figcaption"&&n.isBlockImageView(e.parent)?{name:!0}:null}}class w6e extends Ht{refresh(){const e=this.editor,n=e.plugins.get("ImageCaptionUtils"),i=e.plugins.get("ImageUtils");if(!e.plugins.has(CX)){this.isEnabled=!1,this.value=!1;return}const r=e.model.document.selection,o=r.getSelectedElement();if(!o){const s=n.getCaptionFromModelSelection(r);this.isEnabled=!!s,this.value=!!s;return}this.isEnabled=i.isImage(o),this.isEnabled?this.value=!!n.getCaptionFromImageModelElement(o):this.value=!1}execute(e={}){const{focusCaptionOnShow:n}=e;this.editor.model.change(i=>{this.value?this._hideImageCaption(i):this._showImageCaption(i,n)})}_showImageCaption(e,n){const r=this.editor.model.document.selection,o=this.editor.plugins.get("ImageCaptionEditing"),s=this.editor.plugins.get("ImageUtils");let a=r.getSelectedElement();const l=o._getSavedCaption(a);s.isInlineImage(a)&&(this.editor.execute("imageTypeBlock"),a=r.getSelectedElement());const u=l||e.createElement("caption");e.append(u,a),n&&e.setSelection(u,"in")}_hideImageCaption(e){const n=this.editor,i=n.model.document.selection,r=n.plugins.get("ImageCaptionEditing"),o=n.plugins.get("ImageCaptionUtils");let s=i.getSelectedElement(),a;s?a=o.getCaptionFromImageModelElement(s):(a=o.getCaptionFromModelSelection(i),s=a.parent),r._saveCaption(s,a),e.setSelection(s,"on"),e.remove(a)}}class _6e extends xe{static get requires(){return[kr,kX]}static get pluginName(){return"ImageCaptionEditing"}static get isOfficialPlugin(){return!0}_savedCaptionsMap;constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,n=e.model.schema;n.isRegistered("caption")?n.extend("caption",{allowIn:"imageBlock"}):n.register("caption",{allowIn:"imageBlock",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleImageCaption",new w6e(this.editor)),this._setupConversion(),this._setupImageTypeCommandsIntegration(),this._registerCaptionReconversion()}_setupConversion(){const e=this.editor,n=e.editing.view,i=e.plugins.get("ImageUtils"),r=e.plugins.get("ImageCaptionUtils"),o=e.t;e.conversion.for("upcast").elementToElement({view:s=>r.matchImageCaptionViewElement(s),model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(s,{writer:a})=>i.isBlockImage(s.parent)?a.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(s,{writer:a})=>{if(!i.isBlockImage(s.parent))return null;const l=a.createEditableElement("figcaption");a.setCustomProperty("imageCaption",!0,l),l.placeholder=o("Enter image caption"),qM({view:n,element:l,keepOnFocus:!0});const u=s.parent.getAttribute("alt"),c=u?o("Caption for image: %0",[u]):o("Caption for the image");return bO(l,a,{label:c})}})}_setupImageTypeCommandsIntegration(){const e=this.editor,n=e.plugins.get("ImageUtils"),i=e.plugins.get("ImageCaptionUtils"),r=e.commands.get("imageTypeInline"),o=e.commands.get("imageTypeBlock"),s=a=>{if(!a.return)return;const{oldElement:l,newElement:u}=a.return;if(!l)return;if(n.isBlockImage(l)){const d=i.getCaptionFromImageModelElement(l);if(d){this._saveCaption(u,d);return}}const c=this._getSavedCaption(l);c&&this._saveCaption(u,c)};r&&this.listenTo(r,"execute",s,{priority:"low"}),o&&this.listenTo(o,"execute",s,{priority:"low"})}_getSavedCaption(e){const n=this._savedCaptionsMap.get(e);return n?zn.fromJSON(n):null}_saveCaption(e,n){this._savedCaptionsMap.set(e,n.toJSON())}_registerCaptionReconversion(){const e=this.editor,n=e.model,i=e.plugins.get("ImageUtils"),r=e.plugins.get("ImageCaptionUtils");n.document.on("change:data",()=>{const o=n.document.differ.getChanges();for(const s of o){if(s.attributeKey!=="alt")continue;const a=s.range.start.nodeAfter;if(i.isBlockImage(a)){const l=r.getCaptionFromImageModelElement(a);if(!l)return;e.editing.reconvertItem(l)}}})}}class C6e extends xe{static get requires(){return[kX]}static get pluginName(){return"ImageCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.editing.view,i=e.plugins.get("ImageCaptionUtils"),r=e.t;e.ui.componentFactory.add("toggleImageCaption",o=>{const s=e.commands.get("toggleImageCaption"),a=new wt(o);return a.set({icon:uY,tooltip:!0,isToggleable:!0}),a.bind("isOn","isEnabled").to(s,"value","isEnabled"),a.bind("label").to(s,"value",l=>r(l?"Toggle caption off":"Toggle caption on")),this.listenTo(a,"execute",()=>{e.execute("toggleImageCaption",{focusCaptionOnShow:!0});const l=i.getCaptionFromModelSelection(e.model.document.selection);if(l){const u=e.editing.mapper.toViewElement(l);n.scrollToTheSelection(),n.change(c=>{c.addClass("image__caption_highlighted",u)})}e.editing.view.focus()}),a})}}class S6e extends xe{static get requires(){return[_6e,C6e]}static get pluginName(){return"ImageCaption"}static get isOfficialPlugin(){return!0}}function TX(t){const e=t.map(n=>n.replace("+","\\+"));return new RegExp(`^image\\/(${e.join("|")})$`)}function k6e(t){return new Promise((e,n)=>{const i=t.getAttribute("src");fetch(i).then(r=>r.blob()).then(r=>{const o=EX(r,i),a=`image.${o.replace("image/","")}`,l=new File([r],a,{type:o});e(l)}).catch(r=>r&&r.name==="TypeError"?E6e(i).then(e).catch(n):n(r))})}function T6e(t,e){return!t.isInlineImageView(e)||!e.getAttribute("src")?!1:!!e.getAttribute("src").match(/^data:image\/\w+;base64,/g)||!!e.getAttribute("src").match(/^blob:/g)}function EX(t,e){return t.type?t.type:e.match(/data:(image\/\w+);base64/)?e.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}function E6e(t){return x6e(t).then(e=>{const n=EX(e,t),r=`image.${n.replace("image/","")}`;return new File([e],r,{type:n})})}function x6e(t){return new Promise((e,n)=>{const i=Qe.document.createElement("img");i.addEventListener("load",()=>{const r=Qe.document.createElement("canvas");r.width=i.width,r.height=i.height,r.getContext("2d").drawImage(i,0,0),r.toBlob(s=>s?e(s):n())}),i.addEventListener("error",()=>n()),i.src=t})}class A6e extends xe{static get pluginName(){return"ImageUploadUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.ui.componentFactory.add("uploadImage",()=>this._createToolbarButton()),e.ui.componentFactory.add("imageUpload",()=>this._createToolbarButton()),e.ui.componentFactory.add("menuBar:uploadImage",()=>this._createMenuBarButton("standalone")),e.plugins.has("ImageInsertUI")&&e.plugins.get("ImageInsertUI").registerIntegration({name:"upload",observable:()=>e.commands.get("uploadImage"),buttonViewCreator:()=>this._createToolbarButton(),formViewCreator:()=>this._createDropdownButton(),menuBarButtonViewCreator:n=>this._createMenuBarButton(n?"insertOnly":"insertNested")})}_createButton(e){const n=this.editor,i=n.locale,r=n.commands.get("uploadImage"),o=n.config.get("image.upload.types"),s=TX(o),a=new e(n.locale),l=i.t;return a.set({acceptedType:o.map(u=>`image/${u}`).join(","),allowMultipleFiles:!0,label:l("Upload from computer"),icon:YDe}),a.bind("isEnabled").to(r),a.on("done",(u,c)=>{const d=Array.from(c).filter(f=>s.test(f.type));d.length&&(n.execute("uploadImage",{file:d}),n.editing.view.focus())}),a}_createToolbarButton(){const e=this.editor.locale.t,n=this.editor.plugins.get("ImageInsertUI"),i=this.editor.commands.get("uploadImage"),r=this._createButton(OV);return r.tooltip=!0,r.bind("label").to(n,"isImageSelected",i,"isAccessAllowed",(o,s)=>e(s?o?"Replace image from computer":"Upload image from computer":"You have no image upload permissions.")),r}_createDropdownButton(){const e=this.editor.locale.t,n=this.editor.plugins.get("ImageInsertUI"),i=this._createButton(OV);return i.withText=!0,i.bind("label").to(n,"isImageSelected",r=>e(r?"Replace from computer":"Upload from computer")),i.on("execute",()=>{n.dropdownView.isOpen=!1}),i}_createMenuBarButton(e){const n=this.editor.locale.t,i=this._createButton(WY);switch(i.withText=!0,e){case"standalone":i.label=n("Image from computer");break;case"insertOnly":i.label=n("Image");break;case"insertNested":i.label=n("From computer");break}return i}}class P6e extends xe{static get pluginName(){return"ImageUploadProgress"}static get isOfficialPlugin(){return!0}placeholder;constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",this.uploadStatusChange),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",this.uploadStatusChange)}uploadStatusChange=(e,n,i)=>{const r=this.editor,o=n.item,s=o.getAttribute("uploadId");if(!i.consumable.consume(n.item,e.name))return;const a=r.plugins.get("ImageUtils"),l=r.plugins.get(eu),u=s?n.attributeNewValue:null,c=this.placeholder,d=r.editing.mapper.toViewElement(o),f=i.writer;if(u=="reading"){LF(d,f),DF(a,c,d,f);return}if(u=="uploading"){const h=l.loaders.get(s);LF(d,f),h?(NF(d,f),R6e(d,f,h,r.editing.view),N6e(a,d,f,h)):DF(a,c,d,f);return}u=="complete"&&l.loaders.get(s)&&O6e(d,f,r.editing.view),M6e(d,f),NF(d,f),I6e(d,f)}}function LF(t,e){t.hasClass("ck-appear")||e.addClass("ck-appear",t)}function I6e(t,e){e.removeClass("ck-appear",t)}function DF(t,e,n,i){n.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",n);const r=t.findViewImgElement(n);r.getAttribute("src")!==e&&i.setAttribute("src",e,r),xX(n,"placeholder")||i.insert(i.createPositionAfter(r),D6e(i))}function NF(t,e){t.hasClass("ck-image-upload-placeholder")&&e.removeClass("ck-image-upload-placeholder",t),AX(t,e,"placeholder")}function R6e(t,e,n,i){const r=L6e(e);e.insert(e.createPositionAt(t,"end"),r),n.on("change:uploadedPercent",(o,s,a)=>{i.change(l=>{l.setStyle("width",a+"%",r)})})}function M6e(t,e){AX(t,e,"progressBar")}function O6e(t,e,n){const i=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),i),setTimeout(()=>{n.change(r=>r.remove(r.createRangeOn(i)))},3e3)}function L6e(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});return t.setCustomProperty("progressBar",!0,e),e}function D6e(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});return t.setCustomProperty("placeholder",!0,e),e}function xX(t,e){for(const n of t.getChildren())if(n.getCustomProperty(e))return n}function AX(t,e,n){const i=xX(t,n);i&&e.remove(e.createRangeOn(i))}function N6e(t,e,n,i){if(i.data){const r=t.findViewImgElement(e);n.setAttribute("src",i.data,r)}}class B6e extends Ht{constructor(e){super(e),this.set("isAccessAllowed",!0)}refresh(){const e=this.editor,n=e.plugins.get("ImageUtils"),i=e.model.document.selection.getSelectedElement();this.isEnabled=n.isImageAllowed()||n.isImage(i)}execute(e){const n=li(e.file),i=this.editor.model.document.selection,r=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(i.getAttributes());n.forEach((s,a)=>{const l=i.getSelectedElement();if(a&&l&&r.isImage(l)){const u=this.editor.model.createPositionAfter(l);this._uploadImage(s,o,u)}else this._uploadImage(s,o)})}_uploadImage(e,n,i){const r=this.editor,s=r.plugins.get(eu).createLoader(e),a=r.plugins.get("ImageUtils");s&&a.insertImage({...n,uploadId:s.id},i)}}class V6e extends xe{static get requires(){return[eu,WV,fs,kr]}static get pluginName(){return"ImageUploadEditing"}static get isOfficialPlugin(){return!0}_uploadImageElements;_uploadedImages=new Map;constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,n=e.model.document,i=e.conversion,r=e.plugins.get(eu),o=e.plugins.get("ImageUtils"),s=e.plugins.get("ClipboardPipeline"),a=TX(e.config.get("image.upload.types")),l=new B6e(e);e.commands.add("uploadImage",l),e.commands.add("imageUpload",l),i.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}).add(u=>u.on("element:img",(c,d,f)=>{if(!f.consumable.test(d.viewItem,{attributes:["data-ck-upload-id"]}))return;const h=d.viewItem.getAttribute("data-ck-upload-id");if(!h)return;const[m]=Array.from(d.modelRange.getItems({shallow:!0})),g=r.loaders.get(h);m&&(f.writer.setAttribute("uploadId",h,m),f.consumable.consume(d.viewItem,{attributes:["data-ck-upload-id"]}),g&&g.data&&f.writer.setAttribute("uploadStatus",g.status,m))},{priority:"low"})),this.listenTo(e.editing.view.document,"clipboardInput",(u,c)=>{if(F6e(c.dataTransfer))return;const d=Array.from(c.dataTransfer.files).filter(h=>h?a.test(h.type):!1);if(!d.length)return;if(u.stop(),e.model.change(h=>{c.targetRanges&&h.setSelection(c.targetRanges.map(m=>e.editing.mapper.toModelRange(m))),e.execute("uploadImage",{file:d})}),!e.commands.get("uploadImage").isAccessAllowed){const h=e.plugins.get("Notification"),m=e.locale.t;h.showWarning(m("You have no image upload permissions."),{namespace:"image"})}}),this.listenTo(s,"inputTransformation",(u,c)=>{const d=Array.from(e.editing.view.createRangeIn(c.content)).map(h=>h.item).filter(h=>T6e(o,h)&&!h.getAttribute("uploadProcessed")).map(h=>({promise:k6e(h),imageElement:h}));if(!d.length)return;const f=new Pu(e.editing.view.document);for(const h of d){f.setAttribute("uploadProcessed",!0,h.imageElement);const m=r.createLoader(h.promise);m&&(f.setAttribute("src","",h.imageElement),f.setAttribute("uploadId",m.id,h.imageElement))}}),e.editing.view.document.on("dragover",(u,c)=>{c.preventDefault()}),n.on("change",()=>{const u=n.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),c=new Set;for(const d of u)if(d.type=="insert"&&d.name!="$text"){const f=d.position.nodeAfter,h=d.position.root.rootName=="$graveyard";for(const m of $6e(e,f)){const g=m.getAttribute("uploadId"),v=m.getAttribute("uploadStatus");if(!g||v=="complete")continue;const p=r.loaders.get(g);if(!p){!h&&this._uploadedImages.has(g)&&e.model.enqueueChange({isUndoable:!1},b=>{b.setAttribute("uploadStatus","complete",m),this.fire("uploadComplete",{data:this._uploadedImages.get(g),imageElement:m})});continue}h?c.has(g)||Array.from(this._uploadImageElements.get(g)).every(y=>y.root.rootName=="$graveyard")&&p.abort():(c.add(g),this._uploadImageElements.has(g)?this._uploadImageElements.get(g).add(m):this._uploadImageElements.set(g,new Set([m])),p.status=="idle"&&this._readAndUpload(p))}}}),this.on("uploadComplete",(u,{imageElement:c,data:d})=>{const f=d.urls?d.urls:d;this.editor.model.change(h=>{h.setAttribute("src",f.default,c),this._parseAndSetSrcsetAttributeOnImage(f,c,h),o.setImageNaturalSizeAttributes(c)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageBlock")),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]}),this._registerConverters("imageInline"))}_readAndUpload(e){const n=this.editor,i=n.model,r=n.locale.t,o=n.plugins.get(eu),s=n.plugins.get(WV),a=n.plugins.get("ImageUtils"),l=this._uploadImageElements;return i.enqueueChange({isUndoable:!1},c=>{const d=l.get(e.id);for(const f of d)c.setAttribute("uploadStatus","reading",f)}),e.read().then(()=>{const c=e.upload();n.ui&&n.ui.ariaLiveAnnouncer.announce(r("Uploading image"));for(const d of l.get(e.id)){if(vt.isSafari){const f=n.editing.mapper.toViewElement(d),h=a.findViewImgElement(f);n.editing.view.once("render",()=>{if(!h.parent)return;const m=n.editing.view.domConverter.mapViewToDom(h.parent);if(!m)return;const g=m.style.display;m.style.display="none",m._ckHack=m.offsetHeight,m.style.display=g})}i.enqueueChange({isUndoable:!1},f=>{f.setAttribute("uploadStatus","uploading",d)})}return c}).then(c=>{i.enqueueChange({isUndoable:!1},d=>{for(const f of l.get(e.id))d.setAttribute("uploadStatus","complete",f),this.fire("uploadComplete",{data:c,imageElement:f});n.ui&&n.ui.ariaLiveAnnouncer.announce(r("Image upload complete")),this._uploadedImages.set(e.id,c)}),u()}).catch(c=>{if(n.ui&&n.ui.ariaLiveAnnouncer.announce(r("Error during image upload")),e.status!=="error"&&e.status!=="aborted")throw c;e.status=="error"&&c&&s.showWarning(c,{title:r("Upload failed"),namespace:"upload"}),i.enqueueChange({isUndoable:!1},d=>{for(const f of l.get(e.id))f.root.rootName!=="$graveyard"&&d.remove(f)}),u()});function u(){i.enqueueChange({isUndoable:!1},c=>{for(const d of l.get(e.id))c.removeAttribute("uploadId",d),c.removeAttribute("uploadStatus",d);l.delete(e.id)}),o.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,n,i){let r=0;const o=Object.keys(e).filter(s=>{const a=parseInt(s,10);if(!isNaN(a))return r=Math.max(r,a),!0}).map(s=>`${e[s]} ${s}w`).join(", ");if(o!=""){const s={srcset:o};!n.hasAttribute("width")&&!n.hasAttribute("height")&&(s.width=r),i.setAttributes(s,n)}}_registerConverters(e){const{conversion:n,plugins:i}=this.editor,r=i.get(eu),o=i.get(kr);n.for("dataDowncast").add(s=>{s.on(`attribute:uploadId:${e}`,(a,l,u)=>{if(!u.consumable.test(l.item,a.name))return;const c=r.loaders.get(l.attributeNewValue);if(!c||!c.data)return null;const d=u.mapper.toViewElement(l.item),f=o.findViewImgElement(d);f&&(u.consumable.consume(l.item,a.name),u.writer.setAttribute("data-ck-upload-id",c.id,f))})})}}function F6e(t){return Array.from(t.types).includes("text/html")&&t.getData("text/html")!==""}function $6e(t,e){const n=t.plugins.get("ImageUtils");return Array.from(t.model.createRangeOn(e)).filter(i=>n.isImage(i.item)).map(i=>i.item)}class z6e extends xe{static get pluginName(){return"ImageUpload"}static get isOfficialPlugin(){return!0}static get requires(){return[V6e,A6e,P6e]}}class H6e extends Ht{refresh(){const e=this.editor,i=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!i,!i||!i.hasAttribute("resizedWidth")?this.value=null:this.value={width:i.getAttribute("resizedWidth"),height:null}}execute(e){const n=this.editor,i=n.model,r=n.plugins.get("ImageUtils"),o=r.getClosestSelectedImageElement(i.document.selection);this.value={width:e.width,height:null},o&&i.change(s=>{s.setAttribute("resizedWidth",e.width,o),s.removeAttribute("resizedHeight",o),r.setImageNaturalSizeAttributes(o)})}}class PX extends xe{static get requires(){return[kr]}static get pluginName(){return"ImageResizeEditing"}static get licenseFeatureCode(){return"IR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:custom",value:"custom",icon:"custom"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,n=new H6e(e);this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",n),e.commands.add("imageResize",n)}afterInit(){this._registerSchema()}_registerSchema(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&(e.extend("imageBlock",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0})),this.editor.plugins.has("ImageInlineEditing")&&(e.extend("imageInline",{allowAttributes:["resizedWidth","resizedHeight"]}),e.setAttributeProperties("resizedWidth",{isFormatting:!0}),e.setAttributeProperties("resizedHeight",{isFormatting:!0}))}_registerConverters(e){const n=this.editor,i=n.plugins.get("ImageUtils");n.conversion.for("downcast").add(r=>r.on(`attribute:resizedWidth:${e}`,(o,s,a)=>{if(!a.consumable.consume(s.item,o.name))return;const l=a.writer,u=a.mapper.toViewElement(s.item);s.attributeNewValue!==null?(l.setStyle("width",s.attributeNewValue,u),l.addClass("image_resized",u)):(l.removeStyle("width",u),l.removeClass("image_resized",u))})),n.conversion.for("dataDowncast").attributeToAttribute({model:{name:e,key:"resizedHeight"},view:r=>({key:"style",value:{height:r}})}),n.conversion.for("editingDowncast").add(r=>r.on(`attribute:resizedHeight:${e}`,(o,s,a)=>{if(!a.consumable.consume(s.item,o.name))return;const l=a.writer,u=a.mapper.toViewElement(s.item),c=e==="imageInline"?i.findViewImgElement(u):u;s.attributeNewValue!==null?l.setStyle("height",s.attributeNewValue,c):l.removeStyle("height",c)})),n.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{width:/.+/}},model:{key:"resizedWidth",value:r=>_1(r)?null:r.getStyle("width")}}),n.conversion.for("upcast").attributeToAttribute({view:{name:e==="imageBlock"?"figure":"img",styles:{height:/.+/}},model:{key:"resizedHeight",value:r=>_1(r)?null:r.getStyle("height")}}),n.conversion.for("upcast").add(r=>{r.on(`element:${e==="imageBlock"?"figure":"img"}`,(o,s,a)=>{a.consumable.consume(s.viewItem,{classes:["image_resized"]})})})}}const mE={small:aNe,medium:sNe,large:oNe,custom:iNe,original:rNe};class U6e extends xe{static get requires(){return[PX]}static get pluginName(){return"ImageResizeButtons"}static get isOfficialPlugin(){return!0}_resizeUnit;constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,n=e.config.get("image.resizeOptions"),i=e.commands.get("resizeImage");this.bind("isEnabled").to(i);for(const r of n)this._registerImageResizeButton(r);this._registerImageResizeDropdown(n)}_registerImageResizeButton(e){const n=this.editor,{name:i,value:r,icon:o}=e;n.ui.componentFactory.add(i,s=>{const a=new wt(s),l=n.commands.get("resizeImage"),u=this._getOptionLabelValue(e,!0);if(!mE[o])throw new oe("imageresizebuttons-missing-icon",n,e);if(a.set({label:u,icon:mE[o],tooltip:u,isToggleable:!0}),a.bind("isEnabled").to(this),n.plugins.has("ImageCustomResizeUI")&&Zg(e)){const c=n.plugins.get("ImageCustomResizeUI");this.listenTo(a,"execute",()=>{c._showForm(this._resizeUnit)})}else{const c=r?r+this._resizeUnit:null;a.bind("isOn").to(l,"value",l,"isEnabled",$A(c)),this.listenTo(a,"execute",()=>{n.execute("resizeImage",{width:c})})}return a})}_registerImageResizeDropdown(e){const n=this.editor,i=n.t,r=e.find(s=>!s.value),o=s=>{const a=n.commands.get("resizeImage"),l=Ro(s,DY),u=l.buttonView,c=i("Resize image");return u.set({tooltip:c,commandValue:r.value,icon:mE.medium,isToggleable:!0,label:this._getOptionLabelValue(r),withText:!0,class:"ck-resize-image-button",ariaLabel:c,ariaLabelledBy:void 0}),u.bind("label").to(a,"value",d=>d&&d.width?d.width:this._getOptionLabelValue(r)),l.bind("isEnabled").to(this),f0(l,()=>this._getResizeDropdownListItemDefinitions(e,a),{ariaLabel:i("Image resize list"),role:"menu"}),this.listenTo(l,"execute",d=>{"onClick"in d.source?d.source.onClick():(n.execute(d.source.commandName,{width:d.source.commandValue}),n.editing.view.focus())}),l};n.ui.componentFactory.add("resizeImage",o),n.ui.componentFactory.add("imageResize",o)}_getOptionLabelValue(e,n=!1){const i=this.editor.t;return e.label?e.label:n?Zg(e)?i("Custom image size"):e.value?i("Resize image to %0",e.value+this._resizeUnit):i("Resize image to the original size"):Zg(e)?i("Custom"):e.value?e.value+this._resizeUnit:i("Original")}_getResizeDropdownListItemDefinitions(e,n){const{editor:i}=this,r=new Er,o=e.map(s=>Zg(s)?{...s,valueWithUnits:"custom"}:s.value?{...s,valueWithUnits:`${s.value}${this._resizeUnit}`}:{...s,valueWithUnits:null});for(const s of o){let a=null;if(i.plugins.has("ImageCustomResizeUI")&&Zg(s)){const l=i.plugins.get("ImageCustomResizeUI");a={type:"button",model:new Jm({label:this._getOptionLabelValue(s),role:"menuitemradio",withText:!0,icon:null,onClick:()=>{l._showForm(this._resizeUnit)}})};const u=Object.values(o).map(c=>c.valueWithUnits);a.model.bind("isOn").to(n,"value",n,"isEnabled",W6e(u))}else a={type:"button",model:new Jm({commandName:"resizeImage",commandValue:s.valueWithUnits,label:this._getOptionLabelValue(s),role:"menuitemradio",withText:!0,icon:null})},a.model.bind("isOn").to(n,"value",n,"isEnabled",$A(s.valueWithUnits));a.model.bind("isEnabled").to(n,"isEnabled"),r.add(a)}return r}}function Zg(t){return t.value==="custom"}function $A(t){return(e,n)=>{const i=e;return i===void 0||!n?!1:t===null&&i===t?!0:i!==null&&i.width===t}}function W6e(t){return(e,n)=>!t.some(i=>$A(i)(e,n))}const q6e="figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img",gE="image_resized";class j6e extends xe{static get requires(){return[iE,kr]}static get pluginName(){return"ImageResizeHandles"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,n=e.editing.view,i=e.plugins.get("ImageUtils");n.addObserver(TO),this.listenTo(n.document,"imageLoaded",(r,o)=>{if(!o.target.matches(q6e))return;const s=e.editing.view.domConverter,a=s.domToView(o.target),l=i.getImageWidgetFromImageView(a);let u=this.editor.plugins.get(iE).getResizerByViewElement(l);if(u){u.redraw();return}const c=e.editing.mapper,d=c.toModelElement(l);u=e.plugins.get(iE).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:d,viewElement:l,editor:e,getHandleHost(f){return f.querySelector("img")},getResizeHost(){return s.mapViewToDom(c.toViewElement(d))},isCentered(){return d.getAttribute("imageStyle")=="alignCenter"},onCommit(f){n.change(h=>{h.removeClass(gE,l)}),e.execute("resizeImage",{width:f})}}),u.on("updateSize",()=>{l.hasClass(gE)||n.change(h=>{h.addClass(gE,l)});const f=d.name==="imageInline"?a:l;f.getStyle("height")&&n.change(h=>{h.removeStyle("height",f)})}),u.bind("isEnabled").to(this)})}}function IX(t){if(!t)return null;const[,e,n]=t.trim().match(/([.,\d]+)(%|px)$/)||[],i=Number.parseFloat(e);return Number.isNaN(i)?null:{value:i,unit:n}}function RX(t,e,n){return n==="px"?{value:e.value,unit:"px"}:{value:e.value/t*100,unit:"%"}}function MX(t){const{editing:e}=t,i=t.plugins.get("ImageUtils").getClosestSelectedImageElement(t.model.document.selection);if(!i)return null;const r=e.mapper.toViewElement(i),o=e.view.domConverter.mapViewToDom(r);return{model:i,view:r,dom:o}}function K6e(t,e){const n=MX(t);if(!n)return null;const i=IX(n.model.getAttribute("resizedWidth")||null);if(!i)return null;if(i.unit===e)return i;const r=yO(n.dom),o={value:new Wt(n.dom).width};return RX(r,o,e)}class G6e extends ut{focusTracker;keystrokes;unit;backButtonView;saveButtonView;labeledInput;children;_focusables;_focusCycler;_validators;constructor(e,n,i){super(e),this.focusTracker=new wi,this.keystrokes=new Qi,this.unit=n,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.labeledInput=this._createLabeledInputView(),this.children=this.createCollection([this._createHeaderView()]),this.children.add(new Xs(e,{children:[this.labeledInput,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding"]})),this._focusables=new qr,this._validators=i,this.keystrokes.set("Esc",(r,o)=>{this.fire("cancel"),o()}),this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-image-custom-resize-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),vg({view:this}),[this.backButtonView,this.labeledInput,this.saveButtonView].forEach(n=>{this._focusables.add(n),this.focusTracker.add(n.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createBackButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({class:"ck-button-back",label:e("Back"),icon:pg,tooltip:!0}),n.delegate("execute").to(this,"cancel"),n}_createSaveButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({label:e("Save"),withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),n}_createHeaderView(){const e=this.locale.t,n=new qf(this.locale,{label:e("Image Resize")});return n.children.add(this.backButtonView,0),n}_createLabeledInputView(){const e=this.locale.t,n=new Go(this.locale,nBe);return n.label=e("Resize image (in %0)",this.unit),n.class="ck-labeled-field-view_full-width",n.fieldView.set({step:.1}),n}isValid(){this.resetFormStatus();for(const e of this._validators){const n=e(this);if(n)return this.labeledInput.errorText=n,!1}return!0}resetFormStatus(){this.labeledInput.errorText=null}get rawSize(){const{element:e}=this.labeledInput.fieldView;return e?e.value:null}get parsedSize(){const{rawSize:e}=this;if(e===null)return null;const n=Number.parseFloat(e);return Number.isNaN(n)?null:n}get sizeWithUnits(){const{parsedSize:e,unit:n}=this;return e===null?null:`${e}${n}`}}function Y6e(t,e){const n=MX(t);if(!n)return null;const i=yO(n.dom),r=IX(window.getComputedStyle(n.dom).minWidth)||{value:1},o=Math.max(.1,RX(i,r,e).value);return{unit:e,lower:o,upper:e==="px"?i:100}}class X6e extends xe{_balloon;_form;static get requires(){return[bu]}static get pluginName(){return"ImageCustomResizeUI"}static get isOfficialPlugin(){return!0}destroy(){super.destroy(),this._form&&this._form.destroy()}_createForm(e){const n=this.editor;this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new(cb(G6e))(n.locale,e,J6e(n)),this._form.render(),this.listenTo(this._form,"submit",()=>{this._form.isValid()&&(n.execute("resizeImage",{width:this._form.sizeWithUnits}),this._hideForm(!0))}),this.listenTo(this._form.labeledInput,"change:errorText",()=>{n.ui.update()}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),Wf({emitter:this._form,activator:()=>this._isVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(e){if(this._isVisible)return;this._form||this._createForm(e);const n=this.editor,i=this._form.labeledInput;this._form.disableCssTransitions(),this._form.resetFormStatus(),this._isInBalloon||this._balloon.add({view:this._form,position:kO(n)});const r=K6e(n,e),o=r?r.value.toFixed(1):"",s=Y6e(n,e);i.fieldView.value=i.fieldView.element.value=o,s&&Object.assign(i.fieldView,{min:s.lower.toFixed(1),max:Math.ceil(s.upper).toFixed(1)}),this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e=!1){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return!!this._balloon&&this._balloon.visibleView===this._form}get _isInBalloon(){return!!this._balloon&&this._balloon.hasView(this._form)}}function J6e(t){const e=t.t;return[n=>{if(n.rawSize.trim()==="")return e("The value must not be empty.");if(n.parsedSize===null)return e("The value should be a plain number.")}]}class Z6e extends xe{static get requires(){return[PX,j6e,X6e,U6e]}static get pluginName(){return"ImageResize"}static get isOfficialPlugin(){return!0}}class Q6e extends Ht{_defaultStyles;_styles;constructor(e,n){super(e),this._defaultStyles={imageBlock:!1,imageInline:!1},this._styles=new Map(n.map(i=>{if(i.isDefault)for(const r of i.modelElements)this._defaultStyles[r]=i.name;return[i.name,i]}))}refresh(){const i=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!i,this.isEnabled?i.hasAttribute("imageStyle")?this.value=i.getAttribute("imageStyle"):this.value=this._defaultStyles[i.name]:this.value=!1}execute(e={}){const n=this.editor,i=n.model,r=n.plugins.get("ImageUtils");i.change(o=>{const s=e.value,{setImageSizes:a=!0}=e;let l=r.getClosestSelectedImageElement(i.document.selection);s&&this.shouldConvertImageType(s,l)&&(this.editor.execute(r.isBlockImage(l)?"imageTypeInline":"imageTypeBlock",{setImageSizes:a}),l=r.getClosestSelectedImageElement(i.document.selection)),!s||this._styles.get(s).isDefault?o.removeAttribute("imageStyle",l):o.setAttribute("imageStyle",s,l),a&&r.setImageNaturalSizeAttributes(l)})}shouldConvertImageType(e,n){return!this._styles.get(e).modelElements.includes(n.name)}}const n_={get inline(){return{name:"inline",title:"In line",icon:fY,modelElements:["imageInline"],isDefault:!0}},get alignLeft(){return{name:"alignLeft",title:"Left aligned image",icon:dY,modelElements:["imageBlock","imageInline"],className:"image-style-align-left"}},get alignBlockLeft(){return{name:"alignBlockLeft",title:"Left aligned image",icon:hY,modelElements:["imageBlock"],className:"image-style-block-align-left"}},get alignCenter(){return{name:"alignCenter",title:"Centered image",icon:AA,modelElements:["imageBlock"],className:"image-style-align-center"}},get alignRight(){return{name:"alignRight",title:"Right aligned image",icon:PA,modelElements:["imageBlock","imageInline"],className:"image-style-align-right"}},get alignBlockRight(){return{name:"alignBlockRight",title:"Right aligned image",icon:mY,modelElements:["imageBlock"],className:"image-style-block-align-right"}},get block(){return{name:"block",title:"Centered image",icon:AA,modelElements:["imageBlock"],isDefault:!0}},get side(){return{name:"side",title:"Side image",icon:PA,modelElements:["imageBlock"],className:"image-style-side"}}},e8e={full:nNe,left:hY,right:mY,center:AA,inlineLeft:dY,inlineRight:PA,inline:fY},t8e=[{name:"imageStyle:wrapText",title:"Wrap text",defaultItem:"imageStyle:alignLeft",items:["imageStyle:alignLeft","imageStyle:alignRight"]},{name:"imageStyle:breakText",title:"Break text",defaultItem:"imageStyle:block",items:["imageStyle:alignBlockLeft","imageStyle:block","imageStyle:alignBlockRight"]}];function n8e(t){return(t.configuredStyles.options||[]).map(i=>o8e(i)).filter(i=>s8e(i,t))}function i8e(t,e){return t&&e?{options:["inline","alignLeft","alignRight","alignCenter","alignBlockLeft","alignBlockRight","block","side"]}:t?{options:["block","side"]}:e?{options:["inline","alignLeft","alignRight"]}:{}}function r8e(t){return t.has("ImageBlockEditing")&&t.has("ImageInlineEditing")?[...t8e]:[]}function o8e(t){return typeof t=="string"?n_[t]?t={...n_[t]}:t={name:t}:t=a8e(n_[t.name],t),typeof t.icon=="string"&&(t.icon=e8e[t.icon]||t.icon),t}function s8e(t,{isBlockPluginLoaded:e,isInlinePluginLoaded:n}){const{modelElements:i,name:r}=t;if(!i||!i.length||!r)return OX({style:t}),!1;{const o=[e?"imageBlock":null,n?"imageInline":null];if(!i.some(s=>o.includes(s)))return hn("image-style-missing-dependency",{style:t,missingPlugins:i.map(s=>s==="imageBlock"?"ImageBlockEditing":"ImageInlineEditing")}),!1}return!0}function a8e(t,e){const n={...e};for(const i in t)Object.prototype.hasOwnProperty.call(e,i)||(n[i]=t[i]);return n}function OX(t){hn("image-style-configuration-definition-invalid",t)}const S1={normalizeStyles:n8e,getDefaultStylesConfiguration:i8e,getDefaultDropdownDefinitions:r8e,warnInvalidStyle:OX};function l8e(t){return(e,n,i)=>{if(!i.consumable.consume(n.item,e.name))return;const r=zA(n.attributeNewValue,t),o=zA(n.attributeOldValue,t),s=i.mapper.toViewElement(n.item),a=i.writer;o&&a.removeClass(o.className,s),r&&a.addClass(r.className,s)}}function u8e(t){const e={imageInline:t.filter(n=>!n.isDefault&&n.modelElements.includes("imageInline")),imageBlock:t.filter(n=>!n.isDefault&&n.modelElements.includes("imageBlock"))};return(n,i,r)=>{if(!i.modelRange)return;const o=i.viewItem,s=Mi(i.modelRange.getItems());if(s&&r.schema.checkAttribute(s,"imageStyle")){for(const a of e[s.name])r.consumable.consume(o,{classes:a.className})&&r.writer.setAttribute("imageStyle",a.name,s);c8e(r,o,s,t)}}}function c8e(t,e,n,i){if(!t.consumable.test(e,{styles:["float"]}))return;let r=null;switch(e.getStyle("float")){case"left":r="alignLeft";break;case"right":r="alignRight";break}if(!r)return;const o=zA(r,i);if(!o)return;const s=n_[o.name];QFe(o,s)&&(t.writer.setAttribute("imageStyle",r,n),t.consumable.consume(e,{styles:["float"]}))}function zA(t,e){for(const n of e)if(n.name===t)return n}class LX extends xe{static get pluginName(){return"ImageStyleEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[kr]}normalizedStyles;init(){const e=this.editor,n=e.plugins.has("ImageBlockEditing"),i=e.plugins.has("ImageInlineEditing");e.config.define("image.styles",S1.getDefaultStylesConfiguration(n,i)),this.normalizedStyles=S1.normalizeStyles({configuredStyles:e.config.get("image.styles"),isBlockPluginLoaded:n,isInlinePluginLoaded:i}),this._setupConversion(n,i),this._setupPostFixer(),e.commands.add("imageStyle",new Q6e(e,this.normalizedStyles))}_setupConversion(e,n){const i=this.editor,r=i.model.schema,o=l8e(this.normalizedStyles),s=u8e(this.normalizedStyles);i.editing.downcastDispatcher.on("attribute:imageStyle",o),i.data.downcastDispatcher.on("attribute:imageStyle",o),e&&(r.extend("imageBlock",{allowAttributes:"imageStyle"}),r.setAttributeProperties("imageStyle",{isFormatting:!0}),i.data.upcastDispatcher.on("element:figure",s,{priority:"low"})),n&&(r.extend("imageInline",{allowAttributes:"imageStyle"}),r.setAttributeProperties("imageStyle",{isFormatting:!0}),i.data.upcastDispatcher.on("element:img",s,{priority:"low"}))}_setupPostFixer(){const e=this.editor,n=e.model.document,i=e.plugins.get(kr),r=new Map(this.normalizedStyles.map(o=>[o.name,o]));n.registerPostFixer(o=>{let s=!1;for(const a of n.differ.getChanges())if(a.type=="insert"||a.type=="attribute"&&a.attributeKey=="imageStyle"){let l=a.type=="insert"?a.position.nodeAfter:a.range.start.nodeAfter;if(l&&l.is("element","paragraph")&&l.childCount>0&&(l=l.getChild(0)),!i.isImage(l))continue;const u=l.getAttribute("imageStyle");if(!u)continue;const c=r.get(u);(!c||!c.modelElements.includes(l.name))&&(o.removeAttribute("imageStyle",l),s=!0)}return s})}}class d8e extends xe{static get requires(){return[LX]}static get pluginName(){return"ImageStyleUI"}static get isOfficialPlugin(){return!0}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Wrap text":e("Wrap text"),"Break text":e("Break text"),"In line":e("In line"),"Full size image":e("Full size image"),"Side image":e("Side image"),"Left aligned image":e("Left aligned image"),"Centered image":e("Centered image"),"Right aligned image":e("Right aligned image")}}init(){const e=this.editor.plugins,n=this.editor.config.get("image.toolbar")||[],i=e.get("ImageStyleEditing"),r=BF(i.normalizedStyles,this.localizedDefaultStylesTitles);for(const s of r)this._createButton(s);const o=BF([...n.filter(so),...S1.getDefaultDropdownDefinitions(e)],this.localizedDefaultStylesTitles);for(const s of o)this._createDropdown(s,r)}_createDropdown(e,n){const i=this.editor.ui.componentFactory;i.add(e.name,r=>{let o;const{defaultItem:s,items:a,title:l}=e,u=a.filter(h=>n.find(({name:m})=>VF(m)===h)).map(h=>{const m=i.create(h);return h===s&&(o=m),m});a.length!==u.length&&S1.warnInvalidStyle({dropdown:e});const c=Ro(r,_S),d=c.buttonView,f=d.arrowView;return CS(c,u,{enableActiveItemFocusOnDropdownOpen:!0}),d.set({label:FF(l,o.label),class:null,tooltip:!0}),f.unbind("label"),f.set({label:l}),d.bind("icon").toMany(u,"isOn",(...h)=>{const m=h.findIndex(Vg);return m<0?o.icon:u[m].icon}),d.bind("label").toMany(u,"isOn",(...h)=>{const m=h.findIndex(Vg);return FF(l,m<0?o.label:u[m].label)}),d.bind("isOn").toMany(u,"isOn",(...h)=>h.some(Vg)),d.bind("class").toMany(u,"isOn",(...h)=>h.some(Vg)?"ck-splitbutton_flatten":void 0),d.on("execute",()=>{u.some(({isOn:h})=>h)?c.isOpen=!c.isOpen:o.fire("execute")}),c.bind("isEnabled").toMany(u,"isEnabled",(...h)=>h.some(Vg)),this.listenTo(c,"execute",()=>{this.editor.editing.view.focus()}),c})}_createButton(e){const n=e.name;this.editor.ui.componentFactory.add(VF(n),i=>{const r=this.editor.commands.get("imageStyle"),o=new wt(i);return o.set({label:e.title,icon:e.icon,tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",s=>s===n),o.on("execute",this._executeCommand.bind(this,n)),o})}_executeCommand(e){this.editor.execute("imageStyle",{value:e}),this.editor.editing.view.focus()}}function BF(t,e){for(const n of t)e[n.title]&&(n.title=e[n.title]);return t}function VF(t){return`imageStyle:${t}`}function FF(t,e){return(t?t+": ":"")+e}class f8e extends xe{static get requires(){return[LX,d8e]}static get pluginName(){return"ImageStyle"}static get isOfficialPlugin(){return!0}}class h8e extends xe{static get requires(){return[y1,kr]}static get pluginName(){return"ImageToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,n=e.t,i=e.plugins.get(y1),r=e.plugins.get("ImageUtils");i.register("image",{ariaLabel:n("Image toolbar"),items:m8e(e.config.get("image.toolbar")||[]),getRelatedElement:o=>r.getClosestSelectedImageWidget(o)})}}function m8e(t){return t.map(e=>so(e)?e.name:e)}class g8e extends xe{static get requires(){return[EO,kr]}static get pluginName(){return"PictureEditing"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:["sources"]}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:["sources"]}),this._setupConversion(),this._setupImageUploadEditingIntegration()}_setupConversion(){const e=this.editor,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("upcast").add(d6e(i)),n.for("downcast").add(f6e(i))}_setupImageUploadEditingIntegration(){const e=this.editor;if(!e.plugins.has("ImageUploadEditing"))return;const n=e.plugins.get("ImageUploadEditing");this.listenTo(n,"uploadComplete",(i,{imageElement:r,data:o})=>{const s=o.sources;s&&e.model.change(a=>{a.setAttributes({sources:s},r)})})}}class p8e extends xe{static get pluginName(){return"IndentEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor;e.commands.add("indent",new rV(e)),e.commands.add("outdent",new rV(e))}}class v8e extends xe{static get pluginName(){return"IndentUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.locale,i=e.t,r=n.uiLanguageDirection=="ltr"?cV:dV,o=n.uiLanguageDirection=="ltr"?dV:cV;this._defineButton("indent",i("Increase indent"),r),this._defineButton("outdent",i("Decrease indent"),o)}_defineButton(e,n,i){const r=this.editor;r.ui.componentFactory.add(e,()=>{const o=this._createButton(wt,e,n,i);return o.set({tooltip:!0}),o}),r.ui.componentFactory.add("menuBar:"+e,()=>this._createButton(Wi,e,n,i))}_createButton(e,n,i,r){const o=this.editor,s=o.commands.get(n),a=new e(o.locale);return a.set({label:i,icon:r}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>{o.execute(n),o.editing.view.focus()}),a}}class b8e extends xe{static get pluginName(){return"Indent"}static get isOfficialPlugin(){return!0}static get requires(){return[p8e,v8e]}}class by extends Ht{_indentBehavior;constructor(e,n){super(e),this._indentBehavior=n}refresh(){const n=this.editor.model,i=Mi(n.document.selection.getSelectedBlocks());if(!i||!this._isIndentationChangeAllowed(i)){this.isEnabled=!1;return}this.isEnabled=this._indentBehavior.checkEnabled(i.getAttribute("blockIndent"))}execute(){const e=this.editor.model,n=this._getBlocksToChange();e.change(i=>{for(const r of n){const o=r.getAttribute("blockIndent"),s=this._indentBehavior.getNextIndent(o);s?i.setAttribute("blockIndent",s,r):i.removeAttribute("blockIndent",r)}})}_getBlocksToChange(){const n=this.editor.model.document.selection;return Array.from(n.getSelectedBlocks()).filter(r=>this._isIndentationChangeAllowed(r))}_isIndentationChangeAllowed(e){const n=this.editor;return n.model.schema.checkAttribute(e,"blockIndent")?!n.plugins.has("ListUtils")||!this._indentBehavior.isForward?!0:!n.plugins.get("ListUtils").isListItemBlock(e):!1}}class $F{isForward;offset;unit;constructor(e){this.isForward=e.direction==="forward",this.offset=e.offset,this.unit=e.unit}checkEnabled(e){const n=parseFloat(e||"0");return this.isForward||n>0}getNextIndent(e){const n=parseFloat(e||"0");if(!(!e||e.endsWith(this.unit)))return this.isForward?this.offset+this.unit:void 0;const r=this.isForward?this.offset:-this.offset,o=n+r;return o>0?o+this.unit:void 0}}class zF{isForward;classes;constructor(e){this.isForward=e.direction==="forward",this.classes=e.classes}checkEnabled(e){const n=this.classes.indexOf(e);return this.isForward?n<this.classes.length-1:n>=0}getNextIndent(e){const n=this.classes.indexOf(e),i=this.isForward?1:-1;return this.classes[n+i]}}const y8e=["paragraph","heading1","heading2","heading3","heading4","heading5","heading6"];class w8e extends xe{constructor(e){super(e),e.config.define("indentBlock",{offset:40,unit:"px"})}static get pluginName(){return"IndentBlock"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.config.get("indentBlock");n.classes&&n.classes.length?(this._setupConversionUsingClasses(n.classes),e.commands.add("indentBlock",new by(e,new zF({direction:"forward",classes:n.classes}))),e.commands.add("outdentBlock",new by(e,new zF({direction:"backward",classes:n.classes})))):(e.data.addStyleProcessorRules(dDe),this._setupConversionUsingOffset(),e.commands.add("indentBlock",new by(e,new $F({direction:"forward",offset:n.offset,unit:n.unit}))),e.commands.add("outdentBlock",new by(e,new $F({direction:"backward",offset:n.offset,unit:n.unit}))))}afterInit(){const e=this.editor,n=e.model.schema,i=e.commands.get("indent"),r=e.commands.get("outdent"),o=e.config.get("heading.options");(o&&o.map(l=>l.model)||y8e).forEach(l=>{n.isRegistered(l)&&n.extend(l,{allowAttributes:"blockIndent"})}),n.setAttributeProperties("blockIndent",{isFormatting:!0}),i.registerChildCommand(e.commands.get("indentBlock")),r.registerChildCommand(e.commands.get("outdentBlock"))}_setupConversionUsingOffset(){const e=this.editor.conversion,i=this.editor.locale.contentLanguageDirection==="rtl"?"margin-right":"margin-left";e.for("upcast").attributeToAttribute({view:{styles:{[i]:/[\s\S]+/}},model:{key:"blockIndent",value:r=>{if(!r.is("element","li"))return r.getStyle(i)}}}),e.for("downcast").attributeToAttribute({model:"blockIndent",view:r=>({key:"style",value:{[i]:r}})})}_setupConversionUsingClasses(e){const n={model:{key:"blockIndent",values:[]},view:{}};for(const i of e)n.model.values.push(i),n.view[i]={key:"class",value:[i]};this.editor.conversion.attributeToAttribute(n)}}class _8e{_definitions=new Set;get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(n=>this._definitions.add(n)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(n,i,r)=>{if(!r.consumable.test(i.item,"attribute:linkHref")||!(i.item.is("selection")||r.schema.isInline(i.item)))return;const o=r.writer,s=o.document.selection;for(const a of this._definitions){const l=o.createAttributeElement("a",a.attributes,{priority:5});a.classes&&o.addClass(a.classes,l);for(const u in a.styles)o.setStyle(u,a.styles[u],l);o.setCustomProperty("link",!0,l),a.callback(i.attributeNewValue)?i.item.is("selection")?o.wrap(s.getFirstRange(),l):o.wrap(r.mapper.toViewRange(i.range),l):o.unwrap(r.mapper.toViewRange(i.range),l)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(n,i,{writer:r,mapper:o})=>{const s=o.toViewElement(i.item),a=Array.from(s.getChildren()).find(l=>l.is("element","a"));if(a)for(const l of this._definitions){const u=gl(l.attributes);if(l.callback(i.attributeNewValue)){for(const[c,d]of u)c==="class"?r.addClass(d,a):r.setAttribute(c,d,a);l.classes&&r.addClass(l.classes,a);for(const c in l.styles)r.setStyle(c,l.styles[c],a)}else{for(const[c,d]of u)c==="class"?r.removeClass(d,a):r.removeAttribute(c,a);l.classes&&r.removeClass(l.classes,a);for(const c in l.styles)r.removeStyle(c,a)}}})}}}const C8e=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,S8e="^(?:(?:<protocols>):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))",k8e=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,T8e=/^((\w+:(\/{2,})?)|(\W))/i,E8e=["https?","ftps?","mailto"],yy="Ctrl+K";function x8e(t){return t.is("attributeElement")&&!!t.getCustomProperty("link")}function HF(t,{writer:e}){const n=e.createAttributeElement("a",{href:t},{priority:5});return e.setCustomProperty("link",!0,n),n}function DX(t,e=E8e){const n=String(t),i=e.join("|"),r=new RegExp(`${S8e.replace("<protocols>",i)}`,"i");return A8e(n,r)?n:"#"}function A8e(t,e){return!!t.replace(C8e,"").match(e)}function P8e(t,e){const n={"Open in a new tab":t("Open in a new tab"),Downloadable:t("Downloadable")};return e.forEach(i=>("label"in i&&n[i.label]&&(i.label=n[i.label]),i)),e}function I8e(t){const e=[];if(t)for(const[n,i]of Object.entries(t)){const r=Object.assign({},i,{id:`link${DIe(n)}`});e.push(r)}return e}function HA(t,e){return t?e.checkAttribute(t.name,"linkHref"):!1}function R8e(t){return k8e.test(t)}function xO(t,e){const n=R8e(t)?"mailto:":e,i=!!n&&!NX(t);return t&&i?n+t:t}function NX(t){return T8e.test(t)}function M8e(t){window.open(t,"_blank","noopener")}function UA(t){let e="";for(const n of t.getItems()){if(!n.is("$text")&&!n.is("$textProxy"))return;e+=n.data}return e}class O8e extends Ht{manualDecorators=new Er;automaticDecorators=new _8e;restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,n=e.document.selection,i=n.getSelectedElement()||Mi(n.getSelectedBlocks());HA(i,e.schema)?(this.value=i.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(i,"linkHref")):(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(n,"linkHref"));for(const r of this.manualDecorators)r.value=this._getDecoratorStateFromModel(r.id)}execute(e,n={},i){const r=this.editor.model,o=r.document.selection,s=[],a=[];for(const l in n)n[l]?s.push(l):a.push(l);r.change(l=>{const u=f=>{l.setAttribute("linkHref",e,f),s.forEach(h=>l.setAttribute(h,!0,f)),a.forEach(h=>l.removeAttribute(h,f))},c=(f,h)=>{const m=UA(f);if(!m)return f;let g=i;if(g||(g=h&&h==m?e:m),g!=m){const v=l.createDocumentFragment();for(const _ of f.getItems()){const C=_;l.append(l.createText(C.data,C.getAttributes()),v)}const p=l.createRangeIn(v),b=L8e(m,g);let y=0;for(const{offset:_,actual:C,expected:S}of b){const k=_+y,T=l.createRange(p.start.getShiftedBy(k),p.start.getShiftedBy(k+C.length)),x=D8e(T,p).getAttributes(),P=Array.from(x).filter(([I])=>r.schema.getAttributeProperties(I).isFormatting),A=l.createText(S,P);u(A),l.remove(T),l.insert(A,T.start),y+=S.length}return r.insertContent(v,f),l.createRange(f.start,f.start.getShiftedBy(g.length))}},d=f=>{const{plugins:h}=this.editor;if(l.setSelection(f.end),h.has("TwoStepCaretMovement"))h.get("TwoStepCaretMovement")._handleForwardMovement();else for(const m of["linkHref",...s,...a])l.removeSelectionAttribute(m)};if(o.isCollapsed){const f=o.getFirstPosition();if(o.hasAttribute("linkHref")){const h=o.getAttribute("linkHref"),m=SS(f,"linkHref",h,r),g=c(m,h);u(g||m),g&&d(g)}else if(e!==""){const h=gl(o.getAttributes());h.set("linkHref",e),s.forEach(g=>{h.set(g,!0)});const m=r.insertContent(l.createText(i||e,h),f);d(m)}}else{const f=Array.from(o.getRanges()),h=r.schema.getValidRanges(f,"linkHref"),m=[];for(const p of o.getSelectedBlocks())r.schema.checkAttribute(p,"linkHref")&&m.push(l.createRangeOn(p));const g=m.slice();for(const p of h)this._isRangeToUpdate(p,m)&&g.push(p);const v=f.map(p=>({start:Bi.fromPosition(p.start,"toPrevious"),end:Bi.fromPosition(p.end,"toNext")}));for(let p of g){const b=(p.start.textNode||p.start.nodeAfter).getAttribute("linkHref");p=c(p,b)||p,u(p)}l.setSelection(v.map(p=>{const b=p.start.toPosition(),y=p.end.toPosition();return p.start.detach(),p.end.detach(),r.createRange(b,y)}))}})}_getDecoratorStateFromModel(e){const n=this.editor.model,i=n.document.selection,r=i.getSelectedElement();return HA(r,n.schema)?r.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,n){for(const i of n)if(i.containsRange(e))return!1;return!0}}function L8e(t,e){const n=fm(t,e),i={equal:0,insert:0,delete:0},r=[];let o="",s="";for(const a of[...n,null])a=="insert"?s+=e[i.equal+i.insert]:a=="delete"?o+=t[i.equal+i.delete]:(o.length||s.length)&&(r.push({offset:i.equal,actual:o,expected:s}),o="",s=""),a&&i[a]++;return r}function D8e(t,e){if(!t.isCollapsed)return Mi(t.getItems());const n=t.start;return n.textNode?n.textNode:!n.nodeBefore||n.isEqual(e.start)?n.nodeAfter:n.nodeBefore}class N8e extends Ht{refresh(){const e=this.editor.model,n=e.document.selection,i=n.getSelectedElement();HA(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(n,"linkHref")}execute(){const e=this.editor,n=this.editor.model,i=n.document.selection,r=e.commands.get("link");n.change(o=>{const s=i.isCollapsed?[SS(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),n)]:n.schema.getValidRanges(i.getRanges(),"linkHref");for(const a of s)if(o.removeAttribute("linkHref",a),r)for(const l of r.manualDecorators)o.removeAttribute(l.id,a)})}}class B8e extends Ln(){id;defaultValue;label;attributes;classes;styles;constructor({id:e,label:n,attributes:i,classes:r,styles:o,defaultValue:s}){super(),this.id=e,this.set("value",void 0),this.defaultValue=s,this.label=n,this.attributes=i,this.classes=r,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}const V8e="ck-link_selected",UF="automatic",F8e="manual",$8e=/^(https?:)?\/\//;class k1 extends xe{_linkOpeners=[];static get pluginName(){return"LinkEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[v1,XY,fs]}constructor(e){super(e),e.config.define("link",{allowCreatingEmptyLinks:!1,addTargetToExternalLinks:!1,toolbar:["linkPreview","|","editLink","linkProperties","unlink"]})}init(){const e=this.editor,n=this.editor.config.get("link.allowedProtocols");e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:HF}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(o,s)=>HF(DX(o,n),s)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:o=>o.getAttribute("href")}}),e.commands.add("link",new O8e(e)),e.commands.add("unlink",new N8e(e));const i=P8e(e.t,I8e(e.config.get("link.decorators")));this._enableAutomaticDecorators(i.filter(o=>o.mode===UF)),this._enableManualDecorators(i.filter(o=>o.mode===F8e)),e.plugins.get(v1).registerAttribute("linkHref"),QY(e,"linkHref","a",V8e),this._enableLinkOpen(),this._enableSelectionAttributesFixer(),this._enableClipboardIntegration()}_registerLinkOpener(e){this._linkOpeners.push(e)}_enableAutomaticDecorators(e){const n=this.editor,r=n.commands.get("link").automaticDecorators;n.config.get("link.addTargetToExternalLinks")&&r.add({id:"linkIsExternal",mode:UF,callback:o=>!!o&&$8e.test(o),attributes:{target:"_blank",rel:"noopener noreferrer"}}),r.add(e),r.length&&n.conversion.for("downcast").add(r.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const n=this.editor,r=n.commands.get("link").manualDecorators;e.forEach(o=>{n.model.schema.extend("$text",{allowAttributes:o.id});const s=new B8e(o);r.add(s),n.conversion.for("downcast").attributeToElement({model:s.id,view:(a,{writer:l,schema:u},{item:c})=>{if((c.is("selection")||u.isInline(c))&&a){const d=l.createAttributeElement("a",s.attributes,{priority:5});s.classes&&l.addClass(s.classes,d);for(const f in s.styles)l.setStyle(f,s.styles[f],d);return l.setCustomProperty("link",!0,d),d}}}),n.conversion.for("upcast").elementToAttribute({view:{name:"a",...s._createPattern()},model:{key:s.id}})})}_enableLinkOpen(){const e=this.editor,i=e.editing.view.document,r=o=>{this._linkOpeners.some(s=>s(o))||M8e(o)};this.listenTo(i,"click",(o,s)=>{if(!(vt.isMac?s.domEvent.metaKey:s.domEvent.ctrlKey))return;let l=s.domTarget;if(l.tagName.toLowerCase()!="a"&&(l=l.closest("a")),!l)return;const u=l.getAttribute("href");u&&(o.stop(),s.preventDefault(),r(u))},{context:"$capture"}),this.listenTo(i,"keydown",(o,s)=>{const l=e.commands.get("link").value;l&&s.keyCode===Yt.enter&&s.altKey&&(o.stop(),r(l))})}_enableSelectionAttributesFixer(){const n=this.editor.model,i=n.document.selection;this.listenTo(i,"change:attribute",(r,{attributeKeys:o})=>{!o.includes("linkHref")||i.hasAttribute("linkHref")||n.change(s=>{z8e(s,H8e(n.schema))})})}_enableClipboardIntegration(){const e=this.editor,n=e.model,i=this.editor.config.get("link.defaultProtocol");i&&this.listenTo(e.plugins.get("ClipboardPipeline"),"contentInsertion",(r,o)=>{n.change(s=>{const a=s.createRangeIn(o.content);for(const l of a.getItems())if(l.hasAttribute("linkHref")){const u=xO(l.getAttribute("linkHref"),i);s.setAttribute("linkHref",u,l)}})})}}function z8e(t,e){t.removeSelectionAttribute("linkHref");for(const n of e)t.removeSelectionAttribute(n)}function H8e(t){return t.getDefinition("$text").allowAttributes.filter(n=>n.startsWith("link"))}class U8e extends wt{constructor(e){super(e);const n=this.bindTemplate;this.set({href:void 0,withText:!0}),this.extendTemplate({attributes:{class:["ck-link-toolbar__preview"],href:n.to("href"),target:"_blank",rel:"noopener noreferrer"},on:{click:n.to(i=>{if(this.href){const r=()=>i.preventDefault();this.fire("navigate",this.href,r)}})}}),this.template.tag="a"}}class W8e extends ut{focusTracker=new wi;keystrokes=new Qi;backButtonView;saveButtonView;displayedTextInputView;urlInputView;children;providersListChildren;_validators;_focusables=new qr;_focusCycler;constructor(e,n){super(e),this._validators=n,this.backButtonView=this._createBackButton(),this.saveButtonView=this._createSaveButton(),this.displayedTextInputView=this._createDisplayedTextInput(),this.urlInputView=this._createUrlInput(),this.providersListChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView()]),this._createFormChildren(),this.listenTo(this.providersListChildren,"add",()=>{this.stopListening(this.providersListChildren,"add"),this.children.add(this._createProvidersListView())}),this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-link-form","ck-responsive-form"],tabindex:"-1"},children:this.children})}render(){super.render(),vg({view:this}),[this.urlInputView,this.saveButtonView,...this.providersListChildren,this.backButtonView,this.displayedTextInputView].forEach(n=>{this._focusables.add(n),this.focusTracker.add(n.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}isValid(){this.resetFormStatus();for(const e of this._validators){const n=e(this);if(n)return this.urlInputView.errorText=n,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null}_createBackButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({class:"ck-button-back",label:e("Back"),icon:pg,tooltip:!0}),n.delegate("execute").to(this,"cancel"),n}_createSaveButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({label:e("Insert"),tooltip:!1,withText:!0,type:"submit",class:"ck-button-action ck-button-bold"}),n}_createHeaderView(){const e=this.locale.t,n=new qf(this.locale,{label:e("Link")});return n.children.add(this.backButtonView,0),n}_createProvidersListView(){const e=new jf(this.locale);return e.extendTemplate({attributes:{class:["ck-link-form__providers-list"]}}),e.items.bindTo(this.providersListChildren).using(n=>{const i=new $s(this.locale);return i.children.add(n),i}),e}_createDisplayedTextInput(){const e=this.locale.t,n=new Go(this.locale,tu);return n.label=e("Displayed text"),n.class="ck-labeled-field-view_full-width",n}_createUrlInput(){const e=this.locale.t,n=new Go(this.locale,tu);return n.fieldView.inputMode="url",n.label=e("Link URL"),n.class="ck-labeled-field-view_full-width",n}_createFormChildren(){this.children.add(new Xs(this.locale,{children:[this.displayedTextInputView],class:["ck-form__row_large-top-padding"]})),this.children.add(new Xs(this.locale,{children:[this.urlInputView,this.saveButtonView],class:["ck-form__row_with-submit","ck-form__row_large-top-padding","ck-form__row_large-bottom-padding"]}))}get url(){const{element:e}=this.urlInputView.fieldView;return e?e.value.trim():null}}class q8e extends ut{focusTracker=new wi;keystrokes=new Qi;backButtonView;listView;listChildren;emptyListInformation;children;_focusables=new qr;_focusCycler;constructor(e){super(e),this.listChildren=this.createCollection(),this.backButtonView=this._createBackButton(),this.listView=this._createListView(),this.emptyListInformation=this._createEmptyLinksListItemView(),this.children=this.createCollection([this._createHeaderView(),this.emptyListInformation]),this.set("title",""),this.set("emptyListPlaceholder",""),this.set("hasItems",!1),this.listenTo(this.listChildren,"change",()=>{this.hasItems=this.listChildren.length>0}),this.on("change:hasItems",(n,i,r)=>{r?(this.children.remove(this.emptyListInformation),this.children.add(this.listView)):(this.children.remove(this.listView),this.children.add(this.emptyListInformation))}),this.keystrokes.set("Esc",(n,i)=>{this.fire("cancel"),i()}),this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-providers"],tabindex:"-1"},children:this.children})}render(){super.render(),[this.listView,this.backButtonView].forEach(n=>{this._focusables.add(n),this.focusTracker.add(n.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createListView(){const e=new jf(this.locale);return e.extendTemplate({attributes:{class:["ck-link-providers__list"]}}),e.items.bindTo(this.listChildren).using(n=>{const i=new $s(this.locale);return i.children.add(n),i}),e}_createBackButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({class:"ck-button-back",label:e("Back"),icon:pg,tooltip:!0}),n.delegate("execute").to(this,"cancel"),n}_createHeaderView(){const e=new qf(this.locale);return e.bind("label").to(this,"title"),e.children.add(this.backButtonView,0),e}_createEmptyLinksListItemView(){const e=new ut(this.locale);return e.setTemplate({tag:"p",attributes:{class:["ck","ck-link__empty-list-info"]},children:[{text:this.bindTemplate.to("emptyListPlaceholder")}]}),e}}class j8e extends ut{focusTracker=new wi;keystrokes=new Qi;backButtonView;children;listChildren;_focusables=new qr;_focusCycler;constructor(e){super(e),this.backButtonView=this._createBackButton(),this.listChildren=this.createCollection(),this.children=this.createCollection([this._createHeaderView(),this._createListView()]),this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-properties"],tabindex:"-1"},children:this.children}),this.keystrokes.set("Esc",(n,i)=>{this.fire("back"),i()})}render(){super.render(),[...this.listChildren,this.backButtonView].forEach(n=>{this._focusables.add(n),this.focusTracker.add(n.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBackButton(){const e=this.locale.t,n=new wt(this.locale);return n.set({class:"ck-button-back",label:e("Back"),icon:pg,tooltip:!0}),n.delegate("execute").to(this,"back"),n}_createHeaderView(){const e=this.locale.t,n=new qf(this.locale,{label:e("Link properties")});return n.children.add(this.backButtonView,0),n}_createListView(){const e=new jf(this.locale);return e.extendTemplate({attributes:{class:["ck-link__list"]}}),e.items.bindTo(this.listChildren).using(n=>{const i=new $s(this.locale);return i.children.add(n),i}),e}}class K8e extends wt{arrowView;constructor(e){super(e),this.set({withText:!0}),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{class:["ck-link__button"]}})}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Sa;return e.content=cY,e}}const Ma="link-ui";class G8e extends xe{toolbarView=null;formView=null;linkProviderItemsView=null;propertiesView=null;_balloon;_linksProviders=new Er;static get requires(){return[bu,k1]}static get pluginName(){return"LinkUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=this.editor.t;this.set("selectedLinkableText",void 0),e.editing.view.addObserver(N5e),this._balloon=e.plugins.get(bu),this._registerComponents(),this._registerEditingOpeners(),this._enableBalloonActivators(),e.conversion.for("editingDowncast").markerToHighlight({model:Ma,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Ma,view:(i,{writer:r})=>{if(!i.markerRange.isCollapsed)return null;const o=r.createUIElement("span");return r.addClass(["ck-fake-link-selection","ck-fake-link-selection_collapsed"],o),o}}),e.accessibility.addKeystrokeInfos({keystrokes:[{label:n("Create link"),keystroke:yy},{label:n("Move out of a link"),keystroke:[["arrowleft","arrowleft"],["arrowright","arrowright"]]}]})}destroy(){super.destroy(),this.propertiesView&&this.propertiesView.destroy(),this.formView&&this.formView.destroy(),this.toolbarView&&this.toolbarView.destroy(),this.linkProviderItemsView&&this.linkProviderItemsView.destroy()}registerLinksListProvider(e){const n=this._linksProviders.filter(i=>(i.order||0)<=(e.order||0)).length;this._linksProviders.add(e,n)}_createViews(){const e=this.editor.commands.get("link");this.toolbarView=this._createToolbarView(),this.formView=this._createFormView(),e.manualDecorators.length&&(this.propertiesView=this._createPropertiesView()),this._enableUserBalloonInteractions()}_createToolbarView(){const e=this.editor,n=new Xm(e.locale),i=e.commands.get("link");n.class="ck-link-toolbar";let r=e.config.get("link.toolbar");return i.manualDecorators.length||(r=r.filter(o=>o!=="linkProperties")),n.fillFromConfig(r,e.ui.componentFactory),n.keystrokes.set("Esc",(o,s)=>{this._hideUI(),s()}),n.keystrokes.set(yy,(o,s)=>{this._addFormView(),s()}),e.ui.addToolbar(n,{isContextual:!0,beforeFocus:()=>{this._getSelectedLinkElement()&&!this._isToolbarVisible&&this._showUI(!0)},afterBlur:()=>{this._hideUI(!1)}}),n}_createFormView(){const e=this.editor,n=e.locale.t,i=e.commands.get("link"),r=e.config.get("link.defaultProtocol"),o=new(cb(W8e))(e.locale,Y8e(e));return o.displayedTextInputView.bind("isEnabled").to(this,"selectedLinkableText",s=>s!==void 0),o.urlInputView.bind("isEnabled").to(i,"isEnabled"),o.saveButtonView.bind("isEnabled").to(i,"isEnabled"),o.saveButtonView.bind("label").to(i,"value",s=>n(s?"Update":"Insert")),this.listenTo(o,"submit",()=>{if(o.isValid()){const s=o.urlInputView.fieldView.element.value,a=xO(s,r),l=o.displayedTextInputView.fieldView.element.value;e.execute("link",a,this._getDecoratorSwitchesState(),l!==this.selectedLinkableText?l:void 0),this._closeFormView()}}),this.listenTo(o.urlInputView,"change:errorText",()=>{e.ui.update()}),this.listenTo(o,"cancel",()=>{this._closeFormView()}),o.keystrokes.set("Esc",(s,a)=>{this._closeFormView(),a()}),o.providersListChildren.bindTo(this._linksProviders).using(s=>this._createLinksListProviderButton(s)),o}_createLinkProviderListView(e){return e.getListItems().map(({href:n,label:i,icon:r})=>{const o=new wt;return o.set({label:i,icon:r,tooltip:!1,withText:!0}),o.on("execute",()=>{this.formView.resetFormStatus(),this.formView.urlInputView.fieldView.value=n,this.editor.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),o})}_createLinkProviderItemsView(e){const n=this.editor,i=n.locale.t,r=new q8e(n.locale),{emptyListPlaceholder:o,label:s}=e;return r.emptyListPlaceholder=o||i("No links available"),r.title=s,this.listenTo(r,"cancel",()=>{n.editing.view.focus(),this._removeLinksProviderView(),this.formView.focus()}),r}_createPropertiesView(){const e=this.editor,n=this.editor.commands.get("link"),i=new(cb(j8e))(e.locale);return this.listenTo(i,"back",()=>{e.editing.view.focus(),this._removePropertiesView()}),i.listChildren.bindTo(n.manualDecorators).using(r=>{const o=new wS(e.locale);return o.set({label:r.label,withText:!0}),o.bind("isOn").toMany([r,n],"value",(s,a)=>a===void 0&&s===void 0?!!r.defaultValue:!!s),o.on("execute",()=>{r.set("value",!o.isOn),e.execute("link",n.value,this._getDecoratorSwitchesState())}),o}),i}_getDecoratorSwitchesState(){const e=this.editor.commands.get("link");return Array.from(e.manualDecorators).reduce((n,i)=>{const r=e.value===void 0&&i.value===void 0?i.defaultValue:i.value;return{...n,[i.id]:!!r}},{})}_registerEditingOpeners(){this.editor.plugins.get(k1)._registerLinkOpener(n=>{const i=this._getLinkProviderLinkByHref(n);if(!i)return!1;const{item:r,provider:o}=i;return o.navigate?o.navigate(r):!1})}_registerComponents(){const e=this.editor;e.ui.componentFactory.add("link",()=>{const n=this._createButton(wt);return n.set({tooltip:!0}),n}),e.ui.componentFactory.add("menuBar:link",()=>{const n=this._createButton(Wi);return n.set({role:"menuitemcheckbox"}),n}),e.ui.componentFactory.add("linkPreview",n=>{const i=new U8e(n),r=e.config.get("link.allowedProtocols"),o=e.commands.get("link"),s=n.t;i.bind("isEnabled").to(o,"value",l=>!!l),i.bind("href").to(o,"value",l=>l&&DX(l,r));const a=l=>{if(!l){i.label=void 0,i.icon=void 0,i.tooltip=s("Open link in new tab");return}const u=this._getLinkProviderLinkByHref(l);if(u){const{label:c,tooltip:d,icon:f}=u.item;i.label=c,i.tooltip=d||!1,i.icon=f}else i.label=l,i.icon=void 0,i.tooltip=s("Open link in new tab")};return a(o.value),this.listenTo(o,"change:value",(l,u,c)=>{a(c)}),this.listenTo(i,"navigate",(l,u,c)=>{const d=this._getLinkProviderLinkByHref(u);if(!d)return;const{provider:f,item:h}=d,{navigate:m}=f;m&&m(h)&&(l.stop(),c())}),i}),e.ui.componentFactory.add("unlink",n=>{const i=e.commands.get("unlink"),r=new wt(n),o=n.t;return r.set({label:o("Unlink"),icon:ANe,tooltip:!0}),r.bind("isEnabled").to(i),this.listenTo(r,"execute",()=>{e.execute("unlink"),this._hideUI()}),r}),e.ui.componentFactory.add("editLink",n=>{const i=e.commands.get("link"),r=new wt(n),o=n.t;return r.set({label:o("Edit link"),icon:uNe,tooltip:!0}),r.bind("isEnabled").to(i),this.listenTo(r,"execute",()=>{this._addFormView()}),r}),e.ui.componentFactory.add("linkProperties",n=>{const i=e.commands.get("link"),r=new wt(n),o=n.t;return r.set({label:o("Link properties"),icon:pNe,tooltip:!0}),r.bind("isEnabled").to(i,"isEnabled",i,"value",i,"manualDecorators",(s,a,l)=>s&&!!a&&l.length>0),this.listenTo(r,"execute",()=>{this._addPropertiesView()}),r})}_createLinksListProviderButton(e){const n=this.editor.locale,i=new K8e(n);return i.set({label:e.label}),this.listenTo(i,"execute",()=>{this._showLinksProviderView(e)}),i}_createButton(e){const n=this.editor,i=n.locale,r=n.commands.get("link"),o=new e(n.locale),s=i.t;return o.set({label:s("Link"),icon:ZDe,keystroke:yy,isToggleable:!0}),o.bind("isEnabled").to(r,"isEnabled"),o.bind("isOn").to(r,"value",a=>!!a),this.listenTo(o,"execute",()=>{n.editing.view.scrollToTheSelection(),this._showUI(!0),this._getSelectedLinkElement()&&this._addFormView()}),o}_enableBalloonActivators(){const e=this.editor,n=e.editing.view.document;this.listenTo(n,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),e.keystrokes.set(yy,(i,r)=>{r(),e.commands.get("link").isEnabled&&(e.editing.view.scrollToTheSelection(),this._showUI(!0))})}_enableUserBalloonInteractions(){this.editor.keystrokes.set("Tab",(e,n)=>{this._isToolbarVisible&&!this.toolbarView.focusTracker.isFocused&&(this.toolbarView.focus(),n())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,n)=>{this._isUIVisible&&(this._hideUI(),n())}),Wf({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:()=>[this._balloon.view.element],callback:()=>{this._hideUI(!1)}})}_addToolbarView(){this.toolbarView||this._createViews(),!this._isToolbarInPanel&&this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"})}_addFormView(){if(this.formView||this._createViews(),this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this.formView.resetFormStatus(),this.formView.backButtonView.isVisible=e.isEnabled&&!!e.value,this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this.selectedLinkableText=this._getSelectedLinkableText(),this.formView.displayedTextInputView.fieldView.value=this.selectedLinkableText||"",this.formView.urlInputView.fieldView.value=e.value||"",this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions()}_addPropertiesView(){this.propertiesView||this._createViews(),!this._arePropertiesInPanel&&(this.propertiesView.disableCssTransitions(),this._balloon.add({view:this.propertiesView,position:this._getBalloonPositionData()}),this.propertiesView.enableCssTransitions(),this.propertiesView.focus())}_showLinksProviderView(e){this.linkProviderItemsView&&this._removeLinksProviderView(),this.linkProviderItemsView=this._createLinkProviderItemsView(e),this._addLinkProviderItemsView(e)}_addLinkProviderItemsView(e){this.linkProviderItemsView.listChildren.clear(),this.linkProviderItemsView.listChildren.addMany(this._createLinkProviderListView(e)),this._balloon.add({view:this.linkProviderItemsView,position:this._getBalloonPositionData()}),this.linkProviderItemsView.focus()}_closeFormView(){const e=this.editor.commands.get("link");this.selectedLinkableText=void 0,e.value!==void 0?this._removeFormView():this._hideUI()}_removePropertiesView(){this._arePropertiesInPanel&&this._balloon.remove(this.propertiesView)}_removeLinksProviderView(){this._isLinksListInPanel&&this._balloon.remove(this.linkProviderItemsView)}_removeFormView(e=!0){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this.formView.displayedTextInputView.fieldView.reset(),this.formView.urlInputView.fieldView.reset(),this._balloon.remove(this.formView),e&&this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this.formView||this._createViews(),this._getSelectedLinkElement()?(this._isToolbarVisible?this._addFormView():this._addToolbarView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addToolbarView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(e=!0){const n=this.editor;this._isUIInPanel&&(this.stopListening(n.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e&&n.editing.view.focus(),this._removeLinksProviderView(),this._removePropertiesView(),this._removeFormView(e),this._isToolbarInPanel&&this._balloon.remove(this.toolbarView),this._hideFakeVisualSelection())}_startUpdatingUI(){const e=this.editor,n=e.editing.view.document;let i=this._getSelectedLinkElement(),r=s();const o=()=>{const a=this._getSelectedLinkElement(),l=s();i&&!a||!i&&l!==r?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=a,r=l};function s(){return n.selection.focus.getAncestors().reverse().find(a=>a.is("element"))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _arePropertiesInPanel(){return!!this.propertiesView&&this._balloon.hasView(this.propertiesView)}get _isLinksListInPanel(){return!!this.linkProviderItemsView&&this._balloon.hasView(this.linkProviderItemsView)}get _isFormInPanel(){return!!this.formView&&this._balloon.hasView(this.formView)}get _isToolbarInPanel(){return!!this.toolbarView&&this._balloon.hasView(this.toolbarView)}get _isPropertiesVisible(){return!!this.propertiesView&&this._balloon.visibleView===this.propertiesView}get _isFormVisible(){return!!this.formView&&this._balloon.visibleView==this.formView}get _isToolbarVisible(){return!!this.toolbarView&&this._balloon.visibleView===this.toolbarView}get _isUIInPanel(){return this._arePropertiesInPanel||this._isLinksListInPanel||this._isFormInPanel||this._isToolbarInPanel}get _isUIVisible(){return this._isPropertiesVisible||this._isLinksListInPanel||this._isFormVisible||this._isToolbarVisible}_getBalloonPositionData(){const e=this.editor.editing.view,n=e.document;if(this.editor.model.markers.has(Ma)){const r=this.editor.editing.mapper.markerNameToElements(Ma);if(r){const o=Array.from(r),s=e.createRange(e.createPositionBefore(o[0]),e.createPositionAfter(o[o.length-1]));return{target:e.domConverter.viewRangeToDom(s)}}}return{target:()=>{const r=this._getSelectedLinkElement();return r?e.domConverter.mapViewToDom(r):e.domConverter.viewRangeToDom(n.selection.getFirstRange())}}}_getSelectedLinkElement(){const e=this.editor.editing.view,n=e.document.selection,i=n.getSelectedElement();if(n.isCollapsed||i&&ci(i))return pE(n.getFirstPosition());{const r=n.getFirstRange().getTrimmed(),o=pE(r.start),s=pE(r.end);return!o||o!=s?null:e.createRangeIn(o).getTrimmed().isEqual(r)?o:null}}_getSelectedLinkableText(){const e=this.editor.model,n=this.editor.editing,i=this._getSelectedLinkElement();if(!i)return UA(e.document.selection.getFirstRange());const r=n.view.createRangeOn(i),o=n.mapper.toModelRange(r);return UA(o)}_getLinkProviderLinkByHref(e){if(!e)return null;for(const n of this._linksProviders){const i=n.getItem?n.getItem(e):n.getListItems().find(r=>r.href===e);if(i)return{provider:n,item:i}}return null}_showFakeVisualSelection(){const e=this.editor.model;e.change(n=>{const i=e.document.selection.getFirstRange();if(e.markers.has(Ma))n.updateMarker(Ma,{range:i});else if(i.start.isAtEnd){const r=i.start.getLastMatchingPosition(({item:o})=>!e.schema.isContent(o),{boundaries:i});n.addMarker(Ma,{usingOperation:!1,affectsData:!1,range:n.createRange(r,i.end)})}else n.addMarker(Ma,{usingOperation:!1,affectsData:!1,range:i})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Ma)&&e.change(n=>{n.removeMarker(Ma)})}}function pE(t){return t.getAncestors().find(e=>x8e(e))||null}function Y8e(t){const e=t.t,n=t.config.get("link.allowCreatingEmptyLinks");return[i=>{if(!n&&!i.url.length)return e("Link URL must not be empty.")}]}const X8e=4,BX=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63}))|localhost)(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i"),J8e=2;class Z8e extends xe{static get requires(){return[yu,k1]}static get pluginName(){return"AutoLink"}static get isOfficialPlugin(){return!0}init(){const n=this.editor.model.document.selection;n.on("change:range",()=>{this.isEnabled=!n.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling(),this._enablePasteLinking()}_expandLinkRange(e,n){return n.textNode&&n.textNode.hasAttribute("linkHref")?SS(n,"linkHref",n.textNode.getAttribute("linkHref"),e):null}_selectEntireLinks(e,n){const r=this.editor.model,o=r.document.selection,s=o.getFirstPosition(),a=o.getLastPosition();let l=n.getJoined(this._expandLinkRange(r,s)||n);l&&(l=l.getJoined(this._expandLinkRange(r,a)||n)),l&&(l.start.isBefore(s)||l.end.isAfter(a))&&e.setSelection(l)}_enablePasteLinking(){const e=this.editor,n=e.model,i=n.document.selection,r=e.plugins.get("ClipboardPipeline"),o=e.commands.get("link");r.on("inputTransformation",(s,a)=>{if(!this.isEnabled||!o.isEnabled||i.isCollapsed||a.method!=="paste"||i.rangeCount>1)return;const l=i.getFirstRange(),u=a.dataTransfer.getData("text/plain");if(!u)return;const c=u.match(BX);c&&c[2]===u&&(n.change(d=>{this._selectEntireLinks(d,l),o.execute(u)}),s.stop())},{priority:"high"})}_enableTypingHandling(){const e=this.editor,n=new pO(e.model,i=>{let r=i;if(!Q8e(r))return;r=r.slice(0,-1),"!.:,;?".includes(r[r.length-1])&&(r=r.slice(0,-1));const o=WF(r);if(o)return{url:o,removedTrailingCharacters:i.length-r.length}});n.on("matched:data",(i,r)=>{const{batch:o,range:s,url:a,removedTrailingCharacters:l}=r;if(!o.isTyping)return;const u=s.end.getShiftedBy(-l),c=u.getShiftedBy(-a.length),d=e.model.createRange(c,u);this._applyAutoLink(a,d)}),n.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,n=e.model,i=e.commands.get("enter");i&&i.on("execute",()=>{const r=n.document.selection.getFirstPosition();let o;r.parent.previousSibling?.is("element")?o=n.createRangeIn(r.parent.previousSibling):o=n.createRange(n.createPositionAt(r.parent,0),r),this._checkAndApplyAutoLinkOnRange(o)})}_enableShiftEnterHandling(){const e=this.editor,n=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",()=>{const r=n.document.selection.getFirstPosition(),o=n.createRange(n.createPositionAt(r.parent,0),r.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(o)})}_checkAndApplyAutoLinkOnRange(e){const n=this.editor.model,{text:i,range:r}=ZY(e,n),o=WF(i);if(o){const s=n.createRange(r.end.getShiftedBy(-o.length),r.end);this._applyAutoLink(o,s)}}_applyAutoLink(e,n){const i=this.editor.model,r=this.editor.config.get("link.defaultProtocol"),o=xO(e,r);!this.isEnabled||!e$e(n,i)||!NX(o)||t$e(n)||this._persistAutoLink(o,n)}_persistAutoLink(e,n){const i=this.editor.model,r=this.editor.plugins.get("Delete");i.enqueueChange(o=>{o.setAttribute("linkHref",e,n),i.enqueueChange(()=>{r.requestUndoOnBackspace()})})}}function Q8e(t){return t.length>X8e&&t[t.length-1]===" "&&t[t.length-2]!==" "}function WF(t){const e=BX.exec(t);return e?e[J8e]:null}function e$e(t,e){return e.schema.checkAttributeInSelection(e.createSelection(t),"linkHref")}function t$e(t){const e=t.start.nodeAfter;return!!e&&e.hasAttribute("linkHref")}class n$e extends xe{static get requires(){return[k1,G8e,Z8e]}static get pluginName(){return"Link"}static get isOfficialPlugin(){return!0}}class zs{_startElement;_referenceIndent;_isForward;_includeSelf;_sameAttributes;_sameIndent;_lowerIndent;_higherIndent;constructor(e,n){this._startElement=e,this._referenceIndent=e.getAttribute("listIndent"),this._isForward=n.direction=="forward",this._includeSelf=!!n.includeSelf,this._sameAttributes=li(n.sameAttributes||[]),this._sameIndent=!!n.sameIndent,this._lowerIndent=!!n.lowerIndent,this._higherIndent=!!n.higherIndent}static first(e,n){const r=new this(e,n)[Symbol.iterator]();return Mi(r)}*[Symbol.iterator](){const e=[];for(const{node:n}of new m0(this._getStartNode(),this._isForward?"forward":"backward")){const i=n.getAttribute("listIndent");if(i<this._referenceIndent){if(!this._lowerIndent)break;this._referenceIndent=i}else if(i>this._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){e.push(n);continue}}else{if(!this._sameIndent){if(this._higherIndent){e.length&&(yield*e,e.length=0);break}continue}if(this._sameAttributes.some(r=>n.getAttribute(r)!==this._startElement.getAttribute(r)))break}e.length&&(yield*e,e.length=0),yield n}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}class m0{_node;_isForward;_previousNodesByIndent=[];_previous=null;_previousNodeIndent=null;constructor(e,n="forward"){this._node=e,this._isForward=n==="forward"}[Symbol.iterator](){return this}next(){if(!ti(this._node))return{done:!0,value:void 0};const e=this._node.getAttribute("listIndent");let n=null;if(this._previous){const r=this._previousNodeIndent;e>r?this._previousNodesByIndent[r]=this._previous:e<r?(n=this._previousNodesByIndent[e]||null,this._previousNodesByIndent.length=e):n=this._previous}const i={node:this._node,previous:this._previous,previousNodeInList:n};return this._previous=this._node,this._previousNodeIndent=e,this._node=this._isForward?this._node.nextSibling:this._node.previousSibling,{value:i,done:!1}}}class i$e{_listHead;constructor(e){this._listHead=e}[Symbol.iterator](){return new m0(this._listHead)}}class Qm{static next(){return Ur()}}function ti(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function _g(t,e={}){return[...Oc(t,{...e,direction:"backward"}),...Oc(t,{...e,direction:"forward"})]}function Oc(t,e={}){const n=e.direction=="forward",i=Array.from(new zs(t,{...e,includeSelf:n,sameIndent:!0,sameAttributes:"listItemId"}));return n?i:i.reverse()}function r$e(t){return Array.from(new zs(t,{direction:"forward",higherIndent:!0}))}function VX(t,e){const n=new zs(t,{sameIndent:!0,sameAttributes:"listType",...e}),i=new zs(t,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward",...e});return[...Array.from(n).reverse(),...i]}function Lc(t){return!zs.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function qF(t){return!zs.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function g0(t,e={}){t=li(t);const n=e.withNested!==!1,i=new Set;for(const r of t)for(const o of _g(r,{higherIndent:n}))i.add(o);return Yf(i)}function o$e(t){t=li(t);const e=new Set;for(const n of t)for(const i of VX(n))e.add(i);return Yf(e)}function AO(t,e){const n=Oc(t,{direction:"forward"}),i=Qm.next();for(const r of n)e.setAttribute("listItemId",i,r);return n}function WA(t,e,n){const i={};for(const[o,s]of e.getAttributes())o.startsWith("list")&&(i[o]=s);const r=Oc(t,{direction:"forward"});for(const o of r)n.setAttributes(i,o);return r}function qA(t,e,{expand:n,indentBy:i=1}={}){t=li(t);const r=n?g0(t):t;for(const o of r){const s=o.getAttribute("listIndent")+i;s<0?ES(o,e):e.setAttribute("listIndent",s,o)}return r}function s$e(t,e){t=li(t);const n=g0(t),i=new Set,r=Math.min(...n.map(s=>s.getAttribute("listIndent"))),o=new Map;for(const s of n)o.set(s,zs.first(s,{lowerIndent:!0}));for(const s of n){if(i.has(s))continue;i.add(s);const a=s.getAttribute("listIndent")-1;if(a<0){ES(s,e);continue}if(s.getAttribute("listIndent")==r){const l=u$e(s,o.get(s),e);for(const u of l)i.add(u);if(l.length)continue}e.setAttribute("listIndent",a,s)}return Yf(i)}function ES(t,e){t=li(t);for(const n of t)n.is("element","listItem")&&e.rename(n,"paragraph");for(const n of t)for(const i of n.getAttributeKeys())i.startsWith("list")&&e.removeAttribute(i,n);return t}function mb(t){if(!t.length)return!1;const e=t[0].getAttribute("listItemId");return e?!t.some(n=>n.getAttribute("listItemId")!=e):!1}function a$e(t,e){const n=[];let i=Number.POSITIVE_INFINITY;for(const{node:r}of new m0(t.nextSibling)){const o=r.getAttribute("listIndent");if(o==0)break;o<i&&(i=o);const s=o-i;e.setAttribute("listIndent",s,r),n.push(r)}return n}function Yf(t){return Array.from(t).filter(e=>e.root.rootName!=="$graveyard").sort((e,n)=>e.index-n.index)}function gb(t){const e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function vE(t,e){return e.checkChild(t.parent,"listItem")&&e.checkChild(t,"$text")&&!e.isObject(t)}function l$e(t){return t=="numbered"||t=="customNumbered"}function u$e(t,e,n){return Oc(e,{direction:"forward"}).pop().index>t.index?WA(t,e,n):[]}class jF extends Ht{_direction;constructor(e,n){super(e),this._direction=n}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,n=KF(e.document.selection);e.change(i=>{const r=[];mb(n)&&!Lc(n[0])?(this._direction=="forward"&&r.push(...qA(n,i)),r.push(...AO(n[0],i))):this._direction=="forward"?r.push(...qA(n,i,{expand:!0})):r.push(...s$e(n,i));for(const o of r){if(!o.hasAttribute("listType"))continue;const s=zs.first(o,{sameIndent:!0});s&&i.setAttribute("listType",s.getAttribute("listType"),o)}this._fireAfterExecute(r)})}_fireAfterExecute(e){this.fire("afterExecute",Yf(new Set(e)))}_checkEnabled(){let e=KF(this.editor.model.document.selection),n=e[0];if(!n)return!1;if(this._direction=="backward"||mb(e)&&!Lc(e[0]))return!0;e=g0(e),n=e[0];const i=zs.first(n,{sameIndent:!0});return i?i.getAttribute("listType")==n.getAttribute("listType"):!1}}function KF(t){const e=Array.from(t.getSelectedBlocks()),n=e.findIndex(i=>!ti(i));return n!=-1&&(e.length=n),e}class wy extends Ht{type;_listWalkerOptions;constructor(e,n,i={}){super(e),this.type=n,this._listWalkerOptions=i.multiLevel?{higherIndent:!0,lowerIndent:!0,sameAttributes:[]}:void 0}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const n=this.editor.model,i=n.document,r=gb(n),o=Array.from(i.selection.getSelectedBlocks()).filter(a=>n.schema.checkAttribute(a,"listType")||vE(a,n.schema)),s=e.forceValue!==void 0?!e.forceValue:this.value;n.change(a=>{if(s){const l=o[o.length-1],u=Oc(l,{direction:"forward"}),c=[];u.length>1&&c.push(...AO(u[1],a)),c.push(...ES(o,a)),c.push(...a$e(l,a)),this._fireAfterExecute(c)}else if((r||i.selection.isCollapsed)&&ti(o[0])){const l=VX(r||o[0],this._listWalkerOptions);for(const u of l)a.setAttributes({...e.additionalAttributes,listType:this.type},u);this._fireAfterExecute(l)}else{const l=[];for(const u of o)if(!u.hasAttribute("listType"))!u.is("element","listItem")&&vE(u,n.schema)&&a.rename(u,"listItem"),a.setAttributes({...e.additionalAttributes,listIndent:0,listItemId:Qm.next(),listType:this.type},u),l.push(u);else for(const c of g0(u,{withNested:!1}))c.getAttribute("listType")!=this.type&&(a.setAttributes({...e.additionalAttributes,listType:this.type},c),l.push(c));this._fireAfterExecute(l)}})}_fireAfterExecute(e){this.fire("afterExecute",Yf(new Set(e)))}_getValue(){const e=this.editor.model.document.selection,n=Array.from(e.getSelectedBlocks());if(!n.length)return!1;for(const i of n)if(i.getAttribute("listType")!=this.type)return!1;return!0}_checkEnabled(){const e=this.editor.model,n=e.schema,i=e.document.selection,r=Array.from(i.getSelectedBlocks());if(!r.length)return!1;if(this.value)return!0;for(const o of r)if(n.checkAttribute(o,"listType")||vE(o,n))return!0;return!1}}class GF extends Ht{_direction;constructor(e,n){super(e),this._direction=n}refresh(){this.isEnabled=this._checkEnabled()}execute({shouldMergeOnBlocksContentLevel:e=!1}={}){const n=this.editor.model,i=n.document.selection,r=[];n.change(o=>{const{firstElement:s,lastElement:a}=this._getMergeSubjectElements(i,e),l=s.getAttribute("listIndent")||0,u=a.getAttribute("listIndent"),c=a.getAttribute("listItemId");if(l!=u){const d=r$e(a);r.push(...qA([a,...d],o,{indentBy:l-u,expand:l<u}))}if(e){let d=i;i.isCollapsed&&(d=o.createSelection(o.createRange(o.createPositionAt(s,"end"),o.createPositionAt(a,0)))),n.deleteContent(d,{doNotResetEntireContent:i.isCollapsed});const f=d.getLastPosition().parent,h=f.nextSibling;r.push(f),h&&h!==a&&h.getAttribute("listItemId")==c&&r.push(...WA(h,f,o))}else r.push(...WA(a,s,o));this._fireAfterExecute(r)})}_fireAfterExecute(e){this.fire("afterExecute",Yf(new Set(e)))}_checkEnabled(){const e=this.editor.model,n=e.document.selection,i=gb(e);if(n.isCollapsed||i){const r=i||n.getFirstPosition().parent;if(!ti(r))return!1;const o=this._direction=="backward"?r.previousSibling:r.nextSibling;if(!o||mb([r,o]))return!1}else{const r=n.getLastPosition(),o=n.getFirstPosition();if(r.parent===o.parent||!ti(r.parent))return!1}return!0}_getMergeSubjectElements(e,n){const i=this.editor.model,r=gb(i);let o,s;if(e.isCollapsed||r){const a=r||e.getFirstPosition().parent,l=Lc(a);this._direction=="backward"?(s=a,l&&!n?o=zs.first(a,{sameIndent:!0,lowerIndent:!0}):o=a.previousSibling):(o=a,s=a.nextSibling)}else o=e.getFirstPosition().parent,s=e.getLastPosition().parent;return{firstElement:o,lastElement:s}}}class YF extends Ht{_direction;constructor(e,n){super(e),this._direction=n}refresh(){this.isEnabled=this._checkEnabled()}execute(){this.editor.model.change(n=>{const i=AO(this._getStartBlock(),n);this._fireAfterExecute(i)})}_fireAfterExecute(e){this.fire("afterExecute",Yf(new Set(e)))}_checkEnabled(){const e=this.editor.model.document.selection,n=this._getStartBlock();return e.isCollapsed&&ti(n)&&!Lc(n)}_getStartBlock(){const n=this.editor.model.document.selection.getFirstPosition().parent;return this._direction=="before"?n:n.nextSibling}}class c$e extends xe{static get pluginName(){return"ListItemBoldIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[pa]}init(){const e=this.editor,n=e.plugins.get("ListFormatting"),i=e.plugins.get(pa);!e.plugins.has("BoldEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.registerFormatAttribute("bold","listItemBold"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemBold",setAttributeOnDowncast(r,o,s,a){o&&(r.addClass("ck-list-marker-bold",s),vt.isSafari&&!(a&&a.dataPipeline)&&r.setStyle("--ck-content-list-marker-dummy-bold","0",s))}}))}afterInit(){const e=this.editor,n=e.model;!e.plugins.has("BoldEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.schema.extend("$listItem",{allowAttributes:"listItemBold"}),n.schema.setAttributeProperties("listItemBold",{isFormatting:!0}),n.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemBold"),e.conversion.for("upcast").attributeToAttribute({model:"listItemBold",view:{name:"li",classes:"ck-list-marker-bold"}}))}}class d$e extends xe{static get pluginName(){return"ListItemItalicIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[pa]}init(){const e=this.editor,n=e.plugins.get("ListFormatting"),i=e.plugins.get(pa);!e.plugins.has("ItalicEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.registerFormatAttribute("italic","listItemItalic"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemItalic",setAttributeOnDowncast(r,o,s,a){o&&(r.addClass("ck-list-marker-italic",s),vt.isSafari&&!(a&&a.dataPipeline)&&r.setStyle("--ck-content-list-marker-dummy-italic","0",s))}}))}afterInit(){const e=this.editor,n=e.model;!e.plugins.has("ItalicEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.schema.extend("$listItem",{allowAttributes:"listItemItalic"}),n.schema.setAttributeProperties("listItemItalic",{isFormatting:!0}),n.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemItalic"),e.conversion.for("upcast").attributeToAttribute({model:"listItemItalic",view:{name:"li",classes:"ck-list-marker-italic"}}))}}class f$e extends xe{static get pluginName(){return"ListItemFontSizeIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[pa]}init(){const e=this.editor,n=e.plugins.get("ListFormatting"),i=e.plugins.get(pa);if(!e.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;const r=hb(e.config.get("fontSize.options"));n.registerFormatAttribute("fontSize","listItemFontSize"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontSize",setAttributeOnDowncast(o,s,a,l){if(s){const u=r.find(c=>c.model==s);u&&u.view&&typeof u.view!="string"?u.view.styles?(o.addClass("ck-list-marker-font-size",a),o.setStyle("--ck-content-list-marker-font-size",u.view.styles["font-size"],a)):u.view.classes&&(o.addClass(`ck-list-marker-font-size-${s}`,a),vt.isSafari&&!(l&&l.dataPipeline)&&o.setStyle("--ck-content-list-marker-dummy-font-size","0",a)):(o.addClass("ck-list-marker-font-size",a),o.setStyle("--ck-content-list-marker-font-size",s,a))}}})}afterInit(){const e=this.editor,n=e.model;if(!e.plugins.has("FontSizeEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting"))return;n.schema.extend("$listItem",{allowAttributes:"listItemFontSize"}),n.schema.setAttributeProperties("listItemFontSize",{isFormatting:!0}),n.schema.addAttributeCheck(r=>{if(!r.last.getAttribute("listItemId"))return!1},"listItemFontSize"),e.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:r=>r.getStyle("--ck-content-list-marker-font-size")},view:{name:"li",classes:"ck-list-marker-font-size",styles:{"--ck-content-list-marker-font-size":/.*/}}});const i=hb(e.config.get("fontSize.options"));for(const r of i)r.model&&r.view&&e.conversion.for("upcast").elementToAttribute({model:{key:"listItemFontSize",value:r.model},view:{name:"li",classes:`ck-list-marker-font-size-${r.model}`}})}}class h$e extends xe{static get pluginName(){return"ListItemFontColorIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[pa]}init(){const e=this.editor,n=e.plugins.get("ListFormatting"),i=e.plugins.get(pa);!e.plugins.has("FontColorEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.registerFormatAttribute("fontColor","listItemFontColor"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontColor",setAttributeOnDowncast(r,o,s){o&&(r.addClass("ck-list-marker-color",s),r.setStyle("--ck-content-list-marker-color",o,s))}}))}afterInit(){const e=this.editor,n=e.model;!e.plugins.has("FontColorEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.schema.extend("$listItem",{allowAttributes:"listItemFontColor"}),n.schema.setAttributeProperties("listItemFontColor",{isFormatting:!0}),n.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemFontColor"),e.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontColor",value:i=>i.getStyle("--ck-content-list-marker-color")},view:{name:"li",classes:"ck-list-marker-color",styles:{"--ck-content-list-marker-color":/.*/}}}))}}class m$e extends xe{static get pluginName(){return"ListItemFontFamilyIntegration"}static get isOfficialPlugin(){return!0}static get requires(){return[pa]}init(){const e=this.editor,n=e.plugins.get("ListFormatting"),i=e.plugins.get(pa);!e.plugins.has("FontFamilyEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.registerFormatAttribute("fontFamily","listItemFontFamily"),i.registerDowncastStrategy({scope:"item",attributeName:"listItemFontFamily",setAttributeOnDowncast(r,o,s){o&&(r.addClass("ck-list-marker-font-family",s),r.setStyle("--ck-content-list-marker-font-family",o,s))}}))}afterInit(){const e=this.editor,n=e.model;!e.plugins.has("FontFamilyEditing")||!this.editor.config.get("list.enableListItemMarkerFormatting")||(n.schema.extend("$listItem",{allowAttributes:"listItemFontFamily"}),n.schema.setAttributeProperties("listItemFontFamily",{isFormatting:!0}),n.schema.addAttributeCheck(i=>{if(!i.last.getAttribute("listItemId"))return!1},"listItemFontFamily"),e.conversion.for("upcast").attributeToAttribute({model:{key:"listItemFontFamily",value:i=>i.getStyle("--ck-content-list-marker-font-family")},view:{name:"li",classes:"ck-list-marker-font-family",styles:{"--ck-content-list-marker-font-family":/.*/}}}))}}class g$e extends xe{_loadedFormatting={};static get pluginName(){return"ListFormatting"}static get isOfficialPlugin(){return!0}static get requires(){return[c$e,d$e,f$e,h$e,m$e]}constructor(e){super(e),e.config.define("list.enableListItemMarkerFormatting",!0)}afterInit(){this.editor.config.get("list.enableListItemMarkerFormatting")&&this._registerPostfixerForListItemFormatting()}_registerPostfixerForListItemFormatting(){const e=this.editor.model;e.document.registerPostFixer(n=>{const i=e.document.differ.getChanges(),r=new Set;let o=!1;for(const s of i)if(s.type==="attribute")(s.attributeKey=="listItemId"||s.attributeKey=="listType"||this._isInlineOrSelectionFormatting(s.attributeKey)||Object.values(this._loadedFormatting).includes(s.attributeKey))&&(ti(s.range.start.nodeAfter)?r.add(s.range.start.nodeAfter):ti(s.range.start.parent)&&r.add(s.range.start.parent));else if(ti(s.position.nodeAfter)&&r.add(s.position.nodeAfter),ti(s.position.nodeBefore)&&r.add(s.position.nodeBefore),ti(s.position.parent)&&r.add(s.position.parent),s.type=="insert"&&s.name!="$text"){const a=n.createRangeIn(s.position.nodeAfter);for(const l of a.getItems())ti(l)&&r.add(l)}for(const s of r){const a=p$e(e,s,Object.keys(this._loadedFormatting));for(const[l,u]of Object.entries(a)){const c=this._loadedFormatting[l];(u&&v$e(n,s,c,u)||!u&&b$e(n,s,c))&&(o=!0)}}return o})}registerFormatAttribute(e,n){this._loadedFormatting[e]=n}_isInlineOrSelectionFormatting(e){return e.replace(/^selection:/,"")in this._loadedFormatting}}function p$e(t,e,n){if(Lc(e))return XF(t,e,n);const i=_g(e);return XF(t,i[0],n)}function XF(t,e,n){if(!y$e(e)||t.schema.isLimit(e))return Object.fromEntries(n.map(a=>[a]));if(e.isEmpty)return Object.fromEntries(n.map(a=>[a,e.getAttribute(`selection:${a}`)]));const i=new Set(n),r={},s=t.createRangeIn(e).getWalker({ignoreElementEnd:!0});for(const{item:a}of s){for(const l of i)if(t.schema.checkAttribute(a,l)){const u=a.getAttribute(l);u===void 0?(i.delete(l),r[l]=void 0):r[l]===void 0?r[l]=u:r[l]!==u&&(i.delete(l),r[l]=void 0)}else l in r||(r[l]=void 0);if(!i.size)break;t.schema.isLimit(a)&&s.jumpTo(t.createPositionAfter(a))}return r}function v$e(t,e,n,i){const r=_g(e);let o=!1;for(const s of r)(!s.hasAttribute(n)||s.getAttribute(n)!==i)&&(t.setAttribute(n,i,s),o=!0);return o}function b$e(t,e,n){const i=_g(e);let r=!1;for(const o of i)o.hasAttribute(n)&&(t.removeAttribute(n,o),r=!0);return r}function y$e(t){return["numbered","bulleted","customNumbered","customBulleted"].includes(t.getAttribute("listType"))}class w$e extends xe{static get pluginName(){return"ListUtils"}static get isOfficialPlugin(){return!0}expandListBlocksToCompleteList(e){return o$e(e)}isFirstBlockOfListItem(e){return Lc(e)}isListItemBlock(e){return ti(e)}expandListBlocksToCompleteItems(e,n={}){return g0(e,n)}isNumberedListType(e){return l$e(e)}}function _$e(t){return t.is("element","ol")||t.is("element","ul")}function jA(t){return t.is("element","li")}function C$e(t){let e=0,n=t.parent;for(;n;){if(jA(n))e++;else{const i=n.previousSibling;i&&jA(i)&&e++}n=n.parent}return e}function S$e(t,e,n,i=$X(n,e)){return t.createAttributeElement(FX(n),null,{priority:2*e/100-100,id:i})}function k$e(t,e,n){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:n})}function FX(t){return t=="numbered"||t=="customNumbered"?"ol":"ul"}function $X(t,e){return`list-${t}-${e}`}function Zs(t,e,n){const i=t.nodeBefore;if(ti(i)){let r=i;for(const{node:o}of new m0(r,"backward"))if(r=o,n.has(r)||(n.add(r),e.has(i)))return;e.add(r)}else{const r=t.nodeAfter;ti(r)&&e.add(r)}}function T$e(t,e){let n=0,i=-1,r=null,o=!1;for(const{node:s}of t){const a=s.getAttribute("listIndent");if(a>n){let l;r===null?(r=a-n,l=n):(r>a&&(r=a),l=a-r),l>i+1&&(l=i+1),e.setAttribute("listIndent",l,s),o=!0,i=l}else r=null,n=a+1,i=a}return o}function E$e(t,e,n){const i=new Set;let r=!1;for(const{node:o}of t){if(i.has(o))continue;let s=o.getAttribute("listType"),a=o.getAttribute("listItemId");if(e.has(a)&&(a=Qm.next()),e.add(a),o.is("element","listItem")){o.getAttribute("listItemId")!=a&&(n.setAttribute("listItemId",a,o),r=!0);continue}for(const l of Oc(o,{direction:"forward"}))i.add(l),l.getAttribute("listType")!=s&&(a=Qm.next(),s=l.getAttribute("listType")),l.getAttribute("listItemId")!=a&&(n.setAttribute("listItemId",a,l),r=!0)}return r}function x$e(){return(t,e,n)=>{const{writer:i,schema:r}=n;if(!e.modelRange)return;const o=Array.from(e.modelRange.getItems({shallow:!0})).filter(d=>r.checkAttribute(d,"listItemId"));if(!o.length)return;const s=e.viewItem.getAttribute("data-list-item-id")||Qm.next();n.consumable.consume(e.viewItem,{attributes:"data-list-item-id"});const a=C$e(e.viewItem);let l=e.viewItem.parent&&e.viewItem.parent.is("element","ol")?"numbered":"bulleted";const u=o[0].getAttribute("listType");u&&(l=u);const c={listItemId:s,listIndent:a,listType:l};for(const d of o)d.hasAttribute("listItemId")||i.setAttributes(c,d);o.length>1&&o[1].getAttribute("listItemId")!=c.listItemId&&n.keepEmptyElement(o[0])}}function A$e(t,e,n,i){return()=>{const l=t.document.differ.getChanges(),u=[],c=new Set,d=new Set,f=new Set;for(const h of l)if(h.type=="insert"&&h.name!="$text")Zs(h.position,c,f),h.attributes.has("listItemId")?d.add(h.position.nodeAfter):Zs(h.position.getShiftedBy(h.length),c,f);else if(h.type=="remove"&&h.attributes.has("listItemId"))Zs(h.position,c,f);else if(h.type=="attribute"){const m=h.range.start.nodeAfter;n.includes(h.attributeKey)?(Zs(h.range.start,c,f),h.attributeNewValue===null?(Zs(h.range.start.getShiftedBy(1),c,f),o(m)&&u.push(m)):d.add(m)):ti(m)&&o(m)&&u.push(m)}for(const h of c.values())u.push(...r(h,d));for(const h of new Set(u))e.reconvertItem(h)};function r(l,u){const c=[],d=new Set,f=[];for(const{node:h,previous:m}of new m0(l)){if(d.has(h))continue;const g=h.getAttribute("listIndent");m&&g<m.getAttribute("listIndent")&&(f.length=g+1),f[g]={modelAttributes:Object.fromEntries(Array.from(h.getAttributes()).filter(([p])=>n.includes(p))),modelElement:h};const v=Oc(h,{direction:"forward"});for(const p of v)d.add(p),(o(p,v)||a(p,f,u))&&c.push(p)}return c}function o(l,u){const c=e.mapper.toViewElement(l);if(!c)return!1;if(s(c)||i.fire("checkElement",{modelElement:l,viewElement:c}))return!0;if(!l.is("element","paragraph")&&!l.is("element","listItem"))return!1;const f=HX(l,n,u);return f&&c.is("element","p")?!0:!!(!f&&c.is("element","span"))}function s(l){for(l=l.parent;l.is("attributeElement")&&["ol","ul","li"].includes(l.name);)l=l.parent;return!!(l.getCustomProperty("$structureSlotParent")&&!e.mapper.toModelElement(l))}function a(l,u,c){if(c.has(l))return!1;const d=e.mapper.toViewElement(l);let f=u.length-1;for(let h=d.parent;!h.is("editableElement");h=h.parent){const m=jA(h),g=_$e(h);if(!g&&!m)continue;const v=`checkAttributes:${m?"item":"list"}`;if(i.fire(v,{viewElement:h,modelAttributes:u[f].modelAttributes,modelReferenceElement:u[f].modelElement}))break;if(g&&(f--,f<0))return!1}return!0}}function JF(t,e,n,{dataPipeline:i}={}){const r=D$e(t,e);return(o,s,a)=>{const{writer:l,mapper:u,consumable:c}=a,d=s.item;if(!t.includes(s.attributeKey)||!r(d,c))return;const f={...a.options,dataPipeline:i},h=I$e(d,u,n,l);zX(h,l,u),O$e(h,l);const m=M$e(d,h,e,l,f);L$e(d,m,e,l,f)}}function P$e(t){return(e,n,i)=>{const{writer:r,mapper:o}=i,s=e.name.split(":")[1];if(!t.checkAttribute(s,"listItemId"))return;const a=o.toViewPosition(n.position),l=n.position.getShiftedBy(n.length),u=o.toViewPosition(l,{isPhantom:!0}),d=r.createRange(a,u).getTrimmed().end.nodeBefore;d&&zX(d,r,o)}}function ZF(t,{dataPipeline:e}={}){return(n,{writer:i})=>{if(!HX(n,t))return null;if(!e)return i.createContainerElement("span",{class:"ck-list-bogus-paragraph"});const r=i.createContainerElement("p");return i.setCustomProperty("dataPipeline:transparentRendering",!0,r),r}}function I$e(t,e,n,i){const r=n.createRangeOn(t),s=e.toViewRange(r).getTrimmed().getWalker();for(const{item:a}of s)if(a.is("element")&&a.getCustomProperty("listItemMarker"))s.jumpTo(i.createPositionAfter(a));else if(a.is("element")&&!a.getCustomProperty("listItemWrapper"))return a}function R$e(t,e){return(n,i)=>{if(i.modelPosition.offset>0)return;const r=i.modelPosition.parent;if(!ti(r)||!t.some(u=>u.scope=="itemMarker"&&u.canInjectMarkerIntoElement&&u.canInjectMarkerIntoElement(r)))return;const o=i.mapper.toViewElement(r),s=e.createRangeIn(o),a=s.getWalker();let l=s.start;for(const{item:u}of a){if(u.is("element")&&i.mapper.toModelElement(u)||u.is("$textProxy"))break;u.is("element")&&u.getCustomProperty("listItemMarker")&&(l=e.createPositionAfter(u),a.skip(({previousPosition:c})=>!c.isEqual(l)))}i.viewPosition=l}}function zX(t,e,n){for(;t.parent.is("attributeElement")&&t.parent.getCustomProperty("listItemWrapper");)e.unwrap(e.createRangeOn(t),t.parent);const i=[];r(e.createPositionBefore(t).getWalker({direction:"backward"})),r(e.createRangeIn(t).getWalker());for(const o of i)e.remove(o);function r(o){for(const{item:s}of o){if(s.is("element")&&n.toModelElement(s))break;s.is("element")&&s.getCustomProperty("listItemMarker")&&i.push(s)}}}function M$e(t,e,n,i,{dataPipeline:r}){let o=i.createRangeOn(e);if(!Lc(t))return o;for(const s of n){if(s.scope!="itemMarker")continue;const a=s.createElement(i,t,{dataPipeline:r});if(!a||(i.setCustomProperty("listItemMarker",!0,a),s.canInjectMarkerIntoElement&&s.canInjectMarkerIntoElement(t)?i.insert(i.createPositionAt(e,0),a):(i.insert(o.start,a),o=i.createRange(i.createPositionBefore(a),i.createPositionAfter(e))),!s.createWrapperElement||!s.canWrapElement))continue;const l=s.createWrapperElement(i,t,{dataPipeline:r});i.setCustomProperty("listItemWrapper",!0,l),s.canWrapElement(t)?o=i.wrap(o,l):(o=i.wrap(i.createRangeOn(a),l),o=i.createRange(o.start,i.createPositionAfter(e)))}return o}function O$e(t,e){let n=t.parent;for(;n.is("attributeElement")&&["ul","ol","li"].includes(n.name);){const i=n.parent;e.unwrap(e.createRangeOn(t),n),n=i}}function L$e(t,e,n,i,r){if(!t.hasAttribute("listIndent"))return;const o=t.getAttribute("listIndent");let s=t;for(let a=o;a>=0;a--){const l=k$e(i,a,s.getAttribute("listItemId")),u=S$e(i,a,s.getAttribute("listType"));for(const c of n)(c.scope=="list"||c.scope=="item")&&s.hasAttribute(c.attributeName)&&c.setAttributeOnDowncast(i,s.getAttribute(c.attributeName),c.scope=="list"?u:l,r,s);if(e=i.wrap(e,l),e=i.wrap(e,u),a==0||(s=zs.first(s,{lowerIndent:!0}),!s))break}}function D$e(t,e){const n=e.filter(i=>i.consume===!1).map(i=>i.attributeName);return(i,r)=>{const o=[];for(const s of t)i.hasAttribute(s)&&!n.includes(s)&&o.push(`attribute:${s}`);return o.every(s=>r.test(i,s)!==!1)?(o.forEach(s=>r.consume(i,s)),!0):!1}}function HX(t,e,n=_g(t)){if(!ti(t))return!1;for(const i of t.getAttributeKeys())if(!(i.startsWith("selection:")||i=="htmlEmptyBlock")&&!e.includes(i))return!1;return n.length<2}const i_=["listType","listIndent","listItemId"];class pa extends xe{_downcastStrategies=[];static get pluginName(){return"ListEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[kS,yu,w$e,fs,g$e]}constructor(e){super(e),e.config.define("list.multiBlock",!0)}init(){const e=this.editor,n=e.model,i=e.config.get("list.multiBlock");if(e.plugins.has("LegacyListEditing"))throw new oe("list-feature-conflict",this,{conflictPlugin:"LegacyListEditing"});n.schema.register("$listItem",{allowAttributes:i_}),i?(n.schema.extend("$container",{allowAttributesOf:"$listItem"}),n.schema.extend("$block",{allowAttributesOf:"$listItem"}),n.schema.extend("$blockObject",{allowAttributesOf:"$listItem"})):n.schema.register("listItem",{inheritAllFrom:"$block",allowAttributesOf:"$listItem"});for(const r of i_)n.schema.setAttributeProperties(r,{copyOnReplace:!0});e.commands.add("numberedList",new wy(e,"numbered")),e.commands.add("bulletedList",new wy(e,"bulleted")),e.commands.add("customNumberedList",new wy(e,"customNumbered",{multiLevel:!0})),e.commands.add("customBulletedList",new wy(e,"customBulleted",{multiLevel:!0})),e.commands.add("indentList",new jF(e,"forward")),e.commands.add("outdentList",new jF(e,"backward")),e.commands.add("splitListItemBefore",new YF(e,"before")),e.commands.add("splitListItemAfter",new YF(e,"after")),i&&(e.commands.add("mergeListItemBackward",new GF(e,"backward")),e.commands.add("mergeListItemForward",new GF(e,"forward"))),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration(),this._setupAccessibilityIntegration(),this._setupListItemIdConversionStrategy()}afterInit(){const n=this.editor.commands,i=n.get("indent"),r=n.get("outdent");i&&i.registerChildCommand(n.get("indentList"),{priority:"high"}),r&&r.registerChildCommand(n.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(e){this._downcastStrategies.push(e)}getListAttributeNames(){return[...i_,...this._downcastStrategies.map(e=>e.attributeName)]}_setupDeleteIntegration(){const e=this.editor,n=e.commands.get("mergeListItemBackward"),i=e.commands.get("mergeListItemForward");this.listenTo(e.editing.view.document,"delete",(r,o)=>{const s=e.model.document.selection;gb(e.model)||e.model.change(()=>{const a=s.getFirstPosition();if(s.isCollapsed&&o.direction=="backward"){if(!a.isAtStart)return;const l=a.parent;if(!ti(l))return;if(!zs.first(l,{sameAttributes:"listType",sameIndent:!0})&&l.getAttribute("listIndent")===0)qF(l)||e.execute("splitListItemAfter"),e.execute("outdentList");else{if(!n||!n.isEnabled)return;n.execute({shouldMergeOnBlocksContentLevel:QF(e.model,"backward")})}o.preventDefault(),r.stop()}else{if(s.isCollapsed&&!s.getLastPosition().isAtEnd||!i||!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:QF(e.model,"forward")}),o.preventDefault(),r.stop()}})},{context:"li"})}_setupEnterIntegration(){const e=this.editor,n=e.model,i=e.commands,r=i.get("enter");this.listenTo(e.editing.view.document,"enter",(o,s)=>{const a=n.document,l=a.selection.getFirstPosition().parent;if(a.selection.isCollapsed&&ti(l)&&l.isEmpty&&!s.isSoft){const u=Lc(l),c=qF(l);u&&c?(e.execute("outdentList"),s.preventDefault(),o.stop()):u&&!c?(e.execute("splitListItemAfter"),s.preventDefault(),o.stop()):c&&(e.execute("splitListItemBefore"),s.preventDefault(),o.stop())}},{context:"li"}),this.listenTo(r,"afterExecute",()=>{const o=i.get("splitListItemBefore");if(o.refresh(),!o.isEnabled)return;const a=e.model.document.selection.getLastPosition().parent;_g(a).length===2&&o.execute()})}_setupTabIntegration(){const e=this.editor;this.listenTo(e.editing.view.document,"tab",(n,i)=>{const r=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(r).isEnabled&&(e.execute(r),i.stopPropagation(),i.preventDefault(),n.stop())},{context:"li"})}_setupConversion(){const e=this.editor,n=e.model,i=this.getListAttributeNames(),r=e.config.get("list.multiBlock"),o=r?"paragraph":"listItem";e.conversion.for("upcast").elementToElement({view:"li",model:(a,{writer:l})=>l.createElement(o,{listType:""})}).elementToElement({view:"p",model:(a,{writer:l})=>a.parent&&a.parent.is("element","li")?l.createElement(o,{listType:""}):null,converterPriority:"high"}).add(a=>{a.on("element:li",x$e())}),r||e.conversion.for("downcast").elementToElement({model:"listItem",view:"p"}),e.conversion.for("editingDowncast").elementToElement({model:o,view:ZF(i),converterPriority:"high"}).add(a=>{a.on("attribute",JF(i,this._downcastStrategies,n)),a.on("remove",P$e(n.schema))}),e.conversion.for("dataDowncast").elementToElement({model:o,view:ZF(i,{dataPipeline:!0}),converterPriority:"high"}).add(a=>{a.on("attribute",JF(i,this._downcastStrategies,n,{dataPipeline:!0}))});const s=R$e(this._downcastStrategies,e.editing.view);e.editing.mapper.on("modelToViewPosition",s),e.data.mapper.on("modelToViewPosition",s),this.listenTo(n.document,"change:data",A$e(n,e.editing,i,this),{priority:"high"}),this.on("checkAttributes:item",(a,{viewElement:l,modelAttributes:u})=>{l.id!=u.listItemId&&(a.return=!0,a.stop())}),this.on("checkAttributes:list",(a,{viewElement:l,modelAttributes:u})=>{(l.name!=FX(u.listType)||l.id!=$X(u.listType,u.listIndent))&&(a.return=!0,a.stop())})}_setupModelPostFixing(){const e=this.editor.model,n=this.getListAttributeNames();e.document.registerPostFixer(i=>N$e(e,i,n,this)),this.on("postFixer",(i,{listNodes:r,writer:o})=>{i.return=T$e(r,o)||i.return},{priority:"high"}),this.on("postFixer",(i,{listNodes:r,writer:o,seenIds:s})=>{i.return=E$e(r,s,o)||i.return},{priority:"high"})}_setupClipboardIntegration(){const e=this.editor.model,n=this.editor.plugins.get("ClipboardPipeline");this.listenTo(e,"insertContent",B$e(e),{priority:"high"}),this.listenTo(n,"outputTransformation",(i,r)=>{e.change(o=>{const s=Array.from(r.content.getChildren()),a=s[s.length-1];if(s.length>1&&a.is("element")&&a.isEmpty&&s.slice(0,-1).every(ti)&&o.remove(a),r.method=="copy"||r.method=="cut"){const l=Array.from(r.content.getChildren());mb(l)&&ES(l,o)}})})}_setupAccessibilityIntegration(){const e=this.editor,n=e.t;e.accessibility.addKeystrokeInfoGroup({id:"list",label:n("Keystrokes that can be used in a list"),keystrokes:[{label:n("Increase list item indent"),keystroke:"Tab"},{label:n("Decrease list item indent"),keystroke:"Shift+Tab"}]})}_setupListItemIdConversionStrategy(){this.registerDowncastStrategy({scope:"item",attributeName:"listItemId",setAttributeOnDowncast(e,n,i,r){r&&(r.skipListItemIds||r.isClipboardPipeline)||e.setAttribute("data-list-item-id",n,i)}})}}function N$e(t,e,n,i){const r=t.document.differ.getChanges(),o=new Set,s=new Set,a=i.editor.config.get("list.multiBlock");let l=!1;for(const c of r){if(c.type=="insert"&&c.name!="$text"){const d=c.position.nodeAfter;if(!t.schema.checkAttribute(d,"listItemId"))for(const f of Array.from(d.getAttributeKeys()))n.includes(f)&&(e.removeAttribute(f,d),l=!0);Zs(c.position,s,o),c.attributes.has("listItemId")||Zs(c.position.getShiftedBy(c.length),s,o);for(const{item:f,previousPosition:h}of t.createRangeIn(d))ti(f)&&Zs(h,s,o)}else c.type=="remove"?Zs(c.position,s,o):c.type=="attribute"&&n.includes(c.attributeKey)&&(Zs(c.range.start,s,o),c.attributeNewValue===null&&Zs(c.range.start.getShiftedBy(1),s,o));if(!a&&c.type=="attribute"&&i_.includes(c.attributeKey)){const d=c.range.start.nodeAfter;c.attributeNewValue===null&&d&&d.is("element","listItem")?(e.rename(d,"paragraph"),l=!0):c.attributeOldValue===null&&d&&d.is("element")&&d.name!="listItem"&&(e.rename(d,"listItem"),l=!0)}}const u=new Set;for(const c of s.values())l=i.fire("postFixer",{listNodes:new i$e(c),listHead:c,writer:e,seenIds:u})||l;return l}function B$e(t){return(e,[n,i])=>{const r=n.is("documentFragment")?Array.from(n.getChildren()):[n];if(!r.length)return;const s=(i?t.createSelection(i):t.document.selection).getFirstPosition();let a;if(ti(s.parent))a=s.parent;else if(ti(s.nodeBefore)&&ti(s.nodeAfter))a=s.nodeBefore;else return;t.change(l=>{const u=a.getAttribute("listType"),c=a.getAttribute("listIndent"),d=r[0].getAttribute("listIndent")||0,f=Math.max(c-d,0);for(const h of r){const m=ti(h);a.is("element","listItem")&&h.is("element","paragraph")&&l.rename(h,"listItem"),l.setAttributes({listIndent:(m?h.getAttribute("listIndent"):0)+f,listItemId:m?h.getAttribute("listItemId"):Qm.next(),listType:u},h)}})}}function QF(t,e){const n=t.document.selection;if(!n.isCollapsed)return!gb(t);if(e==="forward")return!0;const r=n.getFirstPosition().parent,o=r.previousSibling;return t.schema.isObject(o)?!1:o.isEmpty?!0:mb([r,o])}function e6(t,e,n,i){t.ui.componentFactory.add(e,()=>{const r=t6(wt,t,e,n,i);return r.set({tooltip:!0,isToggleable:!0}),r}),t.ui.componentFactory.add(`menuBar:${e}`,()=>{const r=t6(Wi,t,e,n,i);return r.set({role:"menuitemcheckbox",isToggleable:!0}),r})}function t6(t,e,n,i,r){const o=e.commands.get(n),s=new t(e.locale);return s.set({label:i,icon:r}),s.bind("isOn","isEnabled").to(o,"value","isEnabled"),s.on("execute",()=>{e.execute(n),e.editing.view.focus()}),s}class V$e extends xe{static get pluginName(){return"ListUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor.t;this.editor.ui.componentFactory.has("numberedList")||e6(this.editor,"numberedList",e("Numbered List"),tNe),this.editor.ui.componentFactory.has("bulletedList")||e6(this.editor,"bulletedList",e("Bulleted List"),FDe)}}class F$e extends xe{static get requires(){return[pa,V$e]}static get pluginName(){return"List"}static get isOfficialPlugin(){return!0}}const $$e=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:t,typeAttribute:e,listType:n}of $$e);function n6(t,e){const n=(i,r,o)=>{if(!o.consumable.consume(r.item,i.name))return;const s=r.attributeNewValue,a=o.writer,l=o.mapper.toViewElement(r.item),u=[...l.getChildren()].find(d=>d.getCustomProperty("media-content"));a.remove(u);const c=t.getMediaViewElement(a,s,e);a.insert(a.createPositionAt(l,0),c)};return i=>{i.on("attribute:url:media",n)}}function z$e(t,e,n){return e.setCustomProperty("media",!0,t),vO(t,e,{label:n})}function i6(t,e,n,i){return t.createContainerElement("figure",{class:"media"},[e.getMediaViewElement(t,n,i),t.createSlot()])}function r6(t){const e=t.getSelectedElement();return e&&e.is("element","media")?e:null}function UX(t,e,n,i){t.change(r=>{const o=r.createElement("media",{url:e});t.insertObject(o,n,null,{setSelection:"on",findOptimalPosition:i?"auto":void 0})})}class H$e extends Ht{refresh(){const e=this.editor.model,n=e.document.selection,i=r6(n);this.value=i?i.getAttribute("url"):void 0,this.isEnabled=W$e(n)||U$e(n,e)}execute(e){const n=this.editor.model,i=n.document.selection,r=r6(i);r?n.change(o=>{o.setAttribute("url",e,r)}):UX(n,e,i,!0)}}function U$e(t,e){let i=iX(t,e).start.parent;return i.isEmpty&&!e.schema.isLimit(i)&&(i=i.parent),e.schema.checkChild(i,"media")}function W$e(t){const e=t.getSelectedElement();return!!e&&e.name==="media"}const q$e="0 0 64 42";class j$e{locale;providerDefinitions;constructor(e,n){const i=n.providers,r=n.extraProviders||[],o=new Set(n.removeProviders),s=i.concat(r).filter(a=>{const l=a.name;return l?!o.has(l):(hn("media-embed-no-provider-name",{provider:a}),!1)});this.locale=e,this.providerDefinitions=s}hasMedia(e){return!!this._getMedia(e)}getMediaViewElement(e,n,i){return this._getMedia(n).getViewElement(e,i)}_getMedia(e){if(!e)return new o6(this.locale);e=e.trim();for(const n of this.providerDefinitions){const i=n.html,r=li(n.url);for(const o of r){const s=this._getUrlMatches(e,o);if(s)return new o6(this.locale,e,s,i)}}return null}_getUrlMatches(e,n){let i=e.match(n);if(i)return i;let r=e.replace(/^https?:\/\//,"");return i=r.match(n),i||(r=r.replace(/^www\./,""),i=r.match(n),i)?i:null}}class o6{url;_locale;_match;_previewRenderer;constructor(e,n,i,r){this.url=this._getValidUrl(n),this._locale=e,this._match=i,this._previewRenderer=r}getViewElement(e,n){const i={};let r;if(n.renderForEditingView||n.renderMediaPreview&&this.url&&this._previewRenderer){this.url&&(i["data-oembed-url"]=this.url),n.renderForEditingView&&(i.class="ck-media__wrapper");const o=this._getPreviewHtml(n);r=e.createRawElement("div",i,(s,a)=>{a.setContentOf(s,o)})}else this.url&&(i.url=this.url),r=e.createEmptyElement(n.elementName,i);return e.setCustomProperty("media-content",!0,r),r}_getPreviewHtml(e){return this._previewRenderer?this._previewRenderer(this._match):this.url&&e.renderForEditingView?this._getPlaceholderHtml():""}_getPlaceholderHtml(){const e=new Sa,n=this._locale.t;return e.content=QDe,e.viewBox=q$e,new Io({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url,"data-cke-tooltip-text":n("Open media in new tab")},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]}]}]}).render().outerHTML}_getValidUrl(e){return e?e.match(/^https?/)?e:"https://"+e:null}}class T1 extends xe{static get pluginName(){return"MediaEmbedEditing"}static get isOfficialPlugin(){return!0}registry;constructor(e){super(e),e.config.define("mediaEmbed",{elementName:"oembed",providers:[{name:"dailymotion",url:[/^dailymotion\.com\/video\/(\w+)/,/^dai.ly\/(\w+)/],html:n=>`<div style="position: relative; padding-bottom: 100%; height: 0; "><iframe src="https://www.dailymotion.com/embed/video/${n[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" width="480" height="270" allowfullscreen allow="autoplay"></iframe></div>`},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:n=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 126%;"><iframe src="https://open.spotify.com/embed/${n[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe></div>`},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,/^(?:m\.)?youtube\.com\/shorts\/([\w-]+)(?:\?t=(\d+))?/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,/^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,/^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/],html:n=>{const i=n[1],r=n[2];return`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://www.youtube.com/embed/${i}${r?`?start=${r}`:""}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" allow="autoplay; encrypted-media" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></div>`}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:n=>`<div style="position: relative; padding-bottom: 100%; height: 0; padding-bottom: 56.2493%;"><iframe src="https://player.vimeo.com/video/${n[1]}" style="position: absolute; width: 100%; height: 100%; top: 0; left: 0;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>`},{name:"instagram",url:[/^instagram\.com\/p\/(\w+)/,/^instagram\.com\/reel\/(\w+)/]},{name:"twitter",url:[/^twitter\.com/,/^x\.com/]},{name:"googleMaps",url:[/^google\.com\/maps/,/^goo\.gl\/maps/,/^maps\.google\.com/,/^maps\.app\.goo\.gl/]},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]}),this.registry=new j$e(e.locale,e.config.get("mediaEmbed"))}init(){const e=this.editor,n=e.model.schema,i=e.t,r=e.conversion,o=e.config.get("mediaEmbed.previewsInData"),s=e.config.get("mediaEmbed.elementName"),a=this.registry;e.commands.add("mediaEmbed",new H$e(e)),n.register("media",{inheritAllFrom:"$blockObject",allowAttributes:["url"]}),r.for("dataDowncast").elementToStructure({model:"media",view:(l,{writer:u})=>{const c=l.getAttribute("url");return i6(u,a,c,{elementName:s,renderMediaPreview:!!c&&o})}}),r.for("dataDowncast").add(n6(a,{elementName:s,renderMediaPreview:o})),r.for("editingDowncast").elementToStructure({model:"media",view:(l,{writer:u})=>{const c=l.getAttribute("url"),d=i6(u,a,c,{elementName:s,renderForEditingView:!0});return z$e(d,u,i("media widget"))}}),r.for("editingDowncast").add(n6(a,{elementName:s,renderForEditingView:!0})),r.for("upcast").elementToElement({view:l=>["oembed",s].includes(l.name)&&l.getAttribute("url")?{name:!0}:null,model:(l,{writer:u})=>{const c=l.getAttribute("url");return a.hasMedia(c)?u.createElement("media",{url:c}):null}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":!0}},model:(l,{writer:u})=>{const c=l.getAttribute("data-oembed-url");return a.hasMedia(c)?u.createElement("media",{url:c}):null}}).add(l=>{const u=(c,d,f)=>{if(!f.consumable.consume(d.viewItem,{name:!0,classes:"media"}))return;const{modelRange:h,modelCursor:m}=f.convertChildren(d.viewItem,d.modelCursor);d.modelRange=h,d.modelCursor=m,Mi(h.getItems())||f.consumable.revert(d.viewItem,{name:!0,classes:"media"})};l.on("element:figure",u)})}}const K$e=/^(?:http(s)?:\/\/)?[\w-]+\.[\w-.~:/?#[\]@!$&'()*+,;=%]+$/;class G$e extends xe{static get requires(){return[cX,yu,_O]}static get pluginName(){return"AutoMediaEmbed"}static get isOfficialPlugin(){return!0}_timeoutId;_positionToInsert;constructor(e){super(e),this._timeoutId=null,this._positionToInsert=null}init(){const e=this.editor,n=e.model.document,i=e.plugins.get("ClipboardPipeline");this.listenTo(i,"inputTransformation",()=>{const o=n.selection.getFirstRange(),s=Bi.fromPosition(o.start);s.stickiness="toPrevious";const a=Bi.fromPosition(o.end);a.stickiness="toNext",n.once("change:data",()=>{this._embedMediaBetweenPositions(s,a),s.detach(),a.detach()},{priority:"high"})}),e.commands.get("undo").on("execute",()=>{this._timeoutId&&(Qe.window.clearTimeout(this._timeoutId),this._positionToInsert.detach(),this._timeoutId=null,this._positionToInsert=null)},{priority:"high"})}_embedMediaBetweenPositions(e,n){const i=this.editor,r=i.plugins.get(T1).registry,o=new ko(e,n),s=o.getWalker({ignoreElementEnd:!0});let a="";for(const u of s)u.item.is("$textProxy")&&(a+=u.item.data);if(a=a.trim(),!a.match(K$e)){o.detach();return}if(!r.hasMedia(a)){o.detach();return}if(!i.commands.get("mediaEmbed").isEnabled){o.detach();return}this._positionToInsert=Bi.fromPosition(e),this._timeoutId=Qe.window.setTimeout(()=>{i.model.change(u=>{this._timeoutId=null,u.remove(o),o.detach();let c=null;this._positionToInsert.root.rootName!=="$graveyard"&&(c=this._positionToInsert),UX(i.model,a,c,!1),this._positionToInsert.detach(),this._positionToInsert=null}),i.plugins.get(yu).requestUndoOnBackspace()},100)}}class Y$e extends ut{focusTracker;keystrokes;urlInputView;_validators;_urlInputViewInfoDefault;_urlInputViewInfoTip;constructor(e,n){super(n),this.focusTracker=new wi,this.keystrokes=new Qi,this.set("mediaURLInputValue",""),this.urlInputView=this._createUrlInput(),this._validators=e,this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form","ck-responsive-form"],tabindex:"-1"},children:[this.urlInputView]})}render(){super.render(),vg({view:this}),this.focusTracker.add(this.urlInputView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.urlInputView.focus()}get url(){return this.urlInputView.fieldView.element.value.trim()}set url(e){this.urlInputView.fieldView.value=e.trim()}isValid(){this.resetFormStatus();for(const e of this._validators){const n=e(this);if(n)return this.urlInputView.errorText=n,!1}return!0}resetFormStatus(){this.urlInputView.errorText=null,this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const e=this.locale.t,n=new Go(this.locale,tu),i=n.fieldView;return this._urlInputViewInfoDefault=e("Paste the media URL in the input."),this._urlInputViewInfoTip=e("Tip: Paste the URL into the content to embed faster."),n.label=e("Media URL"),n.infoText=this._urlInputViewInfoDefault,i.inputMode="url",i.on("input",()=>{n.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault,this.mediaURLInputValue=i.element.value.trim()}),n}}class X$e extends xe{static get requires(){return[T1,EY]}static get pluginName(){return"MediaEmbedUI"}static get isOfficialPlugin(){return!0}_formView;init(){const e=this.editor;e.ui.componentFactory.add("mediaEmbed",()=>{const n=this.editor.locale.t,i=this._createDialogButton(wt);return i.tooltip=!0,i.label=n("Insert media"),i}),e.ui.componentFactory.add("menuBar:mediaEmbed",()=>{const n=this.editor.locale.t,i=this._createDialogButton(Wi);return i.label=n("Media"),i})}_createDialogButton(e){const n=this.editor,i=new e(n.locale),r=n.commands.get("mediaEmbed"),o=this.editor.plugins.get("Dialog");return i.icon=eNe,i.bind("isEnabled").to(r,"isEnabled"),i.on("execute",()=>{o.id==="mediaEmbed"?o.hide():this._showDialog()}),i}_showDialog(){const e=this.editor,n=e.plugins.get("Dialog"),i=e.commands.get("mediaEmbed"),r=e.locale.t,o=i.value!==void 0;if(!this._formView){const s=e.plugins.get(T1).registry;this._formView=new(cb(Y$e))(J$e(e.t,s),e.locale),this._formView.on("submit",()=>this._handleSubmitForm())}n.show({id:"mediaEmbed",title:r("Media embed"),content:this._formView,isModal:!0,onShow:()=>{this._formView.url=i.value||"",this._formView.resetFormStatus(),this._formView.urlInputView.fieldView.select()},actionButtons:[{label:r("Cancel"),withText:!0,onExecute:()=>n.hide()},{label:r(o?"Save":"Insert"),class:"ck-button-action",withText:!0,onExecute:()=>this._handleSubmitForm()}]})}_handleSubmitForm(){const e=this.editor,n=e.plugins.get("Dialog");this._formView.isValid()&&(e.execute("mediaEmbed",this._formView.url),n.hide(),e.editing.view.focus())}}function J$e(t,e){return[n=>{if(!n.url.length)return t("The URL must not be empty.")},n=>{if(!e.hasMedia(n.url))return t("This media URL is not supported.")}]}class Z$e extends xe{static get requires(){return[T1,X$e,G$e,h0]}static get pluginName(){return"MediaEmbed"}static get isOfficialPlugin(){return!0}}const s6={"(":")","[":"]","{":"}"};class Q$e extends Ht{constructor(e){super(e),this._isEnabledBasedOnSelection=!1}refresh(){const e=this.editor.model,n=e.document;this.isEnabled=e.schema.checkAttributeInSelection(n.selection,"mention")}execute(e){const n=this.editor.model,r=n.document.selection,o=typeof e.mention=="string"?{id:e.mention}:e.mention,s=o.id,a=e.range||r.getFirstRange();if(!n.canEditAt(a))return;const l=e.text||s,u=WX({_text:l,id:s},o);if(!s.startsWith(e.marker))throw new oe("mentioncommand-incorrect-id",this);n.change(c=>{const d=gl(r.getAttributes()),f=new Map(d.entries());f.set("mention",u);const h=n.insertContent(c.createText(l,f),a),m=h.start.nodeBefore,g=h.end.nodeAfter,v=g&&g.is("$text")&&g.data.startsWith(" ");let p=!1;if(m&&g&&m.is("$text")&&g.is("$text")){const b=m.data.slice(-1),y=b in s6,_=y&&g.data.startsWith(s6[b]);p=y&&_}!p&&!v&&n.insertContent(c.createText(" ",d),a.start.getShiftedBy(l.length))})}}class e7e extends xe{static get pluginName(){return"MentionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model,i=n.document;n.schema.extend("$text",{allowAttributes:"mention"}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",attributes:"data-mention",classes:"mention"},model:{key:"mention",value:r=>qX(r)}}),e.conversion.for("downcast").attributeToElement({model:"mention",view:n7e}),e.conversion.for("downcast").add(t7e),i.registerPostFixer(r=>o7e(r,i,n.schema)),i.registerPostFixer(r=>s7e(r,i)),i.registerPostFixer(r=>i7e(r,i)),e.commands.add("mention",new Q$e(e))}}function WX(t,e){return Object.assign({uid:Ur()},t,e||{})}function qX(t,e){const n=t.getAttribute("data-mention"),i=t.getChild(0);if(!i)return;const r={id:n,_text:i.data};return WX(r,e)}function t7e(t){t.on("attribute:mention",(e,n,i)=>{const r=n.attributeNewValue;if(!n.item.is("$textProxy")||!r)return;const o=n.range.start;(o.textNode||o.nodeAfter).data!=r._text&&i.consumable.consume(n.item,e.name)},{priority:"highest"})}function n7e(t,{writer:e}){if(!t)return;const n={class:"mention","data-mention":t.id},i={id:t.uid,priority:20};return e.createAttributeElement("span",n,i)}function i7e(t,e){const n=e.selection,i=n.focus;return n.isCollapsed&&n.hasAttribute("mention")&&r7e(i)?(t.removeSelectionAttribute("mention"),!0):!1}function r7e(t){const e=t.isAtStart;return t.nodeBefore&&t.nodeBefore.is("$text")||e}function o7e(t,e,n){const i=e.differ.getChanges();let r=!1;for(const o of i){if(o.type=="attribute")continue;const s=o.position;if(o.name=="$text"){const a=s.textNode&&s.textNode.nextSibling;r=cd(s.textNode,t)||r,r=cd(a,t)||r,r=cd(s.nodeBefore,t)||r,r=cd(s.nodeAfter,t)||r}if(o.name!="$text"&&o.type=="insert"){const a=s.nodeAfter;for(const l of t.createRangeIn(a).getItems())r=cd(l,t)||r}if(o.type=="insert"&&n.isInline(o.name)){const a=s.nodeAfter&&s.nodeAfter.nextSibling;r=cd(s.nodeBefore,t)||r,r=cd(a,t)||r}}return r}function s7e(t,e){const n=e.differ.getChanges();let i=!1;for(const r of n)if(r.type==="attribute"&&r.attributeKey!="mention"){const o=r.range.start.nodeBefore,s=r.range.end.nodeAfter;for(const a of[o,s])jX(a)&&a.getAttribute(r.attributeKey)!=r.attributeNewValue&&(t.setAttribute(r.attributeKey,r.attributeNewValue,a),i=!0)}return i}function jX(t){if(!t||!(t.is("$text")||t.is("$textProxy"))||!t.hasAttribute("mention"))return!1;const e=t.data,i=t.getAttribute("mention")._text;return e!=i}function cd(t,e){return jX(t)?(e.removeAttribute("mention",t),!0):!1}class a7e extends jf{selected;position;constructor(e){super(e),this.extendTemplate({attributes:{class:["ck-mentions"],tabindex:"-1"}})}selectFirst(){this.select(0)}selectNext(){const e=this.selected,n=this.items.getIndex(e);this.select(n+1)}selectPrevious(){const e=this.selected,n=this.items.getIndex(e);this.select(n-1)}select(e){let n=0;e>0&&e<this.items.length?n=e:e<0&&(n=this.items.length-1);const i=this.items.get(n);this.selected!==i&&(this.selected&&this.selected.removeHighlight(),i.highlight(),this.selected=i,this._isItemVisibleInScrolledArea(i)||(this.element.scrollTop=i.element.offsetTop))}executeSelected(){this.selected.fire("execute")}_isItemVisibleInScrolledArea(e){return new Wt(this.element).contains(new Wt(e.element))}}class l7e extends ut{domElement;constructor(e,n){super(e),this.template=void 0,this.domElement=n,this.domElement.classList.add("ck-button"),this.set("isOn",!1),this.on("change:isOn",(i,r,o)=>{o?(this.domElement.classList.add("ck-on"),this.domElement.classList.remove("ck-off")):(this.domElement.classList.add("ck-off"),this.domElement.classList.remove("ck-on"))}),this.listenTo(this.domElement,"click",()=>{this.fire("execute")})}render(){super.render(),this.element=this.domElement}focus(){this.domElement.focus()}}class u7e extends $s{item;marker;highlight(){const e=this.children.first;e.isOn=!0}removeHighlight(){const e=this.children.first;e.isOn=!1}}const _y=3,c7e=[Yt.arrowup,Yt.arrowdown,Yt.esc],d7e=[Yt.enter,Yt.tab];class f7e extends xe{_mentionsView;_mentionsConfigurations;_balloon;_items=new Er;_lastRequested;_requestFeedDebounced;static get pluginName(){return"MentionUI"}static get isOfficialPlugin(){return!0}static get requires(){return[bu]}constructor(e){super(e),this._mentionsView=this._createMentionView(),this._mentionsConfigurations=new Map,this._requestFeedDebounced=ml(this._requestFeed,100),e.config.define("mention",{feeds:[]})}init(){const e=this.editor,n=e.config.get("mention.commitKeys")||d7e,i=c7e.concat(n);this._balloon=e.plugins.get(bu),e.editing.view.document.on("keydown",(s,a)=>{o(a.keyCode)&&this._isUIVisible&&(a.preventDefault(),s.stop(),a.keyCode==Yt.arrowdown&&this._mentionsView.selectNext(),a.keyCode==Yt.arrowup&&this._mentionsView.selectPrevious(),n.includes(a.keyCode)&&this._mentionsView.executeSelected(),a.keyCode==Yt.esc&&this._hideUIAndRemoveMarker())},{priority:"highest"}),Wf({emitter:this._mentionsView,activator:()=>this._isUIVisible,contextElements:()=>[this._balloon.view.element],callback:()=>this._hideUIAndRemoveMarker()});const r=e.config.get("mention.feeds");for(const s of r){const{feed:a,marker:l,dropdownLimit:u}=s;if(!y7e(l))throw new oe("mentionconfig-incorrect-marker",null,{marker:l});const c=typeof a=="function"?a.bind(this.editor):p7e(a),d=s.itemRenderer,f={marker:l,feedCallback:c,itemRenderer:d,dropdownLimit:u};this._mentionsConfigurations.set(l,f)}this._setupTextWatcher(r),this.listenTo(e,"change:isReadOnly",()=>{this._hideUIAndRemoveMarker()}),this.on("requestFeed:response",(s,a)=>this._handleFeedResponse(a)),this.on("requestFeed:error",()=>this._hideUIAndRemoveMarker());function o(s){return i.includes(s)}}destroy(){super.destroy(),this._mentionsView.destroy()}get _isUIVisible(){return this._balloon.visibleView===this._mentionsView}_createMentionView(){const e=this.editor.locale,n=new a7e(e);return n.items.bindTo(this._items).using(i=>{const{item:r,marker:o}=i,{dropdownLimit:s}=this._mentionsConfigurations.get(o),a=s||this.editor.config.get("mention.dropdownLimit")||10;if(n.items.length>=a)return null;const l=new u7e(e),u=this._renderItem(r,o);return u.delegate("execute").to(l),l.children.add(u),l.item=r,l.marker=o,l.on("execute",()=>{n.fire("execute",{item:r,marker:o})}),l}),n.on("execute",(i,r)=>{const o=this.editor,s=o.model,a=r.item,l=r.marker,u=o.model.markers.get("mention"),c=s.createPositionAt(s.document.selection.focus),d=s.createPositionAt(u.getStart()),f=s.createRange(d,c);this._hideUIAndRemoveMarker(),o.execute("mention",{mention:a,text:a.text,marker:l,range:f}),o.editing.view.focus()}),n}_getItemRenderer(e){const{itemRenderer:n}=this._mentionsConfigurations.get(e);return n}_requestFeed(e,n){this._lastRequested=n;const{feedCallback:i}=this._mentionsConfigurations.get(e),r=i(n);if(!(r instanceof Promise)){this.fire("requestFeed:response",{feed:r,marker:e,feedText:n});return}r.then(s=>{this._lastRequested==n?this.fire("requestFeed:response",{feed:s,marker:e,feedText:n}):this.fire("requestFeed:discarded",{feed:s,marker:e,feedText:n})}).catch(s=>{this.fire("requestFeed:error",{error:s}),hn("mention-feed-callback-error",{marker:e})})}_setupTextWatcher(e){const n=this.editor,i=e.map(s=>({...s,pattern:GX(s.marker,s.minimumCharacters||0)})),r=new pO(n.model,m7e(i));r.on("matched",(s,a)=>{const l=KX(i,a.text),c=n.model.document.selection.focus,d=n.model.createPositionAt(c.parent,l.position);if(v7e(c)||b7e(d)){this._hideUIAndRemoveMarker();return}const f=g7e(l,a.text),h=l.marker.length+f.length,m=c.getShiftedBy(-h),g=c.getShiftedBy(-f.length),v=n.model.createRange(m,g);if(bE(n)){const p=n.model.markers.get("mention");n.model.change(b=>{b.updateMarker(p,{range:v})})}else n.model.change(p=>{p.addMarker("mention",{range:v,usingOperation:!1,affectsData:!1})});this._requestFeedDebounced(l.marker,f)}),r.on("unmatched",()=>{this._hideUIAndRemoveMarker()});const o=n.commands.get("mention");return r.bind("isEnabled").to(o),r}_handleFeedResponse(e){const{feed:n,marker:i}=e;if(!bE(this.editor))return;this._items.clear();for(const o of n){const s=typeof o!="object"?{id:o,text:o}:o;this._items.add({item:s,marker:i})}const r=this.editor.model.markers.get("mention");this._items.length?this._showOrUpdateUI(r):this._hideUIAndRemoveMarker()}_showOrUpdateUI(e){this._isUIVisible?this._balloon.updatePosition(this._getBalloonPanelPositionData(e,this._mentionsView.position)):this._balloon.add({view:this._mentionsView,position:this._getBalloonPanelPositionData(e,this._mentionsView.position),singleViewMode:!0,balloonClassName:"ck-mention-balloon"}),this._mentionsView.position=this._balloon.view.position,this._mentionsView.selectFirst()}_hideUIAndRemoveMarker(){this._balloon.hasView(this._mentionsView)&&this._balloon.remove(this._mentionsView),bE(this.editor)&&this.editor.model.change(e=>e.removeMarker("mention")),this._mentionsView.position=void 0}_renderItem(e,n){const i=this.editor;let r,o=e.id;const s=this._getItemRenderer(n);if(s){const a=s(e);typeof a!="string"?r=new l7e(i.locale,a):o=a}if(!r){const a=new wt(i.locale);a.label=o,a.withText=!0,r=a}return r}_getBalloonPanelPositionData(e,n){const i=this.editor,r=i.editing,o=r.view.domConverter,s=r.mapper,a=i.locale.uiLanguageDirection;return{target:()=>{let l=e.getRange();l.start.root.rootName=="$graveyard"&&(l=i.model.document.selection.getFirstRange());const u=s.toViewRange(l);return Wt.getDomRangeRects(o.viewRangeToDom(u)).pop()},limiter:()=>{const l=this.editor.editing.view,c=l.document.selection.editableElement;return c?l.domConverter.mapViewToDom(c.root):null},positions:h7e(n,a)}}}function h7e(t,e){const n={caret_se:i=>({top:i.bottom+_y,left:i.right,name:"caret_se",config:{withArrow:!1}}),caret_ne:(i,r)=>({top:i.top-r.height-_y,left:i.right,name:"caret_ne",config:{withArrow:!1}}),caret_sw:(i,r)=>({top:i.bottom+_y,left:i.right-r.width,name:"caret_sw",config:{withArrow:!1}}),caret_nw:(i,r)=>({top:i.top-r.height-_y,left:i.right-r.width,name:"caret_nw",config:{withArrow:!1}})};return Object.prototype.hasOwnProperty.call(n,t)?[n[t]]:e!=="rtl"?[n.caret_se,n.caret_sw,n.caret_ne,n.caret_nw]:[n.caret_sw,n.caret_se,n.caret_nw,n.caret_ne]}function KX(t,e){let n;for(const i of t){const r=e.lastIndexOf(i.marker);r>0&&!e.substring(r-1).match(i.pattern)||(!n||r>=n.position)&&(n={marker:i.marker,position:r,minimumCharacters:i.minimumCharacters,pattern:i.pattern})}return n}function GX(t,e){const n=e==0?"*":`{${e},}`,i=vt.features.isRegExpUnicodePropertySupported?`\\p{Ps}\\p{Pi}"'`:`\\(\\[{"'`,r=".";t=t.replace(/[.*+?^${}()\-|[\]\\]/g,"\\$&");const o=`(?:^|[ ${i}])(${t})(${r}${n})$`;return new RegExp(o,"u")}function m7e(t){return n=>{const i=KX(t,n);if(!i)return!1;let r=0;i.position!==0&&(r=i.position-1);const o=n.substring(r);return i.pattern.test(o)}}function g7e(t,e){let n=0;t.position!==0&&(n=t.position-1);const i=GX(t.marker,0);return e.substring(n).match(i)[2]}function p7e(t){return e=>t.filter(i=>(typeof i=="string"?i:String(i.id)).toLowerCase().includes(e.toLowerCase()))}function v7e(t){const e=t.textNode&&t.textNode.hasAttribute("mention"),n=t.nodeBefore;return e||n&&n.is("$text")&&n.hasAttribute("mention")}function b7e(t){const e=t.nodeAfter;return e&&e.is("$text")&&e.hasAttribute("mention")}function y7e(t){return!!t}function bE(t){return t.model.markers.has("mention")}class w7e extends xe{toMentionAttribute(e,n){return qX(e,n)}static get pluginName(){return"Mention"}static get isOfficialPlugin(){return!0}static get requires(){return[e7e,f7e]}}function _7e(t,e){const n=[];for(const i of e.createRangeIn(t)){const r=i.item;r.is("element","a")&&!r.hasAttribute("href")&&(r.hasAttribute("id")||r.hasAttribute("name"))&&n.push(r)}for(const i of n){const r=i.parent.getChildIndex(i)+1,o=i.getChildren();e.insertChild(r,o,i.parent)}}function YX(t){const e=parseFloat(t);return t.endsWith("pt")?$h(e*96/72):t.endsWith("pc")?$h(e*12*96/72):t.endsWith("in")?$h(e*96):t.endsWith("cm")?$h(e*96/2.54):t.endsWith("mm")?$h(e/10*96/2.54):t}function a6(t){return t!==void 0&&t.endsWith("px")}function $h(t){return Math.round(t)+"px"}function C7e(t,e,n){if(!t.childCount)return;const i=new Pu(t.document),r=k7e(t,i);if(!r.length)return;const o={},s=[];for(const a of r)if(a.indent!==void 0){T7e(a)||(s.length=0);const l=`${a.id}:${a.indent}`,u=Math.min(a.indent-1,s.length);if(u<s.length&&s[u].id!==a.id&&(s.length=u),u<s.length-1)s.length=u+1;else{const d=E7e(a,e);if(u>s.length-1||s[u].listElement.name!=d.type){u==0&&d.type=="ol"&&a.id!==void 0&&o[l]&&(d.startIndex=o[l]);const f=I7e(d,i,n);if(a6(a.marginLeft)&&(u==0||a6(s[u-1].marginLeft))){let h=a.marginLeft;u>0&&(h=$h(parseFloat(h)-parseFloat(s[u-1].marginLeft))),i.setStyle("padding-left",h,f)}if(s.length==0){const h=a.element.parent,m=h.getChildIndex(a.element)+1;i.insertChild(m,f,h)}else{const h=s[u-1].listItemElements;i.appendChild(f,h[h.length-1])}s[u]={...a,listElement:f,listItemElements:[]},u==0&&a.id!==void 0&&(o[l]=d.startIndex||1)}}const c=a.element.name=="li"?a.element:i.createElement("li");i.appendChild(c,s[u].listElement),s[u].listItemElements.push(c),u==0&&a.id!==void 0&&o[l]++,a.element!=c&&i.appendChild(a.element,c),M7e(a.element,i),i.removeStyle("text-indent",a.element),i.removeStyle("margin-left",a.element)}else{const l=s.find(u=>u.marginLeft==a.marginLeft);if(l){const u=l.listItemElements;i.appendChild(a.element,u[u.length-1]),i.removeStyle("margin-left",a.element)}else s.length=0}}function S7e(t,e){for(const n of e.createRangeIn(t)){const i=n.item;if(i.is("element","li")){const r=i.getChild(0);r&&r.is("element","p")&&e.unwrapElement(r)}}}function k7e(t,e){const n=e.createRangeIn(t),i=[],r=new Set;for(const o of n.getItems()){if(!o.is("element")||!o.name.match(/^(p|h\d+|li|div)$/))continue;let s=O7e(o);if(s!==void 0&&parseFloat(s)==0&&!Array.from(o.getClassNames()).find(a=>a.startsWith("MsoList"))&&(s=void 0),o.hasStyle("mso-list")&&o.getStyle("mso-list")!=="none"||s!==void 0&&r.has(s)){const a=R7e(o);i.push({element:o,id:a.id,order:a.order,indent:a.indent,marginLeft:s}),s!==void 0&&r.add(s)}else r.clear()}return i}function T7e(t){const e=t.element.previousSibling;if(!e){const n=t.element.parent;return yE(n)&&(!n.previousSibling||yE(n.previousSibling))}return yE(e)}function yE(t){return t.is("element","ol")||t.is("element","ul")}function E7e(t,e){const n=new RegExp(`@list l${t.id}:level${t.indent}\\s*({[^}]*)`,"gi"),i=/mso-level-number-format:([^;]{0,100});/gi,r=/mso-level-start-at:\s{0,100}([0-9]{0,10})\s{0,100};/gi,o=new RegExp(`@list\\s+l${t.id}:level\\d\\s*{[^{]*mso-level-text:"%\\d\\\\.`,"gi"),s=new RegExp(`@list l${t.id}:level\\d\\s*{[^{]*mso-level-number-format:`,"gi"),a=o.exec(e),l=s.exec(e),u=a&&!l,c=n.exec(e);let d="decimal",f="ol",h=null;if(c&&c[1]){const m=i.exec(c[1]);if(m&&m[1]&&(d=m[1].trim(),f=d!=="bullet"&&d!=="image"?"ol":"ul"),d==="bullet"){const g=x7e(t.element);g&&(d=g)}else{const g=r.exec(c[1]);g&&g[1]&&(h=parseInt(g[1]))}u&&(f="ol")}return{type:f,startIndex:h,style:P7e(d),isLegalStyleList:u}}function x7e(t){if(t.name=="li"&&t.parent.name=="ul"&&t.parent.hasAttribute("type"))return t.parent.getAttribute("type");const e=A7e(t);if(!e)return null;const n=e._data;return n==="o"?"circle":n==="·"?"disc":n==="§"?"square":null}function A7e(t){if(t.getChild(0).is("$text"))return null;for(const e of t.getChildren()){if(!e.is("element","span"))continue;const n=e.getChild(0);if(n)return n.is("$text")?n:n.getChild(0)}return null}function P7e(t){if(t.startsWith("arabic-leading-zero"))return"decimal-leading-zero";switch(t){case"alpha-upper":return"upper-alpha";case"alpha-lower":return"lower-alpha";case"roman-upper":return"upper-roman";case"roman-lower":return"lower-roman";case"circle":case"disc":case"square":return t;default:return null}}function I7e(t,e,n){const i=e.createElement(t.type);return t.style&&e.setStyle("list-style-type",t.style,i),t.startIndex&&t.startIndex>1&&e.setAttribute("start",t.startIndex,i),t.isLegalStyleList&&n&&e.addClass("legal-list",i),i}function R7e(t){const e=t.getStyle("mso-list");if(e===void 0)return{};const n=e.match(/(^|\s{1,100})l(\d+)/i),i=e.match(/\s{0,100}lfo(\d+)/i),r=e.match(/\s{0,100}level(\d+)/i);return n&&i&&r?{id:n[2],order:i[1],indent:parseInt(r[1])}:{indent:1}}function M7e(t,e){const n=new pl({name:"span",styles:{"mso-list":"Ignore"}}),i=e.createRangeIn(t);for(const r of i)r.type==="elementStart"&&n.match(r.item)&&e.remove(r.item)}function O7e(t){const e=t.getStyle("margin-left");return e===void 0||e.endsWith("px")?e:YX(e)}function L7e(t,e){if(!t.childCount)return;const n=new Pu(t.document),i=N7e(t,n);B7e(i,t,n),F7e(i,t,n),V7e(t,n);const r=$7e(t,n);r.length&&H7e(r,z7e(e),n)}function D7e(t){return btoa(t.match(/\w{2}/g).map(e=>String.fromCharCode(parseInt(e,16))).join(""))}function N7e(t,e){const n=e.createRangeIn(t),i=new pl({name:/v:(.+)/}),r=[];for(const o of n){if(o.type!="elementStart")continue;const s=o.item,a=s.previousSibling,l=a&&a.is("element")?a.name:null,u=["Chart"],c=i.match(s),d=s.getAttribute("o:gfxdata"),f=l==="v:shapetype",h=d&&u.some(m=>s.getAttribute("id").includes(m));c&&d&&!f&&!h&&r.push(o.item.getAttribute("id"))}return r}function B7e(t,e,n){const i=n.createRangeIn(e),r=new pl({name:"img"}),o=[];for(const s of i)if(s.item.is("element")&&r.match(s.item)){const a=s.item,l=a.getAttribute("v:shapes")?a.getAttribute("v:shapes").split(" "):[];l.length&&l.every(u=>t.indexOf(u)>-1)?o.push(a):a.getAttribute("src")||o.push(a)}for(const s of o)n.remove(s)}function V7e(t,e){const n=e.createRangeIn(t),i=new pl({name:/v:(.+)/}),r=[];for(const o of n)o.type=="elementStart"&&i.match(o.item)&&r.push(o.item);for(const o of r)e.remove(o)}function F7e(t,e,n){const i=n.createRangeIn(e),r=[];for(const a of i)if(a.type=="elementStart"&&a.item.is("element","v:shape")){const l=a.item.getAttribute("id");if(t.includes(l))continue;o(a.item.parent.getChildren(),l)||r.push(a.item)}for(const a of r){const l={src:s(a)};a.hasAttribute("alt")&&(l.alt=a.getAttribute("alt"));const u=n.createElement("img",l);n.insertChild(a.index+1,u,a.parent)}function o(a,l){for(const u of a){if(u.is("element")&&(u.name=="img"&&u.getAttribute("v:shapes")==l||o(u.getChildren(),l)))return!0}return!1}function s(a){for(const l of a.getChildren()){if(l.is("element")&&l.getAttribute("src"))return l.getAttribute("src")}}}function $7e(t,e){const n=e.createRangeIn(t),i=new pl({name:"img"}),r=[];let o=0;for(const s of n)s.item.is("element")&&i.match(s.item)&&(s.item.getAttribute("src").startsWith("file://")&&r.push({element:s.item,imageIndex:o}),o++);return r}function z7e(t){if(!t)return[];const e=/{\\pict[\s\S]+?\\bliptag-?\d+(\\blipupi-?\d+)?({\\\*\\blipuid\s?[\da-fA-F]+)?[\s}]*?/,n=new RegExp("(?:("+e.source+"))([\\da-fA-F\\s]+)\\}","g"),i=t.match(n),r=[];if(i)for(const o of i){let s=!1;o.includes("\\pngblip")?s="image/png":o.includes("\\jpegblip")&&(s="image/jpeg"),s&&r.push({hex:o.replace(e,"").replace(/[^\da-fA-F]/g,""),type:s})}return r}function H7e(t,e,n){for(let i=0;i<t.length;i++){const{element:r,imageIndex:o}=t[i],s=e[o];if(s){const a=`data:${s.type};base64,${D7e(s.hex)}`;n.setAttribute("src",a,r)}}}function U7e(t){const e=[],n=new Pu(t.document);for(const{item:i}of n.createRangeIn(t))if(i.is("element")){for(const r of i.getClassNames())/\bmso/gi.exec(r)&&n.removeClass(r,i);for(const r of i.getStyleNames())/\bmso/gi.exec(r)&&n.removeStyle(r,i);(i.is("element","w:sdt")||i.is("element","w:sdtpr")&&i.isEmpty||i.is("element","o:p")&&i.isEmpty)&&e.push(i)}for(const i of e){const r=i.parent,o=r.getChildIndex(i);n.insertChild(o,i.getChildren(),r),n.remove(i)}}function W7e(t,e,n=!1,i=!1){for(const r of e.createRangeIn(t).getItems()){if(!r.is("element","table")&&!r.is("element","td")&&!r.is("element","th"))continue;if(n&&i&&r.is("element","table")){const a=r.parent?.is("element","div")?r.parent:null,l=r.parent?.parent?.is("element","div")?r.parent.parent:null,u=a??l;u&&u.getAttribute("align")==="center"&&!r.getAttribute("align")?(e.setStyle("margin-left","auto",r),e.setStyle("margin-right","auto",r)):u&&u.getAttribute("align")==="right"&&!r.getAttribute("align")?(e.setStyle("margin-left","auto",r),e.setStyle("margin-right","0",r)):!u&&!r.getAttribute("align")&&(e.setStyle("margin-left","0",r),e.setStyle("margin-right","auto",r))}const o=["left","top","right","bottom"];if(o.every(a=>!r.hasStyle(`border-${a}-style`)))e.setStyle("border-style","none",r);else for(const a of o)r.hasStyle(`border-${a}-style`)||e.setStyle(`border-${a}-style`,"none",r);const s=["width","height",...o.map(a=>`border-${a}-width`),...o.map(a=>`padding-${a}`)];for(const a of s)r.hasStyle(a)&&e.setStyle(a,YX(r.getStyle(a)),r)}}function XX(t,e){for(const n of e.createRangeIn(t).getItems())n.is("element","table")&&(n.getStyle("width")==="0px"&&e.removeStyle("width",n),n.getAttribute("width")==="0"&&e.removeAttribute("width",n))}function q7e(t,e){const n=new Map,i=new Map;let r=null;for(const{item:s}of e.createRangeIn(t))if(s.is("element")){if(s.getStyle("mso-element")==="footnote-list"){r=s;continue}if(s.hasStyle("mso-footnote-id")){const a=s.findAncestor("element",l=>l.getStyle("mso-element")==="footnote");if(a){const l=a.getAttribute("id");i.set(l,a)}else{const l=s.getStyle("mso-footnote-id");n.set(l,s)}continue}}if(!n.size||!r)return;const o=K7e(e);e.replace(r,o);for(const[s,a]of n){const l=i.get(s);if(!l)continue;e.replace(a,G7e(e,s));const u=Y7e(e,s);j7e(e,l);for(const c of l.getChildren()){let d=c;c.is("element")&&(d=e.clone(c,!0)),e.appendChild(d,u.content)}e.appendChild(u.listItem,o)}}function j7e(t,e){const n=[],i=[];for(const{item:r}of t.createRangeIn(e))if(r.is("element")&&r.getStyle("mso-footnote-id")){n.unshift(r);const{nextSibling:o}=r;o?.is("$text")&&o.data.startsWith(" ")&&i.unshift(o)}for(const r of n)t.remove(r);for(const r of i){const o=r.data.substring(1);if(o.length>0){const s=r.parent,a=s.getChildIndex(r),l=t.createText(o);t.remove(r),t.insertChild(a,l,s)}else t.remove(r)}return e}function K7e(t){return t.createElement("ol",{class:"footnotes"})}function G7e(t,e){const n=t.createElement("sup",{class:"footnote"}),i=t.createElement("a",{id:`ref-${e}`,href:`#${e}`});return t.appendChild(i,n),n}function Y7e(t,e){const n=t.createElement("li",{id:e,class:"footnote-definition"}),i=t.createElement("a",{href:`#ref-${e}`,class:"footnote-backlink"}),r=t.createElement("div",{class:"footnote-content"});return t.appendChild(t.createText("^"),i),t.appendChild(i,n),t.appendChild(r,n),{listItem:n,content:r}}const X7e=/<meta\s*name="?generator"?\s*content="?microsoft\s*word\s*\d+"?\/?>/i,J7e=/xmlns:o="urn:schemas-microsoft-com/i;class Z7e{document;hasMultiLevelListPlugin;hasTablePropertiesPlugin;hasExtendedTableBlockAlignment;constructor(e,n=!1,i=!1,r=!1){this.document=e,this.hasMultiLevelListPlugin=n,this.hasTablePropertiesPlugin=i,this.hasExtendedTableBlockAlignment=r}isActive(e){return X7e.test(e)||J7e.test(e)}execute(e){const n=new Pu(this.document),{body:i,stylesString:r}=e._parsedData;_7e(i,n),C7e(i,r,this.hasMultiLevelListPlugin),L7e(i,e.dataTransfer.getData("text/rtf")),W7e(i,n,this.hasTablePropertiesPlugin,this.hasExtendedTableBlockAlignment),XX(i,n),q7e(i,n),U7e(i),e.content=i}}function Q7e(t,e){for(const n of t.getChildren())if(n.is("element","b")&&n.getStyle("font-weight")==="normal"){const i=t.getChildIndex(n);e.remove(n),e.insertChild(i,n.getChildren(),t)}}function e9e(t,e){const n=new mS(e.document.stylesProcessor),i=new pS(n,{renderingMode:"data"}),r=i.blockElements,o=i.inlineObjectElements,s=[];for(const a of e.createRangeIn(t)){const l=a.item;if(l.is("element","br")){const u=l6(l,"forward",e,{blockElements:r,inlineObjectElements:o}),c=l6(l,"backward",e,{blockElements:r,inlineObjectElements:o}),d=u6(u,r);(u6(c,r)||d)&&s.push(l)}}for(const a of s)a.hasClass("Apple-interchange-newline")?e.remove(a):e.replace(a,e.createElement("p"))}function l6(t,e,n,{blockElements:i,inlineObjectElements:r}){let o=n.createPositionAt(t,e=="forward"?"after":"before");return o=o.getLastMatchingPosition(({item:s})=>s.is("element")&&!i.includes(s.name)&&!r.includes(s.name),{direction:e}),e=="forward"?o.nodeAfter:o.nodeBefore}function u6(t,e){return!!t&&t.is("element")&&e.includes(t.name)}function t9e(t,e,n){const i=new Set;for(const r of e.createRangeIn(t).getItems())!r.is("view:$textProxy")||!r.data.includes(" ")||n9e(r.parent)&&i.add(r.textNode);for(const r of i)i9e(r,e,n)}function n9e(t){let e=t;for(;e;){if(e.is("element")&&e.getStyle?.("white-space")==="pre-wrap")return!0;e=e.parent}return!1}function i9e(t,e,n){const{parent:i,data:r}=t,o=r.replaceAll(" "," ".repeat(n)),s=i.getChildIndex(t);e.remove(t),e.insertChild(s,e.createText(o),i)}const r9e=/id=("|')docs-internal-guid-[-0-9a-f]+("|')/i;class o9e{document;constructor(e){this.document=e}isActive(e){return r9e.test(e)}execute(e){const n=new Pu(this.document),{body:i}=e._parsedData;Q7e(i,n),S7e(i,n),e9e(i,n),t9e(i,n,8),e.content=i}}function s9e(t,e){for(const n of t.getChildren())n.is("element","table")&&n.hasAttribute("xmlns")&&e.removeAttribute("xmlns",n)}function a9e(t,e){for(const n of t.getChildren())if(n.is("element","google-sheets-html-origin")){const i=t.getChildIndex(n);e.remove(n),e.insertChild(i,n.getChildren(),t)}}function l9e(t,e){for(const n of Array.from(t.getChildren()))n.is("element","style")&&e.remove(n)}const u9e=/<google-sheets-html-origin/i;class c9e{document;constructor(e){this.document=e}isActive(e){return u9e.test(e)}execute(e){const n=new Pu(this.document),{body:i}=e._parsedData;a9e(i,n),s9e(i,n),XX(i,n),l9e(i,n),e.content=i}}function d9e(t){return c6(c6(t)).replace(/(<span\s+style=['"]mso-spacerun:yes['"]>[^\S\r\n]*?)[\r\n]+([^\S\r\n]*<\/span>)/g,"$1$2").replace(/<span\s+style=['"]mso-spacerun:yes['"]><\/span>/g,"").replace(/(<span\s+style=['"]letter-spacing:[^'"]+?['"]>)[\r\n]+(<\/span>)/g,"$1 $2").replace(/ <\//g," </").replace(/ <o:p><\/o:p>/g," <o:p></o:p>").replace(/<o:p>(&nbsp;|\u00A0)<\/o:p>/g,"").replace(/>([^\S\r\n]*[\r\n]\s*)</g,"><")}function f9e(t){t.querySelectorAll("span[style*=spacerun]").forEach(e=>{const n=e,i=n.innerText.length||0;n.innerText=Array(i+1).join("  ").substr(0,i)})}function c6(t){return t.replace(/<span(?: class="Apple-converted-space"|)>(\s+)<\/span>/g,(e,n)=>n.length===1?" ":Array(n.length+1).join("  ").substr(0,n.length))}function h9e(t,e){const n=new DOMParser;t=t.replace(/<!--\[if gte vml 1]>/g,""),t=t.replace(/<o:SmartTagType(?:\s+[^\s>=]+(?:="[^"]*")?)*\s*\/?>/gi,"");const i=d9e(p9e(t)),r=n.parseFromString(i,"text/html");f9e(r);const o=r.body.innerHTML,s=m9e(r,e),a=g9e(r);return{body:s,bodyString:o,styles:a.styles,stylesString:a.stylesString}}function m9e(t,e){const n=new mS(e),i=new pS(n,{renderingMode:"data"}),r=t.createDocumentFragment(),o=t.body.childNodes;for(;o.length>0;)r.appendChild(o[0]);return i.domToView(r,{skipComments:!0})}function g9e(t){const e=[],n=[],i=Array.from(t.getElementsByTagName("style"));for(const r of i)r.sheet&&r.sheet.cssRules&&r.sheet.cssRules.length&&(e.push(r.sheet),n.push(r.innerHTML));return{styles:e,stylesString:n.join(" ")}}function p9e(t){const e="</body>",n="</html>",i=t.indexOf(e);if(i<0)return t;const r=t.indexOf(n,i+e.length);return t.substring(0,i+e.length)+(r>=0?t.substring(r):"")}class v9e extends xe{static get pluginName(){return"PasteFromOffice"}static get licenseFeatureCode(){return"PFO"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[fs]}init(){const e=this.editor,n=e.plugins.get("ClipboardPipeline"),i=e.editing.view.document,r=[],o=this.editor.plugins.has("MultiLevelListEditing"),s=this.editor.plugins.has("TablePropertiesEditing"),a=!!this.editor.config.get("experimentalFlags.useExtendedTableBlockAlignment");r.push(new Z7e(i,o,s,a)),r.push(new o9e(i)),r.push(new c9e(i)),n.on("inputTransformation",(l,u)=>{if(u._isTransformedWithPasteFromOffice||e.model.document.selection.getFirstPosition().parent.is("element","codeBlock"))return;const d=u.dataTransfer.getData("text/html"),f=r.find(h=>h.isActive(d));f&&(u._parsedData||(u._parsedData=h9e(d,i.stylesProcessor)),f.execute(u),u._isTransformedWithPasteFromOffice=!0)},{priority:"high"})}}const Cy="SourceEditingMode";class b9e extends xe{static get pluginName(){return"SourceEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[m1]}_elementReplacer;_replacedRoots;_dataFromRoots;constructor(e){super(e),this.set("isSourceEditingMode",!1),this._elementReplacer=new jK,this._replacedRoots=new Map,this._dataFromRoots=new Map,e.config.define("sourceEditing.allowCollaborationFeatures",!1)}init(){this._checkCompatibility();const e=this.editor,n=e.locale.t;e.ui.componentFactory.add("sourceEditing",()=>{const i=this._createButton(wt);return i.set({label:n("Source"),icon:vNe,tooltip:!0,class:"ck-source-editing-button"}),i}),e.ui.componentFactory.add("menuBar:sourceEditing",()=>{const i=this._createButton(Wi);return i.set({label:n("Show source"),role:"menuitemcheckbox"}),i}),this._isAllowedToHandleSourceEditingMode()&&(this.on("change:isSourceEditingMode",(i,r,o)=>{o?(this._hideVisibleDialog(),this._showSourceEditing(),this._disableCommands()):(this._hideSourceEditing(),this._enableCommands())}),this.on("change:isEnabled",(i,r,o)=>this._handleReadOnlyMode(!o)),this.listenTo(e,"change:isReadOnly",(i,r,o)=>this._handleReadOnlyMode(o))),e.data.on("get",()=>{this.isSourceEditingMode&&this.updateEditorData()},{priority:"high"})}updateEditorData(){const e=this.editor,n={};for(const[i,r]of this._replacedRoots){const o=this._dataFromRoots.get(i),s=r.dataset.value;o!==s&&(n[i]=s,this._dataFromRoots.set(i,s))}Object.keys(n).length&&e.data.set(n,{batchType:{isUndoable:!0},suppressErrorInCollaboration:!0})}_checkCompatibility(){const e=this.editor,n=e.config.get("sourceEditing.allowCollaborationFeatures");if(!n&&e.plugins.has("RealTimeCollaborativeEditing"))throw new oe("source-editing-incompatible-with-real-time-collaboration",null);!n&&["CommentsEditing","TrackChangesEditing","RevisionHistory"].some(r=>e.plugins.has(r))&&console.warn("You initialized the editor with the source editing feature and at least one of the collaboration features. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the collaboration features."),e.plugins.has("RestrictedEditingModeEditing")&&console.warn("You initialized the editor with the source editing feature and restricted editing feature. Please be advised that the source editing feature may not work, and be careful when editing document source that contains markers created by the restricted editing feature.")}_showSourceEditing(){const e=this.editor,n=e.editing.view,i=e.model;i.change(r=>{r.setSelection(null),r.removeSelectionAttribute(i.document.selection.getAttributeKeys())});for(const[r,o]of n.domRoots){const s=y9e(e.data.get({rootName:r})),a=Ko(o.ownerDocument,"textarea",{rows:"1","aria-label":"Source code editing area"}),l=Ko(o.ownerDocument,"div",{class:"ck-source-editing-area","data-value":s},[a]);a.value=s,a.setSelectionRange(0,0),a.addEventListener("input",()=>{l.dataset.value=a.value,e.ui.update()}),n.change(u=>{const c=n.document.getRoot(r);u.addClass("ck-hidden",c)}),e.ui.setEditableElement("sourceEditing:"+r,a),this._replacedRoots.set(r,l),this._elementReplacer.replace(o,l),this._dataFromRoots.set(r,s)}this._hideDocumentOutline(),this._refreshAnnotationsVisibility(),this._focusSourceEditing()}_hideSourceEditing(){const n=this.editor.editing.view;this.updateEditorData(),n.change(i=>{for(const[r]of this._replacedRoots)i.removeClass("ck-hidden",n.document.getRoot(r))}),this._elementReplacer.restore(),this._replacedRoots.clear(),this._dataFromRoots.clear(),this._showDocumentOutline(),this._refreshAnnotationsVisibility(),n.focus()}_hideDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="none")}_showDocumentOutline(){this.editor.plugins.has("DocumentOutlineUI")&&(this.editor.plugins.get("DocumentOutlineUI").view.element.style.display="")}_refreshAnnotationsVisibility(){this.editor.plugins.has("Annotations")&&this.editor.plugins.get("Annotations").refreshVisibility()}_focusSourceEditing(){const e=this.editor,[n]=this._replacedRoots.values(),i=n.querySelector("textarea");e.editing.view.document.isFocused=!1,i.focus()}_disableCommands(){const e=this.editor;for(const n of e.commands.commands())n.forceDisabled(Cy);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").forceDisabled(Cy)}_enableCommands(){const e=this.editor;for(const n of e.commands.commands())n.clearForceDisabled(Cy);e.plugins.has("CommentsArchiveUI")&&e.plugins.get("CommentsArchiveUI").clearForceDisabled(Cy)}_handleReadOnlyMode(e){if(this.isSourceEditingMode)for(const[,n]of this._replacedRoots)n.querySelector("textarea").readOnly=e}_isAllowedToHandleSourceEditingMode(){const n=this.editor.ui.view.editable;return n&&!n.hasExternalElement}_hideVisibleDialog(){if(this.editor.plugins.has("Dialog")){const e=this.editor.plugins.get("Dialog");e.isOpen&&e.hide()}}_createButton(e){const n=this.editor,i=new e(n.locale);return i.set({withText:!0,isToggleable:!0}),i.bind("isOn").to(this,"isSourceEditingMode"),i.bind("isEnabled").to(this,"isEnabled",n,"isReadOnly",n.plugins.get(m1),"hasAny",(r,o,s)=>!(!r||o||s)),this.listenTo(i,"execute",()=>{this.isSourceEditingMode=!this.isSourceEditingMode}),i}}function y9e(t){return w9e(t)?KRe(t):t}function w9e(t){return t.startsWith("<")}function _9e(t,e){const{modelAttribute:n,styleName:i,attributeName:r,attributeType:o,viewElement:s,defaultValue:a,shouldUpcast:l=()=>!0,reduceBoxSides:u=!1}=e;t.for("upcast").attributeToAttribute({view:{name:s,styles:{[i]:/[\s\S]+/}},model:{key:n,value:(c,d,f)=>{if(!l(c))return;const h=eg(a,"",f),m=c.getNormalizedStyle(i),g=u?o_(m):m;if(h!==g)return g;d.consumable.consume(c,{styles:i})}}}),r&&t.for("upcast").attributeToAttribute({view:{name:s,attributes:{[r]:/.+/}},model:{key:n,value:(c,d,f)=>{if(c.name=="figure"||c.hasStyle(i)||c.name=="table"&&c.parent.name=="figure"&&c.parent.hasStyle(i))return;const h=eg(a,"",f);let m=c.getAttribute(r);if(m&&o=="length"){const g=parseFloat(m);isNaN(g)?m=h:m=g+(m.includes("%")?"%":"px")}if(h!==m)return m;d.consumable.consume(c,{attributes:r})}}})}function d6(t,e,n,i){const{conversion:r}=t;r.for("upcast").add(o=>o.on("element:"+e,(s,a,l)=>{if(!a.modelRange)return;const u=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter(v=>a.viewItem.hasStyle(v));if(!u.length)return;const c={styles:u};if(!l.consumable.test(a.viewItem,c))return;const d=[...a.modelRange.getItems({shallow:!0})].pop(),f=d.findAncestor("table",{includeSelf:!0});let h=i;f&&f.getAttribute("tableType")=="layout"&&(h={style:"none",color:"",width:""}),l.consumable.consume(a.viewItem,c);const m={style:a.viewItem.getNormalizedStyle("border-style"),color:a.viewItem.getNormalizedStyle("border-color"),width:a.viewItem.getNormalizedStyle("border-width")},g={style:o_(m.style),color:o_(m.color),width:o_(m.width)};g.style!==h.style&&l.writer.setAttribute(n.style,g.style,d),g.color!==h.color&&l.writer.setAttribute(n.color,g.color,d),g.width!==h.width&&l.writer.setAttribute(n.width,g.width,d)})),t.config.get("experimentalFlags.upcastTableBorderZeroAttributes")&&r.for("upcast").add(o=>{o.on(`element:${e}`,(s,a,l)=>{const{modelRange:u,viewItem:c}=a,d=c.is("element","table")?c:c.findAncestor("table");if(!l.consumable.test(d,{attributes:"border"})||d.getAttribute("border")!=="0")return;const f=u?.start?.nodeAfter;!f||Object.values(n).some(h=>f.hasAttribute(h))||(l.writer.setAttribute(n.style,"none",f),c.is("element","table")&&l.consumable.consume(c,{attributes:"border"}))})})}function r_(t,e){const{modelElement:n,modelAttribute:i,styleName:r}=e;t.for("downcast").attributeToAttribute({model:{name:n,key:i},view:o=>({key:"style",value:{[r]:o}})})}function eg(t,e,n){const i=n.modelRange&&Mi(n.modelRange.getItems({shallow:!0})),r=i&&i.is("element")&&i.findAncestor("table",{includeSelf:!0});return r&&r.getAttribute("tableType")==="layout"?e:t}function o_(t){if(!t)return;const e=["top","right","bottom","left"];if(!e.every(o=>t[o]))return t;const i=t.top;return e.every(o=>t[o]===i)?i:t}const f6={blockLeft:{className:"table-style-block-align-left"},blockRight:{className:"table-style-block-align-right"}},Sy={center:{align:"center",style:"margin-left: auto; margin-right: auto;",className:"table-style-align-center"},left:{align:"left",style:"float: left;",className:"table-style-align-left"},right:{align:"right",style:"float: right;",className:"table-style-align-right"},blockLeft:{align:void 0,style:"margin-left: 0; margin-right: auto;",className:f6.blockLeft.className},blockRight:{align:void 0,style:"margin-left: auto; margin-right: 0;",className:f6.blockRight.className}};class un{_table;_startRow;_endRow;_startColumn;_endColumn;_includeAllSlots;_skipRows;_row;_rowIndex;_column;_cellIndex;_spannedCells;_nextCellAtColumn;_jumpedToStartRow=!1;constructor(e,n={}){this._table=e,this._startRow=n.row!==void 0?n.row:n.startRow||0,this._endRow=n.row!==void 0?n.row:n.endRow,this._startColumn=n.column!==void 0?n.column:n.startColumn||0,this._endColumn=n.column!==void 0?n.column:n.endColumn,this._includeAllSlots=!!n.includeAllSlots,this._skipRows=new Set,this._row=0,this._rowIndex=0,this._column=0,this._cellIndex=0,this._spannedCells=new Map,this._nextCellAtColumn=-1}[Symbol.iterator](){return this}next(){this._canJumpToStartRow()&&this._jumpToNonSpannedRowClosestToStartRow();const e=this._table.getChild(this._rowIndex);if(!e||this._isOverEndRow())return{done:!0,value:void 0};if(!e.is("element","tableRow"))return this._rowIndex++,this.next();if(this._isOverEndColumn())return this._advanceToNextRow();let n=null;const i=this._getSpanned();if(i)this._includeAllSlots&&!this._shouldSkipSlot()&&(n=this._formatOutValue(i.cell,i.row,i.column));else{const r=e.getChild(this._cellIndex);if(!r)return this._advanceToNextRow();const o=parseInt(r.getAttribute("colspan")||"1"),s=parseInt(r.getAttribute("rowspan")||"1");(o>1||s>1)&&this._recordSpans(r,s,o),this._shouldSkipSlot()||(n=this._formatOutValue(r)),this._nextCellAtColumn=this._column+o}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,n||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return this._endRow!==void 0&&this._row>this._endRow}_isOverEndColumn(){return this._endColumn!==void 0&&this._column>this._endColumn}_formatOutValue(e,n=this._row,i=this._column){return{done:!1,value:new C9e(this,e,n,i)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),n=this._row<this._startRow,i=this._column<this._startColumn,r=this._endColumn!==void 0&&this._column>this._endColumn;return e||n||i||r}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,n,i){const r={cell:e,row:this._row,column:this._column};for(let o=this._row;o<this._row+n;o++)for(let s=this._column;s<this._column+i;s++)(o!=this._row||s!=this._column)&&this._markSpannedCell(o,s,r)}_markSpannedCell(e,n,i){this._spannedCells.has(e)||this._spannedCells.set(e,new Map),this._spannedCells.get(e).set(n,i)}_canJumpToStartRow(){return!!this._startRow&&this._startRow>0&&!this._jumpedToStartRow}_jumpToNonSpannedRowClosestToStartRow(){const e=this._getRowLength(0);for(let n=this._startRow;!this._jumpedToStartRow;n--)e===this._getRowLength(n)&&(this._row=n,this._rowIndex=n,this._jumpedToStartRow=!0)}_getRowLength(e){return[...this._table.getChild(e).getChildren()].reduce((i,r)=>i+parseInt(r.getAttribute("colspan")||"1"),0)}}class C9e{cell;row;column;cellAnchorRow;cellAnchorColumn;_cellIndex;_rowIndex;_table;constructor(e,n,i,r){this.cell=n,this.row=e._row,this.column=e._column,this.cellAnchorRow=i,this.cellAnchorColumn=r,this._cellIndex=e._cellIndex,this._rowIndex=e._rowIndex,this._table=e._table}get isAnchor(){return this.row===this.cellAnchorRow&&this.column===this.cellAnchorColumn}get cellWidth(){return parseInt(this.cell.getAttribute("colspan")||"1")}get cellHeight(){return parseInt(this.cell.getAttribute("rowspan")||"1")}get rowIndex(){return this._rowIndex}getPositionBefore(){return this._table.root.document.model.createPositionAt(this._table.getChild(this.row),this._cellIndex)}}function Vi(t,e,n,i,r=1){e!=null&&r!==void 0&&r!==null&&e>r?i.setAttribute(t,e,n):i.removeAttribute(t,n)}function Xf(t,e,n={}){const i=t.createElement("tableCell",n);return t.insertElement("paragraph",i),t.insert(i,e),i}function KA(t,e){const n=e.parent.parent,i=parseInt(n.getAttribute("headingColumns")||"0"),{column:r}=t.getCellLocation(e);return!!i&&r<i}function s_(t,e,n){const{modelAttribute:i}=n;t.extend("tableCell",{allowAttributes:[i]}),t.setAttributeProperties(i,{isFormatting:!0}),_9e(e,{viewElement:/^(td|th)$/,...n}),r_(e,{modelElement:"tableCell",...n})}function vm(t){const e=t.getSelectedElement();return e&&e.is("element","table")?e:t.getFirstPosition().findAncestor("table")}function S9e(t){const e=new Map;for(const n of t){const i=n.findAncestor("table");e.has(i)||e.set(i,[]),e.get(i).push(n)}return e}function gh({table:t,row:e,column:n}){const i=new un(t,{row:e,column:n});for(const{cell:r}of i)if(r.getAttribute("tableCellType")!=="header")return!1;return!0}function jl(t){const{model:e,config:n}=t;return e.schema.checkAttribute("tableCell","tableCellType")&&n.get("experimentalFlags.tableCellTypeSupport")===!0}function JX(t,e,n){const{startRow:i,startColumn:r,endRow:o,endColumn:s}=e,a=n.createElement("table"),l=t.getAttribute("tableType");l&&n.setAttribute("tableType",l,a);const u=o-i+1;for(let d=0;d<u;d++)n.insertElement("tableRow",a,"end");const c=[...new un(t,{startRow:i,endRow:o,startColumn:r,endColumn:s,includeAllSlots:!0})];for(const{row:d,column:f,cell:h,isAnchor:m,cellAnchorRow:g,cellAnchorColumn:v}of c){const p=d-i,b=a.getChild(p);if(!m)(g<i||v<r)&&Xf(n,n.createPositionAt(b,"end"));else{const y=n.cloneElement(h);n.append(y,b),nJ(y,d,f,o,s,n)}}return k9e(a,t,i,r,n),a}function ZX(t,e,n=0){const i=[],r=new un(t,{startRow:n,endRow:e-1});for(const o of r){const{row:s,cellHeight:a}=o,l=s+a-1;s<e&&e<=l&&i.push(o)}return i}function QX(t,e,n){const i=t.parent,r=i.parent,o=i.index,s=parseInt(t.getAttribute("rowspan")),a=e-o,l={},u=s-a;u>1&&(l.rowspan=u);const c=parseInt(t.getAttribute("colspan")||"1");c>1&&(l.colspan=c);const d=o,f=d+a,h=[...new un(r,{startRow:d,endRow:f,includeAllSlots:!0})];let m=null,g;for(const v of h){const{row:p,column:b,cell:y}=v;y===t&&g===void 0&&(g=b),g!==void 0&&g===b&&p===f&&(m=Xf(n,v.getPositionBefore(),l))}return Vi("rowspan",a,t,n),m}function eJ(t,e){const n=[],i=new un(t);for(const r of i){const{column:o,cellWidth:s}=r,a=o+s-1;o<e&&e<=a&&n.push(r)}return n}function tJ(t,e,n,i){const r=parseInt(t.getAttribute("colspan")),o=n-e,s={},a=r-o;a>1&&(s.colspan=a);const l=parseInt(t.getAttribute("rowspan")||"1");l>1&&(s.rowspan=l);const u=Xf(i,i.createPositionAfter(t),s);return Vi("colspan",o,t,i),u}function nJ(t,e,n,i,r,o){const s=parseInt(t.getAttribute("colspan")||"1"),a=parseInt(t.getAttribute("rowspan")||"1");if(n+s-1>r){const c=r-n+1;Vi("colspan",c,t,o,1)}if(e+a-1>i){const c=i-e+1;Vi("rowspan",c,t,o,1)}}function k9e(t,e,n,i,r){const o=parseInt(e.getAttribute("headingRows")||"0");if(o>0){const a=o-n;Vi("headingRows",a,t,r,0)}const s=parseInt(e.getAttribute("headingColumns")||"0");if(s>0){const a=s-i;Vi("headingColumns",a,t,r,0)}}function GA(t,e){const n=e.getColumns(t),i=new Array(n).fill(0);for(const{column:o}of new un(t))i[o]++;const r=i.reduce((o,s,a)=>s?o:[...o,a],[]);if(r.length>0){const o=r[r.length-1];return e.removeColumns(t,{at:o}),!0}return!1}function YA(t,e){const n=[],i=e.getRows(t);for(let r=0;r<i;r++)t.getChild(r).isEmpty&&n.push(r);if(n.length>0){const r=n[n.length-1];return e.removeRows(t,{at:r}),!0}return!1}function PO(t,e){GA(t,e)||YA(t,e)}function iJ(t,e){const n=Array.from(new un(t,{startColumn:e.firstColumn,endColumn:e.lastColumn,row:e.lastRow}));if(n.every(({cellHeight:o})=>o===1))return e.lastRow;const r=n[0].cellHeight-1;return e.lastRow+r}function rJ(t,e){const n=Array.from(new un(t,{startRow:e.firstRow,endRow:e.lastRow,column:e.lastColumn}));if(n.every(({cellWidth:o})=>o===1))return e.lastColumn;const r=n[0].cellWidth-1;return e.lastColumn+r}function T9e(t){for(const e of t.getChildren())if(e.is("element","table"))return e}function E9e(){return t=>{t.on("element:figure",(e,n,i)=>{if(!i.consumable.test(n.viewItem,{name:!0,classes:"table"}))return;const r=T9e(n.viewItem);if(!r||!i.consumable.test(r,{name:!0}))return;i.consumable.consume(n.viewItem,{name:!0,classes:"table"});const o=i.convertItem(r,n.modelCursor),s=Mi(o.modelRange.getItems());if(!s||!s.is("element","table")){i.consumable.revert(n.viewItem,{name:!0,classes:"table"}),o.modelRange&&!o.modelRange.isCollapsed&&(n.modelRange=o.modelRange,n.modelCursor=o.modelCursor);return}i.convertChildren(n.viewItem,i.writer.createPositionAt(s,"end")),i.updateConversionResult(s,n)})}}function x9e(){return t=>{t.on("element:table",(e,n,i)=>{const r=n.viewItem;if(!i.consumable.test(r,{name:!0}))return;const{rows:o,headingRows:s,headingColumns:a}=P9e(r),l={};a&&(l.headingColumns=a),s&&(l.headingRows=s);const u=i.writer.createElement("table",l);if(i.safeInsert(u,n.modelCursor)){if(i.consumable.consume(r,{name:!0}),o.forEach(c=>i.convertItem(c,i.writer.createPositionAt(u,"end"))),i.convertChildren(r,i.writer.createPositionAt(u,"end")),u.isEmpty){const c=i.writer.createElement("tableRow");i.writer.insert(c,i.writer.createPositionAt(u,"end")),Xf(i.writer,i.writer.createPositionAt(c,"end"))}i.updateConversionResult(u,n)}})}}function A9e(){return t=>{t.on("element:tr",(e,n)=>{n.viewItem.isEmpty&&n.modelCursor.index==0&&e.stop()},{priority:"high"})}}function h6(t){return e=>{e.on(`element:${t}`,(n,i,{writer:r})=>{if(!i.modelRange)return;const o=i.modelRange.start.nodeAfter,s=r.createPositionAt(o,0);if(i.viewItem.isEmpty){r.insertElement("paragraph",s);return}const a=Array.from(o.getChildren());if(a.every(l=>l.is("element","$marker"))){const l=r.createElement("paragraph");r.insert(l,r.createPositionAt(o,0));for(const u of a)r.move(r.createRangeOn(u),r.createPositionAt(l,"end"))}},{priority:"low"})}}function P9e(t){let e,n=!0;const i=[],r=[];let o;for(const a of Array.from(t.getChildren())){if(a.name!=="tbody"&&a.name!=="thead"&&a.name!=="tfoot")continue;a.name==="thead"&&!o&&(n=!0,o=a);const l=Array.from(a.getChildren()).filter(c=>c.is("element","tr"));let u=null;for(const c of l){const d=Array.from(c.getChildren()).filter(f=>f.is("element","td")||f.is("element","th"));o&&a===o||a.name==="tbody"&&d.length>0&&(u===null||d.length===u)&&d.every(f=>f.is("element","th"))&&n?(i.push(c),n=!0):(r.push(c),n=!1),u=Math.max(u||0,d.length)}}const s=I9e(r);for(const a of s){let l=0;for(;l<a.length&&a[l]?.name==="th";)l+=1;(e===void 0||l<e)&&(e=l)}return{headingRows:i.length,headingColumns:e||0,rows:[...i,...r]}}function I9e(t){let e=new Map,n=0;const i=t.map(r=>{const o=[],s=Array.from(r.getChildren()).filter(l=>l.name==="th"||l.name==="td"),a=new Map;for(;s.length||o.length<n;){const l=e.get(o.length);if(l&&l.remaining>0)o.push(l.cell);else{const u=s.shift();if(u){const c=parseInt(u.getAttribute("colspan")||"1"),d=parseInt(u.getAttribute("rowspan")||"1");for(let f=0;f<c;f++)d>1&&a.set(o.length,{cell:u,remaining:d-1}),o.push(u)}else{o.push(null);continue}}}for(const[l,u]of e.entries())u.remaining-=1,u.remaining>0&&!a.has(l)&&a.set(l,u);return e=a,n=Math.max(n,o.length),o});for(const r of i)for(;r.length<n;)r.push(null);return i}function xS(t){if(!t||!so(t))return t;const{top:e,right:n,bottom:i,left:r}=t;if(e==n&&n==i&&i==r)return e}function AS(t,e){const n=parseFloat(t);return Number.isNaN(n)||String(n)!==String(t)?t:`${n}${e}`}function IO(t,e={}){const n={borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",...t};return e.includeAlignmentProperty&&!n.alignment&&(n.alignment="center"),e.includePaddingProperty&&!n.padding&&(n.padding=""),e.includeVerticalAlignmentProperty&&!n.verticalAlignment&&(n.verticalAlignment="middle"),e.includeHorizontalAlignmentProperty&&!n.horizontalAlignment&&(n.horizontalAlignment=e.isRightToLeftContent?"right":"left"),n}function R9e(t,e){return IO({borderStyle:"double",borderColor:"hsl(0, 0%, 70%)",borderWidth:"1px",...t},e)}function RO(t,e){return IO({borderStyle:"solid",borderColor:"hsl(0, 0%, 75%)",borderWidth:"1px",...t},e)}function m6(t,e){return(n,{writer:i})=>{const r=n.getAttribute("headingRows")||0,o=i.createContainerElement("table",null,[]),s=i.createContainerElement("figure",{class:"table"},o);r>0&&i.insert(i.createPositionAt(o,"end"),i.createContainerElement("thead",null,i.createSlot(a=>a.is("element","tableRow")&&a.index<r))),r<t.getRows(n)&&i.insert(i.createPositionAt(o,"end"),i.createContainerElement("tbody",null,i.createSlot(a=>a.is("element","tableRow")&&a.index>=r)));for(const{positionOffset:a,filter:l}of e.additionalSlots)i.insert(i.createPositionAt(o,a),i.createSlot(l));return i.insert(i.createPositionAt(o,"after"),i.createSlot(a=>a.is("element","tableRow")?!1:!e.additionalSlots.some(({filter:l})=>l(a)))),e.asWidget?O9e(s,i):s}}function M9e(){return(t,{writer:e})=>t.isEmpty?e.createEmptyElement("tr"):e.createContainerElement("tr")}function g6(t){return(n,{writer:i})=>{if(t.cellTypeEnabled?.()){const d=n.getAttribute("tableCellType")==="header"?"th":"td";return e(i,d)}const r=n.parent,o=r.parent,s=o.getChildIndex(r),a=new un(o,{row:s}),l=o.getAttribute("headingRows")||0,u=o.getAttribute("headingColumns")||0;let c=null;for(const d of a)if(d.cell==n){const f=d.row<l||d.column<u;c=e(i,f?"th":"td");break}return c};function e(n,i){return t.asWidget?bO(n.createEditableElement(i),n,{withAriaRole:!1}):n.createContainerElement(i)}}function p6(t={}){return(e,{writer:n})=>{if(!e.parent.is("element","tableCell")||!oJ(e))return null;if(t.asWidget)return n.createContainerElement("span",{class:"ck-table-bogus-paragraph"});{const i=n.createContainerElement("p");return n.setCustomProperty("dataPipeline:transparentRendering",!0,i),i}}}function oJ(t){return t.parent.childCount==1&&!L9e(t)}function O9e(t,e){return e.setCustomProperty("table",!0,t),vO(t,e,{hasSelectionHandle:!0})}function L9e(t){for(const e of t.getAttributeKeys())if(!(e.startsWith("selection:")||e=="htmlEmptyBlock"))return!0;return!1}function D9e(t){return(e,n)=>{const i=t.plugins.has("PlainTableOutput"),r=n.options.isClipboardPipeline,o=t.config.get("experimentalFlags.useExtendedTableBlockAlignment");return!i&&!(o&&r)?null:B9e(e,n,t)}}function N9e(t){return(e,{writer:n,options:i})=>{const r=t.plugins.has("PlainTableOutput"),o=i.isClipboardPipeline,s=t.config.get("experimentalFlags.useExtendedTableBlockAlignment");return!r&&!(s&&o)?null:e.parent.name==="table"?n.createContainerElement("caption"):null}}function B9e(t,e,n){const i=e.writer,r=t.getAttribute("headingRows")||0,o=i.createSlot(f=>f.is("element","tableRow")&&f.index<r),s=i.createSlot(f=>f.is("element","tableRow")&&f.index>=r),a=i.createSlot(f=>!f.is("element","tableRow")),l=i.createContainerElement("thead",null,o),u=i.createContainerElement("tbody",null,s),c=[];r&&c.push(l),r<t.childCount&&c.push(u);const d={class:"table"};if(n.plugins.has("TablePropertiesEditing")&&e.options.isClipboardPipeline){const f=R9e(n.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),h=t.getAttribute("tableAlignment");let m=f.alignment;t.getAttribute("tableType")==="layout"&&(m="");const g=h||m;g&&(d.class+=" "+Sy[g].className,d.style=Sy[g].style,Sy[g].align!==void 0&&(d.align=Sy[g].align))}return i.createContainerElement("table",d,[a,...c])}function V9e(t){const e={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[n,i]of Object.entries(e))t.conversion.for("dataDowncast").add(r=>r.on(`attribute:${i}:table`,(o,s,a)=>{const{item:l,attributeNewValue:u}=s,{mapper:c,writer:d}=a,f=t.plugins.has("PlainTableOutput"),h=a.options.isClipboardPipeline,m=t.config.get("experimentalFlags.useExtendedTableBlockAlignment");if(!f&&!(m&&h)||!a.consumable.consume(l,o.name))return;const g=c.toViewElement(l);u?d.setStyle(n,u,g):d.removeStyle(n,g)},{priority:"high"}))}class F9e extends Ht{refresh(){const e=this.editor.model,n=e.document.selection,i=e.schema;this.isEnabled=$9e(n,i)}execute(e={}){const n=this.editor,i=n.model,r=n.plugins.get("TableUtils"),o=n.config.get("table.defaultHeadings.rows"),s=n.config.get("table.defaultHeadings.columns");e.headingRows===void 0&&o&&(e.headingRows=o),e.headingColumns===void 0&&s&&(e.headingColumns=s),i.change(a=>{const l=r.createTable(a,e);i.insertObject(l,null,null,{findOptimalPosition:"auto"}),a.setSelection(a.createPositionAt(l.getNodeByPath([0,0,0]),0))})}}function $9e(t,e){const n=t.getFirstPosition().parent,i=n===n.root?n:n.parent;return e.checkChild(i,"table")}class v6 extends Ht{order;constructor(e,n={}){super(e),this.order=n.order||"below"}refresh(){const e=this.editor.model.document.selection,i=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=i}execute(){const e=this.editor,n=e.model.document.selection,i=e.plugins.get("TableUtils"),r=this.order==="above",o=i.getSelectionAffectedTableCells(n),s=i.getRowIndexes(o),a=r?s.first:s.last,l=o[0].findAncestor("table");i.insertRows(l,{at:r?a:a+1,copyStructureFromAbove:!r})}}class b6 extends Ht{order;constructor(e,n={}){super(e),this.order=n.order||"right"}refresh(){const e=this.editor.model.document.selection,i=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=i}execute(){const e=this.editor,n=e.model.document.selection,i=e.plugins.get("TableUtils"),r=this.order==="left",o=i.getSelectionAffectedTableCells(n),s=i.getColumnIndexes(o),a=r?s.first:s.last,l=o[0].findAncestor("table");i.insertColumns(l,{columns:1,at:r?a:a+1})}}class y6 extends Ht{direction;constructor(e,n={}){super(e),this.direction=n.direction||"horizontally"}refresh(){const n=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=n.length===1}execute(){const e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];this.direction==="horizontally"?e.splitCellHorizontally(n,2):e.splitCellVertically(n,2)}}class ky extends Ht{direction;isHorizontal;constructor(e,n){super(e),this.direction=n.direction,this.isHorizontal=this.direction=="right"||this.direction=="left"}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,n=e.document,r=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(n.selection)[0],o=this.value,s=this.direction;e.change(a=>{const l=s=="right"||s=="down",u=l?r:o,c=l?o:r,d=c.parent;U9e(c,u,a);const f=this.isHorizontal?"colspan":"rowspan",h=parseInt(r.getAttribute(f)||"1"),m=parseInt(o.getAttribute(f)||"1");a.setAttribute(f,h+m,u),a.setSelection(a.createRangeIn(u));const g=this.editor.plugins.get("TableUtils"),v=d.findAncestor("table");PO(v,g)})}_getMergeableCell(){const n=this.editor.model.document,i=this.editor.plugins.get("TableUtils"),r=i.getTableCellsContainingSelection(n.selection)[0];if(!r)return;const o=this.isHorizontal?z9e(r,this.direction,i):H9e(r,this.direction,i);if(!o)return;const s=this.isHorizontal?"rowspan":"colspan",a=parseInt(r.getAttribute(s)||"1");if(parseInt(o.getAttribute(s)||"1")===a)return o}}function z9e(t,e,n){const r=t.parent.parent,o=e=="right"?t.nextSibling:t.previousSibling,s=(r.getAttribute("headingColumns")||0)>0;if(!o)return;const a=e=="right"?t:o,l=e=="right"?o:t,{column:u}=n.getCellLocation(a),{column:c}=n.getCellLocation(l),d=parseInt(a.getAttribute("colspan")||"1"),f=KA(n,a),h=KA(n,l);return s&&f!=h?void 0:u+d===c?o:void 0}function H9e(t,e,n){const i=t.parent,r=i.parent,o=r.getChildIndex(i);if(e=="down"&&o===n.getRows(r)-1||e=="up"&&o===0)return null;const s=parseInt(t.getAttribute("rowspan")||"1"),a=r.getAttribute("headingRows")||0,l=e=="down"&&o+s===a,u=e=="up"&&o===a;if(a&&(l||u))return null;const c=parseInt(t.getAttribute("rowspan")||"1"),d=e=="down"?o+c:o,f=[...new un(r,{endRow:d})],m=f.find(v=>v.cell===t).column,g=f.find(({row:v,cellHeight:p,column:b})=>b!==m?!1:e=="down"?v===d:d===v+p);return g&&g.cell?g.cell:null}function U9e(t,e,n){w6(t)||(w6(e)&&n.remove(n.createRangeIn(e)),n.move(n.createRangeIn(t),n.createPositionAt(e,"end"))),n.remove(t)}function w6(t){const e=t.getChild(0);return t.childCount==1&&e.is("element","paragraph")&&e.isEmpty}class W9e extends Ht{refresh(){const e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=n[0];if(i){const r=i.findAncestor("table"),s=e.getRows(r)-1,a=e.getRowIndexes(n),l=a.first===0&&a.last===s;this.isEnabled=!l}else this.isEnabled=!1}execute(){const e=this.editor.model,n=this.editor.plugins.get("TableUtils"),i=n.getSelectionAffectedTableCells(e.document.selection),r=n.getRowIndexes(i),o=i[0],s=o.findAncestor("table"),a=n.getCellLocation(o).column;e.change(l=>{const u=r.last-r.first+1;n.removeRows(s,{at:r.first,rows:u});const c=q9e(s,r.first,a,n.getRows(s));l.setSelection(l.createPositionAt(c,0))})}}function q9e(t,e,n,i){const r=t.getChild(Math.min(e,i-1));let o=r.getChild(0),s=0;for(const a of r.getChildren()){if(s>n)return o;o=a,s+=parseInt(a.getAttribute("colspan")||"1")}return o}class j9e extends Ht{refresh(){const e=this.editor.plugins.get("TableUtils"),n=e.getSelectionAffectedTableCells(this.editor.model.document.selection),i=n[0];if(i){const r=i.findAncestor("table"),o=e.getColumns(r),{first:s,last:a}=e.getColumnIndexes(n);this.isEnabled=a-s<o-1}else this.isEnabled=!1}execute(){const e=this.editor.plugins.get("TableUtils"),[n,i]=G9e(this.editor.model.document.selection,e),r=n.parent.parent,o=[...new un(r)],s={first:o.find(l=>l.cell===n).column,last:o.find(l=>l.cell===i).column},a=K9e(o,n,i,s);this.editor.model.change(l=>{const u=s.last-s.first+1;e.removeColumns(r,{at:s.first,columns:u}),l.setSelection(l.createPositionAt(a,0))})}}function K9e(t,e,n,i){return parseInt(n.getAttribute("colspan")||"1")>1?n:e.previousSibling||n.nextSibling?n.nextSibling||e.previousSibling:i.first?t.reverse().find(({column:o})=>o<i.first).cell:t.reverse().find(({column:o})=>o>i.last).cell}function G9e(t,e){const n=e.getSelectionAffectedTableCells(t),i=n[0],r=n.pop(),o=[i,r];return i.isBefore(r)?o:o.reverse()}class Y9e extends Ht{refresh(){const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,i=e.getSelectionAffectedTableCells(n.document.selection);if(i.length===0){this.isEnabled=!1,this.value=!1;return}const r=i[0].findAncestor("table");this.isEnabled=n.schema.checkAttribute(r,"headingRows"),this.value=i.every(o=>this._isInHeading(o,o.parent.parent))}execute(e={}){if(e.forceValue===this.value)return;const n=this.editor.plugins.get("TableUtils"),i=this.editor.model,r=n.getSelectionAffectedTableCells(i.document.selection),o=r[0].findAncestor("table"),{first:s,last:a}=n.getRowIndexes(r),l=this.value?s:a+1,u=o.getAttribute("headingRows")||0;i.change(c=>{if(l){const d=l>u?u:0,f=ZX(o,l,d);for(const{cell:h}of f)QX(h,l,c)}n.setHeadingRowsCount(c,o,l)})}_isInHeading(e,n){const i=parseInt(n.getAttribute("headingRows")||"0");return!!i&&e.parent.index<i}}class X9e extends Ht{refresh(){const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,i=e.getSelectionAffectedTableCells(n.document.selection);if(i.length===0){this.isEnabled=!1,this.value=!1;return}const r=i[0].findAncestor("table");this.isEnabled=n.schema.checkAttribute(r,"headingColumns"),this.value=i.every(o=>KA(e,o))}execute(e={}){if(e.forceValue===this.value)return;const n=this.editor.plugins.get("TableUtils"),i=this.editor.model,r=n.getSelectionAffectedTableCells(i.document.selection),o=r[0].findAncestor("table"),{first:s,last:a}=n.getColumnIndexes(r),l=this.value?s:a+1;i.change(u=>{if(l){const c=eJ(o,l);for(const{cell:d,column:f}of c)tJ(d,f,l,u)}n.setHeadingColumnsCount(u,o,l)})}}const J9e=5,XA=40,Z9e=2,Q9e=3;function eze(t){const e=new Set;for(const n of t.document.differ.getChanges()){let i=null;switch(n.type){case"insert":i=["table","tableRow","tableCell"].includes(n.name)?n.position:null;break;case"remove":i=["tableRow","tableCell"].includes(n.name)?n.position:null;break;case"attribute":n.range.start.nodeAfter&&(i=["table","tableRow","tableCell"].includes(n.range.start.nodeAfter.name)?n.range.start:null);break}if(!i)continue;const r=i.nodeAfter&&i.nodeAfter.is("element","table")?i.nodeAfter:i.findAncestor("table");for(const o of t.createRangeOn(r).getItems())o.is("element","table")&&p0(o)&&e.add(o)}return e}function tze(t,e){return XA*100/sJ(t,e)}function sJ(t,e){const n=_6(t,"tbody",e)||_6(t,"thead",e),i=e.editing.view.domConverter.mapViewToDom(n);return JA(i)}function _6(t,e,n){return[...[...n.editing.mapper.toViewElement(t).getChildren()].find(o=>o.is("element","table")).getChildren()].find(o=>o.is("element",e))}function JA(t){const e=Qe.window.getComputedStyle(t);return e.boxSizing==="border-box"?parseFloat(e.width)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderLeftWidth)-parseFloat(e.borderRightWidth):parseFloat(e.width)}function nze(t,e){const n=e.getCellLocation(t).column,i=t.getAttribute("colspan")||1;return{leftEdge:n,rightEdge:n+i-1}}function vo(t){const e=Math.pow(10,Z9e),n=typeof t=="number"?t:parseFloat(t);return Math.round(n*e)/e}function ize(t,e,n){return t<=e?vo(e):t>=n?vo(n):vo(t)}function rze(t,e){return Array(t).fill(e)}function pb(t){return t.map(e=>typeof e=="number"?e:parseFloat(e)).filter(e=>!Number.isNaN(e)).reduce((e,n)=>e+n,0)}function MO(t){const e=t.map(r=>r==="auto"||r===void 0?"auto":parseFloat(r.replace("%","")));let n=oze(e);const i=pb(n);return i!==100&&(n=n.map(r=>vo(r*100/i)).map((r,o,s)=>{if(!(o===s.length-1))return r;const l=pb(s);return vo(r+100-l)})),n.map(r=>r+"%")}function oze(t){const e=t.filter(r=>r==="auto").length;if(e===0)return t.map(r=>vo(r));const n=pb(t),i=Math.max((100-n)/e,J9e);return t.map(r=>r==="auto"?i:r).map(r=>vo(r))}function sze(t){const e=Qe.window.getComputedStyle(t);return e.boxSizing==="border-box"?parseInt(e.width):parseFloat(e.width)+parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderWidth)}function aJ(t,e,n,i){for(let r=0;r<Math.max(n.length,t.length);r++){const o=t[r],s=n[r];s?o?i.setAttribute("columnWidth",s,o):i.appendElement("tableColumn",{columnWidth:s},e):i.remove(o)}}function p0(t){if(t.is("element","tableColumnGroup"))return t;const e=t.getChildren();return Array.from(e).find(n=>n.is("element","tableColumnGroup"))}function v0(t){const e=p0(t);return e?Array.from(e.getChildren()):[]}function aze(t){return v0(t).map(e=>e.getAttribute("columnWidth"))}function lze(t,e){return v0(t).reduce((i,r)=>{const o=r.getAttribute("columnWidth"),s=r.getAttribute("colSpan");if(!s)return i.push(o),i;for(let a=0;a<s;a++)i.push(o);return e.removeAttribute("colSpan",r),i},[])}class Gi extends xe{static get pluginName(){return"TableUtils"}static get isOfficialPlugin(){return!0}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const n=e.parent,i=n.parent,r=i.getChildIndex(n),o=new un(i,{row:r});for(const{cell:s,row:a,column:l}of o)if(s===e)return{row:a,column:l};}createTable(e,n){const i=e.createElement("table"),r=n.rows||2,o=n.columns||2;return wE(e,i,0,r,o),n.headingRows&&this.setHeadingRowsCount(e,i,Math.min(n.headingRows,r)),n.headingColumns&&this.setHeadingColumnsCount(e,i,Math.min(n.headingColumns,o)),i}insertRows(e,n={}){const i=this.editor.model,r=n.at||0,o=n.rows||1,s=n.copyStructureFromAbove!==void 0,a=n.copyStructureFromAbove?r-1:r,l=jl(this.editor),u=this.getRows(e),c=this.getColumns(e);if(r>u)throw new oe("tableutils-insertrows-insert-out-of-range",this,{options:n});i.change(d=>{let f=e.getAttribute("headingRows")||0;const h=e.getAttribute("headingColumns")||0;if(f>r&&(f+=o,this.setHeadingRowsCount(d,e,f,{shallow:!0})),!s&&(r===0||r===u)){const p=wE(d,e,r,o,c);if(l)for(let b=0;b<p.length;b++){const y=p[b];for(let _=0;_<c;_++){const C=y[_];(r+b<f||_<h)&&d.setAttribute("tableCellType","header",C)}}return}const m=s?Math.max(r,a):r,g=new un(e,{endRow:m}),v=new Array(c).fill(1);for(const{row:p,column:b,cellHeight:y,cellWidth:_,cell:C}of g){const S=p+y-1,k=p<r&&r<=S,T=p<=a&&a<=S;k?(d.setAttribute("rowspan",y+o,C),v[b]=-_):s&&T&&(v[b]=_)}for(let p=0;p<o;p++){const b=d.createElement("tableRow");d.insert(b,e,r);for(let y=0;y<v.length;y++){const _=v[y],C=d.createPositionAt(b,"end");if(_>0){const S=Xf(d,C,_>1?{colspan:_}:void 0);l&&(r+p<f||y<h)&&d.setAttribute("tableCellType","header",S)}y+=Math.abs(_)-1}}})}insertColumns(e,n={}){const i=this.editor.model,r=n.at||0,o=n.columns||1,s=jl(this.editor);i.change(a=>{const l=e.getAttribute("headingRows")||0;let u=e.getAttribute("headingColumns");r<u&&(u+=o,this.setHeadingColumnsCount(a,e,u,{shallow:!0}));const c=this.getColumns(e);if(r===0||c===r){let f=0;for(const h of e.getChildren()){if(!h.is("element","tableRow"))continue;const m=zh(o,a,a.createPositionAt(h,r?"end":0));if(s)for(let g=0;g<m.length;g++)(r+g<u||f<l)&&a.setAttribute("tableCellType","header",m[g]);f++}return}const d=new un(e,{column:r,includeAllSlots:!0});for(const f of d){const{row:h,cell:m,cellAnchorColumn:g,cellAnchorRow:v,cellWidth:p,cellHeight:b}=f;if(g<r){a.setAttribute("colspan",p+o,m);const y=v+b-1;for(let _=h;_<=y;_++)d.skipRow(_)}else{const y=zh(o,a,f.getPositionBefore());if(s)for(let _=0;_<y.length;_++)(r+_<u||h<l)&&a.setAttribute("tableCellType","header",y[_])}}})}removeRows(e,n){const i=this.editor.model,r=n.rows||1,o=this.getRows(e),s=n.at,a=s+r-1;if(a>o-1)throw new oe("tableutils-removerows-row-index-out-of-range",this,{table:e,options:n});i.change(l=>{const u={first:s,last:a},{cellsToMove:c,cellsToTrim:d}=dze(e,u);if(c.size){const f=a+1;fze(e,f,c,l)}for(let f=a;f>=s;f--)l.remove(e.getChild(f));for(const{rowspan:f,cell:h}of d)Vi("rowspan",f,h,l);if(cze(e,u,l),GA(e,this)||YA(e,this),jl(this.editor)){let f=e.getAttribute("headingRows")||0;const h=this.getRows(e);for(;f<h&&gh({table:e,row:f});)f++;this.setHeadingRowsCount(l,e,f,{shallow:!0})}})}removeColumns(e,n){const i=this.editor.model,r=n.at,o=n.columns||1,s=n.at+o-1;i.change(a=>{uze(e,{first:r,last:s},a);const l=v0(e);for(let u=s;u>=r;u--){for(const{cell:c,column:d,cellWidth:f}of[...new un(e)])d<=u&&f>1&&d+f>u?Vi("colspan",f-1,c,a):d===u&&a.remove(c);if(l[u]){const c=u===0?l[1]:l[u-1],d=parseFloat(l[u].getAttribute("columnWidth")),f=parseFloat(c.getAttribute("columnWidth"));a.remove(l[u]),a.setAttribute("columnWidth",d+f+"%",c)}}if(YA(e,this)||GA(e,this),jl(this.editor)){let u=e.getAttribute("headingColumns")||0;const c=this.getColumns(e);for(;u<c&&gh({table:e,column:u});)u++;this.setHeadingColumnsCount(a,e,u,{shallow:!0})}})}splitCellVertically(e,n=2){const i=this.editor.model,o=e.parent.parent,s=parseInt(e.getAttribute("rowspan")||"1"),a=parseInt(e.getAttribute("colspan")||"1");i.change(l=>{if(a>1){const{newCellsSpan:u,updatedSpan:c}=C6(a,n);Vi("colspan",c,e,l);const d={};u>1&&(d.colspan=u),s>1&&(d.rowspan=s);const f=a>n?n-1:a-1;zh(f,l,l.createPositionAfter(e),d)}if(a<n){const u=n-a,c=[...new un(o)],{column:d}=c.find(({cell:g})=>g===e),f=c.filter(({cell:g,cellWidth:v,column:p})=>{const b=g!==e&&p===d,y=p<d&&p+v>d;return b||y});for(const{cell:g,cellWidth:v}of f)l.setAttribute("colspan",v+u,g);const h={};s>1&&(h.rowspan=s),zh(u,l,l.createPositionAfter(e),h);const m=o.getAttribute("headingColumns")||0;m>d&&Vi("headingColumns",m+u,o,l)}})}splitCellHorizontally(e,n=2){const i=this.editor.model,r=e.parent,o=r.parent,s=o.getChildIndex(r),a=parseInt(e.getAttribute("rowspan")||"1"),l=parseInt(e.getAttribute("colspan")||"1");i.change(u=>{if(a>1){const c=[...new un(o,{startRow:s,endRow:s+a-1,includeAllSlots:!0})],{newCellsSpan:d,updatedSpan:f}=C6(a,n);Vi("rowspan",f,e,u);const{column:h}=c.find(({cell:v})=>v===e),m={};d>1&&(m.rowspan=d),l>1&&(m.colspan=l);let g=0;for(const v of c){const{column:p,row:b}=v,y=b>=s+f,_=p===h;g>=d&&_&&(g=0),y&&_&&(g||zh(1,u,v.getPositionBefore(),m),g++)}}if(a<n){const c=n-a,d=[...new un(o,{startRow:0,endRow:s})];for(const{cell:m,cellHeight:g,row:v}of d)if(m!==e&&v+g>s){const p=g+c;u.setAttribute("rowspan",p,m)}const f={};l>1&&(f.colspan=l),wE(u,o,s+1,c,1,f);const h=o.getAttribute("headingRows")||0;h>s&&Vi("headingRows",h+c,o,u)}})}getColumns(e){return[...e.getChild(0).getChildren()].filter(i=>i.is("element","tableCell")).reduce((i,r)=>{const o=parseInt(r.getAttribute("colspan")||"1");return i+o},0)}getRows(e){return Array.from(e.getChildren()).reduce((n,i)=>i.is("element","tableRow")?n+1:n,0)}createTableWalker(e,n={}){return new un(e,n)}getSelectedTableCells(e){const n=[];for(const i of this.sortRanges(e.getRanges())){const r=i.getContainedElement();r&&r.is("element","tableCell")&&n.push(r)}return n}setHeadingRowsCount(e,n,i,r={}){const{shallow:o,resetFormerHeadingCells:s=!0,autoExpand:a=!0}=r,l=n.getAttribute("headingRows")||0;if(i!==l&&(Vi("headingRows",i,n,e,0),!(o||!jl(this.editor)))){for(const{cell:u,row:c,column:d}of new un(n,{endRow:i-1}))Ty({table:n,writer:e,cell:u,row:c,column:d});if(s&&i<l)for(let u=i;u<l&&gh({table:n,row:u});u++)for(const{cell:c,row:d,column:f}of new un(n,{row:u}))Ty({table:n,writer:e,cell:c,row:d,column:f});if(a&&i>l){const u=this.getRows(n);for(;i<u&&gh({table:n,row:i});)i++;Vi("headingRows",i,n,e,0)}}}setHeadingColumnsCount(e,n,i,r={}){const{shallow:o,resetFormerHeadingCells:s=!0,autoExpand:a=!0}=r,l=n.getAttribute("headingColumns")||0;if(i!==l&&(Vi("headingColumns",i,n,e,0),!(o||!jl(this.editor)))){for(const{cell:u,row:c,column:d}of new un(n,{endColumn:i-1}))Ty({table:n,writer:e,cell:u,row:c,column:d});if(s&&i<l)for(let u=i;u<l&&gh({table:n,column:u});u++)for(const{cell:c,row:d,column:f}of new un(n,{column:u}))Ty({table:n,writer:e,cell:c,row:d,column:f});if(a&&i>l){const u=this.getColumns(n);for(;i<u&&gh({table:n,column:i});)i++;Vi("headingColumns",i,n,e,0)}}}getTableCellsContainingSelection(e){const n=[];for(const i of e.getRanges()){const r=i.start.findAncestor("tableCell");r&&n.push(r)}return n}getSelectionAffectedTableCells(e){const n=this.getSelectedTableCells(e);return n.length?n:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const n=e.map(i=>i.parent.index);return this._getFirstLastIndexesObject(n)}getColumnIndexes(e){const n=e[0].findAncestor("table"),r=[...new un(n)].filter(o=>e.includes(o.cell)).map(o=>o.column);return this._getFirstLastIndexesObject(r)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const n=new Set,i=new Set;let r=0;for(const s of e){const{row:a,column:l}=this.getCellLocation(s),u=parseInt(s.getAttribute("rowspan"))||1,c=parseInt(s.getAttribute("colspan"))||1;n.add(a),i.add(l),u>1&&n.add(a+u-1),c>1&&i.add(l+c-1),r+=u*c}return mze(n,i)==r}sortRanges(e){return Array.from(e).sort(hze)}_getFirstLastIndexesObject(e){const n=e.sort((o,s)=>o-s),i=n[0],r=n[n.length-1];return{first:i,last:r}}_areCellInTheSameTableSection(e){const n=e[0].findAncestor("table"),i=this.getRowIndexes(e),r=parseInt(n.getAttribute("headingRows"))||0;if(!this._areIndexesInSameSection(i,r))return!1;const o=this.getColumnIndexes(e),s=parseInt(n.getAttribute("headingColumns"))||0;return this._areIndexesInSameSection(o,s)}_areIndexesInSameSection({first:e,last:n},i){const r=e<i,o=n<i;return r===o}}function wE(t,e,n,i,r,o={}){const s=[];for(let a=0;a<i;a++){const l=t.createElement("tableRow");t.insert(l,e,n),s.push(zh(r,t,t.createPositionAt(l,"end"),o))}return s}function zh(t,e,n,i={}){const r=[];let o=n;for(let s=0;s<t;s++){const a=Xf(e,o,i);r.push(a),o=e.createPositionAfter(a)}return r}function C6(t,e){if(t<e)return{newCellsSpan:1,updatedSpan:1};const n=Math.floor(t/e),i=t-n*e+n;return{newCellsSpan:n,updatedSpan:i}}function uze(t,e,n){const i=t.getAttribute("headingColumns")||0;if(i&&e.first<i){const r=Math.min(i-1,e.last)-e.first+1;n.setAttribute("headingColumns",i-r,t)}}function cze(t,{first:e,last:n},i){const r=t.getAttribute("headingRows")||0;if(e<r){const o=n<r?r-(n-e+1):e;Vi("headingRows",o,t,i,0)}}function dze(t,{first:e,last:n}){const i=new Map,r=[];for(const{row:o,column:s,cellHeight:a,cell:l}of new un(t,{endRow:n})){const u=o+a-1;if(o>=e&&o<=n&&u>n){const f=n-o+1,h=a-f;i.set(s,{cell:l,rowspan:h})}if(o<e&&u>=e){let f;u>=n?f=n-e+1:f=u-e+1,r.push({cell:l,rowspan:a-f})}}return{cellsToMove:i,cellsToTrim:r}}function fze(t,e,n,i){const o=[...new un(t,{includeAllSlots:!0,row:e})],s=t.getChild(e);let a;for(const{column:l,cell:u,isAnchor:c}of o)if(n.has(l)){const{cell:d,rowspan:f}=n.get(l),h=a?i.createPositionAfter(a):i.createPositionAt(s,0);i.move(i.createRangeOn(d),h),Vi("rowspan",f,d,i),a=d}else c&&(a=u)}function hze(t,e){const n=t.start,i=e.start;return n.isBefore(i)?-1:1}function mze(t,e){const n=Array.from(t.values()),i=Array.from(e.values()),r=Math.max(...n),o=Math.min(...n),s=Math.max(...i),a=Math.min(...i);return(r-o+1)*(s-a+1)}function Ty({writer:t,table:e,row:n,column:i,cell:r}){const o=e.getAttribute("headingRows")||0,s=e.getAttribute("headingColumns")||0;n>=o&&i>=s?t.removeAttribute("tableCellType",r):t.setAttribute("tableCellType","header",r)}class gze extends Ht{refresh(){const e=this.editor.plugins.get(Gi),n=e.getSelectedTableCells(this.editor.model.document.selection);this.isEnabled=e.isSelectionRectangular(n)}execute(){const e=this.editor.model,n=this.editor.plugins.get(Gi);e.change(i=>{const r=n.getSelectedTableCells(e.document.selection),o=r.shift(),{mergeWidth:s,mergeHeight:a}=vze(o,r,n);Vi("colspan",s,o,i),Vi("rowspan",a,o,i);for(const u of r)pze(u,o,i);const l=o.findAncestor("table");PO(l,n),i.setSelection(o,"in")})}}function pze(t,e,n){S6(t)||(S6(e)&&n.remove(n.createRangeIn(e)),n.move(n.createRangeIn(t),n.createPositionAt(e,"end"))),n.remove(t)}function S6(t){const e=t.getChild(0);return t.childCount==1&&e.is("element","paragraph")&&e.isEmpty}function vze(t,e,n){let i=0,r=0;for(const u of e){const{row:c,column:d}=n.getCellLocation(u);i=k6(u,d,i,"colspan"),r=k6(u,c,r,"rowspan")}const{row:o,column:s}=n.getCellLocation(t),a=i-s,l=r-o;return{mergeWidth:a,mergeHeight:l}}function k6(t,e,n,i){const r=parseInt(t.getAttribute(i)||"1");return Math.max(n,e+r)}class bze extends Ht{constructor(e){super(e),this.affectsData=!1}refresh(){const n=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=n.length>0}execute(){const e=this.editor.model,n=this.editor.plugins.get("TableUtils"),i=n.getSelectionAffectedTableCells(e.document.selection),r=n.getRowIndexes(i),o=i[0].findAncestor("table"),s=[];for(let a=r.first;a<=r.last;a++)for(const l of o.getChild(a).getChildren())s.push(e.createRangeOn(l));e.change(a=>{a.setSelection(s)})}}class yze extends Ht{constructor(e){super(e),this.affectsData=!1}refresh(){const n=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=n.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),n=this.editor.model,i=e.getSelectionAffectedTableCells(n.document.selection),r=i[0],o=i.pop(),s=r.findAncestor("table"),a=e.getCellLocation(r),l=e.getCellLocation(o),u=Math.min(a.column,l.column),c=Math.max(a.column,l.column),d=[];for(const f of new un(s,{startColumn:u,endColumn:c}))d.push(n.createRangeOn(f.cell));n.change(f=>{f.setSelection(d)})}}function wze(t){t.document.registerPostFixer(e=>_ze(e,t))}function _ze(t,e){const n=e.document.differ.getChanges();let i=!1;const r=new Set;for(const o of n){let s=null;o.type=="insert"&&o.name=="table"&&(s=o.position.nodeAfter),(o.type=="insert"||o.type=="remove")&&(o.name=="tableRow"||o.name=="tableCell")&&(s=o.position.findAncestor("table")),Eze(o)&&(s=o.range.start.findAncestor("table")),s&&!r.has(s)&&(i=Cze(s,t)||i,i=Sze(s,t)||i,r.add(s))}return i}function Cze(t,e){let n=!1;const i=kze(t);if(i.length){n=!0;for(const r of i)Vi("rowspan",r.rowspan,r.cell,e,1)}return n}function Sze(t,e){let n=!1;const i=Tze(t),r=[];for(const[l,u]of i.entries())!u&&t.getChild(l).is("element","tableRow")&&r.push(l);if(r.length){n=!0;for(const l of r.reverse())e.remove(t.getChild(l)),i.splice(l,1)}const o=i.filter((l,u)=>t.getChild(u).is("element","tableRow")),s=o[0];if(!o.every(l=>l===s)){const l=o.reduce((u,c)=>c>u?c:u,0);for(const[u,c]of o.entries()){const d=l-c;if(d){for(let f=0;f<d;f++)Xf(e,e.createPositionAt(t.getChild(u),"end"));n=!0}}}return n}function kze(t){const e=parseInt(t.getAttribute("headingRows")||"0"),n=Array.from(t.getChildren()).reduce((r,o)=>o.is("element","tableRow")?r+1:r,0),i=[];for(const{row:r,cell:o,cellHeight:s}of new un(t)){if(s<2)continue;const l=r<e?e:n;if(r+s>l){const u=l-r;i.push({cell:o,rowspan:u})}}return i}function Tze(t){const e=new Array(t.childCount).fill(0);for(const{rowIndex:n}of new un(t,{includeAllSlots:!0}))e[n]++;return e}function Eze(t){if(t.type!=="attribute")return!1;const e=t.attributeKey;return e==="headingRows"||e==="colspan"||e==="rowspan"}function xze(t){t.document.registerPostFixer(e=>Aze(e,t))}function Aze(t,e){const n=e.document.differ.getChanges();let i=!1;for(const r of n)r.type=="insert"&&r.name=="table"&&(i=Pze(r.position.nodeAfter,t)||i),r.type=="insert"&&r.name=="tableRow"&&(i=lJ(r.position.nodeAfter,t)||i),r.type=="insert"&&r.name=="tableCell"&&(i=ZA(r.position.nodeAfter,t)||i),(r.type=="remove"||r.type=="insert")&&Ize(r)&&(i=ZA(r.position.parent,t)||i);return i}function Pze(t,e){let n=!1;for(const i of t.getChildren())i.is("element","tableRow")&&(n=lJ(i,e)||n);return n}function lJ(t,e){let n=!1;for(const i of t.getChildren())n=ZA(i,e)||n;return n}function ZA(t,e){if(t.childCount==0)return e.insertElement("paragraph",t),!0;const n=Array.from(t.getChildren()).filter(i=>i.is("$text"));for(const i of n)e.wrap(e.createRangeOn(i),"paragraph");return!!n.length}function Ize(t){return t.position.parent.is("element","tableCell")?t.type=="insert"&&t.name=="$text"||t.type=="remove":!1}function Rze(t,e){const n=t.document.differ;for(const i of n.getChanges()){let r,o=!1;if(i.type=="attribute"){const u=i.range.start.nodeAfter;if(!u||!u.is("element","table")||i.attributeKey!="headingRows"&&i.attributeKey!="headingColumns")continue;r=u,o=i.attributeKey=="headingRows"}else(i.name=="tableRow"||i.name=="tableCell")&&(r=i.position.findAncestor("table"),o=i.name=="tableRow");if(!r)continue;const s=r.getAttribute("headingRows")||0,a=r.getAttribute("headingColumns")||0,l=new un(r);for(const u of l){const d=u.row<s||u.column<a?"th":"td",f=e.mapper.toViewElement(u.cell);f&&f.is("element")&&f.name!=d&&e.reconvertItem(o?u.cell.parent:u.cell)}}}function Mze(t,e){const n=t.document.differ,i=new Set;for(const r of n.getChanges()){const o=r.type=="attribute"?r.range.start.parent:r.position.parent;o.is("element","tableCell")&&i.add(o)}for(const r of i.values()){const o=Array.from(r.getChildren()).filter(s=>Oze(s,e.mapper));for(const s of o)e.reconvertItem(s)}}function Oze(t,e){if(!t.is("element","paragraph"))return!1;const n=e.toViewElement(t);return n?oJ(t)!==n.is("element","span"):!1}class PS extends xe{_additionalSlots;static get pluginName(){return"TableEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[Gi]}constructor(e){super(e),this._additionalSlots=[]}init(){const e=this.editor,n=e.model,i=n.schema,r=e.conversion,o=e.plugins.get(Gi);i.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),i.register("tableRow",{allowIn:"table",isLimit:!0}),i.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),r.for("upcast").add(E9e()),r.for("upcast").add(x9e()),r.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:m6(o,{asWidget:!0,additionalSlots:this._additionalSlots})}),r.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:m6(o,{additionalSlots:this._additionalSlots})}),r.for("upcast").elementToElement({model:"tableRow",view:"tr"}),r.for("upcast").add(A9e()),r.for("downcast").elementToElement({model:"tableRow",view:M9e()}),r.for("upcast").elementToElement({model:"tableCell",view:"td"}),r.for("upcast").elementToElement({model:"tableCell",view:"th"}),r.for("upcast").add(h6("td")),r.for("upcast").add(h6("th")),r.for("editingDowncast").elementToElement({model:"tableCell",view:g6({asWidget:!0,cellTypeEnabled:()=>jl(this.editor)})}),r.for("dataDowncast").elementToElement({model:"tableCell",view:g6({cellTypeEnabled:()=>jl(this.editor)})}),r.for("editingDowncast").elementToElement({model:"paragraph",view:p6({asWidget:!0}),converterPriority:"high"}),r.for("dataDowncast").elementToElement({model:"paragraph",view:p6(),converterPriority:"high"}),r.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),r.for("upcast").attributeToAttribute({model:{key:"colspan",value:T6("colspan")},view:"colspan"}),r.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),r.for("upcast").attributeToAttribute({model:{key:"rowspan",value:T6("rowspan")},view:"rowspan"}),this._addPlainTableOutputConverters(),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.config.define("table.showHiddenBorders",!0),e.config.get("table.showHiddenBorders")&&e.editing.view.change(s=>{for(const a of e.editing.view.document.roots)s.addClass("ck-table-show-hidden-borders",a)}),e.commands.add("insertTable",new F9e(e)),e.commands.add("insertTableRowAbove",new v6(e,{order:"above"})),e.commands.add("insertTableRowBelow",new v6(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new b6(e,{order:"left"})),e.commands.add("insertTableColumnRight",new b6(e,{order:"right"})),e.commands.add("removeTableRow",new W9e(e)),e.commands.add("removeTableColumn",new j9e(e)),e.commands.add("splitTableCellVertically",new y6(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new y6(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new gze(e)),e.commands.add("mergeTableCellRight",new ky(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new ky(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new ky(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new ky(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new X9e(e)),e.commands.add("setTableRowHeader",new Y9e(e)),e.commands.add("selectTableRow",new bze(e)),e.commands.add("selectTableColumn",new yze(e)),wze(n),xze(n),this.listenTo(n.document,"change:data",()=>{jl(e)||Rze(n,e.editing),Mze(n,e.editing)})}registerAdditionalSlot(e){this._additionalSlots.push(e)}_addPlainTableOutputConverters(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:D9e(e),converterPriority:"high"}),e.plugins.has("TableCaptionEditing")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:N9e(e),converterPriority:"high"}),e.plugins.has("TablePropertiesEditing")&&V9e(e)}}function T6(t){return e=>{const n=parseInt(e.getAttribute(t));return Number.isNaN(n)||n<=0?null:n}}class E6 extends ut{items;keystrokes;focusTracker;constructor(e){super(e);const n=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new Qi,this.focusTracker=new wi,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",(i,r)=>`${r} × ${i}`),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":n.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:n.to("label")}]}],on:{mousedown:n.to(i=>{i.preventDefault()}),click:n.to(()=>{this.fire("execute")})}}),this.on("boxover",(i,r)=>{const{row:o,column:s}=r.target.dataset;this.items.get((parseInt(o,10)-1)*10+(parseInt(s,10)-1)).focus()}),this.focusTracker.on("change:focusedElement",(i,r,o)=>{if(!o)return;const{row:s,column:a}=o.dataset;this.set({rows:parseInt(s),columns:parseInt(a)})}),this.on("change:columns",()=>this._highlightGridBoxes()),this.on("change:rows",()=>this._highlightGridBoxes())}render(){super.render(),kY({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}reset(){this.set({rows:1,columns:1})}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,n=this.columns;this.items.map((i,r)=>{const o=Math.floor(r/10),s=r%10,a=o<e&&s<n;i.set("isOn",a)})}_createGridButton(e,n,i,r){const o=new wt(e);return o.set({label:r,class:"ck-insert-table-dropdown-grid-box"}),o.extendTemplate({attributes:{"data-row":n,"data-column":i}}),o}_createGridCollection(){const e=[];for(let n=0;n<100;n++){const i=Math.floor(n/10),r=n%10,o=`${i+1} × ${r+1}`;e.push(this._createGridButton(this.locale,i+1,r+1,o))}return this.createCollection(e)}}class Lze extends xe{static get pluginName(){return"TableUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=this.editor.t,r=e.locale.contentLanguageDirection==="ltr";e.ui.componentFactory.add("insertTable",o=>{const s=e.commands.get("insertTable"),a=Ro(o);a.bind("isEnabled").to(s),a.buttonView.set({icon:hV,label:n("Insert table"),tooltip:!0});let l;return a.on("change:isOpen",()=>{l||(l=new E6(o),a.panelView.children.add(l),l.delegate("execute").to(a),a.on("execute",()=>{e.execute("insertTable",{rows:l.rows,columns:l.columns}),e.editing.view.focus()}))}),a}),e.ui.componentFactory.add("menuBar:insertTable",o=>{const s=e.commands.get("insertTable"),a=new la(o),l=new E6(o);return l.delegate("execute").to(a),a.on("change:isOpen",(u,c,d)=>{d||l.reset()}),l.on("execute",()=>{e.execute("insertTable",{rows:l.rows,columns:l.columns}),e.editing.view.focus()}),a.buttonView.set({label:n("Table"),icon:hV}),a.panelView.children.add(l),a.bind("isEnabled").to(s),a}),e.ui.componentFactory.add("tableColumn",o=>{const s=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:n("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:r?"insertTableColumnLeft":"insertTableColumnRight",label:n("Insert column left")}},{type:"button",model:{commandName:r?"insertTableColumnRight":"insertTableColumnLeft",label:n("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:n("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:n("Select column")}}];return this._prepareDropdown(n("Column"),CNe,s,o)}),e.ui.componentFactory.add("tableRow",o=>{const s=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:n("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:n("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:n("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:n("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:n("Select row")}}];return this._prepareDropdown(n("Row"),kNe,s,o)}),e.ui.componentFactory.add("mergeTableCells",o=>{const s=[{type:"button",model:{commandName:"mergeTableCellUp",label:n("Merge cell up")}},{type:"button",model:{commandName:r?"mergeTableCellRight":"mergeTableCellLeft",label:n("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:n("Merge cell down")}},{type:"button",model:{commandName:r?"mergeTableCellLeft":"mergeTableCellRight",label:n("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:n("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:n("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(n("Merge cells"),SNe,s,o)})}_prepareDropdown(e,n,i,r){const o=this.editor,s=Ro(r),a=this._fillDropdownWithListOptions(s,i);return s.buttonView.set({label:e,icon:n,tooltip:!0}),s.bind("isEnabled").toMany(a,"isEnabled",(...l)=>l.some(u=>u)),this.listenTo(s,"execute",l=>{o.execute(l.source.commandName),l.source instanceof wS||o.editing.view.focus()}),s}_prepareMergeSplitButtonDropdown(e,n,i,r){const o=this.editor,s=Ro(r,_S),a="mergeTableCells",l=o.commands.get(a),u=this._fillDropdownWithListOptions(s,i);return s.buttonView.set({label:e,icon:n,tooltip:!0,isEnabled:!0}),s.bind("isEnabled").toMany([l,...u],"isEnabled",(...c)=>c.some(d=>d)),this.listenTo(s.buttonView,"execute",()=>{o.execute(a),o.editing.view.focus()}),this.listenTo(s,"execute",c=>{o.execute(c.source.commandName),o.editing.view.focus()}),s}_fillDropdownWithListOptions(e,n){const i=this.editor,r=[],o=new Er;for(const s of n)Dze(s,i,r,o);return f0(e,o),r}}function Dze(t,e,n,i){if(t.type==="button"||t.type==="switchbutton"){const r=t.model=new Jm(t.model),{commandName:o,bindIsOn:s}=t.model,a=e.commands.get(o);n.push(a),r.set({commandName:o}),r.bind("isEnabled").to(a),s&&r.bind("isOn").to(a,"value"),r.set({withText:!0})}i.add(t)}class yc extends xe{static get pluginName(){return"TableSelection"}static get isOfficialPlugin(){return!0}static get requires(){return[Gi,Gi]}init(){const e=this.editor,n=e.model,i=e.editing.view;this.listenTo(n,"deleteContent",(r,o)=>this._handleDeleteContent(r,o),{priority:"high"}),this.listenTo(i.document,"insertText",(r,o)=>this._handleInsertTextEvent(r,o),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(Gi),n=this.editor.model.document.selection,i=e.getSelectedTableCells(n);return i.length==0?null:i}getSelectionAsFragment(){const e=this.editor.plugins.get(Gi),n=this.getSelectedTableCells();return n?this.editor.model.change(i=>{const r=i.createDocumentFragment(),{first:o,last:s}=e.getColumnIndexes(n),{first:a,last:l}=e.getRowIndexes(n),u=n[0].findAncestor("table");let c=l,d=s;if(e.isSelectionRectangular(n)){const m={firstColumn:o,lastColumn:s,firstRow:a,lastRow:l};c=iJ(u,m),d=rJ(u,m)}const h=JX(u,{startRow:a,startColumn:o,endRow:c,endColumn:d},i);return i.insert(h,r,0),r}):null}setCellSelection(e,n){const i=this._getCellsToSelect(e,n);this.editor.model.change(r=>{r.setSelection(i.cells.map(o=>r.createRangeOn(o)),{backward:i.backward})})}getFocusCell(){const i=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return i&&i.is("element","tableCell")?i:null}getAnchorCell(){const e=this.editor.model.document.selection,i=Mi(e.getRanges()).getContainedElement();return i&&i.is("element","tableCell")?i:null}_defineSelectionConverter(){const e=this.editor,n=new Set;e.conversion.for("editingDowncast").add(r=>r.on("selection",(o,s,a)=>{const l=a.writer;i(l);const u=this.getSelectedTableCells();if(!u)return;for(const d of u){const f=a.mapper.toViewElement(d);l.addClass("ck-editor__editable_selected",f),n.add(f)}const c=a.mapper.toViewElement(u[u.length-1]);l.setSelection(c,0)},{priority:"lowest"}));function i(r){for(const o of n)r.removeClass("ck-editor__editable_selected",o);n.clear()}}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",()=>{if(!this.isEnabled){const n=this.getSelectedTableCells();if(!n)return;e.model.change(i=>{const r=i.createPositionAt(n[0],0),o=e.model.schema.getNearestSelectionRange(r);i.setSelection(o)})}})}_handleDeleteContent(e,n){const i=this.editor.plugins.get(Gi),r=n[0],o=n[1],s=this.editor.model,a=!o||o.direction=="backward",l=i.getSelectedTableCells(r);l.length&&(e.stop(),s.change(u=>{const c=l[a?l.length-1:0];s.change(f=>{for(const h of l)s.deleteContent(f.createSelection(h,"in"))});const d=s.schema.getNearestSelectionRange(u.createPositionAt(c,0));r.is("documentSelection")?u.setSelection(d):r.setTo(d)}))}_handleInsertTextEvent(e,n){const i=this.editor,r=this.getSelectedTableCells();if(!r)return;const o=i.editing.view,s=i.editing.mapper,a=r.map(l=>o.createRangeOn(s.toViewElement(l)));n.selection=o.createSelection(a),n.preventDefault()}_getCellsToSelect(e,n){const i=this.editor.plugins.get("TableUtils"),r=i.getCellLocation(e),o=i.getCellLocation(n),s=Math.min(r.row,o.row),a=Math.max(r.row,o.row),l=Math.min(r.column,o.column),u=parseInt(n.getAttribute("colspan")||"1")-1,c=Math.max(r.column,o.column+u),d=new Array(a-s+1).fill(null).map(()=>[]),f={startRow:s,endRow:a,startColumn:l,endColumn:c};for(const{row:g,cell:v}of new un(e.findAncestor("table"),f))d[g-s].push(v);const h=o.row<r.row,m=o.column<r.column;return h&&d.reverse(),m&&d.forEach(g=>g.reverse()),{cells:d.flat(),backward:h||m}}}class Nze extends xe{static get pluginName(){return"TableClipboard"}static get isOfficialPlugin(){return!0}static get requires(){return[av,fs,yc,Gi]}init(){const n=this.editor.editing.view.document;this.listenTo(n,"copy",(i,r)=>this._onCopyCut(i,r)),this.listenTo(n,"cut",(i,r)=>this._onCopyCut(i,r)),this._listenToContentInsertion(),this.decorate("_replaceTableSlotCell")}_listenToContentInsertion(){const{editor:e}=this,n=e.plugins.get(fs),i=e.plugins.get(yc);let r=!1;n.on("contentInsertion",(o,s)=>{r=s.method==="paste"}),this.listenTo(e.model,"insertContent",(o,[s,a])=>{(r||i.getSelectedTableCells()!==null)&&this._onInsertContent(o,s,a)},{priority:"high"}),n.on("contentInsertion",()=>{r=!1},{priority:"lowest"})}_onCopyCut(e,n){const i=this.editor.editing.view,r=this.editor.plugins.get(yc),o=this.editor.plugins.get(av);r.getSelectedTableCells()&&(e.name=="cut"&&!this.editor.model.canEditAt(this.editor.model.document.selection)||(n.preventDefault(),e.stop(),this.editor.model.enqueueChange({isUndoable:e.name==="cut"},()=>{const s=o._copySelectedFragmentWithMarkers(e.name,this.editor.model.document.selection,()=>r.getSelectionAsFragment());i.document.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:this.editor.data.toView(s),method:e.name})})))}_onInsertContent(e,n,i){if(i&&!i.is("documentSelection"))return;const r=this.editor.model,o=this.editor.plugins.get(Gi),s=this.editor.plugins.get(av),a=this.getTableIfOnlyTableInContent(n,r);if(!a)return;const l=o.getSelectionAffectedTableCells(r.document.selection);if(!l.length){PO(a,o);return}e.stop(),n.is("documentFragment")?s._pasteMarkersIntoTransformedElement(n.markers,u=>this._replaceSelectedCells(a,l,u)):this.editor.model.change(u=>{this._replaceSelectedCells(a,l,u)})}_replaceSelectedCells(e,n,i){const r=this.editor.plugins.get(Gi),o={width:r.getColumns(e),height:r.getRows(e)},s=Bze(n,o,i,r),a=s.lastRow-s.firstRow+1,l=s.lastColumn-s.firstColumn+1,u={startRow:0,startColumn:0,endRow:Math.min(a,o.height)-1,endColumn:Math.min(l,o.width)-1};e=JX(e,u,i);const c=n[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(e,o,c,s,i);if(this.editor.plugins.get("TableSelection").isEnabled){const f=r.sortRanges(d.map(h=>i.createRangeOn(h)));i.setSelection(f)}else i.setSelection(d[0],0);return c}_replaceSelectedCellsWithPasted(e,n,i,r,o){const{width:s,height:a}=n,l=Fze(e,s,a),u=[...new un(i,{startRow:r.firstRow,endRow:r.lastRow,startColumn:r.firstColumn,endColumn:r.lastColumn,includeAllSlots:!0})],c=[];let d;for(const v of u){const{row:p,column:b}=v;b===r.firstColumn&&(d=v.getPositionBefore());const y=p-r.firstRow,_=b-r.firstColumn,C=l[y%a][_%s],S=C?o.cloneElement(C):null,k=this._replaceTableSlotCell(v,S,d,o);k&&(nJ(k,p,b,r.lastRow,r.lastColumn,o),c.push(k),d=o.createPositionAfter(k))}const f=parseInt(i.getAttribute("headingRows")||"0"),h=parseInt(i.getAttribute("headingColumns")||"0"),m=r.firstRow<f&&f<=r.lastRow,g=r.firstColumn<h&&h<=r.lastColumn;if(m){const v={first:r.firstColumn,last:r.lastColumn},p=QA(i,f,v,o,r.firstRow);c.push(...p)}if(g){const v={first:r.firstRow,last:r.lastRow},p=eP(i,h,v,o);c.push(...p)}return c}_replaceTableSlotCell(e,n,i,r){const{cell:o,isAnchor:s}=e;return s&&r.remove(o),n?(r.insert(n,i),n):null}getTableIfOnlyTableInContent(e,n){if(!e.is("documentFragment")&&!e.is("element"))return null;if(e.is("element","table"))return e;if(e.childCount==1&&e.getChild(0).is("element","table"))return e.getChild(0);const i=n.createRangeIn(e);for(const r of i.getItems())if(r.is("element","table")){const o=n.createRange(i.start,n.createPositionBefore(r));if(n.hasContent(o,{ignoreWhitespaces:!0}))return null;const s=n.createRange(n.createPositionAfter(r),i.end);return n.hasContent(s,{ignoreWhitespaces:!0})?null:r}return null}}function Bze(t,e,n,i){const r=t[0].findAncestor("table"),o=i.getColumnIndexes(t),s=i.getRowIndexes(t),a={firstColumn:o.first,lastColumn:o.last,firstRow:s.first,lastRow:s.last},l=t.length===1;return l&&(a.lastRow+=e.height-1,a.lastColumn+=e.width-1,Vze(r,a.lastRow+1,a.lastColumn+1,i)),l||!i.isSelectionRectangular(t)?$ze(r,a,n):(a.lastRow=iJ(r,a),a.lastColumn=rJ(r,a)),a}function Vze(t,e,n,i){const r=i.getColumns(t),o=i.getRows(t);n>r&&i.insertColumns(t,{at:r,columns:n-r}),e>o&&i.insertRows(t,{at:o,rows:e-o})}function Fze(t,e,n){const i=new Array(n).fill(null).map(()=>new Array(e).fill(null));for(const{column:r,row:o,cell:s}of new un(t))i[o][r]=s;return i}function $ze(t,e,n){const{firstRow:i,lastRow:r,firstColumn:o,lastColumn:s}=e,a={first:i,last:r},l={first:o,last:s};eP(t,o,a,n),eP(t,s+1,a,n),QA(t,i,l,n),QA(t,r+1,l,n,i)}function QA(t,e,n,i,r=0){return e<1?void 0:ZX(t,e,r).filter(({column:a,cellWidth:l})=>uJ(a,l,n)).map(({cell:a})=>QX(a,e,i))}function eP(t,e,n,i){return e<1?void 0:eJ(t,e).filter(({row:s,cellHeight:a})=>uJ(s,a,n)).map(({cell:s,column:a})=>tJ(s,a,e,i))}function uJ(t,e,n){const i=t+e-1,{first:r,last:o}=n,s=t>=r&&t<=o,a=t<r&&i>=r;return s||a}class zze extends xe{static get pluginName(){return"TableKeyboard"}static get isOfficialPlugin(){return!0}static get requires(){return[yc,Gi]}init(){const e=this.editor,i=e.editing.view.document,r=e.t;this.listenTo(i,"arrowKey",(...o)=>this._onArrowKey(...o),{context:"table"}),this.listenTo(i,"tab",(...o)=>this._handleTabOnSelectedTable(...o),{context:"figure"}),this.listenTo(i,"tab",(...o)=>this._handleTab(...o),{context:["th","td"]}),e.accessibility.addKeystrokeInfoGroup({id:"table",label:r("Keystrokes that can be used in a table cell"),keystrokes:[{label:r("Move the selection to the next cell"),keystroke:"Tab"},{label:r("Move the selection to the previous cell"),keystroke:"Shift+Tab"},{label:r("Insert a new table row (when in the last cell of a table)"),keystroke:"Tab"},{label:r("Navigate through the table"),keystroke:[["arrowup"],["arrowright"],["arrowdown"],["arrowleft"]]}]})}_handleTabOnSelectedTable(e,n){const o=this.editor.model.document.selection.getSelectedElement();!o||!o.is("element","table")||n.stopPropagation()}_handleTab(e,n){const i=this.editor,r=this.editor.plugins.get(Gi),o=this.editor.plugins.get("TableSelection"),s=i.model.document.selection,a=!n.shiftKey;let l=r.getTableCellsContainingSelection(s)[0];if(l||(l=o.getFocusCell()),!l)return;n.stopPropagation();const u=l.parent,c=u.parent,d=c.getChildIndex(u),h=u.getChildIndex(l)===u.childCount-1,m=d===r.getRows(c)-1;a&&m&&h&&i.execute("insertTableRowBelow")}_onArrowKey(e,n){const i=this.editor,r=n.keyCode,o=$M(r,i.locale.contentLanguageDirection);this._handleArrowKeys(o,n.shiftKey)&&(n.preventDefault(),n.stopPropagation(),e.stop())}_handleArrowKeys(e,n){const i=this.editor.plugins.get(Gi),r=this.editor.plugins.get("TableSelection"),o=this.editor.model,s=o.document.selection,a=["right","down"].includes(e),l=i.getSelectedTableCells(s);if(l.length){let c;return n?c=r.getFocusCell():c=a?l[l.length-1]:l[0],this._navigateFromCellInDirection(c,e,n),!0}const u=s.focus.findAncestor("tableCell");if(!u)return!1;if(!s.isCollapsed)if(n){if(s.isBackward==a&&!s.containsEntireContent(u))return!1}else{const c=s.getSelectedElement();if(!c||!o.schema.isObject(c))return!1}return this._isSelectionAtCellEdge(s,u,a)?(this._navigateFromCellInDirection(u,e,n),!0):!1}_isSelectionAtCellEdge(e,n,i){const r=this.editor.model,o=this.editor.model.schema,s=i?e.getLastPosition():e.getFirstPosition();if(!o.getLimitElement(s).is("element","tableCell"))return r.createPositionAt(n,i?"end":0).isTouching(s);const a=r.createSelection(s);return r.modifySelection(a,{direction:i?"forward":"backward"}),s.isEqual(a.focus)}_navigateFromCellInDirection(e,n,i=!1){const r=this.editor.model,o=e.findAncestor("table"),s=[...new un(o,{includeAllSlots:!0})],{row:a,column:l}=s[s.length-1],u=s.find(({cell:b})=>b==e);let{row:c,column:d}=u;switch(n){case"left":d--;break;case"up":c--;break;case"right":d+=u.cellWidth;break;case"down":c+=u.cellHeight;break}const f=c<0||c>a,h=d<0&&c<=0,m=d>l&&c>=a;if(f||h||m){r.change(b=>{b.setSelection(b.createRangeOn(o))});return}d<0?(d=i?0:l,c--):d>l&&(d=i?l:0,c++);const g=s.find(b=>b.row==c&&b.column==d).cell,v=["right","down"].includes(n),p=this.editor.plugins.get("TableSelection");if(i&&p.isEnabled){const b=p.getAnchorCell()||e;p.setCellSelection(b,g)}else{const b=r.createPositionAt(g,v?0:"end");r.change(y=>{y.setSelection(b)})}}}class cJ extends Cl{domEventType=["mousemove","mouseleave"];onDomEvent(e){this.fire(e.type,e)}}class Hze extends xe{static get pluginName(){return"TableMouse"}static get isOfficialPlugin(){return!0}static get requires(){return[yc,Gi]}init(){this.editor.editing.view.addObserver(cJ),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,n=e.plugins.get(Gi);let i=!1;const r=e.plugins.get(yc);this.listenTo(e.editing.view.document,"mousedown",(o,s)=>{const a=e.model.document.selection;if(!this.isEnabled||!r.isEnabled||!s.domEvent.shiftKey)return;const l=r.getAnchorCell()||n.getTableCellsContainingSelection(a)[0];if(!l)return;const u=this._getModelTableCellFromDomEvent(s);u&&x6(l,u)&&(i=!0,r.setCellSelection(l,u),s.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{i=!1}),this.listenTo(e.editing.view.document,"selectionChange",o=>{i&&o.stop()},{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let n,i,r=!1,o=!1;const s=e.plugins.get(yc);this.listenTo(e.editing.view.document,"mousedown",(a,l)=>{!this.isEnabled||!s.isEnabled||l.domEvent.shiftKey||l.domEvent.ctrlKey||l.domEvent.altKey||(n=this._getModelTableCellFromDomEvent(l))}),this.listenTo(e.editing.view.document,"mousemove",(a,l)=>{if(!l.domEvent.buttons||!n)return;const u=this._getModelTableCellFromDomEvent(l);u&&x6(n,u)&&(i=u,!r&&i!=n&&(r=!0)),r&&(o=!0,s.setCellSelection(n,i),l.preventDefault())}),this.listenTo(e.editing.view.document,"mouseup",()=>{r=!1,o=!1,n=null,i=null}),this.listenTo(e.editing.view.document,"selectionChange",a=>{o&&a.stop()},{priority:"highest"})}_getModelTableCellFromDomEvent(e){const n=e.target,i=this.editor.editing.view.createPositionAt(n,0);return this.editor.editing.mapper.toModelPosition(i).parent.findAncestor("tableCell",{includeSelf:!0})}}function x6(t,e){return t.parent.parent==e.parent.parent}let Uze=class extends xe{static get requires(){return[PS,Lze,yc,Hze,zze,Nze,h0]}static get pluginName(){return"Table"}static get isOfficialPlugin(){return!0}};function Wze(t){const e=dJ(t);return e||IS(t)}function dJ(t){const e=t.getSelectedElement();return e&&fJ(e)?e:null}function IS(t){const e=t.getFirstPosition();if(!e)return null;let n=e.parent;for(;n;){if(n.is("element")&&fJ(n))return n;n=n.parent}return null}function fJ(t){return t.is("element")&&!!t.getCustomProperty("table")&&ci(t)}class qze extends xe{static get requires(){return[y1]}static get pluginName(){return"TableToolbar"}static get isOfficialPlugin(){return!0}afterInit(){const e=this.editor,n=e.t,i=e.plugins.get(y1),r=e.config.get("table.contentToolbar"),o=e.config.get("table.tableToolbar");r&&i.register("tableContent",{ariaLabel:n("Table toolbar"),items:r,getRelatedElement:IS}),o&&i.register("table",{ariaLabel:n("Table toolbar"),items:o,getRelatedElement:dJ})}}class jze extends ut{options;focusTracker;focusCycler;_focusables;dropdownView;inputView;keystrokes;_stillTyping;constructor(e,n){super(e),this.set("value",""),this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isEmpty",!0),this.options=n,this.focusTracker=new wi,this._focusables=new qr,this.dropdownView=this._createDropdownView(),this.inputView=this._createInputTextView(),this.keystrokes=new Qi,this._stillTyping=!1,this.focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-input-color"]},children:[this.dropdownView,this.inputView]}),this.on("change:value",(i,r,o)=>this._setInputValue(o))}render(){super.render(),[this.inputView,this.dropdownView.buttonView].forEach(e=>{this.focusTracker.add(e.element),this._focusables.add(e)}),this.keystrokes.listenTo(this.element)}focus(e){e===-1?this.focusCycler.focusLast():this.focusCycler.focusFirst()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,n=e.t,i=this.bindTemplate,r=this._createColorSelector(e),o=Ro(e),s=new ut;return s.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:i.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",i.if("value","ck-hidden",a=>a!="")]}}]}),o.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),o.buttonView.children.add(s),o.buttonView.label=n("Color picker"),o.buttonView.tooltip=!0,o.panelPosition=e.uiLanguageDirection==="rtl"?"se":"sw",o.panelView.children.add(r),o.bind("isEnabled").to(this,"isReadOnly",a=>!a),o.on("change:isOpen",(a,l,u)=>{u&&(r.updateSelectedColors(),r.showColorGridsFragment())}),o}_createInputTextView(){const e=this.locale,n=new LY(e);return n.extendTemplate({on:{blur:n.bindTemplate.to("blur")}}),n.value=this.value,n.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(n),n.on("input",()=>{const i=n.element.value,r=this.options.colorDefinitions.find(o=>i===o.label);this._stillTyping=!0,this.value=r&&r.color||i}),n.on("blur",()=>{this._stillTyping=!1,this._setInputValue(n.element.value)}),n.delegate("input").to(this),n}_createColorSelector(e){const n=e.t,i=this.options.defaultColorValue||"",r=n(i?"Restore default":"Remove color"),o=new hO(e,{colors:this.options.colorDefinitions,columns:this.options.columns,removeButtonLabel:r,colorPickerLabel:n("Color picker"),colorPickerViewConfig:this.options.colorPickerConfig===!1?!1:{...this.options.colorPickerConfig,hideInput:!0}});o.appendUI(),o.on("execute",(a,l)=>{if(l.source==="colorPickerSaveButton"){this.dropdownView.isOpen=!1;return}this.value=l.value||i,this.fire("input"),l.source!=="colorPicker"&&(this.dropdownView.isOpen=!1)});let s=this.value;return o.on("colorPicker:cancel",()=>{this.value=s,this.fire("input"),this.dropdownView.isOpen=!1}),o.colorGridsFragmentView.colorPickerButtonView.on("execute",()=>{s=this.value}),o.bind("selectedColor").to(this,"value"),o}_setInputValue(e){if(!this._stillTyping){const n=A6(e),i=this.options.colorDefinitions.find(r=>n===A6(r.color));i?this.inputView.value=i.label:this.inputView.value=e||""}}}function A6(t){return t.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const OO=t=>t==="";function hJ(t){return{none:t("None"),solid:t("Solid"),dotted:t("Dotted"),dashed:t("Dashed"),double:t("Double"),groove:t("Groove"),ridge:t("Ridge"),inset:t("Inset"),outset:t("Outset")}}function Kze(t){return t('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Gze(t){return t('The value is invalid. Try "10px" or "2em" or simply "2".')}function P6(t){return t=t.trim().toLowerCase(),OO(t)||XG(t)}function _E(t){return t=t.trim(),OO(t)||mJ(t)||vS(t)||JG(t)}function Yze(t){return t=t.trim(),OO(t)||mJ(t)||vS(t)}function Xze(t,e){const n=new Er,i=hJ(t.t);for(const r in i){const o={type:"button",model:new Jm({_borderStyleValue:r,label:i[r],role:"menuitemradio",withText:!0})};r==="none"?o.model.bind("isOn").to(t,"borderStyle",s=>e==="none"?!s:s===r):o.model.bind("isOn").to(t,"borderStyle",s=>s===r),n.add(o)}return n}function I6(t){const{view:e,icons:n,toolbar:i,labels:r,propertyName:o,nameToValue:s,defaultValue:a}=t;for(const l in r){const u=new wt(e.locale);u.set({role:"radio",isToggleable:!0,label:r[l],icon:n[l],tooltip:r[l]});const c=s?s(l):l;u.bind("isOn").to(e,o,d=>{let f=d;return d===""&&a&&(f=a),c===f}),u.on("execute",()=>{!a&&c&&e[o]===c?e[o]=void 0:e[o]=c}),i.items.add(u)}}const R6=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function M6(t){return(e,n,i)=>{const r=new jze(e.locale,{colorDefinitions:Jze(t.colorConfig),columns:t.columns,defaultColorValue:t.defaultColorValue,colorPickerConfig:t.colorPickerConfig});return r.inputView.set({id:n,ariaDescribedById:i}),r.bind("isReadOnly").to(e,"isEnabled",o=>!o),r.bind("hasError").to(e,"errorText",o=>!!o),r.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused").to(r),r}}function mJ(t){const e=parseFloat(t);return!Number.isNaN(e)&&t===String(e)}function Jze(t){return t.map(e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}}))}class Zze extends ut{options;focusTracker;keystrokes;children;borderStyleDropdown;borderWidthInput;borderColorInput;backgroundInput;paddingInput;widthInput;heightInput;horizontalAlignmentToolbar;verticalAlignmentToolbar;saveButtonView;cancelButtonView;_focusables;_focusCycler;constructor(e,n){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=n;const{borderStyleDropdown:i,borderWidthInput:r,borderColorInput:o,borderRowLabel:s}=this._createBorderFields(),{backgroundRowLabel:a,backgroundInput:l}=this._createBackgroundFields(),{widthInput:u,operatorLabel:c,heightInput:d,dimensionsLabel:f}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:m,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new wi,this.keystrokes=new Qi,this.children=this.createCollection(),this.borderStyleDropdown=i,this.borderWidthInput=r,this.borderColorInput=o,this.backgroundInput=l,this.paddingInput=this._createPaddingField(),this.widthInput=u,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=m;const{saveButtonView:v,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=v,this.cancelButtonView=p,this._focusables=new qr,this._focusCycler=new Ho({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new qf(e,{label:this.t("Cell properties")})),this.children.add(new Xs(e,{labelView:s,children:[s,i,o,r],class:"ck-table-form__border-row"})),this.children.add(new Xs(e,{labelView:a,children:[a,l],class:"ck-table-form__background-row"})),this.children.add(new Xs(e,{children:[new Xs(e,{labelView:f,children:[f,u,c,d],class:"ck-table-form__dimensions-row"}),new Xs(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new Xs(e,{labelView:g,children:[g,h,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new Xs(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),vg({view:this}),[this.borderColorInput,this.backgroundInput].forEach(e=>{this._focusCycler.chain(e.fieldView.focusCycler)}),[this.borderStyleDropdown,this.borderColorInput,this.borderWidthInput,this.backgroundInput,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,n={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},i=M6({colorConfig:this.options.borderColors,columns:5,defaultColorValue:n.color,colorPickerConfig:this.options.colorPickerConfig}),r=this.locale,o=this.t,s=o("Style"),a=new mc(r);a.text=o("Border");const l=hJ(o),u=new Go(r,iBe);u.set({label:s,class:"ck-table-form__border-style"}),u.fieldView.buttonView.set({ariaLabel:s,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:s}),u.fieldView.buttonView.bind("label").to(this,"borderStyle",f=>l[f||"none"]),u.fieldView.on("execute",f=>{this.borderStyle=f.source._borderStyleValue}),u.bind("isEmpty").to(this,"borderStyle",f=>!f),f0(u.fieldView,Xze(this,n.style),{role:"menu",ariaLabel:s});const c=new Go(r,tu);c.set({label:o("Width"),class:"ck-table-form__border-width"}),c.fieldView.bind("value").to(this,"borderWidth"),c.bind("isEnabled").to(this,"borderStyle",Ey),c.fieldView.on("input",()=>{this.borderWidth=c.fieldView.element.value});const d=new Go(r,i);return d.set({label:o("Color"),class:"ck-table-form__border-color"}),d.fieldView.bind("value").to(this,"borderColor"),d.bind("isEnabled").to(this,"borderStyle",Ey),d.fieldView.on("input",()=>{this.borderColor=d.fieldView.value}),this.on("change:borderStyle",(f,h,m,g)=>{Ey(m)||(this.borderColor="",this.borderWidth=""),Ey(g)||(this.borderColor=n.color,this.borderWidth=n.width)}),{borderRowLabel:a,borderStyleDropdown:u,borderColorInput:d,borderWidthInput:c}}_createBackgroundFields(){const e=this.locale,n=this.t,i=new mc(e);i.text=n("Background");const r=M6({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor,colorPickerConfig:this.options.colorPickerConfig}),o=new Go(e,r);return o.set({label:n("Color"),class:"ck-table-cell-properties-form__background"}),o.fieldView.bind("value").to(this,"backgroundColor"),o.fieldView.on("input",()=>{this.backgroundColor=o.fieldView.value}),{backgroundRowLabel:i,backgroundInput:o}}_createDimensionFields(){const e=this.locale,n=this.t,i=new mc(e);i.text=n("Dimensions");const r=new Go(e,tu);r.set({label:n("Width"),class:"ck-table-form__dimensions-row__width"}),r.fieldView.bind("value").to(this,"width"),r.fieldView.on("input",()=>{this.width=r.fieldView.element.value});const o=new ut(e);o.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const s=new Go(e,tu);return s.set({label:n("Height"),class:"ck-table-form__dimensions-row__height"}),s.fieldView.bind("value").to(this,"height"),s.fieldView.on("input",()=>{this.height=s.fieldView.element.value}),{dimensionsLabel:i,widthInput:r,operatorLabel:o,heightInput:s}}_createPaddingField(){const e=this.locale,n=this.t,i=new Go(e,tu);return i.set({label:n("Padding"),class:"ck-table-cell-properties-form__padding"}),i.fieldView.bind("value").to(this,"padding"),i.fieldView.on("input",()=>{this.padding=i.fieldView.element.value}),i}_createAlignmentFields(){const e=this.locale,n=this.t,i=new mc(e),r={left:rO,center:oY,right:aY,justify:sY,top:VDe,middle:BDe,bottom:NDe};i.text=n("Table cell text alignment");const o=new Xm(e),s=e.contentLanguageDirection==="rtl";o.set({isCompact:!0,role:"radiogroup",ariaLabel:n("Horizontal text alignment toolbar")}),I6({view:this,icons:r,toolbar:o,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:l=>{if(s){if(l==="left")return"right";if(l==="right")return"left"}return l},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const a=new Xm(e);return a.set({isCompact:!0,role:"radiogroup",ariaLabel:n("Vertical text alignment toolbar")}),I6({view:this,icons:r,toolbar:a,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:o,verticalAlignmentToolbar:a,alignmentLabel:i}}_createActionButtons(){const e=this.locale,n=this.t,i=new wt(e),r=new wt(e),o=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return i.set({label:n("Save"),icon:sO,class:"ck-button-save",type:"submit",withText:!0}),i.bind("isEnabled").toMany(o,"errorText",(...s)=>s.every(a=>!a)),r.set({label:n("Cancel"),icon:oO,class:"ck-button-cancel",withText:!0}),r.delegate("execute").to(this,"cancel"),{saveButtonView:i,cancelButtonView:r}}get _horizontalAlignmentLabels(){const e=this.locale,n=this.t,i=n("Align cell text to the left"),r=n("Align cell text to the center"),o=n("Align cell text to the right"),s=n("Justify cell text");return e.uiLanguageDirection==="rtl"?{right:o,center:r,left:i,justify:s}:{left:i,center:r,right:o,justify:s}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function Ey(t){return t!=="none"}const O6=[Ki.defaultPositions.northArrowSouth,Ki.defaultPositions.northArrowSouthWest,Ki.defaultPositions.northArrowSouthEast,Ki.defaultPositions.southArrowNorth,Ki.defaultPositions.southArrowNorthWest,Ki.defaultPositions.southArrowNorthEast,Ki.defaultPositions.viewportStickyNorth];function Qze(t,e){const n=t.plugins.get("ContextualBalloon"),i=t.editing.view.document.selection;let r;IS(i)&&(r=gJ(t)),r&&n.updatePosition(r)}function gJ(t){const e=t.editing.mapper,n=t.editing.view.domConverter,i=t.model.document.selection;if(i.rangeCount>1)return{target:()=>eHe(i.getRanges(),t),positions:O6};const r=pJ(i.getFirstPosition()),o=e.toViewElement(r);return{target:n.mapViewToDom(o),positions:O6}}function pJ(t){return t.nodeAfter&&t.nodeAfter.is("element","tableCell")?t.nodeAfter:t.findAncestor("tableCell")}function eHe(t,e){const n=e.editing.mapper,i=e.editing.view.domConverter,r=Array.from(t).map(o=>{const s=pJ(o.start),a=n.toViewElement(s);return new Wt(i.mapViewToDom(a))});return Wt.getBoundingRect(r)}const tHe=500,L6={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class nHe extends xe{_defaultContentTableCellProperties;_defaultLayoutTableCellProperties;_balloon;view;_viewWithContentTableDefaults;_viewWithLayoutTableDefaults;_undoStepBatch;_isReady;static get requires(){return[bu]}static get pluginName(){return"TableCellPropertiesUI"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:R6,backgroundColors:R6})}init(){const e=this.editor,n=e.t;this._defaultContentTableCellProperties=RO(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._defaultLayoutTableCellProperties=IO(void 0,{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"}),this._balloon=e.plugins.get(bu),this.view=null,this._isReady=!1,e.ui.componentFactory.add("tableCellProperties",i=>{const r=new wt(i);r.set({label:n("Cell properties"),icon:_Ne,tooltip:!0}),this.listenTo(r,"execute",()=>this._showView());const o=Object.values(L6).map(s=>e.commands.get(s));return r.bind("isEnabled").toMany(o,"isEnabled",(...s)=>s.some(a=>a)),r})}destroy(){super.destroy(),this.view&&this.view.destroy()}_createPropertiesView(e){const n=this.editor,i=n.config.get("table.tableCellProperties"),r=NA(i.borderColors),o=DA(n.locale,r),s=NA(i.backgroundColors),a=DA(n.locale,s),l=i.colorPicker!==!1,u=new Zze(n.locale,{borderColors:o,backgroundColors:a,defaultTableCellProperties:e,colorPickerConfig:l?i.colorPicker||{}:!1}),c=n.t;u.render(),this.listenTo(u,"submit",()=>{this._hideView()}),this.listenTo(u,"cancel",()=>{this._undoStepBatch.operations.length&&n.execute("undo",this._undoStepBatch),this._hideView()}),u.keystrokes.set("Esc",(h,m)=>{this._hideView(),m()}),Wf({emitter:u,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const d=Kze(c),f=Gze(c);return u.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle")),u.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:u.borderColorInput,commandName:"tableCellBorderColor",errorText:d,validator:P6})),u.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:u.borderWidthInput,commandName:"tableCellBorderWidth",errorText:f,validator:Yze})),u.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:u.paddingInput,commandName:"tableCellPadding",errorText:f,validator:_E})),u.on("change:width",this._getValidatedPropertyChangeCallback({viewField:u.widthInput,commandName:"tableCellWidth",errorText:f,validator:_E})),u.on("change:height",this._getValidatedPropertyChangeCallback({viewField:u.heightInput,commandName:"tableCellHeight",errorText:f,validator:_E})),u.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:u.backgroundInput,commandName:"tableCellBackgroundColor",errorText:d,validator:P6})),u.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment")),u.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment")),u}_fillViewFormFromCommandValues(){const e=this.editor.commands,n=e.get("tableCellBorderStyle");Object.entries(L6).map(([i,r])=>{const o=i,s=this.view===this._viewWithContentTableDefaults?this._defaultContentTableCellProperties[o]||"":this._defaultLayoutTableCellProperties[o]||"";return[i,e.get(r).value||s]}).forEach(([i,r])=>{(i==="borderColor"||i==="borderWidth")&&n.value==="none"||this.view.set(i,r)}),this._isReady=!0}_showView(){const e=this.editor,n=Wze(e.editing.view.document.selection),i=n&&e.editing.mapper.toModelElement(n),r=!i||i.getAttribute("tableType")!=="layout";r&&!this._viewWithContentTableDefaults?this._viewWithContentTableDefaults=this._createPropertiesView(this._defaultContentTableCellProperties):!r&&!this._viewWithLayoutTableDefaults&&(this._viewWithLayoutTableDefaults=this._createPropertiesView(this._defaultLayoutTableCellProperties)),this.view=r?this._viewWithContentTableDefaults:this._viewWithLayoutTableDefaults,this.listenTo(e.ui,"update",()=>{this._updateView()}),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:gJ(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this._isReady=!1,this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor,n=e.editing.view.document;IS(n.selection)?this._isViewVisible&&Qze(e):this._hideView()}get _isViewVisible(){return!!this.view&&this._balloon.visibleView===this.view}get _isViewInBalloon(){return!!this.view&&this._balloon.hasView(this.view)}_getPropertyChangeCallback(e){return(n,i,r)=>{this._isReady&&this.editor.execute(e,{value:r,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:n,viewField:i,validator:r,errorText:o}=e,s=ml(()=>{i.errorText=o},tHe);return(a,l,u)=>{s.cancel(),this._isReady&&(r(u)?(this.editor.execute(n,{value:u,batch:this._undoStepBatch}),i.errorText=null):s())}}}class Sl extends Ht{attributeName;_defaultValue;_defaultContentTableValue;_defaultLayoutTableValue;constructor(e,n,i){switch(super(e),this.attributeName=n,this._defaultContentTableValue=i,n){case"tableCellType":this._defaultLayoutTableValue="data";break;case"tableCellBorderStyle":this._defaultLayoutTableValue="none";break;case"tableCellHorizontalAlignment":this._defaultLayoutTableValue="left";break;case"tableCellVerticalAlignment":this._defaultLayoutTableValue="middle";break;default:this._defaultLayoutTableValue=void 0}}refresh(){const n=this.editor.model.document.selection,r=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n),o=vm(n);this._defaultValue=!o||o.getAttribute("tableType")!=="layout"?this._defaultContentTableValue:this._defaultLayoutTableValue,this.isEnabled=!!r.length,this.value=this._getSingleValue(r)}execute(e={}){const{value:n,batch:i}=e,r=this.editor.model,s=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(r.document.selection),a=this._getValueToSet(n);r.enqueueChange(i,l=>{a?s.forEach(u=>l.setAttribute(this.attributeName,a,u)):s.forEach(u=>l.removeAttribute(this.attributeName,u)),this.fire("afterExecute",{writer:l,tableCells:s,valueToSet:a})})}_getAttribute(e){if(!e)return;const n=e.getAttribute(this.attributeName);if(n!==this._defaultValue)return n}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const n=this._getAttribute(e[0]);return e.every(r=>this._getAttribute(r)===n)?n:void 0}}class iHe extends Sl{constructor(e,n){super(e,"tableCellWidth",n)}_getValueToSet(e){if(e=AS(e,"px"),e!==this._defaultValue)return e}}class vJ extends xe{static get pluginName(){return"TableCellWidthEditing"}static get isOfficialPlugin(){return!0}static get requires(){return[PS]}init(){const e=this.editor,n=RO(e.config.get("table.tableCellProperties.defaultProperties"));s_(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",attributeName:"width",attributeType:"length",defaultValue:n.width}),e.commands.add("tableCellWidth",new iHe(e,n.width))}}class rHe extends Sl{constructor(e,n){super(e,"tableCellPadding",n)}_getAttribute(e){if(!e)return;const n=xS(e.getAttribute(this.attributeName));if(n!==this._defaultValue)return n}_getValueToSet(e){const n=AS(e,"px");if(n!==this._defaultValue)return n}}class oHe extends Sl{constructor(e,n){super(e,"tableCellHeight",n)}_getValueToSet(e){const n=AS(e,"px");if(n!==this._defaultValue)return n}}class sHe extends Sl{constructor(e,n){super(e,"tableCellBackgroundColor",n)}}class aHe extends Sl{constructor(e,n){super(e,"tableCellVerticalAlignment",n)}}class lHe extends Sl{constructor(e,n){super(e,"tableCellHorizontalAlignment",n)}}class uHe extends Sl{constructor(e,n){super(e,"tableCellBorderStyle",n)}_getAttribute(e){if(!e)return;const n=xS(e.getAttribute(this.attributeName));if(n!==this._defaultValue)return n}}class cHe extends Sl{constructor(e,n){super(e,"tableCellBorderColor",n)}_getAttribute(e){if(!e)return;const n=xS(e.getAttribute(this.attributeName));if(n!==this._defaultValue)return n}}class dHe extends Sl{constructor(e,n){super(e,"tableCellBorderWidth",n)}_getAttribute(e){if(!e)return;const n=xS(e.getAttribute(this.attributeName));if(n!==this._defaultValue)return n}_getValueToSet(e){const n=AS(e,"px");if(n!==this._defaultValue)return n}}class fHe extends Sl{constructor(e){super(e,"tableCellType","data"),this.on("afterExecute",(n,i)=>{const{writer:r,tableCells:o}=i,s=this.editor.plugins.get(Gi),a=S9e(o);bJ(s,r,a.keys())})}refresh(){super.refresh();const e=vm(this.editor.model.document.selection);this.isEnabled&&e&&e.getAttribute("tableType")==="layout"&&(this.isEnabled=!1)}_getAttribute(e){return e?.getAttribute(this.attributeName)||"data"}}function bJ(t,e,n){let i=!1;for(const r of n){let o=r.getAttribute("headingRows")||0,s=r.getAttribute("headingColumns")||0;const a=s>o;if(a){const u=CE(t,r,"column",s,o);u!==s&&(t.setHeadingColumnsCount(e,r,u,{shallow:!0}),s=u,i=!0)}const l=CE(t,r,"row",o,s);if(l!==o&&(t.setHeadingRowsCount(e,r,l,{shallow:!0}),o=l,i=!0),!a){const u=CE(t,r,"column",s,o);u!==s&&(t.setHeadingColumnsCount(e,r,u,{shallow:!0}),i=!0)}}return i}function CE(t,e,n,i,r){const o=n==="row"?t.getRows(e):t.getColumns(e);let s=i;for(let a=0;a<o;a++){const l=new un(e,{[n]:a});let u=!0,c=!1;for(const{cell:d,row:f,column:h}of l){if(d.getAttribute("tableCellType")!=="header"){u=!1;break}(n==="row"?h:f)>=r&&(c=!0)}if(!u)return Math.min(s,a);c&&(s=Math.max(s,a+1))}return Math.min(s,o)}const D6=/^(top|middle|bottom)$/,N6=/^(left|center|right|justify)$/;class hHe extends xe{static get pluginName(){return"TableCellPropertiesEditing"}static get licenseFeatureCode(){return"TCP"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}static get requires(){return[PS,vJ]}init(){const e=this.editor,n=e.model.schema,i=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const r=RO(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:e.locale.contentLanguageDirection==="rtl"});e.data.addStyleProcessorRules(aDe),mHe(e,{color:r.borderColor,style:r.borderStyle,width:r.borderWidth}),e.commands.add("tableCellBorderStyle",new uHe(e,r.borderStyle)),e.commands.add("tableCellBorderColor",new cHe(e,r.borderColor)),e.commands.add("tableCellBorderWidth",new dHe(e,r.borderWidth)),s_(n,i,{modelAttribute:"tableCellHeight",styleName:"height",attributeName:"height",attributeType:"length",defaultValue:r.height}),e.commands.add("tableCellHeight",new oHe(e,r.height)),e.data.addStyleProcessorRules(fDe),s_(n,i,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:r.padding}),e.commands.add("tableCellPadding",new rHe(e,r.padding)),e.data.addStyleProcessorRules(QG),s_(n,i,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",attributeName:"bgcolor",attributeType:"color",defaultValue:r.backgroundColor}),e.commands.add("tableCellBackgroundColor",new sHe(e,r.backgroundColor)),gHe(n,i,r.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new lHe(e,r.horizontalAlignment)),pHe(n,i,r.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new aHe(e,r.verticalAlignment)),e.config.get("experimentalFlags.tableCellTypeSupport")&&(vHe(e),e.commands.add("tableCellType",new fHe(e)))}}function mHe(t,e){const{conversion:n}=t,{schema:i}=t.model,r={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};i.extend("tableCell",{allowAttributes:Object.values(r)});for(const o of Object.values(r))i.setAttributeProperties(o,{isFormatting:!0});d6(t,"td",r,e),d6(t,"th",r,e),r_(n,{modelElement:"tableCell",modelAttribute:r.style,styleName:"border-style"}),r_(n,{modelElement:"tableCell",modelAttribute:r.color,styleName:"border-color"}),r_(n,{modelElement:"tableCell",modelAttribute:r.width,styleName:"border-width"})}function gHe(t,e,n){t.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.setAttributeProperties("tableCellHorizontalAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:i=>({key:"style",value:{"text-align":i}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":N6}},model:{key:"tableCellHorizontalAlignment",value:(i,r,o)=>{const s=eg(n,"left",o),a=i.getStyle("text-align");if(a!==s)return a;r.consumable.consume(i,{styles:"text-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:N6}},model:{key:"tableCellHorizontalAlignment",value:(i,r,o)=>{const s=eg(n,"left",o),a=i.getAttribute("align");if(a!==s)return a;r.consumable.consume(i,{attributes:"align"})}}})}function pHe(t,e,n){t.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.setAttributeProperties("tableCellVerticalAlignment",{isFormatting:!0}),e.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:i=>({key:"style",value:{"vertical-align":i}})}),e.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":D6}},model:{key:"tableCellVerticalAlignment",value:(i,r,o)=>{const s=eg(n,"middle",o),a=i.getStyle("vertical-align");if(a!==s)return a;r.consumable.consume(i,{styles:"vertical-align"})}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:D6}},model:{key:"tableCellVerticalAlignment",value:(i,r,o)=>{const s=eg(n,"middle",o),a=i.getAttribute("valign");if(a!==s)return a;r.consumable.consume(i,{attributes:"valign"})}}})}function vHe(t){const{model:e,conversion:n,editing:i}=t,{schema:r}=e,o=t.plugins.get(Gi);r.extend("tableCell",{allowAttributes:["tableCellType"]}),r.setAttributeProperties("tableCellType",{isFormatting:!0}),r.addAttributeCheck(s=>{if(Array.from(s).reverse().find(l=>l.name==="table")?.getAttribute("tableType")==="layout")return!1},"tableCellType"),n.for("upcast").add(s=>{s.on("element:th",(a,l,u)=>{const{writer:c}=u,{modelRange:d}=l,f=d?.start.nodeAfter;f?.is("element","tableCell")&&c.setAttribute("tableCellType","header",f)}),s.on("element:table",(a,l,u)=>{const{writer:c}=u,{modelRange:d}=l,f=d?.start.nodeAfter;if(f?.is("element","table")&&f.getAttribute("tableType")==="layout"){for(const{cell:h}of new un(f))if(h.getAttribute("tableCellType")==="header"){c.setAttribute("tableType","content",f);break}}},{priority:ou.low-1})}),e.document.registerPostFixer(s=>{const a=e.document.differ.getChanges(),l=new Set;for(const u of a){if(u.type==="attribute"&&(u.attributeKey==="headingRows"||u.attributeKey==="headingColumns")){const c=u.range.start.nodeAfter;c?.is("element","table")&&c.root.rootName!=="$graveyard"&&l.add(c)}if(u.type==="attribute"&&u.attributeKey==="tableCellType"){const c=u.range.start.nodeAfter;if(c?.is("element","tableCell")&&c.root.rootName!=="$graveyard"){const d=c.findAncestor("table");d&&l.add(d)}}if(u.type==="insert"&&u.position.nodeAfter){for(const{item:c}of e.createRangeOn(u.position.nodeAfter))if(c.is("element","tableCell")&&c.getAttribute("tableCellType")&&c.root.rootName!=="$graveyard"){const d=c.findAncestor("table");d&&l.add(d)}}}return bJ(o,s,l)}),e.document.on("change:data",()=>{const{differ:s}=e.document,a=new Set;for(const l of s.getChanges())if(l.type==="attribute"&&l.attributeKey==="tableCellType"){const u=l.range.start.nodeAfter;u.is("element","tableCell")&&a.add(u)}for(const l of a){const u=i.mapper.toViewElement(l),d=l.getAttribute("tableCellType")==="header"?"th":"td";u?.name!==d&&i.reconvertItem(l)}})}class bHe extends xe{static get pluginName(){return"TableCellProperties"}static get isOfficialPlugin(){return!0}static get requires(){return[hHe,nHe]}}class yHe extends Ht{refresh(){this.isEnabled=!0}execute(e={}){const{model:n,plugins:i}=this.editor;let{table:r=n.document.selection.getSelectedElement(),columnWidths:o,tableWidth:s}=e;o&&(o=Array.isArray(o)?o:o.split(",")),n.change(a=>{s?a.setAttribute("tableWidth",s,r):a.removeAttribute("tableWidth",r);const l=i.get("TableColumnResizeEditing").getColumnGroupElement(r);if(!o&&!l)return;if(!o)return a.remove(l);const u=MO(o);if(l)Array.from(l.getChildren()).forEach((c,d)=>a.setAttribute("columnWidth",u[d],c));else{const c=a.createElement("tableColumnGroup");u.forEach(d=>a.appendElement("tableColumn",{columnWidth:d},c)),a.append(c,r)}})}}function wHe(t){return e=>e.on("element:colgroup",(n,i,r)=>{const o=i.modelCursor.findAncestor("table"),s=p0(o);if(!s)return;const a=v0(s),l=t.getColumns(o);let u=lze(s,r.writer);u=Array.from({length:l},(c,d)=>u[d]||"auto"),(u.length!=a.length||u.includes("auto"))&&aJ(a,s,MO(u),r.writer)},{priority:"low"})}function _He(){return t=>t.on("insert:table",(e,n,i)=>{const r=i.writer,o=n.item,s=i.mapper.toViewElement(o),a=s.is("element","table")?s:Array.from(s.getChildren()).find(u=>u.is("element","table"));p0(o)?r.addClass("ck-table-resized",a):r.removeClass("ck-table-resized",a)},{priority:"low"})}function CHe(){return t=>{t.on("element:table",(e,n,i)=>{i.consumable.consume(n.viewItem,{classes:"ck-table-resized"})})}}const B6=gg("px");class yJ extends xe{_isResizingActive;_resizingData;_domEmitter;_tableUtilsPlugin;_initialMouseEventData=null;static get requires(){return[PS,Gi]}static get pluginName(){return"TableColumnResizeEditing"}static get licenseFeatureCode(){return"TCR"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=new(zo()),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",(n,i,r)=>{const o=r?"removeClass":"addClass";e.editing.view.change(s=>{for(const a of e.editing.view.document.roots)s[o]("ck-column-resize_disabled",e.editing.view.document.getRoot(a.rootName))})})}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerResizerInserter();const e=this.editor,n=e.plugins.get("TableColumnResize");e.plugins.get("TableEditing").registerAdditionalSlot({filter:o=>o.is("element","tableColumnGroup"),positionOffset:0});const r=new yHe(e);e.commands.add("resizeTableWidth",r),e.commands.add("resizeColumnWidths",r),this.bind("_isResizingAllowed").to(e,"isReadOnly",n,"isEnabled",r,"isEnabled",(o,s,a)=>!o&&s&&a)}destroy(){this._domEmitter.stopListening(),super.destroy()}getColumnGroupElement(e){return p0(e)}getTableColumnElements(e){return v0(e)}getTableColumnsWidths(e){return aze(e)}_extendSchema(){const e=this.editor.model.schema;e.extend("table",{allowAttributes:["tableWidth"]}),e.register("tableColumnGroup",{allowIn:"table",isLimit:!0}),e.register("tableColumn",{allowIn:"tableColumnGroup",allowAttributes:["columnWidth","colSpan"],isLimit:!0}),e.setAttributeProperties("columnWidth",{isFormatting:!0})}_registerPostFixer(){const n=this.editor.model;n.document.registerPostFixer(o=>{let s=!1;for(const a of eze(n)){const l=this.getColumnGroupElement(a),u=this.getTableColumnElements(l),c=this.getTableColumnsWidths(l);let d=MO(c);d=i(d,a,this),!r1(c,d)&&(aJ(u,l,d,o),s=!0)}return s});function i(o,s,a){const l=a._tableUtilsPlugin.getColumns(s);if(l-o.length===0)return o;const c=o.map(f=>Number(f.replace("%",""))),d=r(a.editor.model.document.differ,s);for(const f of d){const h=l-c.length;if(h===0)continue;const m=h>0,g=a._tableUtilsPlugin.getCellLocation(f).column;if(m){const v=tze(s,a.editor),p=rze(h,v);c.splice(g,0,...p)}else{const v=c.splice(g,Math.abs(h));c[g]+=pb(v)}}return c.map(f=>f+"%")}function r(o,s){const a=new Set;for(const l of o.getChanges())if(l.type=="insert"&&l.position.nodeAfter&&l.position.nodeAfter.name=="tableCell"&&l.position.nodeAfter.getAncestors().includes(s))a.add(l.position.nodeAfter);else if(l.type=="remove"){const u=l.position.nodeBefore||l.position.nodeAfter;u.name=="tableCell"&&u.getAncestors().includes(s)&&a.add(u)}return a}}_registerConverters(){const n=this.editor.conversion;n.for("upcast").attributeToAttribute({view:{name:/^(figure|table)$/,styles:{width:/[\s\S]+/}},model:{key:"tableWidth",value:i=>{if(!i.parent.is("element","figure"))return i.getStyle("width")}}}),n.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:i=>({name:"figure",key:"style",value:{width:i}})}),n.elementToElement({model:"tableColumnGroup",view:"colgroup"}),n.elementToElement({model:"tableColumn",view:"col"}),n.for("downcast").add(_He()),n.for("upcast").add(CHe()),n.for("upcast").add(wHe(this._tableUtilsPlugin)),n.for("upcast").attributeToAttribute({view:{name:"col",styles:{width:/.*/}},model:{key:"columnWidth",value:i=>{const r=i.getStyle("width");return!r||!r.endsWith("%")&&!r.endsWith("pt")?"auto":r}}}),n.for("upcast").attributeToAttribute({view:{name:"col",key:"span"},model:"colSpan"}),n.for("downcast").attributeToAttribute({model:{name:"tableColumn",key:"columnWidth"},view:i=>({key:"style",value:{width:i}})})}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(cJ),e.document.on("mouseover",this._onMouseOverHandler.bind(this),{priority:"high"}),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),e.document.on("mouseout",this._onMouseOutHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(Qe.window.document,"mousemove",Km(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(Qe.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_recalculateResizerElement(e){const n=this.editor,i=n.editing.view.domConverter,r=i.mapViewToDom(e.findAncestor("table")),o=i.mapViewToDom(e.findAncestor(c=>["td","th"].includes(c.name))),s=new Wt(r),a=new Wt(o),l=B6(Number((s.top-a.top).toFixed(4))),u=B6(Number((a.bottom-s.bottom).toFixed(4)));n.editing.view.change(c=>{c.setStyle("top",l,e),c.setStyle("bottom",u,e)})}_resetResizerStyles(e){this.editor.editing.view.change(n=>{n.removeStyle("top",e),n.removeStyle("bottom",e)})}_onMouseOverHandler(e,n){const i=n.target;i.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&this._recalculateResizerElement(i)}_onMouseOutHandler(e,n){const i=n.target;i.hasClass("ck-table-column-resizer")&&this._isResizingAllowed&&(this._isResizingActive||this._resetResizerStyles(i))}_onMouseDownHandler(e,n){const i=n.target;if(!i.hasClass("ck-table-column-resizer")||!this._isResizingAllowed)return;const r=this.editor,o=r.editing.mapper.toModelElement(i.findAncestor("figure"));r.model.canEditAt(o)&&(n.preventDefault(),e.stop(),this._initialMouseEventData=n)}_startResizingAfterThreshold(){const e=this._initialMouseEventData,{target:n}=e,i=this.editor.editing.mapper.toModelElement(n.findAncestor("figure")),r=n.findAncestor("table"),o=s(i,this._tableUtilsPlugin,this.editor);Array.from(r.getChildren()).find(u=>u.is("element","colgroup"))||this.editor.editing.view.change(u=>{a(u,o,r)}),this._isResizingActive=!0,this._resizingData=this._getResizingData(e,o),this.editor.editing.view.change(u=>l(u,r,this._resizingData));function s(u,c,d){const f=Array(c.getColumns(u)),h=new un(u);for(const m of h){const g=d.editing.mapper.toViewElement(m.cell),v=d.editing.view.domConverter.mapViewToDom(g),p=sze(v);(!f[m.column]||p<f[m.column])&&(f[m.column]=vo(p))}return f}function a(u,c,d){const f=u.createContainerElement("colgroup");for(let h=0;h<c.length;h++){const m=u.createEmptyElement("col"),g=`${vo(c[h]/pb(c)*100)}%`;u.setStyle("width",g,m),u.insert(u.createPositionAt(f,"end"),m)}u.insert(u.createPositionAt(d,0),f)}function l(u,c,d){const f=d.widths.viewFigureWidth/d.widths.viewFigureParentWidth;u.addClass("ck-table-resized",c),u.addClass("ck-table-column-resizer__active",d.elements.viewResizer),u.setStyle("width",`${vo(f*100)}%`,c.findAncestor("figure"))}}_onMouseMoveHandler(e,n){if(this._initialMouseEventData){const y=this._initialMouseEventData.domEvent;if(Math.abs(n.clientX-y.clientX)>=Q9e)this._startResizingAfterThreshold(),this._initialMouseEventData=null;else return}if(!this._isResizingActive)return;if(!this._isResizingAllowed){this._onMouseUpHandler();return}const{columnPosition:i,flags:{isRightEdge:r,isTableCentered:o,isLtrContent:s},elements:{viewFigure:a,viewLeftColumn:l,viewRightColumn:u,viewResizer:c},widths:{viewFigureParentWidth:d,tableWidth:f,leftColumnWidth:h,rightColumnWidth:m}}=this._resizingData,g=-h+XA,v=r?d-f:m-XA,p=(s?1:-1)*(r&&o?2:1),b=ize((n.clientX-i)*p,Math.min(g,0),Math.max(v,0));b!==0&&(this.editor.editing.view.change(y=>{const _=vo((h+b)*100/f);if(y.setStyle("width",`${_}%`,l),r){const C=vo((f+b)*100/d);y.setStyle("width",`${C}%`,a)}else{const C=vo((m-b)*100/f);y.setStyle("width",`${C}%`,u)}}),this._recalculateResizerElement(c))}_onMouseUpHandler(){if(this._initialMouseEventData=null,!this._isResizingActive)return;const{viewResizer:e,modelTable:n,viewFigure:i,viewColgroup:r}=this._resizingData.elements,o=this.editor,s=o.editing.view,a=this.getColumnGroupElement(n),l=Array.from(r.getChildren()).filter(v=>v.is("view:element")),u=a?this.getTableColumnsWidths(a):null,c=l.map(v=>v.getStyle("width")),d=!r1(u,c),f=n.getAttribute("tableWidth"),h=i.getStyle("width"),m=f!==h;(d||m)&&(this._isResizingAllowed?o.execute("resizeTableWidth",{table:n,tableWidth:`${vo(h)}%`,columnWidths:c}):s.change(v=>{if(u)for(const p of l)v.setStyle("width",u.shift(),p);else v.remove(r);m&&(f?v.setStyle("width",f,i):v.removeStyle("width",i)),!u&&!f&&v.removeClass("ck-table-resized",[...i.getChildren()].find(p=>p.name==="table"))})),s.change(v=>{v.removeClass("ck-table-column-resizer__active",e)}),s.domConverter.mapViewToDom(e).matches(":hover")||this._resetResizerStyles(e),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,n){const i=this.editor,r=e.domEvent.clientX,o=e.target,s=o.findAncestor("td")||o.findAncestor("th"),a=i.editing.mapper.toModelElement(s),l=a.findAncestor("table"),u=nze(a,this._tableUtilsPlugin).rightEdge,c=this._tableUtilsPlugin.getColumns(l)-1;let d=l.getAttribute("tableAlignment");l.getAttribute("tableType")!=="layout"&&(d||=i.config.get("table.tableProperties.defaultProperties.alignment"),d||="center");const f=u===c,h=i.locale.contentLanguageDirection!=="rtl",m=d==="center",g=s.findAncestor("table"),v=g.findAncestor("figure"),p=[...g.getChildren()].find(E=>E.is("element","colgroup")),b=p.getChild(u),y=f?void 0:p.getChild(u+1),_=JA(i.editing.view.domConverter.mapViewToDom(v.parent)),C=JA(i.editing.view.domConverter.mapViewToDom(v)),S=sJ(l,i),k=n[u],T=f?void 0:n[u+1];return{columnPosition:r,flags:{isRightEdge:f,isTableCentered:m,isLtrContent:h},elements:{viewResizer:o,modelTable:l,viewFigure:v,viewColgroup:p,viewLeftColumn:b,viewRightColumn:y},widths:{viewFigureParentWidth:_,viewFigureWidth:C,tableWidth:S,leftColumnWidth:k,rightColumnWidth:T}}}_registerResizerInserter(){this.editor.conversion.for("editingDowncast").add(e=>{e.on("insert:tableCell",(n,i,r)=>{const o=i.item,s=r.mapper.toViewElement(o),a=r.writer;a.insert(a.createPositionAt(s,"end"),a.createUIElement("div",{class:"ck-table-column-resizer"}))},{priority:"lowest"})})}}class SHe extends xe{static get requires(){return[yJ,vJ]}static get pluginName(){return"TableColumnResize"}static get isOfficialPlugin(){return!0}}function kHe(t){t.document.registerPostFixer(e=>THe(e,t))}function THe(t,e){const n=e.document.differ.getChanges();let i=!1;for(const r of n){if(r.type!="insert")continue;const o=r.position.parent;if(o.is("element","table")||r.name=="table"){const s=r.name=="table"?r.position.nodeAfter:o,a=Array.from(s.getChildren()).filter(u=>u.is("element","caption")),l=a.shift();if(!l)continue;for(const u of a)t.move(t.createRangeIn(u),l,"end"),t.remove(u);l.nextSibling&&(t.move(t.createRangeOn(l),s,"end"),i=!0),i=!!a.length||i}}return i}function V6(t){return!!t&&t.is("element","table")}function tP(t){for(const e of t.getChildren())if(e.is("element","caption"))return e;return null}function EHe(t){const e=vm(t);return e?tP(e):null}function xHe(t){const e=t.parent;return t.name=="figcaption"&&e&&e.is("element","figure")&&e.hasClass("table")?{name:!0}:t.name=="caption"&&e&&e.is("element","table")?{name:!0}:null}class AHe extends Ht{refresh(){const e=this.editor,n=vm(e.model.document.selection);this.isEnabled=!!n&&e.model.schema.checkChild(n,"caption"),this.isEnabled?this.value=!!tP(n):this.value=!1}execute({focusCaptionOnShow:e=!1}={}){this.editor.model.change(n=>{this.value?this._hideTableCaption(n):this._showTableCaption(n,e)})}_showTableCaption(e,n){const i=this.editor.model,r=vm(i.document.selection),a=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(r)||e.createElement("caption");i.insertContent(a,r,"end"),n&&e.setSelection(a,"in")}_hideTableCaption(e){const n=this.editor.model,i=vm(n.document.selection),r=this.editor.plugins.get("TableCaptionEditing"),o=tP(i);r._saveCaption(i,o),n.deleteContent(e.createSelection(o,"on"))}}class PHe extends xe{_savedCaptionsMap=new WeakMap;static get pluginName(){return"TableCaptionEditing"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.model.schema,i=e.editing.view,r=e.t,o=e.config.get("table.tableCaption.useCaptionElement");n.isRegistered("caption")?n.extend("caption",{allowIn:"table"}):n.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new AHe(this.editor)),o&&e.plugins.get("TableEditing").registerAdditionalSlot({filter:a=>a.is("element","caption"),positionOffset:"end"}),e.conversion.for("upcast").elementToElement({view:xHe,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(s,{writer:a})=>V6(s.parent)?a.createContainerElement(o?"caption":"figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(s,{writer:a})=>{if(!V6(s.parent))return null;const l=a.createEditableElement(o?"caption":"figcaption");return a.setCustomProperty("tableCaption",!0,l),l.placeholder=r("Enter table caption"),qM({view:i,element:l,keepOnFocus:!0}),bO(l,a)}}),kHe(e.model)}_getSavedCaption(e){const n=this._savedCaptionsMap.get(e);return n?zn.fromJSON(n):null}_saveCaption(e,n){this._savedCaptionsMap.set(e,n.toJSON())}}class IHe extends xe{static get pluginName(){return"TableCaptionUI"}static get isOfficialPlugin(){return!0}init(){const e=this.editor,n=e.editing.view,i=e.t;e.ui.componentFactory.add("toggleTableCaption",r=>{const o=e.commands.get("toggleTableCaption"),s=new wt(r);return s.set({icon:uY,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(o,"value","isEnabled"),s.bind("label").to(o,"value",a=>i(a?"Toggle caption off":"Toggle caption on")),this.listenTo(s,"execute",()=>{if(e.execute("toggleTableCaption",{focusCaptionOnShow:!0}),o.value){const a=EHe(e.model.document.selection),l=e.editing.mapper.toViewElement(a);if(!l)return;n.scrollToTheSelection(),n.change(u=>{u.addClass("table__caption_highlighted",l)})}e.editing.view.focus()}),s})}}class RHe extends xe{static get pluginName(){return"TableCaption"}static get isOfficialPlugin(){return!0}static get requires(){return[PHe,IHe]}}const MHe={"zh-cn":{dictionary:{"Words: %0":"单词数:%0","Characters: %0":"字符数:%0","Widget toolbar":"小部件工具栏","Insert paragraph before block":"在前面插入段落","Insert paragraph after block":"在后面插入段落","Press Enter to type after or press Shift + Enter to type before the widget":"按下“Enter”键,在小组件后输入;按下“Shift+Enter”键,在小组件前输入","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"当小组件被选中时(例如:图片、表格等)可以使用的按键","Insert a new paragraph directly after a widget":"直接在小组件之后插入新段落","Insert a new paragraph directly before a widget":"直接在小组件之前插入新段落","Move the caret to allow typing directly before a widget":"移动插入符,以允许在小组件之前直接输入文字","Move the caret to allow typing directly after a widget":"移动插入符,以允许在小组件之后直接输入文字","Move focus from an editable area back to the parent widget":"将焦点从可编辑区域移回父窗口小组件","Upload in progress":"正在上传",Undo:"撤销",Redo:"重做","Rich Text Editor":"富文本编辑器","Edit block":"编辑框","Click to edit block":"单击以编辑块","Drag to move":"拖拽以移动",Next:"下一步",Previous:"上一步","Editor toolbar":"编辑器工具栏","Dropdown toolbar":"下拉工具栏","Dropdown menu":"下拉菜单",Black:"黑色","Dim grey":"暗灰色",Grey:"灰色","Light grey":"浅灰色",White:"白色",Red:"红色",Orange:"橙色",Yellow:"黄色","Light green":"浅绿色",Green:"绿色",Aquamarine:"海蓝色",Turquoise:"青色","Light blue":"浅蓝色",Blue:"蓝色",Purple:"紫色","Editor block content toolbar":"编辑器块内容工具栏","Editor contextual toolbar":"编辑器上下文工具栏",HEX:"十六进制","No results found":"未找到结果","No searchable items":"没有可搜索的项目","Editor dialog":"编辑器对话框",Close:"关闭","Help Contents. To close this dialog press ESC.":"帮助内容。要关闭此对话框,请按 ESC 键。","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"您可以在下方找到可在编辑器中使用的键盘快捷键列表。","(may require <kbd>Fn</kbd>)":"(可能需要用到 <kbd>Fn</kbd>键)",Accessibility:"可访问性","Accessibility help":"无障碍辅助功能帮助","Press %0 for help.":"按 %0 获取帮助。","Move focus in and out of an active dialog window":"将焦点移入或移出活跃的对话框窗口",MENU_BAR_MENU_FILE:"文件",MENU_BAR_MENU_EDIT:"编辑",MENU_BAR_MENU_VIEW:"查看",MENU_BAR_MENU_INSERT:"插入",MENU_BAR_MENU_FORMAT:"格式",MENU_BAR_MENU_TOOLS:"工具",MENU_BAR_MENU_HELP:"帮助",MENU_BAR_MENU_TEXT:"文本",MENU_BAR_MENU_FONT:"字体","Editor menu bar":"编辑器菜单栏",'Please enter a valid color (e.g. "ff0000").':"请输入有效的颜色(例如“ff0000”)。","Insert table":"插入表格","Header column":"标题列","Insert column left":"左侧插入列","Insert column right":"右侧插入列","Delete column":"删除本列","Select column":"选择列",Column:"列","Header row":"标题行","Insert row below":"在下面插入一行","Insert row above":"在上面插入一行","Delete row":"删除本行","Select row":"选择行",Row:"行","Merge cell up":"向上合并单元格","Merge cell right":"向右合并单元格","Merge cell down":"向下合并单元格","Merge cell left":"向左合并单元格","Split cell vertically":"纵向拆分单元格","Split cell horizontally":"横向拆分单元格","Merge cells":"合并单元格","Table toolbar":"表格工具栏","Table properties":"表格属性","Cell properties":"单元格属性",Border:"边框",Style:"样式",Width:"宽度",Height:"高度",Color:"颜色",Background:"背景",Padding:"内边距",Dimensions:"尺寸","Table cell text alignment":"表格单元格中的文本水平对齐",Alignment:"对齐","Horizontal text alignment toolbar":"水平文本对齐工具栏","Vertical text alignment toolbar":"垂直文本对齐工具栏","Table alignment toolbar":"表格对齐工具栏",None:"无",Solid:"实线",Dotted:"点状虚线",Dashed:"虚线",Double:"双线",Groove:"凹槽边框",Ridge:"垄状边框",Inset:"凹边框",Outset:"凸边框","Align cell text to the left":"使单元格文本左对齐","Align cell text to the center":"使单元格文本水平居中","Align cell text to the right":"使单元格文本右对齐","Justify cell text":"对齐单元格文本","Align cell text to the top":"使单元格文本对齐到顶部","Align cell text to the middle":"使单元格文本垂直居中","Align cell text to the bottom":"使单元格文本对齐到底部","Align table to the left":"使表格左对齐","Center table":"表格居中","Align table to the right":"使表格右对齐",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'颜色无效。尝试使用"#FF0000"、"rgb(255,0,0)"或者"red"。','The value is invalid. Try "10px" or "2em" or simply "2".':"无效值。尝试使用“10px”、“2ex”或者只写“2”。","Enter table caption":"输入表标题","Keystrokes that can be used in a table cell":"可在表格单元格中使用的按键","Move the selection to the next cell":"将所选内容移动到下一个单元格","Move the selection to the previous cell":"将所选内容移至上一个单元格","Insert a new table row (when in the last cell of a table)":"插入新的表格行(当位于表格的最后一个单元格时)","Navigate through the table":"在表格中进行导览",Table:"表格","Insert table layout":"插入表格布局","Table layout":"表格布局","Layout table":"布局表格","Content table":"内容表格","Choose table type":"选择表格类型","Table type":"表格类型","Table type options":"表格类型选项","Table Alignment":"表格对齐方式","Align table to the left with text wrapping":"表格左对齐,文字环绕","Center table with no text wrapping":"表格居中,无文字环绕","Align table to the right with text wrapping":"表格右对齐,文字环绕","Align table to the left with no text wrapping":"表格左对齐,无文字环绕","Align table to the right with no text wrapping":"表格右对齐,无文字环绕","Cell type":"单元格类型","Data cell":"数据单元格","Header cell":"表头单元格",Styles:"样式","Multiple styles":"多样式","Block styles":"块级样式","Text styles":"文本样式","Special characters":"特殊字符",Category:"类别",All:"全部",Arrows:"箭头",Currency:"货币",Latin:"拉丁文",Mathematical:"数学",Text:"文本","leftwards simple arrow":"向左简单箭头","rightwards simple arrow":"向右简单箭头","upwards simple arrow":"向上简单箭头","downwards simple arrow":"向下简单箭头","leftwards double arrow":"向左双箭头","rightwards double arrow":"向右双箭头","upwards double arrow":"向上双箭头","downwards double arrow":"向下双箭头","leftwards dashed arrow":"向左虚线箭头","rightwards dashed arrow":"向右虚线箭头","upwards dashed arrow":"向上虚线箭头","downwards dashed arrow":"向下虚线箭头","leftwards arrow to bar":"头部带杠的向左箭头","rightwards arrow to bar":"头部带杠的向右箭头","upwards arrow to bar":"头部带杠的向上箭头","downwards arrow to bar":"头部带杠的向下箭头","up down arrow with base":"处于基线的上下箭头","back with leftwards arrow above":"带有back标识的向左箭头","end with leftwards arrow above":"带有end标识的向左箭头","on with exclamation mark with left right arrow above":"带有NO!标识的左右双向箭头","soon with rightwards arrow above":"带有soon标识的向右箭头","top with upwards arrow above":"带有top标识的向上箭头","Dollar sign":"美元符号","Euro sign":"欧元符号","Yen sign":"日元符号","Pound sign":"英镑符号","Cent sign":"分币符号","Euro-currency sign":"欧元货币符号","Colon sign":"科朗符号","Cruzeiro sign":"克鲁塞罗符号","French franc sign":"法国法郎符号","Lira sign":"里拉符号","Currency sign":"货币符号","Bitcoin sign":"比特币符号","Mill sign":"密尔符号","Naira sign":"奈拉符号","Peseta sign":"比塞塔符号","Rupee sign":"卢比符号","Won sign":"韩元符号","New sheqel sign":"新谢克尔符号","Dong sign":"越南盾符号","Kip sign":" 基普符号","Tugrik sign":"图格里克符号","Drachma sign":"德拉克马符号","German penny sign":"德国便士符号","Peso sign":"比索符号","Guarani sign":"瓜拉尼货币符号","Austral sign":"澳大利亚货币符号","Hryvnia sign":"戈里夫纳符号","Cedi sign":"塞地符号","Livre tournois sign":"里弗尔符号","Spesmilo sign":"斯佩斯米洛符号","Tenge sign":"坚戈符号","Indian rupee sign":"印度卢比符号","Turkish lira sign":"土耳其里拉符号","Nordic mark sign":"北欧马克征符号","Manat sign":"马纳特符号","Ruble sign":"俄罗斯卢布","Latin capital letter a with macron":"带长音符的大写拉丁字母a","Latin small letter a with macron":"带长音符的小写拉丁字母a","Latin capital letter a with breve":"带短音符的大写拉丁字母a","Latin small letter a with breve":"带短音符的小写拉丁字母a","Latin capital letter a with ogonek":"带反尾形符的大写拉丁字母a","Latin small letter a with ogonek":"带反尾形符的小写拉丁字母a","Latin capital letter c with acute":"带锐音符的大写拉丁字母c","Latin small letter c with acute":"带锐音符的小写拉丁字母c","Latin capital letter c with circumflex":"带扬抑符的大写拉丁字母c","Latin small letter c with circumflex":"带扬抑符的小写拉丁字母c","Latin capital letter c with dot above":"带上点的大写拉丁字母c","Latin small letter c with dot above":"带上点的小写拉丁字母c","Latin capital letter c with caron":"带抑扬符的大写拉丁字母c","Latin small letter c with caron":"带抑扬符的小写拉丁字母c","Latin capital letter d with caron":"带抑扬符的大写拉丁字母d","Latin small letter d with caron":"带抑扬符的小写拉丁字母d","Latin capital letter d with stroke":"带删节线的大写拉丁字母d","Latin small letter d with stroke":"带删节线的小写拉丁字母d","Latin capital letter e with macron":"带长音符的大写拉丁字母e","Latin small letter e with macron":"带长音符的小写拉丁字母e","Latin capital letter e with breve":"带短音符的大写拉丁字母e","Latin small letter e with breve":"带短音符的小写拉丁字母e","Latin capital letter e with dot above":"带上点的大写拉丁字母e","Latin small letter e with dot above":"带上点的小写拉丁字母e","Latin capital letter e with ogonek":"带反尾形符的大写拉丁字母e","Latin small letter e with ogonek":"带反尾形符的小写拉丁字母e","Latin capital letter e with caron":"带抑扬符的大写拉丁字母e","Latin small letter e with caron":"带抑扬符的小写拉丁字母e","Latin capital letter g with circumflex":"带扬抑符的大写拉丁字母g","Latin small letter g with circumflex":"带扬抑符的小写拉丁字母g","Latin capital letter g with breve":"带短音符的大写拉丁字母g","Latin small letter g with breve":"带短音符的小写拉丁字母g","Latin capital letter g with dot above":"带上点的大写拉丁字母g","Latin small letter g with dot above":"带上点的小写拉丁字母g","Latin capital letter g with cedilla":"带软音符的大写拉丁字母g","Latin small letter g with cedilla":"带软音符的小写拉丁字母g","Latin capital letter h with circumflex":"带扬抑符的大写拉丁字母h","Latin small letter h with circumflex":"带扬抑符的小写拉丁字母h","Latin capital letter h with stroke":"带删节线的大写拉丁字母h","Latin small letter h with stroke":"带删节线的小写拉丁字母h","Latin capital letter i with tilde":"带腭化符的大写拉丁字母i","Latin small letter i with tilde":"带腭化符的小写拉丁字母i","Latin capital letter i with macron":"带长音符的大写拉丁字母i","Latin small letter i with macron":"带长音符的小写拉丁字母i","Latin capital letter i with breve":"带短音符的大写拉丁字母i","Latin small letter i with breve":"带短音符的小写拉丁字母i","Latin capital letter i with ogonek":"带反尾形符的大写拉丁字母i","Latin small letter i with ogonek":"带反尾形符的小写拉丁字母i","Latin capital letter i with dot above":"带上点的大写拉丁字母i","Latin small letter dotless i":"没有点的小写拉丁字母i","Latin capital ligature ij":"大写拉丁连字符ij","Latin small ligature ij":"小写拉丁连字符ij","Latin capital letter j with circumflex":"带扬抑符的大写拉丁字母j","Latin small letter j with circumflex":"带扬抑符的小写拉丁字母j","Latin capital letter k with cedilla":"带软音符的大写拉丁字母k","Latin small letter k with cedilla":"带软音符的小写拉丁字母k","Latin small letter kra":"小写拉丁字母kra","Latin capital letter l with acute":"带锐音符的大写拉丁字母l","Latin small letter l with acute":"带锐音符的小写拉丁字母l","Latin capital letter l with cedilla":"带软音符的大写拉丁字母l","Latin small letter l with cedilla":"带软音符的小写拉丁字母l","Latin capital letter l with caron":"带抑扬符的大写拉丁字母l","Latin small letter l with caron":"带抑扬符的小写拉丁字母l","Latin capital letter l with middle dot":"带中点的大写拉丁字母l","Latin small letter l with middle dot":"带中点的小写拉丁字母l","Latin capital letter l with stroke":"带删节线的大写拉丁字母l","Latin small letter l with stroke":"带删节线的小写拉丁字母l","Latin capital letter n with acute":"带锐音符的大写拉丁字母n","Latin small letter n with acute":"带锐音符的小写拉丁字母n","Latin capital letter n with cedilla":"带软音符的大写拉丁字母n","Latin small letter n with cedilla":"带软音符的小写拉丁字母n","Latin capital letter n with caron":"带抑扬符的大写拉丁字母n","Latin small letter n with caron":"带抑扬符的小写拉丁字母n","Latin small letter n preceded by apostrophe":"冠以撇号的小写拉丁字母n","Latin capital letter eng":"大写拉丁字母eng","Latin small letter eng":"小写拉丁字母eng","Latin capital letter o with macron":"带长音符的大写拉丁字母o","Latin small letter o with macron":"带长音符的小写拉丁字母o","Latin capital letter o with breve":"带短音符的大写拉丁字母o","Latin small letter o with breve":"带短音符的小写拉丁字母o","Latin capital letter o with double acute":"带双锐音符的大写拉丁字母o","Latin small letter o with double acute":"带双锐音符的小写拉丁字母o","Latin capital ligature oe":"大写拉丁连字符oe","Latin small ligature oe":"小写拉丁连字符oe","Latin capital letter r with acute":"带锐音符的大写拉丁字母r","Latin small letter r with acute":"带锐音符的小写拉丁字母r","Latin capital letter r with cedilla":"带软音符的大写拉丁字母r","Latin small letter r with cedilla":"带软音符的小写拉丁字母r","Latin capital letter r with caron":"带抑扬符的大写拉丁字母r","Latin small letter r with caron":"带抑扬符的小写拉丁字母r","Latin capital letter s with acute":"带锐音符的大写拉丁字母s","Latin small letter s with acute":"带锐音符的小写拉丁字母s","Latin capital letter s with circumflex":"带扬抑符的大写拉丁字母s","Latin small letter s with circumflex":"带扬抑符的小写拉丁字母s","Latin capital letter s with cedilla":"带软音符的大写拉丁字母s","Latin small letter s with cedilla":"带软音符的小写拉丁字母s","Latin capital letter s with caron":"带抑扬符的大写拉丁字母s","Latin small letter s with caron":"带抑扬符的小写拉丁字母s","Latin capital letter t with cedilla":"带软音符的大写拉丁字母t","Latin small letter t with cedilla":"带软音符的小写拉丁字母t","Latin capital letter t with caron":"带抑扬符的大写拉丁字母t","Latin small letter t with caron":"带抑扬符的小写拉丁字母t","Latin capital letter t with stroke":"带删节线的大写拉丁字母t","Latin small letter t with stroke":"带删节线的小写拉丁字母t","Latin capital letter u with tilde":"带腭化符的大写拉丁字母u","Latin small letter u with tilde":"带腭化符的小写拉丁字母u","Latin capital letter u with macron":"带长音符的大写拉丁字母u","Latin small letter u with macron":"带长音符的小写拉丁字母u","Latin capital letter u with breve":"带短音符的大写拉丁字母u","Latin small letter u with breve":"带短音符的小写拉丁字母u","Latin capital letter u with ring above":"带上圆圈的大写拉丁字母u","Latin small letter u with ring above":"带上圆圈的小写拉丁字母u","Latin capital letter u with double acute":"带双锐音符的大写拉丁字母u","Latin small letter u with double acute":"带双锐音符的小写拉丁字母u","Latin capital letter u with ogonek":"带反尾形符的大写拉丁字母u","Latin small letter u with ogonek":"带反尾形符的小写拉丁字母u","Latin capital letter w with circumflex":"带扬抑符的大写拉丁字母w","Latin small letter w with circumflex":"带扬抑符的小写拉丁字母w","Latin capital letter y with circumflex":"带扬抑符的大写拉丁字母y","Latin small letter y with circumflex":"带扬抑符的小写拉丁字母y","Latin capital letter y with diaeresis":"带分音符的大写拉丁字母y","Latin capital letter z with acute":"带锐音符的大写拉丁字母z","Latin small letter z with acute":"带锐音符的小写拉丁字母z","Latin capital letter z with dot above":"带上点的大写拉丁字母z","Latin small letter z with dot above":"带上点的小写拉丁字母z","Latin capital letter z with caron":"带抑扬符的大写拉丁字母z","Latin small letter z with caron":"带抑扬符的小写拉丁字母z","Latin small letter long s":"小写拉丁字母长s","Less-than sign":"小于号","Greater-than sign":"大于号","Less-than or equal to":"小于等于","Greater-than or equal to":"大于等于","En dash":"短破折号","Em dash":"长破折号",Macron:"长音符号",Overline:"上划线","Degree sign":"度数符号","Minus sign":"负号","Plus-minus sign":"正负号","Division sign":"除号","Fraction slash":"分数斜线","Multiplication sign":"称号","Latin small letter f with hook":"带钩的拉丁文小写字母 F",Integral:"积分","N-ary summation":"N 元求和",Infinity:"无穷大","Square root":"平方根","Tilde operator":"波浪线运算符","Approximately equal to":"近似等于","Almost equal to":"约等于","Not equal to":"不等于","Identical to":"恒等于","Element of":"属于","Not an element of":"不属于","Contains as member":"包含","N-ary product":"N 元乘积","Logical and":"逻辑与","Logical or":"逻辑或","Not sign":"非",Intersection:"交集",Union:"并集","Partial differential":"偏微分","For all":"对于全部","There exists":"存在","Empty set":"空集",Nabla:"劈形算符","Asterisk operator":"星号运算符","Proportional to":"比例",Angle:"角","Vulgar fraction one quarter":"普通分数四分之一","Vulgar fraction one half":"普通分数二分之一","Vulgar fraction three quarters":"普通分数四分之三","Single left-pointing angle quotation mark":"单左尖括号","Single right-pointing angle quotation mark":"单右尖括号","Left-pointing double angle quotation mark":"双左尖括号","Right-pointing double angle quotation mark":"双右尖括号","Left single quotation mark":"左单引号","Right single quotation mark":"右单引号","Left double quotation mark":"左双引号","Right double quotation mark":"右双引号","Single low-9 quotation mark":"低位后单引号","Double low-9 quotation mark":"低位后双引号","Inverted exclamation mark":"反感叹号","Inverted question mark":"反问号","Two dot leader":"二点前导符","Horizontal ellipsis":"省略号","Double dagger":"双剑号","Per mille sign":"千分号","Per ten thousand sign":"万分号","Double exclamation mark":"双叹号","Question exclamation mark":"疑问感叹号","Exclamation question mark":"感叹疑问号","Double question mark":"双问号","Copyright sign":"版权符号","Registered sign":"注册商标","Trade mark sign":"商标符号","Section sign":"节标记","Paragraph sign":"段落符号","Reversed paragraph sign":"反向段落符号","Show source":"显示源代码","Show blocks":"显示区块","Select all":"全选","Enable editing":"允许编辑","Previous editable region":"上一个可编辑区域","Next editable region":"下一个可编辑区域","Navigate editable regions":"导航至可编辑区域","Disable inline editing":"禁用行内编辑","Enable inline editing":"启用行内编辑","Disable block editing":"禁用块编辑","Enable block editing":"启用块编辑","Disable editing":"禁用编辑","Remove Format":"移除格式","Page break":"分页符","media widget":"媒体小部件","Media URL":"媒体URL","Paste the media URL in the input.":"在输入中粘贴媒体URL","Tip: Paste the URL into the content to embed faster.":"提示:将URL粘贴到内容中可更快地嵌入","The URL must not be empty.":"URL不可以为空。","This media URL is not supported.":"不支持此媒体URL。","Insert media":"插入媒体",Media:"媒体","Media toolbar":"媒体工具栏","Open media in new tab":"在新标签页打开媒体","Media embed":"已嵌入媒体","Numbered List":"项目编号列表","Bulleted List":"项目符号列表","To-do List":"待办列表","Bulleted list styles toolbar":"项目符号列表样式工具条","Numbered list styles toolbar":"项目编号列表样式工具条","Toggle the disc list style":"切换实心原点列表样式","Toggle the circle list style":"切换空心原点列表样式","Toggle the square list style":"切换实心方块列表样式","Toggle the decimal list style":"切换阿拉伯数字列表样式","Toggle the decimal with leading zero list style":"切换前导零阿拉伯数字列表样式","Toggle the lowerroman list style":"切换小写罗马数字列表样式","Toggle the upperroman list style":"切换大写罗马数字列表样式","Toggle the lowerlatin list style":"切换小写拉丁字母列表样式","Toggle the upperlatin list style":"切换大写拉丁字母列表样式",Disc:"实心圆点",Circle:"空心圆点",Square:"实心方块",Decimal:"阿拉伯数字","Decimal with leading zero":"前导零阿拉伯数字","Lowerroman":"小写罗马数字","Upper-roman":"大写罗马数字","Lower-latin":"小写拉丁字母","Upper-latin":"大写拉丁字母","List properties":"列表属性","Start at":"起始编号","Invalid start index value.":"无效的起始索引值。","Start index must be greater than 0.":"起始编号必须大于0。","Reversed order":"顺序反转","Keystrokes that can be used in a list":"可在列表中使用的按键","Increase list item indent":"增加列表项的缩进","Decrease list item indent":"减少列表项的缩进","Entering a to-do list":"正在输入待办事项清单","Leaving a to-do list":"正在退出待办事项清单",Language:"语言","Choose language":"选择语言","Remove language":"移除语言",Unlink:"取消超链接",Link:"超链接","Link URL":"链接网址","Link URL must not be empty.":"链接 URL 不能为空。","Link image":"链接图片","Edit link":"修改链接","Open link in new tab":"在新标签页中打开链接","Open in a new tab":"在新标签页中打开",Downloadable:"可下载","Create link":"创建链接","Move out of a link":"移出链接","Link properties":"链接属性","Displayed text":"显示的文本","No links available":"无可用链接","Increase indent":"增加缩进","Decrease indent":"减少缩进","image widget":"图片组件","Wrap text":"文字环绕","Break text":"文字断行","In line":"行内","Side image":"图片侧边显示","Full size image":"全尺寸图片","Left aligned image":"图片左侧对齐","Centered image":"图片居中","Right aligned image":"图片右侧对齐","Change image text alternative":"更改图片替换文本","Text alternative":"替换文本","Enter image caption":"输入图片标题","Insert image":"插入图像","Replace image":"替换图片","Upload from computer":"从电脑上传","Replace from computer":"从电脑替换","Upload image from computer":"从电脑上传图片","Image from computer":"从计算机中选择图片","From computer":"从电脑","Replace image from computer":"从电脑替换图片","Upload failed":"上传失败","You have no image upload permissions.":"您没有上传图片的权限。","Image toolbar":"图片工具栏","Resize image":"调整图像大小","Resize image to %0":"调整图像大小为%0","Resize image to the original size":"调整图像大小为原始大小","Resize image (in %0)":"调整图片大小(单位为 %0",Original:"原始大小","Custom image size":"自定义图片大小",Custom:"自定义","Image resize list":"图片大小列表","Insert image via URL":"通过URL地址插入图片","Insert via URL":"通过 URL 插入","Image via URL":"来自 URL 的图像","Via URL":"通过 URL","Update image URL":"更新图片URL地址","Caption for the image":"图片说明:","Caption for image: %0":"图片说明:%0","The value must not be empty.":"该值不能为空。","The value should be a plain number.":"该值应当为纯数字。","Uploading image":"正在上传图片","Image upload complete":"图片上传完成","Error during image upload":"图片上传时出错",Image:"图像","Image Resize":"调整图片尺寸","Text Alternative":"替代文本","HTML object":"HTML对象","Insert HTML":"插入 HTML","HTML snippet":"HTML 代码片段","Paste raw HTML here...":"在这里粘贴 HTML 源代码","Edit source":"编辑源代码","Save changes":"保存更改","No preview available":"预览不可用","Empty snippet content":"空片段内容","Horizontal line":"水平线",Heading:"标题","Choose heading":"标题类型","Heading 1":"标题 1","Heading 2":"标题 2","Heading 3":"标题 3","Heading 4":"标题 4","Heading 5":"标题 5","Heading 6":"标题 6","Type your title":"输入标题","Type or paste your content here.":"在这里输入或粘贴内容","Yellow marker":"黄色标记","Green marker":"绿色标记","Pink marker":"粉色标记","Blue marker":"蓝色标记","Red pen":"红色笔","Green pen":"绿色笔","Remove highlight":"清除高亮",Highlight:"高亮","Text highlight toolbar":"文本高亮工具栏","Enter fullscreen mode":"进入全屏模式","Leave fullscreen mode":"退出全屏模式","Fullscreen mode":"全屏模式","Toggle fullscreen mode":"切换全屏模式","Document outline":"文档大纲","Connected users":"已连接用户","Show left sidebar":"显示左侧边栏","Hide left sidebar":"隐藏左侧边栏","Toggle sidebar":"切换侧边栏","Find and replace":"查找和替换","Find in text…":"查找的文本",Find:"查找","Previous result":"上一个匹配项","Next result":"下一个匹配项",Replace:"替换","Replace all":"全部替换","Match case":"区分大小写","Whole words only":"单词","Replace with…":"替换的文本","Text to find must not be empty.":"查找的文本不可为空","Tip: Find some text first in order to replace it.":"提示:先查找文本再替换","Advanced options":"高级选项","Find in the document":"在文档中查找","Font Size":"字体大小",Tiny:"极小",Small:"小",Big:"大",Huge:"极大","Font Family":"字体",Default:"默认","Font Color":"字体颜色","Font Background Color":"字体背景色","Document colors":"文档中的颜色","Insert a soft break (a <code>&lt;br&gt;</code> element)":"插入软换行(一个<code>&lt;br&gt;</code> 元素)","Insert a hard break (a new paragraph)":"插入硬换行(新段落)",Emoji:"表情符号","Show all emoji...":"显示所有表情符号...","Find an emoji (min. 2 characters)":"查找表情符号(最少 2 个字符)",'No emojis were found matching "%0".':"未找到与“%0”匹配的表情符号。","Keep on typing to see the emoji.":"继续键入以查看表情符号。","The query must contain at least two characters.":"查询必须至少包含两个字符。","Smileys & Expressions":"笑脸符与表情","Gestures & People":"手势与人物","Animals & Nature":"动物与自然","Food & Drinks":"食物与饮料","Travel & Places":"旅行与地点",Activities:"活动",Objects:"物品",Symbols:"符号",Flags:"旗帜","Select skin tone":"选择肤色","Default skin tone":"默认肤色","Light skin tone":"浅肤色","Medium Light skin tone":"中等偏浅肤色","Medium skin tone":"中等肤色","Medium Dark skin tone":"中等偏深肤色","Dark skin tone":"深肤色","Emoji picker":"表情符号选择器",Cancel:"取消",Clear:"清除","Remove color":"移除颜色","Restore default":"恢复默认",Save:"保存","Show more items":"显示更多","%0 of %1":"第 %0 步,共 %1 步","Cannot upload file:":"无法上传的文件:","Rich Text Editor. Editing area: %0":"富文本编辑器。编辑区域:%0","Insert with file manager":"使用文件管理器插入","Replace with file manager":"使用文件管理器替换","Insert image with file manager":"使用文件管理器插入图片","Replace image with file manager":"使用文件管理器替换图片",File:"文件","With file manager":"通过文件管理器","Toggle caption off":"关闭表标题","Toggle caption on":"打开表标题","Content editing keystrokes":"内容编辑按键","These keyboard shortcuts allow for quick access to content editing features.":"这些键盘快捷键允许快速访问内容编辑功能。","User interface and content navigation keystrokes":"用户界面和内容导航按键","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"使用以下按键可以在 CKEditor 5 用户界面中进行更有效地导览。","Close contextual balloons, dropdowns, and dialogs":"关闭上下文气泡框、下拉菜单和对话框","Open the accessibility help dialog":"打开“无障碍辅助功能帮助”对话框","Move focus between form fields (inputs, buttons, etc.)":"在表单字段(输入、按钮等)之间移动焦点","Move focus to the menu bar, navigate between menu bars":"将焦点移到菜单栏,在菜单栏之间导航","Move focus to the toolbar, navigate between toolbars":"将焦点移至工具栏,在工具栏之间导览","Navigate through the toolbar or menu bar":"通过工具栏或菜单栏进行导航","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"执行当前聚焦的按钮。执行与编辑器内容交互的按钮将焦点返回到内容。",Accept:"接受",Paragraph:"段落","Color picker":"颜色选择器","Please try a different phrase or check the spelling.":"请尝试使用不同的短语或检查拼写。",Source:"源",Insert:"插入",Update:"更新",Back:"返回","Insert code block":"插入代码块","Plain text":"纯文本","Leaving %0 code snippet":"正在退出 %0 代码片段","Entering %0 code snippet":"正在输入 %0 代码片段","Entering code snippet":"正在输入代码片段","Leaving code snippet":"正在退出代码片段","Code block":"代码块","Copy selected content":"复制选定的内容","Paste content":"粘贴内容","Paste content as plain text":"将内容粘贴为纯文本","Insert image or file":"插入图片或文件","Could not obtain resized image URL.":"无法获取重设大小的图片URL","Selecting resized image failed":"选择重设大小的图片失败","Could not insert image at the current position.":"无法在当前位置插入图片","Inserting image failed":"插入图片失败","Open file manager":"打开文件管理器","Cannot determine a category for the uploaded file.":"无法确定上传文件的类别。","Cannot access default workspace.":"无法访问默认工作区","You have no image editing permissions.":"您没有编辑图片的权限。","Edit image":"编辑图片","Processing the edited image.":"正在处理已编辑的图片。","Server failed to process the image.":"服务器未能处理图片。","Failed to determine category of edited image.":"未能确定已编辑图片的类别。",Bookmark:"书签","Edit bookmark":"编辑书签","Remove bookmark":"删除书签","Bookmark name":"书签名称","Enter the bookmark name without spaces.":"输入书签名称,不带空格。","Bookmark must not be empty.":"书签不能为空。","Bookmark name cannot contain space characters.":"书签名称不能包含空格。","Bookmark name already exists.":"书签名称已存在。","bookmark widget":"书签小组件","Bookmark toolbar":"书签工具栏",Bookmarks:"书签","No bookmarks available.":"无可用书签。","Scroll to bookmark":"滚动到书签","Block quote":"块引用",Bold:"加粗",Italic:"倾斜",Underline:"下划线",Code:"代码",Strikethrough:"删除线",Subscript:"下标",Superscript:"上标","Italic text":"斜体文本","Move out of an inline code style":"摆脱内联代码风格","Bold text":"加粗字体","Underline text":"给文本添加下划线","Strikethrough text":"给文本添加删除线","Saving changes":"正在保存更改","Revert autoformatting action":"恢复自动格式化操作","Align left":"左对齐","Align right":"右对齐","Align center":"居中对齐",Justify:"两端对齐","Text alignment":"对齐","Text alignment toolbar":"对齐工具栏"},getPluralForm(t){return 0}}},OHe=le({props:{placeholder:String,modelValue:String,minHeight:String,maxHeight:String,uploadAdapter:Object},emits:["update:modelValue"],setup(t,e){const n=H(t.modelValue);Se(n,()=>{n.value!=t.modelValue&&e.emit("update:modelValue",n.value)}),Se(()=>t.modelValue,()=>{t.modelValue!=n.value&&(n.value=t.modelValue)});const i={language:"zh-cn",licenseKey:"GPL",translations:[MHe],placeholder:t.placeholder,ui:{viewportOffset:{left:0,right:0,bottom:0,top:0},poweredBy:{position:"border",label:"s",side:"left",verticalOffset:0,horizontalOffset:-1e3,forceVisible:!0}},plugins:[p4e,G4e,y4e,ZVe,mFe,HFe,y6e,S6e,Z6e,f8e,h8e,z6e,LDe,b8e,w8e,b9e,E4e,n$e,F$e,Z$e,w7e,TS,v9e,g8e,Uze,SHe,qze,l4e,V4e,RFe,xFe,DFe,P4e,M4e,D4e,S4e,GBe,_O,eu,bHe,yJ,RHe],toolbar:["undo","redo","|","sourceEditing","heading","|","fontsize","fontColor","fontBackgroundColor","|","bold","italic","strikethrough","alignment","link","uploadImage","|","insertTable","|","bulletedList","numberedList","subscript","superscript","blockQuote","code","outdent","indent"],image:{toolbar:["imageTextAlternative","toggleImageCaption","|","imageStyle:inline","imageStyle:wrapText","imageStyle:breakText","|","resizeImage"]},link:{addTargetToExternalLinks:!0,defaultProtocol:"https://"},table:{contentToolbar:["tableColumn","tableRow","mergeTableCells","tableProperties","tableCellProperties","resizeTable"]}},r=H();return()=>L("div",{class:jB.wrapper,style:{"--rich-text-editor-min-height":t.minHeight,"--rich-text-editor-max-height":t.maxHeight}},[L(FPe,{ref:r,class:jB.ck_ontent,modelValue:n.value,"onUpdate:modelValue":o=>n.value=o,editor:tFe,config:i,onReady:o=>{t.uploadAdapter&&(o.plugins.get("FileRepository").createUploadAdapter=s=>t.uploadAdapter.adapter(s))}},null)])}});class LHe{constructor(e){this.adapter=e}_loader;async upload(){return new Promise(async(e,n)=>{const i=await this._loader.file;if(!i)return;const r=await this.adapter.upload(i);r?e({default:r}):n()})}loader(e){return this._loader=e,this}abort(){this.adapter.abort()}report(e,n){this._loader.uploadTotal=e||0,this._loader.uploaded=n||0}}class DHe{loader=new LHe(this);upload;abort;constructor(e){this.upload=e.upload,this.abort=e.abort}adapter(e){return this.loader.loader(e)}report(e,n){this.loader.report(e,n)}}function NHe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!yi(t)}class wJ{model=on({});fields=[];options={};constructor(e={}){this.ref=H(),this.options={labelWidth:"100px",labelPosition:"right",size:"default",inline:!1,showSubmit:!0,showReset:!0,submitText:"提交",resetText:"重置",showMessage:!0,inlineMessage:!1,...e}}getFormData(){const e={};return this.fields.forEach(n=>{typeof this.model[n.prop]<"u"&&(e[n.prop]=this.model[n.prop])}),e}addField(e,n,i={}){const r={prop:e,label:n,type:"input",clearable:!0,...i,placeholder:i.placeholder||"请输入"};return this.fields.push(r),i.required&&this.addRule(e,{required:!0,message:i.message??`${n}不能为空`,trigger:i.trigger??"blur"}),this}add(e,n,i={}){return this.addField(e,n,i)}addInput(e,n,i){return this.addField(e,n,{...i,type:"input"})}addTextarea(e,n,i){return this.addField(e,n,{...i,type:"textarea",rows:i?.rows??3})}addNumber(e,n,i){return this.addField(e,n,{...i,type:"number",controls:i?.controls??!0})}addPassword(e,n,i){return this.addField(e,n,{...i,type:"password",showPassword:i?.showPassword??!0})}addSelect(e,n,i,r){return this.addField(e,n,{...r,type:"select",options:i,placeholder:r?.placeholder??`请选择${n}`})}addRemoteSelect(e,n,i){const{fetchOptions:r,fetchOne:o,...s}=i,a=H(!1),l=on([]),u=async f=>{if(!f){l.length=0;return}a.value=!0;try{const h=await r(f);l.length=0,l.push(...h)}finally{a.value=!1}},c=async()=>{const f=this.model[e],h=l.findIndex(m=>m.value==f)>-1;if(f!=null&&f!==""&&!h&&o){a.value=!0;try{const m=await o(f);m&&(l.length=0,l.push(m))}finally{a.value=!1}}},d=this.addField(e,n,{...s,type:"select",remote:!0,filterable:!0,remoteMethod:u,fetchOptions:r,fetchOne:o,options:l,placeholder:s?.placeholder??`请输入${n}搜索`});return Se(()=>this.model[e],f=>{f!=null&&f!==""&&o&&c()}),c(),d}addRadio(e,n,i,r){return this.addField(e,n,{...r,type:"radio",options:i})}addCheckbox(e,n,i,r){return this.addField(e,n,{...r,type:"checkbox",options:i})}addSwitch(e,n,i){return this.addField(e,n,{...i,type:"switch"})}addDate(e,n,i){return this.addField(e,n,{...i,type:"date",placeholder:i?.placeholder??`选择${n}`})}addDatetime(e,n,i){return this.addField(e,n,{...i,type:"datetime",placeholder:i?.placeholder??`选择${n}`})}addDateRange(e,n,i){return this.addField(e,n,{...i,type:i?.type||"date-range",placeholder:i?.placeholder??`选择${n}`})}addTime(e,n,i){return this.addField(e,n,{...i,type:"time",placeholder:i?.placeholder??`选择${n}`})}addCascader(e,n,i,r){return this.addField(e,n,{...r,type:"cascader",cascaderOptions:i,placeholder:r?.placeholder??`请选择${n}`})}addSlider(e,n,i){return this.addField(e,n,{...i,type:"slider",min:i?.min??0,max:i?.max??100})}addColorPicker(e,n,i){return this.addField(e,n,{...i,type:"color-picker"})}addDecimal(e,n,i){return this.addField(e,n,{...i,type:"decimal",placeholder:i?.placeholder??`请输入${n}`,multiplier:i?.multiplier??1})}addUpload(e,n,i){return this.addField(e,n,{...i,type:"upload",uploadAccept:i?.uploadAccept??["*/*"],uploadLimitSize:i?.uploadLimitSize??1024,uploadListType:i?.uploadListType??"picture-card"})}addRichText(e,n,i){return this.addField(e,n,{...i,type:"rich-text"})}required(e,n,i){return this.addField(e,n,{...i,required:!0})}search(...e){return this.options.inline=!0,this.options.showSubmit=!0,this.options.submitText="搜索",this.options.showReset=!0,this.options.resetText="重置",e.forEach(({prop:n,label:i,config:r})=>{this.addField(n,i,r)}),this}addRule(e,n){const i=this.fields.find(r=>r.prop===e);if(i){const r=i.rules||[],o=Array.isArray(r)?r:[r];o.push(n),i.rules=o}return this}addRequiredRule(e,n,i="blur"){return this.addRule(e,{required:!0,message:n??"此项为必填项",trigger:i})}addEmailRule(e,n){return this.addRule(e,{type:"email",message:n??"请输入正确的邮箱格式",trigger:"blur"})}addPhoneRule(e,n){return this.addRule(e,{pattern:/^1[3-9]\d{9}$/,message:n??"请输入正确的手机号",trigger:"blur"})}addUrlRule(e,n){return this.addRule(e,{type:"url",message:n??"请输入正确的 URL 格式",trigger:"blur"})}addLengthRule(e,n,i,r){const o={type:"string",trigger:"blur"};return n!==void 0&&(o.min=n),i!==void 0&&(o.max=i),r&&(o.message=r),this.addRule(e,o)}addRangeRule(e,n,i,r){const o={type:"number",trigger:"blur"};return n!==void 0&&(o.min=n),i!==void 0&&(o.max=i),r&&(o.message=r),this.addRule(e,o)}addPatternRule(e,n,i,r="blur"){return this.addRule(e,{pattern:n,message:i,trigger:r})}setValue(e,n){return this.model[e]=n,this}setValues(e){return Object.assign(this.model,e),this}setFieldEvents(e,n,i){const r=this.fields.find(o=>o.prop===e);return r&&(n&&(r.onChange=n),i&&(r.onClear=i)),this}setFieldEventsBatch(e){return Object.entries(e).forEach(([n,{onChange:i,onClear:r}])=>{this.setFieldEvents(n,i,r)}),this}setLabelWidth(e){return this.options.labelWidth=e,this}setLabelPosition(e){return this.options.labelPosition=e,this}setSize(e){return this.options.size=e,this}setInline(e=!0){return this.options.inline=e,this}setShowSubmit(e,n){return this.options.showSubmit=e,n&&(this.options.submitText=n),this}setShowReset(e,n){return this.options.showReset=e,n&&(this.options.resetText=n),this}setSubmitLoading(e){return this.options.submitLoading=e,this}onSubmit(e){return this.options.onSubmit=e,this}onReset(e){return this.options.onReset=e,this}onFieldChange(e){return this.options.onFieldChange=e,this}onFieldClear(e){return this.options.onFieldClear=e,this}addButton(e,n){const i={prop:`_btn_${Date.now()}_${this.fields.length}`,label:"",type:"button",buttonText:e,buttonType:n?.type,buttonLoading:n?.loading,buttonDisabled:n?.disabled,onClick:n?.onClick,labelWidth:n?.labelWidth};return this.fields.push(i),this}addCreateButton(e){return this.addButton("新增",{type:"primary",...e})}addLineBreak(){const e={prop:`_line_${Date.now()}_${this.fields.length}`,label:"",type:"line"};return this.fields.push(e),this}addHidden(e,n=""){const i={prop:e,label:"",type:"hidden"};return this.fields.push(i),this.model[e]=n,this}build(){const{onFieldChange:e,onFieldClear:n}=this.options,i=this.fields.map(o=>{const s={...o},a=o.onChange;(e||a)&&(s.onChange=u=>{a?.(u),e?.(o.prop,u)});const l=o.onClear;return(n||l)&&(s.onClear=()=>{l?.(),n?.(o.prop)}),s}),r={ref:this.ref,model:this.model,fields:i,...this.options,setValues:o=>{Object.assign(this.model,o)},setValue:(o,s)=>{this.model[o]=s},resetForm:()=>{this.ref.value?.resetFields()},clearData:()=>{this.fields.forEach(o=>{delete this.model[o.prop]}),this.ref.value?.clearValidate()},getFormData:()=>{const o={};return this.fields.forEach(s=>{typeof this.model[s.prop]<"u"&&(o[s.prop]=this.model[s.prop])}),o},validate:async()=>{try{return!!await this.ref.value?.validate()}catch{return!1}},validateField:async o=>{try{return await this.ref.value?.validateField(o),!0}catch{return!1}},clearValidate:()=>{this.ref.value?.clearValidate()},addButton:(o,s)=>{const a={prop:`_btn_${Date.now()}_${this.fields.length}`,label:"",type:"button",buttonText:o,buttonType:s?.type,buttonLoading:s?.loading,buttonDisabled:s?.disabled,onClick:s?.onClick,labelWidth:s?.labelWidth};return this.fields.push(a),r},addLineBreak:()=>{const o={prop:`_line_${Date.now()}_${this.fields.length}`,label:"",type:"line"};return this.fields.push(o),r},addHidden:(o,s="")=>{const a={prop:o,label:"",type:"hidden"};return this.fields.push(a),this.model[o]=s,r}};return r}}function LO(t){return new wJ(t)}function BHe(t){return new wJ({labelWidth:"auto",inline:!0,submitText:"搜索",...t})}const RS=le({props:{model:{type:Object,required:!0},fields:{type:Array,required:!0},labelWidth:{type:String,default:"100px"},labelPosition:{type:String,default:"right"},size:{type:String,default:"default"},inline:{type:Boolean,default:!1},disabled:Boolean,statusIcon:Boolean,validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,showMessage:{type:Boolean,default:!0},inlineMessage:Boolean,showSubmit:{type:Boolean,default:!0},showReset:{type:Boolean,default:!0},submitText:{type:String,default:"提交"},resetText:{type:String,default:"重置"},submitLoading:Boolean,onSubmit:Function,onReset:Function,onValidate:Function,onFieldChange:Function,onFieldClear:Function},inheritAttrs:!1,setup(t,{expose:e}){const n=H(),i=H(!1),r=d=>{i.value=d},o=async()=>{try{return await n.value?.validate(),!0}catch{return!1}},s=async d=>{try{return await n.value?.validateField(d),!0}catch{return!1}},a=()=>{n.value?.resetFields()};e({validate:o,validateField:s,resetFields:a,clearValidate:()=>{n.value?.clearValidate()},formRef:n});const u=async()=>{if(await o()){r(!0);try{await t.onSubmit?.()}finally{r(!1)}}},c=()=>{a(),t.onReset?.()};return()=>{const d=f=>{let h;const{type:m="input",prop:g,placeholder:v,disabled:p,readonly:b,clearable:y,size:_,width:C,options:S=[],cascaderOptions:k,multiple:T,rows:E,min:x,max:P,step:A,showPassword:I,activeValue:D,inactiveValue:q,range:z,showInput:R,format:O,valueFormat:N,prepend:F,append:j,prefixIcon:U,suffixIcon:W,controls:J,allowCreate:ne,filterable:he,onChange:X,onClear:se}=f,re=t.inline,te=re&&!C?"200px":C??(re?"240px":"100%"),V=N??(()=>{let G=t.model[g];return Array.isArray(G)&&(G=G[0]),G==null||G===""?"X":typeof G=="number"?G<1e10?"X":"x":typeof G=="string"&&/^\d{10}$/.test(G)?"X":typeof G=="string"&&/^\d{13,14}$/.test(G)?"x":"YYYY-MM-DD HH:mm:ss"})(),K={placeholder:v,disabled:p,readonly:b,clearable:y,size:_||t.size};switch(m){case"textarea":return L(cr,Lt(K,{type:"textarea",rows:E??3,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se}),null);case"number":return L(uq,Lt(K,{style:"width: 100%",min:x,max:P,step:A??1,controls:J??!0,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X}),null);case"password":return L(cr,Lt(K,{type:"password","show-password":I??!0,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se}),null);case"select":return L(oW,Lt(K,{style:`width: ${te}`,multiple:T,"allow-create":ne,filterable:he,remote:f.remote,remoteMethod:f.remoteMethod,loading:f.loading,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se}),NHe(h=S.map(G=>L(sW,{key:String(G.value),label:G.label,value:G.value,disabled:G.disabled},null)))?h:{default:()=>[h]});case"radio":return L(gpe,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,size:_||t.size,onChange:X},{default:()=>S.map(G=>L(SW,{key:String(G.value),value:G.value,disabled:G.disabled},{default:()=>[G.label]}))});case"checkbox":return L(gW,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,size:_||t.size,onChange:X},{default:()=>S.map(G=>L(Ac,{key:String(G.value),value:G.value,disabled:G.disabled},{default:()=>[G.label]}))});case"switch":return L(vq,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,disabled:p,"active-value":D,"inactive-value":q,onChange:X},null);case"date":return L(W0,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se,type:"date",style:`width: ${te}`,placeholder:v,format:O,"value-format":V},null);case"datetime":return L(W0,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se,type:"datetime",style:`width: ${te}`,placeholder:v,format:O,"value-format":V},null);case"date-range":return L(W0,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se,type:"daterange",style:`width: ${re&&!C?"360px":te}`,"range-separator":"至","start-placeholder":v||"开始日期","end-placeholder":v||"结束日期",format:O,"value-format":V},null);case"datetime-range":return L(W0,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se,type:"datetimerange",style:`width: ${re&&!C?"400px":te}`,"range-separator":"至","start-placeholder":v||"开始时间","end-placeholder":v||"结束时间",format:O,"value-format":V},null);case"time":return L(Ove,{modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se,style:`width: ${te}`,placeholder:v,format:O,"value-format":V},null);case"cascader":return L(Lpe,Lt(K,{options:k??S,multiple:T,filterable:he,style:`width: ${te}`,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se}),null);case"slider":return L(t1e,{style:`width: ${te}`,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,min:x??0,max:P??100,step:A??1,range:z,"show-input":R??!0,onChange:X},null);case"color-picker":return L(ave,{style:`width: ${te}`,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se},null);case"decimal":return L(TPe,{style:`width: ${te}`,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,placeholder:v,clearable:y,prefixIcon:U,suffixIcon:W,multiplier:f.multiplier??1,onClear:t.onFieldClear,unsigned:f.unsigned!==!1},null);case"upload":return L(EPe,{style:`width: ${te}`,modelValue:t.model[g],"onUpdate:modelValue":G=>{t.model[g]=G,X?.(G)},accept:f.uploadAccept??["*/*"],limit:f.uploadLimit,limitSize:f.uploadLimitSize??1024,listType:f.uploadListType??"picture-card",width:f.uploadWidth,disabled:f.uploadDisabled??p,errMessage:f.uploadErrMessage,onUpload:f.uploadOnUpload},null);case"rich-text":return L(OHe,{style:`width: ${C||"100%"}`,modelValue:t.model[g],"onUpdate:modelValue":G=>{t.model[g]=G,X?.(G)},placeholder:f.richTextPlaceholder,minHeight:f.richTextMinHeight,maxHeight:f.richTextMaxHeight,uploadAdapter:f.richTextUploadAdapter},null);case"hidden":return L("input",{type:"hidden",name:g,value:t.model[g]??""},null);case"button":return L(Hi,{type:f.buttonType,loading:f.buttonLoading,disabled:f.buttonDisabled,onClick:f.onClick},{default:()=>[f.buttonText]});default:return L(cr,Lt(K,{"prefix-icon":U,"suffix-icon":W,modelValue:t.model[g],"onUpdate:modelValue":G=>t.model[g]=G,onChange:X,onClear:se}),{default:()=>[F&&(()=>F),j&&(()=>j)]})}};return L("div",null,[L(aq,{ref:n,model:t.model,"label-width":t.labelWidth,"label-position":t.labelPosition,size:t.size,inline:t.inline,disabled:t.disabled,"status-icon":t.statusIcon,"validate-on-rule-change":t.validateOnRuleChange,"hide-required-asterisk":t.hideRequiredAsterisk,"show-message":t.showMessage,"inline-message":t.inlineMessage},{default:()=>[t.fields.map(f=>{if(f.type==="line")return L("div",{key:f.prop,style:"height: 0; clear: both;"},null);if(f.type==="hidden")return d(f);const h=f.rules?Array.isArray(f.rules)?f.rules:[f.rules]:void 0,m=f.type==="button";return L(Wh,{key:f.prop,label:m?"":f.label+(t.inline?":":""),prop:f.prop,"label-width":f.labelWidth,rules:h,error:f.error,"show-message":f.showMessage??t.showMessage,"inline-message":f.inlineMessage??t.inlineMessage},{default:()=>d(f)})}),(t.showSubmit||t.showReset)&&L(Wh,null,{default:()=>[L("div",null,[t.showSubmit&&L(Hi,{type:"primary",loading:i.value,onClick:u},{default:()=>[t.submitText]}),t.showReset&&L(Hi,{onClick:c},{default:()=>[t.resetText]})])]})]})])}}}),_i=t=>()=>{const e=BHe();return t(e),e.build()},VHe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).add("title","标题",{labelWidth:"80"}).addDateRange("createTime","创建时间",{type:"datetime-range",valueFormat:"YYYY-MM-DD HH:mm:ss"})})(),FHe="_table_1pkm3_1",$He={table:FHe};function F6(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!yi(t)}function zHe(t,e){if(!t)return"";typeof t=="number"&&String(t).length===10&&(t=new Date(t*1e3));const n=t instanceof Date?t:new Date(t);if(isNaN(n.getTime()))return String(t);const i={yyyy:String(n.getFullYear()),mm:String(n.getMonth()+1).padStart(2,"0"),dd:String(n.getDate()).padStart(2,"0"),hh:String(n.getHours()).padStart(2,"0"),ii:String(n.getMinutes()).padStart(2,"0"),ss:String(n.getSeconds()).padStart(2,"0")};return e.replace(/yyyy|mm|dd|hh|ii|ss/g,r=>i[r])}class HHe{columns=[];options={};reactiveData=[];constructor(e={}){this.ref=H(),this.reactiveData=on(e.data||[]),this.options={stripe:!0,border:!0,size:"default",fit:!0,showHeader:!0,...e}}addColumn(e,n,i={}){return this.columns.push({prop:e,label:n,...i}),this}addDefaultColumn(e,n,i){return this.addColumn(e,n,{...i,type:"default"})}addTimeColumn(e,n,i={}){const{format:r,...o}=i,s=r||"yyyy-mm-dd hh:ii:ss";return this.addColumn(e,n,{width:180,align:"center",formatter:(a,l,u)=>zHe(u,s),...o})}addSelectionColumn(e){return this.columns.unshift({label:"",type:"selection",width:50,align:"center",...e}),this}addIndexColumn(e,n){return this.columns.unshift({label:e||"#",type:"index",width:60,align:"center",...n}),this}addExpandColumn(e){return this.columns.unshift({label:"",type:"expand",width:50,align:"center",...e}),this}addRadioColumn(e){return this.columns.unshift({label:"",type:"radio",width:50,align:"center",...e}),this}addSwitchColumn(e,n,i={}){return this.columns.push({prop:e,label:n,type:"switch",width:i.width||100,align:"center",...i}),this}addTagColumn(e,n,i){const{width:r=100,tagConfig:o,...s}=i;return this.columns.push({prop:e,label:n,type:"tag",width:r,align:"center",tagConfig:o,...s}),this}addImageColumn(e,n,i={}){const{width:r,imageConfig:o,...s}=i;return this.columns.push({prop:e,label:n,type:"image",width:r||(o?.size??40)+16,align:"center",imageConfig:o,...s}),this}addCurrencyColumn(e,n,i={}){const{width:r,currencyConfig:o,...s}=i;return this.columns.push({prop:e,label:n,type:"currency",width:r||120,align:"right",currencyConfig:o,...s}),this}addColumns(e){return e.forEach(({prop:n,label:i,config:r})=>{this.addColumn(n,i,r)}),this}addActionColumn(e){const n=e?.buttons||[];e?.showDelete!==!1&&n.unshift({width:70,label:"删除",type:"danger",popoverMessage:"确定删除吗?",onClick:e?.onDelete}),e?.showEdit!==!1&&n.unshift({width:70,label:"编辑",type:"primary",onClick:e?.onEdit});let i=0;return n.forEach(r=>{i+=r.width}),this.columns.push({label:e?.label||"操作",prop:"__action__",fixed:"right",align:e?.align||"center",headerAlign:e?.headerAlign||"center",showOverflowTooltip:!1,...e,width:e?.width??i,buttons:n}),this}setData(e){return this.reactiveData.splice(0,this.reactiveData.length,...e),this}setHeight(e){return this.options.height=e,this}setMaxHeight(e){return this.options.maxHeight=e,this}setStripe(e=!0){return this.options.stripe=e,this}setBorder(e=!0){return this.options.border=e,this}setSize(e){return this.options.size=e,this}setFit(e=!0){return this.options.fit=e,this}setShowHeader(e=!0){return this.options.showHeader=e,this}setHighlightCurrentRow(e=!0){return this.options.highlightCurrentRow=e,this}setRowKey(e){return this.options.rowKey=e,this}setEmptyText(e){return this.options.emptyText=e,this}onRowClick(e){return this.options.onRowClick=e,this}onRowDblclick(e){return this.options.onRowDblclick=e,this}onSelectionChange(e){return this.options.onSelectionChange=e,this}onCurrentChange(e){return this.options.onCurrentChange=e,this}onSortChange(e){return this.options.onSortChange=e,this}onExpandChange(e){return this.options.onExpandChange=e,this}build(){return{columns:this.columns,data:this.reactiveData,...this.options,setData:e=>{this.reactiveData.splice(0,this.reactiveData.length,...e)},getData:()=>[...this.reactiveData],getSelection:()=>this.ref.value?.getSelectionRows()||[],getCurrentRow:()=>this.ref.value?.getCurrentRow(),clearSort:()=>{this.ref.value?.clearSort()},clearFilter:()=>{this.ref.value?.clearFilter()},scrollTo:e=>{this.ref.value?.scrollTo(e)},toggleRowSelection:(e,n)=>{this.ref.value?.toggleRowSelection(e,n)},toggleAllSelection:()=>{this.ref.value?.toggleAllSelection()},toggleRowExpansion:(e,n)=>{this.ref.value?.toggleRowExpansion(e,n)},setCurrentRow:e=>{this.ref.value?.setCurrentRow(e)},sort:(e,n)=>{this.ref.value?.sort(e,n)}}}}function UHe(t){return new HHe(t)}const WHe=le({props:{columns:{type:Array,required:!0},data:{type:Array,default:()=>[]},height:[String,Number],maxHeight:[String,Number],stripe:Boolean,border:Boolean,size:String,fit:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,rowKey:[String,Function],lazy:Boolean,indent:Number,treeProps:Object,onRowClick:Function,onRowDblclick:Function,onSelectionChange:Function,onCurrentChange:Function,onSortChange:Function,onExpandChange:Function},inheritAttrs:!1,setup(t,{emit:e,expose:n}){const i=H(),r=H({}),o=(_,C)=>{t.onRowClick?.(_,C)},s=(_,C)=>{t.onRowDblclick?.(_,C)},a=_=>{t.onSelectionChange?.(_)},l=(_,C)=>{t.onCurrentChange?.(_,C)},u=({prop:_,order:C})=>{t.onSortChange?.({prop:_,order:C})},c=(_,C)=>{t.onExpandChange?.(_,C)};return n({getSelectionRows:()=>i.value?.getSelectionRows()||[],getCurrentRow:()=>i.value?.getCurrentRow(),clearSort:()=>{i.value?.clearSort()},clearFilter:()=>{i.value?.clearFilter()},toggleRowSelection:(_,C)=>{i.value?.toggleRowSelection(_,C)},toggleAllSelection:()=>{i.value?.toggleAllSelection()},toggleRowExpansion:(_,C)=>{i.value?.toggleRowExpansion(_,C)},setCurrentRow:_=>{i.value?.setCurrentRow(_)},sort:(_,C)=>{i.value?.sort(_,C)},tableRef:i}),()=>{let _;const C=()=>{const S=(k,T)=>T.includes(".")?T.split(".").reduce((E,x)=>E?.[x],k):k?.[T];return t.columns.map(k=>{const{type:T,prop:E,label:x,buttons:P,...A}=k;return T&&["selection","index","expand","radio"].includes(T)?L(rd,Lt({type:T,label:x},A),null):T==="switch"?L(rd,Lt({prop:E,label:x,align:k.align||"center",headerAlign:k.headerAlign||"center"},A),{default:I=>{const D=k.switchProp||E||"",q=I.row[D],z=k.disabled===!0||typeof k.disabled=="function"&&k.disabled(I.row,I.$index),R=H(!1),O=async N=>{if(k.onChange){R.value=!0;try{await k.onChange(I.row,N,I.$index)||(I.row[D]=q===k.inactiveValue?k.activeValue:k.inactiveValue)}finally{R.value=!1}}};return L(vq,{modelValue:I.row[D],"onUpdate:modelValue":N=>I.row[D]=N,"active-text":k.activeText,"inactive-text":k.inactiveText,"active-value":k.activeValue??!0,"inactive-value":k.inactiveValue??!1,disabled:z,loading:R.value,onChange:O},null)}}):T==="tag"?L(rd,Lt({prop:E,label:x,align:k.align||"center",headerAlign:k.headerAlign||"center"},A),{default:I=>{const D=k.tagConfig,q=E||"",z=S(I.row,q),R=D?.statusMap[z];let O,N,F;R?(O=R.label,N=R.type,F=R.color):D?.fallback?(O=D.fallback.label??String(z??""),N=D.fallback.type,F=D.fallback.color):O=String(z??"");const j={};return N&&(j.type=N),F&&(j.color=F),L(jp,j,F6(O)?O:{default:()=>[O]})}}):T==="image"?L(rd,Lt({prop:E,label:x,align:k.align||"center",headerAlign:k.headerAlign||"center"},A),{default:I=>{const D=k.imageConfig,q=E||"",z=S(I.row,q),R=D?.size??40,O=D?.gap??8,N=D?.transformUrl;let F=[];if(z&&(F=(typeof z=="string"?z.split(",").map(U=>U.trim()).filter(Boolean):Array.isArray(z)?z:[String(z)]).filter(Boolean)),F.length===0)return L("span",{style:"color: #999;"},[dt("无图片")]);const j=F.map(U=>N?N(U):U);return L("div",{style:{display:"flex",flexWrap:"wrap",gap:`${O}px`}},[F.map((U,W)=>{const J=N?N(U):U;return L(wwe,{key:W,src:J,"preview-src-list":j,"initial-index":W,fit:"cover","preview-teleported":!0,style:{width:`${R}px`,height:`${R}px`,borderRadius:"4px",cursor:"pointer"}},null)})])}}):T==="currency"?L(rd,Lt({prop:E,label:x,align:k.align||"right",headerAlign:k.headerAlign||"right"},A),{default:I=>{const D=k.currencyConfig,q=E||"",z=q.includes(".")?q.split(".").reduce((W,J)=>W?.[J],I.row):I.row[q],R=D?.locale??"zh-CN",O=D?.decimals??2,N=D?.symbol??"¥",F=D?.showSymbol??!1,j=Number(z);if(isNaN(j))return L("span",{style:"color: #999;"},[dt("-")]);const U=j.toLocaleString(R,{minimumFractionDigits:O,maximumFractionDigits:O});return L("span",null,[F&&L("span",{style:"margin-right: 2px;"},[N]),U])}}):E==="__action__"&&P?L(rd,Lt({label:x,fixed:"right",align:k.align||"center",headerAlign:k.headerAlign||"center"},A),{default:I=>L("div",null,[P.map((D,q)=>{const z=D.disabled===!0||typeof D.disabled=="function"&&D.disabled(I.row,I.$index),R=()=>{D.onClick&&D.onClick(I.row,I.$index)},O=I.$index+"_"+q;return L(x_e,{visible:!!r.value[O]},{default(){return[L("p",{style:"margin-bottom:5px;"},[L(V2,{type:"warning"},{default:()=>[D.popoverMessage]})]),L("div",null,[L(Hi,{size:"small",onClick:()=>{r.value[O]=!1}},{default:()=>[dt("取消")]}),L(Hi,{size:"small",type:"danger",onClick:()=>{r.value[O]=!1,R()}},{default:()=>[dt("确定")]})])]},reference(){return L(Hi,{key:q,type:D.type||"primary",size:"small",disabled:z,onClick:()=>{D.popoverMessage?r.value[O]=!0:R()}},{default:()=>[D.label]})}})})])}):L(rd,Lt({prop:E,label:x},A,{showOverflowTooltip:k.showOverflowTooltip??!0}),{default:()=>[k.render&&(I=>k.render?.(I))]})})};return L(kCe,{class:$He.table,ref:i,data:t.data,height:t.height,maxHeight:t.maxHeight,stripe:t.stripe,border:t.border,size:t.size,fit:t.fit,"show-header":t.showHeader,"highlight-current-row":t.highlightCurrentRow,"current-row-key":t.currentRowKey,"empty-text":t.emptyText,"row-key":typeof t.rowKey=="function"?void 0:t.rowKey,lazy:t.lazy,indent:t.indent,"tree-props":t.treeProps,"onRow-click":o,"onRow-dblclick":s,"onSelection-change":a,"onCurrent-change":l,"onSort-change":u,"onExpand-change":c},F6(_=C())?_:{default:()=>[_]})}}});class qHe{options={};constructor(e={}){this.ref=H(null),this.reactiveOptions=on({total:e.total??0,pageSize:e.pageSize??20,currentPage:e.currentPage??1}),this.options={pagerCount:7,layout:"total, sizes, prev, pager, next, jumper",background:!1,disabled:!1,hideOnSinglePage:!1,small:!1,pageSizeOptions:[10,20,30,40,50],...e}}setTotal(e){return this.reactiveOptions.total=e,this}setCurrentPage(e){return this.reactiveOptions.currentPage=e,this}setPageSize(e){return this.reactiveOptions.pageSize=e,this}setPageCount(e){return this.options.pageCount=e,this}setPagerCount(e){return this.options.pagerCount=e,this}setPageSizeOptions(e){return this.options.pageSizeOptions=e,this}setLayout(e){return this.options.layout=e,this}setBackground(e=!0){return this.options.background=e,this}setDisabled(e=!0){return this.options.disabled=e,this}setHideOnSinglePage(e=!0){return this.options.hideOnSinglePage=e,this}setSmall(e=!0){return this.options.small=e,this}setPopperClass(e){return this.options.popperClass=e,this}setPrevText(e){return this.options.prevText=e,this}setNextText(e){return this.options.nextText=e,this}onPageChange(e){return this.options.onPageChange=e,this}onSizeChange(e){return this.options.onSizeChange=e,this}onPrevClick(e){return this.options.onPrevClick=e,this}onNextClick(e){return this.options.onNextClick=e,this}build(){const e=this.reactiveOptions,n=this;return{...this.options,ref:this.ref,paginationData:e,setTotal:r=>{e.total=r},setCurrentPage:r=>{e.currentPage=r},setPageSize:r=>{e.pageSize=r},getCurrentPage:()=>n.ref.value?.getCurrentPage()??e.currentPage,getPageSize:()=>n.ref.value?.getPageSize()??e.pageSize,getTotalPages:()=>n.ref.value?.getTotalPages()??Math.ceil(e.total/e.pageSize),jumpTo:r=>{e.currentPage=r}}}}function jHe(t){return new qHe(t)}const KHe=le({props:{total:{type:Number,default:0},pageSize:{type:Number,default:10},currentPage:{type:Number,default:1},pageCount:Number,pagerCount:{type:Number,default:7},pageSizeOptions:{type:Array,default:()=>[10,20,30,40,50]},layout:{type:String,default:"prev, pager, next"},background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,small:Boolean,popperClass:String,prevText:String,nextText:String,paginationData:Object,onPageChange:Function,onSizeChange:Function},inheritAttrs:!1,setup(t,{expose:e}){const n=M({get:()=>t.paginationData?.currentPage??t.currentPage,set:o=>{t.paginationData&&(t.paginationData.currentPage=o)}}),i=M({get:()=>t.paginationData?.pageSize??t.pageSize,set:o=>{t.paginationData&&(t.paginationData.pageSize=o)}}),r=M({get:()=>t.paginationData?.total??t.total,set:o=>{t.paginationData&&(t.paginationData.total=o)}});return e({getTotal:()=>t.paginationData?.total??t.total,getCurrentPage:()=>t.paginationData?.currentPage??t.currentPage,getPageSize:()=>t.paginationData?.pageSize??t.pageSize,getTotalPages:()=>Math.ceil((t.paginationData?.total??t.total)/(t.paginationData?.pageSize??t.pageSize))}),()=>L(y_e,{"current-page":n.value,"onUpdate:current-page":o=>n.value=o,"page-size":i.value,"onUpdate:page-size":o=>i.value=o,"page-sizes":t.pageSizeOptions,layout:t.layout||"total, sizes, prev, pager, next, jumper",total:r.value,onSizeChange:o=>{t.onSizeChange?.(o)},onCurrentChange:o=>{t.onPageChange?.(o)}},null)}}),Ci=t=>()=>{const e=jHe();return t(e),e.build()},mi=t=>()=>{const e=UHe();return t(e),e.build()},GHe=Ci(t=>{}),YHe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("title","标题").addColumn("description","会议介绍",{width:300}).addColumn("liveUrl","直播地址").addColumn("remark","备注").addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),XHe="_full_layout_1ttiy_1",JHe={full_layout:XHe},Gc=le({props:{flexColumn:Boolean},setup(t,{slots:e}){return()=>L("div",{class:JHe.full_layout,"flex-column":t.flexColumn},[e.default?.()])}}),ZHe="_wrapper_17gcl_1",QHe="_header_17gcl_8",eUe="_body_17gcl_12",tUe="_footer_17gcl_21",xy={wrapper:ZHe,header:QHe,body:eUe,footer:tUe},gi=le({props:{ctx:{type:Object,required:!0}},setup(t,e){const n=t.ctx;return()=>L(Gc,{flexColumn:!0},{default:()=>[L("div",{class:xy.wrapper},[n.search&&L("div",{class:xy.header},[L(RS,n.search,null)]),n.table&&L("div",{class:xy.body},[L(WHe,n.table,null)]),n.pagination&&L("div",{class:xy.footer},[L(KHe,n.pagination,null)])])]})}}),pi=t=>{const e=async()=>{const n=t.pagination?.getPageSize()||1,i=t.pagination?.getCurrentPage()||10,r=t.search?.getFormData()||{},o=await t.onRequest({size:n,page:i,data:r});o.success&&(t.table?.setData(o.data.list),t.pagination?.setTotal(o.data.total))};return t.search&&(t.search.onSubmit=()=>(t.pagination?.setCurrentPage(1),e()),t.search.onReset=()=>{t.pagination?.setCurrentPage(1),e()}),t.pagination&&(t.pagination.onPageChange=e,t.pagination.onSizeChange=e),e(),t},$6={"dialog-footer":"_dialog-footer_k3cnr_1"};var _J={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};const z6=le({props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},showClose:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},width:{type:[String,Number],default:"50%"},customClass:String,lockScroll:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,fullscreen:Boolean,contentStyle:Object,bodyStyle:Object,showFooter:{type:Boolean,default:!1},confirmButtonText:{type:String,default:"确定"},cancelButtonText:{type:String,default:"取消"},showCancelButton:{type:Boolean,default:!1},confirmButtonType:{type:String,default:"primary"},confirmLoading:{type:Boolean,default:!1}},emits:["update:modelValue","close","confirm","cancel"],setup(t,{emit:e,slots:n}){const i=()=>{e("update:modelValue",!1),e("close")},r=()=>{e("confirm")},o=()=>{e("cancel"),i()};return()=>L(MW,{locale:_J,"z-index":99999},{default:()=>[L(M0e,{modelValue:t.modelValue,title:t.title,showClose:t.showClose,modal:t.modal,closeOnClickModal:t.closeOnClickModal,closeOnPressEscape:t.closeOnPressEscape,width:t.width,class:t.customClass,lockScroll:t.lockScroll,center:t.center,draggable:t.draggable,fullscreen:t.fullscreen,contentStyle:t.contentStyle,bodyStyle:t.bodyStyle,"append-to-body":!0,"align-center":!0,onClose:i},{default:()=>L("div",{class:$6.content},[L(gu,{"max-height":"80vh"},{default:()=>[n.default?.()]})]),footer:()=>{if(t.showFooter)return L("div",{class:$6["dialog-footer"]},[t.showCancelButton&&L(Hi,{onClick:o},{default:()=>[t.cancelButtonText]}),L(Hi,{type:t.confirmButtonType,loading:t.confirmLoading,onClick:r},{default:()=>[t.confirmButtonText]})])}})]})}}),H6=()=>{const t=document.createElement("div");return document.body.appendChild(t),{container:t,destroy(){t.remove()}}},CJ={open(t,e){const{title:n="",showClose:i=!0,modal:r=!0,closeOnClickModal:o=!0,closeOnPressEscape:s=!0,width:a="50%",customClass:l,lockScroll:u=!0,center:c,draggable:d,fullscreen:f,contentStyle:h,bodyStyle:m,beforeClose:g,onClose:v,confirmButtonText:p="确定",cancelButtonText:b="取消",showCancelButton:y=!1,confirmButtonType:_="primary",showFooter:C=!1,confirmLoading:S=!1}=e||{},{container:k,destroy:T}=H6(),E=H(!0),x=()=>{const A=()=>{E.value=!1,v?.(),setTimeout(()=>{T()},300)};if(g){const I=g(A);I instanceof Promise?I.then(D=>{D!==!1&&A()}):I!==!1&&A()}else A()};return L_({setup(){return()=>nt(z6,{modelValue:E.value,title:n,showClose:i,modal:r,closeOnClickModal:o,closeOnPressEscape:s,width:a,customClass:l,lockScroll:u,center:c,draggable:d,fullscreen:f,contentStyle:h,bodyStyle:m,showFooter:C,confirmButtonText:p,cancelButtonText:b,showCancelButton:y,confirmButtonType:_,confirmLoading:S,onClose:x,"onUpdate:modelValue":A=>{A||x()}},{default:()=>t(x)})}}).mount(k),{close:x}},openForm(t,e){const{title:n="",width:i="50%",showCancelButton:r=!0,confirmButtonText:o="确定",cancelButtonText:s="取消",closeOnClickModal:a=!1,confirmLoading:l=!1,onCancel:u,onConfirm:c}=e||{},{container:d,destroy:f}=H6(),h={close:()=>{},setLoading:v=>{}},m={close:()=>h.close(),setLoading:v=>h.setLoading(v)};return L_({setup(){const v=H(!0),p=H(l);h.close=()=>{v.value=!1,setTimeout(()=>{f()},300)},h.setLoading=C=>{p.value=C};const b=()=>{v.value=!1,setTimeout(()=>{f()},300)},y=()=>{u?.(),b()},_=async()=>{c&&await c()};return()=>nt(z6,{modelValue:v.value,title:n,showClose:!0,modal:!0,closeOnClickModal:a,closeOnPressEscape:!0,width:i,lockScroll:!0,showFooter:!0,confirmButtonText:o,cancelButtonText:s,showCancelButton:r,confirmButtonType:"primary",confirmLoading:p.value,onClose:b,onConfirm:_,onCancel:y,"onUpdate:modelValue":C=>{C||b()}},{default:()=>t(b,m)})}}).mount(d),m}},Li=t=>()=>{const e=LO({showSubmit:!1,showReset:!1,labelWidth:"auto"});e.addHidden("id"),t.create(e);const n=e.build(),i=r=>{const o=CJ.openForm(s=>L(RS,n,null),{title:`${r}${t.name}`,async onConfirm(){if(await n.validate()){o.setLoading(!0);try{const s=n.getFormData(),a=await t.onSubmit(s);if(o.setLoading(!1),!a)return;s.id?fl.showNotification("修改成功"):fl.showNotification("创建成功"),o.close()}catch{o.setLoading(!1)}}},...t.options})};return{openCreate:()=>{n.clearData(),i("创建")},openEdit(r){n.setValues(r),i("编辑")}}},nUe=t=>Li({name:"每日会议",...t,create(e){e.required("title","标题").required("liveUrl","直播地址").addTextarea("description","会议介绍",{rows:4,required:!0}).addTextarea("remark","备注",{rows:3})}})(),iUe=async t=>(await it.generatedDailyMeetingControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{}})).data,rUe=async t=>t.id?(await it.generatedDailyMeetingControllerUpdate({id:t.id},{title:t.title,description:t.description,liveUrl:t.liveUrl,remark:t.remark})).data.success:(await it.generatedDailyMeetingControllerCreate({title:t.title,description:t.description,liveUrl:t.liveUrl,remark:t.remark})).data.success,oUe=async t=>(await it.generatedDailyMeetingControllerDelete({ids:t})).data.success,SJ=vn({meta:{title:"每日会议管理",icon:"video-conference",sort:98}}),sUe=le(()=>{const t=nUe({async onSubmit(n){const i=await rUe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:VHe({onClickCreate(){t.openCreate()}}),table:YHe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await oUe([String(n.id)])&&e.search?.onReset?.()}}),pagination:GHe(),onRequest:iUe});return()=>L(gi,{ctx:e},null)}),aUe=Object.freeze(Object.defineProperty({__proto__:null,default:sUe,meta:SJ},Symbol.toStringTag,{value:"Module"})),lUe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).addSelect("type","类型",[{label:"服务协议",value:1},{label:"隐私协议",value:2}],{labelWidth:"80",width:"150px"}).add("title","标题",{labelWidth:"80"})})(),uUe=Ci(t=>{}),cUe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("title","标题").addTagColumn("type","类型",{width:100,tagConfig:{statusMap:{1:{label:"服务协议",type:"primary"},2:{label:"隐私协议",type:"warning"}}}}).addTimeColumn("publishTime","发布时间").addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),lv={uploadLimitSize:1024*10,async uploadOnUpload(t){const e=await it.uploadControllerImage({image:t.file},{onUploadProgress(n){t.progress(n.total||0,n.loaded)}});if(console.log(e.data),e.data?.success&&e.data?.data?.url){const n=e.data.data.url;t.success(n)}else t.error(e.data?.msg||"上传失败")}},dUe={uploadLimitSize:1024*20,async uploadOnUpload(t){const e=await it.uploadControllerVideo({video:t.file},{onUploadProgress(n){t.progress(n.total||0,n.loaded)}});if(console.log(e.data),e.data?.success&&e.data?.data?.url){const n=e.data.data.url;t.success(n)}else t.error(e.data?.msg||"上传失败")}},kJ=new DHe({async upload(t){const e=await it.uploadControllerImage({image:t});if(e.data?.success&&e.data?.data?.url)return e.data.data.url},abort(){}}),fUe=t=>Li({name:"文档库",...t,options:{width:900},create(e){e.add("title","标题",{required:!0}).addSelect("type","类型",[{label:"服务协议",value:1},{label:"隐私协议",value:2}],{required:!0}).addLineBreak().addDatetime("publishTime","发布时间",{required:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"}).addLineBreak().addRichText("content","内容",{richTextMinHeight:"300px",richTextMaxHeight:"400px",richTextUploadAdapter:kJ})}})(),hUe=async t=>(await it.generatedDocumentControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{order:[{publishTime:hK.Desc}],expression:{title:fK.Like}}})).data,mUe=async t=>t.id?(await it.generatedDocumentControllerUpdate({id:t.id},t)).data.success:(await it.generatedDocumentControllerCreate(t)).data.success,gUe=async t=>(await it.generatedDocumentControllerDelete({ids:t})).data.success,TJ=vn({meta:{title:"文档库管理",icon:"agreement",sort:96}}),pUe=le(()=>{const t=fUe({async onSubmit(n){const i=await mUe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:lUe({onClickCreate(){t.openCreate()}}),table:cUe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await gUe([String(n.id)])&&e.search?.onReset?.()}}),pagination:uUe(),onRequest:hUe});return()=>L(gi,{ctx:e},null)}),vUe=Object.freeze(Object.defineProperty({__proto__:null,default:pUe,meta:TJ},Symbol.toStringTag,{value:"Module"})),bUe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).add("name","分类名称",{labelWidth:"80"})})(),yUe=Ci(t=>{}),wUe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("name","分类名称").addColumn("sort","排序").addTagColumn("isShow","是否展示",{width:100,tagConfig:{statusMap:{0:{label:"否",type:"danger"},1:{label:"是",type:"success"}}}}).addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),_Ue=t=>Li({name:"资讯分类",...t,create(e){e.required("name","分类名称").add("sort","排序").addSelect("isShow","是否展示",[{label:"否",value:0},{label:"是",value:1}])}})(),CUe=async t=>(await it.generatedNewsCategoryControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{order:[{sort:uK.Desc}],expression:{name:pM.Like}}})).data,SUe=async t=>t.id?(await it.generatedNewsCategoryControllerUpdate({id:t.id},t)).data.success:(await it.generatedNewsCategoryControllerCreate(t)).data.success,kUe=async t=>(await it.generatedNewsCategoryControllerDelete({ids:t})).data.success,EJ=vn({meta:{title:"资讯分类",icon:"text-message",sort:100}}),TUe=le(()=>{const t=_Ue({async onSubmit(n){const i=await SUe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:bUe({onClickCreate(){t.openCreate()}}),table:wUe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await kUe([String(n.id)])&&e.search?.onReset?.()}}),pagination:yUe(),onRequest:CUe});return()=>L(gi,{ctx:e},null)}),EUe=Object.freeze(Object.defineProperty({__proto__:null,default:TUe,meta:EJ},Symbol.toStringTag,{value:"Module"})),xUe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).addSelect("type","类型",[{label:"图文",value:1},{label:"视频",value:2}],{labelWidth:"80",width:"150px"}).addSelect("isRecommended","是否推荐",[{label:"否",value:0},{label:"是",value:1}],{labelWidth:"90",width:"150px"}).addLineBreak().add("title","标题",{labelWidth:"80"}).addSelect("isHeadline","是否头条",[{label:"否",value:0},{label:"是",value:1}],{labelWidth:"90",width:"150px"}).addSelect("isShow","是否展示",[{label:"否",value:0},{label:"是",value:1}],{labelWidth:"90",width:"150px"})})(),AUe=Ci(t=>{}),PUe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("title","标题").addImageColumn("coverImage","封面图",{width:80}).addColumn("category.name","所属分类",{width:100}).addTagColumn("type","类型",{width:80,tagConfig:{statusMap:{1:{label:"图文",type:"primary"},2:{label:"视频",type:"warning"}}}}).addTagColumn("isRecommended","是否推荐",{width:100,tagConfig:{statusMap:{0:{label:"否",type:"danger"},1:{label:"是",type:"success"}}}}).addTagColumn("isHeadline","是否头条",{width:100,tagConfig:{statusMap:{0:{label:"否",type:"danger"},1:{label:"是",type:"success"}}}}).addTagColumn("isShow","是否展示",{width:100,tagConfig:{statusMap:{0:{label:"否",type:"danger"},1:{label:"是",type:"success"}}}}).addColumn("readCount","阅读数量",{width:100}).addTimeColumn("publishTime","发布时间").addActionColumn({...t})})(),IUe={async fetchOne(t){const e=await it.generatedNewsCategoryControllerDetail({id:t},{});return e.data.success&&e.data.data?{label:e.data.data.name,value:e.data.data.id}:null},async fetchOptions(t){return(await it.generatedNewsCategoryControllerList({where:{name:t},extra:{expression:{name:pM.Like}}})).data.data?.list.map(n=>({label:n.name,value:n.id}))||[]}},Or={required:{required:!0,message:"不能为空"},validate(t){return{validator:(e,n,i)=>{t(n,i)}}},number(t){return{validator:(n,i,r)=>{if(typeof i<"u"&&i!=""){if(t?.integer&&`${i}`.indexOf(".")>-1)return r(new Error("只能是整数"));if(i=Number(i),isNaN(i))return r(new Error("只能输入数字"));if(t?.unsigned&&i<0)return r(new Error("不能是负数"));if(typeof t?.min<"u"&&i<t.min)return r(new Error(`最小不能小于${t.min}`));if(typeof t?.max<"u"&&i>t.max)return r(new Error(`最多不能超过${t.max}`))}r()}}}},RUe=t=>Li({name:"资讯",...t,options:{width:900},create(e){e.addRemoteSelect("categoryId","所属分类",{...IUe,required:!0}).addSelect("type","资讯类型",[{label:"图文",value:1},{label:"视频",value:2}],{required:!0}).addLineBreak().required("title","标题",{required:!0}).required("readCount","阅读数",{rules:Or.number({unsigned:!0})}).addLineBreak().addUpload("coverImage","封面图",{required:!0,uploadAccept:["image/*"],...lv}).addUpload("video","视频",{uploadAccept:["video/*"],uploadListType:"text",...dUe,rules:[Or.validate((n,i)=>{if(e.getFormData().type==2&&!n){i(new Error("视频类型的资讯需要上传视频"));return}i()})]}).addLineBreak().addRichText("content","内容",{richTextMinHeight:"200px",richTextMaxHeight:"200px",richTextUploadAdapter:kJ}).addLineBreak().addDatetime("publishTime","发布时间",{required:!0,valueFormat:"YYYY-MM-DD HH:mm:ss"}).addSelect("isRecommended","是否推荐",[{label:"否",value:0},{label:"是",value:1}],{required:!0}).addSelect("isHeadline","是否头条",[{label:"否",value:0},{label:"是",value:1}],{required:!0}).addSelect("isShow","是否展示",[{label:"否",value:0},{label:"是",value:1}],{required:!0})}})(),MUe=async t=>(await it.generatedNewsControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{order:[{publishTime:dK.Desc}],relations:{category:!0},expression:{title:cK.Like}}})).data,OUe=async t=>t.id?(await it.generatedNewsControllerUpdate({id:t.id},t)).data.success:(await it.generatedNewsControllerCreate(t)).data.success,LUe=async t=>(await it.generatedNewsControllerDelete({ids:t})).data.success,xJ=vn({meta:{title:"资讯管理",icon:"jinritoutiao",sort:99}}),DUe=le(()=>{const t=RUe({async onSubmit(n){const i=await OUe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:xUe({onClickCreate(){t.openCreate()}}),table:PUe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await LUe([String(n.id)])&&e.search?.onReset?.()}}),pagination:AUe(),onRequest:MUe});return()=>L(gi,{ctx:e},null)}),NUe=Object.freeze(Object.defineProperty({__proto__:null,default:DUe,meta:xJ},Symbol.toStringTag,{value:"Module"})),AJ={async fetchOne(t){const e=await it.generatedUserControllerDetail({id:t},{});return e.data.success&&e.data.data?{label:e.data.data.phone,value:e.data.data.id}:null},async fetchOptions(t){return(await it.generatedUserControllerList({where:{phone:t},extra:{expression:{phone:iK.Like}}})).data.data?.list.map(n=>({label:n.phone,value:n.id}))||[]}},BUe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).add("userId","用户ID",{labelWidth:"80"}).add("title","标题",{labelWidth:"80"}).addSelect("isRead","阅读状态",[{label:"未读",value:0},{label:"已读",value:1}],{labelWidth:"80"})})(),VUe=Ci(t=>{}),FUe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addColumn("title","标题").addTagColumn("isRead","阅读状态",{width:100,tagConfig:{statusMap:{0:{label:"未读",type:"warning"},1:{label:"已读",type:"success"}}}}).addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),$Ue=t=>Li({name:"站内信",...t,create(e){e.addRemoteSelect("userId","所属用户",{required:!0,...AJ}).required("title","标题").addSelect("isRead","阅读状态",[{label:"未读",value:0},{label:"已读",value:1}],{required:!0}).addLineBreak().addTextarea("content","内容",{})}})(),zUe=async t=>(await it.generatedUserMessageControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,HUe=async t=>t.id?(await it.generatedUserMessageControllerUpdate({id:t.id},t)).data.success:(await it.generatedUserMessageControllerCreate(t)).data.success,UUe=async t=>(await it.generatedUserMessageControllerDelete({ids:t})).data.success,PJ=vn({meta:{title:"站内信管理",icon:"message-one",sort:97}}),WUe=le(()=>{const t=$Ue({async onSubmit(n){const i=await HUe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:BUe({onClickCreate(){t.openCreate()}}),table:FUe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await UUe([String(n.id)])&&e.search?.onReset?.()}}),pagination:VUe(),onRequest:zUe});return()=>L(gi,{ctx:e},null)}),qUe=Object.freeze(Object.defineProperty({__proto__:null,default:WUe,meta:PJ},Symbol.toStringTag,{value:"Module"})),IJ=vn({redirect:"/Mgmt/Content/News",meta:{title:"内容管理",icon:"doc-search",sort:5}}),jUe=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),KUe=Object.freeze(Object.defineProperty({__proto__:null,default:jUe,meta:IJ},Symbol.toStringTag,{value:"Module"})),GUe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"60"}).add("innerOrderNo","内部单号").add("thirdPartyOrderNo","第三方单号").addLineBreak().addSelect("channel","支付渠道",[{label:"微信",value:1},{label:"支付宝",value:2},{label:"云闪付",value:3},{label:"分享生活",value:4}],{labelWidth:"80"}).addSelect("status","状态",[{label:"待支付",value:0},{label:"支付成功",value:1},{label:"已关闭",value:3}],{labelWidth:"80"})})(),YUe=Ci(t=>{}),XUe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addTagColumn("channel","支付渠道",{width:100,tagConfig:{statusMap:{1:{label:"微信",type:"success"},2:{label:"支付宝",type:"primary"},3:{label:"云闪付",type:"warning"},4:{label:"分享生活",type:"info"}}}}).addCurrencyColumn("amount","充值金额",{width:100}).addCurrencyColumn("actualAmount","到账金额",{width:100}).addColumn("innerOrderNo","内部单号").addColumn("thirdPartyOrderNo","第三方单号").addTagColumn("status","状态",{width:100,tagConfig:{statusMap:{0:{label:"待支付",type:"warning"},1:{label:"支付成功",type:"success"},3:{label:"已关闭",type:"info"}}}}).addColumn("remark","备注",{width:150}).addTimeColumn("createTime","充值时间")})(),JUe=t=>Li({name:"充值记录",...t,create(e){e.add("userId","用户ID",{disabled:!0}).addSelect("channel","渠道",[{label:"微信",value:1},{label:"支付宝",value:2},{label:"云闪付",value:3},{label:"分享生活",value:4}]).add("amount","充值金额",{disabled:!0}).add("actualAmount","到账金额",{disabled:!0}).addSelect("status","状态",[{label:"待支付",value:0},{label:"支付成功",value:1},{label:"已关闭",value:3}]).add("innerOrderNo","内部单号",{disabled:!0}).add("thirdPartyOrderNo","第三方单号",{disabled:!0}).addTextarea("remark","备注")}})(),ZUe=async t=>(await it.generatedRechargeControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,QUe=async t=>t.id?(await it.generatedRechargeControllerUpdate({id:t.id},t)).data.success:!1,RJ=vn({meta:{title:"充值管理",icon:"wallet-klh353n7",sort:98}}),eWe=le(()=>{JUe({async onSubmit(e){const n=await QUe(e);return n&&t.search?.onReset?.(),n}});const t=pi({search:GUe(),table:XUe(),pagination:YUe(),onRequest:ZUe});return()=>L(gi,{ctx:t},null)}),tWe=Object.freeze(Object.defineProperty({__proto__:null,default:eWe,meta:RJ},Symbol.toStringTag,{value:"Module"})),nWe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"60"}).addSelect("type","类型",[{label:"充值",value:601},{label:"提现驳回",value:602},{label:"宣传金划转",value:603},{label:"理财产品收益",value:604},{label:"理财产品本金退回",value:605},{label:"提现",value:901},{label:"购买理财产品",value:902}],{labelWidth:"80"}).addLineBreak().addDateRange("createTime","创建时间",{type:"datetime-range",valueFormat:"YYYY-MM-DD HH:mm:ss"})})(),iWe=Ci(t=>{}),rWe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addTagColumn("type","类型",{width:120,tagConfig:{statusMap:{601:{label:"充值",type:"success"},602:{label:"提现驳回",type:"info"},603:{label:"宣传金划转",type:"primary"},604:{label:"理财产品收益",type:"success"},605:{label:"理财产品本金退回",type:"info"},901:{label:"提现",type:"warning"},902:{label:"购买理财产品",type:"danger"}}}}).addCurrencyColumn("amount","金额",{width:100}).addCurrencyColumn("before","动账前余额",{width:110}).addCurrencyColumn("after","动账后余额",{width:110}).addColumn("remark","备注").addTimeColumn("createTime","创建时间")})(),oWe=t=>Li({name:"钱包账单",...t,create(e){e.add("userId","用户ID",{disabled:!0}).add("type","类型",{disabled:!0}).add("amount","金额",{disabled:!0}).add("before","动账前余额",{disabled:!0}).add("after","动账后余额",{disabled:!0}).addTextarea("remark","备注")}})(),sWe=async t=>(await it.generatedWalletBillControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,aWe=async t=>t.id?(await it.generatedWalletBillControllerUpdate({id:t.id},t)).data.success:!1,MJ=vn({meta:{title:"账单管理",icon:"notepad",sort:99}}),lWe=le(()=>{oWe({async onSubmit(e){const n=await aWe(e);return n&&t.search?.onReset?.(),n}});const t=pi({search:nWe(),table:rWe(),pagination:iWe(),onRequest:sWe});return()=>L(gi,{ctx:t},null)}),uWe=Object.freeze(Object.defineProperty({__proto__:null,default:lWe,meta:MJ},Symbol.toStringTag,{value:"Module"})),cWe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"})})(),dWe=Ci(t=>{}),fWe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("user.id","用户ID",{width:120}).addColumn("user.phone","账号").addCurrencyColumn("balance","余额",{width:150}).addCurrencyColumn("frozenBalance","冻结金额",{width:150}).addCurrencyColumn("publicityFund","宣传金",{width:150}).addCurrencyColumn("financialProductEarnings","理财收益",{width:150}).addCurrencyColumn("totalRecharge","累计充值",{width:150}).addCurrencyColumn("totalWithdraw","累计提现",{width:150}).addTimeColumn("createTime","创建时间",{fixed:"right"})})(),hWe=t=>Li({name:"钱包",...t,create(e){e.add("userId","用户ID",{disabled:!0}).add("balance","余额",{disabled:!0}).add("frozenBalance","冻结金额",{disabled:!0}).add("publicityFund","宣传金",{disabled:!0})}})(),mWe=async t=>{const{page:e,size:n,data:i}=t,r={paginated:{page:e,size:n},where:i,extra:{relations:{user:!0},expression:{createTime:nK.Between}}};return(await it.generatedWalletControllerList(r)).data},gWe=async t=>t.id?(await it.generatedWalletControllerUpdate({id:t.id},t)).data.success:(await it.generatedWalletControllerCreate(t)).data.success,OJ=vn({meta:{title:"钱包管理",icon:"wallet",sort:100}}),pWe=le(()=>{hWe({async onSubmit(e){const n=await gWe(e);return n&&t.search?.onReset?.(),n}});const t=pi({search:cWe(),table:fWe(),pagination:dWe(),onRequest:mWe});return()=>L(gi,{ctx:t},null)}),vWe=Object.freeze(Object.defineProperty({__proto__:null,default:pWe,meta:OJ},Symbol.toStringTag,{value:"Module"})),bWe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"60"}).addSelect("status","审核状态",[{label:"审核中",value:0},{label:"提现成功",value:1},{label:"提现驳回",value:2}],{labelWidth:"80"})})(),yWe=Ci(t=>{}),wWe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:80}).addColumn("user.phone","账号").addCurrencyColumn("amount","提现金额",{width:100}).addCurrencyColumn("actualAmount","到账金额",{width:100}).addTagColumn("status","审核状态",{width:100,tagConfig:{statusMap:{0:{label:"审核中",type:"warning"},1:{label:"提现成功",type:"success"},2:{label:"提现驳回",type:"danger"}}}}).addColumn("userBankId","银行卡ID",{width:100}).addColumn("bankName","提现银行",{width:100}).addColumn("cardNo","银行卡号",{width:150}).addColumn("phone","预留电话",{width:150}).addColumn("rejectReason","驳回原因").addColumn("remark","备注").addTimeColumn("createTime","申请时间").addActionColumn({...t})})(),_We=t=>Li({name:"提现记录",...t,create(e){e.add("id","提现ID",{readonly:!0}).add("userId","用户ID",{readonly:!0}).add("amount","提现金额",{readonly:!0}).add("actualAmount","到账金额",{readonly:!0}).add("bankName","提现银行",{readonly:!0}).add("cardNo","银行卡号",{readonly:!0}).add("phone","预留电话",{readonly:!0}).addSelect("status","审核状态",[{label:"审核中",value:0},{label:"提现成功",value:1},{label:"提现驳回",value:2}]).addTextarea("rejectReason","驳回原因").addTextarea("remark","备注")}})(),CWe=async t=>(await it.generatedWithdrawControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,SWe=async t=>t.status?(await it.withdrawControllerReview({withdrawId:t.id,action:t.status,rejectReason:t.rejectReason,remark:t.remark})).data.success:(fl.showNotification("请选择审核状态"),!1),kWe=async t=>(await it.generatedWithdrawControllerDelete({ids:t})).data.success,LJ=vn({meta:{title:"提现管理",icon:"wallet-two",sort:97}}),TWe=le(()=>{const t=_We({async onSubmit(n){const i=await SWe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:bWe(),table:wWe({showDelete:!1,showEdit:!0,onEdit(n){t.openEdit(n)},async onDelete(n){await kWe([String(n.id)])&&e.search?.onReset?.()}}),pagination:yWe(),onRequest:CWe});return()=>L(gi,{ctx:e},null)}),EWe=Object.freeze(Object.defineProperty({__proto__:null,default:TWe,meta:LJ},Symbol.toStringTag,{value:"Module"})),DJ=vn({redirect:"/Mgmt/Finance/Wallet",meta:{title:"财务管理",icon:"bank",sort:999}});L("svg",{class:"iconpark-icon"},[L("use",{href:"#bank"},null)]);const xWe=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),AWe=Object.freeze(Object.defineProperty({__proto__:null,default:xWe,meta:DJ},Symbol.toStringTag,{value:"Module"})),PWe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).add("name","名称",{labelWidth:"80"})})(),IWe=Ci(t=>{}),RWe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("name","名称").addColumn("period","周期(天)",{width:200}).addCurrencyColumn("principal","本金",{width:200}).addColumn("yieldRate","收益率(%)",{width:200,formatter(n,i,r,o){return`${r*100}%`}}).addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),MWe=t=>Li({name:"理财产品",...t,create(e){e.required("name","名称").required("period","周期(天)").required("principal","本金").addDecimal("yieldRate","收益率(%)",{multiplier:100})}})(),OWe=async t=>(await it.generatedFinancialProductControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{expression:{name:mM.Like}}})).data,LWe=async t=>t.id?(await it.generatedFinancialProductControllerUpdate({id:t.id},{name:t.name,period:t.period,principal:t.principal,yieldRate:t.yieldRate})).data.success:(await it.generatedFinancialProductControllerCreate({name:t.name,period:t.period,principal:t.principal,yieldRate:t.yieldRate})).data.success,DWe=async t=>(await it.generatedFinancialProductControllerDelete({ids:t})).data.success,NJ=vn({meta:{title:"理财产品",icon:"ad-product",sort:100}}),NWe=le(()=>{const t=MWe({async onSubmit(n){const i=await LWe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:PWe({onClickCreate(){t.openCreate()}}),table:RWe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},onDelete(n){DWe([String(n.id)])}}),pagination:IWe(),onRequest:OWe});return()=>L(gi,{ctx:e},null)}),BWe=Object.freeze(Object.defineProperty({__proto__:null,default:NWe,meta:NJ},Symbol.toStringTag,{value:"Module"})),BJ={async fetchOne(t){const e=await it.generatedFinancialProductControllerDetail({id:t},{});return e.data.success&&e.data.data?{label:e.data.data.name,value:e.data.data.id}:null},async fetchOptions(t){return(await it.generatedFinancialProductControllerList({where:{name:t},extra:{expression:{name:mM.Like}}})).data.data?.list.map(n=>({label:n.name,value:n.id}))||[]}},VWe="_button_wrapper_i18pa_1",FWe={button_wrapper:VWe},VJ=vn({meta:{title:"赠送理财包",icon:"send",sort:1}}),$We=le(()=>{const t=H(!1),e=LO({labelWidth:"90px",showReset:!1,showSubmit:!1}).addRemoteSelect("userId","赠送用户",{...AJ,placeholder:"输入要赠送用户的手机号搜索",required:!0}).addRemoteSelect("financialProductId","理财产品",{...BJ,placeholder:"输入要赠送产品的名称号搜索",required:!0}).addSelect("isTeam","赠送类型",[{label:"单人(只赠送选中的用户自己)",value:0},{label:"团队(赠送选中用户的下级 + 自己)",value:1}],{required:!0}).build(),n=async()=>{if(!await e.validate())return;const i=e.getFormData();if(await fl.showConfirm(`确认向用户赠送理财包?${i.isTeam===1?"(包含团队)":""}`).catch(()=>!1)){t.value=!0;try{(await it.adminGiftControllerGiftProduct({userId:i.userId,financialProductId:i.financialProductId,isTeam:i.isTeam})).data.success&&(fl.showNotification("赠送成功"),e.resetForm())}finally{t.value=!1}}};return()=>L("div",{style:"padding: 20px;"},[L(aW,{header:"赠送理财包",style:"max-width: 500px;"},{default:()=>[L(RS,e,null),L("div",{class:FWe.button_wrapper},[L(Hi,{type:"primary",loading:t.value,onClick:n},{default:()=>[dt("确认赠送")]})])]})])}),zWe=Object.freeze(Object.defineProperty({__proto__:null,default:$We,meta:VJ},Symbol.toStringTag,{value:"Module"})),HWe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"}).add("name","名称",{labelWidth:"80"}).addLineBreak().addSelect("source","来源",[{label:"购买",value:1},{label:"获赠",value:2}],{labelWidth:"80"}).addDateRange("createTime","创建时间",{labelWidth:"100",type:"datetime-range",valueFormat:"YYYY-MM-DD HH:mm:ss"}).addLineBreak().addSelect("status","状态",[{label:"未付款",value:0},{label:"收益中",value:1},{label:"已到期",value:2}],{labelWidth:"80"}).addDateRange("expireTime","到期时间",{labelWidth:"100",type:"datetime-range"})})(),UWe=Ci(t=>{}),WWe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addColumn("name","名称").addCurrencyColumn("principal","本金",{width:100}).addColumn("yieldRate","收益率(%)",{width:100,formatter(n,i,r,o){return(r*100).toFixed(2)}}).addTagColumn("source","来源",{width:100,tagConfig:{statusMap:{1:{label:"购买",type:"primary"},2:{label:"获赠",type:"success"}}}}).addTagColumn("status","状态",{width:120,tagConfig:{statusMap:{0:{label:"未付款",type:"warning"},1:{label:"收益中",type:"success"},2:{label:"已到期",type:"info"}}}}).addTimeColumn("expireTime","到期时间").addTimeColumn("createTime","创建时间")})(),qWe=t=>Li({name:"理财订单",...t,create(e){e.add("userId","用户ID",{disabled:!0}).add("name","名称",{disabled:!0}).add("principal","本金",{disabled:!0}).add("yieldRate","收益率(%)",{disabled:!0}).addSelect("status","状态",[{label:"未付款",value:0},{label:"收益中",value:1},{label:"已到期",value:2}])}})(),jWe=async t=>(await it.generatedUserFinancialProductControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0},expression:{name:oK.Like,createTime:rK.Between,expireTime:sK.Between}}})).data,KWe=async t=>t.id?(await it.generatedUserFinancialProductControllerUpdate({id:t.id},{status:t.status})).data.success:!1,FJ=vn({meta:{title:"理财订单",icon:"bill",sort:2}}),GWe=le(()=>{qWe({async onSubmit(e){const n=await KWe(e);return n&&t.search?.onReset?.(),n}});const t=pi({search:HWe(),table:WWe(),pagination:UWe(),onRequest:jWe});return()=>L(gi,{ctx:t},null)}),YWe=Object.freeze(Object.defineProperty({__proto__:null,default:GWe,meta:FJ},Symbol.toStringTag,{value:"Module"})),$J=vn({redirect:"/Mgmt/Product/FinancialProduct",meta:{title:"产品管理",icon:"financing",sort:998}}),XWe=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),JWe=Object.freeze(Object.defineProperty({__proto__:null,default:XWe,meta:$J},Symbol.toStringTag,{value:"Module"})),ZWe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"}).addDateRange("signInDate","签到日期",{labelWidth:"100"})})(),QWe=Ci(t=>{}),eqe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addColumn("signInDate","签到日期",{width:120})})(),tqe=t=>Li({name:"签到日历",...t,create(e){e.add("userId","用户ID",{disabled:!0}).add("signInDate","签到日期",{disabled:!0})}})(),nqe=async t=>(await it.generatedUserSignInCalendarControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0},expression:{signInDate:lK.Between}}})).data,iqe=async t=>!1,zJ=vn({meta:{title:"签到记录管理",icon:"log",sort:98}}),rqe=le(()=>{tqe({async onSubmit(e){const n=await iqe();return n&&t.search?.onReset?.(),n}});const t=pi({search:ZWe(),table:eqe(),pagination:QWe(),onRequest:nqe});return()=>L(gi,{ctx:t},null)}),oqe=Object.freeze(Object.defineProperty({__proto__:null,default:rqe,meta:zJ},Symbol.toStringTag,{value:"Module"})),sqe={async fetchOne(t){const e=await it.generatedUserSignInTaskControllerDetail({id:t},{});return e.data.success&&e.data.data?{label:e.data.data.title,value:e.data.data.id}:null},async fetchOptions(t){return(await it.generatedUserSignInTaskControllerList({where:{title:t},extra:{expression:{title:gM.Like}}})).data.data?.list.map(n=>({label:n.title,value:n.id}))||[]}},aqe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"}).addRemoteSelect("userSignInTaskId","所属任务",sqe).addSelect("claimStatus","领取状态",[{label:"待领取",value:0},{label:"已领取",value:1}])})(),lqe=Ci(t=>{}),uqe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addColumn("userSignInTaskId","签到任务ID",{width:120}).addColumn("title","任务标题",{width:120}).addColumn("requiredDays","需要签到天数",{width:120}).addColumn("financialProductId","理财产品ID",{width:120}).addColumn("userFinancialProductId","理财订单ID",{width:150}).addColumn("userFinancialProduct.name","理财订单",{width:150}).addTagColumn("claimStatus","领取状态",{width:100,tagConfig:{statusMap:{0:{label:"待领取",type:"info"},1:{label:"已领取",type:"success"}}}}).addTimeColumn("createTime","完成时间")})(),cqe=t=>Li({name:"签到奖励",...t,create(e){e.add("userId","用户ID",{disabled:!0}).add("userSignInTaskId","签到任务ID",{disabled:!0}).add("title","任务标题",{disabled:!0}).add("subtitle","子标题",{disabled:!0}).add("requiredDays","需要签到天数",{disabled:!0}).add("financialProductId","理财产品ID",{disabled:!0}).add("icon","图标",{disabled:!0})}})(),dqe=async t=>(await it.generatedUserSignInTaskRewardControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0,userFinancialProduct:!0},expression:{title:aK.Like}}})).data,fqe=async t=>!1,HJ=vn({meta:{title:"用户签到奖励",icon:"data-arrival",sort:97}}),hqe=le(()=>{cqe({async onSubmit(e){const n=await fqe();return n&&t.search?.onReset?.(),n}});const t=pi({search:aqe(),table:uqe(),pagination:lqe(),onRequest:dqe});return()=>L(gi,{ctx:t},null)}),mqe=Object.freeze(Object.defineProperty({__proto__:null,default:hqe,meta:HJ},Symbol.toStringTag,{value:"Module"})),gqe=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).add("title","任务标题",{labelWidth:"80"})})(),pqe=Ci(t=>{}),vqe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("title","任务标题").addColumn("subtitle","子标题",{width:150}).addColumn("requiredDays","需要签到天数",{width:120}).addImageColumn("icon","图标",{width:80}).addColumn("financialProductId","奖励理财产品ID",{width:150}).addColumn("financialProduct.name","奖励理财产品名称",{width:150}).addColumn("financialProduct.period","奖励理财产品周期(天)",{width:170}).addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),bqe=t=>Li({name:"签到任务",...t,create(e){e.required("title","任务标题").required("subtitle","子标题").required("requiredDays","需要签到天数").addUpload("icon","图标",{required:!0,...lv}).addRemoteSelect("financialProductId","奖励理财产品",BJ)}})(),yqe=async t=>(await it.generatedUserSignInTaskControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{financialProduct:!0},expression:{title:gM.Like}}})).data,wqe=async t=>t.id?(await it.generatedUserSignInTaskControllerUpdate({id:t.id},{title:t.title,subtitle:t.subtitle,requiredDays:t.requiredDays,icon:t.icon,financialProductId:t.financialProductId})).data.success:(await it.generatedUserSignInTaskControllerCreate({title:t.title,subtitle:t.subtitle,requiredDays:t.requiredDays,icon:t.icon,financialProductId:t.financialProductId})).data.success,_qe=async t=>(await it.generatedUserSignInTaskControllerDelete({ids:t})).data.success,UJ=vn({meta:{title:"签到任务管理",icon:"list-two",sort:100}}),Cqe=le(()=>{const t=bqe({async onSubmit(n){const i=await wqe(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:gqe({onClickCreate(){t.openCreate()}}),table:vqe({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await _qe([String(n.id)])&&e.search?.onReset?.()}}),pagination:pqe(),onRequest:yqe});return()=>L(gi,{ctx:e},null)}),Sqe=Object.freeze(Object.defineProperty({__proto__:null,default:Cqe,meta:UJ},Symbol.toStringTag,{value:"Module"})),kqe=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"})})(),Tqe=Ci(t=>{}),Eqe=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("userId","用户ID",{width:100}).addColumn("user.phone","账号").addColumn("consecutiveDays","连续签到天数",{width:120}).addColumn("makeUpCount","补签数量",{width:100}).addColumn("usedMakeUpCount","已用补签",{width:120}).addColumn("maxMakeUpCount","最多可补签",{width:120}).addTimeColumn("createTime","创建时间")})(),xqe=t=>Li({name:"用户签到",...t,create(e){e.add("userId","用户ID",{disabled:!0}).add("consecutiveDays","连续签到天数",{disabled:!0}).add("makeUpCount","补签数量",{disabled:!0})}})(),Aqe=async t=>(await it.generatedUserSignInControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,Pqe=async t=>!1,WJ=vn({meta:{title:"用户签到管理",icon:"list",sort:99}}),Iqe=le(()=>{xqe({async onSubmit(e){const n=await Pqe();return n&&t.search?.onReset?.(),n}});const t=pi({search:kqe(),table:Eqe(),pagination:Tqe(),onRequest:Aqe});return()=>L(gi,{ctx:t},null)}),Rqe=Object.freeze(Object.defineProperty({__proto__:null,default:Iqe,meta:WJ},Symbol.toStringTag,{value:"Module"})),qJ=vn({redirect:"/Mgmt/SignIn/SignIn",meta:{title:"签到管理",icon:"calendar-three",sort:997}}),Mqe=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),Oqe=Object.freeze(Object.defineProperty({__proto__:null,default:Mqe,meta:qJ},Symbol.toStringTag,{value:"Module"}));var nP=function(t,e){return nP=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])},nP(t,e)};function yt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");nP(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var Lqe=(function(){function t(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return t})(),Dqe=(function(){function t(){this.browser=new Lqe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return t})(),Kt=new Dqe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Kt.wxa=!0,Kt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Kt.worker=!0:!Kt.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Kt.node=!0,Kt.svgSupported=!0):Nqe(navigator.userAgent,Kt);function Nqe(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),s=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]),r&&(n.ie=!0,n.version=r[1]),o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18),s&&(n.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11);var a=e.domSupported=typeof document<"u";if(a){var l=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in l||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}}var DO=12,Bqe="sans-serif",Dc=DO+"px "+Bqe,Vqe=20,Fqe=100,$qe="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function zqe(t){var e={};if(typeof JSON>"u")return e;for(var n=0;n<t.length;n++){var i=String.fromCharCode(n+32),r=(t.charCodeAt(n)-Vqe)/Fqe;e[i]=r}return e}var Hqe=zqe($qe),wu={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var t,e;return function(n,i){if(!t){var r=wu.createCanvas();t=r&&r.getContext("2d")}if(t)return e!==i&&(e=t.font=i||Dc),t.measureText(n);n=n||"",i=i||Dc;var o=/((?:\d+)?\.?\d*)px/.exec(i),s=o&&+o[1]||DO,a=0;if(i.indexOf("mono")>=0)a=s*n.length;else for(var l=0;l<n.length;l++){var u=Hqe[n[l]];a+=u==null?s:u*s}return{width:a}}})(),loadImage:function(t,e,n){var i=new Image;return i.onload=e,i.onerror=n,i.src=t,i}},jJ=Cg(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),KJ=Cg(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),b0=Object.prototype.toString,MS=Array.prototype,Uqe=MS.forEach,Wqe=MS.filter,NO=MS.slice,qqe=MS.map,U6=(function(){}).constructor,Ay=U6?U6.prototype:null,BO="__proto__",jqe=2311;function GJ(){return jqe++}function VO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];typeof console<"u"&&console.error.apply(console,t)}function wn(t){if(t==null||typeof t!="object")return t;var e=t,n=b0.call(t);if(n==="[object Array]"){if(!uv(t)){e=[];for(var i=0,r=t.length;i<r;i++)e[i]=wn(t[i])}}else if(KJ[n]){if(!uv(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(var i=0,r=t.length;i<r;i++)e[i]=t[i]}}}else if(!jJ[n]&&!uv(t)&&!vb(t)){e={};for(var s in t)t.hasOwnProperty(s)&&s!==BO&&(e[s]=wn(t[s]))}return e}function Yn(t,e,n){if(!Rt(e)||!Rt(t))return n?wn(e):t;for(var i in e)if(e.hasOwnProperty(i)&&i!==BO){var r=t[i],o=e[i];Rt(o)&&Rt(r)&&!bt(o)&&!bt(r)&&!vb(o)&&!vb(r)&&!W6(o)&&!W6(r)&&!uv(o)&&!uv(r)?Yn(r,o,n):(n||!(i in t))&&(t[i]=wn(e[i]))}return t}function lt(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==BO&&(t[n]=e[n]);return t}function Xn(t,e,n){for(var i=hi(e),r=0,o=i.length;r<o;r++){var s=i[r];t[s]==null&&(t[s]=e[s])}return t}function Dn(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1}function Kqe(t,e){var n=t.prototype;function i(){}i.prototype=e.prototype,t.prototype=new i;for(var r in n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);t.prototype.constructor=t,t.superClass=e}function kl(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),r=0;r<i.length;r++){var o=i[r];o!=="constructor"&&t[o]==null&&(t[o]=e[o])}else Xn(t,e)}function Vo(t){return!t||typeof t=="string"?!1:typeof t.length=="number"}function ue(t,e,n){if(t&&e)if(t.forEach&&t.forEach===Uqe)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(n,t[o],o,t)}function jt(t,e,n){if(!t)return[];if(!e)return FO(t);if(t.map&&t.map===qqe)return t.map(e,n);for(var i=[],r=0,o=t.length;r<o;r++)i.push(e.call(n,t[r],r,t));return i}function Cg(t,e,n,i){if(t&&e){for(var r=0,o=t.length;r<o;r++)n=e.call(i,n,t[r],r,t);return n}}function gr(t,e,n){if(!t)return[];if(!e)return FO(t);if(t.filter&&t.filter===Wqe)return t.filter(e,n);for(var i=[],r=0,o=t.length;r<o;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}function Gqe(t,e,n){if(t&&e){for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]}}function hi(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}function Yqe(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(NO.call(arguments)))}}var ii=Ay&&Xt(Ay.bind)?Ay.call.bind(Ay.bind):Yqe;function Ls(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(NO.call(arguments)))}}function bt(t){return Array.isArray?Array.isArray(t):b0.call(t)==="[object Array]"}function Xt(t){return typeof t=="function"}function At(t){return typeof t=="string"}function iP(t){return b0.call(t)==="[object String]"}function ai(t){return typeof t=="number"}function Rt(t){var e=typeof t;return e==="function"||!!t&&e==="object"}function W6(t){return!!jJ[b0.call(t)]}function Fo(t){return!!KJ[b0.call(t)]}function vb(t){return typeof t=="object"&&typeof t.nodeType=="number"&&typeof t.ownerDocument=="object"}function OS(t){return t.colorStops!=null}function Xqe(t){return t.image!=null}function bb(t){return t!==t}function E1(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(t[n]!=null)return t[n]}function Ut(t,e){return t??e}function bm(t,e,n){return t??e??n}function FO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return NO.apply(t,e)}function $O(t){if(typeof t=="number")return[t,t,t,t];var e=t.length;return e===2?[t[0],t[1],t[0],t[1]]:e===3?[t[0],t[1],t[2],t[1]]:t}function _u(t,e){if(!t)throw new Error(e)}function Ka(t){return t==null?null:typeof t.trim=="function"?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var YJ="__ec_primitive__";function rP(t){t[YJ]=!0}function uv(t){return t[YJ]}var Jqe=(function(){function t(){this.data={}}return t.prototype.delete=function(e){var n=this.has(e);return n&&delete this.data[e],n},t.prototype.has=function(e){return this.data.hasOwnProperty(e)},t.prototype.get=function(e){return this.data[e]},t.prototype.set=function(e,n){return this.data[e]=n,this},t.prototype.keys=function(){return hi(this.data)},t.prototype.forEach=function(e){var n=this.data;for(var i in n)n.hasOwnProperty(i)&&e(n[i],i)},t})(),XJ=typeof Map=="function";function Zqe(){return XJ?new Map:new Jqe}var Qqe=(function(){function t(e){var n=bt(e);this.data=Zqe();var i=this;e instanceof t?e.each(r):e&&ue(e,r);function r(o,s){n?i.set(o,s):i.set(s,o)}}return t.prototype.hasKey=function(e){return this.data.has(e)},t.prototype.get=function(e){return this.data.get(e)},t.prototype.set=function(e,n){return this.data.set(e,n),n},t.prototype.each=function(e,n){this.data.forEach(function(i,r){e.call(n,i,r)})},t.prototype.keys=function(){var e=this.data.keys();return XJ?Array.from(e):e},t.prototype.removeKey=function(e){this.data.delete(e)},t})();function cn(t){return new Qqe(t)}function eje(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var r=t.length,i=0;i<e.length;i++)n[i+r]=e[i];return n}function LS(t,e){var n;if(Object.create)n=Object.create(t);else{var i=function(){};i.prototype=t,n=new i}return e&&lt(n,e),n}function JJ(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function el(t,e){return t.hasOwnProperty(e)}function Mo(){}var tje=180/Math.PI;function Sg(t,e){return t==null&&(t=0),e==null&&(e=0),[t,e]}function nje(t){return[t[0],t[1]]}function q6(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function ije(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function rje(t){return Math.sqrt(oje(t))}function oje(t){return t[0]*t[0]+t[1]*t[1]}function SE(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function sje(t,e){var n=rje(e);return n===0?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function oP(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var aje=oP;function lje(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var ym=lje;function Ds(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t}function Yh(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Xh(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var ph=(function(){function t(e,n){this.target=e,this.topTarget=n&&n.topTarget}return t})(),uje=(function(){function t(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(e){for(var n=e.target;n&&!n.draggable;)n=n.parent||n.__hostTarget;n&&(this._draggingTarget=n,n.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new ph(n,e),"dragstart",e.event))},t.prototype._drag=function(e){var n=this._draggingTarget;if(n){var i=e.offsetX,r=e.offsetY,o=i-this._x,s=r-this._y;this._x=i,this._y=r,n.drift(o,s,e),this.handler.dispatchToElement(new ph(n,e),"drag",e.event);var a=this.handler.findHover(i,r,n).target,l=this._dropTarget;this._dropTarget=a,n!==a&&(l&&a!==l&&this.handler.dispatchToElement(new ph(l,e),"dragleave",e.event),a&&a!==l&&this.handler.dispatchToElement(new ph(a,e),"dragenter",e.event))}},t.prototype._dragEnd=function(e){var n=this._draggingTarget;n&&(n.dragging=!1),this.handler.dispatchToElement(new ph(n,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new ph(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},t})(),Tl=(function(){function t(e){e&&(this._$eventProcessor=e)}return t.prototype.on=function(e,n,i,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if(typeof n=="function"&&(r=i,i=n,n=null),!i||!e)return this;var s=this._$eventProcessor;n!=null&&s&&s.normalizeQuery&&(n=s.normalizeQuery(n)),o[e]||(o[e]=[]);for(var a=0;a<o[e].length;a++)if(o[e][a].h===i)return this;var l={h:i,query:n,ctx:r||this,callAtLast:i.zrEventfulCallAtLast},u=o[e].length-1,c=o[e][u];return c&&c.callAtLast?o[e].splice(u,0,l):o[e].push(l),this},t.prototype.isSilent=function(e){var n=this._$handlers;return!n||!n[e]||!n[e].length},t.prototype.off=function(e,n){var i=this._$handlers;if(!i)return this;if(!e)return this._$handlers={},this;if(n){if(i[e]){for(var r=[],o=0,s=i[e].length;o<s;o++)i[e][o].h!==n&&r.push(i[e][o]);i[e]=r}i[e]&&i[e].length===0&&delete i[e]}else delete i[e];return this},t.prototype.trigger=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[e],o=this._$eventProcessor;if(r)for(var s=n.length,a=r.length,l=0;l<a;l++){var u=r[l];if(!(o&&o.filter&&u.query!=null&&!o.filter(e,u.query)))switch(s){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,n[0]);break;case 2:u.h.call(u.ctx,n[0],n[1]);break;default:u.h.apply(u.ctx,n);break}}return o&&o.afterTrigger&&o.afterTrigger(e),this},t.prototype.triggerWithContext=function(e){for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];if(!this._$handlers)return this;var r=this._$handlers[e],o=this._$eventProcessor;if(r)for(var s=n.length,a=n[s-1],l=r.length,u=0;u<l;u++){var c=r[u];if(!(o&&o.filter&&c.query!=null&&!o.filter(e,c.query)))switch(s){case 0:c.h.call(a);break;case 1:c.h.call(a,n[0]);break;case 2:c.h.call(a,n[0],n[1]);break;default:c.h.apply(a,n.slice(1,s-1));break}}return o&&o.afterTrigger&&o.afterTrigger(e),this},t})(),cje=Math.log(2);function sP(t,e,n,i,r,o){var s=i+"-"+r,a=t.length;if(o.hasOwnProperty(s))return o[s];if(e===1){var l=Math.round(Math.log((1<<a)-1&~r)/cje);return t[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var d=0,f=0,h=0;f<a;f++){var m=1<<f;m&r||(d+=(h%2?-1:1)*t[n][f]*sP(t,e-1,c,u,r|m,o),h++)}return o[s]=d,d}function j6(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},r=sP(n,8,0,0,0,i);if(r!==0){for(var o=[],s=0;s<8;s++)for(var a=0;a<8;a++)o[a]==null&&(o[a]=0),o[a]+=((s+a)%2?-1:1)*sP(n,7,s===0?1:0,1<<s,1<<a,i)/r*e[s];return function(l,u,c){var d=u*o[6]+c*o[7]+1;l[0]=(u*o[0]+c*o[1]+o[2])/d,l[1]=(u*o[3]+c*o[4]+o[5])/d}}}var x1="___zrEVENTSAVED",kE=[];function dje(t,e,n,i,r){return aP(kE,e,i,r,!0)&&aP(t,n,kE[0],kE[1])}function fje(t,e){t&&n(t),e&&n(e);function n(i){var r=i[x1];r&&(r.clearMarkers&&r.clearMarkers(),delete i[x1])}}function aP(t,e,n,i,r){if(e.getBoundingClientRect&&Kt.domSupported&&!ZJ(e)){var o=e[x1]||(e[x1]={}),s=hje(e,o),a=mje(s,o,r);if(a)return a(t,n,i),!0}return!1}function hje(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],r=["top","bottom"],o=0;o<4;o++){var s=document.createElement("div"),a=s.style,l=o%2,u=(o>>1)%2;a.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(s),n.push(s)}return e.clearMarkers=function(){ue(n,function(c){c.parentNode&&c.parentNode.removeChild(c)})},n}function mje(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,s=[],a=[],l=!0,u=0;u<4;u++){var c=t[u].getBoundingClientRect(),d=2*u,f=c.left,h=c.top;s.push(f,h),l=l&&o&&f===o[d]&&h===o[d+1],a.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=s,e[i]=n?j6(a,s):j6(s,a))}function ZJ(t){return t.nodeName.toUpperCase()==="CANVAS"}var gje=/([&<>"'])/g,pje={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function yo(t){return t==null?"":(t+"").replace(gje,function(e,n){return pje[n]})}var vje=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,TE=[],bje=Kt.browser.firefox&&+Kt.browser.version.split(".")[0]<39;function lP(t,e,n,i){return n=n||{},i?K6(t,e,n):bje&&e.layerX!=null&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):e.offsetX!=null?(n.zrX=e.offsetX,n.zrY=e.offsetY):K6(t,e,n),n}function K6(t,e,n){if(Kt.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(ZJ(t)){var o=t.getBoundingClientRect();n.zrX=i-o.left,n.zrY=r-o.top;return}else if(aP(TE,t,i,r)){n.zrX=TE[0],n.zrY=TE[1];return}}n.zrX=n.zrY=0}function zO(t){return t||window.event}function _s(t,e,n){if(e=zO(e),e.zrX!=null)return e;var i=e.type,r=i&&i.indexOf("touch")>=0;if(r){var s=i!=="touchend"?e.targetTouches[0]:e.changedTouches[0];s&&lP(t,s,e,n)}else{lP(t,e,e,n);var o=yje(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return e.which==null&&a!==void 0&&vje.test(e.type)&&(e.which=a&1?1:a&2?3:a&4?2:0),e}function yje(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(n==null||i==null)return e;var r=Math.abs(i!==0?i:n),o=i>0?-1:i<0?1:n>0?-1:1;return 3*r*o}function wje(t,e,n,i){t.addEventListener(e,n,i)}function _je(t,e,n,i){t.removeEventListener(e,n,i)}var QJ=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},Cje=(function(){function t(){this._track=[]}return t.prototype.recognize=function(e,n,i){return this._doTrack(e,n,i),this._recognize(e)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(e,n,i){var r=e.touches;if(r){for(var o={points:[],touches:[],target:n,event:e},s=0,a=r.length;s<a;s++){var l=r[s],u=lP(i,l,{});o.points.push([u.zrX,u.zrY]),o.touches.push(l)}this._track.push(o)}},t.prototype._recognize=function(e){for(var n in EE)if(EE.hasOwnProperty(n)){var i=EE[n](this._track,e);if(i)return i}},t})();function G6(t){var e=t[1][0]-t[0][0],n=t[1][1]-t[0][1];return Math.sqrt(e*e+n*n)}function Sje(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var EE={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,r=(t[n-2]||{}).points||i;if(r&&r.length>1&&i&&i.length>1){var o=G6(i)/G6(r);!isFinite(o)&&(o=1),e.pinchScale=o;var s=Sje(i);return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function uu(){return[1,0,0,1,0,0]}function HO(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function eZ(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function cv(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],s=e[1]*n[2]+e[3]*n[3],a=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t}function uP(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function UO(t,e,n,i){i===void 0&&(i=[0,0]);var r=e[0],o=e[2],s=e[4],a=e[1],l=e[3],u=e[5],c=Math.sin(n),d=Math.cos(n);return t[0]=r*d+a*c,t[1]=-r*c+a*d,t[2]=o*d+l*c,t[3]=-o*c+d*l,t[4]=d*(s-i[0])+c*(u-i[1])+i[0],t[5]=d*(u-i[1])-c*(s-i[0])+i[1],t}function kje(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function y0(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],s=e[3],a=e[5],l=n*s-o*i;return l?(l=1/l,t[0]=s*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*a-s*r)*l,t[5]=(o*r-n*a)*l,t):null}var qn=(function(){function t(e,n){this.x=e||0,this.y=n||0}return t.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(e,n){return this.x=e,this.y=n,this},t.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},t.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},t.prototype.scale=function(e){this.x*=e,this.y*=e},t.prototype.scaleAndAdd=function(e,n){this.x+=e.x*n,this.y+=e.y*n},t.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},t.prototype.dot=function(e){return this.x*e.x+this.y*e.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},t.prototype.distance=function(e){var n=this.x-e.x,i=this.y-e.y;return Math.sqrt(n*n+i*i)},t.prototype.distanceSquare=function(e){var n=this.x-e.x,i=this.y-e.y;return n*n+i*i},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(e){if(e){var n=this.x,i=this.y;return this.x=e[0]*n+e[2]*i+e[4],this.y=e[1]*n+e[3]*i+e[5],this}},t.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},t.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},t.set=function(e,n,i){e.x=n,e.y=i},t.copy=function(e,n){e.x=n.x,e.y=n.y},t.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},t.lenSquare=function(e){return e.x*e.x+e.y*e.y},t.dot=function(e,n){return e.x*n.x+e.y*n.y},t.add=function(e,n,i){e.x=n.x+i.x,e.y=n.y+i.y},t.sub=function(e,n,i){e.x=n.x-i.x,e.y=n.y-i.y},t.scale=function(e,n,i){e.x=n.x*i,e.y=n.y*i},t.scaleAndAdd=function(e,n,i,r){e.x=n.x+i.x*r,e.y=n.y+i.y*r},t.lerp=function(e,n,i,r){var o=1-r;e.x=o*n.x+r*i.x,e.y=o*n.y+r*i.y},t})(),Jd=Math.min,Jh=Math.max,cP=Math.abs,Y6=["x","y"],Tje=["width","height"],dd=new qn,fd=new qn,hd=new qn,md=new qn,Yo=tZ(),Sp=Yo.minTv,dP=Yo.maxTv,dv=[0,0],nn=(function(){function t(e,n,i,r){t.set(this,e,n,i,r)}return t.set=function(e,n,i,r,o){return r<0&&(n=n+r,r=-r),o<0&&(i=i+o,o=-o),e.x=n,e.y=i,e.width=r,e.height=o,e},t.prototype.union=function(e){var n=Jd(e.x,this.x),i=Jd(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Jh(e.x+e.width,this.x+this.width)-n:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Jh(e.y+e.height,this.y+this.height)-i:this.height=e.height,this.x=n,this.y=i},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(e){var n=this,i=e.width/n.width,r=e.height/n.height,o=uu();return uP(o,o,[-n.x,-n.y]),kje(o,o,[i,r]),uP(o,o,[e.x,e.y]),o},t.prototype.intersect=function(e,n,i){return t.intersect(this,e,n,i)},t.intersect=function(e,n,i,r){i&&qn.set(i,0,0);var o=r&&r.outIntersectRect||null,s=r&&r.clamp;if(o&&(o.x=o.y=o.width=o.height=NaN),!e||!n)return!1;e instanceof t||(e=t.set(Eje,e.x,e.y,e.width,e.height)),n instanceof t||(n=t.set(xje,n.x,n.y,n.width,n.height));var a=!!i;Yo.reset(r,a);var l=Yo.touchThreshold,u=e.x+l,c=e.x+e.width-l,d=e.y+l,f=e.y+e.height-l,h=n.x+l,m=n.x+n.width-l,g=n.y+l,v=n.y+n.height-l;if(u>c||d>f||h>m||g>v)return!1;var p=!(c<h||m<u||f<g||v<d);return(a||o)&&(dv[0]=1/0,dv[1]=0,X6(u,c,h,m,0,a,o,s),X6(d,f,g,v,1,a,o,s),a&&qn.copy(i,p?Yo.useDir?Yo.dirMinTv:Sp:dP)),p},t.contain=function(e,n,i){return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height},t.prototype.contain=function(e,n){return t.contain(this,e,n)},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return this.width===0||this.height===0},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(e,n){return e.x=n.x,e.y=n.y,e.width=n.width,e.height=n.height,e},t.applyTransform=function(e,n,i){if(!i){e!==n&&t.copy(e,n);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],s=i[4],a=i[5];e.x=n.x*r+s,e.y=n.y*o+a,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}dd.x=hd.x=n.x,dd.y=md.y=n.y,fd.x=md.x=n.x+n.width,fd.y=hd.y=n.y+n.height,dd.transform(i),md.transform(i),fd.transform(i),hd.transform(i),e.x=Jd(dd.x,fd.x,hd.x,md.x),e.y=Jd(dd.y,fd.y,hd.y,md.y);var l=Jh(dd.x,fd.x,hd.x,md.x),u=Jh(dd.y,fd.y,hd.y,md.y);e.width=l-e.x,e.height=u-e.y},t})(),Eje=new nn(0,0,0,0),xje=new nn(0,0,0,0);function X6(t,e,n,i,r,o,s,a){var l=cP(e-n),u=cP(i-t),c=Jd(l,u),d=Y6[r],f=Y6[1-r],h=Tje[r];e<n||i<t?l<u?(o&&(dP[d]=-l),a&&(s[d]=e,s[h]=0)):(o&&(dP[d]=u),a&&(s[d]=t,s[h]=0)):(s&&(s[d]=Jh(t,n),s[h]=Jd(e,i)-s[d]),o&&(c<dv[0]||Yo.useDir)&&(dv[0]=Jd(c,dv[0]),(l<u||!Yo.bidirectional)&&(Sp[d]=l,Sp[f]=0,Yo.useDir&&Yo.calcDirMTV()),(l>=u||!Yo.bidirectional)&&(Sp[d]=-u,Sp[f]=0,Yo.useDir&&Yo.calcDirMTV())))}function tZ(){var t=0,e=new qn,n=new qn,i={minTv:new qn,maxTv:new qn,useDir:!1,dirMinTv:new qn,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(o,s){i.touchThreshold=0,o&&o.touchThreshold!=null&&(i.touchThreshold=Jh(0,o.touchThreshold)),i.negativeSize=!1,s&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,o&&o.direction!=null&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),n.copy(i.minTv),t=o.direction,i.bidirectional=o.bidirectional==null||!!o.bidirectional,i.bidirectional||e.set(Math.cos(t),Math.sin(t))))},calcDirMTV:function(){var o=i.minTv,s=i.dirMinTv,a=o.y*o.y+o.x*o.x,l=Math.sin(t),u=Math.cos(t),c=l*o.y+u*o.x;if(r(c)){r(o.x)&&r(o.y)&&s.set(0,0);return}if(n.x=a*u/c,n.y=a*l/c,r(n.x)&&r(n.y)){s.set(0,0);return}(i.bidirectional||e.dot(n)>0)&&n.len()<s.len()&&s.copy(n)}};function r(o){return cP(o)<1e-10}return i}var nZ="silent";function Aje(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Pje}}function Pje(){QJ(this.event)}var Ije=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.handler=null,n}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(Tl),Qg=(function(){function t(e,n){this.x=e,this.y=n}return t})(),Rje=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],xE=new nn(0,0,0,0),iZ=(function(t){yt(e,t);function e(n,i,r,o,s){var a=t.call(this)||this;return a._hovered=new Qg(0,0),a.storage=n,a.painter=i,a.painterRoot=o,a._pointerSize=s,r=r||new Ije,a.proxy=null,a.setHandlerProxy(r),a._draggingMgr=new uje(a),a}return e.prototype.setHandlerProxy=function(n){this.proxy&&this.proxy.dispose(),n&&(ue(Rje,function(i){n.on&&n.on(i,this[i],this)},this),n.handler=this),this.proxy=n},e.prototype.mousemove=function(n){var i=n.zrX,r=n.zrY,o=rZ(this,i,r),s=this._hovered,a=s.target;a&&!a.__zr&&(s=this.findHover(s.x,s.y),a=s.target);var l=this._hovered=o?new Qg(i,r):this.findHover(i,r),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),a&&u!==a&&this.dispatchToElement(s,"mouseout",n),this.dispatchToElement(l,"mousemove",n),u&&u!==a&&this.dispatchToElement(l,"mouseover",n)},e.prototype.mouseout=function(n){var i=n.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",n),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:n})},e.prototype.resize=function(){this._hovered=new Qg(0,0)},e.prototype.dispatch=function(n,i){var r=this[n];r&&r.call(this,i)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(n){var i=this.proxy;i.setCursor&&i.setCursor(n)},e.prototype.dispatchToElement=function(n,i,r){n=n||{};var o=n.target;if(!(o&&o.silent)){for(var s="on"+i,a=Aje(i,n,r);o&&(o[s]&&(a.cancelBubble=!!o[s].call(o,a)),o.trigger(i,a),o=o.__hostTarget?o.__hostTarget:o.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(i,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[s]=="function"&&l[s].call(l,a),l.trigger&&l.trigger(i,a)}))}},e.prototype.findHover=function(n,i,r){var o=this.storage.getDisplayList(),s=new Qg(n,i);if(J6(o,s,n,i,r),this._pointerSize&&!s.target){for(var a=[],l=this._pointerSize,u=l/2,c=new nn(n-u,i-u,l,l),d=o.length-1;d>=0;d--){var f=o[d];f!==r&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(xE.copy(f.getBoundingRect()),f.transform&&xE.applyTransform(f.transform),xE.intersect(c)&&a.push(f))}if(a.length)for(var h=4,m=Math.PI/12,g=Math.PI*2,v=0;v<u;v+=h)for(var p=0;p<g;p+=m){var b=n+v*Math.cos(p),y=i+v*Math.sin(p);if(J6(a,s,b,y,r),s.target)return s}}return s},e.prototype.processGesture=function(n,i){this._gestureMgr||(this._gestureMgr=new Cje);var r=this._gestureMgr;i==="start"&&r.clear();var o=r.recognize(n,this.findHover(n.zrX,n.zrY,null).target,this.proxy.dom);if(i==="end"&&r.clear(),o){var s=o.type;n.gestureEvent=s;var a=new Qg;a.target=o.target,this.dispatchToElement(a,s,o.event)}},e})(Tl);ue(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){iZ.prototype[t]=function(e){var n=e.zrX,i=e.zrY,r=rZ(this,n,i),o,s;if((t!=="mouseup"||!r)&&(o=this.findHover(n,i),s=o.target),t==="mousedown")this._downEl=s,this._downPoint=[e.zrX,e.zrY],this._upEl=s;else if(t==="mouseup")this._upEl=s;else if(t==="click"){if(this._downEl!==this._upEl||!this._downPoint||aje(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(o,t,e)}});function Mje(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var s=i.getClipPath();if(s&&!s.contain(e,n))return!1}i.silent&&(r=!0);var a=i.__hostTarget;i=a?i.ignoreHostSilent?null:a:i.parent}return r?nZ:!0}return!1}function J6(t,e,n,i,r){for(var o=t.length-1;o>=0;o--){var s=t[o],a=void 0;if(s!==r&&!s.ignore&&(a=Mje(s,n,i))&&(!e.topTarget&&(e.topTarget=s),a!==nZ)){e.target=s;break}}}function rZ(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}var oZ=32,ep=7;function Oje(t){for(var e=0;t>=oZ;)e|=t&1,t>>=1;return t+e}function Z6(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r<n&&i(t[r],t[r-1])<0;)r++;Lje(t,e,r)}else for(;r<n&&i(t[r],t[r-1])>=0;)r++;return r-e}function Lje(t,e,n){for(n--;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}function Q6(t,e,n,i,r){for(i===e&&i++;i<n;i++){for(var o=t[i],s=e,a=i,l;s<a;)l=s+a>>>1,r(o,t[l])<0?a=l:s=l+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=o}}function AE(t,e,n,i,r,o){var s=0,a=0,l=1;if(o(t,e[n+r])>0){for(a=i-r;l<a&&o(t,e[n+r+l])>0;)s=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a),s+=r,l+=r}else{for(a=r+1;l<a&&o(t,e[n+r-l])<=0;)s=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a);var u=s;s=r-l,l=r-u}for(s++;s<l;){var c=s+(l-s>>>1);o(t,e[n+c])>0?s=c+1:l=c}return l}function PE(t,e,n,i,r,o){var s=0,a=0,l=1;if(o(t,e[n+r])<0){for(a=r+1;l<a&&o(t,e[n+r-l])<0;)s=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a);var u=s;s=r-l,l=r-u}else{for(a=i-r;l<a&&o(t,e[n+r+l])>=0;)s=l,l=(l<<1)+1,l<=0&&(l=a);l>a&&(l=a),s+=r,l+=r}for(s++;s<l;){var c=s+(l-s>>>1);o(t,e[n+c])<0?l=c:s=c+1}return l}function Dje(t,e){var n=ep,i,r,o=0,s=[];i=[],r=[];function a(h,m){i[o]=h,r[o]=m,o+=1}function l(){for(;o>1;){var h=o-2;if(h>=1&&r[h-1]<=r[h]+r[h+1]||h>=2&&r[h-2]<=r[h]+r[h-1])r[h-1]<r[h+1]&&h--;else if(r[h]>r[h+1])break;c(h)}}function u(){for(;o>1;){var h=o-2;h>0&&r[h-1]<r[h+1]&&h--,c(h)}}function c(h){var m=i[h],g=r[h],v=i[h+1],p=r[h+1];r[h]=g+p,h===o-3&&(i[h+1]=i[h+2],r[h+1]=r[h+2]),o--;var b=PE(t[v],t,m,g,0,e);m+=b,g-=b,g!==0&&(p=AE(t[m+g-1],t,v,p,p-1,e),p!==0&&(g<=p?d(m,g,v,p):f(m,g,v,p)))}function d(h,m,g,v){var p=0;for(p=0;p<m;p++)s[p]=t[h+p];var b=0,y=g,_=h;if(t[_++]=t[y++],--v===0){for(p=0;p<m;p++)t[_+p]=s[b+p];return}if(m===1){for(p=0;p<v;p++)t[_+p]=t[y+p];t[_+v]=s[b];return}for(var C=n,S,k,T;;){S=0,k=0,T=!1;do if(e(t[y],s[b])<0){if(t[_++]=t[y++],k++,S=0,--v===0){T=!0;break}}else if(t[_++]=s[b++],S++,k=0,--m===1){T=!0;break}while((S|k)<C);if(T)break;do{if(S=PE(t[y],s,b,m,0,e),S!==0){for(p=0;p<S;p++)t[_+p]=s[b+p];if(_+=S,b+=S,m-=S,m<=1){T=!0;break}}if(t[_++]=t[y++],--v===0){T=!0;break}if(k=AE(s[b],t,y,v,0,e),k!==0){for(p=0;p<k;p++)t[_+p]=t[y+p];if(_+=k,y+=k,v-=k,v===0){T=!0;break}}if(t[_++]=s[b++],--m===1){T=!0;break}C--}while(S>=ep||k>=ep);if(T)break;C<0&&(C=0),C+=2}if(n=C,n<1&&(n=1),m===1){for(p=0;p<v;p++)t[_+p]=t[y+p];t[_+v]=s[b]}else{if(m===0)throw new Error;for(p=0;p<m;p++)t[_+p]=s[b+p]}}function f(h,m,g,v){var p=0;for(p=0;p<v;p++)s[p]=t[g+p];var b=h+m-1,y=v-1,_=g+v-1,C=0,S=0;if(t[_--]=t[b--],--m===0){for(C=_-(v-1),p=0;p<v;p++)t[C+p]=s[p];return}if(v===1){for(_-=m,b-=m,S=_+1,C=b+1,p=m-1;p>=0;p--)t[S+p]=t[C+p];t[_]=s[y];return}for(var k=n;;){var T=0,E=0,x=!1;do if(e(s[y],t[b])<0){if(t[_--]=t[b--],T++,E=0,--m===0){x=!0;break}}else if(t[_--]=s[y--],E++,T=0,--v===1){x=!0;break}while((T|E)<k);if(x)break;do{if(T=m-PE(s[y],t,h,m,m-1,e),T!==0){for(_-=T,b-=T,m-=T,S=_+1,C=b+1,p=T-1;p>=0;p--)t[S+p]=t[C+p];if(m===0){x=!0;break}}if(t[_--]=s[y--],--v===1){x=!0;break}if(E=v-AE(t[b],s,0,v,v-1,e),E!==0){for(_-=E,y-=E,v-=E,S=_+1,C=y+1,p=0;p<E;p++)t[S+p]=s[C+p];if(v<=1){x=!0;break}}if(t[_--]=t[b--],--m===0){x=!0;break}k--}while(T>=ep||E>=ep);if(x)break;k<0&&(k=0),k+=2}if(n=k,n<1&&(n=1),v===1){for(_-=m,b-=m,S=_+1,C=b+1,p=m-1;p>=0;p--)t[S+p]=t[C+p];t[_]=s[y]}else{if(v===0)throw new Error;for(C=_-(v-1),p=0;p<v;p++)t[C+p]=s[p]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:a}}function a_(t,e,n,i){n||(n=0),i||(i=t.length);var r=i-n;if(!(r<2)){var o=0;if(r<oZ){o=Z6(t,n,i,e),Q6(t,n,i,n+o,e);return}var s=Dje(t,e),a=Oje(r);do{if(o=Z6(t,n,i,e),o<a){var l=r;l>a&&(l=a),Q6(t,n,n+l,n+o,e),o=l}s.pushRun(n,o),s.mergeRuns(),r-=o,n+=o}while(r!==0);s.forceMergeRuns()}}var Jo=1,kp=2,Hh=4,e8=!1;function IE(){e8||(e8=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function t8(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Nje=(function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=t8}return t.prototype.traverse=function(e,n){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,n)},t.prototype.getDisplayList=function(e,n){n=n||!1;var i=this._displayList;return(e||!i.length)&&this.updateDisplayList(n),i},t.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var n=this._roots,i=this._displayList,r=0,o=n.length;r<o;r++)this._updateAndAddDisplayable(n[r],null,e);i.length=this._displayListLen,a_(i,t8)},t.prototype._updateAndAddDisplayable=function(e,n,i){if(!(e.ignore&&!i)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),o=n&&n.length,s=0,a=e.__clipPaths;if(!e.ignoreClip&&(o||r)){if(a||(a=e.__clipPaths=[]),o)for(var l=0;l<n.length;l++)a[s++]=n[l];for(var u=r,c=e;u;)u.parent=c,u.updateTransform(),a[s++]=u,c=u,u=u.getClipPath()}if(a&&(a.length=s),e.childrenRef){for(var d=e.childrenRef(),f=0;f<d.length;f++){var h=d[f];e.__dirty&&(h.__dirty|=Jo),this._updateAndAddDisplayable(h,a,i)}e.__dirty=0}else{var m=e;isNaN(m.z)&&(IE(),m.z=0),isNaN(m.z2)&&(IE(),m.z2=0),isNaN(m.zlevel)&&(IE(),m.zlevel=0),this._displayList[this._displayListLen++]=m}var g=e.getDecalElement&&e.getDecalElement();g&&this._updateAndAddDisplayable(g,a,i);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,a,i);var p=e.getTextContent();p&&this._updateAndAddDisplayable(p,a,i)}},t.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},t.prototype.delRoot=function(e){if(e instanceof Array){for(var n=0,i=e.length;n<i;n++)this.delRoot(e[n]);return}var r=Dn(this._roots,e);r>=0&&this._roots.splice(r,1)},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t})(),A1;A1=Kt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)};var fv={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return .5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return t===0?0:Math.pow(1024,t-1)},exponentialOut:function(t){return t===1?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return t===0?0:t===1?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1,i=.4;return t===0?0:t===1?1:(!n||n<1?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)))},elasticOut:function(t){var e,n=.1,i=.4;return t===0?0:t===1?1:(!n||n<1?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return t===0?0:t===1?1:(!n||n<1?(n=1,e=i/4):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)):n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-fv.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?fv.bounceIn(t*2)*.5:fv.bounceOut(t*2-1)*.5+.5}},Py=Math.pow,wc=Math.sqrt,P1=1e-8,sZ=1e-4,n8=wc(3),Iy=1/3,qa=Sg(),Ts=Sg(),wm=Sg();function gc(t){return t>-P1&&t<P1}function aZ(t){return t>P1||t<-P1}function pr(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function i8(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function I1(t,e,n,i,r,o){var s=i+3*(e-n)-t,a=3*(n-e*2+t),l=3*(e-t),u=t-r,c=a*a-3*s*l,d=a*l-9*s*u,f=l*l-3*a*u,h=0;if(gc(c)&&gc(d))if(gc(a))o[0]=0;else{var m=-l/a;m>=0&&m<=1&&(o[h++]=m)}else{var g=d*d-4*c*f;if(gc(g)){var v=d/c,m=-a/s+v,p=-v/2;m>=0&&m<=1&&(o[h++]=m),p>=0&&p<=1&&(o[h++]=p)}else if(g>0){var b=wc(g),y=c*a+1.5*s*(-d+b),_=c*a+1.5*s*(-d-b);y<0?y=-Py(-y,Iy):y=Py(y,Iy),_<0?_=-Py(-_,Iy):_=Py(_,Iy);var m=(-a-(y+_))/(3*s);m>=0&&m<=1&&(o[h++]=m)}else{var C=(2*c*a-3*s*d)/(2*wc(c*c*c)),S=Math.acos(C)/3,k=wc(c),T=Math.cos(S),m=(-a-2*k*T)/(3*s),p=(-a+k*(T+n8*Math.sin(S)))/(3*s),E=(-a+k*(T-n8*Math.sin(S)))/(3*s);m>=0&&m<=1&&(o[h++]=m),p>=0&&p<=1&&(o[h++]=p),E>=0&&E<=1&&(o[h++]=E)}}return h}function lZ(t,e,n,i,r){var o=6*n-12*e+6*t,s=9*e+3*i-3*t-9*n,a=3*e-3*t,l=0;if(gc(s)){if(aZ(o)){var u=-a/o;u>=0&&u<=1&&(r[l++]=u)}}else{var c=o*o-4*s*a;if(gc(c))r[0]=-o/(2*s);else if(c>0){var d=wc(c),u=(-o+d)/(2*s),f=(-o-d)/(2*s);u>=0&&u<=1&&(r[l++]=u),f>=0&&f<=1&&(r[l++]=f)}}return l}function R1(t,e,n,i,r,o){var s=(e-t)*r+t,a=(n-e)*r+e,l=(i-n)*r+n,u=(a-s)*r+s,c=(l-a)*r+a,d=(c-u)*r+u;o[0]=t,o[1]=s,o[2]=u,o[3]=d,o[4]=d,o[5]=c,o[6]=l,o[7]=i}function Bje(t,e,n,i,r,o,s,a,l,u,c){var d,f=.005,h=1/0,m,g,v,p;qa[0]=l,qa[1]=u;for(var b=0;b<1;b+=.05)Ts[0]=pr(t,n,r,s,b),Ts[1]=pr(e,i,o,a,b),v=ym(qa,Ts),v<h&&(d=b,h=v);h=1/0;for(var y=0;y<32&&!(f<sZ);y++)m=d-f,g=d+f,Ts[0]=pr(t,n,r,s,m),Ts[1]=pr(e,i,o,a,m),v=ym(Ts,qa),m>=0&&v<h?(d=m,h=v):(wm[0]=pr(t,n,r,s,g),wm[1]=pr(e,i,o,a,g),p=ym(wm,qa),g<=1&&p<h?(d=g,h=p):f*=.5);return wc(h)}function Vje(t,e,n,i,r,o,s,a,l){for(var u=t,c=e,d=0,f=1/l,h=1;h<=l;h++){var m=h*f,g=pr(t,n,r,s,m),v=pr(e,i,o,a,m),p=g-u,b=v-c;d+=Math.sqrt(p*p+b*b),u=g,c=v}return d}function wo(t,e,n,i){var r=1-i;return r*(r*t+2*i*e)+i*i*n}function r8(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Fje(t,e,n,i,r){var o=t-2*e+n,s=2*(e-t),a=t-i,l=0;if(gc(o)){if(aZ(s)){var u=-a/s;u>=0&&u<=1&&(r[l++]=u)}}else{var c=s*s-4*o*a;if(gc(c)){var u=-s/(2*o);u>=0&&u<=1&&(r[l++]=u)}else if(c>0){var d=wc(c),u=(-s+d)/(2*o),f=(-s-d)/(2*o);u>=0&&u<=1&&(r[l++]=u),f>=0&&f<=1&&(r[l++]=f)}}return l}function uZ(t,e,n){var i=t+n-2*e;return i===0?.5:(t-e)/i}function M1(t,e,n,i,r){var o=(e-t)*i+t,s=(n-e)*i+e,a=(s-o)*i+o;r[0]=t,r[1]=o,r[2]=a,r[3]=a,r[4]=s,r[5]=n}function $je(t,e,n,i,r,o,s,a,l){var u,c=.005,d=1/0;qa[0]=s,qa[1]=a;for(var f=0;f<1;f+=.05){Ts[0]=wo(t,n,r,f),Ts[1]=wo(e,i,o,f);var h=ym(qa,Ts);h<d&&(u=f,d=h)}d=1/0;for(var m=0;m<32&&!(c<sZ);m++){var g=u-c,v=u+c;Ts[0]=wo(t,n,r,g),Ts[1]=wo(e,i,o,g);var h=ym(Ts,qa);if(g>=0&&h<d)u=g,d=h;else{wm[0]=wo(t,n,r,v),wm[1]=wo(e,i,o,v);var p=ym(wm,qa);v<=1&&p<d?(u=v,d=p):c*=.5}}return wc(d)}function zje(t,e,n,i,r,o,s){for(var a=t,l=e,u=0,c=1/s,d=1;d<=s;d++){var f=d*c,h=wo(t,n,r,f),m=wo(e,i,o,f),g=h-a,v=m-l;u+=Math.sqrt(g*g+v*v),a=h,l=m}return u}var Hje=/cubic-bezier\(([0-9,\.e ]+)\)/;function cZ(t){var e=t&&Hje.exec(t);if(e){var n=e[1].split(","),i=+Ka(n[0]),r=+Ka(n[1]),o=+Ka(n[2]),s=+Ka(n[3]);if(isNaN(i+r+o+s))return;var a=[];return function(l){return l<=0?0:l>=1?1:I1(0,i,o,1,l,a)&&pr(0,r,s,1,a[0])}}}var Uje=(function(){function t(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Mo,this.ondestroy=e.ondestroy||Mo,this.onrestart=e.onrestart||Mo,e.easing&&this.setEasing(e.easing)}return t.prototype.step=function(e,n){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=n;return}var i=this._life,r=e-this._startTime-this._pausedTime,o=r/i;o<0&&(o=0),o=Math.min(o,1);var s=this.easingFunc,a=s?s(o):o;if(this.onframe(a),o===1)if(this.loop){var l=r%i;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Xt(e)?e:fv[e]||cZ(e)},t})(),dZ=(function(){function t(e){this.value=e}return t})(),Wje=(function(){function t(){this._len=0}return t.prototype.insert=function(e){var n=new dZ(e);return this.insertEntry(n),n},t.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},t.prototype.remove=function(e){var n=e.prev,i=e.next;n?n.next=i:this.head=i,i?i.prev=n:this.tail=n,e.next=e.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t})(),tg=(function(){function t(e){this._list=new Wje,this._maxSize=10,this._map={},this._maxSize=e}return t.prototype.put=function(e,n){var i=this._list,r=this._map,o=null;if(r[e]==null){var s=i.len(),a=this._lastRemovedEntry;if(s>=this._maxSize&&s>0){var l=i.head;i.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}a?a.value=n:a=new dZ(n),a.key=e,i.insertEntry(a),r[e]=a}return o},t.prototype.get=function(e){var n=this._map[e],i=this._list;if(n!=null)return n!==i.tail&&(i.remove(n),i.insertEntry(n)),n.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t})(),o8={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function _c(t){return t=Math.round(t),t<0?0:t>255?255:t}function fP(t){return t<0?0:t>1?1:t}function RE(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?_c(parseFloat(e)/100*255):_c(parseInt(e,10))}function lf(t){var e=t;return e.length&&e.charAt(e.length-1)==="%"?fP(parseFloat(e)/100):fP(parseFloat(e))}function ME(t,e,n){return n<0?n+=1:n>1&&(n-=1),n*6<1?t+(e-t)*n*6:n*2<1?e:n*3<2?t+(e-t)*(2/3-n)*6:t}function Ry(t,e,n){return t+(e-t)*n}function ws(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function hP(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var fZ=new tg(20),My=null;function vh(t,e){My&&hP(My,e),My=fZ.put(t,My||e.slice())}function cu(t,e){if(t){e=e||[];var n=fZ.get(t);if(n)return hP(e,n);t=t+"";var i=t.replace(/ /g,"").toLowerCase();if(i in o8)return hP(e,o8[i]),vh(t,e),e;var r=i.length;if(i.charAt(0)==="#"){if(r===4||r===5){var o=parseInt(i.slice(1,4),16);if(!(o>=0&&o<=4095)){ws(e,0,0,0,1);return}return ws(e,(o&3840)>>4|(o&3840)>>8,o&240|(o&240)>>4,o&15|(o&15)<<4,r===5?parseInt(i.slice(4),16)/15:1),vh(t,e),e}else if(r===7||r===9){var o=parseInt(i.slice(1,7),16);if(!(o>=0&&o<=16777215)){ws(e,0,0,0,1);return}return ws(e,(o&16711680)>>16,(o&65280)>>8,o&255,r===9?parseInt(i.slice(7),16)/255:1),vh(t,e),e}return}var s=i.indexOf("("),a=i.indexOf(")");if(s!==-1&&a+1===r){var l=i.substr(0,s),u=i.substr(s+1,a-(s+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?ws(e,+u[0],+u[1],+u[2],1):ws(e,0,0,0,1);c=lf(u.pop());case"rgb":if(u.length>=3)return ws(e,RE(u[0]),RE(u[1]),RE(u[2]),u.length===3?c:lf(u[3])),vh(t,e),e;ws(e,0,0,0,1);return;case"hsla":if(u.length!==4){ws(e,0,0,0,1);return}return u[3]=lf(u[3]),mP(u,e),vh(t,e),e;case"hsl":if(u.length!==3){ws(e,0,0,0,1);return}return mP(u,e),vh(t,e),e;default:return}}ws(e,0,0,0,1)}}function mP(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=lf(t[1]),r=lf(t[2]),o=r<=.5?r*(i+1):r+i-r*i,s=r*2-o;return e=e||[],ws(e,_c(ME(s,o,n+1/3)*255),_c(ME(s,o,n)*255),_c(ME(s,o,n-1/3)*255),1),t.length===4&&(e[3]=t[3]),e}function qje(t){if(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=o-r,a=(o+r)/2,l,u;if(s===0)l=0,u=0;else{a<.5?u=s/(o+r):u=s/(2-o-r);var c=((o-e)/6+s/2)/s,d=((o-n)/6+s/2)/s,f=((o-i)/6+s/2)/s;e===o?l=f-d:n===o?l=1/3+c-f:i===o&&(l=2/3+d-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,a];return t[3]!=null&&h.push(t[3]),h}}function s8(t,e){var n=cu(t);if(n){for(var i=0;i<3;i++)n[i]=n[i]*(1-e)|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return DS(n,n.length===4?"rgba":"rgb")}}function jje(t,e,n){if(!(!(e&&e.length)||!(t>=0&&t<=1))){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),s=cu(e[r]),a=cu(e[o]),l=i-r,u=DS([_c(Ry(s[0],a[0],l)),_c(Ry(s[1],a[1],l)),_c(Ry(s[2],a[2],l)),fP(Ry(s[3],a[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}function gP(t,e,n,i){var r=cu(t);if(t)return r=qje(r),n!=null&&(r[1]=lf(Xt(n)?n(r[1]):n)),i!=null&&(r[2]=lf(Xt(i)?i(r[2]):i)),DS(mP(r),"rgba")}function DS(t,e){if(!(!t||!t.length)){var n=t[0]+","+t[1]+","+t[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(n+=","+t[3]),e+"("+n+")"}}function O1(t,e){var n=cu(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var a8=new tg(100);function l8(t){if(At(t)){var e=a8.get(t);return e||(e=s8(t,-.1),a8.put(t,e)),e}else if(OS(t)){var n=lt({},t);return n.colorStops=jt(t.colorStops,function(i){return{offset:i.offset,color:s8(i.color,-.1)}}),n}return t}function Kje(t){return t.type==="linear"}function Gje(t){return t.type==="radial"}(function(){return Kt.hasGlobalWindow&&Xt(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:typeof Buffer<"u"?function(t){return Buffer.from(t).toString("base64")}:function(t){return null}})();var pP=Array.prototype.slice;function Hl(t,e,n){return(e-t)*n+t}function OE(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=Hl(e[o],n[o],i);return t}function Yje(t,e,n,i){for(var r=e.length,o=r&&e[0].length,s=0;s<r;s++){t[s]||(t[s]=[]);for(var a=0;a<o;a++)t[s][a]=Hl(e[s][a],n[s][a],i)}return t}function Oy(t,e,n,i){for(var r=e.length,o=0;o<r;o++)t[o]=e[o]+n[o]*i;return t}function u8(t,e,n,i){for(var r=e.length,o=r&&e[0].length,s=0;s<r;s++){t[s]||(t[s]=[]);for(var a=0;a<o;a++)t[s][a]=e[s][a]+n[s][a]*i}return t}function Xje(t,e){for(var n=t.length,i=e.length,r=n>i?e:t,o=Math.min(n,i),s=r[o-1]||{color:[0,0,0,0],offset:0},a=o;a<Math.max(n,i);a++)r.push({offset:s.offset,color:s.color.slice()})}function Jje(t,e,n){var i=t,r=e;if(!(!i.push||!r.push)){var o=i.length,s=r.length;if(o!==s){var a=o>s;if(a)i.length=s;else for(var l=o;l<s;l++)i.push(n===1?r[l]:pP.call(r[l]))}for(var u=i[0]&&i[0].length,l=0;l<i.length;l++)if(n===1)isNaN(i[l])&&(i[l]=r[l]);else for(var c=0;c<u;c++)isNaN(i[l][c])&&(i[l][c]=r[l][c])}}function l_(t){if(Vo(t)){var e=t.length;if(Vo(t[0])){for(var n=[],i=0;i<e;i++)n.push(pP.call(t[i]));return n}return pP.call(t)}return t}function u_(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=t[3]==null?1:t[3],"rgba("+t.join(",")+")"}function Zje(t){return Vo(t&&t[0])?2:1}var Ly=0,c_=1,hZ=2,Tp=3,vP=4,bP=5,c8=6;function d8(t){return t===vP||t===bP}function Dy(t){return t===c_||t===hZ}var tp=[0,0,0,0],Qje=(function(){function t(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return t.prototype.isFinished=function(){return this._finished},t.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},t.prototype.needsAnimate=function(){return this.keyframes.length>=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(e,n,i){this._needsSort=!0;var r=this.keyframes,o=r.length,s=!1,a=c8,l=n;if(Vo(n)){var u=Zje(n);a=u,(u===1&&!ai(n[0])||u===2&&!ai(n[0][0]))&&(s=!0)}else if(ai(n)&&!bb(n))a=Ly;else if(At(n))if(!isNaN(+n))a=Ly;else{var c=cu(n);c&&(l=c,a=Tp)}else if(OS(n)){var d=lt({},l);d.colorStops=jt(n.colorStops,function(h){return{offset:h.offset,color:cu(h.color)}}),Kje(n)?a=vP:Gje(n)&&(a=bP),l=d}o===0?this.valType=a:(a!==this.valType||a===c8)&&(s=!0),this.discrete=this.discrete||s;var f={time:e,value:l,rawValue:n,percent:0};return i&&(f.easing=i,f.easingFunc=Xt(i)?i:fv[i]||cZ(i)),r.push(f),f},t.prototype.prepare=function(e,n){var i=this.keyframes;this._needsSort&&i.sort(function(g,v){return g.time-v.time});for(var r=this.valType,o=i.length,s=i[o-1],a=this.discrete,l=Dy(r),u=d8(r),c=0;c<o;c++){var d=i[c],f=d.value,h=s.value;d.percent=d.time/e,a||(l&&c!==o-1?Jje(f,h,r):u&&Xje(f.colorStops,h.colorStops))}if(!a&&r!==bP&&n&&this.needsAnimate()&&n.needsAnimate()&&r===n.valType&&!n._finished){this._additiveTrack=n;for(var m=i[0].value,c=0;c<o;c++)r===Ly?i[c].additiveValue=i[c].value-m:r===Tp?i[c].additiveValue=Oy([],i[c].value,m,-1):Dy(r)&&(i[c].additiveValue=r===c_?Oy([],i[c].value,m,-1):u8([],i[c].value,m,-1))}},t.prototype.step=function(e,n){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var i=this._additiveTrack!=null,r=i?"additiveValue":"value",o=this.valType,s=this.keyframes,a=s.length,l=this.propName,u=o===Tp,c,d=this._lastFr,f=Math.min,h,m;if(a===1)h=m=s[0];else{if(n<0)c=0;else if(n<this._lastFrP){var g=f(d+1,a-1);for(c=g;c>=0&&!(s[c].percent<=n);c--);c=f(c,a-2)}else{for(c=d;c<a&&!(s[c].percent>n);c++);c=f(c-1,a-2)}m=s[c+1],h=s[c]}if(h&&m){this._lastFr=c,this._lastFrP=n;var v=m.percent-h.percent,p=v===0?1:f((n-h.percent)/v,1);m.easingFunc&&(p=m.easingFunc(p));var b=i?this._additiveValue:u?tp:e[l];if((Dy(o)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[l]=p<1?h.rawValue:m.rawValue;else if(Dy(o))o===c_?OE(b,h[r],m[r],p):Yje(b,h[r],m[r],p);else if(d8(o)){var y=h[r],_=m[r],C=o===vP;e[l]={type:C?"linear":"radial",x:Hl(y.x,_.x,p),y:Hl(y.y,_.y,p),colorStops:jt(y.colorStops,function(k,T){var E=_.colorStops[T];return{offset:Hl(k.offset,E.offset,p),color:u_(OE([],k.color,E.color,p))}}),global:_.global},C?(e[l].x2=Hl(y.x2,_.x2,p),e[l].y2=Hl(y.y2,_.y2,p)):e[l].r=Hl(y.r,_.r,p)}else if(u)OE(b,h[r],m[r],p),i||(e[l]=u_(b));else{var S=Hl(h[r],m[r],p);i?this._additiveValue=S:e[l]=S}i&&this._addToTarget(e)}}},t.prototype._addToTarget=function(e){var n=this.valType,i=this.propName,r=this._additiveValue;n===Ly?e[i]=e[i]+r:n===Tp?(cu(e[i],tp),Oy(tp,tp,r,1),e[i]=u_(tp)):n===c_?Oy(e[i],e[i],r,1):n===hZ&&u8(e[i],e[i],r,1)},t})(),WO=(function(){function t(e,n,i,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=n,n&&r){VO("Can' use additive animation on looped animation.");return}this._additiveAnimators=r,this._allowDiscrete=i}return t.prototype.getMaxTime=function(){return this._maxTime},t.prototype.getDelay=function(){return this._delay},t.prototype.getLoop=function(){return this._loop},t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(e){this._target=e},t.prototype.when=function(e,n,i){return this.whenWithKeys(e,n,hi(n),i)},t.prototype.whenWithKeys=function(e,n,i,r){for(var o=this._tracks,s=0;s<i.length;s++){var a=i[s],l=o[a];if(!l){l=o[a]=new Qje(a);var u=void 0,c=this._getAdditiveTrack(a);if(c){var d=c.keyframes,f=d[d.length-1];u=f&&f.value,c.valType===Tp&&u&&(u=u_(u))}else u=this._target[a];if(u==null)continue;e>0&&l.addKeyframe(0,l_(u),r),this._trackKeys.push(a)}l.addKeyframe(e,l_(n[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var n=e.length,i=0;i<n;i++)e[i].call(this)},t.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,n=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,n)for(var i=0;i<n.length;i++)n[i].call(this)},t.prototype._setTracksFinished=function(){for(var e=this._tracks,n=this._trackKeys,i=0;i<n.length;i++)e[n[i]].setFinished()},t.prototype._getAdditiveTrack=function(e){var n,i=this._additiveAnimators;if(i)for(var r=0;r<i.length;r++){var o=i[r].getTrack(e);o&&(n=o)}return n},t.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var n=this,i=[],r=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var s=this._trackKeys[o],a=this._tracks[s],l=this._getAdditiveTrack(s),u=a.keyframes,c=u.length;if(a.prepare(r,l),a.needsAnimate())if(!this._allowDiscrete&&a.discrete){var d=u[c-1];d&&(n._target[a.propName]=d.rawValue),a.setFinished()}else i.push(a)}if(i.length||this._force){var f=new Uje({life:r,loop:this._loop,delay:this._delay||0,onframe:function(h){n._started=2;var m=n._additiveAnimators;if(m){for(var g=!1,v=0;v<m.length;v++)if(m[v]._clip){g=!0;break}g||(n._additiveAnimators=null)}for(var v=0;v<i.length;v++)i[v].step(n._target,h);var p=n._onframeCbs;if(p)for(var v=0;v<p.length;v++)p[v](n._target,h)},ondestroy:function(){n._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),e&&f.setEasing(e)}else this._doneCallback();return this}},t.prototype.stop=function(e){if(this._clip){var n=this._clip;e&&n.onframe(1),this._abortedCallback()}},t.prototype.delay=function(e){return this._delay=e,this},t.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},t.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},t.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},t.prototype.getClip=function(){return this._clip},t.prototype.getTrack=function(e){return this._tracks[e]},t.prototype.getTracks=function(){var e=this;return jt(this._trackKeys,function(n){return e._tracks[n]})},t.prototype.stopTracks=function(e,n){if(!e.length||!this._clip)return!0;for(var i=this._tracks,r=this._trackKeys,o=0;o<e.length;o++){var s=i[e[o]];s&&!s.isFinished()&&(n?s.step(this._target,1):this._started===1&&s.step(this._target,0),s.setFinished())}for(var a=!0,o=0;o<r.length;o++)if(!i[r[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},t.prototype.saveTo=function(e,n,i){if(e){n=n||this._trackKeys;for(var r=0;r<n.length;r++){var o=n[r],s=this._tracks[o];if(!(!s||s.isFinished())){var a=s.keyframes,l=a[i?0:a.length-1];l&&(e[o]=l_(l.rawValue))}}}},t.prototype.__changeFinalValue=function(e,n){n=n||hi(e);for(var i=0;i<n.length;i++){var r=n[i],o=this._tracks[r];if(o){var s=o.keyframes;if(s.length>1){var a=s.pop();o.addKeyframe(a.time,e[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},t})();function Zh(){return new Date().getTime()}var eKe=(function(t){yt(e,t);function e(n){var i=t.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,n=n||{},i.stage=n.stage||{},i}return e.prototype.addClip=function(n){n.animation&&this.removeClip(n),this._head?(this._tail.next=n,n.prev=this._tail,n.next=null,this._tail=n):this._head=this._tail=n,n.animation=this},e.prototype.addAnimator=function(n){n.animation=this;var i=n.getClip();i&&this.addClip(i)},e.prototype.removeClip=function(n){if(n.animation){var i=n.prev,r=n.next;i?i.next=r:this._head=r,r?r.prev=i:this._tail=i,n.next=n.prev=n.animation=null}},e.prototype.removeAnimator=function(n){var i=n.getClip();i&&this.removeClip(i),n.animation=null},e.prototype.update=function(n){for(var i=Zh()-this._pausedTime,r=i-this._time,o=this._head;o;){var s=o.next,a=o.step(i,r);a&&(o.ondestroy(),this.removeClip(o)),o=s}this._time=i,n||(this.trigger("frame",r),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var n=this;this._running=!0;function i(){n._running&&(A1(i),!n._paused&&n.update())}A1(i)},e.prototype.start=function(){this._running||(this._time=Zh(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Zh(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Zh()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var n=this._head;n;){var i=n.next;n.prev=n.next=n.animation=null,n=i}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(n,i){i=i||{},this.start();var r=new WO(n,i.loop);return this.addAnimator(r),r},e})(Tl),tKe=300,LE=Kt.domSupported,DE=(function(){var t=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=jt(t,function(r){var o=r.replace("mouse","pointer");return n.hasOwnProperty(o)?o:r});return{mouse:t,touch:e,pointer:i}})(),f8={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},h8=!1;function yP(t){var e=t.pointerType;return e==="pen"||e==="touch"}function nKe(t){t.touching=!0,t.touchTimer!=null&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}function NE(t){t&&(t.zrByTouch=!0)}function iKe(t,e){return _s(t.dom,new rKe(t,e),!0)}function mZ(t,e){for(var n=e,i=!1;n&&n.nodeType!==9&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var rKe=(function(){function t(e,n){this.stopPropagation=Mo,this.stopImmediatePropagation=Mo,this.preventDefault=Mo,this.type=n.type,this.target=this.currentTarget=e.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY}return t})(),Gs={mousedown:function(t){t=_s(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=_s(this.dom,t);var e=this.__mayPointerCapture;e&&(t.zrX!==e[0]||t.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=_s(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){t=_s(this.dom,t);var e=t.toElement||t.relatedTarget;mZ(this,e)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){h8=!0,t=_s(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){h8||(t=_s(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){t=_s(this.dom,t),NE(t),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Gs.mousemove.call(this,t),Gs.mousedown.call(this,t)},touchmove:function(t){t=_s(this.dom,t),NE(t),this.handler.processGesture(t,"change"),Gs.mousemove.call(this,t)},touchend:function(t){t=_s(this.dom,t),NE(t),this.handler.processGesture(t,"end"),Gs.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<tKe&&Gs.click.call(this,t)},pointerdown:function(t){Gs.mousedown.call(this,t)},pointermove:function(t){yP(t)||Gs.mousemove.call(this,t)},pointerup:function(t){Gs.mouseup.call(this,t)},pointerout:function(t){yP(t)||Gs.mouseout.call(this,t)}};ue(["click","dblclick","contextmenu"],function(t){Gs[t]=function(e){e=_s(this.dom,e),this.trigger(t,e)}});var wP={pointermove:function(t){yP(t)||wP.mousemove.call(this,t)},pointerup:function(t){wP.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function oKe(t,e){var n=e.domHandlers;Kt.pointerEventsSupported?ue(DE.pointer,function(i){d_(e,i,function(r){n[i].call(t,r)})}):(Kt.touchEventsSupported&&ue(DE.touch,function(i){d_(e,i,function(r){n[i].call(t,r),nKe(e)})}),ue(DE.mouse,function(i){d_(e,i,function(r){r=zO(r),e.touching||n[i].call(t,r)})}))}function sKe(t,e){Kt.pointerEventsSupported?ue(f8.pointer,n):Kt.touchEventsSupported||ue(f8.mouse,n);function n(i){function r(o){o=zO(o),mZ(t,o.target)||(o=iKe(t,o),e.domHandlers[i].call(t,o))}d_(e,i,r,{capture:!0})}}function d_(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,wje(t.domTarget,e,n,i)}function BE(t){var e=t.mounted;for(var n in e)e.hasOwnProperty(n)&&_je(t.domTarget,n,e[n],t.listenerOpts[n]);t.mounted={}}var m8=(function(){function t(e,n){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=n}return t})(),aKe=(function(t){yt(e,t);function e(n,i){var r=t.call(this)||this;return r.__pointerCapturing=!1,r.dom=n,r.painterRoot=i,r._localHandlerScope=new m8(n,Gs),LE&&(r._globalHandlerScope=new m8(document,wP)),oKe(r,r._localHandlerScope),r}return e.prototype.dispose=function(){BE(this._localHandlerScope),LE&&BE(this._globalHandlerScope)},e.prototype.setCursor=function(n){this.dom.style&&(this.dom.style.cursor=n||"default")},e.prototype.__togglePointerCapture=function(n){if(this.__mayPointerCapture=null,LE&&+this.__pointerCapturing^+n){this.__pointerCapturing=n;var i=this._globalHandlerScope;n?sKe(this,i):BE(i)}},e})(Tl),gZ=1;Kt.hasGlobalWindow&&(gZ=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var L1=gZ,_P=.4,CP="#333",SP="#ccc",lKe="#eee",g8=HO,p8=5e-5;function gd(t){return t>p8||t<-p8}var pd=[],bh=[],VE=uu(),FE=Math.abs,qO=(function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},t.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},t.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},t.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},t.prototype.needLocalTransform=function(){return gd(this.rotation)||gd(this.x)||gd(this.y)||gd(this.scaleX-1)||gd(this.scaleY-1)||gd(this.skewX)||gd(this.skewY)},t.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,n=this.needLocalTransform(),i=this.transform;if(!(n||e)){i&&(g8(i),this.invTransform=null);return}i=i||uu(),n?this.getLocalTransform(i):g8(i),e&&(n?cv(i,e,i):eZ(i,e)),this.transform=i,this._resolveGlobalScaleRatio(i)},t.prototype._resolveGlobalScaleRatio=function(e){var n=this.globalScaleRatio;if(n!=null&&n!==1){this.getGlobalScale(pd);var i=pd[0]<0?-1:1,r=pd[1]<0?-1:1,o=((pd[0]-i)*n+i)/pd[0]||0,s=((pd[1]-r)*n+r)/pd[1]||0;e[0]*=o,e[1]*=o,e[2]*=s,e[3]*=s}this.invTransform=this.invTransform||uu(),y0(this.invTransform,e)},t.prototype.getComputedTransform=function(){for(var e=this,n=[];e;)n.push(e),e=e.parent;for(;e=n.pop();)e.updateTransform();return this.transform},t.prototype.setLocalTransform=function(e){if(e){var n=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),o=Math.PI/2+r-Math.atan2(e[3],e[2]);i=Math.sqrt(i)*Math.cos(o),n=Math.sqrt(n),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=n,this.scaleY=i,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,n=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||uu(),cv(bh,e.invTransform,n),n=bh);var i=this.originX,r=this.originY;(i||r)&&(VE[4]=i,VE[5]=r,cv(bh,n,VE),bh[4]-=i,bh[5]-=r,n=bh),this.setLocalTransform(n)}},t.prototype.getGlobalScale=function(e){var n=this.transform;return e=e||[],n?(e[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),e[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(e[0]=-e[0]),n[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},t.prototype.transformCoordToLocal=function(e,n){var i=[e,n],r=this.invTransform;return r&&Ds(i,i,r),i},t.prototype.transformCoordToGlobal=function(e,n){var i=[e,n],r=this.transform;return r&&Ds(i,i,r),i},t.prototype.getLineScale=function(){var e=this.transform;return e&&FE(e[0]-1)>1e-10&&FE(e[3]-1)>1e-10?Math.sqrt(FE(e[0]*e[3]-e[2]*e[1])):1},t.prototype.copyTransform=function(e){kP(this,e)},t.getLocalTransform=function(e,n){n=n||[];var i=e.originX||0,r=e.originY||0,o=e.scaleX,s=e.scaleY,a=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,d=e.y,f=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(i||r||a||l){var m=i+a,g=r+l;n[4]=-m*o-f*g*s,n[5]=-g*s-h*m*o}else n[4]=n[5]=0;return n[0]=o,n[3]=s,n[1]=h*o,n[2]=f*s,u&&UO(n,n,u),n[4]+=i+c,n[5]+=r+d,n},t.initDefaultProps=(function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),t})(),yb=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function kP(t,e){for(var n=0;n<yb.length;n++){var i=yb[n];t[i]=e[i]}}function tl(t){Ny||(Ny=new tg(100)),t=t||Dc;var e=Ny.get(t);return e||(e={font:t,strWidthCache:new tg(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:wu.measureText("国",t).width,asciiCharWidth:wu.measureText("a",t).width},Ny.put(t,e)),e}var Ny;function uKe(t){if(!($E>=v8)){t=t||Dc;for(var e=[],n=+new Date,i=0;i<=127;i++)e[i]=wu.measureText(String.fromCharCode(i),t).width;var r=+new Date-n;return r>16?$E=v8:r>2&&$E++,e}}var $E=0,v8=5;function pZ(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=uKe(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?t.asciiWidthMap!=null?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function nl(t,e){var n=t.strWidthCache,i=n.get(e);return i==null&&(i=wu.measureText(e,t.font).width,n.put(e,i)),i}function b8(t,e,n,i){var r=nl(tl(e),t),o=NS(e),s=ng(0,r,n),a=uf(0,o,i),l=new nn(s,a,r,o);return l}function vZ(t,e,n,i){var r=((t||"")+"").split(`
`),o=r.length;if(o===1)return b8(r[0],e,n,i);for(var s=new nn(0,0,0,0),a=0;a<r.length;a++){var l=b8(r[a],e,n,i);a===0?s.copy(l):s.union(l)}return s}function ng(t,e,n,i){return n==="right"?i?t+=e:t-=e:n==="center"&&(i?t+=e/2:t-=e/2),t}function uf(t,e,n,i){return n==="middle"?i?t+=e/2:t-=e/2:n==="bottom"&&(i?t+=e:t-=e),t}function NS(t){return tl(t).stWideCharWidth}function Tf(t,e){return typeof t=="string"?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function bZ(t,e,n){var i=e.position||"inside",r=e.distance!=null?e.distance:5,o=n.height,s=n.width,a=o/2,l=n.x,u=n.y,c="left",d="top";if(i instanceof Array)l+=Tf(i[0],n.width),u+=Tf(i[1],n.height),c=null,d=null;else switch(i){case"left":l-=r,u+=a,c="right",d="middle";break;case"right":l+=r+s,u+=a,d="middle";break;case"top":l+=s/2,u-=r,c="center",d="bottom";break;case"bottom":l+=s/2,u+=o+r,c="center";break;case"inside":l+=s/2,u+=a,c="center",d="middle";break;case"insideLeft":l+=r,u+=a,d="middle";break;case"insideRight":l+=s-r,u+=a,c="right",d="middle";break;case"insideTop":l+=s/2,u+=r,c="center";break;case"insideBottom":l+=s/2,u+=o-r,c="center",d="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=s-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,d="bottom";break;case"insideBottomRight":l+=s-r,u+=o-r,c="right",d="bottom";break}return t=t||{},t.x=l,t.y=u,t.align=c,t.verticalAlign=d,t}var zE="__zr_normal__",HE=yb.concat(["ignore"]),cKe=Cg(yb,function(t,e){return t[e]=!0,t},{ignore:!1}),yh={},dKe=new nn(0,0,0,0),By=[],BS=(function(){function t(e){this.id=GJ(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return t.prototype._init=function(e){this.attr(e)},t.prototype.drift=function(e,n,i){switch(this.draggable){case"horizontal":n=0;break;case"vertical":e=0;break}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=n,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(e){var n=this._textContent;if(n&&(!n.ignore||e)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,o=n.innerTransformable,s=void 0,a=void 0,l=!1;o.parent=r?this:null;var u=!1;o.copyTransform(n);var c=i.position!=null,d=i.autoOverflowArea,f=void 0;if((d||c)&&(f=dKe,i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),r||f.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(yh,i,f):bZ(yh,i,f),o.x=yh.x,o.y=yh.y,s=yh.align,a=yh.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var m=void 0,g=void 0;h==="center"?(m=f.width*.5,g=f.height*.5):(m=Tf(h[0],f.width),g=Tf(h[1],f.height)),u=!0,o.originX=-o.x+m+(r?0:f.x),o.originY=-o.y+g+(r?0:f.y)}}i.rotation!=null&&(o.rotation=i.rotation);var v=i.offset;v&&(o.x+=v[0],o.y+=v[1],u||(o.originX=-v[0],o.originY=-v[1]));var p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(d){var b=p.overflowRect=p.overflowRect||new nn(0,0,0,0);o.getLocalTransform(By),y0(By,By),nn.copy(b,f),b.applyTransform(By)}else p.overflowRect=null;var y=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,_=void 0,C=void 0,S=void 0;y&&this.canBeInsideText()?(_=i.insideFill,C=i.insideStroke,(_==null||_==="auto")&&(_=this.getInsideTextFill()),(C==null||C==="auto")&&(C=this.getInsideTextStroke(_),S=!0)):(_=i.outsideFill,C=i.outsideStroke,(_==null||_==="auto")&&(_=this.getOutsideFill()),(C==null||C==="auto")&&(C=this.getOutsideStroke(_),S=!0)),_=_||"#000",(_!==p.fill||C!==p.stroke||S!==p.autoStroke||s!==p.align||a!==p.verticalAlign)&&(l=!0,p.fill=_,p.stroke=C,p.autoStroke=S,p.align=s,p.verticalAlign=a,n.setDefaultTextStyle(p)),n.__dirty|=Jo,l&&n.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(e){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?SP:CP},t.prototype.getOutsideStroke=function(e){var n=this.__zr&&this.__zr.getBackgroundColor(),i=typeof n=="string"&&cu(n);i||(i=[255,255,255,1]);for(var r=i[3],o=this.__zr.isDarkMode(),s=0;s<3;s++)i[s]=i[s]*r+(o?0:255)*(1-r);return i[3]=1,DS(i,"rgba")},t.prototype.traverse=function(e,n){},t.prototype.attrKV=function(e,n){e==="textConfig"?this.setTextConfig(n):e==="textContent"?this.setTextContent(n):e==="clipPath"?this.setClipPath(n):e==="extra"?(this.extra=this.extra||{},lt(this.extra,n)):this[e]=n},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(e,n){if(typeof e=="string")this.attrKV(e,n);else if(Rt(e))for(var i=e,r=hi(i),o=0;o<r.length;o++){var s=r[o];this.attrKV(s,e[s])}return this.markRedraw(),this},t.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var n=this._normalState,i=0;i<this.animators.length;i++){var r=this.animators[i],o=r.__fromStateTransition;if(!(r.getLoop()||o&&o!==zE)){var s=r.targetName,a=s?n[s]:n;r.saveTo(a)}}},t.prototype._innerSaveToNormal=function(e){var n=this._normalState;n||(n=this._normalState={}),e.textConfig&&!n.textConfig&&(n.textConfig=this.textConfig),this._savePrimaryToNormal(e,n,HE)},t.prototype._savePrimaryToNormal=function(e,n,i){for(var r=0;r<i.length;r++){var o=i[r];e[o]!=null&&!(o in n)&&(n[o]=this[o])}},t.prototype.hasState=function(){return this.currentStates.length>0},t.prototype.getState=function(e){return this.states[e]},t.prototype.ensureState=function(e){var n=this.states;return n[e]||(n[e]={}),n[e]},t.prototype.clearStates=function(e){this.useState(zE,!1,e)},t.prototype.useState=function(e,n,i,r){var o=e===zE,s=this.hasState();if(!(!s&&o)){var a=this.currentStates,l=this.stateTransition;if(!(Dn(a,e)>=0&&(n||a.length===1))){var u;if(this.stateProxy&&!o&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!o){VO("State "+e+" not exists.");return}o||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,n,!i&&!this.__inHover&&l&&l.duration>0,l);var d=this._textContent,f=this._textGuide;return d&&d.useState(e,n,i,c),f&&f.useState(e,n,i,c),o?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Jo),u}}},t.prototype.useStates=function(e,n,i){if(!e.length)this.clearStates();else{var r=[],o=this.currentStates,s=e.length,a=s===o.length;if(a){for(var l=0;l<s;l++)if(e[l]!==o[l]){a=!1;break}}if(a)return;for(var l=0;l<s;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&r.push(c)}var d=r[s-1],f=!!(d&&d.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!n&&!this.__inHover&&m&&m.duration>0,m);var g=this._textContent,v=this._textGuide;g&&g.useStates(e,n,f),v&&v.useStates(e,n,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Jo)}},t.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var n=e.__hostTarget;e=n?e.ignoreHostSilent?null:n:e.parent}return!1},t.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var n=this.animators[e];n.targetName&&n.changeTarget(this[n.targetName])}},t.prototype.removeState=function(e){var n=Dn(this.currentStates,e);if(n>=0){var i=this.currentStates.slice();i.splice(n,1),this.useStates(i)}},t.prototype.replaceState=function(e,n,i){var r=this.currentStates.slice(),o=Dn(r,e),s=Dn(r,n)>=0;o>=0?s?r.splice(o,1):r[o]=n:i&&!s&&r.push(n),this.useStates(r)},t.prototype.toggleState=function(e,n){n?this.useState(e,!0):this.removeState(e)},t.prototype._mergeStates=function(e){for(var n={},i,r=0;r<e.length;r++){var o=e[r];lt(n,o),o.textConfig&&(i=i||{},lt(i,o.textConfig))}return i&&(n.textConfig=i),n},t.prototype._applyStateObj=function(e,n,i,r,o,s){var a=!(n&&r);n&&n.textConfig?(this.textConfig=lt({},r?this.textConfig:i.textConfig),lt(this.textConfig,n.textConfig)):a&&i.textConfig&&(this.textConfig=i.textConfig);for(var l={},u=!1,c=0;c<HE.length;c++){var d=HE[c],f=o&&cKe[d];n&&n[d]!=null?f?(u=!0,l[d]=n[d]):this[d]=n[d]:a&&i[d]!=null&&(f?(u=!0,l[d]=i[d]):this[d]=i[d])}if(!o)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],m=h.targetName;h.getLoop()||h.__changeFinalValue(m?(n||i)[m]:n||i)}u&&this._transitionState(e,l,s)},t.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var n=this.__zr;n&&e.addSelfToZr(n),e.__zr=n,e.__hostTarget=this}},t.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},t.prototype.getClipPath=function(){return this._clipPath},t.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},t.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},t.prototype.getTextContent=function(){return this._textContent},t.prototype.setTextContent=function(e){var n=this._textContent;n!==e&&(n&&n!==e&&this.removeTextContent(),e.innerTransformable=new qO,this._attachComponent(e),this._textContent=e,this.markRedraw())},t.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),lt(this.textConfig,e),this.markRedraw()},t.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},t.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},t.prototype.getTextGuideLine=function(){return this._textGuide},t.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},t.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},t.prototype.markRedraw=function(){this.__dirty|=Jo;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},t.prototype.dirty=function(){this.markRedraw()},t.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var n=this._textContent,i=this._textGuide;n&&(n.__inHover=e),i&&(i.__inHover=e)},t.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var n=this.animators;if(n)for(var i=0;i<n.length;i++)e.animation.addAnimator(n[i]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var n=this.animators;if(n)for(var i=0;i<n.length;i++)e.animation.removeAnimator(n[i]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},t.prototype.animate=function(e,n,i){var r=e?this[e]:this,o=new WO(r,n,i);return e&&(o.targetName=e),this.addAnimator(o,e),o},t.prototype.addAnimator=function(e,n){var i=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(n)}).done(function(){var o=r.animators,s=Dn(o,e);s>=0&&o.splice(s,1)}),this.animators.push(e),i&&i.animation.addAnimator(e),i&&i.wakeUp()},t.prototype.updateDuringAnimation=function(e){this.markRedraw()},t.prototype.stopAnimation=function(e,n){for(var i=this.animators,r=i.length,o=[],s=0;s<r;s++){var a=i[s];!e||e===a.scope?a.stop(n):o.push(a)}return this.animators=o,this},t.prototype.animateTo=function(e,n,i){UE(this,e,n,i)},t.prototype.animateFrom=function(e,n,i){UE(this,e,n,i,!0)},t.prototype._transitionState=function(e,n,i,r){for(var o=UE(this,n,i,r),s=0;s<o.length;s++)o[s].__fromStateTransition=e},t.prototype.getBoundingRect=function(){return null},t.prototype.getPaintRect=function(){return null},t.initDefaultProps=(function(){var e=t.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=Jo;function n(i,r,o,s){Object.defineProperty(e,i,{get:function(){if(!this[r]){var l=this[r]=[];a(this,l)}return this[r]},set:function(l){this[o]=l[0],this[s]=l[1],this[r]=l,a(this,l)}});function a(l,u){Object.defineProperty(u,0,{get:function(){return l[o]},set:function(c){l[o]=c}}),Object.defineProperty(u,1,{get:function(){return l[s]},set:function(c){l[s]=c}})}}Object.defineProperty&&(n("position","_legacyPos","x","y"),n("scale","_legacyScale","scaleX","scaleY"),n("origin","_legacyOrigin","originX","originY"))})(),t})();kl(BS,Tl);kl(BS,qO);function UE(t,e,n,i,r){n=n||{};var o=[];yZ(t,"",t,e,n,i,o,r);var s=o.length,a=!1,l=n.done,u=n.aborted,c=function(){a=!0,s--,s<=0&&(a?l&&l():u&&u())},d=function(){s--,s<=0&&(a?l&&l():u&&u())};s||l&&l(),o.length>0&&n.during&&o[0].during(function(m,g){n.during(g)});for(var f=0;f<o.length;f++){var h=o[f];c&&h.done(c),d&&h.aborted(d),n.force&&h.duration(n.duration),h.start(n.easing)}return o}function WE(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function fKe(t){return Vo(t[0])}function hKe(t,e,n){if(Vo(e[n]))if(Vo(t[n])||(t[n]=[]),Fo(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),WE(t[n],e[n],i))}else{var r=e[n],o=t[n],s=r.length;if(fKe(r))for(var a=r[0].length,l=0;l<s;l++)o[l]?WE(o[l],r[l],a):o[l]=Array.prototype.slice.call(r[l]);else WE(o,r,s);o.length=r.length}else t[n]=e[n]}function mKe(t,e){return t===e||Vo(t)&&Vo(e)&&gKe(t,e)}function gKe(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}function yZ(t,e,n,i,r,o,s,a){for(var l=hi(i),u=r.duration,c=r.delay,d=r.additive,f=r.setToFinal,h=!Rt(o),m=t.animators,g=[],v=0;v<l.length;v++){var p=l[v],b=i[p];if(b!=null&&n[p]!=null&&(h||o[p]))if(Rt(b)&&!Vo(b)&&!OS(b)){if(e){a||(n[p]=b,t.updateDuringAnimation(e));continue}yZ(t,p,n[p],b,r,o&&o[p],s,a)}else g.push(p);else a||(n[p]=b,t.updateDuringAnimation(e),g.push(p))}var y=g.length;if(!d&&y)for(var _=0;_<m.length;_++){var C=m[_];if(C.targetName===e){var S=C.stopTracks(g);if(S){var k=Dn(m,C);m.splice(k,1)}}}if(r.force||(g=gr(g,function(P){return!mKe(i[P],n[P])}),y=g.length),y>0||r.force&&!s.length){var T=void 0,E=void 0,x=void 0;if(a){E={},f&&(T={});for(var _=0;_<y;_++){var p=g[_];E[p]=n[p],f?T[p]=i[p]:n[p]=i[p]}}else if(f){x={};for(var _=0;_<y;_++){var p=g[_];x[p]=l_(n[p]),hKe(n,i,p)}}var C=new WO(n,!1,!1,d?gr(m,function(A){return A.targetName===e}):null);C.targetName=e,r.scope&&(C.scope=r.scope),f&&T&&C.whenWithKeys(0,T,g),x&&C.whenWithKeys(0,x,g),C.whenWithKeys(u??500,a?E:i,g).delay(c||0),t.addAnimator(C,e),s.push(C)}}var ao=(function(t){yt(e,t);function e(n){var i=t.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(n),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(n){return this._children[n]},e.prototype.childOfName=function(n){for(var i=this._children,r=0;r<i.length;r++)if(i[r].name===n)return i[r]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(n){return n&&n!==this&&n.parent!==this&&(this._children.push(n),this._doAdd(n)),this},e.prototype.addBefore=function(n,i){if(n&&n!==this&&n.parent!==this&&i&&i.parent===this){var r=this._children,o=r.indexOf(i);o>=0&&(r.splice(o,0,n),this._doAdd(n))}return this},e.prototype.replace=function(n,i){var r=Dn(this._children,n);return r>=0&&this.replaceAt(i,r),this},e.prototype.replaceAt=function(n,i){var r=this._children,o=r[i];if(n&&n!==this&&n.parent!==this&&n!==o){r[i]=n,o.parent=null;var s=this.__zr;s&&o.removeSelfFromZr(s),this._doAdd(n)}return this},e.prototype._doAdd=function(n){n.parent&&n.parent.remove(n),n.parent=this;var i=this.__zr;i&&i!==n.__zr&&n.addSelfToZr(i),i&&i.refresh()},e.prototype.remove=function(n){var i=this.__zr,r=this._children,o=Dn(r,n);return o<0?this:(r.splice(o,1),n.parent=null,i&&n.removeSelfFromZr(i),i&&i.refresh(),this)},e.prototype.removeAll=function(){for(var n=this._children,i=this.__zr,r=0;r<n.length;r++){var o=n[r];i&&o.removeSelfFromZr(i),o.parent=null}return n.length=0,this},e.prototype.eachChild=function(n,i){for(var r=this._children,o=0;o<r.length;o++){var s=r[o];n.call(i,s,o)}return this},e.prototype.traverse=function(n,i){for(var r=0;r<this._children.length;r++){var o=this._children[r],s=n.call(i,o);o.isGroup&&!s&&o.traverse(n,i)}return this},e.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++){var r=this._children[i];r.addSelfToZr(n)}},e.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++){var r=this._children[i];r.removeSelfFromZr(n)}},e.prototype.getBoundingRect=function(n){for(var i=new nn(0,0,0,0),r=n||this._children,o=[],s=null,a=0;a<r.length;a++){var l=r[a];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(o);c?(nn.applyTransform(i,u,c),s=s||i.clone(),s.union(i)):(s=s||u.clone(),s.union(u))}}return s||i},e})(BS);ao.prototype.type="group";var f_={},wZ={};function pKe(t){delete wZ[t]}function vKe(t){if(!t)return!1;if(typeof t=="string")return O1(t,1)<_P;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,r=0;r<i;r++)n+=O1(e[r].color,1);return n/=i,n<_P}return!1}var bKe=(function(){function t(e,n,i){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=n,this.id=e;var o=new Nje,s=i.renderer||"canvas";f_[s]||(s=hi(f_)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var a=new f_[s](n,o,i,e),l=i.ssr||a.ssrOnly;this.storage=o,this.painter=a;var u=!Kt.node&&!Kt.worker&&!l?new aKe(a.getViewportRoot(),a.root):null,c=i.useCoarsePointer,d=c==null||c==="auto"?Kt.touchEventsSupported:!!c,f=44,h;d&&(h=Ut(i.pointerSize,f)),this.handler=new iZ(o,a,u,a.root,h),this.animation=new eKe({stage:{update:l?null:function(){return r._flush(!0)}}}),l||this.animation.start()}return t.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},t.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},t.prototype.configLayer=function(e,n){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,n),this.refresh())},t.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=vKe(e))},t.prototype.getBackgroundColor=function(){return this._backgroundColor},t.prototype.setDarkMode=function(e){this._darkMode=e},t.prototype.isDarkMode=function(){return this._darkMode},t.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},t.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},t.prototype.flush=function(){this._disposed||this._flush(!1)},t.prototype._flush=function(e){var n,i=Zh();this._needsRefresh&&(n=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(n=!0,this.refreshHoverImmediately());var r=Zh();n?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:r-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},t.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},t.prototype.findHover=function(e,n){if(!this._disposed)return this.handler.findHover(e,n)},t.prototype.on=function(e,n,i){return this._disposed||this.handler.on(e,n,i),this},t.prototype.off=function(e,n){this._disposed||this.handler.off(e,n)},t.prototype.trigger=function(e,n){this._disposed||this.handler.trigger(e,n)},t.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),n=0;n<e.length;n++)e[n]instanceof ao&&e[n].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},t.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,pKe(this.id))},t})();function y8(t,e){var n=new bKe(GJ(),t,e);return wZ[n.id]=n,n}function yKe(t,e){f_[t]=e}var w8=1e-4,_Z=20;function wKe(t){return t.replace(/^\s+|\s+$/g,"")}var wb=Math.min,ns=Math.max,Ga=Math.abs;function _8(t,e,n,i){var r=e[0],o=e[1],s=n[0],a=n[1],l=o-r,u=a-s;if(l===0)return u===0?s:(s+a)/2;if(i)if(l>0){if(t<=r)return s;if(t>=o)return a}else{if(t>=r)return s;if(t<=o)return a}else{if(t===r)return s;if(t===o)return a}return(t-r)/l*u+s}var eo=_Ke;function _Ke(t,e,n){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%";break}return TP(t,e,n)}function TP(t,e,n){return At(t)?wKe(t).match(/%$/)?parseFloat(t)/100*e+(n||0):parseFloat(t):t==null?NaN:+t}function _r(t,e,n){return e==null&&(e=10),e=Math.min(Math.max(0,e),_Z),t=(+t).toFixed(e),n?t:+t}function nu(t){if(t=+t,isNaN(t))return 0;if(t>1e-14){for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n}return CKe(t)}function CKe(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),s=o<0?0:r-1-o;return Math.max(0,s-i)}function SKe(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Ga(e[1]-e[0]))/i),s=Math.min(Math.max(-r+o,0),20);return isFinite(s)?s:20}function kKe(t,e){var n=Math.max(nu(t),nu(e)),i=t+e;return n>_Z?i:_r(i,n)}function CZ(t){var e=Math.PI*2;return(t%e+e)%e}function D1(t){return t>-w8&&t<w8}var TKe=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function kg(t){if(t instanceof Date)return t;if(At(t)){var e=TKe.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(n-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(t==null)return new Date(NaN);return new Date(Math.round(t))}function EKe(t){return Math.pow(10,jO(t))}function jO(t){if(t===0)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return t/Math.pow(10,e)>=10&&e++,e}function SZ(t,e){var n=jO(t),i=Math.pow(10,n),r=t/i,o;return r<1.5?o=1:r<2.5?o=2:r<4?o=3:r<7?o=5:o=10,t=o*i,n>=-20?+t.toFixed(n<0?-n:0):t}function N1(t){var e=parseFloat(t);return e==t&&(e!==0||!At(t)||t.indexOf("x")<=0)?e:NaN}function xKe(t){return!isNaN(N1(t))}function kZ(){return Math.round(Math.random()*9)}function TZ(t,e){return e===0?t:TZ(e,t%e)}function C8(t,e){return t==null?e:e==null?t:t*e/TZ(t,e)}var AKe="[ECharts] ",PKe=typeof console<"u"&&console.warn&&console.log;function IKe(t,e,n){PKe&&console[t](AKe+e)}function EZ(t,e){IKe("error",t)}function _o(t){throw new Error(t)}function S8(t,e,n){return(e-t)*n+t}var xZ="series\0",RKe="\0_ec_\0";function io(t){return t instanceof Array?t:t==null?[]:[t]}function k8(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var o=n[i];!t.emphasis[e].hasOwnProperty(o)&&t[e].hasOwnProperty(o)&&(t.emphasis[e][o]=t[e][o])}}}var T8=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function w0(t){return Rt(t)&&!bt(t)&&!(t instanceof Date)?t.value:t}function MKe(t){return Rt(t)&&!(t instanceof Array)}function OKe(t,e,n){var i=n==="normalMerge",r=n==="replaceMerge",o=n==="replaceAll";t=t||[],e=(e||[]).slice();var s=cn();ue(e,function(l,u){if(!Rt(l)){e[u]=null;return}});var a=LKe(t,s,n);return(i||r)&&DKe(a,t,s,e),i&&NKe(a,e),i||r?BKe(a,e,r):o&&VKe(a,e),FKe(a),a}function LKe(t,e,n){var i=[];if(n==="replaceAll")return i;for(var r=0;r<t.length;r++){var o=t[r];o&&o.id!=null&&e.set(o.id,r),i.push({existing:n==="replaceMerge"||_b(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return i}function DKe(t,e,n,i){ue(i,function(r,o){if(!(!r||r.id==null)){var s=hv(r.id),a=n.get(s);if(a!=null){var l=t[a];_u(!l.newOption,'Duplicated option on id "'+s+'".'),l.newOption=r,l.existing=e[a],i[o]=null}}})}function NKe(t,e){ue(e,function(n,i){if(!(!n||n.name==null))for(var r=0;r<t.length;r++){var o=t[r].existing;if(!t[r].newOption&&o&&(o.id==null||n.id==null)&&!_b(n)&&!_b(o)&&AZ("name",o,n)){t[r].newOption=n,e[i]=null;return}}})}function BKe(t,e,n){ue(e,function(i){if(i){for(var r,o=0;(r=t[o])&&(r.newOption||_b(r.existing)||r.existing&&i.id!=null&&!AZ("id",i,r.existing));)o++;r?(r.newOption=i,r.brandNew=n):t.push({newOption:i,brandNew:n,existing:null,keyInfo:null}),o++}})}function VKe(t,e){ue(e,function(n){t.push({newOption:n,brandNew:!0,existing:null,keyInfo:null})})}function FKe(t){var e=cn();ue(t,function(n){var i=n.existing;i&&e.set(i.id,n)}),ue(t,function(n){var i=n.newOption;_u(!i||i.id==null||!e.get(i.id)||e.get(i.id)===n,"id duplicates: "+(i&&i.id)),i&&i.id!=null&&e.set(i.id,n),!n.keyInfo&&(n.keyInfo={})}),ue(t,function(n,i){var r=n.existing,o=n.newOption,s=n.keyInfo;if(Rt(o)){if(s.name=o.name!=null?hv(o.name):r?r.name:xZ+i,r)s.id=hv(r.id);else if(o.id!=null)s.id=hv(o.id);else{var a=0;do s.id="\0"+s.name+"\0"+a++;while(e.get(s.id))}e.set(s.id,n)}})}function AZ(t,e,n){var i=il(e[t],null),r=il(n[t],null);return i!=null&&r!=null&&i===r}function hv(t){return il(t,"")}function il(t,e){return t==null?e:At(t)?t:ai(t)||iP(t)?t+"":e}function PZ(t){var e=t.name;return!!(e&&e.indexOf(xZ))}function _b(t){return t&&t.id!=null&&hv(t.id).indexOf(RKe)===0}function $Ke(t,e,n){ue(t,function(i){var r=i.newOption;Rt(r)&&(i.keyInfo.mainType=e,i.keyInfo.subType=zKe(e,r,i.existing,n))})}function zKe(t,e,n,i){var r=e.type?e.type:n?n.subType:i.determineSubType(t,e);return r}function Ef(t,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return bt(e.dataIndex)?jt(e.dataIndex,function(n){return t.indexOfRawIndex(n)}):t.indexOfRawIndex(e.dataIndex);if(e.name!=null)return bt(e.name)?jt(e.name,function(n){return t.indexOfName(n)}):t.indexOfName(e.name)}function Di(){var t="__ec_inner_"+HKe++;return function(e){return e[t]||(e[t]={})}}var HKe=kZ();function qE(t,e,n){var i=KO(e,n),r=i.mainTypeSpecified,o=i.queryOptionMap,s=i.others,a=s,l=n?n.defaultMainType:null;return!r&&l&&o.set(l,{}),o.each(function(u,c){var d=_0(t,c,u,{useDefault:l===c,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});a[c+"Models"]=d.models,a[c+"Model"]=d.models[0]}),a}function KO(t,e){var n;if(At(t)){var i={};i[t+"Index"]=0,n=i}else n=t;var r=cn(),o={},s=!1;return ue(n,function(a,l){if(l==="dataIndex"||l==="dataIndexInside"){o[l]=a;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],d=(u[2]||"").toLowerCase();if(!(!c||!d||e&&e.includeMainTypes&&Dn(e.includeMainTypes,c)<0)){s=s||!!c;var f=r.get(c)||r.set(c,{});f[d]=a}}),{mainTypeSpecified:s,queryOptionMap:r,others:o}}var As={useDefault:!0,enableAll:!1,enableNone:!1};function _0(t,e,n,i){i=i||As;var r=n.index,o=n.id,s=n.name,a={models:null,specified:r!=null||o!=null||s!=null};if(!a.specified){var l=void 0;return a.models=i.useDefault&&(l=t.getComponent(e))?[l]:[],a}if(r==="none"||r===!1){if(i.enableNone)return a.models=[],a;r=-1}return r==="all"&&(i.enableAll?r=o=s=null:r=-1),a.models=t.queryComponents({mainType:e,index:r,id:o,name:s}),a}function IZ(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function UKe(t,e){return t.getAttribute?t.getAttribute(e):t[e]}function WKe(t){return t==="auto"?Kt.domSupported?"html":"richText":t||"html"}function qKe(t,e,n,i,r){var o=e==null||e==="auto";if(i==null)return i;if(ai(i)){var s=S8(n||0,i,r);return _r(s,o?Math.max(nu(n||0),nu(i)):e)}else{if(At(i))return r<1?n:i;for(var a=[],l=n,u=i,c=Math.max(l?l.length:0,u.length),d=0;d<c;++d){var f=t.getDimensionInfo(d);if(f&&f.type==="ordinal")a[d]=(r<1&&l?l:u)[d];else{var h=l&&l[d]?l[d]:0,m=u[d],s=S8(h,m,r);a[d]=_r(s,o?Math.max(nu(h),nu(m)):e)}}return a}}var jKe=".",vd="___EC__COMPONENT__CONTAINER___",RZ="___EC__EXTENDED_CLASS___";function Ya(t){var e={main:"",sub:""};if(t){var n=t.split(jKe);e.main=n[0]||"",e.sub=n[1]||""}return e}function KKe(t){_u(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}function GKe(t){return!!(t&&t[RZ])}function GO(t,e){t.$constructor=t,t.extend=function(n){var i=this,r;return YKe(i)?r=(function(o){yt(s,o);function s(){return o.apply(this,arguments)||this}return s})(i):(r=function(){(n.$constructor||i).apply(this,arguments)},Kqe(r,this)),lt(r.prototype,n),r[RZ]=!0,r.extend=this.extend,r.superCall=ZKe,r.superApply=QKe,r.superClass=i,r}}function YKe(t){return Xt(t)&&/^class\s/.test(Function.prototype.toString.call(t))}function MZ(t,e){t.extend=e.extend}var XKe=Math.round(Math.random()*10);function JKe(t){var e=["__\0is_clz",XKe++].join("_");t.prototype[e]=!0,t.isInstance=function(n){return!!(n&&n[e])}}function ZKe(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function QKe(t,e,n){return this.superClass.prototype[e].apply(t,n)}function VS(t){var e={};t.registerClass=function(i){var r=i.type||i.prototype.type;if(r){KKe(r),i.prototype.type=r;var o=Ya(r);if(!o.sub)e[o.main]=i;else if(o.sub!==vd){var s=n(o);s[o.sub]=i}}return i},t.getClass=function(i,r,o){var s=e[i];if(s&&s[vd]&&(s=r?s[r]:null),o&&!s)throw new Error(r?"Component "+i+"."+(r||"")+" is used but not imported.":i+".type should be specified.");return s},t.getClassesByMainType=function(i){var r=Ya(i),o=[],s=e[r.main];return s&&s[vd]?ue(s,function(a,l){l!==vd&&o.push(a)}):o.push(s),o},t.hasClass=function(i){var r=Ya(i);return!!e[r.main]},t.getAllClassMainTypes=function(){var i=[];return ue(e,function(r,o){i.push(o)}),i},t.hasSubTypes=function(i){var r=Ya(i),o=e[r.main];return o&&o[vd]};function n(i){var r=e[i.main];return(!r||!r[vd])&&(r=e[i.main]={},r[vd]=!0),r}}function Cb(t,e){for(var n=0;n<t.length;n++)t[n][1]||(t[n][1]=t[n][0]);return e=e||!1,function(i,r,o){for(var s={},a=0;a<t.length;a++){var l=t[a][1];if(!(r&&Dn(r,l)>=0||o&&Dn(o,l)<0)){var u=i.getShallow(l,e);u!=null&&(s[t[a][0]]=u)}}return s}}var eGe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],tGe=Cb(eGe),nGe=(function(){function t(){}return t.prototype.getAreaStyle=function(e,n){return tGe(this,e,n)},t})(),EP=new tg(50);function iGe(t){if(typeof t=="string"){var e=EP.get(t);return e&&e.image}else return t}function OZ(t,e,n,i,r){if(t)if(typeof t=="string"){if(e&&e.__zrImageSrc===t||!n)return e;var o=EP.get(t),s={hostEl:n,cb:i,cbPayload:r};return o?(e=o.image,!FS(e)&&o.pending.push(s)):(e=wu.loadImage(t,E8,E8),e.__zrImageSrc=t,EP.put(t,e.__cachedImgObj={image:e,pending:[s]})),e}else return t;else return e}function E8(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function FS(t){return t&&t.width&&t.height}var jE=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function rGe(t,e,n,i,r,o){if(!n){t.text="",t.isTruncated=!1;return}var s=(e+"").split(`
`);o=LZ(n,i,r,o);for(var a=!1,l={},u=0,c=s.length;u<c;u++)DZ(l,s[u],o),s[u]=l.textLine,a=a||l.isTruncated;t.text=s.join(`
`),t.isTruncated=a}function LZ(t,e,n,i){i=i||{};var r=lt({},i);n=Ut(n,"..."),r.maxIterations=Ut(i.maxIterations,2);var o=r.minChar=Ut(i.minChar,0),s=r.fontMeasureInfo=tl(e),a=s.asciiCharWidth;r.placeholder=Ut(i.placeholder,"");for(var l=t=Math.max(0,t-1),u=0;u<o&&l>=a;u++)l-=a;var c=nl(s,n);return c>l&&(n="",c=0),l=t-c,r.ellipsis=n,r.ellipsisWidth=c,r.contentWidth=l,r.containerWidth=t,r}function DZ(t,e,n){var i=n.containerWidth,r=n.contentWidth,o=n.fontMeasureInfo;if(!i){t.textLine="",t.isTruncated=!1;return}var s=nl(o,e);if(s<=i){t.textLine=e,t.isTruncated=!1;return}for(var a=0;;a++){if(s<=r||a>=n.maxIterations){e+=n.ellipsis;break}var l=a===0?oGe(e,r,o):s>0?Math.floor(e.length*r/s):0;e=e.substr(0,l),s=nl(o,e)}e===""&&(e=n.placeholder),t.textLine=e,t.isTruncated=!0}function oGe(t,e,n){for(var i=0,r=0,o=t.length;r<o&&i<e;r++)i+=pZ(n,t.charCodeAt(r));return r}function sGe(t,e,n,i){var r=YO(t),o=e.overflow,s=e.padding,a=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=e.font,c=o==="truncate",d=NS(u),f=Ut(e.lineHeight,d),h=e.lineOverflow==="truncate",m=!1,g=e.width;g==null&&n!=null&&(g=n-a);var v=e.height;v==null&&i!=null&&(v=i-l);var p;g!=null&&(o==="break"||o==="breakAll")?p=r?NZ(r,e.font,g,o==="breakAll",0).lines:[]:p=r?r.split(`
`):[];var b=p.length*f;if(v==null&&(v=b),b>v&&h){var y=Math.floor(v/f);m=m||p.length>y,p=p.slice(0,y),b=p.length*f}if(r&&c&&g!=null)for(var _=LZ(g,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),C={},S=0;S<p.length;S++)DZ(C,p[S],_),p[S]=C.textLine,m=m||C.isTruncated;for(var k=v,T=0,E=tl(u),S=0;S<p.length;S++)T=Math.max(nl(E,p[S]),T);g==null&&(g=T);var x=g;return k+=l,x+=a,{lines:p,height:v,outerWidth:x,outerHeight:k,lineHeight:f,calculatedLineHeight:d,contentWidth:T,contentHeight:b,width:g,isTruncated:m}}var aGe=(function(){function t(){}return t})(),x8=(function(){function t(e){this.tokens=[],e&&(this.tokens=e)}return t})(),lGe=(function(){function t(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return t})();function uGe(t,e,n,i,r){var o=new lGe,s=YO(t);if(!s)return o;var a=e.padding,l=a?a[1]+a[3]:0,u=a?a[0]+a[2]:0,c=e.width;c==null&&n!=null&&(c=n-l);var d=e.height;d==null&&i!=null&&(d=i-u);for(var f=e.overflow,h=(f==="break"||f==="breakAll")&&c!=null?{width:c,accumWidth:0,breakAll:f==="breakAll"}:null,m=jE.lastIndex=0,g;(g=jE.exec(s))!=null;){var v=g.index;v>m&&KE(o,s.substring(m,v),e,h),KE(o,g[2],e,h,g[1]),m=jE.lastIndex}m<s.length&&KE(o,s.substring(m,s.length),e,h);var p=[],b=0,y=0,_=f==="truncate",C=e.lineOverflow==="truncate",S={};function k(he,X,se){he.width=X,he.lineHeight=se,b+=se,y=Math.max(y,X)}e:for(var T=0;T<o.lines.length;T++){for(var E=o.lines[T],x=0,P=0,A=0;A<E.tokens.length;A++){var I=E.tokens[A],D=I.styleName&&e.rich[I.styleName]||{},q=I.textPadding=D.padding,z=q?q[1]+q[3]:0,R=I.font=D.font||e.font;I.contentHeight=NS(R);var O=Ut(D.height,I.contentHeight);if(I.innerHeight=O,q&&(O+=q[0]+q[2]),I.height=O,I.lineHeight=bm(D.lineHeight,e.lineHeight,O),I.align=D&&D.align||r,I.verticalAlign=D&&D.verticalAlign||"middle",C&&d!=null&&b+I.lineHeight>d){var N=o.lines.length;A>0?(E.tokens=E.tokens.slice(0,A),k(E,P,x),o.lines=o.lines.slice(0,T+1)):o.lines=o.lines.slice(0,T),o.isTruncated=o.isTruncated||o.lines.length<N;break e}var F=D.width,j=F==null||F==="auto";if(typeof F=="string"&&F.charAt(F.length-1)==="%")I.percentWidth=F,p.push(I),I.contentWidth=nl(tl(R),I.text);else{if(j){var U=D.backgroundColor,W=U&&U.image;W&&(W=iGe(W),FS(W)&&(I.width=Math.max(I.width,W.width*O/W.height)))}var J=_&&c!=null?c-P:null;J!=null&&J<I.width?!j||J<z?(I.text="",I.width=I.contentWidth=0):(rGe(S,I.text,J-z,R,e.ellipsis,{minChar:e.truncateMinChar}),I.text=S.text,o.isTruncated=o.isTruncated||S.isTruncated,I.width=I.contentWidth=nl(tl(R),I.text)):I.contentWidth=nl(tl(R),I.text)}I.width+=z,P+=I.width,D&&(x=Math.max(x,I.lineHeight))}k(E,P,x)}o.outerWidth=o.width=Ut(c,y),o.outerHeight=o.height=Ut(d,b),o.contentHeight=b,o.contentWidth=y,o.outerWidth+=l,o.outerHeight+=u;for(var T=0;T<p.length;T++){var I=p[T],ne=I.percentWidth;I.width=parseInt(ne,10)/100*o.width}return o}function KE(t,e,n,i,r){var o=e==="",s=r&&n.rich[r]||{},a=t.lines,l=s.font||n.font,u=!1,c,d;if(i){var f=s.padding,h=f?f[1]+f[3]:0;if(s.width!=null&&s.width!=="auto"){var m=Tf(s.width,i.width)+h;a.length>0&&m+i.accumWidth>i.width&&(c=e.split(`
`),u=!0),i.accumWidth=m}else{var g=NZ(e,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+h,d=g.linesWidths,c=g.lines}}c||(c=e.split(`
`));for(var v=tl(l),p=0;p<c.length;p++){var b=c[p],y=new aGe;if(y.styleName=r,y.text=b,y.isLineHolder=!b&&!o,typeof s.width=="number"?y.width=s.width:y.width=d?d[p]:nl(v,b),!p&&!u){var _=(a[a.length-1]||(a[0]=new x8)).tokens,C=_.length;C===1&&_[0].isLineHolder?_[0]=y:(b||!C||o)&&_.push(y)}else a.push(new x8([y]))}}function cGe(t){var e=t.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var dGe=Cg(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function fGe(t){return cGe(t)?!!dGe[t]:!0}function NZ(t,e,n,i,r){for(var o=[],s=[],a="",l="",u=0,c=0,d=tl(e),f=0;f<t.length;f++){var h=t.charAt(f);if(h===`
`){l&&(a+=l,c+=u),o.push(a),s.push(c),a="",l="",u=0,c=0;continue}var m=pZ(d,h.charCodeAt(0)),g=i?!1:!fGe(h);if(o.length?c+m>n:r+c+m>n){c?(a||l)&&(g?(a||(a=l,l="",u=0,c=u),o.push(a),s.push(c-u),l+=h,u+=m,a="",c=u):(l&&(a+=l,l="",u=0),o.push(a),s.push(c),a=h,c=m)):g?(o.push(l),s.push(u),l=h,u=m):(o.push(h),s.push(m));continue}c+=m,g?(l+=h,u+=m):(l&&(a+=l,l="",u=0),a+=h)}return l&&(a+=l),a&&(o.push(a),s.push(c)),o.length===1&&(c+=r),{accumWidth:c,lines:o,linesWidths:s}}function A8(t,e,n,i,r,o){if(t.baseX=n,t.baseY=i,t.outerWidth=t.outerHeight=null,!!e){var s=e.width*2,a=e.height*2;nn.set(P8,ng(n,s,r),uf(i,a,o),s,a),nn.intersect(e,P8,null,I8);var l=I8.outIntersectRect;t.outerWidth=l.width,t.outerHeight=l.height,t.baseX=ng(l.x,l.width,r,!0),t.baseY=uf(l.y,l.height,o,!0)}}var P8=new nn(0,0,0,0),I8={outIntersectRect:{},clamp:!0};function YO(t){return t!=null?t+="":t=""}function hGe(t){var e=YO(t.text),n=t.font,i=nl(tl(n),e),r=NS(n);return xP(t,i,r,null)}function xP(t,e,n,i){var r=new nn(ng(t.x||0,e,t.textAlign),uf(t.y||0,n,t.textBaseline),e,n),o=i??(BZ(t)?t.lineWidth:0);return o>0&&(r.x-=o/2,r.y-=o/2,r.width+=o,r.height+=o),r}function BZ(t){var e=t.stroke;return e!=null&&e!=="none"&&t.lineWidth>0}var AP="__zr_style_"+Math.round(Math.random()*10),cf={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},$S={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};cf[AP]=!0;var R8=["z","z2","invisible"],mGe=["invisible"],C0=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype._init=function(n){for(var i=hi(n),r=0;r<i.length;r++){var o=i[r];o==="style"?this.useStyle(n[o]):t.prototype.attrKV.call(this,o,n[o])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(n,i,r,o){var s=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&gGe(this,n,i)||s&&!s[0]&&!s[3])return!1;if(r&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(o&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(n,i){return this.rectContain(n,i)},e.prototype.traverse=function(n,i){n.call(i,this)},e.prototype.rectContain=function(n,i){var r=this.transformCoordToLocal(n,i),o=this.getBoundingRect();return o.contain(r[0],r[1])},e.prototype.getPaintRect=function(){var n=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,r=this.getBoundingRect(),o=this.style,s=o.shadowBlur||0,a=o.shadowOffsetX||0,l=o.shadowOffsetY||0;n=this._paintRect||(this._paintRect=new nn(0,0,0,0)),i?nn.applyTransform(n,r,i):n.copy(r),(s||a||l)&&(n.width+=s*2+Math.abs(a),n.height+=s*2+Math.abs(l),n.x=Math.min(n.x,n.x+a-s),n.y=Math.min(n.y,n.y+l-s));var u=this.dirtyRectTolerance;n.isZero()||(n.x=Math.floor(n.x-u),n.y=Math.floor(n.y-u),n.width=Math.ceil(n.width+1+u*2),n.height=Math.ceil(n.height+1+u*2))}return n},e.prototype.setPrevPaintRect=function(n){n?(this._prevPaintRect=this._prevPaintRect||new nn(0,0,0,0),this._prevPaintRect.copy(n)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(n){return this.animate("style",n)},e.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(n,i){n!=="style"?t.prototype.attrKV.call(this,n,i):this.style?this.setStyle(i):this.useStyle(i)},e.prototype.setStyle=function(n,i){return typeof n=="string"?this.style[n]=i:lt(this.style,n),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(n){n||this.markRedraw(),this.__dirty|=kp,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&kp)},e.prototype.styleUpdated=function(){this.__dirty&=~kp},e.prototype.createStyle=function(n){return LS(cf,n)},e.prototype.useStyle=function(n){n[AP]||(n=this.createStyle(n)),this.__inHover?this.__hoverStyle=n:this.style=n,this.dirtyStyle()},e.prototype.isStyleObject=function(n){return n[AP]},e.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(n,i,R8)},e.prototype._applyStateObj=function(n,i,r,o,s,a){t.prototype._applyStateObj.call(this,n,i,r,o,s,a);var l=!(i&&o),u;if(i&&i.style?s?o?u=i.style:(u=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),o?this.style:r.style),this._mergeStyle(u,i.style)):l&&(u=r.style),u)if(s){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var d=hi(c),f=0;f<d.length;f++){var h=d[f];h in u&&(u[h]=u[h],this.style[h]=c[h])}for(var m=hi(u),f=0;f<m.length;f++){var h=m[f];this.style[h]=this.style[h]}this._transitionState(n,{style:u},a,this.getAnimationStyleProps())}else this.useStyle(u);for(var g=this.__inHover?mGe:R8,f=0;f<g.length;f++){var h=g[f];i&&i[h]!=null?this[h]=i[h]:l&&r[h]!=null&&(this[h]=r[h])}},e.prototype._mergeStates=function(n){for(var i=t.prototype._mergeStates.call(this,n),r,o=0;o<n.length;o++){var s=n[o];s.style&&(r=r||{},this._mergeStyle(r,s.style))}return r&&(i.style=r),i},e.prototype._mergeStyle=function(n,i){return lt(n,i),n},e.prototype.getAnimationStyleProps=function(){return $S},e.initDefaultProps=(function(){var n=e.prototype;n.type="displayable",n.invisible=!1,n.z=0,n.z2=0,n.zlevel=0,n.culling=!1,n.cursor="pointer",n.rectHover=!1,n.incremental=!1,n._rect=null,n.dirtyRectTolerance=0,n.__dirty=Jo|kp})(),e})(BS),GE=new nn(0,0,0,0),YE=new nn(0,0,0,0);function gGe(t,e,n){return GE.copy(t.getBoundingRect()),t.transform&&GE.applyTransform(t.transform),YE.width=e,YE.height=n,!GE.intersect(YE)}var Es=Math.min,xs=Math.max,XE=Math.sin,JE=Math.cos,bd=Math.PI*2,Vy=Sg(),Fy=Sg(),$y=Sg();function M8(t,e,n,i,r,o){r[0]=Es(t,n),r[1]=Es(e,i),o[0]=xs(t,n),o[1]=xs(e,i)}var O8=[],L8=[];function pGe(t,e,n,i,r,o,s,a,l,u){var c=lZ,d=pr,f=c(t,n,r,s,O8);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var h=0;h<f;h++){var m=d(t,n,r,s,O8[h]);l[0]=Es(m,l[0]),u[0]=xs(m,u[0])}f=c(e,i,o,a,L8);for(var h=0;h<f;h++){var g=d(e,i,o,a,L8[h]);l[1]=Es(g,l[1]),u[1]=xs(g,u[1])}l[0]=Es(t,l[0]),u[0]=xs(t,u[0]),l[0]=Es(s,l[0]),u[0]=xs(s,u[0]),l[1]=Es(e,l[1]),u[1]=xs(e,u[1]),l[1]=Es(a,l[1]),u[1]=xs(a,u[1])}function vGe(t,e,n,i,r,o,s,a){var l=uZ,u=wo,c=xs(Es(l(t,n,r),1),0),d=xs(Es(l(e,i,o),1),0),f=u(t,n,r,c),h=u(e,i,o,d);s[0]=Es(t,r,f),s[1]=Es(e,o,h),a[0]=xs(t,r,f),a[1]=xs(e,o,h)}function bGe(t,e,n,i,r,o,s,a,l){var u=Yh,c=Xh,d=Math.abs(r-o);if(d%bd<1e-4&&d>1e-4){a[0]=t-n,a[1]=e-i,l[0]=t+n,l[1]=e+i;return}if(Vy[0]=JE(r)*n+t,Vy[1]=XE(r)*i+e,Fy[0]=JE(o)*n+t,Fy[1]=XE(o)*i+e,u(a,Vy,Fy),c(l,Vy,Fy),r=r%bd,r<0&&(r=r+bd),o=o%bd,o<0&&(o=o+bd),r>o&&!s?o+=bd:r<o&&s&&(r+=bd),s){var f=o;o=r,r=f}for(var h=0;h<o;h+=Math.PI/2)h>r&&($y[0]=JE(h)*n+t,$y[1]=XE(h)*i+e,u(a,$y,a),c(l,$y,l))}var Pn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},yd=[],wd=[],Oa=[],Bu=[],La=[],Da=[],ZE=Math.min,QE=Math.max,_d=Math.cos,Cd=Math.sin,Ol=Math.abs,PP=Math.PI,Qu=PP*2,ex=typeof Float32Array<"u",np=[];function tx(t){var e=Math.round(t/PP*1e8)/1e8;return e%2*PP}function yGe(t,e){var n=tx(t[0]);n<0&&(n+=Qu);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=Qu?r=n+Qu:e&&n-r>=Qu?r=n-Qu:!e&&n>r?r=n+(Qu-tx(n-r)):e&&n<r&&(r=n-(Qu-tx(r-n))),t[0]=n,t[1]=r}var xf=(function(){function t(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return t.prototype.increaseVersion=function(){this._version++},t.prototype.getVersion=function(){return this._version},t.prototype.setScale=function(e,n,i){i=i||0,i>0&&(this._ux=Ol(i/L1/e)||0,this._uy=Ol(i/L1/n)||0)},t.prototype.setDPR=function(e){this.dpr=e},t.prototype.setContext=function(e){this._ctx=e},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(e,n){return this._drawPendingPt(),this.addData(Pn.M,e,n),this._ctx&&this._ctx.moveTo(e,n),this._x0=e,this._y0=n,this._xi=e,this._yi=n,this},t.prototype.lineTo=function(e,n){var i=Ol(e-this._xi),r=Ol(n-this._yi),o=i>this._ux||r>this._uy;if(this.addData(Pn.L,e,n),this._ctx&&o&&this._ctx.lineTo(e,n),o)this._xi=e,this._yi=n,this._pendingPtDist=0;else{var s=i*i+r*r;s>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=n,this._pendingPtDist=s)}return this},t.prototype.bezierCurveTo=function(e,n,i,r,o,s){return this._drawPendingPt(),this.addData(Pn.C,e,n,i,r,o,s),this._ctx&&this._ctx.bezierCurveTo(e,n,i,r,o,s),this._xi=o,this._yi=s,this},t.prototype.quadraticCurveTo=function(e,n,i,r){return this._drawPendingPt(),this.addData(Pn.Q,e,n,i,r),this._ctx&&this._ctx.quadraticCurveTo(e,n,i,r),this._xi=i,this._yi=r,this},t.prototype.arc=function(e,n,i,r,o,s){this._drawPendingPt(),np[0]=r,np[1]=o,yGe(np,s),r=np[0],o=np[1];var a=o-r;return this.addData(Pn.A,e,n,i,i,r,a,0,s?0:1),this._ctx&&this._ctx.arc(e,n,i,r,o,s),this._xi=_d(o)*i+e,this._yi=Cd(o)*i+n,this},t.prototype.arcTo=function(e,n,i,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,n,i,r,o),this},t.prototype.rect=function(e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,n,i,r),this.addData(Pn.R,e,n,i,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Pn.Z);var e=this._ctx,n=this._x0,i=this._y0;return e&&e.closePath(),this._xi=n,this._yi=i,this},t.prototype.fill=function(e){e&&e.fill(),this.toStatic()},t.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(e){if(this._saveData){var n=e.length;!(this.data&&this.data.length===n)&&ex&&(this.data=new Float32Array(n));for(var i=0;i<n;i++)this.data[i]=e[i];this._len=n}},t.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var n=e.length,i=0,r=this._len,o=0;o<n;o++)i+=e[o].len();var s=this.data;if(ex&&(s instanceof Float32Array||!s)&&(this.data=new Float32Array(r+i),r>0&&s))for(var a=0;a<r;a++)this.data[a]=s[a];for(var o=0;o<n;o++)for(var l=e[o].data,a=0;a<l.length;a++)this.data[r++]=l[a];this._len=r}},t.prototype.addData=function(e,n,i,r,o,s,a,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var d=0;d<arguments.length;d++)c[this._len++]=arguments[d]}},t.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],n=0;n<this._len;n++)e[n]=this.data[n];this.data=e}},t.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,ex&&this._len>11&&(this.data=new Float32Array(e)))}},t.prototype.getBoundingRect=function(){Oa[0]=Oa[1]=La[0]=La[1]=Number.MAX_VALUE,Bu[0]=Bu[1]=Da[0]=Da[1]=-Number.MAX_VALUE;var e=this.data,n=0,i=0,r=0,o=0,s;for(s=0;s<this._len;){var a=e[s++],l=s===1;switch(l&&(n=e[s],i=e[s+1],r=n,o=i),a){case Pn.M:n=r=e[s++],i=o=e[s++],La[0]=r,La[1]=o,Da[0]=r,Da[1]=o;break;case Pn.L:M8(n,i,e[s],e[s+1],La,Da),n=e[s++],i=e[s++];break;case Pn.C:pGe(n,i,e[s++],e[s++],e[s++],e[s++],e[s],e[s+1],La,Da),n=e[s++],i=e[s++];break;case Pn.Q:vGe(n,i,e[s++],e[s++],e[s],e[s+1],La,Da),n=e[s++],i=e[s++];break;case Pn.A:var u=e[s++],c=e[s++],d=e[s++],f=e[s++],h=e[s++],m=e[s++]+h;s+=1;var g=!e[s++];l&&(r=_d(h)*d+u,o=Cd(h)*f+c),bGe(u,c,d,f,h,m,g,La,Da),n=_d(m)*d+u,i=Cd(m)*f+c;break;case Pn.R:r=n=e[s++],o=i=e[s++];var v=e[s++],p=e[s++];M8(r,o,r+v,o+p,La,Da);break;case Pn.Z:n=r,i=o;break}Yh(Oa,Oa,La),Xh(Bu,Bu,Da)}return s===0&&(Oa[0]=Oa[1]=Bu[0]=Bu[1]=0),new nn(Oa[0],Oa[1],Bu[0]-Oa[0],Bu[1]-Oa[1])},t.prototype._calculateLength=function(){var e=this.data,n=this._len,i=this._ux,r=this._uy,o=0,s=0,a=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,d=0,f=0;f<n;){var h=e[f++],m=f===1;m&&(o=e[f],s=e[f+1],a=o,l=s);var g=-1;switch(h){case Pn.M:o=a=e[f++],s=l=e[f++];break;case Pn.L:{var v=e[f++],p=e[f++],b=v-o,y=p-s;(Ol(b)>i||Ol(y)>r||f===n-1)&&(g=Math.sqrt(b*b+y*y),o=v,s=p);break}case Pn.C:{var _=e[f++],C=e[f++],v=e[f++],p=e[f++],S=e[f++],k=e[f++];g=Vje(o,s,_,C,v,p,S,k,10),o=S,s=k;break}case Pn.Q:{var _=e[f++],C=e[f++],v=e[f++],p=e[f++];g=zje(o,s,_,C,v,p,10),o=v,s=p;break}case Pn.A:var T=e[f++],E=e[f++],x=e[f++],P=e[f++],A=e[f++],I=e[f++],D=I+A;f+=1,m&&(a=_d(A)*x+T,l=Cd(A)*P+E),g=QE(x,P)*ZE(Qu,Math.abs(I)),o=_d(D)*x+T,s=Cd(D)*P+E;break;case Pn.R:{a=o=e[f++],l=s=e[f++];var q=e[f++],z=e[f++];g=q*2+z*2;break}case Pn.Z:{var b=a-o,y=l-s;g=Math.sqrt(b*b+y*y),o=a,s=l;break}}g>=0&&(u[d++]=g,c+=g)}return this._pathLen=c,c},t.prototype.rebuildPath=function(e,n){var i=this.data,r=this._ux,o=this._uy,s=this._len,a,l,u,c,d,f,h=n<1,m,g,v=0,p=0,b,y=0,_,C;if(!(h&&(this._pathSegLen||this._calculateLength(),m=this._pathSegLen,g=this._pathLen,b=n*g,!b)))e:for(var S=0;S<s;){var k=i[S++],T=S===1;switch(T&&(u=i[S],c=i[S+1],a=u,l=c),k!==Pn.L&&y>0&&(e.lineTo(_,C),y=0),k){case Pn.M:a=u=i[S++],l=c=i[S++],e.moveTo(u,c);break;case Pn.L:{d=i[S++],f=i[S++];var E=Ol(d-u),x=Ol(f-c);if(E>r||x>o){if(h){var P=m[p++];if(v+P>b){var A=(b-v)/P;e.lineTo(u*(1-A)+d*A,c*(1-A)+f*A);break e}v+=P}e.lineTo(d,f),u=d,c=f,y=0}else{var I=E*E+x*x;I>y&&(_=d,C=f,y=I)}break}case Pn.C:{var D=i[S++],q=i[S++],z=i[S++],R=i[S++],O=i[S++],N=i[S++];if(h){var P=m[p++];if(v+P>b){var A=(b-v)/P;R1(u,D,z,O,A,yd),R1(c,q,R,N,A,wd),e.bezierCurveTo(yd[1],wd[1],yd[2],wd[2],yd[3],wd[3]);break e}v+=P}e.bezierCurveTo(D,q,z,R,O,N),u=O,c=N;break}case Pn.Q:{var D=i[S++],q=i[S++],z=i[S++],R=i[S++];if(h){var P=m[p++];if(v+P>b){var A=(b-v)/P;M1(u,D,z,A,yd),M1(c,q,R,A,wd),e.quadraticCurveTo(yd[1],wd[1],yd[2],wd[2]);break e}v+=P}e.quadraticCurveTo(D,q,z,R),u=z,c=R;break}case Pn.A:var F=i[S++],j=i[S++],U=i[S++],W=i[S++],J=i[S++],ne=i[S++],he=i[S++],X=!i[S++],se=U>W?U:W,re=Ol(U-W)>.001,ee=J+ne,te=!1;if(h){var P=m[p++];v+P>b&&(ee=J+ne*(b-v)/P,te=!0),v+=P}if(re&&e.ellipse?e.ellipse(F,j,U,W,he,J,ee,X):e.arc(F,j,se,J,ee,X),te)break e;T&&(a=_d(J)*U+F,l=Cd(J)*W+j),u=_d(ee)*U+F,c=Cd(ee)*W+j;break;case Pn.R:a=u=i[S],l=c=i[S+1],d=i[S++],f=i[S++];var V=i[S++],K=i[S++];if(h){var P=m[p++];if(v+P>b){var G=b-v;e.moveTo(d,f),e.lineTo(d+ZE(G,V),f),G-=V,G>0&&e.lineTo(d+V,f+ZE(G,K)),G-=K,G>0&&e.lineTo(d+QE(V-G,0),f+K),G-=V,G>0&&e.lineTo(d,f+QE(K-G,0));break e}v+=P}e.rect(d,f,V,K);break;case Pn.Z:if(h){var P=m[p++];if(v+P>b){var A=(b-v)/P;e.lineTo(u*(1-A)+a*A,c*(1-A)+l*A);break e}v+=P}e.closePath(),u=a,c=l}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.prototype.canSave=function(){return!!this._saveData},t.CMD=Pn,t.initDefaultProps=(function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),t})();function wh(t,e,n,i,r,o,s){if(r===0)return!1;var a=r,l=0,u=t;if(s>e+a&&s>i+a||s<e-a&&s<i-a||o>t+a&&o>n+a||o<t-a&&o<n-a)return!1;if(t!==n)l=(e-i)/(t-n),u=(t*i-n*e)/(t-n);else return Math.abs(o-t)<=a/2;var c=l*o-s+u,d=c*c/(l*l+1);return d<=a/2*a/2}function wGe(t,e,n,i,r,o,s,a,l,u,c){if(l===0)return!1;var d=l;if(c>e+d&&c>i+d&&c>o+d&&c>a+d||c<e-d&&c<i-d&&c<o-d&&c<a-d||u>t+d&&u>n+d&&u>r+d&&u>s+d||u<t-d&&u<n-d&&u<r-d&&u<s-d)return!1;var f=Bje(t,e,n,i,r,o,s,a,u,c);return f<=d/2}function _Ge(t,e,n,i,r,o,s,a,l){if(s===0)return!1;var u=s;if(l>e+u&&l>i+u&&l>o+u||l<e-u&&l<i-u&&l<o-u||a>t+u&&a>n+u&&a>r+u||a<t-u&&a<n-u&&a<r-u)return!1;var c=$je(t,e,n,i,r,o,a,l);return c<=u/2}var D8=Math.PI*2;function zy(t){return t%=D8,t<0&&(t+=D8),t}var ip=Math.PI*2;function CGe(t,e,n,i,r,o,s,a,l){if(s===0)return!1;var u=s;a-=t,l-=e;var c=Math.sqrt(a*a+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-r)%ip<1e-4)return!0;if(o){var d=i;i=zy(r),r=zy(d)}else i=zy(i),r=zy(r);i>r&&(r+=ip);var f=Math.atan2(l,a);return f<0&&(f+=ip),f>=i&&f<=r||f+ip>=i&&f+ip<=r}function Sd(t,e,n,i,r,o){if(o>e&&o>i||o<e&&o<i||i===e)return 0;var s=(o-e)/(i-e),a=i<e?1:-1;(s===1||s===0)&&(a=i<e?.5:-.5);var l=s*(n-t)+t;return l===r?1/0:l>r?a:0}var Vu=xf.CMD,kd=Math.PI*2,SGe=1e-4;function kGe(t,e){return Math.abs(t-e)<SGe}var Jr=[-1,-1,-1],Ss=[-1,-1];function TGe(){var t=Ss[0];Ss[0]=Ss[1],Ss[1]=t}function EGe(t,e,n,i,r,o,s,a,l,u){if(u>e&&u>i&&u>o&&u>a||u<e&&u<i&&u<o&&u<a)return 0;var c=I1(e,i,o,a,u,Jr);if(c===0)return 0;for(var d=0,f=-1,h=void 0,m=void 0,g=0;g<c;g++){var v=Jr[g],p=v===0||v===1?.5:1,b=pr(t,n,r,s,v);b<l||(f<0&&(f=lZ(e,i,o,a,Ss),Ss[1]<Ss[0]&&f>1&&TGe(),h=pr(e,i,o,a,Ss[0]),f>1&&(m=pr(e,i,o,a,Ss[1]))),f===2?v<Ss[0]?d+=h<e?p:-p:v<Ss[1]?d+=m<h?p:-p:d+=a<m?p:-p:v<Ss[0]?d+=h<e?p:-p:d+=a<h?p:-p)}return d}function xGe(t,e,n,i,r,o,s,a){if(a>e&&a>i&&a>o||a<e&&a<i&&a<o)return 0;var l=Fje(e,i,o,a,Jr);if(l===0)return 0;var u=uZ(e,i,o);if(u>=0&&u<=1){for(var c=0,d=wo(e,i,o,u),f=0;f<l;f++){var h=Jr[f]===0||Jr[f]===1?.5:1,m=wo(t,n,r,Jr[f]);m<s||(Jr[f]<u?c+=d<e?h:-h:c+=o<d?h:-h)}return c}else{var h=Jr[0]===0||Jr[0]===1?.5:1,m=wo(t,n,r,Jr[0]);return m<s?0:o<e?h:-h}}function AGe(t,e,n,i,r,o,s,a){if(a-=e,a>n||a<-n)return 0;var l=Math.sqrt(n*n-a*a);Jr[0]=-l,Jr[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=kd-1e-4){i=0,r=kd;var c=o?1:-1;return s>=Jr[0]+t&&s<=Jr[1]+t?c:0}if(i>r){var d=i;i=r,r=d}i<0&&(i+=kd,r+=kd);for(var f=0,h=0;h<2;h++){var m=Jr[h];if(m+t>s){var g=Math.atan2(a,m),c=o?1:-1;g<0&&(g=kd+g),(g>=i&&g<=r||g+kd>=i&&g+kd<=r)&&(g>Math.PI/2&&g<Math.PI*1.5&&(c=-c),f+=c)}}return f}function VZ(t,e,n,i,r){for(var o=t.data,s=t.len(),a=0,l=0,u=0,c=0,d=0,f,h,m=0;m<s;){var g=o[m++],v=m===1;switch(g===Vu.M&&m>1&&(n||(a+=Sd(l,u,c,d,i,r))),v&&(l=o[m],u=o[m+1],c=l,d=u),g){case Vu.M:c=o[m++],d=o[m++],l=c,u=d;break;case Vu.L:if(n){if(wh(l,u,o[m],o[m+1],e,i,r))return!0}else a+=Sd(l,u,o[m],o[m+1],i,r)||0;l=o[m++],u=o[m++];break;case Vu.C:if(n){if(wGe(l,u,o[m++],o[m++],o[m++],o[m++],o[m],o[m+1],e,i,r))return!0}else a+=EGe(l,u,o[m++],o[m++],o[m++],o[m++],o[m],o[m+1],i,r)||0;l=o[m++],u=o[m++];break;case Vu.Q:if(n){if(_Ge(l,u,o[m++],o[m++],o[m],o[m+1],e,i,r))return!0}else a+=xGe(l,u,o[m++],o[m++],o[m],o[m+1],i,r)||0;l=o[m++],u=o[m++];break;case Vu.A:var p=o[m++],b=o[m++],y=o[m++],_=o[m++],C=o[m++],S=o[m++];m+=1;var k=!!(1-o[m++]);f=Math.cos(C)*y+p,h=Math.sin(C)*_+b,v?(c=f,d=h):a+=Sd(l,u,f,h,i,r);var T=(i-p)*_/y+p;if(n){if(CGe(p,b,_,C,C+S,k,e,T,r))return!0}else a+=AGe(p,b,_,C,C+S,k,T,r);l=Math.cos(C+S)*y+p,u=Math.sin(C+S)*_+b;break;case Vu.R:c=l=o[m++],d=u=o[m++];var E=o[m++],x=o[m++];if(f=c+E,h=d+x,n){if(wh(c,d,f,d,e,i,r)||wh(f,d,f,h,e,i,r)||wh(f,h,c,h,e,i,r)||wh(c,h,c,d,e,i,r))return!0}else a+=Sd(f,d,f,h,i,r),a+=Sd(c,h,c,d,i,r);break;case Vu.Z:if(n){if(wh(l,u,c,d,e,i,r))return!0}else a+=Sd(l,u,c,d,i,r);l=c,u=d;break}}return!n&&!kGe(u,d)&&(a+=Sd(l,u,c,d,i,r)||0),a!==0}function PGe(t,e,n){return VZ(t,0,!1,e,n)}function IGe(t,e,n,i){return VZ(t,e,!0,n,i)}var FZ=Xn({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},cf),RGe={style:Xn({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},$S.style)},nx=yb.concat(["invisible","culling","z","z2","zlevel","parent"]),Jn=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(l){n.buildPath(l,n.shape)}),r.silent=!0;var o=r.style;for(var s in i)o[s]!==i[s]&&(o[s]=i[s]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var a=0;a<nx.length;++a)r[nx[a]]=this[nx[a]];r.__dirty|=Jo}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(n){var i=hi(n);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var o=0;o<i.length;o++){var s=i[o],a=n[s];s==="style"?this.style?lt(this.style,a):this.useStyle(a):s==="shape"?lt(this.shape,a):t.prototype.attrKV.call(this,s,a)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var n=this.style.fill;if(n!=="none"){if(At(n)){var i=O1(n,0);return i>.5?CP:i>.2?lKe:SP}else if(n)return SP}return CP},e.prototype.getInsideTextStroke=function(n){var i=this.style.fill;if(At(i)){var r=this.__zr,o=!!(r&&r.isDarkMode()),s=O1(n,0)<_P;if(o===s)return i}},e.prototype.buildPath=function(n,i,r){},e.prototype.pathUpdated=function(){this.__dirty&=~Hh},e.prototype.getUpdatedPathProxy=function(n){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,n),this.path},e.prototype.createPathProxy=function(){this.path=new xf(!1)},e.prototype.hasStroke=function(){var n=this.style,i=n.stroke;return!(i==null||i==="none"||!(n.lineWidth>0))},e.prototype.hasFill=function(){var n=this.style,i=n.fill;return i!=null&&i!=="none"},e.prototype.getBoundingRect=function(){var n=this._rect,i=this.style,r=!n;if(r){var o=!1;this.path||(o=!0,this.createPathProxy());var s=this.path;(o||this.__dirty&Hh)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),n=s.getBoundingRect()}if(this._rect=n,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||(this._rectStroke=n.clone());if(this.__dirty||r){a.copy(n);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(a.width+=u/l,a.height+=u/l,a.x-=u/l/2,a.y-=u/l/2)}return a}return n},e.prototype.contain=function(n,i){var r=this.transformCoordToLocal(n,i),o=this.getBoundingRect(),s=this.style;if(n=r[0],i=r[1],o.contain(n,i)){var a=this.path;if(this.hasStroke()){var l=s.lineWidth,u=s.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),IGe(a,l/u,n,i)))return!0}if(this.hasFill())return PGe(a,n,i)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Hh,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(n){return this.animate("shape",n)},e.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():n==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(n,i){n==="shape"?this.setShape(i):t.prototype.attrKV.call(this,n,i)},e.prototype.setShape=function(n,i){var r=this.shape;return r||(r=this.shape={}),typeof n=="string"?r[n]=i:lt(r,n),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Hh)},e.prototype.createStyle=function(n){return LS(FZ,n)},e.prototype._innerSaveToNormal=function(n){t.prototype._innerSaveToNormal.call(this,n);var i=this._normalState;n.shape&&!i.shape&&(i.shape=lt({},this.shape))},e.prototype._applyStateObj=function(n,i,r,o,s,a){t.prototype._applyStateObj.call(this,n,i,r,o,s,a);var l=!(i&&o),u;if(i&&i.shape?s?o?u=i.shape:(u=lt({},r.shape),lt(u,i.shape)):(u=lt({},o?this.shape:r.shape),lt(u,i.shape)):l&&(u=r.shape),u)if(s){this.shape=lt({},this.shape);for(var c={},d=hi(u),f=0;f<d.length;f++){var h=d[f];typeof u[h]=="object"?this.shape[h]=u[h]:c[h]=u[h]}this._transitionState(n,{shape:c},a)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(n){for(var i=t.prototype._mergeStates.call(this,n),r,o=0;o<n.length;o++){var s=n[o];s.shape&&(r=r||{},this._mergeStyle(r,s.shape))}return r&&(i.shape=r),i},e.prototype.getAnimationStyleProps=function(){return RGe},e.prototype.isZeroArea=function(){return!1},e.extend=function(n){var i=(function(o){yt(s,o);function s(a){var l=o.call(this,a)||this;return n.init&&n.init.call(l,a),l}return s.prototype.getDefaultStyle=function(){return wn(n.style)},s.prototype.getDefaultShape=function(){return wn(n.shape)},s})(e);for(var r in n)typeof n[r]=="function"&&(i.prototype[r]=n[r]);return i},e.initDefaultProps=(function(){var n=e.prototype;n.type="path",n.strokeContainThreshold=5,n.segmentIgnoreThreshold=0,n.subPixelOptimize=!1,n.autoBatch=!1,n.__dirty=Jo|kp|Hh})(),e})(C0),MGe=Xn({strokeFirst:!0,font:Dc,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},FZ),B1=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.hasStroke=function(){return BZ(this.style)},e.prototype.hasFill=function(){var n=this.style,i=n.fill;return i!=null&&i!=="none"},e.prototype.createStyle=function(n){return LS(MGe,n)},e.prototype.setBoundingRect=function(n){this._rect=n},e.prototype.getBoundingRect=function(){return this._rect||(this._rect=hGe(this.style)),this._rect},e.initDefaultProps=(function(){var n=e.prototype;n.dirtyRectTolerance=10})(),e})(C0);B1.prototype.type="tspan";var OGe=Xn({x:0,y:0},cf),LGe={style:Xn({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},$S.style)};function DGe(t){return!!(t&&typeof t!="string"&&t.width&&t.height)}var Yc=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createStyle=function(n){return LS(OGe,n)},e.prototype._getSize=function(n){var i=this.style,r=i[n];if(r!=null)return r;var o=DGe(i.image)?i.image:this.__image;if(!o)return 0;var s=n==="width"?"height":"width",a=i[s];return a==null?o[n]:o[n]/o[s]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return LGe},e.prototype.getBoundingRect=function(){var n=this.style;return this._rect||(this._rect=new nn(n.x||0,n.y||0,this.getWidth(),this.getHeight())),this._rect},e})(C0);Yc.prototype.type="image";function NGe(t,e){var n=e.x,i=e.y,r=e.width,o=e.height,s=e.r,a,l,u,c;r<0&&(n=n+r,r=-r),o<0&&(i=i+o,o=-o),typeof s=="number"?a=l=u=c=s:s instanceof Array?s.length===1?a=l=u=c=s[0]:s.length===2?(a=u=s[0],l=c=s[1]):s.length===3?(a=s[0],l=c=s[1],u=s[2]):(a=s[0],l=s[1],u=s[2],c=s[3]):a=l=u=c=0;var d;a+l>r&&(d=a+l,a*=r/d,l*=r/d),u+c>r&&(d=u+c,u*=r/d,c*=r/d),l+u>o&&(d=l+u,l*=o/d,u*=o/d),a+c>o&&(d=a+c,a*=o/d,c*=o/d),t.moveTo(n+a,i),t.lineTo(n+r-l,i),l!==0&&t.arc(n+r-l,i+l,l,-Math.PI/2,0),t.lineTo(n+r,i+o-u),u!==0&&t.arc(n+r-u,i+o-u,u,0,Math.PI/2),t.lineTo(n+c,i+o),c!==0&&t.arc(n+c,i+o-c,c,Math.PI/2,Math.PI),t.lineTo(n,i+a),a!==0&&t.arc(n+a,i+a,a,Math.PI,Math.PI*1.5)}var Qh=Math.round;function $Z(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,s=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=s;var a=n&&n.lineWidth;return a&&(Qh(i*2)===Qh(r*2)&&(t.x1=t.x2=Zd(i,a,!0)),Qh(o*2)===Qh(s*2)&&(t.y1=t.y2=Zd(o,a,!0))),t}}function zZ(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,s=e.height;t.x=i,t.y=r,t.width=o,t.height=s;var a=n&&n.lineWidth;return a&&(t.x=Zd(i,a,!0),t.y=Zd(r,a,!0),t.width=Math.max(Zd(i+o,a,!1)-t.x,o===0?0:1),t.height=Math.max(Zd(r+s,a,!1)-t.y,s===0?0:1)),t}}function Zd(t,e,n){if(!e)return t;var i=Qh(t*2);return(i+Qh(e))%2===0?i/2:(i+(n?1:-1))/2}var BGe=(function(){function t(){this.x=0,this.y=0,this.width=0,this.height=0}return t})(),VGe={},Fr=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultShape=function(){return new BGe},e.prototype.buildPath=function(n,i){var r,o,s,a;if(this.subPixelOptimize){var l=zZ(VGe,i,this.style);r=l.x,o=l.y,s=l.width,a=l.height,l.r=i.r,i=l}else r=i.x,o=i.y,s=i.width,a=i.height;i.r?NGe(n,i):n.rect(r,o,s,a)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(Jn);Fr.prototype.type="rect";var N8={fill:"#000"},B8=2,Na={},FGe={style:Xn({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},$S.style)},va=(function(t){yt(e,t);function e(n){var i=t.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=N8,i.attr(n),i}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n<this._children.length;n++){var i=this._children[n];i.zlevel=this.zlevel,i.z=this.z,i.z2=this.z2,i.culling=this.culling,i.cursor=this.cursor,i.invisible=this.invisible}},e.prototype.updateTransform=function(){var n=this.innerTransformable;n?(n.updateTransform(),n.transform&&(this.transform=n.transform)):t.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(n){var i=this.innerTransformable;return i?i.getLocalTransform(n):t.prototype.getLocalTransform.call(this,n)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),t.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,WGe(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(n){t.prototype.addSelfToZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=n},e.prototype.removeSelfFromZr=function(n){t.prototype.removeSelfFromZr.call(this,n);for(var i=0;i<this._children.length;i++)this._children[i].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var n=new nn(0,0,0,0),i=this._children,r=[],o=null,s=0;s<i.length;s++){var a=i[s],l=a.getBoundingRect(),u=a.getLocalTransform(r);u?(n.copy(l),n.applyTransform(u),o=o||n.clone(),o.union(n)):(o=o||l.clone(),o.union(l))}this._rect=o||n}return this._rect},e.prototype.setDefaultTextStyle=function(n){this._defaultStyle=n||N8},e.prototype.setTextContent=function(n){},e.prototype._mergeStyle=function(n,i){if(!i)return n;var r=i.rich,o=n.rich||r&&{};return lt(n,i),r&&o?(this._mergeRich(o,r),n.rich=o):o&&(n.rich=o),n},e.prototype._mergeRich=function(n,i){for(var r=hi(i),o=0;o<r.length;o++){var s=r[o];n[s]=n[s]||{},lt(n[s],i[s])}},e.prototype.getAnimationStyleProps=function(){return FGe},e.prototype._getOrCreateChild=function(n){var i=this._children[this._childCursor];return(!i||!(i instanceof n))&&(i=new n),this._children[this._childCursor++]=i,i.__zr=this.__zr,i.parent=this,i},e.prototype._updatePlainTexts=function(){var n=this.style,i=n.font||Dc,r=n.padding,o=this._defaultStyle,s=n.x||0,a=n.y||0,l=n.align||o.align||"left",u=n.verticalAlign||o.verticalAlign||"top";A8(Na,o.overflowRect,s,a,l,u),s=Na.baseX,a=Na.baseY;var c=W8(n),d=sGe(c,n,Na.outerWidth,Na.outerHeight),f=ix(n),h=!!n.backgroundColor,m=d.outerHeight,g=d.outerWidth,v=d.lines,p=d.lineHeight;this.isTruncated=!!d.isTruncated;var b=s,y=uf(a,d.contentHeight,u);if(f||r){var _=ng(s,g,l),C=uf(a,m,u);f&&this._renderBackground(n,n,_,C,g,m)}y+=p/2,r&&(b=U8(s,l,r),u==="top"?y+=r[0]:u==="bottom"&&(y-=r[2]));for(var S=0,k=!1,T=!1,E=H8("fill"in n?n.fill:(T=!0,o.fill)),x=z8("stroke"in n?n.stroke:!h&&(!o.autoStroke||T)?(S=B8,k=!0,o.stroke):null),P=n.textShadowBlur>0,A=0;A<v.length;A++){var I=this._getOrCreateChild(B1),D=I.createStyle();I.useStyle(D),D.text=v[A],D.x=b,D.y=y,D.textAlign=l,D.textBaseline="middle",D.opacity=n.opacity,D.strokeFirst=!0,P&&(D.shadowBlur=n.textShadowBlur||0,D.shadowColor=n.textShadowColor||"transparent",D.shadowOffsetX=n.textShadowOffsetX||0,D.shadowOffsetY=n.textShadowOffsetY||0),D.stroke=x,D.fill=E,x&&(D.lineWidth=n.lineWidth||S,D.lineDash=n.lineDash,D.lineDashOffset=n.lineDashOffset||0),D.font=i,F8(D,n),y+=p,I.setBoundingRect(xP(D,d.contentWidth,d.calculatedLineHeight,k?0:null))}},e.prototype._updateRichTexts=function(){var n=this.style,i=this._defaultStyle,r=n.align||i.align,o=n.verticalAlign||i.verticalAlign,s=n.x||0,a=n.y||0;A8(Na,i.overflowRect,s,a,r,o),s=Na.baseX,a=Na.baseY;var l=W8(n),u=uGe(l,n,Na.outerWidth,Na.outerHeight,r),c=u.width,d=u.outerWidth,f=u.outerHeight,h=n.padding;this.isTruncated=!!u.isTruncated;var m=ng(s,d,r),g=uf(a,f,o),v=m,p=g;h&&(v+=h[3],p+=h[0]);var b=v+c;ix(n)&&this._renderBackground(n,n,m,g,d,f);for(var y=!!n.backgroundColor,_=0;_<u.lines.length;_++){for(var C=u.lines[_],S=C.tokens,k=S.length,T=C.lineHeight,E=C.width,x=0,P=v,A=b,I=k-1,D=void 0;x<k&&(D=S[x],!D.align||D.align==="left");)this._placeToken(D,n,T,p,P,"left",y),E-=D.width,P+=D.width,x++;for(;I>=0&&(D=S[I],D.align==="right");)this._placeToken(D,n,T,p,A,"right",y),E-=D.width,A-=D.width,I--;for(P+=(c-(P-v)-(b-A)-E)/2;x<=I;)D=S[x],this._placeToken(D,n,T,p,P+D.width/2,"center",y),P+=D.width,x++;p+=T}},e.prototype._placeToken=function(n,i,r,o,s,a,l){var u=i.rich[n.styleName]||{};u.text=n.text;var c=n.verticalAlign,d=o+r/2;c==="top"?d=o+n.height/2:c==="bottom"&&(d=o+r-n.height/2);var f=!n.isLineHolder&&ix(u);f&&this._renderBackground(u,i,a==="right"?s-n.width:a==="center"?s-n.width/2:s,d-n.height/2,n.width,n.height);var h=!!u.backgroundColor,m=n.textPadding;m&&(s=U8(s,a,m),d-=n.height/2-m[0]-n.innerHeight/2);var g=this._getOrCreateChild(B1),v=g.createStyle();g.useStyle(v);var p=this._defaultStyle,b=!1,y=0,_=!1,C=H8("fill"in u?u.fill:"fill"in i?i.fill:(b=!0,p.fill)),S=z8("stroke"in u?u.stroke:"stroke"in i?i.stroke:!h&&!l&&(!p.autoStroke||b)?(y=B8,_=!0,p.stroke):null),k=u.textShadowBlur>0||i.textShadowBlur>0;v.text=n.text,v.x=s,v.y=d,k&&(v.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,v.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),v.textAlign=a,v.textBaseline="middle",v.font=n.font||Dc,v.opacity=bm(u.opacity,i.opacity,1),F8(v,u),S&&(v.lineWidth=bm(u.lineWidth,i.lineWidth,y),v.lineDash=Ut(u.lineDash,i.lineDash),v.lineDashOffset=i.lineDashOffset||0,v.stroke=S),C&&(v.fill=C),g.setBoundingRect(xP(v,n.contentWidth,n.contentHeight,_?0:null))},e.prototype._renderBackground=function(n,i,r,o,s,a){var l=n.backgroundColor,u=n.borderWidth,c=n.borderColor,d=l&&l.image,f=l&&!d,h=n.borderRadius,m=this,g,v;if(f||n.lineHeight||u&&c){g=this._getOrCreateChild(Fr),g.useStyle(g.createStyle()),g.style.fill=null;var p=g.shape;p.x=r,p.y=o,p.width=s,p.height=a,p.r=h,g.dirtyShape()}if(f){var b=g.style;b.fill=l||null,b.fillOpacity=Ut(n.fillOpacity,1)}else if(d){v=this._getOrCreateChild(Yc),v.onload=function(){m.dirtyStyle()};var y=v.style;y.image=l.image,y.x=r,y.y=o,y.width=s,y.height=a}if(u&&c){var b=g.style;b.lineWidth=u,b.stroke=c,b.strokeOpacity=Ut(n.strokeOpacity,1),b.lineDash=n.borderDash,b.lineDashOffset=n.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var _=(g||v).style;_.shadowBlur=n.shadowBlur||0,_.shadowColor=n.shadowColor||"transparent",_.shadowOffsetX=n.shadowOffsetX||0,_.shadowOffsetY=n.shadowOffsetY||0,_.opacity=bm(n.opacity,i.opacity,1)},e.makeFont=function(n){var i="";return UGe(n)&&(i=[n.fontStyle,n.fontWeight,HGe(n.fontSize),n.fontFamily||"sans-serif"].join(" ")),i&&Ka(i)||n.textFont||n.font},e})(C0),$Ge={left:!0,right:1,center:1},zGe={top:1,bottom:1,middle:1},V8=["fontStyle","fontWeight","fontSize","fontFamily"];function HGe(t){return typeof t=="string"&&(t.indexOf("px")!==-1||t.indexOf("rem")!==-1||t.indexOf("em")!==-1)?t:isNaN(+t)?DO+"px":t+"px"}function F8(t,e){for(var n=0;n<V8.length;n++){var i=V8[n],r=e[i];r!=null&&(t[i]=r)}}function UGe(t){return t.fontSize!=null||t.fontFamily||t.fontWeight}function WGe(t){return $8(t),ue(t.rich,$8),t}function $8(t){if(t){t.font=va.makeFont(t);var e=t.align;e==="middle"&&(e="center"),t.align=e==null||$Ge[e]?e:"left";var n=t.verticalAlign;n==="center"&&(n="middle"),t.verticalAlign=n==null||zGe[n]?n:"top";var i=t.padding;i&&(t.padding=$O(t.padding))}}function z8(t,e){return t==null||e<=0||t==="transparent"||t==="none"?null:t.image||t.colorStops?"#000":t}function H8(t){return t==null||t==="none"?null:t.image||t.colorStops?"#000":t}function U8(t,e,n){return e==="right"?t-n[1]:e==="center"?t+n[3]/2-n[1]/2:t+n[3]}function W8(t){var e=t.text;return e!=null&&(e+=""),e}function ix(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var si=Di(),qGe=function(t,e,n,i){if(i){var r=si(i);r.dataIndex=n,r.dataType=e,r.seriesIndex=t,r.ssrType="chart",i.type==="group"&&i.traverse(function(o){var s=si(o);s.seriesIndex=t,s.dataIndex=n,s.dataType=e,s.ssrType="chart"})}},q8=1,j8={},HZ=Di(),XO=Di(),JO=0,zS=1,HS=2,vl=["emphasis","blur","select"],K8=["normal","emphasis","blur","select"],jGe=10,KGe=9,df="highlight",h_="downplay",V1="select",IP="unselect",F1="toggleSelect",ZO="selectchanged";function _h(t){return t!=null&&t!=="none"}function US(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function UZ(t){US(t,"emphasis",HS)}function WZ(t){t.hoverState===HS&&US(t,"normal",JO)}function QO(t){US(t,"blur",zS)}function qZ(t){t.hoverState===zS&&US(t,"normal",JO)}function GGe(t){t.selected=!0}function YGe(t){t.selected=!1}function G8(t,e,n){e(t,n)}function Iu(t,e,n){G8(t,e,n),t.isGroup&&t.traverse(function(i){G8(i,e,n)})}function Y8(t,e){switch(e){case"emphasis":t.hoverState=HS;break;case"normal":t.hoverState=JO;break;case"blur":t.hoverState=zS;break;case"select":t.selected=!0}}function XGe(t,e,n,i){for(var r=t.style,o={},s=0;s<e.length;s++){var a=e[s],l=r[a];o[a]=l??(i&&i[a])}for(var s=0;s<t.animators.length;s++){var u=t.animators[s];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&u.targetName==="style"&&u.saveTo(o,e)}return o}function JGe(t,e,n,i){var r=n&&Dn(n,"select")>=0,o=!1;if(t instanceof Jn){var s=HZ(t),a=r&&s.selectFill||s.normalFill,l=r&&s.selectStroke||s.normalStroke;if(_h(a)||_h(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(o=!0,i=lt({},i),u=lt({},u),u.fill=a):!_h(u.fill)&&_h(a)?(o=!0,i=lt({},i),u=lt({},u),u.fill=l8(a)):!_h(u.stroke)&&_h(l)&&(o||(i=lt({},i),u=lt({},u)),u.stroke=l8(l)),i.style=u}}if(i&&i.z2==null){o||(i=lt({},i));var c=t.z2EmphasisLift;i.z2=t.z2+(c??jGe)}return i}function ZGe(t,e,n){if(n&&n.z2==null){n=lt({},n);var i=t.z2SelectLift;n.z2=t.z2+(i??KGe)}return n}function QGe(t,e,n){var i=Dn(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:XGe(t,["opacity"],e,{opacity:1});n=n||{};var s=n.style||{};return s.opacity==null&&(n=lt({},n),s=lt({opacity:i?r:o.opacity*.1},s),n.style=s),n}function rx(t,e){var n=this.states[t];if(this.style){if(t==="emphasis")return JGe(this,t,e,n);if(t==="blur")return QGe(this,t,n);if(t==="select")return ZGe(this,t,n)}return n}function eYe(t){t.stateProxy=rx;var e=t.getTextContent(),n=t.getTextGuideLine();e&&(e.stateProxy=rx),n&&(n.stateProxy=rx)}function X8(t,e){!YZ(t,e)&&!t.__highByOuter&&Iu(t,UZ)}function J8(t,e){!YZ(t,e)&&!t.__highByOuter&&Iu(t,WZ)}function $1(t,e){t.__highByOuter|=1<<(e||0),Iu(t,UZ)}function z1(t,e){!(t.__highByOuter&=~(1<<(e||0)))&&Iu(t,WZ)}function tYe(t){Iu(t,QO)}function jZ(t){Iu(t,qZ)}function KZ(t){Iu(t,GGe)}function GZ(t){Iu(t,YGe)}function YZ(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function XZ(t){var e=t.getModel(),n=[],i=[];e.eachComponent(function(r,o){var s=XO(o),a=r==="series",l=a?t.getViewOfSeriesModel(o):t.getViewOfComponentModel(o);!a&&i.push(l),s.isBlured&&(l.group.traverse(function(u){qZ(u)}),a&&n.push(o)),s.isBlured=!1}),ue(i,function(r){r&&r.toggleBlurSeries&&r.toggleBlurSeries(n,!1,e)})}function RP(t,e,n,i){var r=i.getModel();n=n||"coordinateSystem";function o(u,c){for(var d=0;d<c.length;d++){var f=u.getItemGraphicEl(c[d]);f&&jZ(f)}}if(t!=null&&!(!e||e==="none")){var s=r.getSeriesByIndex(t),a=s.coordinateSystem;a&&a.master&&(a=a.master);var l=[];r.eachSeries(function(u){var c=s===u,d=u.coordinateSystem;d&&d.master&&(d=d.master);var f=d&&a?d===a:c;if(!(n==="series"&&!c||n==="coordinateSystem"&&!f||e==="series"&&c)){var h=i.getViewOfSeriesModel(u);if(h.group.traverse(function(v){v.__highByOuter&&c&&e==="self"||QO(v)}),Vo(e))o(u.getData(),e);else if(Rt(e))for(var m=hi(e),g=0;g<m.length;g++)o(u.getData(m[g]),e[m[g]]);l.push(u),XO(u).isBlured=!0}}),r.eachComponent(function(u,c){if(u!=="series"){var d=i.getViewOfComponentModel(c);d&&d.toggleBlurSeries&&d.toggleBlurSeries(l,!0,r)}})}}function MP(t,e,n){if(!(t==null||e==null)){var i=n.getModel().getComponent(t,e);if(i){XO(i).isBlured=!0;var r=n.getViewOfComponentModel(i);!r||!r.focusBlurEnabled||r.group.traverse(function(o){QO(o)})}}}function nYe(t,e,n){var i=t.seriesIndex,r=t.getData(e.dataType);if(r){var o=Ef(r,e);o=(bt(o)?o[0]:o)||0;var s=r.getItemGraphicEl(o);if(!s)for(var a=r.count(),l=0;!s&&l<a;)s=r.getItemGraphicEl(l++);if(s){var u=si(s);RP(i,u.focus,u.blurScope,n)}else{var c=t.get(["emphasis","focus"]),d=t.get(["emphasis","blurScope"]);c!=null&&RP(i,c,d,n)}}}function eL(t,e,n,i){var r={focusSelf:!1,dispatchers:null};if(t==null||t==="series"||e==null||n==null)return r;var o=i.getModel().getComponent(t,e);if(!o)return r;var s=i.getViewOfComponentModel(o);if(!s||!s.findHighDownDispatchers)return r;for(var a=s.findHighDownDispatchers(n),l,u=0;u<a.length;u++)if(si(a[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:a}}function iYe(t,e,n){var i=si(t),r=eL(i.componentMainType,i.componentIndex,i.componentHighDownName,n),o=r.dispatchers,s=r.focusSelf;o?(s&&MP(i.componentMainType,i.componentIndex,n),ue(o,function(a){return X8(a,e)})):(RP(i.seriesIndex,i.focus,i.blurScope,n),i.focus==="self"&&MP(i.componentMainType,i.componentIndex,n),X8(t,e))}function rYe(t,e,n){XZ(n);var i=si(t),r=eL(i.componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers;r?ue(r,function(o){return J8(o,e)}):J8(t,e)}function oYe(t,e,n){if(DP(e)){var i=e.dataType,r=t.getData(i),o=Ef(r,e);bt(o)||(o=[o]),t[e.type===F1?"toggleSelect":e.type===V1?"select":"unselect"](o,i)}}function Z8(t){var e=t.getAllData();ue(e,function(n){var i=n.data,r=n.type;i.eachItemGraphicEl(function(o,s){t.isSelected(s,r)?KZ(o):GZ(o)})})}function sYe(t){var e=[];return t.eachSeries(function(n){var i=n.getAllData();ue(i,function(r){r.data;var o=r.type,s=n.getSelectedDataIndices();if(s.length>0){var a={dataIndex:s,seriesIndex:n.seriesIndex};o!=null&&(a.dataType=o),e.push(a)}})}),e}function aYe(t,e,n){JZ(t,!0),Iu(t,eYe),uYe(t,e,n)}function lYe(t){JZ(t,!1)}function OP(t,e,n,i){i?lYe(t):aYe(t,e,n)}function uYe(t,e,n){var i=si(t);e!=null?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var Q8=["emphasis","blur","select"],cYe={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function e$(t,e,n,i){n=n||"itemStyle";for(var r=0;r<Q8.length;r++){var o=Q8[r],s=e.getModel([o,n]),a=t.ensureState(o);a.style=s[cYe[n]]()}}function JZ(t,e){var n=e===!1,i=t;t.highDownSilentOnTouch&&(i.__highDownSilentOnTouch=t.highDownSilentOnTouch),(!n||i.__highDownDispatcher)&&(i.__highByOuter=i.__highByOuter||0,i.__highDownDispatcher=!n)}function LP(t){return!!(t&&t.__highDownDispatcher)}function dYe(t){var e=j8[t];return e==null&&q8<=32&&(e=j8[t]=q8++),e}function DP(t){var e=t.type;return e===V1||e===IP||e===F1}function t$(t){var e=t.type;return e===df||e===h_}function fYe(t){var e=HZ(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}var Ch=xf.CMD,hYe=[[],[],[]],n$=Math.sqrt,mYe=Math.atan2;function gYe(t,e){if(e){var n=t.data,i=t.len(),r,o,s,a,l,u,c=Ch.M,d=Ch.C,f=Ch.L,h=Ch.R,m=Ch.A,g=Ch.Q;for(s=0,a=0;s<i;){switch(r=n[s++],a=s,o=0,r){case c:o=1;break;case f:o=1;break;case d:o=3;break;case g:o=2;break;case m:var v=e[4],p=e[5],b=n$(e[0]*e[0]+e[1]*e[1]),y=n$(e[2]*e[2]+e[3]*e[3]),_=mYe(-e[1]/y,e[0]/b);n[s]*=b,n[s++]+=v,n[s]*=y,n[s++]+=p,n[s++]*=b,n[s++]*=y,n[s++]+=_,n[s++]+=_,s+=2,a=s;break;case h:u[0]=n[s++],u[1]=n[s++],Ds(u,u,e),n[a++]=u[0],n[a++]=u[1],u[0]+=n[s++],u[1]+=n[s++],Ds(u,u,e),n[a++]=u[0],n[a++]=u[1]}for(l=0;l<o;l++){var C=hYe[l];C[0]=n[s++],C[1]=n[s++],Ds(C,C,e),n[a++]=C[0],n[a++]=C[1]}}t.increaseVersion()}}var ox=Math.sqrt,Hy=Math.sin,Uy=Math.cos,rp=Math.PI;function i$(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function NP(t,e){return(t[0]*e[0]+t[1]*e[1])/(i$(t)*i$(e))}function r$(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(NP(t,e))}function o$(t,e,n,i,r,o,s,a,l,u,c){var d=l*(rp/180),f=Uy(d)*(t-n)/2+Hy(d)*(e-i)/2,h=-1*Hy(d)*(t-n)/2+Uy(d)*(e-i)/2,m=f*f/(s*s)+h*h/(a*a);m>1&&(s*=ox(m),a*=ox(m));var g=(r===o?-1:1)*ox((s*s*(a*a)-s*s*(h*h)-a*a*(f*f))/(s*s*(h*h)+a*a*(f*f)))||0,v=g*s*h/a,p=g*-a*f/s,b=(t+n)/2+Uy(d)*v-Hy(d)*p,y=(e+i)/2+Hy(d)*v+Uy(d)*p,_=r$([1,0],[(f-v)/s,(h-p)/a]),C=[(f-v)/s,(h-p)/a],S=[(-1*f-v)/s,(-1*h-p)/a],k=r$(C,S);if(NP(C,S)<=-1&&(k=rp),NP(C,S)>=1&&(k=0),k<0){var T=Math.round(k/rp*1e6)/1e6;k=rp*2+T%2*rp}c.addData(u,b,y,s,a,_,k,d,o)}var pYe=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,vYe=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function bYe(t){var e=new xf;if(!t)return e;var n=0,i=0,r=n,o=i,s,a=xf.CMD,l=t.match(pYe);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],d=c.charAt(0),f=void 0,h=c.match(vYe)||[],m=h.length,g=0;g<m;g++)h[g]=parseFloat(h[g]);for(var v=0;v<m;){var p=void 0,b=void 0,y=void 0,_=void 0,C=void 0,S=void 0,k=void 0,T=n,E=i,x=void 0,P=void 0;switch(d){case"l":n+=h[v++],i+=h[v++],f=a.L,e.addData(f,n,i);break;case"L":n=h[v++],i=h[v++],f=a.L,e.addData(f,n,i);break;case"m":n+=h[v++],i+=h[v++],f=a.M,e.addData(f,n,i),r=n,o=i,d="l";break;case"M":n=h[v++],i=h[v++],f=a.M,e.addData(f,n,i),r=n,o=i,d="L";break;case"h":n+=h[v++],f=a.L,e.addData(f,n,i);break;case"H":n=h[v++],f=a.L,e.addData(f,n,i);break;case"v":i+=h[v++],f=a.L,e.addData(f,n,i);break;case"V":i=h[v++],f=a.L,e.addData(f,n,i);break;case"C":f=a.C,e.addData(f,h[v++],h[v++],h[v++],h[v++],h[v++],h[v++]),n=h[v-2],i=h[v-1];break;case"c":f=a.C,e.addData(f,h[v++]+n,h[v++]+i,h[v++]+n,h[v++]+i,h[v++]+n,h[v++]+i),n+=h[v-2],i+=h[v-1];break;case"S":p=n,b=i,x=e.len(),P=e.data,s===a.C&&(p+=n-P[x-4],b+=i-P[x-3]),f=a.C,T=h[v++],E=h[v++],n=h[v++],i=h[v++],e.addData(f,p,b,T,E,n,i);break;case"s":p=n,b=i,x=e.len(),P=e.data,s===a.C&&(p+=n-P[x-4],b+=i-P[x-3]),f=a.C,T=n+h[v++],E=i+h[v++],n+=h[v++],i+=h[v++],e.addData(f,p,b,T,E,n,i);break;case"Q":T=h[v++],E=h[v++],n=h[v++],i=h[v++],f=a.Q,e.addData(f,T,E,n,i);break;case"q":T=h[v++]+n,E=h[v++]+i,n+=h[v++],i+=h[v++],f=a.Q,e.addData(f,T,E,n,i);break;case"T":p=n,b=i,x=e.len(),P=e.data,s===a.Q&&(p+=n-P[x-4],b+=i-P[x-3]),n=h[v++],i=h[v++],f=a.Q,e.addData(f,p,b,n,i);break;case"t":p=n,b=i,x=e.len(),P=e.data,s===a.Q&&(p+=n-P[x-4],b+=i-P[x-3]),n+=h[v++],i+=h[v++],f=a.Q,e.addData(f,p,b,n,i);break;case"A":y=h[v++],_=h[v++],C=h[v++],S=h[v++],k=h[v++],T=n,E=i,n=h[v++],i=h[v++],f=a.A,o$(T,E,n,i,S,k,y,_,C,f,e);break;case"a":y=h[v++],_=h[v++],C=h[v++],S=h[v++],k=h[v++],T=n,E=i,n+=h[v++],i+=h[v++],f=a.A,o$(T,E,n,i,S,k,y,_,C,f,e);break}}(d==="z"||d==="Z")&&(f=a.Z,e.addData(f),n=r,i=o),s=f}return e.toStatic(),e}var ZZ=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.applyTransform=function(n){},e})(Jn);function QZ(t){return t.setData!=null}function eQ(t,e){var n=bYe(t),i=lt({},e);return i.buildPath=function(r){var o=QZ(r);if(o&&r.canSave()){r.appendPath(n);var s=r.getContext();s&&r.rebuildPath(s,1)}else{var s=o?r.getContext():r;s&&n.rebuildPath(s,1)}},i.applyTransform=function(r){gYe(n,r),this.dirtyShape()},i}function yYe(t,e){return new ZZ(eQ(t,e))}function wYe(t,e){var n=eQ(t,e),i=(function(r){yt(o,r);function o(s){var a=r.call(this,s)||this;return a.applyTransform=n.applyTransform,a.buildPath=n.buildPath,a}return o})(ZZ);return i}function _Ye(t,e){for(var n=[],i=t.length,r=0;r<i;r++){var o=t[r];n.push(o.getUpdatedPathProxy(!0))}var s=new Jn(e);return s.createPathProxy(),s.buildPath=function(a){if(QZ(a)){a.appendPath(n);var l=a.getContext();l&&a.rebuildPath(l,1)}},s}var CYe=(function(){function t(){this.cx=0,this.cy=0,this.r=0}return t})(),WS=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultShape=function(){return new CYe},e.prototype.buildPath=function(n,i){n.moveTo(i.cx+i.r,i.cy),n.arc(i.cx,i.cy,i.r,0,Math.PI*2)},e})(Jn);WS.prototype.type="circle";var SYe=(function(){function t(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return t})(),tL=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultShape=function(){return new SYe},e.prototype.buildPath=function(n,i){var r=.5522848,o=i.cx,s=i.cy,a=i.rx,l=i.ry,u=a*r,c=l*r;n.moveTo(o-a,s),n.bezierCurveTo(o-a,s-c,o-u,s-l,o,s-l),n.bezierCurveTo(o+u,s-l,o+a,s-c,o+a,s),n.bezierCurveTo(o+a,s+c,o+u,s+l,o,s+l),n.bezierCurveTo(o-u,s+l,o-a,s+c,o-a,s),n.closePath()},e})(Jn);tL.prototype.type="ellipse";var tQ=Math.PI,sx=tQ*2,Td=Math.sin,Sh=Math.cos,kYe=Math.acos,Ar=Math.atan2,s$=Math.abs,mv=Math.sqrt,Ep=Math.max,Ba=Math.min,qs=1e-4;function TYe(t,e,n,i,r,o,s,a){var l=n-t,u=i-e,c=s-r,d=a-o,f=d*l-c*u;if(!(f*f<qs))return f=(c*(e-o)-d*(t-r))/f,[t+f*l,e+f*u]}function Wy(t,e,n,i,r,o,s){var a=t-n,l=e-i,u=(s?o:-o)/mv(a*a+l*l),c=u*l,d=-u*a,f=t+c,h=e+d,m=n+c,g=i+d,v=(f+m)/2,p=(h+g)/2,b=m-f,y=g-h,_=b*b+y*y,C=r-o,S=f*g-m*h,k=(y<0?-1:1)*mv(Ep(0,C*C*_-S*S)),T=(S*y-b*k)/_,E=(-S*b-y*k)/_,x=(S*y+b*k)/_,P=(-S*b+y*k)/_,A=T-v,I=E-p,D=x-v,q=P-p;return A*A+I*I>D*D+q*q&&(T=x,E=P),{cx:T,cy:E,x0:-c,y0:-d,x1:T*(r/C-1),y1:E*(r/C-1)}}function EYe(t){var e;if(bt(t)){var n=t.length;if(!n)return t;n===1?e=[t[0],t[0],0,0]:n===2?e=[t[0],t[0],t[1],t[1]]:n===3?e=t.concat(t[2]):e=t}else e=[t,t,t,t];return e}function xYe(t,e){var n,i=Ep(e.r,0),r=Ep(e.r0||0,0),o=i>0,s=r>0;if(!(!o&&!s)){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,d=e.cy,f=!!e.clockwise,h=s$(u-l),m=h>sx&&h%sx;if(m>qs&&(h=m),!(i>qs))t.moveTo(c,d);else if(h>sx-qs)t.moveTo(c+i*Sh(l),d+i*Td(l)),t.arc(c,d,i,l,u,!f),r>qs&&(t.moveTo(c+r*Sh(u),d+r*Td(u)),t.arc(c,d,r,u,l,f));else{var g=void 0,v=void 0,p=void 0,b=void 0,y=void 0,_=void 0,C=void 0,S=void 0,k=void 0,T=void 0,E=void 0,x=void 0,P=void 0,A=void 0,I=void 0,D=void 0,q=i*Sh(l),z=i*Td(l),R=r*Sh(u),O=r*Td(u),N=h>qs;if(N){var F=e.cornerRadius;F&&(n=EYe(F),g=n[0],v=n[1],p=n[2],b=n[3]);var j=s$(i-r)/2;if(y=Ba(j,p),_=Ba(j,b),C=Ba(j,g),S=Ba(j,v),E=k=Ep(y,_),x=T=Ep(C,S),(k>qs||T>qs)&&(P=i*Sh(u),A=i*Td(u),I=r*Sh(l),D=r*Td(l),h<tQ)){var U=TYe(q,z,I,D,P,A,R,O);if(U){var W=q-U[0],J=z-U[1],ne=P-U[0],he=A-U[1],X=1/Td(kYe((W*ne+J*he)/(mv(W*W+J*J)*mv(ne*ne+he*he)))/2),se=mv(U[0]*U[0]+U[1]*U[1]);E=Ba(k,(i-se)/(X+1)),x=Ba(T,(r-se)/(X-1))}}}if(!N)t.moveTo(c+q,d+z);else if(E>qs){var re=Ba(p,E),ee=Ba(b,E),te=Wy(I,D,q,z,i,re,f),V=Wy(P,A,R,O,i,ee,f);t.moveTo(c+te.cx+te.x0,d+te.cy+te.y0),E<k&&re===ee?t.arc(c+te.cx,d+te.cy,E,Ar(te.y0,te.x0),Ar(V.y0,V.x0),!f):(re>0&&t.arc(c+te.cx,d+te.cy,re,Ar(te.y0,te.x0),Ar(te.y1,te.x1),!f),t.arc(c,d,i,Ar(te.cy+te.y1,te.cx+te.x1),Ar(V.cy+V.y1,V.cx+V.x1),!f),ee>0&&t.arc(c+V.cx,d+V.cy,ee,Ar(V.y1,V.x1),Ar(V.y0,V.x0),!f))}else t.moveTo(c+q,d+z),t.arc(c,d,i,l,u,!f);if(!(r>qs)||!N)t.lineTo(c+R,d+O);else if(x>qs){var re=Ba(g,x),ee=Ba(v,x),te=Wy(R,O,P,A,r,-ee,f),V=Wy(q,z,I,D,r,-re,f);t.lineTo(c+te.cx+te.x0,d+te.cy+te.y0),x<T&&re===ee?t.arc(c+te.cx,d+te.cy,x,Ar(te.y0,te.x0),Ar(V.y0,V.x0),!f):(ee>0&&t.arc(c+te.cx,d+te.cy,ee,Ar(te.y0,te.x0),Ar(te.y1,te.x1),!f),t.arc(c,d,r,Ar(te.cy+te.y1,te.cx+te.x1),Ar(V.cy+V.y1,V.cx+V.x1),f),re>0&&t.arc(c+V.cx,d+V.cy,re,Ar(V.y1,V.x1),Ar(V.y0,V.x0),!f))}else t.lineTo(c+R,d+O),t.arc(c,d,r,u,l,f)}t.closePath()}}}var AYe=(function(){function t(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return t})(),qS=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultShape=function(){return new AYe},e.prototype.buildPath=function(n,i){xYe(n,i)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(Jn);qS.prototype.type="sector";var PYe=(function(){function t(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return t})(),nL=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultShape=function(){return new PYe},e.prototype.buildPath=function(n,i){var r=i.cx,o=i.cy,s=Math.PI*2;n.moveTo(r+i.r,o),n.arc(r,o,i.r,0,s,!1),n.moveTo(r+i.r0,o),n.arc(r,o,i.r0,0,s,!0)},e})(Jn);nL.prototype.type="ring";function IYe(t,e,n,i){var r=[],o=[],s=[],a=[],l,u,c,d;if(i){c=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,h=t.length;f<h;f++)Yh(c,c,t[f]),Xh(d,d,t[f]);Yh(c,c,i[0]),Xh(d,d,i[1])}for(var f=0,h=t.length;f<h;f++){var m=t[f];if(n)l=t[f?f-1:h-1],u=t[(f+1)%h];else if(f===0||f===h-1){r.push(nje(t[f]));continue}else l=t[f-1],u=t[f+1];ije(o,u,l),SE(o,o,e);var g=oP(m,l),v=oP(m,u),p=g+v;p!==0&&(g/=p,v/=p),SE(s,o,-g),SE(a,o,v);var b=q6([],m,s),y=q6([],m,a);i&&(Xh(b,b,c),Yh(b,b,d),Xh(y,y,c),Yh(y,y,d)),r.push(b),r.push(y)}return n&&r.push(r.shift()),r}function nQ(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=IYe(r,i,n,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var s=r.length,a=0;a<(n?s:s-1);a++){var l=o[a*2],u=o[a*2+1],c=r[(a+1)%s];t.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{t.moveTo(r[0][0],r[0][1]);for(var a=1,d=r.length;a<d;a++)t.lineTo(r[a][0],r[a][1])}n&&t.closePath()}}var RYe=(function(){function t(){this.points=null,this.smooth=0,this.smoothConstraint=null}return t})(),iL=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultShape=function(){return new RYe},e.prototype.buildPath=function(n,i){nQ(n,i,!0)},e})(Jn);iL.prototype.type="polygon";var MYe=(function(){function t(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return t})(),rL=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new MYe},e.prototype.buildPath=function(n,i){nQ(n,i,!1)},e})(Jn);rL.prototype.type="polyline";var OYe={},LYe=(function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return t})(),Nc=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new LYe},e.prototype.buildPath=function(n,i){var r,o,s,a;if(this.subPixelOptimize){var l=$Z(OYe,i,this.style);r=l.x1,o=l.y1,s=l.x2,a=l.y2}else r=i.x1,o=i.y1,s=i.x2,a=i.y2;var u=i.percent;u!==0&&(n.moveTo(r,o),u<1&&(s=r*(1-u)+s*u,a=o*(1-u)+a*u),n.lineTo(s,a))},e.prototype.pointAt=function(n){var i=this.shape;return[i.x1*(1-n)+i.x2*n,i.y1*(1-n)+i.y2*n]},e})(Jn);Nc.prototype.type="line";var go=[],DYe=(function(){function t(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return t})();function a$(t,e,n){var i=t.cpx2,r=t.cpy2;return i!=null||r!=null?[(n?i8:pr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?i8:pr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?r8:wo)(t.x1,t.cpx1,t.x2,e),(n?r8:wo)(t.y1,t.cpy1,t.y2,e)]}var oL=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new DYe},e.prototype.buildPath=function(n,i){var r=i.x1,o=i.y1,s=i.x2,a=i.y2,l=i.cpx1,u=i.cpy1,c=i.cpx2,d=i.cpy2,f=i.percent;f!==0&&(n.moveTo(r,o),c==null||d==null?(f<1&&(M1(r,l,s,f,go),l=go[1],s=go[2],M1(o,u,a,f,go),u=go[1],a=go[2]),n.quadraticCurveTo(l,u,s,a)):(f<1&&(R1(r,l,c,s,f,go),l=go[1],c=go[2],s=go[3],R1(o,u,d,a,f,go),u=go[1],d=go[2],a=go[3]),n.bezierCurveTo(l,u,c,d,s,a)))},e.prototype.pointAt=function(n){return a$(this.shape,n,!1)},e.prototype.tangentAt=function(n){var i=a$(this.shape,n,!0);return sje(i,i)},e})(Jn);oL.prototype.type="bezier-curve";var NYe=(function(){function t(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return t})(),jS=(function(t){yt(e,t);function e(n){return t.call(this,n)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new NYe},e.prototype.buildPath=function(n,i){var r=i.cx,o=i.cy,s=Math.max(i.r,0),a=i.startAngle,l=i.endAngle,u=i.clockwise,c=Math.cos(a),d=Math.sin(a);n.moveTo(c*s+r,d*s+o),n.arc(r,o,s,a,l,!u)},e})(Jn);jS.prototype.type="arc";var BYe=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="compound",n}return e.prototype._updatePathDirty=function(){for(var n=this.shape.paths,i=this.shapeChanged(),r=0;r<n.length;r++)i=i||n[r].shapeChanged();i&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var n=this.shape.paths||[],i=this.getGlobalScale(),r=0;r<n.length;r++)n[r].path||n[r].createPathProxy(),n[r].path.setScale(i[0],i[1],n[r].segmentIgnoreThreshold)},e.prototype.buildPath=function(n,i){for(var r=i.paths||[],o=0;o<r.length;o++)r[o].buildPath(n,r[o].shape,!0)},e.prototype.afterBrush=function(){for(var n=this.shape.paths||[],i=0;i<n.length;i++)n[i].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Jn.prototype.getBoundingRect.call(this)},e})(Jn),iQ=(function(){function t(e){this.colorStops=e||[]}return t.prototype.addColorStop=function(e,n){this.colorStops.push({offset:e,color:n})},t})(),rQ=(function(t){yt(e,t);function e(n,i,r,o,s,a){var l=t.call(this,s)||this;return l.x=n??0,l.y=i??0,l.x2=r??1,l.y2=o??0,l.type="linear",l.global=a||!1,l}return e})(iQ),VYe=(function(t){yt(e,t);function e(n,i,r,o,s){var a=t.call(this,o)||this;return a.x=n??.5,a.y=i??.5,a.r=r??.5,a.type="radial",a.global=s||!1,a}return e})(iQ),ax=Math.min,FYe=Math.max,qy=Math.abs,Ed=[0,0],xd=[0,0],lr=tZ(),jy=lr.minTv,Ky=lr.maxTv,oQ=(function(){function t(e,n){this._corners=[],this._axes=[],this._origin=[0,0];for(var i=0;i<4;i++)this._corners[i]=new qn;for(var i=0;i<2;i++)this._axes[i]=new qn;e&&this.fromBoundingRect(e,n)}return t.prototype.fromBoundingRect=function(e,n){var i=this._corners,r=this._axes,o=e.x,s=e.y,a=o+e.width,l=s+e.height;if(i[0].set(o,s),i[1].set(a,s),i[2].set(a,l),i[3].set(o,l),n)for(var u=0;u<4;u++)i[u].transform(n);qn.sub(r[0],i[1],i[0]),qn.sub(r[1],i[3],i[0]),r[0].normalize(),r[1].normalize();for(var u=0;u<2;u++)this._origin[u]=r[u].dot(i[0])},t.prototype.intersect=function(e,n,i){var r=!0,o=!n;return n&&qn.set(n,0,0),lr.reset(i,!o),!this._intersectCheckOneSide(this,e,o,1)&&(r=!1,o)||!this._intersectCheckOneSide(e,this,o,-1)&&(r=!1,o)||!o&&!lr.negativeSize&&qn.copy(n,r?lr.useDir?lr.dirMinTv:jy:Ky),r},t.prototype._intersectCheckOneSide=function(e,n,i,r){for(var o=!0,s=0;s<2;s++){var a=e._axes[s];if(e._getProjMinMaxOnAxis(s,e._corners,Ed),e._getProjMinMaxOnAxis(s,n._corners,xd),lr.negativeSize||Ed[1]<xd[0]||Ed[0]>xd[1]){if(o=!1,lr.negativeSize||i)return o;var l=qy(xd[0]-Ed[1]),u=qy(Ed[0]-xd[1]);ax(l,u)>Ky.len()&&(l<u?qn.scale(Ky,a,-l*r):qn.scale(Ky,a,u*r))}else if(!i){var l=qy(xd[0]-Ed[1]),u=qy(Ed[0]-xd[1]);(lr.useDir||ax(l,u)<jy.len())&&((l<u||!lr.bidirectional)&&(qn.scale(jy,a,l*r),lr.useDir&&lr.calcDirMTV()),(l>=u||!lr.bidirectional)&&(qn.scale(jy,a,-u*r),lr.useDir&&lr.calcDirMTV()))}}return o},t.prototype._getProjMinMaxOnAxis=function(e,n,i){for(var r=this._axes[e],o=this._origin,s=n[0].dot(r)+o[e],a=s,l=s,u=1;u<n.length;u++){var c=n[u].dot(r)+o[e];a=ax(c,a),l=FYe(c,l)}i[0]=a+lr.touchThreshold,i[1]=l-lr.touchThreshold,lr.negativeSize=i[1]<i[0]},t})(),$Ye=[],zYe=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.notClear=!0,n.incremental=!0,n._displayables=[],n._temporaryDisplayables=[],n._cursor=0,n}return e.prototype.traverse=function(n,i){n.call(i,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(n,i){i?this._temporaryDisplayables.push(n):this._displayables.push(n),this.markRedraw()},e.prototype.addDisplayables=function(n,i){i=i||!1;for(var r=0;r<n.length;r++)this.addDisplayable(n[r],i)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(n){for(var i=this._cursor;i<this._displayables.length;i++)n&&n(this._displayables[i]);for(var i=0;i<this._temporaryDisplayables.length;i++)n&&n(this._temporaryDisplayables[i])},e.prototype.update=function(){this.updateTransform();for(var n=this._cursor;n<this._displayables.length;n++){var i=this._displayables[n];i.parent=this,i.update(),i.parent=null}for(var n=0;n<this._temporaryDisplayables.length;n++){var i=this._temporaryDisplayables[n];i.parent=this,i.update(),i.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var n=new nn(1/0,1/0,-1/0,-1/0),i=0;i<this._displayables.length;i++){var r=this._displayables[i],o=r.getBoundingRect().clone();r.needLocalTransform()&&o.applyTransform(r.getLocalTransform($Ye)),n.union(o)}this._rect=n}return this._rect},e.prototype.contain=function(n,i){var r=this.transformCoordToLocal(n,i),o=this.getBoundingRect();if(o.contain(r[0],r[1]))for(var s=0;s<this._displayables.length;s++){var a=this._displayables[s];if(a.contain(n,i))return!0}return!1},e})(C0),HYe=Di();function UYe(t,e,n,i,r){var o;if(e&&e.ecModel){var s=e.ecModel.getUpdatePayload();o=s&&s.animation}var a=e&&e.isAnimationEnabled(),l=t==="update";if(a){var u=void 0,c=void 0,d=void 0;i?(u=Ut(i.duration,200),c=Ut(i.easing,"cubicOut"),d=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),d=e.getShallow(l?"animationDelayUpdate":"animationDelay")),o&&(o.duration!=null&&(u=o.duration),o.easing!=null&&(c=o.easing),o.delay!=null&&(d=o.delay)),Xt(d)&&(d=d(n,r)),Xt(u)&&(u=u(n));var f={duration:u||0,delay:d,easing:c};return f}else return null}function sL(t,e,n,i,r,o,s){var a=!1,l;Xt(r)?(s=o,o=r,r=null):Rt(r)&&(o=r.cb,s=r.during,a=r.isFrom,l=r.removeOpt,r=r.dataIndex);var u=t==="leave";u||e.stopAnimation("leave");var c=UYe(t,i,r,u?l||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null);if(c&&c.duration>0){var d=c.duration,f=c.delay,h=c.easing,m={duration:d,delay:f||0,easing:h,done:o,force:!!o||!!s,setToFinal:!u,scope:t,during:s};a?e.animateFrom(n,m):e.animateTo(n,m)}else e.stopAnimation(),!a&&e.attr(n),s&&s(1),o&&o()}function Af(t,e,n,i,r,o){sL("update",t,e,n,i,r,o)}function S0(t,e,n,i,r,o){sL("enter",t,e,n,i,r,o)}function gv(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++){var n=t.animators[e];if(n.scope==="leave")return!0}return!1}function H1(t,e,n,i,r,o){gv(t)||sL("leave",t,e,n,i,r,o)}function l$(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),H1(t,{style:{opacity:0}},e,n,i)}function WYe(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(r){r.isGroup||l$(r,e,n,i)}):l$(t,e,n,i)}function qYe(t){HYe(t).oldStyle=t.style}var BP={},zd=["x","y"],Sb=["width","height"];function jYe(t){return Jn.extend(t)}var KYe=wYe;function GYe(t,e){return KYe(t,e)}function ka(t,e){BP[t]=e}function YYe(t){if(BP.hasOwnProperty(t))return BP[t]}function aL(t,e,n,i){var r=yYe(t,e);return n&&(i==="center"&&(n=aQ(n,r.getBoundingRect())),lQ(r,n)),r}function sQ(t,e,n){var i=new Yc({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(r){if(n==="center"){var o={width:r.width,height:r.height};i.setStyle(aQ(e,o))}}});return i}function aQ(t,e){var n=e.width/e.height,i=t.height*n,r;i<=t.width?r=t.height:(i=t.width,r=i/n);var o=t.x+t.width/2,s=t.y+t.height/2;return{x:o-i/2,y:s-r/2,width:i,height:r}}var XYe=_Ye;function lQ(t,e){if(t.applyTransform){var n=t.getBoundingRect(),i=n.calculateTransform(e);t.applyTransform(i)}}function kb(t,e){return $Z(t,t,{lineWidth:e}),t}function JYe(t,e){return zZ(t,t,e),t}var ZYe=Zd;function QYe(t,e){for(var n=HO([]);t&&t!==e;)cv(n,t.getLocalTransform(),n),t=t.parent;return n}function lL(t,e,n){return e&&!Vo(e)&&(e=qO.getLocalTransform(e)),n&&(e=y0([],e)),Ds([],t,e)}function eXe(t,e,n){var i=e[4]===0||e[5]===0||e[0]===0?1:Ga(2*e[4]/e[0]),r=e[4]===0||e[5]===0||e[2]===0?1:Ga(2*e[4]/e[2]),o=[t==="left"?-i:t==="right"?i:0,t==="top"?-r:t==="bottom"?r:0];return o=lL(o,e,n),Ga(o[0])>Ga(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function u$(t){return!t.isGroup}function tXe(t){return t.shape!=null}function uQ(t,e,n){if(!t||!e)return;function i(s){var a={};return s.traverse(function(l){u$(l)&&l.anid&&(a[l.anid]=l)}),a}function r(s){var a={x:s.x,y:s.y,rotation:s.rotation};return tXe(s)&&(a.shape=wn(s.shape)),a}var o=i(t);e.traverse(function(s){if(u$(s)&&s.anid){var a=o[s.anid];if(a){var l=r(s);s.attr(r(a)),Af(s,l,n,si(s).dataIndex)}}})}function nXe(t,e){return jt(t,function(n){var i=n[0];i=ns(i,e.x),i=wb(i,e.x+e.width);var r=n[1];return r=ns(r,e.y),r=wb(r,e.y+e.height),[i,r]})}function iXe(t,e){var n=ns(t.x,e.x),i=wb(t.x+t.width,e.x+e.width),r=ns(t.y,e.y),o=wb(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function cQ(t,e,n){var i=lt({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return t.indexOf("image://")===0?(r.image=t.slice(8),Xn(r,n),new Yc(i)):aL(t.replace("path://",""),i,n,"center")}function rXe(t,e,n,i,r){for(var o=0,s=r[r.length-1];o<r.length;o++){var a=r[o];if(dQ(t,e,n,i,a[0],a[1],s[0],s[1]))return!0;s=a}}function dQ(t,e,n,i,r,o,s,a){var l=n-t,u=i-e,c=s-r,d=a-o,f=lx(c,d,l,u);if(oXe(f))return!1;var h=t-r,m=e-o,g=lx(h,m,l,u)/f;if(g<0||g>1)return!1;var v=lx(h,m,c,d)/f;return!(v<0||v>1)}function lx(t,e,n,i){return t*i-n*e}function oXe(t){return t<=1e-6&&t>=-1e-6}function U1(t,e,n,i,r){return e==null||(ai(e)?Zn[0]=Zn[1]=Zn[2]=Zn[3]=e:(Zn[0]=e[0],Zn[1]=e[1],Zn[2]=e[2],Zn[3]=e[3]),i&&(Zn[0]=ns(0,Zn[0]),Zn[1]=ns(0,Zn[1]),Zn[2]=ns(0,Zn[2]),Zn[3]=ns(0,Zn[3])),n&&(Zn[0]=-Zn[0],Zn[1]=-Zn[1],Zn[2]=-Zn[2],Zn[3]=-Zn[3]),c$(t,Zn,"x","width",3,1,r&&r[0]||0),c$(t,Zn,"y","height",0,2,r&&r[1]||0)),t}var Zn=[0,0,0,0];function c$(t,e,n,i,r,o,s){var a=e[o]+e[r],l=t[i];t[i]+=a,s=ns(0,wb(s,l)),t[i]<s?(t[i]=s,t[n]+=e[r]>=0?-e[r]:e[o]>=0?l+e[o]:Ga(a)>1e-8?(l-s)*e[r]/a:0):t[n]-=e[r]}function uL(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=At(e)?{formatter:e}:e,o=n.mainType,s=n.componentIndex,a={componentType:o,name:i,$vars:["name"]};a[o+"Index"]=s;var l=t.formatterParamsExtra;l&&ue(hi(l),function(c){el(a,c)||(a[c]=l[c],a.$vars.push(c))});var u=si(t.el);u.componentMainType=o,u.componentIndex=s,u.tooltipConfig={name:i,option:Xn({content:i,encodeHTMLContent:!0,formatterParams:a},r)}}function VP(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function cL(t,e){if(t)if(bt(t))for(var n=0;n<t.length;n++)VP(t[n],e);else VP(t,e)}function dL(t){return!t||Ga(t[1])<Gy&&Ga(t[2])<Gy||Ga(t[0])<Gy&&Ga(t[3])<Gy}var Gy=1e-5;function Tb(t,e){return t?nn.copy(t,e):e.clone()}function fL(t,e){return e?eZ(t||uu(),e):void 0}function fQ(t){return{z:t.get("z")||0,zlevel:t.get("zlevel")||0}}function sXe(t){var e=-1/0,n=1/0;VP(t,function(o){i(o),i(o.getTextContent()),i(o.getTextGuideLine())});function i(o){if(!(!o||o.isGroup)){var s=o.currentStates;if(s.length)for(var a=0;a<s.length;a++)r(o.states[s[a]]);r(o)}}function r(o){if(o){var s=o.z2;s>e&&(e=s),s<n&&(n=s)}}return n>e&&(n=e=0),{min:n,max:e}}function hQ(t,e,n){mQ(t,e,n,-1/0)}function mQ(t,e,n,i){if(t.ignoreModelZ)return i;var r=t.getTextContent(),o=t.getTextGuideLine(),s=t.isGroup;if(s)for(var a=t.childrenRef(),l=0;l<a.length;l++)i=ns(mQ(a[l],e,n,i),i);else t.z=e,t.zlevel=n,i=ns(t.z2||0,i);if(r&&(r.z=e,r.zlevel=n,isFinite(i)&&(r.z2=i+2)),o){var u=t.textGuideLineConfig;o.z=e,o.zlevel=n,isFinite(i)&&(o.z2=i+(u&&u.showAbove?1:-1))}return i}ka("circle",WS);ka("ellipse",tL);ka("sector",qS);ka("ring",nL);ka("polygon",iL);ka("polyline",rL);ka("rect",Fr);ka("line",Nc);ka("bezierCurve",oL);ka("arc",jS);const aXe=Object.freeze(Object.defineProperty({__proto__:null,Arc:jS,BezierCurve:oL,BoundingRect:nn,Circle:WS,CompoundPath:BYe,Ellipse:tL,Group:ao,Image:Yc,IncrementalDisplayable:zYe,Line:Nc,LinearGradient:rQ,OrientedBoundingRect:oQ,Path:Jn,Point:qn,Polygon:iL,Polyline:rL,RadialGradient:VYe,Rect:Fr,Ring:nL,Sector:qS,Text:va,WH:Sb,XY:zd,applyTransform:lL,calcZ2Range:sXe,clipPointsByRect:nXe,clipRectByRect:iXe,createIcon:cQ,ensureCopyRect:Tb,ensureCopyTransform:fL,expandOrShrinkRect:U1,extendPath:GYe,extendShape:jYe,getShapeClass:YYe,getTransform:QYe,groupTransition:uQ,initProps:S0,isBoundingRectAxisAligned:dL,isElementRemoved:gv,lineLineIntersect:dQ,linePolygonIntersect:rXe,makeImage:sQ,makePath:aL,mergePath:XYe,registerShape:ka,removeElement:H1,removeElementWithFadeOut:WYe,resizePath:lQ,retrieveZInfo:fQ,setTooltipConfig:uL,subPixelOptimize:ZYe,subPixelOptimizeLine:kb,subPixelOptimizeRect:JYe,transformDirection:eXe,traverseElements:cL,traverseUpdateZ:hQ,updateProps:Af},Symbol.toStringTag,{value:"Module"}));var KS={};function lXe(t,e){for(var n=0;n<vl.length;n++){var i=vl[n],r=e[i],o=t.ensureState(i);o.style=o.style||{},o.style.text=r}var s=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(s,!0)}function d$(t,e,n){var i=t.labelFetcher,r=t.labelDataIndex,o=t.labelDimIndex,s=e.normal,a;i&&(a=i.getFormattedLabel(r,"normal",null,o,s&&s.get("formatter"),n!=null?{interpolatedValue:n}:null)),a==null&&(a=Xt(t.defaultText)?t.defaultText(r,t,n):t.defaultText);for(var l={normal:a},u=0;u<vl.length;u++){var c=vl[u],d=e[c];l[c]=Ut(i?i.getFormattedLabel(r,c,null,o,d&&d.get("formatter")):null,a)}return l}function gQ(t,e,n,i){n=n||KS;for(var r=t instanceof va,o=!1,s=0;s<K8.length;s++){var a=e[K8[s]];if(a&&a.getShallow("show")){o=!0;break}}var l=r?t:t.getTextContent();if(o){r||(l||(l=new va,t.setTextContent(l)),t.stateProxy&&(l.stateProxy=t.stateProxy));var u=d$(n,e),c=e.normal,d=!!c.getShallow("show"),f=Eb(c,i&&i.normal,n,!1,!r);f.text=u.normal,r||t.setTextConfig(f$(c,n,!1));for(var s=0;s<vl.length;s++){var h=vl[s],a=e[h];if(a){var m=l.ensureState(h),g=!!Ut(a.getShallow("show"),d);if(g!==d&&(m.ignore=!g),m.style=Eb(a,i&&i[h],n,!0,!r),m.style.text=u[h],!r){var v=t.ensureState(h);v.textConfig=f$(a,n,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!d,l.useStyle(f),l.dirty(),n.enableTextSetter&&(pQ(l).setLabelText=function(p){var b=d$(n,e,p);lXe(l,b)})}else l&&(l.ignore=!0);t.dirty()}function hL(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<vl.length;i++){var r=vl[i];n[r]=t.getModel([r,e])}return n}function Eb(t,e,n,i,r){var o={};return uXe(o,t,n,i,r),e&&lt(o,e),o}function f$(t,e,n){e=e||{};var i={},r,o=t.getShallow("rotate"),s=Ut(t.getShallow("distance"),n?null:5),a=t.getShallow("offset");return r=t.getShallow("position")||(n?null:"inside"),r==="outside"&&(r=e.defaultOutsidePosition||"top"),r!=null&&(i.position=r),a!=null&&(i.offset=a),o!=null&&(o*=Math.PI/180,i.rotation=o),s!=null&&(i.distance=s),i.outsideFill=t.get("color")==="inherit"?e.inheritColor||null:"auto",e.autoOverflowArea!=null&&(i.autoOverflowArea=e.autoOverflowArea),e.layoutRect!=null&&(i.layoutRect=e.layoutRect),i}function uXe(t,e,n,i,r){n=n||KS;var o=e.ecModel,s=o&&o.option.textStyle,a=cXe(e),l;if(a){l={};var u="richInheritPlainLabel",c=Ut(e.get(u),o?o.get(u):void 0);for(var d in a)if(a.hasOwnProperty(d)){var f=e.getModel(["rich",d]);p$(l[d]={},f,s,e,c,n,i,r,!1,!0)}}l&&(t.rich=l);var h=e.get("overflow");h&&(t.overflow=h);var m=e.get("lineOverflow");m&&(t.lineOverflow=m);var g=t,v=e.get("minMargin");if(v!=null)v=ai(v)?v/2:0,g.margin=[v,v,v,v],g.__marginType=em.minMargin;else{var p=e.get("textMargin");p!=null&&(g.margin=$O(p),g.__marginType=em.textMargin)}p$(t,e,s,null,null,n,i,r,!0,!1)}function cXe(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||KS).rich;if(n){e=e||{};for(var i=hi(n),r=0;r<i.length;r++){var o=i[r];e[o]=1}}t=t.parentModel}return e}var h$=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],m$=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],g$=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function p$(t,e,n,i,r,o,s,a,l,u){n=!s&&n||KS;var c=o&&o.inheritColor,d=e.getShallow("color"),f=e.getShallow("textBorderColor"),h=Ut(e.getShallow("opacity"),n.opacity);(d==="inherit"||d==="auto")&&(c?d=c:d=null),(f==="inherit"||f==="auto")&&(c?f=c:f=null),a||(d=d||n.color,f=f||n.textBorderColor),d!=null&&(t.fill=d),f!=null&&(t.stroke=f);var m=Ut(e.getShallow("textBorderWidth"),n.textBorderWidth);m!=null&&(t.lineWidth=m);var g=Ut(e.getShallow("textBorderType"),n.textBorderType);g!=null&&(t.lineDash=g);var v=Ut(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);v!=null&&(t.lineDashOffset=v),!s&&h==null&&!u&&(h=o&&o.defaultOpacity),h!=null&&(t.opacity=h),!s&&!a&&t.fill==null&&o.inheritColor&&(t.fill=o.inheritColor);for(var p=0;p<h$.length;p++){var b=h$[p],y=r!==!1&&i?bm(e.getShallow(b),i.getShallow(b),n[b]):Ut(e.getShallow(b),n[b]);y!=null&&(t[b]=y)}for(var p=0;p<m$.length;p++){var b=m$[p],y=e.getShallow(b);y!=null&&(t[b]=y)}if(t.verticalAlign==null){var _=e.getShallow("baseline");_!=null&&(t.verticalAlign=_)}if(!l||!o.disableBox){for(var p=0;p<g$.length;p++){var b=g$[p],y=e.getShallow(b);y!=null&&(t[b]=y)}var C=e.getShallow("borderType");C!=null&&(t.borderDash=C),(t.backgroundColor==="auto"||t.backgroundColor==="inherit")&&c&&(t.backgroundColor=c),(t.borderColor==="auto"||t.borderColor==="inherit")&&c&&(t.borderColor=c)}}function dXe(t,e){var n=e&&e.getModel("textStyle");return Ka([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}var pQ=Di(),em={minMargin:1,textMargin:2},fXe=["textStyle","color"],ux=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],cx=new va,hXe=(function(){function t(){}return t.prototype.getTextColor=function(e){var n=this.ecModel;return this.getShallow("color")||(!e&&n?n.get(fXe):null)},t.prototype.getFont=function(){return dXe({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},t.prototype.getTextRect=function(e){for(var n={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},i=0;i<ux.length;i++)n[ux[i]]=this.getShallow(ux[i]);return cx.useStyle(n),cx.update(),cx.getBoundingRect()},t})(),vQ=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],mXe=Cb(vQ),gXe=(function(){function t(){}return t.prototype.getLineStyle=function(e){return mXe(this,e)},t})(),bQ=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],pXe=Cb(bQ),vXe=(function(){function t(){}return t.prototype.getItemStyle=function(e,n){return pXe(this,e,n)},t})(),Ii=(function(){function t(e,n,i){this.parentModel=n,this.ecModel=i,this.option=e}return t.prototype.init=function(e,n,i){},t.prototype.mergeOption=function(e,n){Yn(this.option,e,!0)},t.prototype.get=function(e,n){return e==null?this.option:this._doGet(this.parsePath(e),!n&&this.parentModel)},t.prototype.getShallow=function(e,n){var i=this.option,r=i==null?i:i[e];if(r==null&&!n){var o=this.parentModel;o&&(r=o.getShallow(e))}return r},t.prototype.getModel=function(e,n){var i=e!=null,r=i?this.parsePath(e):null,o=i?this._doGet(r):this.option;return n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(r)),new t(o,n,this.ecModel)},t.prototype.isEmpty=function(){return this.option==null},t.prototype.restoreData=function(){},t.prototype.clone=function(){var e=this.constructor;return new e(wn(this.option))},t.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},t.prototype.resolveParentPath=function(e){return e},t.prototype.isAnimationEnabled=function(){if(!Kt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},t.prototype._doGet=function(e,n){var i=this.option;if(!e)return i;for(var r=0;r<e.length&&!(e[r]&&(i=i&&typeof i=="object"?i[e[r]]:null,i==null));r++);return i==null&&n&&(i=n._doGet(this.resolveParentPath(e),n.parentModel)),i},t})();GO(Ii);JKe(Ii);kl(Ii,gXe);kl(Ii,vXe);kl(Ii,nGe);kl(Ii,hXe);var bXe=Math.round(Math.random()*10);function GS(t){return[t||"",bXe++].join("_")}function yXe(t){var e={};t.registerSubTypeDefaulter=function(n,i){var r=Ya(n);e[r.main]=i},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Ya(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}function wXe(t,e){t.topologicalTravel=function(o,s,a,l){if(!o.length)return;var u=n(s),c=u.graph,d=u.noEntryList,f={};for(ue(o,function(b){f[b]=!0});d.length;){var h=d.pop(),m=c[h],g=!!f[h];g&&(a.call(l,h,m.originalDeps.slice()),delete f[h]),ue(m.successor,g?p:v)}ue(f,function(){var b="";throw new Error(b)});function v(b){c[b].entryCount--,c[b].entryCount===0&&d.push(b)}function p(b){f[b]=!0,v(b)}};function n(o){var s={},a=[];return ue(o,function(l){var u=i(s,l),c=u.originalDeps=e(l),d=r(c,o);u.entryCount=d.length,u.entryCount===0&&a.push(l),ue(d,function(f){Dn(u.predecessor,f)<0&&u.predecessor.push(f);var h=i(s,f);Dn(h.successor,f)<0&&h.successor.push(l)})}),{graph:s,noEntryList:a}}function i(o,s){return o[s]||(o[s]={predecessor:[],successor:[]}),o[s]}function r(o,s){var a=[];return ue(o,function(l){Dn(s,l)>=0&&a.push(l)}),a}}const _Xe={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},CXe={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}",withoutName:"第{seriesId}个系列是一个{seriesType}",separator:{middle:"",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"",end:""}}}};var W1="ZH",mL="EN",_m=mL,m_={},gL={},yQ=Kt.domSupported?(function(){var t=(document.documentElement.lang||navigator.language||navigator.browserLanguage||_m).toUpperCase();return t.indexOf(W1)>-1?W1:_m})():_m;function wQ(t,e){t=t.toUpperCase(),gL[t]=new Ii(e),m_[t]=e}function SXe(t){if(At(t)){var e=m_[t.toUpperCase()]||{};return t===W1||t===mL?wn(e):Yn(wn(e),wn(m_[_m]),!1)}else return Yn(wn(t),wn(m_[_m]),!1)}function kXe(t){return gL[t]}function TXe(){return gL[_m]}wQ(mL,_Xe);wQ(W1,CXe);var EXe=null;function q1(){return EXe}var pL=1e3,vL=pL*60,pv=vL*60,Ps=pv*24,v$=Ps*365,xXe={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},g_={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},AXe="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Yy="{yyyy}-{MM}-{dd}",b$={year:"{yyyy}",month:"{yyyy}-{MM}",day:Yy,hour:Yy+" "+g_.hour,minute:Yy+" "+g_.minute,second:Yy+" "+g_.second,millisecond:AXe},ff=["year","month","day","hour","minute","second","millisecond"],PXe=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function IXe(t){return!At(t)&&!Xt(t)?RXe(t):t}function RXe(t){t=t||{};var e={},n=!0;return ue(ff,function(i){n&&(n=t[i]==null)}),ue(ff,function(i,r){var o=t[i];e[i]={};for(var s=null,a=r;a>=0;a--){var l=ff[a],u=Rt(o)&&!bt(o)?o[l]:o,c=void 0;bt(u)?(c=u.slice(),s=c[0]||""):At(u)?(s=u,c=[s]):(s==null?s=g_[i]:xXe[l].test(s)||(s=e[l][l][0]+" "+s),c=[s],n&&(c[1]="{primary|"+s+"}")),e[i][l]=c}}),e}function Fu(t,e){return t+="","0000".substr(0,e-t.length)+t}function vv(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function MXe(t){return t===vv(t)}function OXe(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function YS(t,e,n,i){var r=kg(t),o=r[_Q(n)](),s=r[bL(n)]()+1,a=Math.floor((s-1)/3)+1,l=r[yL(n)](),u=r["get"+(n?"UTC":"")+"Day"](),c=r[wL(n)](),d=(c-1)%12+1,f=r[_L(n)](),h=r[CL(n)](),m=r[SL(n)](),g=c>=12?"pm":"am",v=g.toUpperCase(),p=i instanceof Ii?i:kXe(i||yQ)||TXe(),b=p.getModel("time"),y=b.get("month"),_=b.get("monthAbbr"),C=b.get("dayOfWeek"),S=b.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,Fu(o%100+"",2)).replace(/{Q}/g,a+"").replace(/{MMMM}/g,y[s-1]).replace(/{MMM}/g,_[s-1]).replace(/{MM}/g,Fu(s,2)).replace(/{M}/g,s+"").replace(/{dd}/g,Fu(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Fu(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Fu(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,Fu(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Fu(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Fu(m,3)).replace(/{S}/g,m+"")}function LXe(t,e,n,i,r){var o=null;if(At(n))o=n;else if(Xt(n)){var s={time:t.time,level:t.time.level},a=q1();a&&a.makeAxisLabelFormatterParamBreak(s,t.break),o=n(t.value,e,s)}else{var l=t.time;if(l){var u=n[l.lowerTimeUnit][l.upperTimeUnit];o=u[Math.min(l.level,u.length-1)]||""}else{var c=j1(t.value,r);o=n[c][c][0]}}return YS(new Date(t.value),o,r,i)}function j1(t,e){var n=kg(t),i=n[bL(e)]()+1,r=n[yL(e)](),o=n[wL(e)](),s=n[_L(e)](),a=n[CL(e)](),l=n[SL(e)](),u=l===0,c=u&&a===0,d=c&&s===0,f=d&&o===0,h=f&&r===1,m=h&&i===1;return m?"year":h?"month":f?"day":d?"hour":c?"minute":u?"second":"millisecond"}function FP(t,e,n){switch(e){case"year":t[CQ(n)](0);case"month":t[SQ(n)](1);case"day":t[kQ(n)](0);case"hour":t[TQ(n)](0);case"minute":t[EQ(n)](0);case"second":t[xQ(n)](0)}return t}function _Q(t){return t?"getUTCFullYear":"getFullYear"}function bL(t){return t?"getUTCMonth":"getMonth"}function yL(t){return t?"getUTCDate":"getDate"}function wL(t){return t?"getUTCHours":"getHours"}function _L(t){return t?"getUTCMinutes":"getMinutes"}function CL(t){return t?"getUTCSeconds":"getSeconds"}function SL(t){return t?"getUTCMilliseconds":"getMilliseconds"}function DXe(t){return t?"setUTCFullYear":"setFullYear"}function CQ(t){return t?"setUTCMonth":"setMonth"}function SQ(t){return t?"setUTCDate":"setDate"}function kQ(t){return t?"setUTCHours":"setHours"}function TQ(t){return t?"setUTCMinutes":"setMinutes"}function EQ(t){return t?"setUTCSeconds":"setSeconds"}function xQ(t){return t?"setUTCMilliseconds":"setMilliseconds"}function AQ(t){if(!xKe(t))return At(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function PQ(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(n,i){return i.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var kL=$O;function $P(t,e,n){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function r(c){return c&&Ka(c)?c:"-"}function o(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var s=e==="time",a=t instanceof Date;if(s||a){var l=s?kg(t):t;if(isNaN(+l)){if(a)return"-"}else return YS(l,i,n)}if(e==="ordinal")return iP(t)?r(t):ai(t)&&o(t)?t+"":"-";var u=N1(t);return o(u)?AQ(u):iP(t)?r(t):typeof t=="boolean"?t+"":"-"}var y$=["a","b","c","d","e","f","g"],dx=function(t,e){return"{"+t+(e??"")+"}"};function IQ(t,e,n){bt(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o<r.length;o++){var s=y$[o];t=t.replace(dx(s),dx(s,0))}for(var a=0;a<i;a++)for(var l=0;l<r.length;l++){var u=e[a][r[l]];t=t.replace(dx(y$[l],a),n?yo(u):u)}return t}function NXe(t,e){var n=At(t)?{color:t,extraCssText:e}:t||{},i=n.color,r=n.type;e=n.extraCssText;var o=n.renderMode||"html";if(!i)return"";if(o==="html")return r==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+yo(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+yo(i)+";"+(e||"")+'"></span>';var s=n.markerId||"markerX";return{renderMode:o,content:"{"+s+"|} ",style:r==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Pf(t,e){return e=e||"transparent",At(t)?t:Rt(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}var p_={},fx={},TL=(function(){function t(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return t.prototype.create=function(e,n){this._nonSeriesBoxMasterList=i(p_),this._normalMasterList=i(fx);function i(r,o){var s=[];return ue(r,function(a,l){var u=a.create(e,n);s=s.concat(u||[])}),s}},t.prototype.update=function(e,n){ue(this._normalMasterList,function(i){i.update&&i.update(e,n)})},t.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},t.register=function(e,n){if(e==="matrix"||e==="calendar"){p_[e]=n;return}fx[e]=n},t.get=function(e){return fx[e]||p_[e]},t})();function BXe(t){return!!p_[t]}var w$={coord:1,coord2:2},VXe=cn();function FXe(t){var e=t.getShallow("coord",!0),n=w$.coord;if(e==null){var i=VXe.get(t.type);i&&i.getCoord2&&(n=w$.coord2,e=i.getCoord2(t))}return{coord:e,from:n}}var Yl={none:0,dataCoordSys:1,boxCoordSys:2};function $Xe(t,e){var n=t.getShallow("coordinateSystem"),i=t.getShallow("coordinateSystemUsage",!0),r=Yl.none;if(n){var o=t.mainType==="series";i==null&&(i=o?"data":"box"),i==="data"?(r=Yl.dataCoordSys,o||(r=Yl.none)):i==="box"&&(r=Yl.boxCoordSys,!o&&!BXe(n)&&(r=Yl.none))}return{coordSysType:n,kind:r}}function zXe(t){var e=t.targetModel,n=t.coordSysType,i=t.coordSysProvider,r=t.isDefaultDataCoordSys,o=$Xe(e),s=o.kind,a=o.coordSysType;if(r&&s!==Yl.dataCoordSys&&(s=Yl.dataCoordSys,a=n),s===Yl.none||a!==n)return!1;var l=i(n,e);return l?(s===Yl.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var v_=ue,HXe=["left","right","top","bottom","width","height"],Xy=[["width","left","right"],["height","top","bottom"]];function RQ(t,e,n,i,r){var o=0,s=0;i==null&&(i=1/0),r==null&&(r=1/0);var a=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect(),h,m;if(t==="horizontal"){var g=c.width+(f?-f.x+c.x:0);h=o+g,h>i||l.newline?(o=0,h=g,s+=a+n,a=c.height):a=Math.max(a,c.height)}else{var v=c.height+(f?-f.y+c.y:0);m=s+v,m>r||l.newline?(o+=a+n,s=0,m=v,a=c.width):a=Math.max(a,c.width)}l.newline||(l.x=o,l.y=s,l.markRedraw(),t==="horizontal"?o=h+n:s=m+n)})}Ls(RQ,"vertical");Ls(RQ,"horizontal");function UXe(t,e){return{left:t.getShallow("left",e),top:t.getShallow("top",e),right:t.getShallow("right",e),bottom:t.getShallow("bottom",e),width:t.getShallow("width",e),height:t.getShallow("height",e)}}function EL(t,e,n){n=kL(n||0);var i=e.width,r=e.height,o=eo(t.left,i),s=eo(t.top,r),a=eo(t.right,i),l=eo(t.bottom,r),u=eo(t.width,i),c=eo(t.height,r),d=n[2]+n[0],f=n[1]+n[3],h=t.aspect;switch(isNaN(u)&&(u=i-a-f-o),isNaN(c)&&(c=r-l-d-s),h!=null&&(isNaN(u)&&isNaN(c)&&(h>i/r?u=i*.8:c=r*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(o)&&(o=i-a-u-f),isNaN(s)&&(s=r-l-c-d),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-f;break}switch(t.top||t.bottom){case"middle":case"center":s=r/2-c/2-n[0];break;case"bottom":s=r-c-d;break}o=o||0,s=s||0,isNaN(u)&&(u=i-f-o-(a||0)),isNaN(c)&&(c=r-d-s-(l||0));var m=new nn((e.x||0)+o+n[3],(e.y||0)+s+n[0],u,c);return m.margin=n,m}var hx={rect:1};function WXe(t,e,n){var i,r,o,s=t.boxCoordinateSystem,a;if(s){var l=FXe(t),u=l.coord,c=l.from;if(s.dataToLayout){o=hx.rect,a=c;var d=s.dataToLayout(u);i=d.contentRect||d.rect}}return o==null&&(o=hx.rect),o===hx.rect&&(i||(i={x:0,y:0,width:e.getWidth(),height:e.getHeight()}),r=[i.x+i.width/2,i.y+i.height/2]),{type:o,refContainer:i,refPoint:r,boxCoordFrom:a}}function xb(t){var e=t.layoutMode||t.constructor.layoutMode;return Rt(e)?e:e?{type:e}:null}function If(t,e,n){var i=n&&n.ignoreSize;!bt(i)&&(i=[i,i]);var r=s(Xy[0],0),o=s(Xy[1],1);l(Xy[0],t,r),l(Xy[1],t,o);function s(u,c){var d={},f=0,h={},m=0,g=2;if(v_(u,function(b){h[b]=t[b]}),v_(u,function(b){el(e,b)&&(d[b]=h[b]=e[b]),a(d,b)&&f++,a(h,b)&&m++}),i[c])return a(e,u[1])?h[u[2]]=null:a(e,u[2])&&(h[u[1]]=null),h;if(m===g||!f)return h;if(f>=g)return d;for(var v=0;v<u.length;v++){var p=u[v];if(!el(d,p)&&el(t,p)){d[p]=t[p];break}}return d}function a(u,c){return u[c]!=null&&u[c]!=="auto"}function l(u,c,d){v_(u,function(f){c[f]=d[f]})}}function XS(t){return qXe({},t)}function qXe(t,e){return e&&t&&v_(HXe,function(n){el(e,n)&&(t[n]=e[n])}),t}var jXe=Di(),jn=(function(t){yt(e,t);function e(n,i,r){var o=t.call(this,n,i,r)||this;return o.uid=GS("ec_cpt_model"),o}return e.prototype.init=function(n,i,r){this.mergeDefaultAndTheme(n,r)},e.prototype.mergeDefaultAndTheme=function(n,i){var r=xb(this),o=r?XS(n):{},s=i.getTheme();Yn(n,s.get(this.mainType)),Yn(n,this.getDefaultOption()),r&&If(n,o,r)},e.prototype.mergeOption=function(n,i){Yn(this.option,n,!0);var r=xb(this);r&&If(this.option,n,r)},e.prototype.optionUpdated=function(n,i){},e.prototype.getDefaultOption=function(){var n=this.constructor;if(!GKe(n))return n.defaultOption;var i=jXe(this);if(!i.defaultOption){for(var r=[],o=n;o;){var s=o.prototype.defaultOption;s&&r.push(s),o=o.superClass}for(var a={},l=r.length-1;l>=0;l--)a=Yn(a,r[l],!0);i.defaultOption=a}return i.defaultOption},e.prototype.getReferringComponents=function(n,i){var r=n+"Index",o=n+"Id";return _0(this.ecModel,n,{index:this.get(r,!0),id:this.get(o,!0)},i)},e.prototype.getBoxLayoutParams=function(){return UXe(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(n){this.option.zlevel=n},e.protoInitialize=(function(){var n=e.prototype;n.type="component",n.id="",n.name="",n.mainType="",n.subType="",n.componentIndex=0})(),e})(Ii);MZ(jn,Ii);VS(jn);yXe(jn);wXe(jn,KXe);function KXe(t){var e=[];return ue(jn.getClassesByMainType(t),function(n){e=e.concat(n.dependencies||n.prototype.dependencies||[])}),e=jt(e,function(n){return Ya(n).main}),t!=="dataset"&&Dn(e,"dataset")<=0&&e.unshift("dataset"),e}var dn={color:{},darkColor:{},size:{}},ki=dn.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};lt(ki,{primary:ki.neutral80,secondary:ki.neutral70,tertiary:ki.neutral60,quaternary:ki.neutral50,disabled:ki.neutral20,border:ki.neutral30,borderTint:ki.neutral20,borderShade:ki.neutral40,background:ki.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:ki.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:ki.neutral70,axisLineTint:ki.neutral40,axisTick:ki.neutral70,axisTickMinor:ki.neutral60,axisLabel:ki.neutral70,axisSplitLine:ki.neutral15,axisMinorSplitLine:ki.neutral05});for(var Ad in ki)if(ki.hasOwnProperty(Ad)){var _$=ki[Ad];Ad==="theme"?dn.darkColor.theme=ki.theme.slice():Ad==="highlight"?dn.darkColor.highlight="rgba(255,231,130,0.4)":Ad.indexOf("accent")===0?dn.darkColor[Ad]=gP(_$,null,function(t){return t*.5},function(t){return Math.min(1,1.3-t)}):dn.darkColor[Ad]=gP(_$,null,function(t){return t*.9},function(t){return 1-Math.pow(t,1.5)})}dn.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var MQ="";typeof navigator<"u"&&(MQ=navigator.platform||"");var kh="rgba(0, 0, 0, 0.2)",OQ=dn.color.theme[0],GXe=gP(OQ,null,null,.9);const YXe={darkMode:"auto",colorBy:"series",color:dn.color.theme,gradientColor:[GXe,OQ],aria:{decal:{decals:[{color:kh,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:kh,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:kh,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:kh,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:kh,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:kh,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:MQ.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var LQ=cn(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),ms="original",Wr="arrayRows",Ta="objectRows",El="keyedColumns",Cc="typedArray",DQ="unknown",rl="column",Jf="row",jo={Must:1,Might:2,Not:3},NQ=Di();function XXe(t){NQ(t).datasetMap=cn()}function JXe(t,e,n){var i={},r=BQ(e);if(!r||!t)return i;var o=[],s=[],a=e.ecModel,l=NQ(a).datasetMap,u=r.uid+"_"+n.seriesLayoutBy,c,d;t=t.slice(),ue(t,function(g,v){var p=Rt(g)?g:t[v]={name:g};p.type==="ordinal"&&c==null&&(c=v,d=m(p)),i[p.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:d,valueWayDim:0});ue(t,function(g,v){var p=g.name,b=m(g);if(c==null){var y=f.valueWayDim;h(i[p],y,b),h(s,y,b),f.valueWayDim+=b}else if(c===v)h(i[p],0,b),h(o,0,b);else{var y=f.categoryWayDim;h(i[p],y,b),h(s,y,b),f.categoryWayDim+=b}});function h(g,v,p){for(var b=0;b<p;b++)g.push(v+b)}function m(g){var v=g.dimsDef;return v?v.length:1}return o.length&&(i.itemName=o),s.length&&(i.seriesName=s),i}function BQ(t){var e=t.get("data",!0);if(!e)return _0(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},As).models[0]}function ZXe(t){return!t.get("transform",!0)&&!t.get("fromTransformResult",!0)?[]:_0(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},As).models}function VQ(t,e){return QXe(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function QXe(t,e,n,i,r,o){var s,a=5;if(Fo(t))return jo.Not;var l,u;if(i){var c=i[o];Rt(c)?(l=c.name,u=c.type):At(c)&&(l=c)}if(u!=null)return u==="ordinal"?jo.Must:jo.Not;if(e===Wr){var d=t;if(n===Jf){for(var f=d[o],h=0;h<(f||[]).length&&h<a;h++)if((s=_(f[r+h]))!=null)return s}else for(var h=0;h<d.length&&h<a;h++){var m=d[r+h];if(m&&(s=_(m[o]))!=null)return s}}else if(e===Ta){var g=t;if(!l)return jo.Not;for(var h=0;h<g.length&&h<a;h++){var v=g[h];if(v&&(s=_(v[l]))!=null)return s}}else if(e===El){var p=t;if(!l)return jo.Not;var f=p[l];if(!f||Fo(f))return jo.Not;for(var h=0;h<f.length&&h<a;h++)if((s=_(f[h]))!=null)return s}else if(e===ms)for(var b=t,h=0;h<b.length&&h<a;h++){var v=b[h],y=w0(v);if(!bt(y))return jo.Not;if((s=_(y[o]))!=null)return s}function _(C){var S=At(C);if(C!=null&&Number.isFinite(Number(C))&&C!=="")return S?jo.Might:jo.Not;if(S&&C!=="-")return jo.Must}return jo.Not}var eJe=cn();function tJe(t,e,n){var i=eJe.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}var C$=Di();Di();var xL=(function(){function t(){}return t.prototype.getColorFromPalette=function(e,n,i){var r=io(this.get("color",!0)),o=this.get("colorLayer",!0);return iJe(this,C$,r,o,e,n,i)},t.prototype.clearColorPalette=function(){rJe(this,C$)},t})();function nJe(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}function iJe(t,e,n,i,r,o,s){o=o||t;var a=e(o),l=a.paletteIdx||0,u=a.paletteNameMap=a.paletteNameMap||{};if(u.hasOwnProperty(r))return u[r];var c=s==null||!i?n:nJe(i,s);if(c=c||n,!(!c||!c.length)){var d=c[l];return r&&(u[r]=d),a.paletteIdx=(l+1)%c.length,d}}function rJe(t,e){e(t).paletteIdx=0,e(t).paletteNameMap={}}var Jy,op,S$,k$="\0_ec_inner",oJe=1,AL=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(n,i,r,o,s,a){o=o||{},this.option=null,this._theme=new Ii(o),this._locale=new Ii(s),this._optionManager=a},e.prototype.setOption=function(n,i,r){var o=x$(i);this._optionManager.setOption(n,r,o),this._resetOption(null,o)},e.prototype.resetOption=function(n,i){return this._resetOption(n,x$(i))},e.prototype._resetOption=function(n,i){var r=!1,o=this._optionManager;if(!n||n==="recreate"){var s=o.mountOption(n==="recreate");!this.option||n==="recreate"?S$(this,s):(this.restoreData(),this._mergeOption(s,i)),r=!0}if((n==="timeline"||n==="media")&&this.restoreData(),!n||n==="recreate"||n==="timeline"){var a=o.getTimelineOption(this);a&&(r=!0,this._mergeOption(a,i))}if(!n||n==="recreate"||n==="media"){var l=o.getMediaOption(this);l.length&&ue(l,function(u){r=!0,this._mergeOption(u,i)},this)}return r},e.prototype.mergeOption=function(n){this._mergeOption(n,null)},e.prototype._mergeOption=function(n,i){var r=this.option,o=this._componentsMap,s=this._componentsCount,a=[],l=cn(),u=i&&i.replaceMergeMainTypeMap;XXe(this),ue(n,function(d,f){d!=null&&(jn.hasClass(f)?f&&(a.push(f),l.set(f,!0)):r[f]=r[f]==null?wn(d):Yn(r[f],d,!0))}),u&&u.each(function(d,f){jn.hasClass(f)&&!l.get(f)&&(a.push(f),l.set(f,!0))}),jn.topologicalTravel(a,jn.getAllClassMainTypes(),c,this);function c(d){var f=tJe(this,d,io(n[d])),h=o.get(d),m=h?u&&u.get(d)?"replaceMerge":"normalMerge":"replaceAll",g=OKe(h,f,m);$Ke(g,d,jn),r[d]=null,o.set(d,null),s.set(d,0);var v=[],p=[],b=0,y;ue(g,function(_,C){var S=_.existing,k=_.newOption;if(!k)S&&(S.mergeOption({},this),S.optionUpdated({},!1));else{var T=d==="series",E=jn.getClass(d,_.keyInfo.subType,!T);if(!E)return;if(d==="tooltip"){if(y)return;y=!0}if(S&&S.constructor===E)S.name=_.keyInfo.name,S.mergeOption(k,this),S.optionUpdated(k,!1);else{var x=lt({componentIndex:C},_.keyInfo);S=new E(k,this,this,x),lt(S,x),_.brandNew&&(S.__requireNewView=!0),S.init(k,this,this),S.optionUpdated(null,!0)}}S?(v.push(S.option),p.push(S),b++):(v.push(void 0),p.push(void 0))},this),r[d]=v,o.set(d,p),s.set(d,b),d==="series"&&Jy(this)}this._seriesIndices||Jy(this)},e.prototype.getOption=function(){var n=wn(this.option);return ue(n,function(i,r){if(jn.hasClass(r)){for(var o=io(i),s=o.length,a=!1,l=s-1;l>=0;l--)o[l]&&!_b(o[l])?a=!0:(o[l]=null,!a&&s--);o.length=s,n[r]=o}}),delete n[k$],n},e.prototype.setTheme=function(n){this._theme=new Ii(n),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(n){this._payload=n},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(n,i){var r=this._componentsMap.get(n);if(r){var o=r[i||0];if(o)return o;if(i==null){for(var s=0;s<r.length;s++)if(r[s])return r[s]}}},e.prototype.queryComponents=function(n){var i=n.mainType;if(!i)return[];var r=n.index,o=n.id,s=n.name,a=this._componentsMap.get(i);if(!a||!a.length)return[];var l;return r!=null?(l=[],ue(io(r),function(u){a[u]&&l.push(a[u])})):o!=null?l=T$("id",o,a):s!=null?l=T$("name",s,a):l=gr(a,function(u){return!!u}),E$(l,n)},e.prototype.findComponents=function(n){var i=n.query,r=n.mainType,o=a(i),s=o?this.queryComponents(o):gr(this._componentsMap.get(r),function(u){return!!u});return l(E$(s,n));function a(u){var c=r+"Index",d=r+"Id",f=r+"Name";return u&&(u[c]!=null||u[d]!=null||u[f]!=null)?{mainType:r,index:u[c],id:u[d],name:u[f]}:null}function l(u){return n.filter?gr(u,n.filter):u}},e.prototype.eachComponent=function(n,i,r){var o=this._componentsMap;if(Xt(n)){var s=i,a=n;o.each(function(d,f){for(var h=0;d&&h<d.length;h++){var m=d[h];m&&a.call(s,f,m,m.componentIndex)}})}else for(var l=At(n)?o.get(n):Rt(n)?this.findComponents(n):null,u=0;l&&u<l.length;u++){var c=l[u];c&&i.call(r,c,c.componentIndex)}},e.prototype.getSeriesByName=function(n){var i=il(n,null);return gr(this._componentsMap.get("series"),function(r){return!!r&&i!=null&&r.name===i})},e.prototype.getSeriesByIndex=function(n){return this._componentsMap.get("series")[n]},e.prototype.getSeriesByType=function(n){return gr(this._componentsMap.get("series"),function(i){return!!i&&i.subType===n})},e.prototype.getSeries=function(){return gr(this._componentsMap.get("series"),function(n){return!!n})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(n,i){op(this),ue(this._seriesIndices,function(r){var o=this._componentsMap.get("series")[r];n.call(i,o,r)},this)},e.prototype.eachRawSeries=function(n,i){ue(this._componentsMap.get("series"),function(r){r&&n.call(i,r,r.componentIndex)})},e.prototype.eachSeriesByType=function(n,i,r){op(this),ue(this._seriesIndices,function(o){var s=this._componentsMap.get("series")[o];s.subType===n&&i.call(r,s,o)},this)},e.prototype.eachRawSeriesByType=function(n,i,r){return ue(this.getSeriesByType(n),i,r)},e.prototype.isSeriesFiltered=function(n){return op(this),this._seriesIndicesMap.get(n.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(n,i){op(this);var r=[];ue(this._seriesIndices,function(o){var s=this._componentsMap.get("series")[o];n.call(i,s,o)&&r.push(o)},this),this._seriesIndices=r,this._seriesIndicesMap=cn(r)},e.prototype.restoreData=function(n){Jy(this);var i=this._componentsMap,r=[];i.each(function(o,s){jn.hasClass(s)&&r.push(s)}),jn.topologicalTravel(r,jn.getAllClassMainTypes(),function(o){ue(i.get(o),function(s){s&&(o!=="series"||!sJe(s,n))&&s.restoreData()})})},e.internalField=(function(){Jy=function(n){var i=n._seriesIndices=[];ue(n._componentsMap.get("series"),function(r){r&&i.push(r.componentIndex)}),n._seriesIndicesMap=cn(i)},op=function(n){},S$=function(n,i){n.option={},n.option[k$]=oJe,n._componentsMap=cn({series:[]}),n._componentsCount=cn();var r=i.aria;Rt(r)&&r.enabled==null&&(r.enabled=!0),aJe(i,n._theme.option),Yn(i,YXe,!1),n._mergeOption(i,null)}})(),e})(Ii);function sJe(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,r=e.seriesName;return n!=null&&t.componentIndex!==n||i!=null&&t.id!==i||r!=null&&t.name!==r}}function aJe(t,e){var n=t.color&&!t.colorLayer;ue(e,function(i,r){r==="colorLayer"&&n||r==="color"&&t.color||jn.hasClass(r)||(typeof i=="object"?t[r]=t[r]?Yn(t[r],i,!1):wn(i):t[r]==null&&(t[r]=i))})}function T$(t,e,n){if(bt(e)){var i=cn();return ue(e,function(o){if(o!=null){var s=il(o,null);s!=null&&i.set(o,!0)}}),gr(n,function(o){return o&&i.get(o[t])})}else{var r=il(e,null);return gr(n,function(o){return o&&r!=null&&o[t]===r})}}function E$(t,e){return e.hasOwnProperty("subType")?gr(t,function(n){return n&&n.subType===e.subType}):t}function x$(t){var e=cn();return t&&ue(io(t.replaceMerge),function(n){e.set(n,!0)}),{replaceMergeMainTypeMap:e}}kl(AL,xL);var lJe=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],FQ=(function(){function t(e){ue(lJe,function(n){this[n]=ii(e[n],e)},this)}return t})(),uJe=/^(min|max)?(.+)$/,cJe=(function(){function t(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return t.prototype.setOption=function(e,n,i){e&&(ue(io(e.series),function(s){s&&s.data&&Fo(s.data)&&rP(s.data)}),ue(io(e.dataset),function(s){s&&s.source&&Fo(s.source)&&rP(s.source)})),e=wn(e);var r=this._optionBackup,o=dJe(e,n,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},t.prototype.mountOption=function(e){var n=this._optionBackup;return this._timelineOptions=n.timelineOptions,this._mediaList=n.mediaList,this._mediaDefault=n.mediaDefault,this._currentMediaIndices=[],wn(e?n.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(e){var n,i=this._timelineOptions;if(i.length){var r=e.getComponent("timeline");r&&(n=wn(i[r.getCurrentIndex()]))}return n},t.prototype.getMediaOption=function(e){var n=this._api.getWidth(),i=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,s=[],a=[];if(!r.length&&!o)return a;for(var l=0,u=r.length;l<u;l++)fJe(r[l].query,n,i)&&s.push(l);return!s.length&&o&&(s=[-1]),s.length&&!mJe(s,this._currentMediaIndices)&&(a=jt(s,function(c){return wn(c===-1?o.option:r[c].option)})),this._currentMediaIndices=s,a},t})();function dJe(t,e,n){var i=[],r,o,s=t.baseOption,a=t.timeline,l=t.options,u=t.media,c=!!t.media,d=!!(l||a||s&&s.timeline);s?(o=s,o.timeline||(o.timeline=a)):((d||c)&&(t.options=t.media=null),o=t),c&&bt(u)&&ue(u,function(h){h&&h.option&&(h.query?i.push(h):r||(r=h))}),f(o),ue(l,function(h){return f(h)}),ue(i,function(h){return f(h.option)});function f(h){ue(e,function(m){m(h,n)})}return{baseOption:o,timelineOptions:l||[],mediaDefault:r,mediaList:i}}function fJe(t,e,n){var i={width:e,height:n,aspectratio:e/n},r=!0;return ue(t,function(o,s){var a=s.match(uJe);if(!(!a||!a[1]||!a[2])){var l=a[1],u=a[2].toLowerCase();hJe(i[u],o,l)||(r=!1)}}),r}function hJe(t,e,n){return n==="min"?t>=e:n==="max"?t<=e:t===e}function mJe(t,e){return t.join(",")===e.join(",")}var Us=ue,Ab=Rt,A$=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function mx(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=A$.length;n<i;n++){var r=A$[n],o=e.normal,s=e.emphasis;o&&o[r]&&(t[r]=t[r]||{},t[r].normal?Yn(t[r].normal,o[r]):t[r].normal=o[r],o[r]=null),s&&s[r]&&(t[r]=t[r]||{},t[r].emphasis?Yn(t[r].emphasis,s[r]):t[r].emphasis=s[r],s[r]=null)}}function Lr(t,e,n){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var i=t[e].normal,r=t[e].emphasis;i&&(n?(t[e].normal=t[e].emphasis=null,Xn(t[e],i)):t[e]=i),r&&(t.emphasis=t.emphasis||{},t.emphasis[e]=r,r.focus&&(t.emphasis.focus=r.focus),r.blurScope&&(t.emphasis.blurScope=r.blurScope))}}function xp(t){Lr(t,"itemStyle"),Lr(t,"lineStyle"),Lr(t,"areaStyle"),Lr(t,"label"),Lr(t,"labelLine"),Lr(t,"upperLabel"),Lr(t,"edgeLabel")}function Fi(t,e){var n=Ab(t)&&t[e],i=Ab(n)&&n.textStyle;if(i)for(var r=0,o=T8.length;r<o;r++){var s=T8[r];i.hasOwnProperty(s)&&(n[s]=i[s])}}function Cs(t){t&&(xp(t),Fi(t,"label"),t.emphasis&&Fi(t.emphasis,"label"))}function gJe(t){if(Ab(t)){mx(t),xp(t),Fi(t,"label"),Fi(t,"upperLabel"),Fi(t,"edgeLabel"),t.emphasis&&(Fi(t.emphasis,"label"),Fi(t.emphasis,"upperLabel"),Fi(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(mx(e),Cs(e));var n=t.markLine;n&&(mx(n),Cs(n));var i=t.markArea;i&&Cs(i);var r=t.data;if(t.type==="graph"){r=r||t.nodes;var o=t.links||t.edges;if(o&&!Fo(o))for(var s=0;s<o.length;s++)Cs(o[s]);ue(t.categories,function(u){xp(u)})}if(r&&!Fo(r))for(var s=0;s<r.length;s++)Cs(r[s]);if(e=t.markPoint,e&&e.data)for(var a=e.data,s=0;s<a.length;s++)Cs(a[s]);if(n=t.markLine,n&&n.data)for(var l=n.data,s=0;s<l.length;s++)bt(l[s])?(Cs(l[s][0]),Cs(l[s][1])):Cs(l[s]);t.type==="gauge"?(Fi(t,"axisLabel"),Fi(t,"title"),Fi(t,"detail")):t.type==="treemap"?(Lr(t.breadcrumb,"itemStyle"),ue(t.levels,function(u){xp(u)})):t.type==="tree"&&xp(t.leaves)}}function Ll(t){return bt(t)?t:t?[t]:[]}function P$(t){return(bt(t)?t[0]:t)||{}}function pJe(t,e){Us(Ll(t.series),function(i){Ab(i)&&gJe(i)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Us(n,function(i){Us(Ll(t[i]),function(r){r&&(Fi(r,"axisLabel"),Fi(r.axisPointer,"label"))})}),Us(Ll(t.parallel),function(i){var r=i&&i.parallelAxisDefault;Fi(r,"axisLabel"),Fi(r&&r.axisPointer,"label")}),Us(Ll(t.calendar),function(i){Lr(i,"itemStyle"),Fi(i,"dayLabel"),Fi(i,"monthLabel"),Fi(i,"yearLabel")}),Us(Ll(t.radar),function(i){Fi(i,"name"),i.name&&i.axisName==null&&(i.axisName=i.name,delete i.name),i.nameGap!=null&&i.axisNameGap==null&&(i.axisNameGap=i.nameGap,delete i.nameGap)}),Us(Ll(t.geo),function(i){Ab(i)&&(Cs(i),Us(Ll(i.regions),function(r){Cs(r)}))}),Us(Ll(t.timeline),function(i){Cs(i),Lr(i,"label"),Lr(i,"itemStyle"),Lr(i,"controlStyle",!0);var r=i.data;bt(r)&&ue(r,function(o){Rt(o)&&(Lr(o,"label"),Lr(o,"itemStyle"))})}),Us(Ll(t.toolbox),function(i){Lr(i,"iconStyle"),Us(i.feature,function(r){Lr(r,"iconStyle")})}),Fi(P$(t.axisPointer),"label"),Fi(P$(t.tooltip).axisPointer,"label")}function vJe(t,e){for(var n=e.split(","),i=t,r=0;r<n.length&&(i=i&&i[n[r]],i!=null);r++);return i}function bJe(t,e,n,i){for(var r=e.split(","),o=t,s,a=0;a<r.length-1;a++)s=r[a],o[s]==null&&(o[s]={}),o=o[s];o[r[a]]==null&&(o[r[a]]=n)}function I$(t){t&&ue(yJe,function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])})}var yJe=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],wJe=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],gx=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function sp(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<gx.length;n++){var i=gx[n][1],r=gx[n][0];e[i]!=null&&(e[r]=e[i])}}function R$(t){t&&t.alignTo==="edge"&&t.margin!=null&&t.edgeDistance==null&&(t.edgeDistance=t.margin)}function M$(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay)}function _Je(t){t&&t.focusNodeAdjacency!=null&&(t.emphasis=t.emphasis||{},t.emphasis.focus==null&&(t.emphasis.focus="adjacency"))}function $Q(t,e){if(t)for(var n=0;n<t.length;n++)e(t[n]),t[n]&&$Q(t[n].children,e)}function zQ(t,e){pJe(t,e),t.series=io(t.series),ue(t.series,function(n){if(Rt(n)){var i=n.type;if(i==="line")n.clipOverflow!=null&&(n.clip=n.clipOverflow);else if(i==="pie"||i==="gauge"){n.clockWise!=null&&(n.clockwise=n.clockWise),R$(n.label);var r=n.data;if(r&&!Fo(r))for(var o=0;o<r.length;o++)R$(r[o]);n.hoverOffset!=null&&(n.emphasis=n.emphasis||{},(n.emphasis.scaleSize=null)&&(n.emphasis.scaleSize=n.hoverOffset))}else if(i==="gauge"){var s=vJe(n,"pointer.color");s!=null&&bJe(n,"itemStyle.color",s)}else if(i==="bar"){sp(n),sp(n.backgroundStyle),sp(n.emphasis);var r=n.data;if(r&&!Fo(r))for(var o=0;o<r.length;o++)typeof r[o]=="object"&&(sp(r[o]),sp(r[o]&&r[o].emphasis))}else if(i==="sunburst"){var a=n.highlightPolicy;a&&(n.emphasis=n.emphasis||{},n.emphasis.focus||(n.emphasis.focus=a)),M$(n),$Q(n.data,M$)}else i==="graph"||i==="sankey"?_Je(n):i==="map"&&(n.mapType&&!n.map&&(n.map=n.mapType),n.mapLocation&&Xn(n,n.mapLocation));n.hoverAnimation!=null&&(n.emphasis=n.emphasis||{},n.emphasis&&n.emphasis.scale==null&&(n.emphasis.scale=n.hoverAnimation)),I$(n)}}),t.dataRange&&(t.visualMap=t.dataRange),ue(wJe,function(n){var i=t[n];i&&(bt(i)||(i=[i]),ue(i,function(r){I$(r)}))})}function CJe(t){var e=cn();t.eachSeries(function(n){var i=n.get("stack");if(i){var r=e.get(i)||e.set(i,[]),o=n.getData(),s={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:n};if(!s.stackedDimension||!(s.isStackedByIndex||s.stackedByDimension))return;r.push(s)}}),e.each(function(n){if(n.length!==0){var i=n[0].seriesModel,r=i.get("stackOrder")||"seriesAsc";r==="seriesDesc"&&n.reverse(),ue(n,function(o,s){o.data.setCalculationInfo("stackedOnSeries",s>0?n[s-1].seriesModel:null)}),SJe(n)}})}function SJe(t){ue(t,function(e,n){var i=[],r=[NaN,NaN],o=[e.stackResultDimension,e.stackedOverDimension],s=e.data,a=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";s.modify(o,function(u,c,d){var f=s.get(e.stackedDimension,d);if(isNaN(f))return r;var h,m;a?m=s.getRawIndex(d):h=s.get(e.stackedByDimension,d);for(var g=NaN,v=n-1;v>=0;v--){var p=t[v];if(a||(m=p.data.rawIndexOf(p.stackedByDimension,h)),m>=0){var b=p.data.getByRawIndex(p.stackResultDimension,m);if(l==="all"||l==="positive"&&b>0||l==="negative"&&b<0||l==="samesign"&&f>=0&&b>0||l==="samesign"&&f<=0&&b<0){f=kKe(f,b),g=b;break}}}return i[0]=f,i[1]=g,i})})}var JS=(function(){function t(e){this.data=e.data||(e.sourceFormat===El?{}:[]),this.sourceFormat=e.sourceFormat||DQ,this.seriesLayoutBy=e.seriesLayoutBy||rl,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var n=this.dimensionsDefine=e.dimensionsDefine;if(n)for(var i=0;i<n.length;i++){var r=n[i];r.type==null&&VQ(this,i)===jo.Must&&(r.type="ordinal")}}return t})();function PL(t){return t instanceof JS}function zP(t,e,n){n=n||UQ(t);var i=e.seriesLayoutBy,r=TJe(t,n,i,e.sourceHeader,e.dimensions),o=new JS({data:t,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:r.dimensionsDefine,startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount,metaRawOption:wn(e)});return o}function HQ(t){return new JS({data:t,sourceFormat:Fo(t)?Cc:ms})}function kJe(t){return new JS({data:t.data,sourceFormat:t.sourceFormat,seriesLayoutBy:t.seriesLayoutBy,dimensionsDefine:wn(t.dimensionsDefine),startIndex:t.startIndex,dimensionsDetectedCount:t.dimensionsDetectedCount})}function UQ(t){var e=DQ;if(Fo(t))e=Cc;else if(bt(t)){t.length===0&&(e=Wr);for(var n=0,i=t.length;n<i;n++){var r=t[n];if(r!=null){if(bt(r)||Fo(r)){e=Wr;break}else if(Rt(r)){e=Ta;break}}}}else if(Rt(t)){for(var o in t)if(el(t,o)&&Vo(t[o])){e=El;break}}return e}function TJe(t,e,n,i,r){var o,s;if(!t)return{dimensionsDefine:O$(r),startIndex:s,dimensionsDetectedCount:o};if(e===Wr){var a=t;i==="auto"||i==null?L$(function(u){u!=null&&u!=="-"&&(At(u)?s==null&&(s=1):s=0)},n,a,10):s=ai(i)?i:i?1:0,!r&&s===1&&(r=[],L$(function(u,c){r[c]=u!=null?u+"":""},n,a,1/0)),o=r?r.length:n===Jf?a.length:a[0]?a[0].length:null}else if(e===Ta)r||(r=EJe(t));else if(e===El)r||(r=[],ue(t,function(u,c){r.push(c)}));else if(e===ms){var l=w0(t[0]);o=bt(l)&&l.length||1}return{startIndex:s,dimensionsDefine:O$(r),dimensionsDetectedCount:o}}function EJe(t){for(var e=0,n;e<t.length&&!(n=t[e++]););if(n)return hi(n)}function O$(t){if(t){var e=cn();return jt(t,function(n,i){n=Rt(n)?n:{name:n};var r={name:n.name,displayName:n.displayName,type:n.type};if(r.name==null)return r;r.name+="",r.displayName==null&&(r.displayName=r.name);var o=e.get(r.name);return o?r.name+="-"+o.count++:e.set(r.name,{count:1}),r})}}function L$(t,e,n,i){if(e===Jf)for(var r=0;r<n.length&&r<i;r++)t(n[r]?n[r][0]:null,r);else for(var o=n[0]||[],r=0;r<o.length&&r<i;r++)t(o[r],r)}function WQ(t){var e=t.sourceFormat;return e===Ta||e===El}var Pd,Id,Rd,Md,D$,N$,qQ=(function(){function t(e,n){var i=PL(e)?e:HQ(e);this._source=i;var r=this._data=i.data,o=i.sourceFormat;i.seriesLayoutBy,o===Cc&&(this._offset=0,this._dimSize=n,this._data=r),N$(this,r,i)}return t.prototype.getSource=function(){return this._source},t.prototype.count=function(){return 0},t.prototype.getItem=function(e,n){},t.prototype.appendData=function(e){},t.prototype.clean=function(){},t.protoInitialize=(function(){var e=t.prototype;e.pure=!1,e.persistent=!0})(),t.internalField=(function(){var e;N$=function(s,a,l){var u=l.sourceFormat,c=l.seriesLayoutBy,d=l.startIndex,f=l.dimensionsDefine,h=D$[IL(u,c)];if(lt(s,h),u===Cc)s.getItem=n,s.count=r,s.fillStorage=i;else{var m=jQ(u,c);s.getItem=ii(m,null,a,d,f);var g=KQ(u,c);s.count=ii(g,null,a,d,f)}};var n=function(s,a){s=s-this._offset,a=a||[];for(var l=this._data,u=this._dimSize,c=u*s,d=0;d<u;d++)a[d]=l[c+d];return a},i=function(s,a,l,u){for(var c=this._data,d=this._dimSize,f=0;f<d;f++){for(var h=u[f],m=h[0]==null?1/0:h[0],g=h[1]==null?-1/0:h[1],v=a-s,p=l[f],b=0;b<v;b++){var y=c[b*d+f];p[s+b]=y,y<m&&(m=y),y>g&&(g=y)}h[0]=m,h[1]=g}},r=function(){return this._data?this._data.length/this._dimSize:0};D$=(e={},e[Wr+"_"+rl]={pure:!0,appendData:o},e[Wr+"_"+Jf]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Ta]={pure:!0,appendData:o},e[El]={pure:!0,appendData:function(s){var a=this._data;ue(s,function(l,u){for(var c=a[u]||(a[u]=[]),d=0;d<(l||[]).length;d++)c.push(l[d])})}},e[ms]={appendData:o},e[Cc]={persistent:!1,pure:!0,appendData:function(s){this._data=s},clean:function(){this._offset+=this.count(),this._data=null}},e);function o(s){for(var a=0;a<s.length;a++)this._data.push(s[a])}})(),t})(),Zy=function(t){bt(t)||EZ("series.data or dataset.source must be an array.")};Pd={},Pd[Wr+"_"+rl]=Zy,Pd[Wr+"_"+Jf]=Zy,Pd[Ta]=Zy,Pd[El]=function(t,e){for(var n=0;n<e.length;n++){var i=e[n].name;i==null&&EZ("dimension name must not be null/undefined.")}},Pd[ms]=Zy;var B$=function(t,e,n,i){return t[i]},xJe=(Id={},Id[Wr+"_"+rl]=function(t,e,n,i){return t[i+e]},Id[Wr+"_"+Jf]=function(t,e,n,i,r){i+=e;for(var o=r||[],s=t,a=0;a<s.length;a++){var l=s[a];o[a]=l?l[i]:null}return o},Id[Ta]=B$,Id[El]=function(t,e,n,i,r){for(var o=r||[],s=0;s<n.length;s++){var a=n[s].name,l=a!=null?t[a]:null;o[s]=l?l[i]:null}return o},Id[ms]=B$,Id);function jQ(t,e){var n=xJe[IL(t,e)];return n}var V$=function(t,e,n){return t.length},AJe=(Rd={},Rd[Wr+"_"+rl]=function(t,e,n){return Math.max(0,t.length-e)},Rd[Wr+"_"+Jf]=function(t,e,n){var i=t[0];return i?Math.max(0,i.length-e):0},Rd[Ta]=V$,Rd[El]=function(t,e,n){var i=n[0].name,r=i!=null?t[i]:null;return r?r.length:0},Rd[ms]=V$,Rd);function KQ(t,e){var n=AJe[IL(t,e)];return n}var px=function(t,e,n){return t[e]},PJe=(Md={},Md[Wr]=px,Md[Ta]=function(t,e,n){return t[n]},Md[El]=px,Md[ms]=function(t,e,n){var i=w0(t);return i instanceof Array?i[e]:i},Md[Cc]=px,Md);function GQ(t){var e=PJe[t];return e}function IL(t,e){return t===Wr?t+"_"+e:t}function ig(t,e,n){if(t){var i=t.getRawDataItem(e);if(i!=null){var r=t.getStore(),o=r.getSource().sourceFormat;if(n!=null){var s=t.getDimensionIndex(n),a=r.getDimensionProperty(s);return GQ(o)(i,s,a)}else{var l=i;return o===ms&&(l=w0(i)),l}}}}var IJe=/\{@(.+?)\}/g,RJe=(function(){function t(){}return t.prototype.getDataParams=function(e,n){var i=this.getData(n),r=this.getRawValue(e,n),o=i.getRawIndex(e),s=i.getName(e),a=i.getRawDataItem(e),l=i.getItemVisual(e,"style"),u=l&&l[i.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,d=this.mainType,f=d==="series",h=i.userOutput&&i.userOutput.get();return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:s,dataIndex:o,data:a,dataType:n,value:r,color:u,borderColor:c,dimensionNames:h?h.fullDimensions:null,encode:h?h.encode:null,$vars:["seriesName","name","value"]}},t.prototype.getFormattedLabel=function(e,n,i,r,o,s){n=n||"normal";var a=this.getData(i),l=this.getDataParams(e,i);if(s&&(l.value=s.interpolatedValue),r!=null&&bt(l.value)&&(l.value=l.value[r]),!o){var u=a.getItemModel(e);o=u.get(n==="normal"?["label","formatter"]:[n,"label","formatter"])}if(Xt(o))return l.status=n,l.dimensionIndex=r,o(l);if(At(o)){var c=IQ(o,l);return c.replace(IJe,function(d,f){var h=f.length,m=f;m.charAt(0)==="["&&m.charAt(h-1)==="]"&&(m=+m.slice(1,h-1));var g=ig(a,e,m);if(s&&bt(s.interpolatedValue)){var v=a.getDimensionIndex(m);v>=0&&(g=s.interpolatedValue[v])}return g!=null?g+"":""})}},t.prototype.getRawValue=function(e,n){return ig(this.getData(n),e)},t.prototype.formatTooltip=function(e,n,i){},t})();function F$(t){var e,n;return Rt(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function bv(t){return new MJe(t)}var MJe=(function(){function t(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return t.prototype.perform=function(e){var n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!i&&(o=this._plan(this.context));var s=c(this._modBy),a=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(s!==l||a!==u)&&(o="reset");function c(b){return!(b>=1)&&(b=1),b}var d;(this._dirty||o==="reset")&&(this._dirty=!1,d=this._doReset(i)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(n?this._dueEnd=n._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,m=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!i&&(d||h<m)){var g=this._progress;if(bt(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],h,m,l,u);else this._doProgress(g,h,m,l,u)}this._dueIndex=m;var p=this._settedOutputEnd!=null?this._settedOutputEnd:m;this._outputDueEnd=p}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},t.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},t.prototype._doProgress=function(e,n,i,r,o){$$.reset(n,i,r,o),this._callingProgress=e,this._callingProgress({start:n,end:i,count:i-n,next:$$.next},this.context)},t.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var n,i;!e&&this._reset&&(n=this._reset(this.context),n&&n.progress&&(i=n.forceFirstProgress,n=n.progress),bt(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),i},t.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},t.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},t.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},t.prototype.getUpstream=function(){return this._upstream},t.prototype.getDownstream=function(){return this._downstream},t.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},t})(),$$=(function(){var t,e,n,i,r,o={reset:function(l,u,c,d){e=l,t=u,n=c,i=d,r=Math.ceil(i/n),o.next=n>1&&i>0?a:s}};return o;function s(){return e<t?e++:null}function a(){var l=e%r*n+Math.ceil(e/r),u=e>=t?null:l<i?l:e;return e++,u}})();function b_(t,e){var n=e&&e.type;return n==="ordinal"?t:(n==="time"&&!ai(t)&&t!=null&&t!=="-"&&(t=+kg(t)),t==null||t===""?NaN:Number(t))}cn({number:function(t){return parseFloat(t)},time:function(t){return+kg(t)},trim:function(t){return At(t)?Ka(t):t}});var OJe=(function(){function t(e,n){var i=e==="desc";this._resultLT=i?1:-1,n==null&&(n=i?"min":"max"),this._incomparable=n==="min"?-1/0:1/0}return t.prototype.evaluate=function(e,n){var i=ai(e)?e:N1(e),r=ai(n)?n:N1(n),o=isNaN(i),s=isNaN(r);if(o&&(i=this._incomparable),s&&(r=this._incomparable),o&&s){var a=At(e),l=At(n);a&&(i=l?e:0),l&&(r=a?n:0)}return i<r?this._resultLT:i>r?-this._resultLT:0},t})(),LJe=(function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(e){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(e){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(e,n){},t.prototype.retrieveValueFromItem=function(e,n){},t.prototype.convertValue=function(e,n){return b_(e,n)},t})();function DJe(t,e){var n=new LJe,i=t.data,r=n.sourceFormat=t.sourceFormat,o=t.startIndex,s="";t.seriesLayoutBy!==rl&&_o(s);var a=[],l={},u=t.dimensionsDefine;if(u)ue(u,function(g,v){var p=g.name,b={index:v,name:p,displayName:g.displayName};if(a.push(b),p!=null){var y="";el(l,p)&&_o(y),l[p]=b}});else for(var c=0;c<t.dimensionsDetectedCount;c++)a.push({index:c});var d=jQ(r,rl);e.__isBuiltIn&&(n.getRawDataItem=function(g){return d(i,o,a,g)},n.getRawData=ii(NJe,null,t)),n.cloneRawData=ii(BJe,null,t);var f=KQ(r,rl);n.count=ii(f,null,i,o,a);var h=GQ(r);n.retrieveValue=function(g,v){var p=d(i,o,a,g);return m(p,v)};var m=n.retrieveValueFromItem=function(g,v){if(g!=null){var p=a[v];if(p)return h(g,v,p.name)}};return n.getDimensionInfo=ii(VJe,null,a,l),n.cloneAllDimensionInfo=ii(FJe,null,a),n}function NJe(t){var e=t.sourceFormat;if(!RL(e)){var n="";_o(n)}return t.data}function BJe(t){var e=t.sourceFormat,n=t.data;if(!RL(e)){var i="";_o(i)}if(e===Wr){for(var r=[],o=0,s=n.length;o<s;o++)r.push(n[o].slice());return r}else if(e===Ta){for(var r=[],o=0,s=n.length;o<s;o++)r.push(lt({},n[o]));return r}}function VJe(t,e,n){if(n!=null){if(ai(n)||!isNaN(n)&&!el(e,n))return t[n];if(el(e,n))return e[n]}}function FJe(t){return wn(t)}var YQ=cn();function $Je(t){t=wn(t);var e=t.type,n="";e||_o(n);var i=e.split(":");i.length!==2&&_o(n);var r=!1;i[0]==="echarts"&&(e=i[1],r=!0),t.__isBuiltIn=r,YQ.set(e,t)}function zJe(t,e,n){var i=io(t),r=i.length,o="";r||_o(o);for(var s=0,a=r;s<a;s++){var l=i[s];e=HJe(l,e),s!==a-1&&(e.length=Math.max(e.length,1))}return e}function HJe(t,e,n,i){var r="";e.length||_o(r),Rt(t)||_o(r);var o=t.type,s=YQ.get(o);s||_o(r);var a=jt(e,function(u){return DJe(u,s)}),l=io(s.transform({upstream:a[0],upstreamList:a,config:wn(t.config)}));return jt(l,function(u,c){var d="";Rt(u)||_o(d),u.data||_o(d);var f=UQ(u.data);RL(f)||_o(d);var h,m=e[0];if(m&&c===0&&!u.dimensions){var g=m.startIndex;g&&(u.data=m.data.slice(0,g).concat(u.data)),h={seriesLayoutBy:rl,sourceHeader:g,dimensions:m.metaRawOption.dimensions}}else h={seriesLayoutBy:rl,sourceHeader:0,dimensions:u.dimensions};return zP(u.data,h,null)})}function RL(t){return t===Wr||t===Ta}var ZS="undefined",UJe=typeof Uint32Array===ZS?Array:Uint32Array,WJe=typeof Uint16Array===ZS?Array:Uint16Array,XQ=typeof Int32Array===ZS?Array:Int32Array,z$=typeof Float64Array===ZS?Array:Float64Array,JQ={float:z$,int:XQ,ordinal:Array,number:Array,time:z$},vx;function Th(t){return t>65535?UJe:WJe}function Eh(){return[1/0,-1/0]}function qJe(t){var e=t.constructor;return e===Array?t.slice():new e(t)}function H$(t,e,n,i,r){var o=JQ[n||"float"];if(r){var s=t[e],a=s&&s.length;if(a!==i){for(var l=new o(i),u=0;u<a;u++)l[u]=s[u];t[e]=l}}else t[e]=new o(i)}var HP=(function(){function t(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=cn()}return t.prototype.initData=function(e,n,i){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),o=this.defaultDimValueGetter=vx[r.sourceFormat];this._dimValueGetter=i||o,this._rawExtent=[],WQ(r),this._dimensions=jt(n,function(s){return{type:s.type,property:s.property}}),this._initDataFromProvider(0,e.count())},t.prototype.getProvider=function(){return this._provider},t.prototype.getSource=function(){return this._provider.getSource()},t.prototype.ensureCalculationDimension=function(e,n){var i=this._calcDimNameToIdx,r=this._dimensions,o=i.get(e);if(o!=null){if(r[o].type===n)return o}else o=r.length;return r[o]={type:n},i.set(e,o),this._chunks[o]=new JQ[n||"float"](this._rawCount),this._rawExtent[o]=Eh(),o},t.prototype.collectOrdinalMeta=function(e,n){var i=this._chunks[e],r=this._dimensions[e],o=this._rawExtent,s=r.ordinalOffset||0,a=i.length;s===0&&(o[e]=Eh());for(var l=o[e],u=s;u<a;u++){var c=i[u]=n.parseAndCollect(i[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}r.ordinalMeta=n,r.ordinalOffset=a,r.type="ordinal"},t.prototype.getOrdinalMeta=function(e){var n=this._dimensions[e],i=n.ordinalMeta;return i},t.prototype.getDimensionProperty=function(e){var n=this._dimensions[e];return n&&n.property},t.prototype.appendData=function(e){var n=this._provider,i=this.count();n.appendData(e);var r=n.count();return n.persistent||(r+=i),i<r&&this._initDataFromProvider(i,r,!0),[i,r]},t.prototype.appendValues=function(e,n){for(var i=this._chunks,r=this._dimensions,o=r.length,s=this._rawExtent,a=this.count(),l=a+Math.max(e.length,n||0),u=0;u<o;u++){var c=r[u];H$(i,u,c.type,l,!0)}for(var d=[],f=a;f<l;f++)for(var h=f-a,m=0;m<o;m++){var c=r[m],g=vx.arrayRows.call(this,e[h]||d,c.property,h,m);i[m][f]=g;var v=s[m];g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}return this._rawCount=this._count=l,{start:a,end:l}},t.prototype._initDataFromProvider=function(e,n,i){for(var r=this._provider,o=this._chunks,s=this._dimensions,a=s.length,l=this._rawExtent,u=jt(s,function(b){return b.property}),c=0;c<a;c++){var d=s[c];l[c]||(l[c]=Eh()),H$(o,c,d.type,n,i)}if(r.fillStorage)r.fillStorage(e,n,o,l);else for(var f=[],h=e;h<n;h++){f=r.getItem(h,f);for(var m=0;m<a;m++){var g=o[m],v=this._dimValueGetter(f,u[m],h,m);g[h]=v;var p=l[m];v<p[0]&&(p[0]=v),v>p[1]&&(p[1]=v)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=n,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(e,n){if(!(n>=0&&n<this._count))return NaN;var i=this._chunks[e];return i?i[this.getRawIndex(n)]:NaN},t.prototype.getValues=function(e,n){var i=[],r=[];if(n==null){n=e,e=[];for(var o=0;o<this._dimensions.length;o++)r.push(o)}else r=e;for(var o=0,s=r.length;o<s;o++)i.push(this.get(r[o],n));return i},t.prototype.getByRawIndex=function(e,n){if(!(n>=0&&n<this._rawCount))return NaN;var i=this._chunks[e];return i?i[n]:NaN},t.prototype.getSum=function(e){var n=this._chunks[e],i=0;if(n)for(var r=0,o=this.count();r<o;r++){var s=this.get(e,r);isNaN(s)||(i+=s)}return i},t.prototype.getMedian=function(e){var n=[];this.each([e],function(o){isNaN(o)||n.push(o)});var i=n.sort(function(o,s){return o-s}),r=this.count();return r===0?0:r%2===1?i[(r-1)/2]:(i[r/2]+i[r/2-1])/2},t.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var n=this._indices,i=n[e];if(i!=null&&i<this._count&&i===e)return e;for(var r=0,o=this._count-1;r<=o;){var s=(r+o)/2|0;if(n[s]<e)r=s+1;else if(n[s]>e)o=s-1;else return s}return-1},t.prototype.getIndices=function(){var e,n=this._indices;if(n){var i=n.constructor,r=this._count;if(i===Array){e=new i(r);for(var o=0;o<r;o++)e[o]=n[o]}else e=new i(n.buffer,0,r)}else{var i=Th(this._rawCount);e=new i(this.count());for(var o=0;o<e.length;o++)e[o]=o}return e},t.prototype.filter=function(e,n){if(!this._count)return this;for(var i=this.clone(),r=i.count(),o=Th(i._rawCount),s=new o(r),a=[],l=e.length,u=0,c=e[0],d=i._chunks,f=0;f<r;f++){var h=void 0,m=i.getRawIndex(f);if(l===0)h=n(f);else if(l===1){var g=d[c][m];h=n(g,f)}else{for(var v=0;v<l;v++)a[v]=d[e[v]][m];a[v]=f,h=n.apply(null,a)}h&&(s[u++]=m)}return u<r&&(i._indices=s),i._count=u,i._extent=[],i._updateGetRawIdx(),i},t.prototype.selectRange=function(e){var n=this.clone(),i=n._count;if(!i)return this;var r=hi(e),o=r.length;if(!o)return this;var s=n.count(),a=Th(n._rawCount),l=new a(s),u=0,c=r[0],d=e[c][0],f=e[c][1],h=n._chunks,m=!1;if(!n._indices){var g=0;if(o===1){for(var v=h[r[0]],p=0;p<i;p++){var b=v[p];(b>=d&&b<=f||isNaN(b))&&(l[u++]=g),g++}m=!0}else if(o===2){for(var v=h[r[0]],y=h[r[1]],_=e[r[1]][0],C=e[r[1]][1],p=0;p<i;p++){var b=v[p],S=y[p];(b>=d&&b<=f||isNaN(b))&&(S>=_&&S<=C||isNaN(S))&&(l[u++]=g),g++}m=!0}}if(!m)if(o===1)for(var p=0;p<s;p++){var k=n.getRawIndex(p),b=h[r[0]][k];(b>=d&&b<=f||isNaN(b))&&(l[u++]=k)}else for(var p=0;p<s;p++){for(var T=!0,k=n.getRawIndex(p),E=0;E<o;E++){var x=r[E],b=h[x][k];(b<e[x][0]||b>e[x][1])&&(T=!1)}T&&(l[u++]=n.getRawIndex(p))}return u<s&&(n._indices=l),n._count=u,n._extent=[],n._updateGetRawIdx(),n},t.prototype.map=function(e,n){var i=this.clone(e);return this._updateDims(i,e,n),i},t.prototype.modify=function(e,n){this._updateDims(this,e,n)},t.prototype._updateDims=function(e,n,i){for(var r=e._chunks,o=[],s=n.length,a=e.count(),l=[],u=e._rawExtent,c=0;c<n.length;c++)u[n[c]]=Eh();for(var d=0;d<a;d++){for(var f=e.getRawIndex(d),h=0;h<s;h++)l[h]=r[n[h]][f];l[s]=d;var m=i&&i.apply(null,l);if(m!=null){typeof m!="object"&&(o[0]=m,m=o);for(var c=0;c<m.length;c++){var g=n[c],v=m[c],p=u[g],b=r[g];b&&(b[f]=v),v<p[0]&&(p[0]=v),v>p[1]&&(p[1]=v)}}}},t.prototype.lttbDownSample=function(e,n){var i=this.clone([e],!0),r=i._chunks,o=r[e],s=this.count(),a=0,l=Math.floor(1/n),u=this.getRawIndex(0),c,d,f,h=new(Th(this._rawCount))(Math.min((Math.ceil(s/l)+2)*2,s));h[a++]=u;for(var m=1;m<s-1;m+=l){for(var g=Math.min(m+l,s-1),v=Math.min(m+l*2,s),p=(v+g)/2,b=0,y=g;y<v;y++){var _=this.getRawIndex(y),C=o[_];isNaN(C)||(b+=C)}b/=v-g;var S=m,k=Math.min(m+l,s),T=m-1,E=o[u];c=-1,f=S;for(var x=-1,P=0,y=S;y<k;y++){var _=this.getRawIndex(y),C=o[_];if(isNaN(C)){P++,x<0&&(x=_);continue}d=Math.abs((T-p)*(C-E)-(T-y)*(b-E)),d>c&&(c=d,f=_)}P>0&&P<k-S&&(h[a++]=Math.min(x,f),f=Math.max(x,f)),h[a++]=f,u=f}return h[a++]=this.getRawIndex(s-1),i._count=a,i._indices=h,i.getRawIndex=this._getRawIdx,i},t.prototype.minmaxDownSample=function(e,n){for(var i=this.clone([e],!0),r=i._chunks,o=Math.floor(1/n),s=r[e],a=this.count(),l=new(Th(this._rawCount))(Math.ceil(a/o)*2),u=0,c=0;c<a;c+=o){var d=c,f=s[this.getRawIndex(d)],h=c,m=s[this.getRawIndex(h)],g=o;c+o>a&&(g=a-c);for(var v=0;v<g;v++){var p=this.getRawIndex(c+v),b=s[p];b<f&&(f=b,d=c+v),b>m&&(m=b,h=c+v)}var y=this.getRawIndex(d),_=this.getRawIndex(h);d<h?(l[u++]=y,l[u++]=_):(l[u++]=_,l[u++]=y)}return i._count=u,i._indices=l,i._updateGetRawIdx(),i},t.prototype.downSample=function(e,n,i,r){for(var o=this.clone([e],!0),s=o._chunks,a=[],l=Math.floor(1/n),u=s[e],c=this.count(),d=o._rawExtent[e]=Eh(),f=new(Th(this._rawCount))(Math.ceil(c/l)),h=0,m=0;m<c;m+=l){l>c-m&&(l=c-m,a.length=l);for(var g=0;g<l;g++){var v=this.getRawIndex(m+g);a[g]=u[v]}var p=i(a),b=this.getRawIndex(Math.min(m+r(a,p)||0,c-1));u[b]=p,p<d[0]&&(d[0]=p),p>d[1]&&(d[1]=p),f[h++]=b}return o._count=h,o._indices=f,o._updateGetRawIdx(),o},t.prototype.each=function(e,n){if(this._count)for(var i=e.length,r=this._chunks,o=0,s=this.count();o<s;o++){var a=this.getRawIndex(o);switch(i){case 0:n(o);break;case 1:n(r[e[0]][a],o);break;case 2:n(r[e[0]][a],r[e[1]][a],o);break;default:for(var l=0,u=[];l<i;l++)u[l]=r[e[l]][a];u[l]=o,n.apply(null,u)}}},t.prototype.getDataExtent=function(e){var n=this._chunks[e],i=Eh();if(!n)return i;var r=this.count(),o=!this._indices,s;if(o)return this._rawExtent[e].slice();if(s=this._extent[e],s)return s.slice();s=i;for(var a=s[0],l=s[1],u=0;u<r;u++){var c=this.getRawIndex(u),d=n[c];d<a&&(a=d),d>l&&(l=d)}return s=[a,l],this._extent[e]=s,s},t.prototype.getRawDataItem=function(e){var n=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(n);for(var i=[],r=this._chunks,o=0;o<r.length;o++)i.push(r[o][n]);return i},t.prototype.clone=function(e,n){var i=new t,r=this._chunks,o=e&&Cg(e,function(a,l){return a[l]=!0,a},{});if(o)for(var s=0;s<r.length;s++)i._chunks[s]=o[s]?qJe(r[s]):r[s];else i._chunks=r;return this._copyCommonProps(i),n||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},t.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=wn(this._extent),e._rawExtent=wn(this._rawExtent)},t.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,n=void 0;if(e===Array){var i=this._indices.length;n=new e(i);for(var r=0;r<i;r++)n[r]=this._indices[r]}else n=new e(this._indices);return n}return null},t.prototype._getRawIdxIdentity=function(e){return e},t.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=(function(){function e(n,i,r,o){return b_(n[o],this._dimensions[o])}vx={arrayRows:e,objectRows:function(n,i,r,o){return b_(n[i],this._dimensions[o])},keyedColumns:e,original:function(n,i,r,o){var s=n&&(n.value==null?n:n.value);return b_(s instanceof Array?s[o]:s,this._dimensions[o])},typedArray:function(n,i,r,o){return n[o]}}})(),t})(),jJe=(function(){function t(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(e,n){this._sourceList=e,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,n=this._getUpstreamSourceManagers(),i=!!n.length,r,o;if(Qy(e)){var s=e,a=void 0,l=void 0,u=void 0;if(i){var c=n[0];c.prepareSource(),u=c.getSource(),a=u.data,l=u.sourceFormat,o=[c._getVersionSign()]}else a=s.get("data",!0),l=Fo(a)?Cc:ms,o=[];var d=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},h=Ut(d.seriesLayoutBy,f.seriesLayoutBy)||null,m=Ut(d.sourceHeader,f.sourceHeader),g=Ut(d.dimensions,f.dimensions),v=h!==f.seriesLayoutBy||!!m!=!!f.sourceHeader||g;r=v?[zP(a,{seriesLayoutBy:h,sourceHeader:m,dimensions:g},l)]:[]}else{var p=e;if(i){var b=this._applyTransform(n);r=b.sourceList,o=b.upstreamSignList}else{var y=p.get("source",!0);r=[zP(y,this._getSourceMetaRawOption(),null)],o=[]}}this._setLocalSource(r,o)},t.prototype._applyTransform=function(e){var n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(r!=null){var o="";e.length!==1&&U$(o)}var s,a=[],l=[];return ue(e,function(u){u.prepareSource();var c=u.getSource(r||0),d="";r!=null&&!c&&U$(d),a.push(c),l.push(u._getVersionSign())}),i?s=zJe(i,a,{datasetIndex:n.componentIndex}):r!=null&&(s=[kJe(a[0])]),{sourceList:s,upstreamSignList:l}},t.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),n=0;n<e.length;n++){var i=e[n];if(i._isDirty()||this._upstreamSignList[n]!==i._getVersionSign())return!0}},t.prototype.getSource=function(e){e=e||0;var n=this._sourceList[e];if(!n){var i=this._getUpstreamSourceManagers();return i[0]&&i[0].getSource(e)}return n},t.prototype.getSharedDataStore=function(e){var n=e.makeStoreSchema();return this._innerGetDataStore(n.dimensions,e.source,n.hash)},t.prototype._innerGetDataStore=function(e,n,i){var r=0,o=this._storeList,s=o[r];s||(s=o[r]={});var a=s[i];if(!a){var l=this._getUpstreamSourceManagers()[0];Qy(this._sourceHost)&&l?a=l._innerGetDataStore(e,n,i):(a=new HP,a.initData(new qQ(n,e.length),e)),s[i]=a}return a},t.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(Qy(e)){var n=BQ(e);return n?[n.getSourceManager()]:[]}else return jt(ZXe(e),function(i){return i.getSourceManager()})},t.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,n,i,r;if(Qy(e))n=e.get("seriesLayoutBy",!0),i=e.get("sourceHeader",!0),r=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var o=e;n=o.get("seriesLayoutBy",!0),i=o.get("sourceHeader",!0),r=o.get("dimensions",!0)}return{seriesLayoutBy:n,sourceHeader:i,dimensions:r}},t})();function Qy(t){return t.mainType==="series"}function U$(t){throw new Error(t)}var KJe="line-height:1";function ZQ(t){var e=t.lineHeight;return e==null?KJe:"line-height:"+yo(e+"")+"px"}function QQ(t,e){var n=t.color||dn.color.tertiary,i=t.fontSize||12,r=t.fontWeight||"400",o=t.color||dn.color.secondary,s=t.fontSize||14,a=t.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+yo(i+"")+"px;color:"+yo(n)+";font-weight:"+yo(r+""),valueStyle:"font-size:"+yo(s+"")+"px;color:"+yo(o)+";font-weight:"+yo(a+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:r},valueStyle:{fontSize:s,fill:o,fontWeight:a}}}var GJe=[0,10,20,30],YJe=["",`
`,`
`,`
`];function Pb(t,e){return e.type=t,e}function UP(t){return t.type==="section"}function eee(t){return UP(t)?XJe:JJe}function tee(t){if(UP(t)){var e=0,n=t.blocks.length,i=n>1||n>0&&!t.noHeader;return ue(t.blocks,function(r){var o=tee(r);o>=e&&(e=o+ +(i&&(!o||UP(r)&&!r.noHeader)))}),e}return 0}function XJe(t,e,n,i){var r=e.noHeader,o=ZJe(tee(e)),s=[],a=e.blocks||[];_u(!a||bt(a)),a=a||[];var l=t.orderMode;if(e.sortBlocks&&l){a=a.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(el(u,l)){var c=new OJe(u[l],null);a.sort(function(g,v){return c.evaluate(g.sortParam,v.sortParam)})}else l==="seriesDesc"&&a.reverse()}ue(a,function(g,v){var p=e.valueFormatter,b=eee(g)(p?lt(lt({},t),{valueFormatter:p}):t,g,v>0?o.html:0,i);b!=null&&s.push(b)});var d=t.renderMode==="richText"?s.join(o.richText):WP(i,s.join(""),r?n:o.html);if(r)return d;var f=$P(e.header,"ordinal",t.useUTC),h=QQ(i,t.renderMode).nameStyle,m=ZQ(i);return t.renderMode==="richText"?nee(t,f,h)+o.richText+d:WP(i,'<div style="'+h+";"+m+';">'+yo(f)+"</div>"+d,n)}function JJe(t,e,n,i){var r=t.renderMode,o=e.noName,s=e.noValue,a=!e.markerType,l=e.name,u=t.useUTC,c=e.valueFormatter||t.valueFormatter||function(_){return _=bt(_)?_:[_],jt(_,function(C,S){return $P(C,bt(h)?h[S]:h,u)})};if(!(o&&s)){var d=a?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||dn.color.secondary,r),f=o?"":$P(l,"ordinal",u),h=e.valueType,m=s?[]:c(e.value,e.dataIndex),g=!a||!o,v=!a&&o,p=QQ(i,r),b=p.nameStyle,y=p.valueStyle;return r==="richText"?(a?"":d)+(o?"":nee(t,f,b))+(s?"":tZe(t,m,g,v,y)):WP(i,(a?"":d)+(o?"":QJe(f,!a,b))+(s?"":eZe(m,g,v,y)),n)}}function W$(t,e,n,i,r,o){if(t){var s=eee(t),a={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter};return s(a,t,0,o)}}function ZJe(t){return{html:GJe[t],richText:YJe[t]}}function WP(t,e,n){var i='<div style="clear:both"></div>',r="margin: "+n+"px 0 0",o=ZQ(t);return'<div style="'+r+";"+o+';">'+e+i+"</div>"}function QJe(t,e,n){var i=e?"margin-left:2px":"";return'<span style="'+n+";"+i+'">'+yo(t)+"</span>"}function eZe(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=bt(t)?t:[t],'<span style="'+o+";"+i+'">'+jt(t,function(s){return yo(s)}).join("&nbsp;&nbsp;")+"</span>"}function nee(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function tZe(t,e,n,i,r){var o=[r],s=i?10:20;return n&&o.push({padding:[0,0,0,s],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(bt(e)?e.join(" "):e,o)}function nZe(t,e){var n=t.getData().getItemVisual(e,"style"),i=n[t.visualDrawType];return Pf(i)}function iee(t,e){var n=t.get("padding");return n??(e==="richText"?[8,10]:10)}var bx=(function(){function t(){this.richTextStyles={},this._nextStyleNameId=kZ()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(e,n,i){var r=i==="richText"?this._generateStyleName():null,o=NXe({color:n,type:e,renderMode:i,markerId:r});return At(o)?o:(this.richTextStyles[r]=o.style,o.content)},t.prototype.wrapRichTextStyle=function(e,n){var i={};bt(n)?ue(n,function(o){return lt(i,o)}):lt(i,n);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+e+"}"},t})();function iZe(t){var e=t.series,n=t.dataIndex,i=t.multipleSeries,r=e.getData(),o=r.mapDimensionsAll("defaultedTooltip"),s=o.length,a=e.getRawValue(n),l=bt(a),u=nZe(e,n),c,d,f,h;if(s>1||l&&!s){var m=rZe(a,e,n,o,u);c=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,h=m.inlineValues[0]}else if(s){var g=r.getDimensionInfo(o[0]);h=c=ig(r,n,o[0]),d=g.type}else h=c=l?a[0]:a;var v=PZ(e),p=v&&e.name||"",b=r.getName(n),y=i?p:b;return Pb("section",{header:p,noHeader:i||!v,sortParam:h,blocks:[Pb("nameValue",{markerType:"item",markerColor:u,name:y,noName:!Ka(y),value:c,valueType:d,dataIndex:n})].concat(f||[])})}function rZe(t,e,n,i,r){var o=e.getData(),s=Cg(t,function(d,f,h){var m=o.getDimensionInfo(h);return d=d||m&&m.tooltip!==!1&&m.displayName!=null},!1),a=[],l=[],u=[];i.length?ue(i,function(d){c(ig(o,n,d),d)}):ue(t,c);function c(d,f){var h=o.getDimensionInfo(f);!h||h.otherDims.tooltip===!1||(s?u.push(Pb("nameValue",{markerType:"subItem",markerColor:r,name:h.displayName,value:d,valueType:h.type})):(a.push(d),l.push(h.type)))}return{inlineValues:a,inlineValueTypes:l,blocks:u}}var $u=Di();function ew(t,e){return t.getName(e)||t.getId(e)}var oZe="__universalTransitionEnabled",Bc=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}return e.prototype.init=function(n,i,r){this.seriesIndex=this.componentIndex,this.dataTask=bv({count:aZe,reset:lZe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(n,r);var o=$u(this).sourceManager=new jJe(this);o.prepareSource();var s=this.getInitialData(n,r);j$(s,this),this.dataTask.context.data=s,$u(this).dataBeforeProcessed=s,q$(this),this._initSelectedMapFromData(s)},e.prototype.mergeDefaultAndTheme=function(n,i){var r=xb(this),o=r?XS(n):{},s=this.subType;jn.hasClass(s)&&(s+="Series"),Yn(n,i.getTheme().get(this.subType)),Yn(n,this.getDefaultOption()),k8(n,"label",["show"]),this.fillDataTextStyle(n.data),r&&If(n,o,r)},e.prototype.mergeOption=function(n,i){n=Yn(this.option,n,!0),this.fillDataTextStyle(n.data);var r=xb(this);r&&If(this.option,n,r);var o=$u(this).sourceManager;o.dirty(),o.prepareSource();var s=this.getInitialData(n,i);j$(s,this),this.dataTask.dirty(),this.dataTask.context.data=s,$u(this).dataBeforeProcessed=s,q$(this),this._initSelectedMapFromData(s)},e.prototype.fillDataTextStyle=function(n){if(n&&!Fo(n))for(var i=["show"],r=0;r<n.length;r++)n[r]&&n[r].label&&k8(n[r],"label",i)},e.prototype.getInitialData=function(n,i){},e.prototype.appendData=function(n){var i=this.getRawData();i.appendData(n.data)},e.prototype.getData=function(n){var i=qP(this);if(i){var r=i.context.data;return n==null||!r.getLinkedData?r:r.getLinkedData(n)}else return $u(this).data},e.prototype.getAllData=function(){var n=this.getData();return n&&n.getLinkedDataAll?n.getLinkedDataAll():[{data:n}]},e.prototype.setData=function(n){var i=qP(this);if(i){var r=i.context;r.outputData=n,i!==this.dataTask&&(r.data=n)}$u(this).data=n},e.prototype.getEncode=function(){var n=this.get("encode",!0);if(n)return cn(n)},e.prototype.getSourceManager=function(){return $u(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return $u(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var n=this.get("colorBy");return n||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var n=this.coordinateSystem;return n&&n.getBaseAxis&&n.getBaseAxis()},e.prototype.indicesOfNearest=function(n,i,r,o){var s=this.getData(),a=this.coordinateSystem,l=a&&a.getAxis(n);if(!a||!l)return[];var u=l.dataToCoord(r);o==null&&(o=1/0);var c=[],d=1/0,f=-1,h=0;return s.each(i,function(m,g){var v=l.dataToCoord(m),p=u-v,b=Math.abs(p);b<=o&&((b<d||b===d&&p>=0&&f<0)&&(d=b,f=p,h=0),p===f&&(c[h++]=g))}),c.length=h,c},e.prototype.formatTooltip=function(n,i,r){return iZe({series:this,dataIndex:n,multipleSeries:i})},e.prototype.isAnimationEnabled=function(){var n=this.ecModel;if(Kt.node&&!(n&&n.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(n,i,r){var o=this.ecModel,s=xL.prototype.getColorFromPalette.call(this,n,i,r);return s||(s=o.getColorFromPalette(n,i,r)),s},e.prototype.coordDimToDataDim=function(n){return this.getRawData().mapDimensionsAll(n)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(n,i){this._innerSelect(this.getData(i),n)},e.prototype.unselect=function(n,i){var r=this.option.selectedMap;if(r){var o=this.option.selectedMode,s=this.getData(i);if(o==="series"||r==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<n.length;a++){var l=n[a],u=ew(s,l);r[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(n,i){for(var r=[],o=0;o<n.length;o++)r[0]=n[o],this.isSelected(n[o],i)?this.unselect(r,i):this.select(r,i)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var n=this._selectedDataIndicesMap,i=hi(n),r=[],o=0;o<i.length;o++){var s=n[i[o]];s>=0&&r.push(s)}return r},e.prototype.isSelected=function(n,i){var r=this.option.selectedMap;if(!r)return!1;var o=this.getData(i);return(r==="all"||r[ew(o,n)])&&!o.getItemModel(n).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[oZe])return!0;var n=this.option.universalTransition;return n?n===!0?!0:n&&n.enabled:!1},e.prototype._innerSelect=function(n,i){var r,o,s=this.option,a=s.selectedMode,l=i.length;if(!(!a||!l)){if(a==="series")s.selectedMap="all";else if(a==="multiple"){Rt(s.selectedMap)||(s.selectedMap={});for(var u=s.selectedMap,c=0;c<l;c++){var d=i[c],f=ew(n,d);u[f]=!0,this._selectedDataIndicesMap[f]=n.getRawIndex(d)}}else if(a==="single"||a===!0){var h=i[l-1],f=ew(n,h);s.selectedMap=(r={},r[f]=!0,r),this._selectedDataIndicesMap=(o={},o[f]=n.getRawIndex(h),o)}}},e.prototype._initSelectedMapFromData=function(n){if(!this.option.selectedMap){var i=[];n.hasItemOption&&n.each(function(r){var o=n.getRawDataItem(r);o&&o.selected&&i.push(r)}),i.length>0&&this._innerSelect(n,i)}},e.registerClass=function(n){return jn.registerClass(n)},e.protoInitialize=(function(){var n=e.prototype;n.type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",n.visualDrawType="fill"})(),e})(jn);kl(Bc,RJe);kl(Bc,xL);MZ(Bc,jn);function q$(t){var e=t.name;PZ(t)||(t.name=sZe(t)||e)}function sZe(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return ue(n,function(r){var o=e.getDimensionInfo(r);o.displayName&&i.push(o.displayName)}),i.join(" ")}function aZe(t){return t.model.getRawData().count()}function lZe(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),uZe}function uZe(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function j$(t,e){ue(eje(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),function(n){t.wrapMethod(n,Ls(cZe,e))})}function cZe(t,e){var n=qP(t);return n&&n.setOutputEnd((e||this).count()),e}function qP(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}var Cu=(function(){function t(){this.group=new ao,this.uid=GS("viewComponent")}return t.prototype.init=function(e,n){},t.prototype.render=function(e,n,i,r){},t.prototype.dispose=function(e,n){},t.prototype.updateView=function(e,n,i,r){},t.prototype.updateLayout=function(e,n,i,r){},t.prototype.updateVisual=function(e,n,i,r){},t.prototype.toggleBlurSeries=function(e,n,i){},t.prototype.eachRendered=function(e){var n=this.group;n&&n.traverse(e)},t})();GO(Cu);VS(Cu);function ree(){var t=Di();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,s=n.large=!!(i&&i.large),a=n.progressiveRender=!!(i&&i.progressiveRender);return(r!==s||o!==a)&&"reset"}}var oee=Di(),dZe=ree(),ol=(function(){function t(){this.group=new ao,this.uid=GS("viewChart"),this.renderTask=bv({plan:fZe,reset:hZe}),this.renderTask.context={view:this}}return t.prototype.init=function(e,n){},t.prototype.render=function(e,n,i,r){},t.prototype.highlight=function(e,n,i,r){var o=e.getData(r&&r.dataType);o&&G$(o,r,"emphasis")},t.prototype.downplay=function(e,n,i,r){var o=e.getData(r&&r.dataType);o&&G$(o,r,"normal")},t.prototype.remove=function(e,n){this.group.removeAll()},t.prototype.dispose=function(e,n){},t.prototype.updateView=function(e,n,i,r){this.render(e,n,i,r)},t.prototype.updateLayout=function(e,n,i,r){this.render(e,n,i,r)},t.prototype.updateVisual=function(e,n,i,r){this.render(e,n,i,r)},t.prototype.eachRendered=function(e){cL(this.group,e)},t.markUpdateMethod=function(e,n){oee(e).updateMethod=n},t.protoInitialize=(function(){var e=t.prototype;e.type="chart"})(),t})();function K$(t,e,n){t&&LP(t)&&(e==="emphasis"?$1:z1)(t,n)}function G$(t,e,n){var i=Ef(t,e),r=e&&e.highlightKey!=null?dYe(e.highlightKey):null;i!=null?ue(io(i),function(o){K$(t.getItemGraphicEl(o),n,r)}):t.eachItemGraphicEl(function(o){K$(o,n,r)})}GO(ol);VS(ol);function fZe(t){return dZe(t.model)}function hZe(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,s=t.view,a=r&&oee(r).updateMethod,l=o?"incrementalPrepareRender":a&&s[a]?a:"render";return l!=="render"&&s[l](e,n,i,r),mZe[l]}var mZe={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},K1="\0__throttleOriginMethod",Y$="\0__throttleRate",X$="\0__throttleType";function ML(t,e,n){var i,r=0,o=0,s=null,a,l,u,c;e=e||0;function d(){o=new Date().getTime(),s=null,t.apply(l,u||[])}var f=function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];i=new Date().getTime(),l=this,u=h;var g=c||e,v=c||n;c=null,a=i-(v?r:o)-g,clearTimeout(s),v?s=setTimeout(d,g):a>=0?d():s=setTimeout(d,-a),r=i};return f.clear=function(){s&&(clearTimeout(s),s=null)},f.debounceNextCall=function(h){c=h},f}function see(t,e,n,i){var r=t[e];if(r){var o=r[K1]||r,s=r[X$],a=r[Y$];if(a!==n||s!==i){if(n==null||!i)return t[e]=o;r=t[e]=ML(o,n,i==="debounce"),r[K1]=o,r[X$]=i,r[Y$]=n}return r}}function jP(t,e){var n=t[e];n&&n[K1]&&(n.clear&&n.clear(),t[e]=n[K1])}var J$=Di(),Z$={itemStyle:Cb(bQ,!0),lineStyle:Cb(vQ,!0)},gZe={lineStyle:"stroke",itemStyle:"fill"};function aee(t,e){var n=t.visualStyleMapper||Z$[e];return n||(console.warn("Unknown style type '"+e+"'."),Z$.itemStyle)}function lee(t,e){var n=t.visualDrawType||gZe[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var pZe={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=aee(t,i),s=o(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var l=lee(t,i),u=s[l],c=Xt(u)?u:null,d=s.fill==="auto"||s.stroke==="auto";if(!s[l]||c||d){var f=t.getColorFromPalette(t.name,null,e.getSeriesCount());s[l]||(s[l]=f,n.setVisual("colorFromPalette",!0)),s.fill=s.fill==="auto"||Xt(s.fill)?f:s.fill,s.stroke=s.stroke==="auto"||Xt(s.stroke)?f:s.stroke}if(n.setVisual("style",s),n.setVisual("drawType",l),!e.isSeriesFiltered(t)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(h,m){var g=t.getDataParams(m),v=lt({},s);v[l]=c(g),h.setItemVisual(m,"style",v)}}}},ap=new Ii,vZe={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!(t.ignoreStyleOnData||e.isSeriesFiltered(t))){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=aee(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(s,a){var l=s.getRawDataItem(a);if(l&&l[i]){ap.option=l[i];var u=r(ap),c=s.ensureUniqueItemVisual(a,"style");lt(c,u),ap.option.decal&&(s.setItemVisual(a,"decal",ap.option.decal),ap.option.decal.dirty=!0),o in u&&s.setItemVisual(a,"colorFromPalette",!1)}}:null}}}},bZe={performRawSeries:!0,overallReset:function(t){var e=cn();t.eachSeries(function(n){var i=n.getColorBy();if(!n.isColorBySeries()){var r=n.type+"-"+i,o=e.get(r);o||(o={},e.set(r,o)),J$(n).scope=o}}),t.eachSeries(function(n){if(!(n.isColorBySeries()||t.isSeriesFiltered(n))){var i=n.getRawData(),r={},o=n.getData(),s=J$(n).scope,a=n.visualStyleAccessPath||"itemStyle",l=lee(n,a);o.each(function(u){var c=o.getRawIndex(u);r[c]=u}),i.each(function(u){var c=r[u],d=o.getItemVisual(c,"colorFromPalette");if(d){var f=o.ensureUniqueItemVisual(c,"style"),h=i.getName(u)||u+"",m=i.count();f[l]=n.getColorFromPalette(h,s,m)}})}})}},tw=Math.PI;function yZe(t,e){e=e||{},Xn(e,{text:"loading",textColor:dn.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:dn.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new ao,i=new Fr({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r=new va({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),o=new Fr({style:{fill:"none"},textContent:r,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});n.add(o);var s;return e.showSpinner&&(s=new jS({shape:{startAngle:-tw/2,endAngle:-tw/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),s.animateShape(!0).when(1e3,{endAngle:tw*3/2}).start("circularInOut"),s.animateShape(!0).when(1e3,{startAngle:tw*3/2}).delay(300).start("circularInOut"),n.add(s)),n.resize=function(){var a=r.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(t.getWidth()-l*2-(e.showSpinner&&a?10:0)-a)/2-(e.showSpinner&&a?0:5+a/2)+(e.showSpinner?0:a/2)+(a?0:l),c=t.getHeight()/2;e.showSpinner&&s.setShape({cx:u,cy:c}),o.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n}var uee=(function(){function t(e,n,i,r){this._stageTaskMap=cn(),this.ecInstance=e,this.api=n,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return t.prototype.restoreData=function(e,n){e.restoreData(n),this._stageTaskMap.each(function(i){var r=i.overallTask;r&&r.dirty()})},t.prototype.getPerformArgs=function(e,n){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),r=i.context,o=!n&&i.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>i.blockIndex,s=o?i.step:null,a=r&&r.modDataCount,l=a!=null?Math.ceil(a/s):null;return{step:s,modBy:l,modDataCount:a}}},t.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},t.prototype.updateStreamModes=function(e,n){var i=this._pipelineMap.get(e.uid),r=e.getData(),o=r.count(),s=i.progressiveEnabled&&n.incrementalPrepareRender&&o>=i.threshold,a=e.get("large")&&o>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?o:null;e.pipelineContext=i.context={progressiveRender:s,modDataCount:l,large:a}},t.prototype.restorePipelines=function(e){var n=this,i=n._pipelineMap=cn();e.eachSeries(function(r){var o=r.getProgressive(),s=r.uid;i.set(s,{id:s,head:null,tail:null,threshold:r.getProgressiveThreshold(),progressiveEnabled:o&&!(r.preventIncremental&&r.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),n._pipe(r,r.dataTask)})},t.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,n=this.api.getModel(),i=this.api;ue(this._allHandlers,function(r){var o=e.get(r.uid)||e.set(r.uid,{}),s="";_u(!(r.reset&&r.overallReset),s),r.reset&&this._createSeriesStageTask(r,o,n,i),r.overallReset&&this._createOverallStageTask(r,o,n,i)},this)},t.prototype.prepareView=function(e,n,i,r){var o=e.renderTask,s=o.context;s.model=n,s.ecModel=i,s.api=r,o.__block=!e.incrementalPrepareRender,this._pipe(n,o)},t.prototype.performDataProcessorTasks=function(e,n){this._performStageTasks(this._dataProcessorHandlers,e,n,{block:!0})},t.prototype.performVisualTasks=function(e,n,i){this._performStageTasks(this._visualHandlers,e,n,i)},t.prototype._performStageTasks=function(e,n,i,r){r=r||{};var o=!1,s=this;ue(e,function(l,u){if(!(r.visualType&&r.visualType!==l.visualType)){var c=s._stageTaskMap.get(l.uid),d=c.seriesTaskMap,f=c.overallTask;if(f){var h,m=f.agentStubMap;m.each(function(v){a(r,v)&&(v.dirty(),h=!0)}),h&&f.dirty(),s.updatePayload(f,i);var g=s.getPerformArgs(f,r.block);m.each(function(v){v.perform(g)}),f.perform(g)&&(o=!0)}else d&&d.each(function(v,p){a(r,v)&&v.dirty();var b=s.getPerformArgs(v,r.block);b.skip=!l.performRawSeries&&n.isSeriesFiltered(v.context.model),s.updatePayload(v,i),v.perform(b)&&(o=!0)})}});function a(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=o||this.unfinished},t.prototype.performSeriesTasks=function(e){var n;e.eachSeries(function(i){n=i.dataTask.perform()||n}),this.unfinished=n||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each(function(e){var n=e.tail;do{if(n.__block){e.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)})},t.prototype.updatePayload=function(e,n){n!=="remain"&&(e.context.payload=n)},t.prototype._createSeriesStageTask=function(e,n,i,r){var o=this,s=n.seriesTaskMap,a=n.seriesTaskMap=cn(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,r).each(c);function c(d){var f=d.uid,h=a.set(f,s&&s.get(f)||bv({plan:kZe,reset:TZe,count:xZe}));h.context={model:d,ecModel:i,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:o},o._pipe(d,h)}},t.prototype._createOverallStageTask=function(e,n,i,r){var o=this,s=n.overallTask=n.overallTask||bv({reset:wZe});s.context={ecModel:i,api:r,overallReset:e.overallReset,scheduler:o};var a=s.agentStubMap,l=s.agentStubMap=cn(),u=e.seriesType,c=e.getTargetSeries,d=!0,f=!1,h="";_u(!e.createOnAllSeries,h),u?i.eachRawSeriesByType(u,m):c?c(i,r).each(m):(d=!1,ue(i.getSeries(),m));function m(g){var v=g.uid,p=l.set(v,a&&a.get(v)||(f=!0,bv({reset:_Ze,onDirty:SZe})));p.context={model:g,overallProgress:d},p.agent=s,p.__block=d,o._pipe(g,p)}f&&s.dirty()},t.prototype._pipe=function(e,n){var i=e.uid,r=this._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r},t.wrapStageHandler=function(e,n){return Xt(e)&&(e={overallReset:e,seriesType:AZe(e)}),e.uid=GS("stageHandler"),n&&(e.visualType=n),e},t})();function wZe(t){t.overallReset(t.ecModel,t.api,t.payload)}function _Ze(t){return t.overallProgress&&CZe}function CZe(){this.agent.dirty(),this.getDownstream().dirty()}function SZe(){this.agent&&this.agent.dirty()}function kZe(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function TZe(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=io(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?jt(e,function(n,i){return cee(i)}):EZe}var EZe=cee(0);function cee(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o<e.end;o++)r.dataEach(i,o);else r&&r.progress&&r.progress(e,i)}}function xZe(t){return t.data.count()}function AZe(t){G1=null;try{t(Ib,dee)}catch{}return G1}var Ib={},dee={},G1;fee(Ib,AL);fee(dee,FQ);Ib.eachSeriesByType=Ib.eachRawSeriesByType=function(t){G1=t};Ib.eachComponent=function(t){t.mainType==="series"&&t.subType&&(G1=t.subType)};function fee(t,e){for(var n in e.prototype)t[n]=Mo}var ct=dn.darkColor,PZe=ct.background,lp=function(){return{axisLine:{lineStyle:{color:ct.axisLine}},splitLine:{lineStyle:{color:ct.axisSplitLine}},splitArea:{areaStyle:{color:[ct.backgroundTint,ct.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:ct.axisMinorSplitLine}},axisLabel:{color:ct.axisLabel},axisName:{}}},Q$={label:{color:ct.secondary},itemStyle:{borderColor:ct.borderTint},dividerLineStyle:{color:ct.border}},hee={darkMode:!0,color:ct.theme,backgroundColor:PZe,axisPointer:{lineStyle:{color:ct.border},crossStyle:{color:ct.borderShade},label:{color:ct.tertiary}},legend:{textStyle:{color:ct.secondary},pageTextStyle:{color:ct.tertiary}},textStyle:{color:ct.secondary},title:{textStyle:{color:ct.primary},subtextStyle:{color:ct.quaternary}},toolbox:{iconStyle:{borderColor:ct.accent50}},tooltip:{backgroundColor:ct.neutral20,defaultBorderColor:ct.border,textStyle:{color:ct.tertiary}},dataZoom:{borderColor:ct.accent10,textStyle:{color:ct.tertiary},brushStyle:{color:ct.backgroundTint},handleStyle:{color:ct.neutral00,borderColor:ct.accent20},moveHandleStyle:{color:ct.accent40},emphasis:{handleStyle:{borderColor:ct.accent50}},dataBackground:{lineStyle:{color:ct.accent30},areaStyle:{color:ct.accent20}},selectedDataBackground:{lineStyle:{color:ct.accent50},areaStyle:{color:ct.accent30}}},visualMap:{textStyle:{color:ct.secondary},handleStyle:{borderColor:ct.neutral30}},timeline:{lineStyle:{color:ct.accent10},label:{color:ct.tertiary},controlStyle:{color:ct.accent30,borderColor:ct.accent30}},calendar:{itemStyle:{color:ct.neutral00,borderColor:ct.neutral20},dayLabel:{color:ct.tertiary},monthLabel:{color:ct.secondary},yearLabel:{color:ct.secondary}},matrix:{x:Q$,y:Q$,backgroundColor:{borderColor:ct.axisLine},body:{itemStyle:{borderColor:ct.borderTint}}},timeAxis:lp(),logAxis:lp(),valueAxis:lp(),categoryAxis:lp(),line:{symbol:"circle"},graph:{color:ct.theme},gauge:{title:{color:ct.secondary},axisLine:{lineStyle:{color:[[1,ct.neutral05]]}},axisLabel:{color:ct.axisLabel},detail:{color:ct.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:ct.background}},radar:(function(){var t=lp();return t.axisName={color:ct.axisLabel},t.axisLine.lineStyle.color=ct.neutral20,t})(),treemap:{breadcrumb:{itemStyle:{color:ct.neutral20,textStyle:{color:ct.secondary}},emphasis:{itemStyle:{color:ct.neutral30}}}},sunburst:{itemStyle:{borderColor:ct.background}},map:{itemStyle:{borderColor:ct.border,areaColor:ct.neutral10},label:{color:ct.tertiary},emphasis:{label:{color:ct.primary},itemStyle:{areaColor:ct.highlight}},select:{label:{color:ct.primary},itemStyle:{areaColor:ct.highlight}}},geo:{itemStyle:{borderColor:ct.border,areaColor:ct.neutral10},emphasis:{label:{color:ct.primary},itemStyle:{areaColor:ct.highlight}},select:{label:{color:ct.primary},itemStyle:{color:ct.highlight}}}};hee.categoryAxis.splitLine.show=!1;var IZe=(function(){function t(){}return t.prototype.normalizeQuery=function(e){var n={},i={},r={};if(At(e)){var o=Ya(e);n.mainType=o.main||null,n.subType=o.sub||null}else{var s=["Index","Name","Id"],a={name:1,dataIndex:1,dataType:1};ue(e,function(l,u){for(var c=!1,d=0;d<s.length;d++){var f=s[d],h=u.lastIndexOf(f);if(h>0&&h===u.length-f.length){var m=u.slice(0,h);m!=="data"&&(n.mainType=m,n[f.toLowerCase()]=l,c=!0)}}a.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(r[u]=l)})}return{cptQuery:n,dataQuery:i,otherQuery:r}},t.prototype.filter=function(e,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,o=i.packedEvent,s=i.model,a=i.view;if(!s||!a)return!0;var l=n.cptQuery,u=n.dataQuery;return c(l,s,"mainType")&&c(l,s,"subType")&&c(l,s,"index","componentIndex")&&c(l,s,"name")&&c(l,s,"id")&&c(u,o,"name")&&c(u,o,"dataIndex")&&c(u,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(e,n.otherQuery,r,o));function c(d,f,h,m){return d[h]==null||f[m||h]===d[h]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t})(),KP=["symbol","symbolSize","symbolRotate","symbolOffset"],e7=KP.concat(["symbolKeepAspect"]),RZe={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),!t.hasSymbolVisual)return;for(var i={},r={},o=!1,s=0;s<KP.length;s++){var a=KP[s],l=t.get(a);Xt(l)?(o=!0,r[a]=l):i[a]=l}if(i.symbol=i.symbol||t.defaultSymbol,n.setVisual(lt({legendIcon:t.legendIcon||i.symbol,symbolKeepAspect:t.get("symbolKeepAspect")},i)),e.isSeriesFiltered(t))return;var u=hi(r);function c(d,f){for(var h=t.getRawValue(f),m=t.getDataParams(f),g=0;g<u.length;g++){var v=u[g];d.setItemVisual(f,v,r[v](h,m))}}return{dataEach:o?c:null}}},MZe={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.hasSymbolVisual||e.isSeriesFiltered(t))return;var n=t.getData();function i(r,o){for(var s=r.getItemModel(o),a=0;a<e7.length;a++){var l=e7[a],u=s.getShallow(l,!0);u!=null&&r.setItemVisual(o,l,u)}}return{dataEach:n.hasItemOption?i:null}}};function OZe(t,e,n){switch(n){case"color":var i=t.getItemVisual(e,"style");return i[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n)}}function LZe(t,e){switch(e){case"color":var n=t.getVisual("style");return n[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e)}}function xh(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},function(s){for(var a=s.seriesIndex,l=s.option.selectedMap,u=r.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===a){var d=s.getData(),f=Ef(d,r.fromActionPayload);n.trigger(o,{type:o,seriesId:s.id,name:bt(f)?d.getName(f[0]):d.getName(f),selected:At(l)?l:lt({},l)})}})}function DZe(t,e,n){t.on("selectchanged",function(i){var r=n.getModel();i.isFromClick?(xh("map","selectchanged",e,r,i),xh("pie","selectchanged",e,r,i)):i.fromAction==="select"?(xh("map","selected",e,r,i),xh("pie","selected",e,r,i)):i.fromAction==="unselect"&&(xh("map","unselected",e,r,i),xh("pie","unselected",e,r,i))})}function Ap(t,e,n){for(var i;t&&!(e(t)&&(i=t,n));)t=t.__hostTarget||t.parent;return i}var NZe=Math.round(Math.random()*9),BZe=typeof Object.defineProperty=="function",VZe=(function(){function t(){this._id="__ec_inner_"+NZe++}return t.prototype.get=function(e){return this._guard(e)[this._id]},t.prototype.set=function(e,n){var i=this._guard(e);return BZe?Object.defineProperty(i,this._id,{value:n,enumerable:!1,configurable:!0}):i[this._id]=n,this},t.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},t.prototype.has=function(e){return!!this._guard(e)[this._id]},t.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},t})(),FZe=Jn.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i+o),t.lineTo(n-r,i+o),t.closePath()}}),$Ze=Jn.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,r=e.width/2,o=e.height/2;t.moveTo(n,i-o),t.lineTo(n+r,i),t.lineTo(n,i+o),t.lineTo(n-r,i),t.closePath()}}),zZe=Jn.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,r=e.width/5*3,o=Math.max(r,e.height),s=r/2,a=s*s/(o-s),l=i-o+s+a,u=Math.asin(a/s),c=Math.cos(u)*s,d=Math.sin(u),f=Math.cos(u),h=s*.6,m=s*.7;t.moveTo(n-c,l+a),t.arc(n,l,s,Math.PI-u,Math.PI*2+u),t.bezierCurveTo(n+c-d*h,l+a+f*h,n,i-m,n,i),t.bezierCurveTo(n,i-m,n-c+d*h,l+a+f*h,n-c,l+a),t.closePath()}}),HZe=Jn.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,r=e.x,o=e.y,s=i/3*2;t.moveTo(r,o),t.lineTo(r+s,o+n),t.lineTo(r,o+n/4*3),t.lineTo(r-s,o+n),t.lineTo(r,o),t.closePath()}}),UZe={line:Nc,rect:Fr,roundRect:Fr,square:Fr,circle:WS,diamond:$Ze,pin:zZe,arrow:HZe,triangle:FZe},WZe={line:function(t,e,n,i,r){r.x1=t,r.y1=e+i/2,r.x2=t+n,r.y2=e+i/2},rect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i},roundRect:function(t,e,n,i,r){r.x=t,r.y=e,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(t,e,n,i,r){var o=Math.min(n,i);r.x=t,r.y=e,r.width=o,r.height=o},circle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.r=Math.min(n,i)/2},diamond:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i},pin:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},arrow:function(t,e,n,i,r){r.x=t+n/2,r.y=e+i/2,r.width=n,r.height=i},triangle:function(t,e,n,i,r){r.cx=t+n/2,r.cy=e+i/2,r.width=n,r.height=i}},GP={};ue(UZe,function(t,e){GP[e]=new t});var qZe=Jn.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=bZ(t,e,n),r=this.shape;return r&&r.symbolType==="pin"&&e.position==="inside"&&(i.y=n.y+n.height*.4),i},buildPath:function(t,e,n){var i=e.symbolType;if(i!=="none"){var r=GP[i];r||(i="rect",r=GP[i]),WZe[i](e.x,e.y,e.width,e.height,r.shape),r.buildPath(t,r.shape,n)}}});function jZe(t,e){if(this.type!=="image"){var n=this.style;this.__isEmptyBrush?(n.stroke=t,n.fill=e||dn.color.neutral00,n.lineWidth=2):this.shape.symbolType==="line"?n.stroke=t:n.fill=t,this.markRedraw()}}function Rb(t,e,n,i,r,o,s){var a=t.indexOf("empty")===0;a&&(t=t.substr(5,1).toLowerCase()+t.substr(6));var l;return t.indexOf("image://")===0?l=sQ(t.slice(8),new nn(e,n,i,r),s?"center":"cover"):t.indexOf("path://")===0?l=aL(t.slice(7),{},new nn(e,n,i,r),s?"center":"cover"):l=new qZe({shape:{symbolType:t,x:e,y:n,width:i,height:r}}),l.__isEmptyBrush=a,l.setColor=jZe,o&&l.setColor(o),l}function KZe(t){return bt(t)||(t=[+t,+t]),[t[0]||0,t[1]||0]}function mee(t,e){if(t!=null)return bt(t)||(t=[t,t]),[eo(t[0],e[0])||0,eo(Ut(t[1],t[0]),e[1])||0]}function Qd(t){return isFinite(t)}function GZe(t,e,n){var i=e.x==null?0:e.x,r=e.x2==null?1:e.x2,o=e.y==null?0:e.y,s=e.y2==null?0:e.y2;e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,s=s*n.height+n.y),i=Qd(i)?i:0,r=Qd(r)?r:1,o=Qd(o)?o:0,s=Qd(s)?s:0;var a=t.createLinearGradient(i,o,r,s);return a}function YZe(t,e,n){var i=n.width,r=n.height,o=Math.min(i,r),s=e.x==null?.5:e.x,a=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(s=s*i+n.x,a=a*r+n.y,l=l*o),s=Qd(s)?s:.5,a=Qd(a)?a:.5,l=l>=0&&Qd(l)?l:.5;var u=t.createRadialGradient(s,a,0,s,a,l);return u}function YP(t,e,n){for(var i=e.type==="radial"?YZe(t,e,n):GZe(t,e,n),r=e.colorStops,o=0;o<r.length;o++)i.addColorStop(r[o].offset,r[o].color);return i}function XZe(t,e){if(t===e||!t&&!e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!0;return!1}function nw(t){return parseInt(t,10)}function iw(t,e,n){var i=["width","height"][e],r=["clientWidth","clientHeight"][e],o=["paddingLeft","paddingTop"][e],s=["paddingRight","paddingBottom"][e];if(n[i]!=null&&n[i]!=="auto")return parseFloat(n[i]);var a=document.defaultView.getComputedStyle(t);return(t[r]||nw(a[i])||nw(t.style[i]))-(nw(a[o])||0)-(nw(a[s])||0)|0}function JZe(t,e){return!t||t==="solid"||!(e>0)?null:t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:ai(t)?[t]:bt(t)?t:null}function gee(t){var e=t.style,n=e.lineDash&&e.lineWidth>0&&JZe(e.lineDash,e.lineWidth),i=e.lineDashOffset;if(n){var r=e.strokeNoScale&&t.getLineScale?t.getLineScale():1;r&&r!==1&&(n=jt(n,function(o){return o/r}),i/=r)}return[n,i]}var ZZe=new xf(!0);function Y1(t){var e=t.stroke;return!(e==null||e==="none"||!(t.lineWidth>0))}function t7(t){return typeof t=="string"&&t!=="none"}function X1(t){var e=t.fill;return e!=null&&e!=="none"}function n7(t,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function i7(t,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function XP(t,e,n){var i=OZ(e.image,e.__image,n);if(FS(i)){var r=t.createPattern(i,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*tje),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}function QZe(t,e,n,i){var r,o=Y1(n),s=X1(n),a=n.strokePercent,l=a<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||ZZe,d=e.__dirty;if(!i){var f=n.fill,h=n.stroke,m=s&&!!f.colorStops,g=o&&!!h.colorStops,v=s&&!!f.image,p=o&&!!h.image,b=void 0,y=void 0,_=void 0,C=void 0,S=void 0;(m||g)&&(S=e.getBoundingRect()),m&&(b=d?YP(t,f,S):e.__canvasFillGradient,e.__canvasFillGradient=b),g&&(y=d?YP(t,h,S):e.__canvasStrokeGradient,e.__canvasStrokeGradient=y),v&&(_=d||!e.__canvasFillPattern?XP(t,f,e):e.__canvasFillPattern,e.__canvasFillPattern=_),p&&(C=d||!e.__canvasStrokePattern?XP(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=C),m?t.fillStyle=b:v&&(_?t.fillStyle=_:s=!1),g?t.strokeStyle=y:p&&(C?t.strokeStyle=C:o=!1)}var k=e.getGlobalScale();c.setScale(k[0],k[1],e.segmentIgnoreThreshold);var T,E;t.setLineDash&&n.lineDash&&(r=gee(e),T=r[0],E=r[1]);var x=!0;(u||d&Hh)&&(c.setDPR(t.dpr),l?c.setContext(null):(c.setContext(t),x=!1),c.reset(),e.buildPath(c,e.shape,i),c.toStatic(),e.pathUpdated()),x&&c.rebuildPath(t,l?a:1),T&&(t.setLineDash(T),t.lineDashOffset=E),i||(n.strokeFirst?(o&&i7(t,n),s&&n7(t,n)):(s&&n7(t,n),o&&i7(t,n))),T&&t.setLineDash([])}function eQe(t,e,n){var i=e.__image=OZ(n.image,e.__image,e,e.onload);if(!(!i||!FS(i))){var r=n.x||0,o=n.y||0,s=e.getWidth(),a=e.getHeight(),l=i.width/i.height;if(s==null&&a!=null?s=a*l:a==null&&s!=null?a=s/l:s==null&&a==null&&(s=i.width,a=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;t.drawImage(i,u,c,n.sWidth,n.sHeight,r,o,s,a)}else if(n.sx&&n.sy){var u=n.sx,c=n.sy,d=s-u,f=a-c;t.drawImage(i,u,c,d,f,r,o,s,a)}else t.drawImage(i,r,o,s,a)}}function tQe(t,e,n){var i,r=n.text;if(r!=null&&(r+=""),r){t.font=n.font||Dc,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var o=void 0,s=void 0;t.setLineDash&&n.lineDash&&(i=gee(e),o=i[0],s=i[1]),o&&(t.setLineDash(o),t.lineDashOffset=s),n.strokeFirst?(Y1(n)&&t.strokeText(r,n.x,n.y),X1(n)&&t.fillText(r,n.x,n.y)):(X1(n)&&t.fillText(r,n.x,n.y),Y1(n)&&t.strokeText(r,n.x,n.y)),o&&t.setLineDash([])}}var r7=["shadowBlur","shadowOffsetX","shadowOffsetY"],o7=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function pee(t,e,n,i,r){var o=!1;if(!i&&(n=n||{},e===n))return!1;if(i||e.opacity!==n.opacity){So(t,r),o=!0;var s=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(s)?cf.opacity:s}(i||e.blend!==n.blend)&&(o||(So(t,r),o=!0),t.globalCompositeOperation=e.blend||cf.blend);for(var a=0;a<r7.length;a++){var l=r7[a];(i||e[l]!==n[l])&&(o||(So(t,r),o=!0),t[l]=t.dpr*(e[l]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(So(t,r),o=!0),t.shadowColor=e.shadowColor||cf.shadowColor),o}function s7(t,e,n,i,r){var o=Mb(e,r.inHover),s=i?null:n&&Mb(n,r.inHover)||{};if(o===s)return!1;var a=pee(t,o,s,i,r);if((i||o.fill!==s.fill)&&(a||(So(t,r),a=!0),t7(o.fill)&&(t.fillStyle=o.fill)),(i||o.stroke!==s.stroke)&&(a||(So(t,r),a=!0),t7(o.stroke)&&(t.strokeStyle=o.stroke)),(i||o.opacity!==s.opacity)&&(a||(So(t,r),a=!0),t.globalAlpha=o.opacity==null?1:o.opacity),e.hasStroke()){var l=o.lineWidth,u=l/(o.strokeNoScale&&e.getLineScale?e.getLineScale():1);t.lineWidth!==u&&(a||(So(t,r),a=!0),t.lineWidth=u)}for(var c=0;c<o7.length;c++){var d=o7[c],f=d[0];(i||o[f]!==s[f])&&(a||(So(t,r),a=!0),t[f]=o[f]||d[1])}return a}function nQe(t,e,n,i,r){return pee(t,Mb(e,r.inHover),n&&Mb(n,r.inHover),i,r)}function vee(t,e){var n=e.transform,i=t.dpr||1;n?t.setTransform(i*n[0],i*n[1],i*n[2],i*n[3],i*n[4],i*n[5]):t.setTransform(i,0,0,i,0,0)}function iQe(t,e,n){for(var i=!1,r=0;r<t.length;r++){var o=t[r];i=i||o.isZeroArea(),vee(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}n.allClipped=i}function rQe(t,e){return t&&e?t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||t[4]!==e[4]||t[5]!==e[5]:!(!t&&!e)}var a7=1,l7=2,u7=3,c7=4;function oQe(t){var e=X1(t),n=Y1(t);return!(t.lineDash||!(+e^+n)||e&&typeof t.fill!="string"||n&&typeof t.stroke!="string"||t.strokePercent<1||t.strokeOpacity<1||t.fillOpacity<1)}function So(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Mb(t,e){return e&&t.__hoverStyle||t.style}function bee(t,e){ef(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function ef(t,e,n,i){var r=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){e.__dirty&=~Jo,e.__isRendered=!1;return}var o=e.__clipPaths,s=n.prevElClipPaths,a=!1,l=!1;if((!s||XZe(o,s))&&(s&&s.length&&(So(t,n),t.restore(),l=a=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length&&(So(t,n),t.save(),iQe(o,t,n),a=!0),n.prevElClipPaths=o),n.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=n.prevEl;u||(l=a=!0);var c=e instanceof Jn&&e.autoBatch&&oQe(e.style);a||rQe(r,u.transform)?(So(t,n),vee(t,e)):c||So(t,n);var d=Mb(e,n.inHover);e instanceof Jn?(n.lastDrawType!==a7&&(l=!0,n.lastDrawType=a7),s7(t,e,u,l,n),(!c||!n.batchFill&&!n.batchStroke)&&t.beginPath(),QZe(t,e,d,c),c&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):e instanceof B1?(n.lastDrawType!==u7&&(l=!0,n.lastDrawType=u7),s7(t,e,u,l,n),tQe(t,e,d)):e instanceof Yc?(n.lastDrawType!==l7&&(l=!0,n.lastDrawType=l7),nQe(t,e,u,l,n),eQe(t,e,d)):e.getTemporalDisplayables&&(n.lastDrawType!==c7&&(l=!0,n.lastDrawType=c7),sQe(t,e,n)),c&&i&&So(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),n.prevEl=e,e.__dirty=0,e.__isRendered=!0}function sQe(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover},s,a;for(s=e.getCursor(),a=i.length;s<a;s++){var l=i[s];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),ef(t,l,o,s===a-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),o.prevEl=l}for(var u=0,c=r.length;u<c;u++){var l=r[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),ef(t,l,o,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),o.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}var yx=new VZe,d7=new tg(100),f7=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function h7(t,e){if(t==="none")return null;var n=e.getDevicePixelRatio(),i=e.getZr(),r=i.painter.type==="svg";t.dirty&&yx.delete(t);var o=yx.get(t);if(o)return o;var s=Xn(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});s.backgroundColor==="none"&&(s.backgroundColor=null);var a={repeat:"repeat"};return l(a),a.rotation=s.rotation,a.scaleX=a.scaleY=r?1:1/n,yx.set(t,a),t.dirty=!1,a;function l(u){for(var c=[n],d=!0,f=0;f<f7.length;++f){var h=s[f7[f]];if(h!=null&&!bt(h)&&!At(h)&&!ai(h)&&typeof h!="boolean"){d=!1;break}c.push(h)}var m;if(d){m=c.join(",")+(r?"-svg":"");var g=d7.get(m);g&&(r?u.svgElement=g:u.image=g)}var v=wee(s.dashArrayX),p=aQe(s.dashArrayY),b=yee(s.symbol),y=lQe(v),_=_ee(p),C=!r&&wu.createCanvas(),S=r&&{tag:"g",attrs:{},key:"dcl",children:[]},k=E(),T;C&&(C.width=k.width*n,C.height=k.height*n,T=C.getContext("2d")),x(),d&&d7.put(m,C||S),u.image=C,u.svgElement=S,u.svgWidth=k.width,u.svgHeight=k.height;function E(){for(var P=1,A=0,I=y.length;A<I;++A)P=C8(P,y[A]);for(var D=1,A=0,I=b.length;A<I;++A)D=C8(D,b[A].length);P*=D;var q=_*y.length*b.length;return{width:Math.max(1,Math.min(P,s.maxTileWidth)),height:Math.max(1,Math.min(q,s.maxTileHeight))}}function x(){T&&(T.clearRect(0,0,C.width,C.height),s.backgroundColor&&(T.fillStyle=s.backgroundColor,T.fillRect(0,0,C.width,C.height)));for(var P=0,A=0;A<p.length;++A)P+=p[A];if(P<=0)return;for(var I=-_,D=0,q=0,z=0;I<k.height;){if(D%2===0){for(var R=q/2%b.length,O=0,N=0,F=0;O<k.width*2;){for(var j=0,A=0;A<v[z].length;++A)j+=v[z][A];if(j<=0)break;if(N%2===0){var U=(1-s.symbolSize)*.5,W=O+v[z][N]*U,J=I+p[D]*U,ne=v[z][N]*s.symbolSize,he=p[D]*s.symbolSize,X=F/2%b[R].length;se(W,J,ne,he,b[R][X])}O+=v[z][N],++F,++N,N===v[z].length&&(N=0)}++z,z===v.length&&(z=0)}I+=p[D],++q,++D,D===p.length&&(D=0)}function se(re,ee,te,V,K){var G=r?1:n,ye=Rb(K,re*G,ee*G,te*G,V*G,s.color,s.symbolKeepAspect);if(r){var be=i.painter.renderOneToVNode(ye);be&&S.children.push(be)}else bee(T,ye)}}}}function yee(t){if(!t||t.length===0)return[["rect"]];if(At(t))return[[t]];for(var e=!0,n=0;n<t.length;++n)if(!At(t[n])){e=!1;break}if(e)return yee([t]);for(var i=[],n=0;n<t.length;++n)At(t[n])?i.push([t[n]]):i.push(t[n]);return i}function wee(t){if(!t||t.length===0)return[[0,0]];if(ai(t)){var e=Math.ceil(t);return[[e,e]]}for(var n=!0,i=0;i<t.length;++i)if(!ai(t[i])){n=!1;break}if(n)return wee([t]);for(var r=[],i=0;i<t.length;++i)if(ai(t[i])){var e=Math.ceil(t[i]);r.push([e,e])}else{var e=jt(t[i],function(a){return Math.ceil(a)});e.length%2===1?r.push(e.concat(e)):r.push(e)}return r}function aQe(t){if(!t||typeof t=="object"&&t.length===0)return[0,0];if(ai(t)){var e=Math.ceil(t);return[e,e]}var n=jt(t,function(i){return Math.ceil(i)});return t.length%2?n.concat(n):n}function lQe(t){return jt(t,function(e){return _ee(e)})}function _ee(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2===1?e*2:e}function uQe(t,e){t.eachRawSeries(function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each(function(s){var a=i.getItemVisual(s,"decal");if(a){var l=i.ensureUniqueItemVisual(s,"style");l.decal=h7(a,e)}});var r=i.getVisual("decal");if(r){var o=i.getVisual("style");o.decal=h7(r,e)}}})}var Ys=new Tl,Cee={};function cQe(t,e){Cee[t]=e}function dQe(t){return Cee[t]}var fQe=1,hQe=800,mQe=900,gQe=1e3,pQe=2e3,vQe=5e3,See=1e3,bQe=1100,OL=2e3,kee=3e3,yQe=4e3,QS=4500,wQe=4600,_Qe=5e3,CQe=6e3,Tee=7e3,SQe={PROCESSOR:{FILTER:gQe,SERIES_FILTER:hQe,STATISTIC:vQe},VISUAL:{LAYOUT:See,PROGRESSIVE_LAYOUT:bQe,GLOBAL:OL,CHART:kee,POST_CHART_LAYOUT:wQe,COMPONENT:yQe,BRUSH:_Qe,CHART_ITEM:QS,ARIA:CQe,DECAL:Tee}},qi="__flagInMainProcess",rw="__mainProcessVersion",ar="__pendingUpdate",_x="__needsUpdateStatus",m7=/^[a-zA-Z0-9_]+$/,Cx="__connectUpdateStatus",g7=0,kQe=1,TQe=2;function Eee(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(this.isDisposed()){this.id;return}return Aee(this,t,e)}}function xee(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Aee(this,t,e)}}function Aee(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),Tl.prototype[e].apply(t,n)}var Pee=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(Tl),Iee=Pee.prototype;Iee.on=xee("on");Iee.off=xee("off");var Od,Sx,ow,Dl,sw,kx,Tx,Ah,Ph,p7,v7,Ex,b7,aw,y7,Ree,bs,w7,Ih,Mee=(function(t){yt(e,t);function e(n,i,r){var o=t.call(this,new IZe)||this;o._chartsViews=[],o._chartsMap={},o._componentsViews=[],o._componentsMap={},o._pendingActions=[],r=r||{},o._dom=n;var s="canvas",a="auto",l=!1;o[rw]=1,r.ssr;var u=o._zr=y8(n,{renderer:r.renderer||s,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:Ut(r.useDirtyRect,l),useCoarsePointer:Ut(r.useCoarsePointer,a),pointerSize:r.pointerSize});o._ssr=r.ssr,o._throttledZrFlush=ML(ii(u.flush,u),17),o._updateTheme(i),o._locale=SXe(r.locale||yQ),o._coordSysMgr=new TL;var c=o._api=y7(o);function d(f,h){return f.__prio-h.__prio}return a_(Z1,d),a_(QP,d),o._scheduler=new uee(o,c,QP,Z1),o._messageCenter=new Pee,o._initEvents(),o.resize=ii(o.resize,o),u.animation.on("frame",o._onframe,o),p7(u,o),v7(u,o),rP(o),o}return e.prototype._onframe=function(){if(!this._disposed){w7(this);var n=this._scheduler;if(this[ar]){var i=this[ar].silent;this[qi]=!0,Ih(this);try{Od(this),Dl.update.call(this,null,this[ar].updateParams)}catch(l){throw this[qi]=!1,this[ar]=null,l}this._zr.flush(),this[qi]=!1,this[ar]=null,Ah.call(this,i),Ph.call(this,i)}else if(n.unfinished){var r=fQe,o=this._model,s=this._api;n.unfinished=!1;do{var a=+new Date;n.performSeriesTasks(o),n.performDataProcessorTasks(o),kx(this,o),n.performVisualTasks(o),aw(this,this._model,s,"remain",{}),r-=+new Date-a}while(r>0&&n.unfinished);n.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(n,i,r){if(!this[qi]){if(this._disposed){this.id;return}var o,s,a;if(Rt(i)&&(r=i.lazyUpdate,o=i.silent,s=i.replaceMerge,a=i.transition,i=i.notMerge),this[qi]=!0,Ih(this),!this._model||i){var l=new cJe(this._api),u=this._theme,c=this._model=new AL;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(n,{replaceMerge:s},eI);var d={seriesTransition:a,optionChanged:!0};if(r)this[ar]={silent:o,updateParams:d},this[qi]=!1,this.getZr().wakeUp();else{try{Od(this),Dl.update.call(this,null,d)}catch(f){throw this[ar]=null,this[qi]=!1,f}this._ssr||this._zr.flush(),this[ar]=null,this[qi]=!1,Ah.call(this,o),Ph.call(this,o)}}},e.prototype.setTheme=function(n,i){if(!this[qi]){if(this._disposed){this.id;return}var r=this._model;if(r){var o=i&&i.silent,s=null;this[ar]&&(o==null&&(o=this[ar].silent),s=this[ar].updateParams,this[ar]=null),this[qi]=!0,Ih(this);try{this._updateTheme(n),r.setTheme(this._theme),Od(this),Dl.update.call(this,{type:"setTheme"},s)}catch(a){throw this[qi]=!1,a}this[qi]=!1,Ah.call(this,o),Ph.call(this,o)}}},e.prototype._updateTheme=function(n){At(n)&&(n=Oee[n]),n&&(n=wn(n),n&&zQ(n,!0),this._theme=n)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Kt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(n){return this.renderToCanvas(n)},e.prototype.renderToCanvas=function(n){n=n||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:n.backgroundColor||this._model.get("backgroundColor"),pixelRatio:n.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(n){n=n||{};var i=this._zr.painter;return i.renderToString({useViewBox:n.useViewBox})},e.prototype.getSvgDataURL=function(){var n=this._zr,i=n.storage.getDisplayList();return ue(i,function(r){r.stopAnimation(null,!0)}),n.painter.toDataURL()},e.prototype.getDataURL=function(n){if(this._disposed){this.id;return}n=n||{};var i=n.excludeComponents,r=this._model,o=[],s=this;ue(i,function(l){r.eachComponent({mainType:l},function(u){var c=s._componentsMap[u.__viewId];c.group.ignore||(o.push(c),c.group.ignore=!0)})});var a=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(n).toDataURL("image/"+(n&&n.type||"png"));return ue(o,function(l){l.group.ignore=!1}),a},e.prototype.getConnectedDataURL=function(n){if(this._disposed){this.id;return}var i=n.type==="svg",r=this.group,o=Math.min,s=Math.max,a=1/0;if(_7[r]){var l=a,u=a,c=-a,d=-a,f=[],h=n&&n.pixelRatio||this.getDevicePixelRatio();ue(yv,function(y,_){if(y.group===r){var C=i?y.getZr().painter.getSvgDom().innerHTML:y.renderToCanvas(wn(n)),S=y.getDom().getBoundingClientRect();l=o(S.left,l),u=o(S.top,u),c=s(S.right,c),d=s(S.bottom,d),f.push({dom:C,left:S.left,top:S.top})}}),l*=h,u*=h,c*=h,d*=h;var m=c-l,g=d-u,v=wu.createCanvas(),p=y8(v,{renderer:i?"svg":"canvas"});if(p.resize({width:m,height:g}),i){var b="";return ue(f,function(y){var _=y.left-l,C=y.top-u;b+='<g transform="translate('+_+","+C+')">'+y.dom+"</g>"}),p.painter.getSvgRoot().innerHTML=b,n.connectedBackgroundColor&&p.painter.setBackgroundColor(n.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}else return n.connectedBackgroundColor&&p.add(new Fr({shape:{x:0,y:0,width:m,height:g},style:{fill:n.connectedBackgroundColor}})),ue(f,function(y){var _=new Yc({style:{x:y.left*h-l,y:y.top*h-u,image:y.dom}});p.add(_)}),p.refreshImmediately(),v.toDataURL("image/"+(n&&n.type||"png"))}else return this.getDataURL(n)},e.prototype.convertToPixel=function(n,i,r){return sw(this,"convertToPixel",n,i,r)},e.prototype.convertToLayout=function(n,i,r){return sw(this,"convertToLayout",n,i,r)},e.prototype.convertFromPixel=function(n,i,r){return sw(this,"convertFromPixel",n,i,r)},e.prototype.containPixel=function(n,i){if(this._disposed){this.id;return}var r=this._model,o,s=qE(r,n);return ue(s,function(a,l){l.indexOf("Models")>=0&&ue(a,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)o=o||!!c.containPoint(i);else if(l==="seriesModels"){var d=this._chartsMap[u.__viewId];d&&d.containPoint&&(o=o||d.containPoint(i,u))}},this)},this),!!o},e.prototype.getVisual=function(n,i){var r=this._model,o=qE(r,n,{defaultMainType:"series"}),s=o.seriesModel,a=s.getData(),l=o.hasOwnProperty("dataIndexInside")?o.dataIndexInside:o.hasOwnProperty("dataIndex")?a.indexOfRawIndex(o.dataIndex):null;return l!=null?OZe(a,l,i):LZe(a,i)},e.prototype.getViewOfComponentModel=function(n){return this._componentsMap[n.__viewId]},e.prototype.getViewOfSeriesModel=function(n){return this._chartsMap[n.__viewId]},e.prototype._initEvents=function(){var n=this;ue(EQe,function(r){var o=function(s){var a=n.getModel(),l=s.target,u,c=r==="globalout";if(c?u={}:l&&Ap(l,function(g){var v=si(g);if(v&&v.dataIndex!=null){var p=v.dataModel||a.getSeriesByIndex(v.seriesIndex);return u=p&&p.getDataParams(v.dataIndex,v.dataType,l)||{},!0}else if(v.eventData)return u=lt({},v.eventData),!0},!0),u){var d=u.componentType,f=u.componentIndex;(d==="markLine"||d==="markPoint"||d==="markArea")&&(d="series",f=u.seriesIndex);var h=d&&f!=null&&a.getComponent(d,f),m=h&&n[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=s,u.type=r,n._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:m},n.trigger(r,u)}};o.zrEventfulCallAtLast=!0,n._zr.on(r,o,n)});var i=this._messageCenter;ue(ZP,function(r,o){i.on(o,function(s){n.trigger(o,s)})}),DZe(i,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var n=this.getDom();n&&IZ(this.getDom(),DL,"");var i=this,r=i._api,o=i._model;ue(i._componentsViews,function(s){s.dispose(o,r)}),ue(i._chartsViews,function(s){s.dispose(o,r)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete yv[i.id]},e.prototype.resize=function(n){if(!this[qi]){if(this._disposed){this.id;return}this._zr.resize(n);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var r=i.resetOption("media"),o=n&&n.silent;this[ar]&&(o==null&&(o=this[ar].silent),r=!0,this[ar]=null),this[qi]=!0,Ih(this);try{r&&Od(this),Dl.update.call(this,{type:"resize",animation:lt({duration:0},n&&n.animation)})}catch(s){throw this[qi]=!1,s}this[qi]=!1,Ah.call(this,o),Ph.call(this,o)}}},e.prototype.showLoading=function(n,i){if(this._disposed){this.id;return}if(Rt(n)&&(i=n,n=""),n=n||"default",this.hideLoading(),!!tI[n]){var r=tI[n](this._api,i),o=this._zr;this._loadingFX=r,o.add(r)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(n){var i=lt({},n);return i.type=JP[n.type],i},e.prototype.dispatchAction=function(n,i){if(this._disposed){this.id;return}if(Rt(i)||(i={silent:!!i}),!!J1[n.type]&&this._model){if(this[qi]){this._pendingActions.push(n);return}var r=i.silent;Tx.call(this,n,r);var o=i.flush;o?this._zr.flush():o!==!1&&Kt.browser.weChat&&this._throttledZrFlush(),Ah.call(this,r),Ph.call(this,r)}},e.prototype.updateLabelLayout=function(){Ys.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(n){if(this._disposed){this.id;return}var i=n.seriesIndex,r=this.getModel(),o=r.getSeriesByIndex(i);o.appendData(n),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Od=function(d){var f=d._scheduler;f.restorePipelines(d._model),f.prepareStageTasks(),Sx(d,!0),Sx(d,!1),f.plan()},Sx=function(d,f){for(var h=d._model,m=d._scheduler,g=f?d._componentsViews:d._chartsViews,v=f?d._componentsMap:d._chartsMap,p=d._zr,b=d._api,y=0;y<g.length;y++)g[y].__alive=!1;f?h.eachComponent(function(S,k){S!=="series"&&_(k)}):h.eachSeries(_);function _(S){var k=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,E=!k&&v[T];if(!E){var x=Ya(S.type),P=f?Cu.getClass(x.main,x.sub):ol.getClass(x.sub);E=new P,E.init(h,b),v[T]=E,g.push(E),p.add(E.group)}S.__viewId=E.__id=T,E.__alive=!0,E.__model=S,E.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!f&&m.prepareView(E,S,h,b)}for(var y=0;y<g.length;){var C=g[y];C.__alive?y++:(!f&&C.renderTask.dispose(),p.remove(C.group),C.dispose(h,b),g.splice(y,1),v[C.__id]===C&&delete v[C.__id],C.__id=C.group.__ecComponentInfo=null)}},ow=function(d,f,h,m,g){var v=d._model;if(v.setUpdatePayload(h),!m){ue([].concat(d._componentsViews).concat(d._chartsViews),C);return}var p={};p[m+"Id"]=h[m+"Id"],p[m+"Index"]=h[m+"Index"],p[m+"Name"]=h[m+"Name"];var b={mainType:m,query:p};g&&(b.subType=g);var y=h.excludeSeriesId,_;y!=null&&(_=cn(),ue(io(y),function(S){var k=il(S,null);k!=null&&_.set(k,!0)})),v&&v.eachComponent(b,function(S){var k=_&&_.get(S.id)!=null;if(!k)if(t$(h))if(S instanceof Bc)h.type===df&&!h.notBlur&&!S.get(["emphasis","disabled"])&&nYe(S,h,d._api);else{var T=eL(S.mainType,S.componentIndex,h.name,d._api),E=T.focusSelf,x=T.dispatchers;h.type===df&&E&&!h.notBlur&&MP(S.mainType,S.componentIndex,d._api),x&&ue(x,function(P){h.type===df?$1(P):z1(P)})}else DP(h)&&S instanceof Bc&&(oYe(S,h,d._api),Z8(S),bs(d))},d),v&&v.eachComponent(b,function(S){var k=_&&_.get(S.id)!=null;k||C(d[m==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},d);function C(S){S&&S.__alive&&S[f]&&S[f](S.__model,v,d._api,h)}},Dl={prepareAndUpdate:function(d){Od(this),Dl.update.call(this,d,d&&{optionChanged:d.newOption!=null})},update:function(d,f){var h=this._model,m=this._api,g=this._zr,v=this._coordSysMgr,p=this._scheduler;if(h){h.setUpdatePayload(d),p.restoreData(h,d),p.performSeriesTasks(h),v.create(h,m),p.performDataProcessorTasks(h,d),kx(this,h),v.update(h,m),i(h),p.performVisualTasks(h,d);var b=h.get("backgroundColor")||"transparent";g.setBackgroundColor(b);var y=h.get("darkMode");y!=null&&y!=="auto"&&g.setDarkMode(y),Ex(this,h,m,d,f),Ys.trigger("afterupdate",h,m)}},updateTransform:function(d){var f=this,h=this._model,m=this._api;if(h){h.setUpdatePayload(d);var g=[];h.eachComponent(function(p,b){if(p!=="series"){var y=f.getViewOfComponentModel(b);if(y&&y.__alive)if(y.updateTransform){var _=y.updateTransform(b,h,m,d);_&&_.update&&g.push(y)}else g.push(y)}});var v=cn();h.eachSeries(function(p){var b=f._chartsMap[p.__viewId];if(b.updateTransform){var y=b.updateTransform(p,h,m,d);y&&y.update&&v.set(p.uid,1)}else v.set(p.uid,1)}),i(h),this._scheduler.performVisualTasks(h,d,{setDirty:!0,dirtyMap:v}),aw(this,h,m,d,{},v),Ys.trigger("afterupdate",h,m)}},updateView:function(d){var f=this._model;f&&(f.setUpdatePayload(d),ol.markUpdateMethod(d,"updateView"),i(f),this._scheduler.performVisualTasks(f,d,{setDirty:!0}),Ex(this,f,this._api,d,{}),Ys.trigger("afterupdate",f,this._api))},updateVisual:function(d){var f=this,h=this._model;h&&(h.setUpdatePayload(d),h.eachSeries(function(m){m.getData().clearAllVisual()}),ol.markUpdateMethod(d,"updateVisual"),i(h),this._scheduler.performVisualTasks(h,d,{visualType:"visual",setDirty:!0}),h.eachComponent(function(m,g){if(m!=="series"){var v=f.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,h,f._api,d)}}),h.eachSeries(function(m){var g=f._chartsMap[m.__viewId];g.updateVisual(m,h,f._api,d)}),Ys.trigger("afterupdate",h,this._api))},updateLayout:function(d){Dl.update.call(this,d)}};function n(d,f,h,m,g){if(d._disposed){d.id;return}for(var v=d._model,p=d._coordSysMgr.getCoordinateSystems(),b,y=qE(v,h),_=0;_<p.length;_++){var C=p[_];if(C[f]&&(b=C[f](v,y,m,g))!=null)return b}}sw=n,kx=function(d,f){var h=d._chartsMap,m=d._scheduler;f.eachSeries(function(g){m.updateStreamModes(g,h[g.__viewId])})},Tx=function(d,f){var h=this,m=this.getModel(),g=d.type,v=d.escapeConnect,p=J1[g],b=(p.update||"update").split(":"),y=b.pop(),_=b[0]!=null&&Ya(b[0]);this[qi]=!0,Ih(this);var C=[d],S=!1;d.batch&&(S=!0,C=jt(d.batch,function(z){return z=Xn(lt({},z),d),z.batch=null,z}));var k=[],T,E=[],x=p.nonRefinedEventType,P=DP(d),A=t$(d);if(A&&XZ(this._api),ue(C,function(z){var R=p.action(z,m,h._api);if(p.refineEvent?E.push(R):T=R,T=T||lt({},z),T.type=x,k.push(T),A){var O=KO(d),N=O.queryOptionMap,F=O.mainTypeSpecified,j=F?N.keys()[0]:"series";ow(h,y,z,j),bs(h)}else P?(ow(h,y,z,"series"),bs(h)):_&&ow(h,y,z,_.main,_.sub)}),y!=="none"&&!A&&!P&&!_)try{this[ar]?(Od(this),Dl.update.call(this,d),this[ar]=null):Dl[y].call(this,d)}catch(z){throw this[qi]=!1,z}if(S?T={type:x,escapeConnect:v,batch:k}:T=k[0],this[qi]=!1,!f){var I=void 0;if(p.refineEvent){var D=p.refineEvent(E,d,m,this._api).eventContent;_u(Rt(D)),I=Xn({type:p.refinedEventType},D),I.fromAction=d.type,I.fromActionPayload=d,I.escapeConnect=!0}var q=this._messageCenter;q.trigger(T.type,T),I&&q.trigger(I.type,I)}},Ah=function(d){for(var f=this._pendingActions;f.length;){var h=f.shift();Tx.call(this,h,d)}},Ph=function(d){!d&&this.trigger("updated")},p7=function(d,f){d.on("rendered",function(h){f.trigger("rendered",h),d.animation.isFinished()&&!f[ar]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},v7=function(d,f){d.on("mouseover",function(h){var m=h.target,g=Ap(m,LP);g&&(iYe(g,h,f._api),bs(f))}).on("mouseout",function(h){var m=h.target,g=Ap(m,LP);g&&(rYe(g,h,f._api),bs(f))}).on("click",function(h){var m=h.target,g=Ap(m,function(b){return si(b).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",p=si(g);f._api.dispatchAction({type:v,dataType:p.dataType,dataIndexInside:p.dataIndex,seriesIndex:p.seriesIndex,isFromClick:!0})}})};function i(d){d.clearColorPalette(),d.eachSeries(function(f){f.clearColorPalette()})}function r(d){var f=[],h=[],m=!1;if(d.eachComponent(function(b,y){var _=y.get("zlevel")||0,C=y.get("z")||0,S=y.getZLevelKey();m=m||!!S,(b==="series"?h:f).push({zlevel:_,z:C,idx:y.componentIndex,type:b,key:S})}),m){var g=f.concat(h),v,p;a_(g,function(b,y){return b.zlevel===y.zlevel?b.z-y.z:b.zlevel-y.zlevel}),ue(g,function(b){var y=d.getComponent(b.type,b.idx),_=b.zlevel,C=b.key;v!=null&&(_=Math.max(v,_)),C?(_===v&&C!==p&&_++,p=C):p&&(_===v&&_++,p=""),v=_,y.setZLevel(_)})}}Ex=function(d,f,h,m,g){r(f),b7(d,f,h,m,g),ue(d._chartsViews,function(v){v.__alive=!1}),aw(d,f,h,m,g),ue(d._chartsViews,function(v){v.__alive||v.remove(f,h)})},b7=function(d,f,h,m,g,v){ue(v||d._componentsViews,function(p){var b=p.__model;u(b,p),p.render(b,f,h,m),l(b,p),c(b,p)})},aw=function(d,f,h,m,g,v){var p=d._scheduler;g=lt(g||{},{updatedSeries:f.getSeries()}),Ys.trigger("series:beforeupdate",f,h,g);var b=!1;f.eachSeries(function(y){var _=d._chartsMap[y.__viewId];_.__alive=!0;var C=_.renderTask;p.updatePayload(C,m),u(y,_),v&&v.get(y.uid)&&C.dirty(),C.perform(p.getPerformArgs(C))&&(b=!0),_.group.silent=!!y.get("silent"),a(y,_),Z8(y)}),p.unfinished=b||p.unfinished,Ys.trigger("series:layoutlabels",f,h,g),Ys.trigger("series:transition",f,h,g),f.eachSeries(function(y){var _=d._chartsMap[y.__viewId];l(y,_),c(y,_)}),s(d,f),Ys.trigger("series:afterupdate",f,h,g)},bs=function(d){d[_x]=!0,d.getZr().wakeUp()},Ih=function(d){d[rw]=(d[rw]+1)%1e3},w7=function(d){d[_x]&&(d.getZr().storage.traverse(function(f){gv(f)||o(f)}),d[_x]=!1)};function o(d){for(var f=[],h=d.currentStates,m=0;m<h.length;m++){var g=h[m];g==="emphasis"||g==="blur"||g==="select"||f.push(g)}d.selected&&d.states.select&&f.push("select"),d.hoverState===HS&&d.states.emphasis?f.push("emphasis"):d.hoverState===zS&&d.states.blur&&f.push("blur"),d.useStates(f)}function s(d,f){var h=d._zr,m=h.storage,g=0;m.traverse(function(v){v.isGroup||g++}),g>f.get("hoverLayerThreshold")&&!Kt.node&&!Kt.worker&&f.eachSeries(function(v){if(!v.preventUsingHoverLayer){var p=d._chartsMap[v.__viewId];p.__alive&&p.eachRendered(function(b){b.states.emphasis&&(b.states.emphasis.hoverLayer=!0)})}})}function a(d,f){var h=d.get("blendMode")||null;f.eachRendered(function(m){m.isGroup||(m.style.blend=h)})}function l(d,f){if(!d.preventAutoZ){var h=fQ(d);f.eachRendered(function(m){return hQ(m,h.z,h.zlevel),!0})}}function u(d,f){f.eachRendered(function(h){if(!gv(h)){var m=h.getTextContent(),g=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),m&&m.stateTransition&&(m.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(d,f){var h=d.getModel("stateAnimation"),m=d.isAnimationEnabled(),g=h.get("duration"),v=g>0?{duration:g,delay:h.get("delay"),easing:h.get("easing")}:null;f.eachRendered(function(p){if(p.states&&p.states.emphasis){if(gv(p))return;if(p instanceof Jn&&fYe(p),p.__dirty){var b=p.prevStates;b&&p.useStates(b)}if(m){p.stateTransition=v;var y=p.getTextContent(),_=p.getTextGuideLine();y&&(y.stateTransition=v),_&&(_.stateTransition=v)}p.__dirty&&o(p)}})}y7=function(d){return new((function(f){yt(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return d._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(m){for(;m;){var g=m.__ecComponentInfo;if(g!=null)return d._model.getComponent(g.mainType,g.index);m=m.parent}},h.prototype.enterEmphasis=function(m,g){$1(m,g),bs(d)},h.prototype.leaveEmphasis=function(m,g){z1(m,g),bs(d)},h.prototype.enterBlur=function(m){tYe(m),bs(d)},h.prototype.leaveBlur=function(m){jZ(m),bs(d)},h.prototype.enterSelect=function(m){KZ(m),bs(d)},h.prototype.leaveSelect=function(m){GZ(m),bs(d)},h.prototype.getModel=function(){return d.getModel()},h.prototype.getViewOfComponentModel=function(m){return d.getViewOfComponentModel(m)},h.prototype.getViewOfSeriesModel=function(m){return d.getViewOfSeriesModel(m)},h.prototype.getMainProcessVersion=function(){return d[rw]},h})(FQ))(d)},Ree=function(d){function f(h,m){for(var g=0;g<h.length;g++){var v=h[g];v[Cx]=m}}ue(JP,function(h,m){d._messageCenter.on(m,function(g){if(_7[d.group]&&d[Cx]!==g7){if(g&&g.escapeConnect)return;var v=d.makeActionFromEvent(g),p=[];ue(yv,function(b){b!==d&&b.group===d.group&&p.push(b)}),f(p,g7),ue(p,function(b){b[Cx]!==kQe&&b.dispatchAction(v)}),f(p,TQe)}})})}})(),e})(Tl),LL=Mee.prototype;LL.on=Eee("on");LL.off=Eee("off");LL.one=function(t,e,n){var i=this;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];e&&e.apply&&e.apply(this,o),i.off(t,r)}this.on.call(this,t,r,n)};var EQe=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var J1={},JP={},ZP={},QP=[],eI=[],Z1=[],Oee={},tI={},yv={},_7={},xQe=+new Date-0,DL="_echarts_instance_";function AQe(t,e,n){var i=!(n&&n.ssr);if(i){var r=PQe(t);if(r)return r}var o=new Mee(t,e,n);return o.id="ec_"+xQe++,yv[o.id]=o,i&&IZ(t,DL,o.id),Ree(o),Ys.trigger("afterinit",o),o}function PQe(t){return yv[UKe(t,DL)]}function Lee(t,e){Oee[t]=e}function Dee(t){Dn(eI,t)<0&&eI.push(t)}function Nee(t,e){BL(QP,t,e,pQe)}function IQe(t){NL("afterinit",t)}function RQe(t){NL("afterupdate",t)}function NL(t,e){Ys.on(t,e)}function Tg(t,e,n){var i,r,o,s,a;Xt(e)&&(n=e,e=""),Rt(t)?(i=t.type,r=t.event,s=t.update,a=t.publishNonRefinedEvent,n||(n=t.action),o=t.refineEvent):(i=t,r=e);function l(c){return c.toLowerCase()}r=l(r||i);var u=o?l(i):r;J1[i]||(_u(m7.test(i)&&m7.test(r)),o&&_u(r!==i),J1[i]={actionType:i,refinedEventType:r,nonRefinedEventType:u,update:s,action:n,refineEvent:o},ZP[r]=1,o&&a&&(ZP[u]=1),JP[u]=i)}function MQe(t,e){TL.register(t,e)}function OQe(t,e){BL(Z1,t,e,See,"layout")}function Zf(t,e){BL(Z1,t,e,kee,"visual")}var C7=[];function BL(t,e,n,i,r){if((Xt(e)||Rt(e))&&(n=e,e=i),!(Dn(C7,n)>=0)){C7.push(n);var o=uee.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Bee(t,e){tI[t]=e}function LQe(t,e,n){var i=dQe("registerMap");i&&i(t,e,n)}var DQe=$Je;Zf(OL,pZe);Zf(QS,vZe);Zf(QS,bZe);Zf(OL,RZe);Zf(QS,MZe);Zf(Tee,uQe);Dee(zQ);Nee(mQe,CJe);Bee("default",yZe);Tg({type:df,event:df,update:df},Mo);Tg({type:h_,event:h_,update:h_},Mo);Tg({type:V1,event:ZO,update:V1,action:Mo,refineEvent:VL,publishNonRefinedEvent:!0});Tg({type:IP,event:ZO,update:IP,action:Mo,refineEvent:VL,publishNonRefinedEvent:!0});Tg({type:F1,event:ZO,update:F1,action:Mo,refineEvent:VL,publishNonRefinedEvent:!0});function VL(t,e,n,i){return{eventContent:{selected:sYe(n),isFromClick:e.isFromClick||!1}}}Lee("default",{});Lee("dark",hee);function up(t){return t==null?0:t.length||1}function S7(t){return t}var NQe=(function(){function t(e,n,i,r,o,s){this._old=e,this._new=n,this._oldKeyGetter=i||S7,this._newKeyGetter=r||S7,this.context=o,this._diffModeMultiple=s==="multiple"}return t.prototype.add=function(e){return this._add=e,this},t.prototype.update=function(e){return this._update=e,this},t.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},t.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},t.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},t.prototype.remove=function(e){return this._remove=e,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var e=this._old,n=this._new,i={},r=new Array(e.length),o=new Array(n.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(n,i,o,"_newKeyGetter");for(var s=0;s<e.length;s++){var a=r[s],l=i[a],u=up(l);if(u>1){var c=l.shift();l.length===1&&(i[a]=l[0]),this._update&&this._update(c,s)}else u===1?(i[a]=null,this._update&&this._update(l,s)):this._remove&&this._remove(s)}this._performRestAdd(o,i)},t.prototype._executeMultiple=function(){var e=this._old,n=this._new,i={},r={},o=[],s=[];this._initIndexMap(e,i,o,"_oldKeyGetter"),this._initIndexMap(n,r,s,"_newKeyGetter");for(var a=0;a<o.length;a++){var l=o[a],u=i[l],c=r[l],d=up(u),f=up(c);if(d>1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(d===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(d===1&&f===1)this._update&&this._update(c,u),r[l]=null;else if(d>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),r[l]=null;else if(d>1)for(var h=0;h<d;h++)this._remove&&this._remove(u[h]);else this._remove&&this._remove(u)}this._performRestAdd(s,r)},t.prototype._performRestAdd=function(e,n){for(var i=0;i<e.length;i++){var r=e[i],o=n[r],s=up(o);if(s>1)for(var a=0;a<s;a++)this._add&&this._add(o[a]);else s===1&&this._add&&this._add(o);n[r]=null}},t.prototype._initIndexMap=function(e,n,i,r){for(var o=this._diffModeMultiple,s=0;s<e.length;s++){var a="_ec_"+this[r](e[s],s);if(o||(i[s]=a),!!n){var l=n[a],u=up(l);u===0?(n[a]=s,o&&i.push(a)):u===1?n[a]=[l,s]:l.push(s)}}},t})(),BQe=(function(){function t(e,n){this._encode=e,this._schema=n}return t.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},t.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},t})();function VQe(t,e){var n={},i=n.encode={},r=cn(),o=[],s=[],a={};ue(t.dimensions,function(f){var h=t.getDimensionInfo(f),m=h.coordDim;if(m){var g=h.coordDimIndex;xx(i,m)[g]=f,h.isExtraCoord||(r.set(m,1),$Qe(h.type)&&(o[0]=f),xx(a,m)[g]=t.getDimensionIndex(h.name)),h.defaultTooltip&&s.push(f)}LQ.each(function(v,p){var b=xx(i,p),y=h.otherDims[p];y!=null&&y!==!1&&(b[y]=h.name)})});var l=[],u={};r.each(function(f,h){var m=i[h];u[h]=m[0],l=l.concat(m)}),n.dataDimsOnCoord=l,n.dataDimIndicesOnCoord=jt(l,function(f){return t.getDimensionInfo(f).storeDimIndex}),n.encodeFirstDimNotExtra=u;var c=i.label;c&&c.length&&(o=c.slice());var d=i.tooltip;return d&&d.length?s=d.slice():s.length||(s=o.slice()),i.defaultedLabel=o,i.defaultedTooltip=s,n.userOutput=new BQe(a,e),n}function xx(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function FQe(t){return t==="category"?"ordinal":t==="time"?"time":"float"}function $Qe(t){return!(t==="ordinal"||t==="time")}var y_=(function(){function t(e){this.otherDims={},e!=null&&lt(this,e)}return t})(),zQe=Di(),HQe={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Vee=(function(){function t(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return t.prototype.isDimensionOmitted=function(){return this._dimOmitted},t.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=zee(this.source)))},t.prototype.getSourceDimensionIndex=function(e){return Ut(this._dimNameMap.get(e),-1)},t.prototype.getSourceDimension=function(e){var n=this.source.dimensionsDefine;if(n)return n[e]},t.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,n=WQ(this.source),i=!Hee(e),r="",o=[],s=0,a=0;s<e;s++){var l=void 0,u=void 0,c=void 0,d=this.dimensions[a];if(d&&d.storeDimIndex===s)l=n?d.name:null,u=d.type,c=d.ordinalMeta,a++;else{var f=this.getSourceDimension(s);f&&(l=n?f.name:null,u=f.type)}o.push({property:l,type:u,ordinalMeta:c}),n&&l!=null&&(!d||!d.isCalculationCoord)&&(r+=i?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),r+="$",r+=HQe[u]||"f",c&&(r+=c.uid),r+="$"}var h=this.source,m=[h.seriesLayoutBy,h.startIndex,r].join("$$");return{dimensions:o,hash:m}},t.prototype.makeOutputDimensionNames=function(){for(var e=[],n=0,i=0;n<this._fullDimCount;n++){var r=void 0,o=this.dimensions[i];if(o&&o.storeDimIndex===n)o.isCalculationCoord||(r=o.name),i++;else{var s=this.getSourceDimension(n);s&&(r=s.name)}e.push(r)}return e},t.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},t})();function Fee(t){return t instanceof Vee}function $ee(t){for(var e=cn(),n=0;n<(t||[]).length;n++){var i=t[n],r=Rt(i)?i.name:i;r!=null&&e.get(r)==null&&e.set(r,n)}return e}function zee(t){var e=zQe(t);return e.dimNameMap||(e.dimNameMap=$ee(t.dimensionsDefine))}function Hee(t){return t>30}var cp=Rt,zu=jt,UQe=typeof Int32Array>"u"?Array:Int32Array,WQe="e\0\0",k7=-1,qQe=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],jQe=["_approximateExtent"],T7,lw,dp,fp,Ax,hp,Px,KQe=(function(){function t(e,n){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i,r=!1;Fee(e)?(i=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,i=e),i=i||["x","y"];for(var o={},s=[],a={},l=!1,u={},c=0;c<i.length;c++){var d=i[c],f=At(d)?new y_({name:d}):d instanceof y_?d:new y_(d),h=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=h,f.coordDimIndex=0);var m=f.otherDims=f.otherDims||{};s.push(h),o[h]=f,u[h]!=null&&(l=!0),f.createInvertedIndices&&(a[h]=[]);var g=c;ai(f.storeDimIndex)&&(g=f.storeDimIndex),m.itemName===0&&(this._nameDimIdx=g),m.itemId===0&&(this._idDimIdx=g),r&&(f.storeDimIndex=c)}if(this.dimensions=s,this._dimInfos=o,this._initGetDimensionInfo(l),this.hostModel=n,this._invertedIndicesMap=a,this._dimOmitted){var v=this._dimIdxToName=cn();ue(s,function(p){v.set(o[p].storeDimIndex,p)})}}return t.prototype.getDimension=function(e){var n=this._recognizeDimIndex(e);if(n==null)return e;if(n=e,!this._dimOmitted)return this.dimensions[n];var i=this._dimIdxToName.get(n);if(i!=null)return i;var r=this._schema.getSourceDimension(n);if(r)return r.name},t.prototype.getDimensionIndex=function(e){var n=this._recognizeDimIndex(e);if(n!=null)return n;if(e==null)return-1;var i=this._getDimInfo(e);return i?i.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},t.prototype._recognizeDimIndex=function(e){if(ai(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},t.prototype._getStoreDimIndex=function(e){var n=this.getDimensionIndex(e);return n},t.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},t.prototype._initGetDimensionInfo=function(e){var n=this._dimInfos;this._getDimInfo=e?function(i){return n.hasOwnProperty(i)?n[i]:void 0}:function(i){return n[i]}},t.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},t.prototype.mapDimension=function(e,n){var i=this._dimSummary;if(n==null)return i.encodeFirstDimNotExtra[e];var r=i.encode[e];return r?r[n]:null},t.prototype.mapDimensionsAll=function(e){var n=this._dimSummary,i=n.encode[e];return(i||[]).slice()},t.prototype.getStore=function(){return this._store},t.prototype.initData=function(e,n,i){var r=this,o;if(e instanceof HP&&(o=e),!o){var s=this.dimensions,a=PL(e)||Vo(e)?new qQ(e,s.length):e;o=new HP;var l=zu(s,function(u){return{type:r._dimInfos[u].type,property:u}});o.initData(a,l,i)}this._store=o,this._nameList=(n||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,o.count()),this._dimSummary=VQe(this,this._schema),this.userOutput=this._dimSummary.userOutput},t.prototype.appendData=function(e){var n=this._store.appendData(e);this._doInit(n[0],n[1])},t.prototype.appendValues=function(e,n){var i=this._store.appendValues(e,n&&n.length),r=i.start,o=i.end,s=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),n)for(var a=r;a<o;a++){var l=a-r;this._nameList[a]=n[l],s&&Px(this,a)}},t.prototype._updateOrdinalMeta=function(){for(var e=this._store,n=this.dimensions,i=0;i<n.length;i++){var r=this._dimInfos[n[i]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},t.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Cc&&!e.fillStorage},t.prototype._doInit=function(e,n){if(!(e>=n)){var i=this._store,r=i.getProvider();this._updateOrdinalMeta();var o=this._nameList,s=this._idList,a=r.getSource().sourceFormat,l=a===ms;if(l&&!r.pure)for(var u=[],c=e;c<n;c++){var d=r.getItem(c,u);if(!this.hasItemOption&&MKe(d)&&(this.hasItemOption=!0),d){var f=d.name;o[c]==null&&f!=null&&(o[c]=il(f,null));var h=d.id;s[c]==null&&h!=null&&(s[c]=il(h,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<n;c++)Px(this,c);T7(this)}},t.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.setApproximateExtent=function(e,n){n=this.getDimension(n),this._approximateExtent[n]=e.slice()},t.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},t.prototype.setCalculationInfo=function(e,n){cp(e)?lt(this._calculationInfo,e):this._calculationInfo[e]=n},t.prototype.getName=function(e){var n=this.getRawIndex(e),i=this._nameList[n];return i==null&&this._nameDimIdx!=null&&(i=dp(this,this._nameDimIdx,n)),i==null&&(i=""),i},t.prototype._getCategory=function(e,n){var i=this._store.get(e,n),r=this._store.getOrdinalMeta(e);return r?r.categories[i]:i},t.prototype.getId=function(e){return lw(this,this.getRawIndex(e))},t.prototype.count=function(){return this._store.count()},t.prototype.get=function(e,n){var i=this._store,r=this._dimInfos[e];if(r)return i.get(r.storeDimIndex,n)},t.prototype.getByRawIndex=function(e,n){var i=this._store,r=this._dimInfos[e];if(r)return i.getByRawIndex(r.storeDimIndex,n)},t.prototype.getIndices=function(){return this._store.getIndices()},t.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},t.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},t.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},t.prototype.getValues=function(e,n){var i=this,r=this._store;return bt(e)?r.getValues(zu(e,function(o){return i._getStoreDimIndex(o)}),n):r.getValues(e)},t.prototype.hasValue=function(e){for(var n=this._dimSummary.dataDimIndicesOnCoord,i=0,r=n.length;i<r;i++)if(isNaN(this._store.get(n[i],e)))return!1;return!0},t.prototype.indexOfName=function(e){for(var n=0,i=this._store.count();n<i;n++)if(this.getName(n)===e)return n;return-1},t.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},t.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},t.prototype.rawIndexOf=function(e,n){var i=e&&this._invertedIndicesMap[e],r=i&&i[n];return r==null||isNaN(r)?k7:r},t.prototype.each=function(e,n,i){Xt(e)&&(i=n,n=e,e=[]);var r=i||this,o=zu(fp(e),this._getStoreDimIndex,this);this._store.each(o,r?ii(n,r):n)},t.prototype.filterSelf=function(e,n,i){Xt(e)&&(i=n,n=e,e=[]);var r=i||this,o=zu(fp(e),this._getStoreDimIndex,this);return this._store=this._store.filter(o,r?ii(n,r):n),this},t.prototype.selectRange=function(e){var n=this,i={},r=hi(e);return ue(r,function(o){var s=n._getStoreDimIndex(o);i[s]=e[o]}),this._store=this._store.selectRange(i),this},t.prototype.mapArray=function(e,n,i){Xt(e)&&(i=n,n=e,e=[]),i=i||this;var r=[];return this.each(e,function(){r.push(n&&n.apply(this,arguments))},i),r},t.prototype.map=function(e,n,i,r){var o=i||r||this,s=zu(fp(e),this._getStoreDimIndex,this),a=hp(this);return a._store=this._store.map(s,o?ii(n,o):n),a},t.prototype.modify=function(e,n,i,r){var o=i||r||this,s=zu(fp(e),this._getStoreDimIndex,this);this._store.modify(s,o?ii(n,o):n)},t.prototype.downSample=function(e,n,i,r){var o=hp(this);return o._store=this._store.downSample(this._getStoreDimIndex(e),n,i,r),o},t.prototype.minmaxDownSample=function(e,n){var i=hp(this);return i._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),n),i},t.prototype.lttbDownSample=function(e,n){var i=hp(this);return i._store=this._store.lttbDownSample(this._getStoreDimIndex(e),n),i},t.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},t.prototype.getItemModel=function(e){var n=this.hostModel,i=this.getRawDataItem(e);return new Ii(i,n,n&&n.ecModel)},t.prototype.diff=function(e){var n=this;return new NQe(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(i){return lw(e,i)},function(i){return lw(n,i)})},t.prototype.getVisual=function(e){var n=this._visual;return n&&n[e]},t.prototype.setVisual=function(e,n){this._visual=this._visual||{},cp(e)?lt(this._visual,e):this._visual[e]=n},t.prototype.getItemVisual=function(e,n){var i=this._itemVisuals[e],r=i&&i[n];return r??this.getVisual(n)},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(e,n){var i=this._itemVisuals,r=i[e];r||(r=i[e]={});var o=r[n];return o==null&&(o=this.getVisual(n),bt(o)?o=o.slice():cp(o)&&(o=lt({},o)),r[n]=o),o},t.prototype.setItemVisual=function(e,n,i){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,cp(n)?lt(r,n):r[n]=i},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(e,n){cp(e)?lt(this._layout,e):this._layout[e]=n},t.prototype.getLayout=function(e){return this._layout[e]},t.prototype.getItemLayout=function(e){return this._itemLayouts[e]},t.prototype.setItemLayout=function(e,n,i){this._itemLayouts[e]=i?lt(this._itemLayouts[e]||{},n):n},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(e,n){var i=this.hostModel&&this.hostModel.seriesIndex;qGe(i,this.dataType,e,n),this._graphicEls[e]=n},t.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},t.prototype.eachItemGraphicEl=function(e,n){ue(this._graphicEls,function(i,r){i&&e&&e.call(n,i,r)})},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:zu(this.dimensions,this._getDimInfo,this),this.hostModel)),Ax(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(e,n){var i=this[e];Xt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var r=i.apply(this,arguments);return n.apply(this,[r].concat(FO(arguments)))})},t.internalField=(function(){T7=function(e){var n=e._invertedIndicesMap;ue(n,function(i,r){var o=e._dimInfos[r],s=o.ordinalMeta,a=e._store;if(s){i=n[r]=new UQe(s.categories.length);for(var l=0;l<i.length;l++)i[l]=k7;for(var l=0;l<a.count();l++)i[a.get(o.storeDimIndex,l)]=l}})},dp=function(e,n,i){return il(e._getCategory(n,i),null)},lw=function(e,n){var i=e._idList[n];return i==null&&e._idDimIdx!=null&&(i=dp(e,e._idDimIdx,n)),i==null&&(i=WQe+n),i},fp=function(e){return bt(e)||(e=e!=null?[e]:[]),e},hp=function(e){var n=new t(e._schema?e._schema:zu(e.dimensions,e._getDimInfo,e),e.hostModel);return Ax(n,e),n},Ax=function(e,n){ue(qQe.concat(n.__wrappedMethods||[]),function(i){n.hasOwnProperty(i)&&(e[i]=n[i])}),e.__wrappedMethods=n.__wrappedMethods,ue(jQe,function(i){e[i]=wn(n[i])}),e._calculationInfo=lt({},n._calculationInfo)},Px=function(e,n){var i=e._nameList,r=e._idList,o=e._nameDimIdx,s=e._idDimIdx,a=i[n],l=r[n];if(a==null&&o!=null&&(i[n]=a=dp(e,o,n)),l==null&&s!=null&&(r[n]=l=dp(e,s,n)),l==null&&a!=null){var u=e._nameRepeatCount,c=u[a]=(u[a]||0)+1;l=a,c>1&&(l+="__ec__"+c),r[n]=l}}})(),t})();function GQe(t,e){PL(t)||(t=HQ(t)),e=e||{};var n=e.coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=cn(),o=[],s=XQe(t,n,i,e.dimensionsCount),a=e.canOmitUnusedDimensions&&Hee(s),l=i===t.dimensionsDefine,u=l?zee(t):$ee(i),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(t,s));for(var d=cn(c),f=new XQ(s),h=0;h<f.length;h++)f[h]=-1;function m(E){var x=f[E];if(x<0){var P=i[E],A=Rt(P)?P:{name:P},I=new y_,D=A.name;D!=null&&u.get(D)!=null&&(I.name=I.displayName=D),A.type!=null&&(I.type=A.type),A.displayName!=null&&(I.displayName=A.displayName);var q=o.length;return f[E]=q,I.storeDimIndex=E,o.push(I),I}return o[x]}if(!a)for(var h=0;h<s;h++)m(h);d.each(function(E,x){var P=io(E).slice();if(P.length===1&&!At(P[0])&&P[0]<0){d.set(x,!1);return}var A=d.set(x,[]);ue(P,function(I,D){var q=At(I)?u.get(I):I;q!=null&&q<s&&(A[D]=q,v(m(q),x,D))})});var g=0;ue(n,function(E){var x,P,A,I;if(At(E))x=E,I={};else{I=E,x=I.name;var D=I.ordinalMeta;I.ordinalMeta=null,I=lt({},I),I.ordinalMeta=D,P=I.dimsDef,A=I.otherDims,I.name=I.coordDim=I.coordDimIndex=I.dimsDef=I.otherDims=null}var q=d.get(x);if(q!==!1){if(q=io(q),!q.length)for(var z=0;z<(P&&P.length||1);z++){for(;g<s&&m(g).coordDim!=null;)g++;g<s&&q.push(g++)}ue(q,function(R,O){var N=m(R);if(l&&I.type!=null&&(N.type=I.type),v(Xn(N,I),x,O),N.name==null&&P){var F=P[O];!Rt(F)&&(F={name:F}),N.name=N.displayName=F.name,N.defaultTooltip=F.defaultTooltip}A&&Xn(N.otherDims,A)})}});function v(E,x,P){LQ.get(x)!=null?E.otherDims[x]=P:(E.coordDim=x,E.coordDimIndex=P,r.set(x,!0))}var p=e.generateCoord,b=e.generateCoordCount,y=b!=null;b=p?b||1:0;var _=p||"value";function C(E){E.name==null&&(E.name=E.coordDim)}if(a)ue(o,function(E){C(E)}),o.sort(function(E,x){return E.storeDimIndex-x.storeDimIndex});else for(var S=0;S<s;S++){var k=m(S),T=k.coordDim;T==null&&(k.coordDim=JQe(_,r,y),k.coordDimIndex=0,(!p||b<=0)&&(k.isExtraCoord=!0),b--),C(k),k.type==null&&(VQ(t,S)===jo.Must||k.isExtraCoord&&(k.otherDims.itemName!=null||k.otherDims.seriesName!=null))&&(k.type="ordinal")}return YQe(o),new Vee({source:t,dimensions:o,fullDimensionCount:s,dimensionOmitted:a})}function YQe(t){for(var e=cn(),n=0;n<t.length;n++){var i=t[n],r=i.name,o=e.get(r)||0;o>0&&(i.name=r+(o-1)),o++,e.set(r,o)}}function XQe(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return ue(e,function(o){var s;Rt(o)&&(s=o.dimsDef)&&(r=Math.max(r,s.length))}),r}function JQe(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var ZQe=(function(){function t(e){this.coordSysDims=[],this.axisMap=cn(),this.categoryAxisMap=cn(),this.coordSysName=e}return t})();function QQe(t){var e=t.get("coordinateSystem"),n=new ZQe(e),i=eet[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}var eet={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",As).models[0],o=t.getReferringComponents("yAxis",As).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),Rh(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),Rh(o)&&(i.set("y",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",As).models[0];e.coordSysDims=["single"],n.set("single",r),Rh(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",As).models[0],o=r.findAxisModel("radiusAxis"),s=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",s),Rh(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),Rh(s)&&(i.set("angle",s),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),s=e.coordSysDims=o.dimensions.slice();ue(o.parallelAxisIndex,function(a,l){var u=r.getComponent("parallelAxis",a),c=s[l];n.set(c,u),Rh(u)&&(i.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(t,e,n,i){var r=t.getReferringComponents("matrix",As).models[0];e.coordSysDims=["x","y"];var o=r.getDimensionModel("x"),s=r.getDimensionModel("y");n.set("x",o),n.set("y",s),i.set("x",o),i.set("y",s)}};function Rh(t){return t.get("type")==="category"}function tet(t,e,n){n=n||{};var i=n.byIndex,r=n.stackedCoordDimension,o,s,a;net(e)?o=e:(s=e.schema,o=s.dimensions,a=e.store);var l=!!(t&&t.get("stack")),u,c,d,f;if(ue(o,function(b,y){At(b)&&(o[y]=b={name:b}),l&&!b.isExtraCoord&&(!i&&!u&&b.ordinalMeta&&(u=b),!c&&b.type!=="ordinal"&&b.type!=="time"&&(!r||r===b.coordDim)&&(c=b))}),c&&!i&&!u&&(i=!0),c){d="__\0ecstackresult_"+t.id,f="__\0ecstackedover_"+t.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,m=c.type,g=0;ue(o,function(b){b.coordDim===h&&g++});var v={name:d,coordDim:h,coordDimIndex:g,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length},p={name:f,coordDim:f,coordDimIndex:g+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:o.length+1};s?(a&&(v.storeDimIndex=a.ensureCalculationDimension(f,m),p.storeDimIndex=a.ensureCalculationDimension(d,m)),s.appendCalculationDimension(v),s.appendCalculationDimension(p)):(o.push(v),o.push(p))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:f,stackResultDimension:d}}function net(t){return!Fee(t.schema)}function Ob(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function iet(t,e){return Ob(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ret(t,e){var n=t.get("coordinateSystem"),i=TL.get(n),r;return e&&e.coordSysDims&&(r=jt(e.coordSysDims,function(o){var s={name:o},a=e.axisMap.get(o);if(a){var l=a.get("type");s.type=FQe(l)}return s})),r||(r=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),r}function oet(t,e,n){var i,r;return n&&ue(t,function(o,s){var a=o.coordDim,l=n.categoryAxisMap.get(a);l&&(i==null&&(i=s),o.ordinalMeta=l.getOrdinalMeta(),e&&(o.createInvertedIndices=!0)),o.otherDims.itemName!=null&&(r=!0)}),!r&&i!=null&&(t[i].otherDims.itemName=0),i}function set(t,e,n){n=n||{};var i=e.getSourceManager(),r,o=!1;r=i.getSource(),o=r.sourceFormat===ms;var s=QQe(e),a=ret(e,s),l=n.useEncodeDefaulter,u=Xt(l)?l:l?Ls(JXe,a,e):null,c={coordDimensions:a,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o},d=GQe(r,c),f=oet(d.dimensions,n.createInvertedIndices,s),h=o?null:i.getSharedDataStore(d),m=tet(e,{schema:d,store:h}),g=new KQe(d,e);g.setCalculationInfo(m);var v=f!=null&&aet(r)?function(p,b,y,_){return _===f?y:this.defaultDimValueGetter(p,b,y,_)}:null;return g.hasItemOption=!1,g.initData(o?r:h,null,v),g}function aet(t){if(t.sourceFormat===ms){var e=uet(t.data||[]);return!bt(w0(e))}}function uet(t){for(var e=0;e<t.length&&t[e]==null;)e++;return t[e]}function nI(t){return t.type==="interval"||t.type==="log"}function cet(t,e,n,i,r){var o={},s=o.interval=SZ(e/n);i!=null&&s<i&&(s=o.interval=i),r!=null&&s>r&&(s=o.interval=r);var a=o.intervalPrecision=Lb(s),l=o.niceTickExtent=[_r(Math.ceil(t[0]/s)*s,a),_r(Math.floor(t[1]/s)*s,a)];return det(l,t),o}function Ix(t){var e=Math.pow(10,jO(t)),n=t/e;return n?n===2?n=3:n===3?n=5:n*=2:n=1,_r(n*e)}function Lb(t){return nu(t)+2}function E7(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function det(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),E7(t,0,e),E7(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function FL(t,e){return t>=e[0]&&t<=e[1]}var fet=(function(){function t(){this.normalize=x7,this.scale=A7}return t.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=ii(e.normalize,e),this.scale=ii(e.scale,e)):(this.normalize=x7,this.scale=A7)},t})();function x7(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function A7(t,e){return t*(e[1]-e[0])+e[0]}function iI(t,e,n){var i=Math.log(t);return[Math.log(n?e[0]:Math.max(0,e[0]))/i,Math.log(n?e[1]:Math.max(0,e[1]))/i]}var Xc=(function(){function t(e){this._calculator=new fet,this._setting=e||{},this._extent=[1/0,-1/0]}return t.prototype.getSetting=function(e){return this._setting[e]},t.prototype._innerUnionExtent=function(e){var n=this._extent;this._innerSetExtent(e[0]<n[0]?e[0]:n[0],e[1]>n[1]?e[1]:n[1])},t.prototype.unionExtentFromData=function(e,n){this._innerUnionExtent(e.getApproximateExtent(n))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(e,n){this._innerSetExtent(e,n)},t.prototype._innerSetExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(n)||(i[1]=n),this._brkCtx&&this._brkCtx.update(i)},t.prototype.setBreaksFromOption=function(e){},t.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},t.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},t.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},t.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},t.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(e){this._isBlank=e},t})();VS(Xc);var het=0,rI=(function(){function t(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++het,this._onCollect=e.onCollect}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&jt(i,met);return new t({categories:r,needCollect:!r,deduplication:n.dedplication!==!1})},t.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},t.prototype.parseAndCollect=function(e){var n,i=this._needCollect;if(!At(e)&&!i)return e;if(i&&!this._deduplication)return n=this.categories.length,this.categories[n]=e,this._onCollect&&this._onCollect(e,n),n;var r=this._getOrCreateMap();return n=r.get(e),n==null&&(i?(n=this.categories.length,this.categories[n]=e,r.set(e,n),this._onCollect&&this._onCollect(e,n)):n=NaN),n},t.prototype._getOrCreateMap=function(){return this._map||(this._map=cn(this.categories))},t})();function met(t){return Rt(t)&&t.value!=null?t.value:t+""}var Uee=(function(t){yt(e,t);function e(n){var i=t.call(this,n)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new rI({})),bt(r)&&(r=new rI({categories:jt(r,function(o){return Rt(o)?o.value:o})})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return e.prototype.parse=function(n){return n==null?NaN:At(n)?this._ordinalMeta.getOrdinal(n):Math.round(n)},e.prototype.contain=function(n){return FL(n,this._extent)&&n>=0&&n<this._ordinalMeta.categories.length},e.prototype.normalize=function(n){return n=this._getTickNumber(n),this._calculator.normalize(n,this._extent)},e.prototype.scale=function(n){return n=Math.round(this._calculator.scale(n,this._extent)),this.getRawOrdinalNumber(n)},e.prototype.getTicks=function(){for(var n=[],i=this._extent,r=i[0];r<=i[1];)n.push({value:r}),r++;return n},e.prototype.getMinorTicks=function(n){},e.prototype.setSortInfo=function(n){if(n==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var i=n.ordinalNumbers,r=this._ordinalNumbersByTick=[],o=this._ticksByOrdinalNumber=[],s=0,a=this._ordinalMeta.categories.length,l=Math.min(a,i.length);s<l;++s){var u=i[s];r[s]=u,o[u]=s}for(var c=0;s<a;++s){for(;o[c]!=null;)c++;r.push(c),o[c]=s}},e.prototype._getTickNumber=function(n){var i=this._ticksByOrdinalNumber;return i&&n>=0&&n<i.length?i[n]:n},e.prototype.getRawOrdinalNumber=function(n){var i=this._ordinalNumbersByTick;return i&&n>=0&&n<i.length?i[n]:n},e.prototype.getLabel=function(n){if(!this.isBlank()){var i=this.getRawOrdinalNumber(n.value),r=this._ordinalMeta.categories[i];return r==null?"":r+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.isInExtentRange=function(n){return n=this._getTickNumber(n),this._extent[0]<=n&&this._extent[1]>=n},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(Xc);Xc.registerClass(Uee);var Hu=_r,rg=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="interval",n._interval=0,n._intervalPrecision=2,n}return e.prototype.parse=function(n){return n==null||n===""?NaN:Number(n)},e.prototype.contain=function(n){return FL(n,this._extent)},e.prototype.normalize=function(n){return this._calculator.normalize(n,this._extent)},e.prototype.scale=function(n){return this._calculator.scale(n,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(n){this._interval=n,this._niceExtent=this._extent.slice(),this._intervalPrecision=Lb(n)},e.prototype.getTicks=function(n){n=n||{};var i=this._interval,r=this._extent,o=this._niceExtent,s=this._intervalPrecision,a=q1(),l=[];if(!i)return l;n.breakTicks;var u=1e4;r[0]<o[0]&&(n.expandToNicedExtent?l.push({value:Hu(o[0]-i,s)}):l.push({value:r[0]}));for(var c=function(m,g){return Math.round((g-m)/i)},d=o[0];d<=o[1];){if(l.push({value:d}),d=Hu(d+i,s),this._brkCtx){var f=this._brkCtx.calcNiceTickMultiple(d,c);f>=0&&(d=Hu(d+f*i,s))}if(l.length>0&&d===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:o[1];return r[1]>h&&(n.expandToNicedExtent?l.push({value:Hu(h+i,s)}):l.push({value:r[1]})),n.breakTicks,l},e.prototype.getMinorTicks=function(n){for(var i=this.getTicks({expandToNicedExtent:!0}),r=[],o=this.getExtent(),s=1;s<i.length;s++){var a=i[s],l=i[s-1];if(!(l.break||a.break)){for(var u=0,c=[],d=a.value-l.value,f=d/n,h=Lb(f);u<n-1;){var m=Hu(l.value+(u+1)*f,h);m>o[0]&&m<o[1]&&c.push(m),u++}var g=q1();g&&g.pruneTicksByBreak("auto",c,this._getNonTransBreaks(),function(v){return v},this._interval,o),r.push(c)}}return r},e.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.getLabel=function(n,i){if(n==null)return"";var r=i&&i.precision;r==null?r=nu(n.value)||0:r==="auto"&&(r=this._intervalPrecision);var o=Hu(n.value,r,!0);return AQ(o)},e.prototype.calcNiceTicks=function(n,i,r){n=n||5;var o=this._extent.slice(),s=this._getExtentSpanWithBreaks();if(isFinite(s)){s<0&&(s=-s,o.reverse(),this._innerSetExtent(o[0],o[1]),o=this._extent.slice());var a=cet(o,s,n,i,r);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},e.prototype.calcNiceExtent=function(n){var i=this._extent.slice();if(i[0]===i[1])if(i[0]!==0){var r=Math.abs(i[0]);n.fixMax||(i[1]+=r/2),i[0]-=r/2}else i[1]=1;var o=i[1]-i[0];isFinite(o)||(i[0]=0,i[1]=1),this._innerSetExtent(i[0],i[1]),i=this._extent.slice(),this.calcNiceTicks(n.splitNumber,n.minInterval,n.maxInterval);var s=this._interval,a=this._intervalPrecision;n.fixMin||(i[0]=Hu(Math.floor(i[0]/s)*s,a)),n.fixMax||(i[1]=Hu(Math.ceil(i[1]/s)*s,a)),this._innerSetExtent(i[0],i[1])},e.prototype.setNiceExtent=function(n,i){this._niceExtent=[n,i]},e.type="interval",e})(Xc);Xc.registerClass(rg);var Wee=typeof Float32Array<"u",get=Wee?Float32Array:Array;function tm(t){return bt(t)?Wee?new Float32Array(t):t:new get(t)}var pet="__ec_stack_";function vet(t){return t.get("stack")||pet+t.seriesIndex}function qee(t){return t.dim+t.index}function bet(t,e){var n=[];return e.eachSeriesByType(t,function(i){ket(i)&&n.push(i)}),n}function yet(t){var e={};ue(t,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var d=l.getData(),f=c.dim+"_"+c.index,h=d.getDimensionIndex(d.mapDimension(c.dim)),m=d.getStore(),g=0,v=m.count();g<v;++g){var p=m.get(h,g);e[f]?e[f].push(p):e[f]=[p]}});var n={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(r){r.sort(function(l,u){return l-u});for(var o=null,s=1;s<r.length;++s){var a=r[s]-r[s-1];a>0&&(o=o===null?a:Math.min(o,a))}n[i]=o}}return n}function wet(t){var e=yet(t),n=[];return ue(t,function(i){var r=i.coordinateSystem,o=r.getBaseAxis(),s=o.getExtent(),a;if(o.type==="category")a=o.getBandWidth();else if(o.type==="value"||o.type==="time"){var l=o.dim+"_"+o.index,u=e[l],c=Math.abs(s[1]-s[0]),d=o.scale.getExtent(),f=Math.abs(d[1]-d[0]);a=u?c/f*u:c}else{var h=i.getData();a=Math.abs(s[1]-s[0])/h.count()}var m=eo(i.get("barWidth"),a),g=eo(i.get("barMaxWidth"),a),v=eo(i.get("barMinWidth")||(Tet(i)?.5:1),a),p=i.get("barGap"),b=i.get("barCategoryGap"),y=i.get("defaultBarGap");n.push({bandWidth:a,barWidth:m,barMaxWidth:g,barMinWidth:v,barGap:p,barCategoryGap:b,defaultBarGap:y,axisKey:qee(o),stackId:vet(i)})}),_et(n)}function _et(t){var e={};ue(t,function(i,r){var o=i.axisKey,s=i.bandWidth,a=e[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:null,gap:i.defaultBarGap||0,stacks:{}},l=a.stacks;e[o]=a;var u=i.stackId;l[u]||a.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=i.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(a.remainedWidth,c),a.remainedWidth-=c);var d=i.barMaxWidth;d&&(l[u].maxWidth=d);var f=i.barMinWidth;f&&(l[u].minWidth=f);var h=i.barGap;h!=null&&(a.gap=h);var m=i.barCategoryGap;m!=null&&(a.categoryGap=m)});var n={};return ue(e,function(i,r){n[r]={};var o=i.stacks,s=i.bandWidth,a=i.categoryGap;if(a==null){var l=hi(o).length;a=Math.max(35-l*4,15)+"%"}var u=eo(a,s),c=eo(i.gap,1),d=i.remainedWidth,f=i.autoWidthCount,h=(d-u)/(f+(f-1)*c);h=Math.max(h,0),ue(o,function(p){var b=p.maxWidth,y=p.minWidth;if(p.width){var _=p.width;b&&(_=Math.min(_,b)),y&&(_=Math.max(_,y)),p.width=_,d-=_+c*_,f--}else{var _=h;b&&b<_&&(_=Math.min(b,d)),y&&y>_&&(_=y),_!==h&&(p.width=_,d-=_+c*_,f--)}}),h=(d-u)/(f+(f-1)*c),h=Math.max(h,0);var m=0,g;ue(o,function(p,b){p.width||(p.width=h),g=p,m+=p.width*(1+c)}),g&&(m-=g.width*c);var v=-m/2;ue(o,function(p,b){n[r][b]=n[r][b]||{bandWidth:s,offset:v,width:p.width},v+=p.width*(1+c)})}),n}function Cet(t,e,n){if(t&&e){var i=t[qee(e)];return i}}function ket(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function Tet(t){return t.pipelineContext&&t.pipelineContext.large}var Eet=function(t,e,n,i){for(;n<i;){var r=n+i>>>1;t[r][1]<e?n=r+1:i=r}return n},jee=(function(t){yt(e,t);function e(n){var i=t.call(this,n)||this;return i.type="time",i}return e.prototype.getLabel=function(n){var i=this.getSetting("useUTC");return YS(n.value,b$[OXe(vv(this._minLevelUnit))]||b$.second,i,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(n,i,r){var o=this.getSetting("useUTC"),s=this.getSetting("locale");return LXe(n,i,r,s,o)},e.prototype.getTicks=function(n){var i=this._interval,r=this._extent,o=[];if(!i)return o;var s=this.getSetting("useUTC"),a=j1(r[1],s);o.push({value:r[0],time:{level:0,upperTimeUnit:a,lowerTimeUnit:a}});var l=Let(this._minLevelUnit,this._approxInterval,s,r,this._getExtentSpanWithBreaks(),this._brkCtx);o=o.concat(l);var u=j1(r[1],s);o.push({value:r[1],time:{level:0,upperTimeUnit:u,lowerTimeUnit:u}}),this.getSetting("useUTC");var c=ff.length-1,d=0;return ue(o,function(f){c=Math.min(c,Dn(ff,f.time.upperTimeUnit)),d=Math.max(d,f.time.level)}),o},e.prototype.calcNiceExtent=function(n){var i=this.getExtent();if(i[0]===i[1]&&(i[0]-=Ps,i[1]+=Ps),i[1]===-1/0&&i[0]===1/0){var r=new Date;i[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),i[0]=i[1]-Ps}this._innerSetExtent(i[0],i[1]),this.calcNiceTicks(n.splitNumber,n.minInterval,n.maxInterval)},e.prototype.calcNiceTicks=function(n,i,r){n=n||10;var o=this._getExtentSpanWithBreaks();this._approxInterval=o/n,i!=null&&this._approxInterval<i&&(this._approxInterval=i),r!=null&&this._approxInterval>r&&(this._approxInterval=r);var s=uw.length,a=Math.min(Eet(uw,this._approxInterval,0,s),s-1);this._interval=uw[a][1],this._intervalPrecision=Lb(this._interval),this._minLevelUnit=uw[Math.max(a-1,0)][0]},e.prototype.parse=function(n){return ai(n)?n:+kg(n)},e.prototype.contain=function(n){return FL(n,this._extent)},e.prototype.normalize=function(n){return this._calculator.normalize(n,this._extent)},e.prototype.scale=function(n){return this._calculator.scale(n,this._extent)},e.type="time",e})(rg),uw=[["second",pL],["minute",vL],["hour",pv],["quarter-day",pv*6],["half-day",pv*12],["day",Ps*1.2],["half-week",Ps*3.5],["week",Ps*7],["month",Ps*31],["quarter",Ps*95],["half-year",v$/2],["year",v$]];function xet(t,e,n,i){return FP(new Date(e),t,i).getTime()===FP(new Date(n),t,i).getTime()}function Aet(t,e){return t/=Ps,t>16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Pet(t){var e=30*Ps;return t/=e,t>6?6:t>3?3:t>2?2:1}function Iet(t){return t/=pv,t>12?12:t>6?6:t>3.5?4:t>2?2:1}function P7(t,e){return t/=e?vL:pL,t>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Ret(t){return SZ(t)}function Met(t,e,n){var i=Math.max(0,Dn(ff,e)-1);return FP(new Date(t),ff[i],n).getTime()}function Oet(t,e){var n=new Date(0);n[t](1);var i=n.getTime();n[t](1+e);var r=n.getTime()-i;return function(o,s){return Math.max(0,Math.round((s-o)/r))}}function Let(t,e,n,i,r,o){var s=1e4,a=PXe,l=0;function u(I,D,q,z,R,O,N){for(var F=Oet(R,I),j=D,U=new Date(j);j<q&&j<=i[1]&&(N.push({value:j}),!(l++>s));)if(U[R](U[z]()+I),j=U.getTime(),o){var W=o.calcNiceTickMultiple(j,F);W>0&&(U[R](U[z]()+W*I),j=U.getTime())}N.push({value:j,notAdd:!0})}function c(I,D,q){var z=[],R=!D.length;if(!xet(vv(I),i[0],i[1],n)){R&&(D=[{value:Met(i[0],I,n)},{value:i[1]}]);for(var O=0;O<D.length-1;O++){var N=D[O].value,F=D[O+1].value;if(N!==F){var j=void 0,U=void 0,W=void 0,J=!1;switch(I){case"year":j=Math.max(1,Math.round(e/Ps/365)),U=_Q(n),W=DXe(n);break;case"half-year":case"quarter":case"month":j=Pet(e),U=bL(n),W=CQ(n);break;case"week":case"half-week":case"day":j=Aet(e),U=yL(n),W=SQ(n),J=!0;break;case"half-day":case"quarter-day":case"hour":j=Iet(e),U=wL(n),W=kQ(n);break;case"minute":j=P7(e,!0),U=_L(n),W=TQ(n);break;case"second":j=P7(e,!1),U=CL(n),W=EQ(n);break;case"millisecond":j=Ret(e),U=SL(n),W=xQ(n);break}F>=i[0]&&N<=i[1]&&u(j,N,F,U,W,J,z),I==="year"&&q.length>1&&O===0&&q.unshift({value:q[0].value-j})}}for(var O=0;O<z.length;O++)q.push(z[O])}}for(var d=[],f=[],h=0,m=0,g=0;g<a.length;++g){var v=vv(a[g]);if(MXe(a[g])){c(a[g],d[d.length-1]||[],f);var p=a[g+1]?vv(a[g+1]):null;if(v!==p){if(f.length){m=h,f.sort(function(I,D){return I.value-D.value});for(var b=[],y=0;y<f.length;++y){var _=f[y].value;(y===0||f[y-1].value!==_)&&(b.push(f[y]),_>=i[0]&&_<=i[1]&&h++)}var C=r/e;if(h>C*1.5&&m>C/1.5||(d.push(b),h>C||t===a[g]))break}f=[]}}}for(var S=gr(jt(d,function(I){return gr(I,function(D){return D.value>=i[0]&&D.value<=i[1]&&!D.notAdd})}),function(I){return I.length>0}),k=[],T=S.length-1,g=0;g<S.length;++g)for(var E=S[g],x=0;x<E.length;++x){var P=j1(E[x].value,n);k.push({value:E[x].value,time:{level:T-g,upperTimeUnit:P,lowerTimeUnit:P}})}k.sort(function(I,D){return I.value-D.value});for(var A=[],g=0;g<k.length;++g)(g===0||k[g].value!==k[g-1].value)&&A.push(k[g]);return A}Xc.registerClass(jee);var oI=_r,Det=Math.floor,Net=Math.ceil,cw=Math.pow,dw=Math.log,Kee=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="log",n.base=10,n._originalScale=new rg,n}return e.prototype.getTicks=function(n){n=n||{};var i=this._extent.slice(),r=this._originalScale.getExtent(),o=t.prototype.getTicks.call(this,n),s=this.base;return this._originalScale._innerGetBreaks(),jt(o,function(a){var l=a.value,u=null,c=cw(s,l);l===i[0]&&this._fixMin?u=r[0]:l===i[1]&&this._fixMax&&(u=r[1]);var d;return u!=null&&(c=Rx(c,u)),{value:c,break:d}},this)},e.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},e.prototype.setExtent=function(n,i){this._originalScale.setExtent(n,i);var r=iI(this.base,[n,i]);t.prototype.setExtent.call(this,r[0],r[1])},e.prototype.getExtent=function(){var n=this.base,i=t.prototype.getExtent.call(this);i[0]=cw(n,i[0]),i[1]=cw(n,i[1]);var r=this._originalScale.getExtent();return this._fixMin&&(i[0]=Rx(i[0],r[0])),this._fixMax&&(i[1]=Rx(i[1],r[1])),i},e.prototype.unionExtentFromData=function(n,i){this._originalScale.unionExtentFromData(n,i);var r=iI(this.base,n.getApproximateExtent(i),!0);this._innerUnionExtent(r)},e.prototype.calcNiceTicks=function(n){n=n||10;var i=this._extent.slice(),r=this._getExtentSpanWithBreaks();if(!(!isFinite(r)||r<=0)){var o=EKe(r),s=n/r*o;for(s<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var a=[oI(Net(i[0]/o)*o),oI(Det(i[1]/o)*o)];this._interval=o,this._intervalPrecision=Lb(o),this._niceExtent=a}},e.prototype.calcNiceExtent=function(n){t.prototype.calcNiceExtent.call(this,n),this._fixMin=n.fixMin,this._fixMax=n.fixMax},e.prototype.contain=function(n){return n=dw(n)/dw(this.base),t.prototype.contain.call(this,n)},e.prototype.normalize=function(n){return n=dw(n)/dw(this.base),t.prototype.normalize.call(this,n)},e.prototype.scale=function(n){return n=t.prototype.scale.call(this,n),cw(this.base,n)},e.prototype.setBreaksFromOption=function(n){},e.type="log",e})(rg);function Rx(t,e){return oI(t,nu(e))}Xc.registerClass(Kee);var Bet=(function(){function t(e,n,i){this._prepareParams(e,n,i)}return t.prototype._prepareParams=function(e,n,i){i[1]<i[0]&&(i=[NaN,NaN]),this._dataMin=i[0],this._dataMax=i[1];var r=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&n.getNeedCrossZero&&n.getNeedCrossZero();var o=n.get("min",!0);o==null&&(o=n.get("startValue",!0));var s=this._modelMinRaw=o;Xt(s)?this._modelMinNum=fw(e,s({min:i[0],max:i[1]})):s!=="dataMin"&&(this._modelMinNum=fw(e,s));var a=this._modelMaxRaw=n.get("max",!0);if(Xt(a)?this._modelMaxNum=fw(e,a({min:i[0],max:i[1]})):a!=="dataMax"&&(this._modelMaxNum=fw(e,a)),r)this._axisDataLen=n.getCategories().length;else{var l=n.get("boundaryGap"),u=bt(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Tf(u[0],1),Tf(u[1],1)]}},t.prototype.calculate=function(){var e=this._isOrdinal,n=this._dataMin,i=this._dataMax,r=this._axisDataLen,o=this._boundaryGapInner,s=e?null:i-n||Math.abs(n),a=this._modelMinRaw==="dataMin"?n:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?i:this._modelMaxNum,u=a!=null,c=l!=null;a==null&&(a=e?r?0:NaN:n-o[0]*s),l==null&&(l=e?r?r-1:NaN:i+o[1]*s),(a==null||!isFinite(a))&&(a=NaN),(l==null||!isFinite(l))&&(l=NaN);var d=bb(a)||bb(l)||e&&!r;this._needCrossZero&&(a>0&&l>0&&!u&&(a=0),a<0&&l<0&&!c&&(l=0));var f=this._determinedMin,h=this._determinedMax;return f!=null&&(a=f,u=!0),h!=null&&(l=h,c=!0),{min:a,max:l,minFixed:u,maxFixed:c,isBlank:d}},t.prototype.modifyDataMinMax=function(e,n){this[Fet[e]]=n},t.prototype.setDeterminedMinMax=function(e,n){var i=Vet[e];this[i]=n},t.prototype.freeze=function(){this.frozen=!0},t})(),Vet={min:"_determinedMin",max:"_determinedMax"},Fet={min:"_dataMin",max:"_dataMax"};function $et(t,e,n){var i=t.rawExtentInfo;return i||(i=new Bet(t,e,n),t.rawExtentInfo=i,i)}function fw(t,e){return e==null?null:bb(e)?NaN:t.parse(e)}function Gee(t,e){var n=t.type,i=$et(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,s=e.ecModel;if(s&&n==="time"){var a=bet("bar",s),l=!1;if(ue(a,function(d){l=l||d.getBaseAxis()===e.axis}),l){var u=wet(a),c=zet(r,o,e,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function zet(t,e,n,i){var r=n.axis.getExtent(),o=Math.abs(r[1]-r[0]),s=Cet(i,n.axis);if(s===void 0)return{min:t,max:e};var a=1/0;ue(s,function(h){a=Math.min(h.offset,a)});var l=-1/0;ue(s,function(h){l=Math.max(h.offset+h.width,l)}),a=Math.abs(a),l=Math.abs(l);var u=a+l,c=e-t,d=1-(a+l)/o,f=c/d-c;return e+=f*(l/u),t-=f*(a/u),{min:t,max:e}}function I7(t,e){var n=e,i=Gee(t,n),r=i.extent,o=n.get("splitNumber");t instanceof Kee&&(t.base=n.get("logBase"));var s=t.type,a=n.get("interval"),l=s==="interval"||s==="time";t.setBreaksFromOption(Xee(n)),t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),a!=null&&t.setInterval&&t.setInterval(a)}function Het(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Uee({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new jee({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Xc.getClass(e)||rg)}}function Uet(t){var e=t.scale.getExtent(),n=e[0],i=e[1];return!(n>0&&i>0||n<0&&i<0)}function k0(t){var e=t.getLabelModel().get("formatter");if(t.type==="time"){var n=IXe(e);return function(r,o){return t.scale.getFormattedLabel(r,o,n)}}else{if(At(e))return function(r){var o=t.scale.getLabel(r),s=e.replace("{value}",o??"");return s};if(Xt(e)){if(t.type==="category")return function(r,o){return e(Q1(t,r),r.value-t.scale.getExtent()[0],null)};var i=q1();return function(r,o){var s=null;return i&&(s=i.makeAxisLabelFormatterParamBreak(s,r.break)),e(Q1(t,r),o,s)}}else return function(r){return t.scale.getLabel(r)}}}function Q1(t,e){return t.type==="category"?t.scale.getLabel(e):e.value}function $L(t){var e=t.get("interval");return e??"auto"}function Yee(t){return t.type==="category"&&$L(t.getLabelModel())===0}function Wet(t,e){var n={};return ue(t.mapDimensionsAll(e),function(i){n[iet(t,i)]=!0}),hi(n)}function og(t){return t==="middle"||t==="center"}function Db(t){return t.getShallow("show")}function Xee(t){var e=t.get("breaks",!0);e==null}var qet=(function(){function t(){}return t.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},t.prototype.getCoordSysModel=function(){},t})(),R7=[],jet={registerPreprocessor:Dee,registerProcessor:Nee,registerPostInit:IQe,registerPostUpdate:RQe,registerUpdateLifecycle:NL,registerAction:Tg,registerCoordinateSystem:MQe,registerLayout:OQe,registerVisual:Zf,registerTransform:DQe,registerLoading:Bee,registerMap:LQe,registerImpl:cQe,PRIORITY:SQe,ComponentModel:jn,ComponentView:Cu,SeriesModel:Bc,ChartView:ol,registerComponentModel:function(t){jn.registerClass(t)},registerComponentView:function(t){Cu.registerClass(t)},registerSeriesModel:function(t){Bc.registerClass(t)},registerChartView:function(t){ol.registerClass(t)},registerCustomSeries:function(t,e){},registerSubTypeDefaulter:function(t,e){jn.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){yKe(t,e)}};function Nb(t){if(bt(t)){ue(t,function(e){Nb(e)});return}Dn(R7,t)>=0||(R7.push(t),Xt(t)&&(t={install:t}),t.install(jet))}var Ket=Di(),wv=Di(),ba={estimate:1,determine:2};function eC(t){return{out:{noPxChangeTryDetermine:[]},kind:t}}function Jee(t,e){var n=jt(e,function(i){return t.scale.parse(i)});return t.type==="time"&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function Get(t,e){var n=t.getLabelModel().get("customValues");if(n){var i=k0(t),r=t.scale.getExtent(),o=Jee(t,n),s=gr(o,function(a){return a>=r[0]&&a<=r[1]});return{labels:jt(s,function(a){var l={value:a};return{formattedLabel:i(l),rawLabel:t.scale.getLabel(l),tickValue:a,time:void 0,break:void 0}})}}return t.type==="category"?Xet(t,e):Zet(t)}function Yet(t,e,n){var i=t.getTickModel().get("customValues");if(i){var r=t.scale.getExtent(),o=Jee(t,i);return{ticks:gr(o,function(s){return s>=r[0]&&s<=r[1]})}}return t.type==="category"?Jet(t,e):{ticks:jt(t.scale.getTicks(n),function(s){return s.value})}}function Xet(t,e){var n=t.getLabelModel(),i=Zee(t,n,e);return!n.get("show")||t.scale.isBlank()?{labels:[]}:i}function Zee(t,e,n){var i=ett(t),r=$L(e),o=n.kind===ba.estimate;if(!o){var s=ete(i,r);if(s)return s}var a,l;Xt(r)?a=ite(t,r):(l=r==="auto"?ttt(t,n):r,a=nte(t,l));var u={labels:a,labelCategoryInterval:l};return o?n.out.noPxChangeTryDetermine.push(function(){return sI(i,r,u),!0}):sI(i,r,u),u}function Jet(t,e){var n=Qet(t),i=$L(e),r=ete(n,i);if(r)return r;var o,s;if((!e.get("show")||t.scale.isBlank())&&(o=[]),Xt(i))o=ite(t,i,!0);else if(i==="auto"){var a=Zee(t,t.getLabelModel(),eC(ba.determine));s=a.labelCategoryInterval,o=jt(a.labels,function(l){return l.tickValue})}else s=i,o=nte(t,s,!0);return sI(n,i,{ticks:o,tickCategoryInterval:s})}function Zet(t){var e=t.scale.getTicks(),n=k0(t);return{labels:jt(e,function(i,r){return{formattedLabel:n(i,r),rawLabel:t.scale.getLabel(i),tickValue:i.value,time:i.time,break:i.break}})}}var Qet=Qee("axisTick"),ett=Qee("axisLabel");function Qee(t){return function(n){return wv(n)[t]||(wv(n)[t]={list:[]})}}function ete(t,e){for(var n=0;n<t.list.length;n++)if(t.list[n].key===e)return t.list[n].value}function sI(t,e,n){return t.list.push({key:e,value:n}),n}function ttt(t,e){if(e.kind===ba.estimate){var n=t.calculateCategoryInterval(e);return e.out.noPxChangeTryDetermine.push(function(){return wv(t).autoInterval=n,!0}),n}var i=wv(t).autoInterval;return i??(wv(t).autoInterval=t.calculateCategoryInterval(e))}function ntt(t,e){var n=e.kind,i=rtt(t),r=k0(t),o=(i.axisRotate-i.labelRotate)/180*Math.PI,s=t.scale,a=s.getExtent(),l=s.count();if(a[1]-a[0]<1)return 0;var u=1,c=40;l>c&&(u=Math.max(1,Math.floor(l/c)));for(var d=a[0],f=t.dataToCoord(d+1)-t.dataToCoord(d),h=Math.abs(f*Math.cos(o)),m=Math.abs(f*Math.sin(o)),g=0,v=0;d<=a[1];d+=u){var p=0,b=0,y=vZ(r({value:d}),i.font,"center","top");p=y.width*1.3,b=y.height*1.3,g=Math.max(g,p,7),v=Math.max(v,b,7)}var _=g/h,C=v/m;isNaN(_)&&(_=1/0),isNaN(C)&&(C=1/0);var S=Math.max(0,Math.floor(Math.min(_,C)));if(n===ba.estimate)return e.out.noPxChangeTryDetermine.push(ii(itt,null,t,S,l)),S;var k=tte(t,S,l);return k??S}function itt(t,e,n){return tte(t,e,n)==null}function tte(t,e,n){var i=Ket(t.model),r=t.getExtent(),o=i.lastAutoInterval,s=i.lastTickCount;if(o!=null&&s!=null&&Math.abs(o-e)<=1&&Math.abs(s-n)<=1&&o>e&&i.axisExtent0===r[0]&&i.axisExtent1===r[1])return o;i.lastTickCount=n,i.lastAutoInterval=e,i.axisExtent0=r[0],i.axisExtent1=r[1]}function rtt(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function nte(t,e,n){var i=k0(t),r=t.scale,o=r.getExtent(),s=t.getLabelModel(),a=[],l=Math.max((e||0)+1,1),u=o[0],c=r.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var d=Yee(t),f=s.get("showMinLabel")||d,h=s.get("showMaxLabel")||d;f&&u!==o[0]&&g(o[0]);for(var m=u;m<=o[1];m+=l)g(m);h&&m-l!==o[1]&&g(o[1]);function g(v){var p={value:v};a.push(n?v:{formattedLabel:i(p),rawLabel:r.getLabel(p),tickValue:v,time:void 0,break:void 0})}return a}function ite(t,e,n){var i=t.scale,r=k0(t),o=[];return ue(i.getTicks(),function(s){var a=i.getLabel(s),l=s.value;e(s.value,a)&&o.push(n?l:{formattedLabel:r(s),rawLabel:a,tickValue:l,time:void 0,break:void 0})}),o}var M7=[0,1],ott=(function(){function t(e,n,i){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=n,this._extent=i||[0,0]}return t.prototype.contain=function(e){var n=this._extent,i=Math.min(n[0],n[1]),r=Math.max(n[0],n[1]);return e>=i&&e<=r},t.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(e){return SKe(e||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;i[0]=e,i[1]=n},t.prototype.dataToCoord=function(e,n){var i=this._extent,r=this.scale;return e=r.normalize(r.parse(e)),this.onBand&&r.type==="ordinal"&&(i=i.slice(),O7(i,r.count())),_8(e,M7,i,n)},t.prototype.coordToData=function(e,n){var i=this._extent,r=this.scale;this.onBand&&r.type==="ordinal"&&(i=i.slice(),O7(i,r.count()));var o=_8(e,i,M7,n);return this.scale.scale(o)},t.prototype.pointToData=function(e,n){},t.prototype.getTicksCoords=function(e){e=e||{};var n=e.tickModel||this.getTickModel(),i=Yet(this,n,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),r=i.ticks,o=jt(r,function(a){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(a):a),tickValue:a}},this),s=n.get("alignWithLabel");return stt(this,o,s,e.clamp),o},t.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),n=e.get("splitNumber");n>0&&n<100||(n=5);var i=this.scale.getMinorTicks(n),r=jt(i,function(o){return jt(o,function(s){return{coord:this.dataToCoord(s),tickValue:s}},this)},this);return r},t.prototype.getViewLabels=function(e){return e=e||eC(ba.determine),Get(this,e).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var e=this._extent,n=this.scale.getExtent(),i=n[1]-n[0]+(this.onBand?1:0);i===0&&(i=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/i},t.prototype.calculateCategoryInterval=function(e){return e=e||eC(ba.determine),ntt(this,e)},t})();function O7(t,e){var n=t[1]-t[0],i=e,r=n/i/2;t[0]+=r,t[1]-=r}function stt(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o=t.getExtent(),s,a;if(r===1)e[0].coord=o[0],e[0].onBand=!0,s=e[1]={coord:o[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;ue(e,function(h){h.coord-=u/2,h.onBand=!0});var c=t.scale.getExtent();a=1+c[1]-e[r-1].tickValue,s={coord:e[r-1].coord+u*a,tickValue:c[1]+1,onBand:!0},e.push(s)}var d=o[0]>o[1];f(e[0].coord,o[0])&&(i?e[0].coord=o[0]:e.shift()),i&&f(o[0],e[0].coord)&&e.unshift({coord:o[0],onBand:!0}),f(o[1],s.coord)&&(i?s.coord=o[1]:e.pop()),i&&f(s.coord,o[1])&&e.push({coord:o[1],onBand:!0});function f(h,m){return h=_r(h),m=_r(m),d?h>m:h<m}}var L7=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],att=1,tC=2,rte=att|tC;function nC(t,e,n){n=n||rte,e?t.dirty|=n:t.dirty&=~n}function ote(t,e){return e=e||rte,t.dirty==null||!!(t.dirty&e)}function Vc(t){if(t)return ote(t)&&ltt(t,t.label,t),t}function ltt(t,e,n){var i=e.getComputedTransform();t.transform=fL(t.transform,i);var r=t.localRect=Tb(t.localRect,e.getBoundingRect()),o=e.style,s=o.margin,a=n&&n.marginForce,l=n&&n.minMarginForce,u=n&&n.marginDefault,c=o.__marginType;c==null&&u&&(s=u,c=em.textMargin);for(var d=0;d<4;d++)Mx[d]=c===em.minMargin&&l&&l[d]!=null?l[d]:a&&a[d]!=null?a[d]:s?s[d]:0;c===em.textMargin&&U1(r,Mx,!1,!1);var f=t.rect=Tb(t.rect,r);return i&&f.applyTransform(i),c===em.minMargin&&U1(f,Mx,!1,!1),t.axisAligned=dL(i),(t.label=t.label||{}).ignore=e.ignore,nC(t,!1),nC(t,!0,tC),t}var Mx=[0,0,0,0];function utt(t,e,n){return t.transform=fL(t.transform,n),t.localRect=Tb(t.localRect,e),t.rect=Tb(t.rect,e),n&&t.rect.applyTransform(n),t.axisAligned=dL(n),t.obb=void 0,(t.label=t.label||{}).ignore=!1,t}function ctt(t,e){if(t){t.label.x+=e.x,t.label.y+=e.y,t.label.markRedraw();var n=t.transform;n&&(n[4]+=e.x,n[5]+=e.y);var i=t.rect;i&&(i.x+=e.x,i.y+=e.y);var r=t.obb;r&&r.fromBoundingRect(t.localRect,n)}}function D7(t,e){for(var n=0;n<L7.length;n++){var i=L7[n];t[i]==null&&(t[i]=e[i])}return Vc(t)}function N7(t){var e=t.obb;return(!e||ote(t,tC))&&(t.obb=e=e||new oQ,e.fromBoundingRect(t.localRect,t.transform),nC(t,!1,tC)),e}function dtt(t){var e=[];t.sort(function(u,c){return(c.suggestIgnore?1:0)-(u.suggestIgnore?1:0)||c.priority-u.priority});function n(u){if(!u.ignore){var c=u.ensureState("emphasis");c.ignore==null&&(c.ignore=!1)}u.ignore=!0}for(var i=0;i<t.length;i++){var r=Vc(t[i]);if(!r.label.ignore){for(var o=r.label,s=r.labelLine,a=!1,l=0;l<e.length;l++)if(zL(r,e[l],null,{touchThreshold:.05})){a=!0;break}a?(n(o),s&&n(s)):e.push(r)}}}function zL(t,e,n,i){return!t||!e||t.label&&t.label.ignore||e.label&&e.label.ignore||!t.rect.intersect(e.rect,n,i)?!1:t.axisAligned&&e.axisAligned?!0:N7(t).intersect(N7(e),n,i)}const ftt=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function htt(t){function e(n){return function(...r){if(!t.value)throw new Error("ECharts is not initialized yet.");return Reflect.apply(t.value[n],t.value,r)}}return ftt.reduce((n,i)=>(n[i]=e(i),n),{})}function mtt(t,e,n){Se([n,t,e],([i,r,o],s,a)=>{let l=null;if(i&&r&&o){const{offsetWidth:u,offsetHeight:c}=i,{throttle:d=100,onResize:f}=o===!0?{}:o;let h=!1;const m=()=>{r.resize(),f?.()},g=d?ML(m,d):m;l=new ResizeObserver(()=>{!h&&(h=!0,i.offsetWidth===u&&i.offsetHeight===c)||i.offsetWidth===0||i.offsetHeight===0||g()}),l.observe(i)}a(()=>{l&&(l.disconnect(),l=null)})})}const gtt={autoresize:[Boolean,Object]},ptt=Symbol();function vtt(t,e,n){const i=Ne(ptt,{}),r=M(()=>({...bw(i),...n?.value}));sl(()=>{const o=t.value;o&&(e.value?o.showLoading(r.value):o.hideLoading())})}const btt={loading:Boolean,loadingOptions:Object};function ste(){return typeof window<"u"&&typeof document<"u"}const ytt=/^on[^a-z]/,ate=t=>ytt.test(t);function wtt(t){const e={};for(const n in t)ate(n)||(e[n]=t[n]);return e}function _tt(t){const e=Number(t);return Number.isInteger(e)&&e>=0&&e<Math.pow(2,32)-1&&String(e)===t}function Ctt(t,e){const n=new Set(t),i=new Set(e);if(n.size!==i.size)return!1;for(const r of n)if(!i.has(r))return!1;return!0}function lte(t){return t!=null&&typeof t=="object"&&!Array.isArray(t)}const ute={tooltip:["tooltip","formatter"],dataView:["toolbox","feature","dataView","optionToContent"]},Stt=Object.keys(ute);function Ox(t){return Stt.some(e=>t===e||t.startsWith(e+"-"))}function ktt(t,e){const n=ste()?document.createElement("div"):void 0,i=Lp({}),r=Lp({}),o=Lp({}),s=bi(!1),a=()=>s.value&&n?nt(sz,{to:n},Object.entries(t).filter(([d])=>Ox(d)).map(([d,f])=>{const h=d;return nt("div",{ref:m=>{m instanceof HTMLElement&&(i[h]=m)},style:{display:"contents"}},r[h]?f?.(o[h]):void 0)})):void 0;function l(d){return d!==null&&typeof d=="object"&&!Array.isArray(d)}function u(d){const f={...d},h=(m,g)=>{const v=m[g];if(Array.isArray(v))return m[g]=[...v],m[g];if(l(v))return m[g]={...v},m[g];if(v===void 0)return m[g]=_tt(g)?[]:{},m[g]};return Object.keys(t).filter(m=>Ox(m)).forEach(m=>{const[g,...v]=m.split("-"),p=ute[g];if(!p)return;const b=[...v,...p];if(b.length===0)return;let y=f;for(let _=0;_<b.length-1;_++)if(y=h(y,b[_]),!y)return;y[b[b.length-1]]=_=>(r[m]=!0,o[m]=_,i[m])}),f}let c=[];return ku(()=>{const d=Object.keys(t).filter(Ox);Ctt(d,c)||(c.forEach(f=>{d.includes(f)||(delete o[f],delete r[f],delete i[f])}),c=d,e())}),Pt(()=>{s.value=!0}),Fc(()=>{n?.remove()}),{teleportedSlots:a,patchOption:u}}let Uu=null;const aI="x-vue-echarts";function Ttt(){if(Uu!=null)return Uu;const t=globalThis.customElements;if(!ste()||!t?.get)return Uu=!1,Uu;if(!t.get(aI))try{class e extends HTMLElement{__dispose=null;disconnectedCallback(){this.__dispose&&(this.__dispose(),this.__dispose=null)}}t.define(aI,e)}catch{return Uu=!1,Uu}return Uu=!0,Uu}function Ett(t){if(!lte(t))return;const e=t.id;if(typeof e=="string")return e;if(typeof e=="number"&&Number.isFinite(e))return String(e)}function B7(t){const e=t,n=Array.isArray(e.options)?e.options.length:0,i=Array.isArray(e.media)?e.media.length:0,r=Object.create(null),o=[],s=[];for(const a of Object.keys(e)){if(a==="options"||a==="media")continue;const l=e[a];if(Array.isArray(l)){const u=l,c=new Set;let d=0;for(let f=0;f<u.length;f++){const h=Ett(u[f]);h!==void 0?c.add(h):d++}r[a]={idsSorted:c.size>0?Array.from(c).sort():[],noIdCount:d}}else lte(l)?o.push(a):l!==void 0&&s.push(a)}return o.length>1&&o.sort(),s.length>1&&s.sort(),{optionsLength:n,mediaLength:i,arrays:r,objects:o,scalars:s}}function V7(t,e){if(t.length===0)return[];if(e.length===0)return t.slice();const n=new Set(e),i=[];for(let r=0;r<t.length;r++){const o=t[r];n.has(o)||i.push(o)}return i}function xtt(t,e){if(t.length===0)return!1;if(e.length===0)return!0;const n=new Set(e);for(let i=0;i<t.length;i++)if(!n.has(t[i]))return!0;return!1}function Att(t,e){const n=B7(e);if(!t)return{option:e,signature:n,plan:{notMerge:!1}};if(n.optionsLength<t.optionsLength)return{option:e,signature:n,plan:{notMerge:!0}};if(n.mediaLength<t.mediaLength)return{option:e,signature:n,plan:{notMerge:!0}};if(V7(t.scalars,n.scalars).length>0)return{option:e,signature:n,plan:{notMerge:!0}};const i=new Set,r=new Map,o=V7(t.objects,n.objects);for(let u=0;u<o.length;u++)r.set(o[u],null);for(const u of Object.keys(t.arrays)){const c=t.arrays[u];if(!c)continue;const d=n.arrays[u];if(!d){(c.idsSorted.length>0||c.noIdCount>0)&&(r.set(u,[]),i.add(u));continue}if(xtt(c.idsSorted,d.idsSorted)){i.add(u);continue}d.noIdCount<c.noIdCount&&i.add(u)}let s=e,a=n;if(r.size>0){const u={...e};r.forEach((c,d)=>{u[d]=c}),s=u,a=B7(s)}const l=i.size>0?Array.from(i).sort():void 0;return{option:s,signature:a,plan:l?{notMerge:!1,replaceMerge:l}:{notMerge:!1}}}var F7=`x-vue-echarts{display:block;width:100%;height:100%;min-width:0;}
x-vue-echarts>:first-child,x-vue-echarts>:first-child>canvas{border-radius:inherit;}
`;if(typeof document<"u")if(Array.isArray(document.adoptedStyleSheets)&&"replaceSync"in CSSStyleSheet.prototype){const t=new CSSStyleSheet;t.replaceSync(F7),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t]}else{const t=document.createElement("style");t.textContent=F7,document.head.appendChild(t)}const Ptt=Ttt(),Itt=Symbol(),Rtt=Symbol(),Mtt=Symbol();var Ott=le({name:"Echarts",inheritAttrs:!1,props:{option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean,...gtt,...btt},emits:{},slots:Object,setup(t,{attrs:e,expose:n,slots:i}){const r=bi(),o=bi(),s=Ne(Itt,null),a=Ne(Rtt,null),l=Ne(Mtt,null),{autoresize:u,manualUpdate:c,loading:d,loadingOptions:f}=Sr(t),h=M(()=>t.theme||bw(s)),m=M(()=>t.initOptions||bw(a)||void 0),g=M(()=>t.updateOptions||bw(l)),v=M(()=>wtt(e)),p={},b=new Map,{teleportedSlots:y,patchOption:_}=ktt(i,()=>{!c.value&&t.option&&o.value&&k(o.value,t.option)});let C;function S(A){const I={},D=(A?.replaceMerge??[]).filter(q=>q!=null);return D.length>0&&(I.replaceMerge=[...new Set(D)]),A?.notMerge!==void 0&&(I.notMerge=A.notMerge),I}function k(A,I,D,q=!1){const z=_(I);if(q){A.setOption(z,D??{}),C=void 0;return}if(g.value){const N=D??g.value;A.setOption(z,N),C=void 0;return}const R=Att(C,z),O=S(R.plan);A.setOption(R.option,O),C=R.signature}Object.keys(e).filter(A=>ate(A)).forEach(A=>{if(A.indexOf("Native:")===2){const z=`on${A.charAt(9).toUpperCase()}${A.slice(10)}`;p[z]=e[A];return}let I=A.charAt(2).toLowerCase()+A.slice(3),D;I.indexOf("zr:")===0&&(D=!0,I=I.substring(3));let q;I.substring(I.length-4)==="Once"&&(q=!0,I=I.substring(0,I.length-4)),b.set({event:I,zr:D,once:q},e[A])});function T(){if(!r.value)return;const A=o.value=AQe(r.value,h.value,m.value);t.group&&(A.group=t.group),b.forEach((q,{zr:z,once:R,event:O})=>{if(!q)return;const N=z?A.getZr():A;if(R){const F=q;let j=!1;q=(...U)=>{j||(j=!0,F(...U),N.off(O,q))}}N.on(O,q)});function I(){A&&!A.isDisposed()&&A.resize()}function D(){const{option:q}=t;if(c.value){q&&k(A,q,void 0,!0);return}q&&k(A,q)}u.value?Ye(()=>{I(),D()}):D()}const E=(A,I,D)=>{if(!t.manualUpdate)return;const q=typeof I=="boolean"?{notMerge:I,lazyUpdate:D}:I;o.value&&k(o.value,A,q??void 0,!0)};function x(){o.value&&(o.value.dispose(),o.value=void 0),C=void 0}Se(()=>t.option,A=>{if(!A){C=void 0;return}c.value||o.value&&k(o.value,A)},{deep:!0}),Se([c,m],()=>{x(),T()},{deep:!0}),Se(h,A=>{o.value?.setTheme(A||{})},{deep:!0}),sl(()=>{t.group&&o.value&&(o.value.group=t.group)});const P=htt(o);return vtt(o,d,f),mtt(o,u,r),Pt(()=>{T()}),Sn(()=>{Ptt&&r.value?r.value.__dispose=x:x()}),n({setOption:E,root:r,chart:o,...P}),(()=>nt(aI,{...v.value,...p,ref:r,class:["echarts",v.value.class]},y()))}}),$7=Ott;function z7(t,e,n){var i=wu.createCanvas(),r=e.getWidth(),o=e.getHeight(),s=i.style;return s&&(s.position="absolute",s.left="0",s.top="0",s.width=r+"px",s.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var Lx=(function(t){yt(e,t);function e(n,i,r){var o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null;var s;r=r||L1,typeof n=="string"?s=z7(n,i,r):Rt(n)&&(s=n,n=s.id),o.id=n,o.dom=s;var a=s.style;return a&&(JJ(s),s.onselectstart=function(){return!1},a.padding="0",a.margin="0",a.borderWidth="0"),o.painter=i,o.dpr=r,o}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var n=this.dpr;this.domBack=z7("back-"+this.id,this.painter,n),this.ctxBack=this.domBack.getContext("2d"),n!==1&&this.ctxBack.scale(n,n)},e.prototype.createRepaintRects=function(n,i,r,o){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var s=[],a=this.maxRepaintRectCount,l=!1,u=new nn(0,0,0,0);function c(b){if(!(!b.isFinite()||b.isZero()))if(s.length===0){var y=new nn(0,0,0,0);y.copy(b),s.push(y)}else{for(var _=!1,C=1/0,S=0,k=0;k<s.length;++k){var T=s[k];if(T.intersect(b)){var E=new nn(0,0,0,0);E.copy(T),E.union(b),s[k]=E,_=!0;break}else if(l){u.copy(b),u.union(T);var x=b.width*b.height,P=T.width*T.height,A=u.width*u.height,I=A-x-P;I<C&&(C=I,S=k)}}if(l&&(s[S].union(b),_=!0),!_){var y=new nn(0,0,0,0);y.copy(b),s.push(y)}l||(l=s.length>=a)}}for(var d=this.__startIndex;d<this.__endIndex;++d){var f=n[d];if(f){var h=f.shouldBePainted(r,o,!0,!0),m=f.__isRendered&&(f.__dirty&Jo||!h)?f.getPrevPaintRect():null;m&&c(m);var g=h&&(f.__dirty&Jo||!f.__isRendered)?f.getPaintRect():null;g&&c(g)}}for(var d=this.__prevStartIndex;d<this.__prevEndIndex;++d){var f=i[d],h=f&&f.shouldBePainted(r,o,!0,!0);if(f&&(!h||!f.__zr)&&f.__isRendered){var m=f.getPrevPaintRect();m&&c(m)}}var v;do{v=!1;for(var d=0;d<s.length;){if(s[d].isZero()){s.splice(d,1);continue}for(var p=d+1;p<s.length;)s[d].intersect(s[p])?(v=!0,s[d].union(s[p]),s.splice(p,1)):p++;d++}}while(v);return this._paintRects=s,s},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(n,i){var r=this.dpr,o=this.dom,s=o.style,a=this.domBack;s&&(s.width=n+"px",s.height=i+"px"),o.width=n*r,o.height=i*r,a&&(a.width=n*r,a.height=i*r,r!==1&&this.ctxBack.scale(r,r))},e.prototype.clear=function(n,i,r){var o=this.dom,s=this.ctx,a=o.width,l=o.height;i=i||this.clearColor;var u=this.motionBlur&&!n,c=this.lastFrameAlpha,d=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(o,0,0,a/d,l/d));var h=this.domBack;function m(g,v,p,b){if(s.clearRect(g,v,p,b),i&&i!=="transparent"){var y=void 0;if(OS(i)){var _=i.global||i.__width===p&&i.__height===b;y=_&&i.__canvasGradient||YP(s,i,{x:0,y:0,width:p,height:b}),i.__canvasGradient=y,i.__width=p,i.__height=b}else Xqe(i)&&(i.scaleX=i.scaleX||d,i.scaleY=i.scaleY||d,y=XP(s,i,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));s.save(),s.fillStyle=y||i,s.fillRect(g,v,p,b),s.restore()}u&&(s.save(),s.globalAlpha=c,s.drawImage(h,g,v,p,b),s.restore())}!r||u?m(0,0,a,l):r.length&&ue(r,function(g){m(g.x*d,g.y*d,g.width*d,g.height*d)})},e})(Tl),H7=1e5,Ld=314159,hw=.01,Ltt=.001;function Dtt(t){return t?t.__builtin__?!0:!(typeof t.resize!="function"||typeof t.refresh!="function"):!1}function Ntt(t,e){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}var Btt=(function(){function t(e,n,i,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=i=lt({},i||{}),this.dpr=i.devicePixelRatio||L1,this._singleCanvas=o,this.root=e;var s=e.style;s&&(JJ(e),e.innerHTML=""),this.storage=n;var a=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(o){var c=e,d=c.width,f=c.height;i.width!=null&&(d=i.width),i.height!=null&&(f=i.height),this.dpr=i.devicePixelRatio||1,c.width=d*this.dpr,c.height=f*this.dpr,this._width=d,this._height=f;var h=new Lx(c,this,this.dpr);h.__builtin__=!0,h.initContext(),l[Ld]=h,h.zlevel=Ld,a.push(Ld),this._domRoot=e}else{this._width=iw(e,0,i),this._height=iw(e,1,i);var u=this._domRoot=Ntt(this._width,this._height);e.appendChild(u)}}return t.prototype.getType=function(){return"canvas"},t.prototype.isSingleCanvas=function(){return this._singleCanvas},t.prototype.getViewportRoot=function(){return this._domRoot},t.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},t.prototype.refresh=function(e){var n=this.storage.getDisplayList(!0),i=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(n,i,e,this._redrawId);for(var o=0;o<r.length;o++){var s=r[o],a=this._layers[s];if(!a.__builtin__&&a.refresh){var l=o===0?this._backgroundColor:null;a.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=n.slice()),this},t.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},t.prototype._paintHoverList=function(e){var n=e.length,i=this._hoverlayer;if(i&&i.clear(),!!n){for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height},o,s=0;s<n;s++){var a=e[s];a.__inHover&&(i||(i=this._hoverlayer=this.getLayer(H7)),o||(o=i.ctx,o.save()),ef(o,a,r,s===n-1))}o&&o.restore()}},t.prototype.getHoverLayer=function(){return this.getLayer(H7)},t.prototype.paintOne=function(e,n){bee(e,n)},t.prototype._paintList=function(e,n,i,r){if(this._redrawId===r){i=i||!1,this._updateLayerStatus(e);var o=this._doPaintList(e,n,i),s=o.finished,a=o.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),a&&this._paintHoverList(e),s)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;A1(function(){l._paintList(e,n,i,r)})}}},t.prototype._compositeManually=function(){var e=this.getLayer(Ld).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(r){r.virtual&&e.drawImage(r.dom,0,0,n,i)})},t.prototype._doPaintList=function(e,n,i){for(var r=this,o=[],s=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var l=this._zlevelList[a],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||i)&&o.push(u)}for(var c=!0,d=!1,f=function(g){var v=o[g],p=v.ctx,b=s&&v.createRepaintRects(e,n,h._width,h._height),y=i?v.__startIndex:v.__drawIndex,_=!i&&v.incremental&&Date.now,C=_&&Date.now(),S=v.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,S,b);else if(y===v.__startIndex){var k=e[y];(!k.incremental||!k.notClear||i)&&v.clear(!1,S,b)}y===-1&&(console.error("For some unknown reason. drawIndex is -1"),y=v.__startIndex);var T,E=function(I){var D={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(T=y;T<v.__endIndex;T++){var q=e[T];if(q.__inHover&&(d=!0),r._doPaintEl(q,v,s,I,D,T===v.__endIndex-1),_){var z=Date.now()-C;if(z>15)break}}D.prevElClipPaths&&p.restore()};if(b)if(b.length===0)T=v.__endIndex;else for(var x=h.dpr,P=0;P<b.length;++P){var A=b[P];p.save(),p.beginPath(),p.rect(A.x*x,A.y*x,A.width*x,A.height*x),p.clip(),E(A),p.restore()}else p.save(),E(),p.restore();v.__drawIndex=T,v.__drawIndex<v.__endIndex&&(c=!1)},h=this,m=0;m<o.length;m++)f(m);return Kt.wxa&&ue(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:c,needsRefreshHover:d}},t.prototype._doPaintEl=function(e,n,i,r,o,s){var a=n.ctx;if(i){var l=e.getPaintRect();(!r||l&&l.intersect(r))&&(ef(a,e,o,s),e.setPrevPaintRect(l))}else ef(a,e,o,s)},t.prototype.getLayer=function(e,n){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Ld);var i=this._layers[e];return i||(i=new Lx("zr_"+e,this,this.dpr),i.zlevel=e,i.__builtin__=!0,this._layerConfig[e]?Yn(i,this._layerConfig[e],!0):this._layerConfig[e-hw]&&Yn(i,this._layerConfig[e-hw],!0),n&&(i.virtual=n),this.insertLayer(e,i),i.initContext()),i},t.prototype.insertLayer=function(e,n){var i=this._layers,r=this._zlevelList,o=r.length,s=this._domRoot,a=null,l=-1;if(!i[e]&&Dtt(n)){if(o>0&&e>r[0]){for(l=0;l<o-1&&!(r[l]<e&&r[l+1]>e);l++);a=i[r[l]]}if(r.splice(l+1,0,e),i[e]=n,!n.virtual)if(a){var u=a.dom;u.nextSibling?s.insertBefore(n.dom,u.nextSibling):s.appendChild(n.dom)}else s.firstChild?s.insertBefore(n.dom,s.firstChild):s.appendChild(n.dom);n.painter||(n.painter=this)}},t.prototype.eachLayer=function(e,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var o=i[r];e.call(n,this._layers[o],o)}},t.prototype.eachBuiltinLayer=function(e,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var o=i[r],s=this._layers[o];s.__builtin__&&e.call(n,s,o)}},t.prototype.eachOtherLayer=function(e,n){for(var i=this._zlevelList,r=0;r<i.length;r++){var o=i[r],s=this._layers[o];s.__builtin__||e.call(n,s,o)}},t.prototype.getLayers=function(){return this._layers},t.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(d,f){d.__dirty=d.__used=!1});function n(d){o&&(o.__endIndex!==d&&(o.__dirty=!0),o.__endIndex=d)}if(this._singleCanvas)for(var i=1;i<e.length;i++){var r=e[i];if(r.zlevel!==e[i-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var o=null,s=0,a,l;for(l=0;l<e.length;l++){var r=e[l],u=r.zlevel,c=void 0;a!==u&&(a=u,s=0),r.incremental?(c=this.getLayer(u+Ltt,this._needsManuallyCompositing),c.incremental=!0,s=1):c=this.getLayer(u+(s>0?hw:0),this._needsManuallyCompositing),c.__builtin__||VO("ZLevel "+u+" has been used by unkown layer "+c.id),c!==o&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,n(l),o=c),r.__dirty&Jo&&!r.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}n(l),this.eachBuiltinLayer(function(d,f){!d.__used&&d.getElementCount()>0&&(d.__dirty=!0,d.__startIndex=d.__endIndex=d.__drawIndex=0),d.__dirty&&d.__drawIndex<0&&(d.__drawIndex=d.__startIndex)})},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(e){e.clear()},t.prototype.setBackgroundColor=function(e){this._backgroundColor=e,ue(this._layers,function(n){n.setUnpainted()})},t.prototype.configLayer=function(e,n){if(n){var i=this._layerConfig;i[e]?Yn(i[e],n,!0):i[e]=n;for(var r=0;r<this._zlevelList.length;r++){var o=this._zlevelList[r];if(o===e||o===e+hw){var s=this._layers[o];Yn(s,i[e],!0)}}}},t.prototype.delLayer=function(e){var n=this._layers,i=this._zlevelList,r=n[e];r&&(r.dom.parentNode.removeChild(r.dom),delete n[e],i.splice(Dn(i,e),1))},t.prototype.resize=function(e,n){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var r=this._opts,o=this.root;if(e!=null&&(r.width=e),n!=null&&(r.height=n),e=iw(o,0,r),n=iw(o,1,r),i.style.display="",this._width!==e||n!==this._height){i.style.width=e+"px",i.style.height=n+"px";for(var s in this._layers)this._layers.hasOwnProperty(s)&&this._layers[s].resize(e,n);this.refresh(!0)}this._width=e,this._height=n}else{if(e==null||n==null)return;this._width=e,this._height=n,this.getLayer(Ld).resize(e,n)}return this},t.prototype.clearLayer=function(e){var n=this._layers[e];n&&n.clear()},t.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},t.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Ld].dom;var n=new Lx("image",this,e.pixelRatio||this.dpr);n.initContext(),n.clear(!1,e.backgroundColor||this._backgroundColor);var i=n.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=n.dom.width,o=n.dom.height;this.eachLayer(function(d){d.__builtin__?i.drawImage(d.dom,0,0,r,o):d.renderToCanvas&&(i.save(),d.renderToCanvas(i),i.restore())})}else for(var s={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),l=0,u=a.length;l<u;l++){var c=a[l];ef(i,c,s,l===u-1)}return n.dom},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t})();function Vtt(t){t.registerPainter("canvas",Btt)}var Ftt=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return e.prototype.getInitialData=function(n){return set(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(n){var i=new ao,r=Rb("line",0,n.itemHeight/2,n.itemWidth,0,n.lineStyle.stroke,!1);i.add(r),r.setStyle(n.lineStyle);var o=this.getData().getVisual("symbol"),s=this.getData().getVisual("symbolRotate"),a=o==="none"?"circle":o,l=n.itemHeight*.8,u=Rb(a,(n.itemWidth-l)/2,(n.itemHeight-l)/2,l,l,n.itemStyle.fill);i.add(u),u.setStyle(n.itemStyle);var c=n.iconRotate==="inherit"?s:n.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([n.itemWidth/2,n.itemHeight/2]),a.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill=dn.color.neutral00,u.style.lineWidth=2),i},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(Bc);function cte(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(i===1){var r=ig(t,e,n[0]);return r!=null?r+"":null}else if(i){for(var o=[],s=0;s<n.length;s++)o.push(ig(t,e,n[s]));return o.join(" ")}}function $tt(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!bt(e))return e+"";for(var i=[],r=0;r<n.length;r++){var o=t.getDimensionIndex(n[r]);o>=0&&i.push(e[o])}return i.join(" ")}var HL=(function(t){yt(e,t);function e(n,i,r,o){var s=t.call(this)||this;return s.updateData(n,i,r,o),s}return e.prototype._createSymbol=function(n,i,r,o,s,a){this.removeAll();var l=Rb(n,-1,-1,2,2,null,a);l.attr({z2:Ut(s,100),culling:!0,scaleX:o[0]/2,scaleY:o[1]/2}),l.drift=ztt,this._symbolType=n,this.add(l)},e.prototype.stopSymbolAnimation=function(n){this.childAt(0).stopAnimation(null,n)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){$1(this.childAt(0))},e.prototype.downplay=function(){z1(this.childAt(0))},e.prototype.setZ=function(n,i){var r=this.childAt(0);r.zlevel=n,r.z=i},e.prototype.setDraggable=function(n,i){var r=this.childAt(0);r.draggable=n,r.cursor=!i&&n?"move":r.cursor},e.prototype.updateData=function(n,i,r,o){this.silent=!1;var s=n.getItemVisual(i,"symbol")||"circle",a=n.hostModel,l=e.getSymbolSize(n,i),u=e.getSymbolZ2(n,i),c=s!==this._symbolType,d=o&&o.disableAnimation;if(c){var f=n.getItemVisual(i,"symbolKeepAspect");this._createSymbol(s,n,i,l,u,f)}else{var h=this.childAt(0);h.silent=!1;var m={scaleX:l[0]/2,scaleY:l[1]/2};d?h.attr(m):Af(h,m,a,i),qYe(h)}if(this._updateCommon(n,i,l,r,o),c){var h=this.childAt(0);if(!d){var m={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,S0(h,m,a,i)}}d&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(n,i,r,o,s){var a=this.childAt(0),l=n.hostModel,u,c,d,f,h,m,g,v,p;if(o&&(u=o.emphasisItemStyle,c=o.blurItemStyle,d=o.selectItemStyle,f=o.focus,h=o.blurScope,g=o.labelStatesModels,v=o.hoverScale,p=o.cursorStyle,m=o.emphasisDisabled),!o||n.hasItemOption){var b=o&&o.itemModel?o.itemModel:n.getItemModel(i),y=b.getModel("emphasis");u=y.getModel("itemStyle").getItemStyle(),d=b.getModel(["select","itemStyle"]).getItemStyle(),c=b.getModel(["blur","itemStyle"]).getItemStyle(),f=y.get("focus"),h=y.get("blurScope"),m=y.get("disabled"),g=hL(b),v=y.getShallow("scale"),p=b.getShallow("cursor")}var _=n.getItemVisual(i,"symbolRotate");a.attr("rotation",(_||0)*Math.PI/180||0);var C=mee(n.getItemVisual(i,"symbolOffset"),r);C&&(a.x=C[0],a.y=C[1]),p&&a.attr("cursor",p);var S=n.getItemVisual(i,"style"),k=S.fill;if(a instanceof Yc){var T=a.style;a.useStyle(lt({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else a.__isEmptyBrush?a.useStyle(lt({},S)):a.useStyle(S),a.style.decal=null,a.setColor(k,s&&s.symbolInnerColor),a.style.strokeNoScale=!0;var E=n.getItemVisual(i,"liftZ"),x=this._z2;E!=null?x==null&&(this._z2=a.z2,a.z2+=E):x!=null&&(a.z2=x,this._z2=null);var P=s&&s.useNameLabel;gQ(a,g,{labelFetcher:l,labelDataIndex:i,defaultText:A,inheritColor:k,defaultOpacity:S.opacity});function A(q){return P?n.getName(q):cte(n,q)}this._sizeX=r[0]/2,this._sizeY=r[1]/2;var I=a.ensureState("emphasis");I.style=u,a.ensureState("select").style=d,a.ensureState("blur").style=c;var D=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;I.scaleX=this._sizeX*D,I.scaleY=this._sizeY*D,this.setSymbolScale(1),OP(this,f,h,m)},e.prototype.setSymbolScale=function(n){this.scaleX=this.scaleY=n},e.prototype.fadeOut=function(n,i,r){var o=this.childAt(0),s=si(this).dataIndex,a=r&&r.animation;if(this.silent=o.silent=!0,r&&r.fadeLabel){var l=o.getTextContent();l&&H1(l,{style:{opacity:0}},i,{dataIndex:s,removeOpt:a,cb:function(){o.removeTextContent()}})}else o.removeTextContent();H1(o,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:s,cb:n,removeOpt:a})},e.getSymbolSize=function(n,i){return KZe(n.getItemVisual(i,"symbolSize"))},e.getSymbolZ2=function(n,i){return n.getItemVisual(i,"z2")},e})(ao);function ztt(t,e){this.parent.drift(t,e)}function Dx(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&t.getItemVisual(n,"symbol")!=="none"}function U7(t){return t!=null&&!Rt(t)&&(t={isIgnore:t}),t||{}}function W7(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:hL(e),cursorStyle:e.get("cursor")}}var Htt=(function(){function t(e){this.group=new ao,this._SymbolCtor=e||HL}return t.prototype.updateData=function(e,n){this._progressiveEls=null,n=U7(n);var i=this.group,r=e.hostModel,o=this._data,s=this._SymbolCtor,a=n.disableAnimation,l=W7(e),u={disableAnimation:a},c=n.getSymbolPoint||function(d){return e.getItemLayout(d)};o||i.removeAll(),e.diff(o).add(function(d){var f=c(d);if(Dx(e,f,d,n)){var h=new s(e,d,l,u);h.setPosition(f),e.setItemGraphicEl(d,h),i.add(h)}}).update(function(d,f){var h=o.getItemGraphicEl(f),m=c(d);if(!Dx(e,m,d,n)){i.remove(h);return}var g=e.getItemVisual(d,"symbol")||"circle",v=h&&h.getSymbolType&&h.getSymbolType();if(!h||v&&v!==g)i.remove(h),h=new s(e,d,l,u),h.setPosition(m);else{h.updateData(e,d,l,u);var p={x:m[0],y:m[1]};a?h.attr(p):Af(h,p,r)}i.add(h),e.setItemGraphicEl(d,h)}).remove(function(d){var f=o.getItemGraphicEl(d);f&&f.fadeOut(function(){i.remove(f)},r)}).execute(),this._getSymbolPoint=c,this._data=e},t.prototype.updateLayout=function(){var e=this,n=this._data;n&&n.eachItemGraphicEl(function(i,r){var o=e._getSymbolPoint(r);i.setPosition(o),i.markRedraw()})},t.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=W7(e),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(e,n,i){this._progressiveEls=[],i=U7(i);function r(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var o=e.start;o<e.end;o++){var s=n.getItemLayout(o);if(Dx(n,s,o,i)){var a=new this._SymbolCtor(n,o,this._seriesScope);a.traverse(r),a.setPosition(s),this.group.add(a),n.setItemGraphicEl(o,a),this._progressiveEls.push(a)}}},t.prototype.eachRendered=function(e){cL(this._progressiveEls||this.group,e)},t.prototype.remove=function(e){var n=this.group,i=this._data;i&&e?i.eachItemGraphicEl(function(r){r.fadeOut(function(){n.remove(r)},i.hostModel)}):n.removeAll()},t})();function dte(t,e,n){var i=t.getBaseAxis(),r=t.getOtherAxis(i),o=Utt(r,n),s=i.dim,a=r.dim,l=e.mapDimension(a),u=e.mapDimension(s),c=a==="x"||a==="radius"?1:0,d=jt(t.dimensions,function(m){return e.mapDimension(m)}),f=!1,h=e.getCalculationInfo("stackResultDimension");return Ob(e,d[0])&&(f=!0,d[0]=h),Ob(e,d[1])&&(f=!0,d[1]=h),{dataDimsForPoint:d,valueStart:o,valueAxisDim:a,baseAxisDim:s,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Utt(t,e){var n=0,i=t.scale.getExtent();return e==="start"?n=i[0]:e==="end"?n=i[1]:ai(e)&&!isNaN(e)?n=e:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]),n}function fte(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,s=[];return s[o]=n.get(t.baseDim,i),s[1-o]=r,e.dataToPoint(s)}function Wtt(t,e){var n=[];return e.diff(t).add(function(i){n.push({cmd:"+",idx:i})}).update(function(i,r){n.push({cmd:"=",idx:r,idx1:i})}).remove(function(i){n.push({cmd:"-",idx:i})}).execute(),n}function qtt(t,e,n,i,r,o,s,a){for(var l=Wtt(t,e),u=[],c=[],d=[],f=[],h=[],m=[],g=[],v=dte(r,e,s),p=t.getLayout("points")||[],b=e.getLayout("points")||[],y=0;y<l.length;y++){var _=l[y],C=!0,S=void 0,k=void 0;switch(_.cmd){case"=":S=_.idx*2,k=_.idx1*2;var T=p[S],E=p[S+1],x=b[k],P=b[k+1];(isNaN(T)||isNaN(E))&&(T=x,E=P),u.push(T,E),c.push(x,P),d.push(n[S],n[S+1]),f.push(i[k],i[k+1]),g.push(e.getRawIndex(_.idx1));break;case"+":var A=_.idx,I=v.dataDimsForPoint,D=r.dataToPoint([e.get(I[0],A),e.get(I[1],A)]);k=A*2,u.push(D[0],D[1]),c.push(b[k],b[k+1]);var q=fte(v,r,e,A);d.push(q[0],q[1]),f.push(i[k],i[k+1]),g.push(e.getRawIndex(A));break;case"-":C=!1}C&&(h.push(_),m.push(m.length))}m.sort(function(ne,he){return g[ne]-g[he]});for(var z=u.length,R=tm(z),O=tm(z),N=tm(z),F=tm(z),j=[],y=0;y<m.length;y++){var U=m[y],W=y*2,J=U*2;R[W]=u[J],R[W+1]=u[J+1],O[W]=c[J],O[W+1]=c[J+1],N[W]=d[J],N[W+1]=d[J+1],F[W]=f[J],F[W+1]=f[J+1],j[y]=h[U]}return{current:R,next:O,stackedOnCurrent:N,stackedOnNext:F,status:j}}var Wu=Math.min,qu=Math.max;function hf(t,e){return isNaN(t)||isNaN(e)}function lI(t,e,n,i,r,o,s,a,l){for(var u,c,d,f,h,m,g=n,v=0;v<i;v++){var p=e[g*2],b=e[g*2+1];if(g>=r||g<0)break;if(hf(p,b)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](p,b),d=p,f=b;else{var y=p-u,_=b-c;if(y*y+_*_<.5){g+=o;continue}if(s>0){for(var C=g+o,S=e[C*2],k=e[C*2+1];S===p&&k===b&&v<i;)v++,C+=o,g+=o,S=e[C*2],k=e[C*2+1],p=e[g*2],b=e[g*2+1],y=p-u,_=b-c;var T=v+1;if(l)for(;hf(S,k)&&T<i;)T++,C+=o,S=e[C*2],k=e[C*2+1];var E=.5,x=0,P=0,A=void 0,I=void 0;if(T>=i||hf(S,k))h=p,m=b;else{x=S-u,P=k-c;var D=p-u,q=S-p,z=b-c,R=k-b,O=void 0,N=void 0;if(a==="x"){O=Math.abs(D),N=Math.abs(q);var F=x>0?1:-1;h=p-F*O*s,m=b,A=p+F*N*s,I=b}else if(a==="y"){O=Math.abs(z),N=Math.abs(R);var j=P>0?1:-1;h=p,m=b-j*O*s,A=p,I=b+j*N*s}else O=Math.sqrt(D*D+z*z),N=Math.sqrt(q*q+R*R),E=N/(N+O),h=p-x*s*(1-E),m=b-P*s*(1-E),A=p+x*s*E,I=b+P*s*E,A=Wu(A,qu(S,p)),I=Wu(I,qu(k,b)),A=qu(A,Wu(S,p)),I=qu(I,Wu(k,b)),x=A-p,P=I-b,h=p-x*O/N,m=b-P*O/N,h=Wu(h,qu(u,p)),m=Wu(m,qu(c,b)),h=qu(h,Wu(u,p)),m=qu(m,Wu(c,b)),x=p-h,P=b-m,A=p+x*N/O,I=b+P*N/O}t.bezierCurveTo(d,f,h,m,p,b),d=A,f=I}else t.lineTo(p,b)}u=p,c=b,g+=o}return v}var hte=(function(){function t(){this.smooth=0,this.smoothConstraint=!0}return t})(),jtt=(function(t){yt(e,t);function e(n){var i=t.call(this,n)||this;return i.type="ec-polyline",i}return e.prototype.getDefaultStyle=function(){return{stroke:dn.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new hte},e.prototype.buildPath=function(n,i){var r=i.points,o=0,s=r.length/2;if(i.connectNulls){for(;s>0&&hf(r[s*2-2],r[s*2-1]);s--);for(;o<s&&hf(r[o*2],r[o*2+1]);o++);}for(;o<s;)o+=lI(n,r,o,s,s,1,i.smooth,i.smoothMonotone,i.connectNulls)+1},e.prototype.getPointOn=function(n,i){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var r=this.path,o=r.data,s=xf.CMD,a,l,u=i==="x",c=[],d=0;d<o.length;){var f=o[d++],h=void 0,m=void 0,g=void 0,v=void 0,p=void 0,b=void 0,y=void 0;switch(f){case s.M:a=o[d++],l=o[d++];break;case s.L:if(h=o[d++],m=o[d++],y=u?(n-a)/(h-a):(n-l)/(m-l),y<=1&&y>=0){var _=u?(m-l)*y+l:(h-a)*y+a;return u?[n,_]:[_,n]}a=h,l=m;break;case s.C:h=o[d++],m=o[d++],g=o[d++],v=o[d++],p=o[d++],b=o[d++];var C=u?I1(a,h,g,p,n,c):I1(l,m,v,b,n,c);if(C>0)for(var S=0;S<C;S++){var k=c[S];if(k<=1&&k>=0){var _=u?pr(l,m,v,b,k):pr(a,h,g,p,k);return u?[n,_]:[_,n]}}a=p,l=b;break}}},e})(Jn),Ktt=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e})(hte),Gtt=(function(t){yt(e,t);function e(n){var i=t.call(this,n)||this;return i.type="ec-polygon",i}return e.prototype.getDefaultShape=function(){return new Ktt},e.prototype.buildPath=function(n,i){var r=i.points,o=i.stackedOnPoints,s=0,a=r.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;a>0&&hf(r[a*2-2],r[a*2-1]);a--);for(;s<a&&hf(r[s*2],r[s*2+1]);s++);}for(;s<a;){var u=lI(n,r,s,a,a,1,i.smooth,l,i.connectNulls);lI(n,o,s+u-1,u,a,-1,i.stackedOnSmooth,l,i.connectNulls),s+=u+1,n.closePath()}},e})(Jn);function Ytt(t,e,n,i,r){var o=t.getArea(),s=o.x,a=o.y,l=o.width,u=o.height,c=n.get(["lineStyle","width"])||0;s-=c/2,a-=c/2,l+=c,u+=c,l=Math.ceil(l),s!==Math.floor(s)&&(s=Math.floor(s),l++);var d=new Fr({shape:{x:s,y:a,width:l,height:u}});if(e){var f=t.getBaseAxis(),h=f.isHorizontal(),m=f.inverse;h?(m&&(d.shape.x+=l),d.shape.width=0):(m||(d.shape.y+=u),d.shape.height=0);var g=Xt(r)?function(v){r(v,d)}:null;S0(d,{shape:{width:l,height:u,x:s,y:a}},n,null,i,g)}return d}function Xtt(t,e,n){var i=t.getArea(),r=_r(i.r0,1),o=_r(i.r,1),s=new qS({shape:{cx:_r(t.cx,1),cy:_r(t.cy,1),r0:r,r:o,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});if(e){var a=t.getBaseAxis().dim==="angle";a?s.shape.endAngle=i.startAngle:s.shape.r=r,S0(s,{shape:{endAngle:i.endAngle,r:o}},n)}return s}function Jtt(t,e){return t.type===e}function q7(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return!0}}function j7(t){for(var e=1/0,n=1/0,i=-1/0,r=-1/0,o=0;o<t.length;){var s=t[o++],a=t[o++];isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i)),isNaN(a)||(n=Math.min(a,n),r=Math.max(a,r))}return[[e,n],[i,r]]}function K7(t,e){var n=j7(t),i=n[0],r=n[1],o=j7(e),s=o[0],a=o[1];return Math.max(Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]),Math.abs(r[0]-a[0]),Math.abs(r[1]-a[1]))}function G7(t){return ai(t)?t:t?.5:0}function Ztt(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=tm(i*2),o=0;o<i;o++){var s=fte(n,t,e,o);r[o*2]=s[0],r[o*2+1]=s[1]}return r}function ju(t,e,n,i,r){var o=n.getBaseAxis(),s=o.dim==="x"||o.dim==="radius"?0:1,a=[],l=0,u=[],c=[],d=[],f=[];if(r){for(l=0;l<t.length;l+=2){var h=e||t;!isNaN(h[l])&&!isNaN(h[l+1])&&f.push(t[l],t[l+1])}t=f}for(l=0;l<t.length-2;l+=2)switch(d[0]=t[l+2],d[1]=t[l+3],c[0]=t[l],c[1]=t[l+1],a.push(c[0],c[1]),i){case"end":u[s]=d[s],u[1-s]=c[1-s],a.push(u[0],u[1]);break;case"middle":var m=(c[s]+d[s])/2,g=[];u[s]=g[s]=m,u[1-s]=c[1-s],g[1-s]=d[1-s],a.push(u[0],u[1]),a.push(g[0],g[1]);break;default:u[s]=c[s],u[1-s]=d[1-s],a.push(u[0],u[1])}return a.push(t[l++],t[l++]),a}function Qtt(t,e){var n=[],i=t.length,r,o;function s(c,d,f){var h=c.coord,m=(f-h)/(d.coord-h),g=jje(m,[c.color,d.color]);return{coord:f,color:g}}for(var a=0;a<i;a++){var l=t[a],u=l.coord;if(u<0)r=l;else if(u>e){o?n.push(s(o,l,e)):r&&n.push(s(r,l,0),s(r,l,e));break}else r&&(n.push(s(r,l,0)),r=null),n.push(l),o=l}return n}function ent(t,e,n){var i=t.getVisual("visualMeta");if(!(!i||!i.length||!t.count())&&e.type==="cartesian2d"){for(var r,o,s=i.length-1;s>=0;s--){var a=t.getDimensionInfo(i[s].dimension);if(r=a&&a.coordDim,r==="x"||r==="y"){o=i[s];break}}if(o){var l=e.getAxis(r),u=jt(o.stops,function(y){return{coord:l.toGlobalCoord(l.dataToCoord(y.value)),color:y.color}}),c=u.length,d=o.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),d.reverse());var f=Qtt(u,r==="x"?n.getWidth():n.getHeight()),h=f.length;if(!h&&c)return u[0].coord<0?d[1]?d[1]:u[c-1].color:d[0]?d[0]:u[0].color;var m=10,g=f[0].coord-m,v=f[h-1].coord+m,p=v-g;if(p<.001)return"transparent";ue(f,function(y){y.offset=(y.coord-g)/p}),f.push({offset:h?f[h-1].offset:.5,color:d[1]||"transparent"}),f.unshift({offset:h?f[0].offset:.5,color:d[0]||"transparent"});var b=new rQ(0,0,0,0,f,!0);return b[r]=g,b[r+"2"]=v,b}}}function tnt(t,e,n){var i=t.get("showAllSymbol"),r=i==="auto";if(!(i&&!r)){var o=n.getAxesByScale("ordinal")[0];if(o&&!(r&&nnt(o,e))){var s=e.mapDimension(o.dim),a={};return ue(o.getViewLabels(),function(l){var u=o.scale.getRawOrdinalNumber(l.tickValue);a[u]=1}),function(l){return!a.hasOwnProperty(e.get(s,l))}}}}function nnt(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),s=0;s<r;s+=o)if(HL.getSymbolSize(e,s)[t.isHorizontal()?1:0]*1.5>i)return!1;return!0}function int(t,e){return isNaN(t)||isNaN(e)}function rnt(t){for(var e=t.length/2;e>0&&int(t[e*2-2],t[e*2-1]);e--);return e-1}function Y7(t,e){return[t[e*2],t[e*2+1]]}function ont(t,e,n){for(var i=t.length/2,r=n==="x"?0:1,o,s,a=0,l=-1,u=0;u<i;u++)if(s=t[u*2+r],!(isNaN(s)||isNaN(t[u*2+1-r]))){if(u===0){o=s;continue}if(o<=e&&s>=e||o>=e&&s<=e){l=u;break}a=u,o=s}return{range:[a,l],t:(e-o)/(s-o)}}function mte(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e<vl.length;e++)if(t.get([vl[e],"endLabel","show"]))return!0;return!1}function Nx(t,e,n,i){if(Jtt(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("valueAnimation"),s=i.getData(),a={lastFrameIndex:0},l=mte(i)?function(h,m){t._endLabelOnDuring(h,m,s,a,o,r,e)}:null,u=e.getBaseAxis().isHorizontal(),c=Ytt(e,n,i,function(){var h=t._endLabel;h&&n&&a.originalX!=null&&h.attr({x:a.originalX,y:a.originalY})},l);if(!i.get("clip",!0)){var d=c.shape,f=Math.max(d.width,d.height);u?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return l&&l(1,c),c}else return Xtt(e,n,i)}function snt(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",s=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||s}}}var ant=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.init=function(){var n=new ao,i=new Htt;this.group.add(i.group),this._symbolDraw=i,this._lineGroup=n,this._changePolyState=ii(this._changePolyState,this)},e.prototype.render=function(n,i,r){var o=n.coordinateSystem,s=this.group,a=n.getData(),l=n.getModel("lineStyle"),u=n.getModel("areaStyle"),c=a.getLayout("points")||[],d=o.type==="polar",f=this._coordSys,h=this._symbolDraw,m=this._polyline,g=this._polygon,v=this._lineGroup,p=!i.ssr&&n.get("animation"),b=!u.isEmpty(),y=u.get("origin"),_=dte(o,a,y),C=b&&Ztt(o,a,_),S=n.get("showSymbol"),k=n.get("connectNulls"),T=S&&!d&&tnt(n,a,o),E=this._data;E&&E.eachItemGraphicEl(function(ne,he){ne.__temp&&(s.remove(ne),E.setItemGraphicEl(he,null))}),S||h.remove(),s.add(v);var x=d?!1:n.get("step"),P;o&&o.getArea&&n.get("clip",!0)&&(P=o.getArea(),P.width!=null?(P.x-=.1,P.y-=.1,P.width+=.2,P.height+=.2):P.r0&&(P.r0-=.5,P.r+=.5)),this._clipShapeForSymbol=P;var A=ent(a,o,r)||a.getVisual("style")[a.getVisual("drawType")];if(!(m&&f.type===o.type&&x===this._step))S&&h.updateData(a,{isIgnore:T,clipShape:P,disableAnimation:!0,getSymbolPoint:function(ne){return[c[ne*2],c[ne*2+1]]}}),p&&this._initSymbolLabelAnimation(a,o,P),x&&(C&&(C=ju(C,c,o,x,k)),c=ju(c,null,o,x,k)),m=this._newPolyline(c),b?g=this._newPolygon(c,C):g&&(v.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(n,o,Pf(A)),v.setClipPath(Nx(this,o,!0,n));else{b&&!g?g=this._newPolygon(c,C):g&&!b&&(v.remove(g),g=this._polygon=null),d||this._initOrUpdateEndLabel(n,o,Pf(A));var I=v.getClipPath();if(I){var D=Nx(this,o,!1,n);S0(I,{shape:D.shape},n)}else v.setClipPath(Nx(this,o,!0,n));S&&h.updateData(a,{isIgnore:T,clipShape:P,disableAnimation:!0,getSymbolPoint:function(ne){return[c[ne*2],c[ne*2+1]]}}),(!q7(this._stackedOnPoints,C)||!q7(this._points,c))&&(p?this._doUpdateAnimation(a,C,o,r,x,y,k):(x&&(C&&(C=ju(C,c,o,x,k)),c=ju(c,null,o,x,k)),m.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:C})))}var q=n.getModel("emphasis"),z=q.get("focus"),R=q.get("blurScope"),O=q.get("disabled");if(m.useStyle(Xn(l.getLineStyle(),{fill:"none",stroke:A,lineJoin:"bevel"})),e$(m,n,"lineStyle"),m.style.lineWidth>0&&n.get(["emphasis","lineStyle","width"])==="bolder"){var N=m.getState("emphasis").style;N.lineWidth=+m.style.lineWidth+1}si(m).seriesIndex=n.seriesIndex,OP(m,z,R,O);var F=G7(n.get("smooth")),j=n.get("smoothMonotone");if(m.setShape({smooth:F,smoothMonotone:j,connectNulls:k}),g){var U=a.getCalculationInfo("stackedOnSeries"),W=0;g.useStyle(Xn(u.getAreaStyle(),{fill:A,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),U&&(W=G7(U.get("smooth"))),g.setShape({smooth:F,stackedOnSmooth:W,smoothMonotone:j,connectNulls:k}),e$(g,n,"areaStyle"),si(g).seriesIndex=n.seriesIndex,OP(g,z,R,O)}var J=this._changePolyState;a.eachItemGraphicEl(function(ne){ne&&(ne.onHoverStateChange=J)}),this._polyline.onHoverStateChange=J,this._data=a,this._coordSys=o,this._stackedOnPoints=C,this._points=c,this._step=x,this._valueOrigin=y,n.get("triggerLineEvent")&&(this.packEventData(n,m),g&&this.packEventData(n,g))},e.prototype.packEventData=function(n,i){si(i).eventData={componentType:"series",componentSubType:"line",componentIndex:n.componentIndex,seriesIndex:n.seriesIndex,seriesName:n.name,seriesType:"line"}},e.prototype.highlight=function(n,i,r,o){var s=n.getData(),a=Ef(s,o);if(this._changePolyState("emphasis"),!(a instanceof Array)&&a!=null&&a>=0){var l=s.getLayout("points"),u=s.getItemGraphicEl(a);if(!u){var c=l[a*2],d=l[a*2+1];if(isNaN(c)||isNaN(d)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,d))return;var f=n.get("zlevel")||0,h=n.get("z")||0;u=new HL(s,a),u.x=c,u.y=d,u.setZ(f,h);var m=u.getSymbolPath().getTextContent();m&&(m.zlevel=f,m.z=h,m.z2=this._polyline.z2+1),u.__temp=!0,s.setItemGraphicEl(a,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ol.prototype.highlight.call(this,n,i,r,o)},e.prototype.downplay=function(n,i,r,o){var s=n.getData(),a=Ef(s,o);if(this._changePolyState("normal"),a!=null&&a>=0){var l=s.getItemGraphicEl(a);l&&(l.__temp?(s.setItemGraphicEl(a,null),this.group.remove(l)):l.downplay())}else ol.prototype.downplay.call(this,n,i,r,o)},e.prototype._changePolyState=function(n){var i=this._polygon;Y8(this._polyline,n),i&&Y8(i,n)},e.prototype._newPolyline=function(n){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new jtt({shape:{points:n},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},e.prototype._newPolygon=function(n,i){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new Gtt({shape:{points:n,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(r),this._polygon=r,r},e.prototype._initSymbolLabelAnimation=function(n,i,r){var o,s,a=i.getBaseAxis(),l=a.inverse;i.type==="cartesian2d"?(o=a.isHorizontal(),s=!1):i.type==="polar"&&(o=a.dim==="angle",s=!0);var u=n.hostModel,c=u.get("animationDuration");Xt(c)&&(c=c(null));var d=u.get("animationDelay")||0,f=Xt(d)?d(null):d;n.eachItemGraphicEl(function(h,m){var g=h;if(g){var v=[h.x,h.y],p=void 0,b=void 0,y=void 0;if(r)if(s){var _=r,C=i.pointToCoord(v);o?(p=_.startAngle,b=_.endAngle,y=-C[1]/180*Math.PI):(p=_.r0,b=_.r,y=C[0])}else{var S=r;o?(p=S.x,b=S.x+S.width,y=h.x):(p=S.y+S.height,b=S.y,y=h.y)}var k=b===p?0:(y-p)/(b-p);l&&(k=1-k);var T=Xt(d)?d(m):c*k+f,E=g.getSymbolPath(),x=E.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:T}),E.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(n,i,r){var o=n.getModel("endLabel");if(mte(n)){var s=n.getData(),a=this._polyline,l=s.getLayout("points");if(!l){a.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new va({z2:200}),u.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=rnt(l);c>=0&&(gQ(a,hL(n,"endLabel"),{inheritColor:r,labelFetcher:n,labelDataIndex:c,defaultText:function(d,f,h){return h!=null?$tt(s,h):cte(s,d)},enableTextSetter:!0},snt(o,i)),a.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(n,i,r,o,s,a,l){var u=this._endLabel,c=this._polyline;if(u){n<1&&o.originalX==null&&(o.originalX=u.x,o.originalY=u.y);var d=r.getLayout("points"),f=r.hostModel,h=f.get("connectNulls"),m=a.get("precision"),g=a.get("distance")||0,v=l.getBaseAxis(),p=v.isHorizontal(),b=v.inverse,y=i.shape,_=b?p?y.x:y.y+y.height:p?y.x+y.width:y.y,C=(p?g:0)*(b?-1:1),S=(p?0:-g)*(b?-1:1),k=p?"x":"y",T=ont(d,_,k),E=T.range,x=E[1]-E[0],P=void 0;if(x>=1){if(x>1&&!h){var A=Y7(d,E[0]);u.attr({x:A[0]+C,y:A[1]+S}),s&&(P=f.getRawValue(E[0]))}else{var A=c.getPointOn(_,k);A&&u.attr({x:A[0]+C,y:A[1]+S});var I=f.getRawValue(E[0]),D=f.getRawValue(E[1]);s&&(P=qKe(r,m,I,D,T.t))}o.lastFrameIndex=E[0]}else{var q=n===1||o.lastFrameIndex>0?E[0]:0,A=Y7(d,q);s&&(P=f.getRawValue(q)),u.attr({x:A[0]+C,y:A[1]+S})}if(s){var z=pQ(u);typeof z.setLabelText=="function"&&z.setLabelText(P)}}},e.prototype._doUpdateAnimation=function(n,i,r,o,s,a,l){var u=this._polyline,c=this._polygon,d=n.hostModel,f=qtt(this._data,n,this._stackedOnPoints,i,this._coordSys,r,this._valueOrigin),h=f.current,m=f.stackedOnCurrent,g=f.next,v=f.stackedOnNext;if(s&&(m=ju(f.stackedOnCurrent,f.current,r,s,l),h=ju(f.current,null,r,s,l),v=ju(f.stackedOnNext,f.next,r,s,l),g=ju(f.next,null,r,s,l)),K7(h,g)>3e3||c&&K7(m,v)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:v}));return}u.shape.__points=f.current,u.shape.points=h;var p={shape:{points:g}};f.current!==h&&(p.shape.__points=f.next),u.stopAnimation(),Af(u,p,d),c&&(c.setShape({points:h,stackedOnPoints:m}),c.stopAnimation(),Af(c,{shape:{stackedOnPoints:v}},d),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var b=[],y=f.status,_=0;_<y.length;_++){var C=y[_].cmd;if(C==="="){var S=n.getItemGraphicEl(y[_].idx1);S&&b.push({el:S,ptIdx:_})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var k=u.shape.__points,T=0;T<b.length;T++){var E=b[T].el,x=b[T].ptIdx*2;E.x=k[x],E.y=k[x+1],E.markRedraw()}})},e.prototype.remove=function(n){var i=this.group,r=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),r&&r.eachItemGraphicEl(function(o,s){o.__temp&&(i.remove(o),r.setItemGraphicEl(s,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e})(ol);function lnt(t,e){return{seriesType:t,plan:ree(),reset:function(n){var i=n.getData(),r=n.coordinateSystem;if(n.pipelineContext,!!r){var o=jt(r.dimensions,function(d){return i.mapDimension(d)}).slice(0,2),s=o.length,a=i.getCalculationInfo("stackResultDimension");Ob(i,o[0])&&(o[0]=a),Ob(i,o[1])&&(o[1]=a);var l=i.getStore(),u=i.getDimensionIndex(o[0]),c=i.getDimensionIndex(o[1]);return s&&{progress:function(d,f){for(var h=d.end-d.start,m=tm(h*s),g=[],v=[],p=d.start,b=0;p<d.end;p++){var y=void 0;if(s===1){var _=l.get(u,p);y=r.dataToPoint(_,null,v)}else g[0]=l.get(u,p),g[1]=l.get(c,p),y=r.dataToPoint(g,null,v);m[b++]=y[0],m[b++]=y[1]}f.setLayout("points",m)}}}}}}var unt={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return n===0?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},cnt=function(t){return Math.round(t.length/2)};function dnt(t){return{seriesType:t,reset:function(e,n,i){var r=e.getData(),o=e.get("sampling"),s=e.coordinateSystem,a=r.count();if(a>10&&s.type==="cartesian2d"&&o){var l=s.getBaseAxis(),u=s.getOtherAxis(l),c=l.getExtent(),d=i.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(d||1),h=Math.round(a/f);if(isFinite(h)&&h>1){o==="lttb"?e.setData(r.lttbDownSample(r.mapDimension(u.dim),1/h)):o==="minmax"&&e.setData(r.minmaxDownSample(r.mapDimension(u.dim),1/h));var m=void 0;At(o)?m=unt[o]:Xt(o)&&(m=o),m&&e.setData(r.downSample(r.mapDimension(u.dim),1/h,m,cnt))}}}}}function fnt(t){t.registerChartView(ant),t.registerSeriesModel(Ftt),t.registerLayout(lnt("line")),t.registerVisual({seriesType:"line",reset:function(e){var n=e.getData(),i=e.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=n.getVisual("style").fill),n.setVisual("legendLineStyle",i)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,dnt("line"))}var gte={left:0,right:0,top:0,bottom:0},iC=["25%","25%"],hnt=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(n,i){var r=XS(n.outerBounds);t.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&n.outerBounds&&If(n.outerBounds,r)},e.prototype.mergeOption=function(n,i){t.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&n.outerBounds&&If(this.option.outerBounds,n.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:gte,outerBoundsContain:"all",outerBoundsClampWidth:iC[0],outerBoundsClampHeight:iC[1],backgroundColor:dn.color.transparent,borderWidth:1,borderColor:dn.color.neutral30},e})(jn),uI=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",As).models[0]},e.type="cartesian2dAxis",e})(jn);kl(uI,qet);var pte={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:dn.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:dn.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:dn.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[dn.color.backgroundTint,dn.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:dn.color.neutral00,borderColor:dn.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},mnt=Yn({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},pte),UL=Yn({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:dn.color.axisMinorSplitLine,width:1}}},pte),gnt=Yn({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},UL),pnt=Xn({logBase:10},UL);const vnt={category:mnt,value:UL,time:gnt,log:pnt};var bnt={value:1,category:1,time:1,log:1},ynt=null;function wnt(){return ynt}function X7(t,e,n,i){ue(bnt,function(r,o){var s=Yn(Yn({},vnt[o],!0),i,!0),a=(function(l){yt(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+o,c}return u.prototype.mergeDefaultAndTheme=function(c,d){var f=xb(this),h=f?XS(c):{},m=d.getTheme();Yn(c,m.get(o+"Axis")),Yn(c,this.getDefaultOption()),c.type=J7(c),f&&If(c,h,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=rI.createByAxisModel(this))},u.prototype.getCategories=function(c){var d=this.option;if(d.type==="category")return c?d.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){return{breaks:[]}},u.type=e+"Axis."+o,u.defaultOption=s,u})(n);t.registerComponentModel(a)}),t.registerSubTypeDefaulter(e+"Axis",J7)}function J7(t){return t.type||(t.data?"category":"value")}var _nt=(function(){function t(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return t.prototype.getAxis=function(e){return this._axes[e]},t.prototype.getAxes=function(){return jt(this._dimList,function(e){return this._axes[e]},this)},t.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),gr(this.getAxes(),function(n){return n.scale.type===e})},t.prototype.addAxis=function(e){var n=e.dim;this._axes[n]=e,this._dimList.push(n)},t})(),cI=["x","y"];function Z7(t){return(t.type==="interval"||t.type==="time")&&!t.hasBreaks()}var Cnt=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="cartesian2d",n.dimensions=cI,n}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var n=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!Z7(n)||!Z7(i))){var r=n.getExtent(),o=i.getExtent(),s=this.dataToPoint([r[0],o[0]]),a=this.dataToPoint([r[1],o[1]]),l=r[1]-r[0],u=o[1]-o[0];if(!(!l||!u)){var c=(a[0]-s[0])/l,d=(a[1]-s[1])/u,f=s[0]-r[0]*c,h=s[1]-o[0]*d,m=this._transform=[c,0,0,d,f,h];this._invTransform=y0([],m)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(n){var i=this.getAxis("x"),r=this.getAxis("y");return i.contain(i.toLocalCoord(n[0]))&&r.contain(r.toLocalCoord(n[1]))},e.prototype.containData=function(n){return this.getAxis("x").containData(n[0])&&this.getAxis("y").containData(n[1])},e.prototype.containZone=function(n,i){var r=this.dataToPoint(n),o=this.dataToPoint(i),s=this.getArea(),a=new nn(r[0],r[1],o[0]-r[0],o[1]-r[1]);return s.intersect(a)},e.prototype.dataToPoint=function(n,i,r){r=r||[];var o=n[0],s=n[1];if(this._transform&&o!=null&&isFinite(o)&&s!=null&&isFinite(s))return Ds(r,n,this._transform);var a=this.getAxis("x"),l=this.getAxis("y");return r[0]=a.toGlobalCoord(a.dataToCoord(o,i)),r[1]=l.toGlobalCoord(l.dataToCoord(s,i)),r},e.prototype.clampData=function(n,i){var r=this.getAxis("x").scale,o=this.getAxis("y").scale,s=r.getExtent(),a=o.getExtent(),l=r.parse(n[0]),u=o.parse(n[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(s[0],s[1]),l),Math.max(s[0],s[1])),i[1]=Math.min(Math.max(Math.min(a[0],a[1]),u),Math.max(a[0],a[1])),i},e.prototype.pointToData=function(n,i,r){if(r=r||[],this._invTransform)return Ds(r,n,this._invTransform);var o=this.getAxis("x"),s=this.getAxis("y");return r[0]=o.coordToData(o.toLocalCoord(n[0]),i),r[1]=s.coordToData(s.toLocalCoord(n[1]),i),r},e.prototype.getOtherAxis=function(n){return this.getAxis(n.dim==="x"?"y":"x")},e.prototype.getArea=function(n){n=n||0;var i=this.getAxis("x").getGlobalExtent(),r=this.getAxis("y").getGlobalExtent(),o=Math.min(i[0],i[1])-n,s=Math.min(r[0],r[1])-n,a=Math.max(i[0],i[1])-o+n,l=Math.max(r[0],r[1])-s+n;return new nn(o,s,a,l)},e})(_nt),Snt=(function(t){yt(e,t);function e(n,i,r,o,s){var a=t.call(this,n,i,r)||this;return a.index=0,a.type=o||"value",a.position=s||"bottom",a}return e.prototype.isHorizontal=function(){var n=this.position;return n==="top"||n==="bottom"},e.prototype.getGlobalExtent=function(n){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),n&&i[0]>i[1]&&i.reverse(),i},e.prototype.pointToData=function(n,i){return this.coordToData(this.toLocalCoord(n[this.dim==="x"?0:1]),i)},e.prototype.setCategorySortInfo=function(n){if(this.type!=="category")return!1;this.model.option.categorySortInfo=n,this.scale.setSortInfo(n)},e})(ott),knt="expandAxisBreak",pc=Math.PI,Tnt=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],Ent=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Bb=Di(),vte=Di(),bte=(function(){function t(e){this.recordMap={},this.resolveAxisNameOverlap=e}return t.prototype.ensureRecord=function(e){var n=e.axis.dim,i=e.componentIndex,r=this.recordMap,o=r[n]||(r[n]=[]);return o[i]||(o[i]={ready:{}})},t})();function xnt(t,e,n,i){var r=n.axis,o=e.ensureRecord(n),s=[],a,l=WL(t.axisName)&&og(t.nameLocation);ue(i,function(m){var g=Vc(m);if(!(!g||g.label.ignore)){s.push(g);var v=o.transGroup;l&&(v.transform?y0(mp,v.transform):HO(mp),g.transform&&cv(mp,mp,g.transform),nn.copy(mw,g.localRect),mw.applyTransform(mp),a?a.union(mw):nn.copy(a=new nn(0,0,0,0),mw))}});var u=Math.abs(o.dirVec.x)>.1?"x":"y",c=o.transGroup[u];if(s.sort(function(m,g){return Math.abs(m.label[u]-c)-Math.abs(g.label[u]-c)}),l&&a){var d=r.getExtent(),f=Math.min(d[0],d[1]),h=Math.max(d[0],d[1])-f;a.union(new nn(f,0,h,1))}o.stOccupiedRect=a,o.labelInfoList=s}var mp=uu(),mw=new nn(0,0,0,0),yte=function(t,e,n,i,r,o){if(og(t.nameLocation)){var s=o.stOccupiedRect;s&&wte(utt({},s,o.transGroup.transform),i,r)}else _te(o.labelInfoList,o.dirVec,i,r)};function wte(t,e,n){var i=new qn;zL(t,e,i,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&ctt(e,i)}function _te(t,e,n,i){for(var r=qn.dot(i,e)>=0,o=0,s=t.length;o<s;o++){var a=t[r?o:s-1-o];a.label.ignore||wte(a,n,i)}}var Sc=(function(){function t(e,n,i,r){this.group=new ao,this._axisModel=e,this._api=n,this._local={},this._shared=r||new bte(yte),this._resetCfgDetermined(i)}return t.prototype.updateCfg=function(e){var n=this._cfg.raw;n.position=e.position,n.labelOffset=e.labelOffset,this._resetCfgDetermined(n)},t.prototype.__getRawCfg=function(){return this._cfg.raw},t.prototype._resetCfgDetermined=function(e){var n=this._axisModel,i=n.getDefaultOption?n.getDefaultOption():{},r=Ut(e.axisName,n.get("name")),o=n.get("nameMoveOverlap");(o==null||o==="auto")&&(o=Ut(e.defaultNameMoveOverlap,!0));var s={raw:e,position:e.position,rotation:e.rotation,nameDirection:Ut(e.nameDirection,1),tickDirection:Ut(e.tickDirection,1),labelDirection:Ut(e.labelDirection,1),labelOffset:Ut(e.labelOffset,0),silent:Ut(e.silent,!0),axisName:r,nameLocation:bm(n.get("nameLocation"),i.nameLocation,"end"),shouldNameMoveOverlap:WL(r)&&o,optionHideOverlap:n.get(["axisLabel","hideOverlap"]),showMinorTicks:n.get(["minorTick","show"])};this._cfg=s;var a=new ao({x:s.position[0],y:s.position[1],rotation:s.rotation});a.updateTransform(),this._transformGroup=a;var l=this._shared.ensureRecord(n);l.transGroup=this._transformGroup,l.dirVec=new qn(Math.cos(-s.rotation),Math.sin(-s.rotation))},t.prototype.build=function(e,n){var i=this;return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),ue(Ant,function(r){e[r]&&Pnt[r](i._cfg,i._local,i._shared,i._axisModel,i.group,i._transformGroup,i._api,n||{})}),this},t.innerTextLayout=function(e,n,i){var r=CZ(n-e),o,s;return D1(r)?(s=i>0?"top":"bottom",o="center"):D1(r-pc)?(s=i>0?"bottom":"top",o="center"):(s="middle",r>0&&r<pc?o=i>0?"right":"left":o=i>0?"left":"right"),{rotation:r,textAlign:o,textVerticalAlign:s}},t.makeAxisEventDataBase=function(e){var n={componentType:e.mainType,componentIndex:e.componentIndex};return n[e.mainType+"Index"]=e.componentIndex,n},t.isLabelSilent=function(e){var n=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||n&&n.show)},t})(),Ant=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],Pnt={axisLine:function(t,e,n,i,r,o,s){var a=i.get(["axisLine","show"]);if(a==="auto"&&(a=!0,t.raw.axisLineAutoShow!=null&&(a=!!t.raw.axisLineAutoShow)),!!a){var l=i.axis.getExtent(),u=o.transform,c=[l[0],0],d=[l[1],0],f=c[0]>d[0];u&&(Ds(c,c,u),Ds(d,d,u));var h=lt({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),m={strokeContainThreshold:t.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())wnt().buildAxisBreakLine(i,r,o,m);else{var g=new Nc(lt({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]}},m));kb(g.shape,g.style.lineWidth),g.anid="line",r.add(g)}var v=i.get(["axisLine","symbol"]);if(v!=null){var p=i.get(["axisLine","symbolSize"]);At(v)&&(v=[v,v]),(At(p)||ai(p))&&(p=[p,p]);var b=mee(i.get(["axisLine","symbolOffset"])||0,p),y=p[0],_=p[1];ue([{rotate:t.rotation+Math.PI/2,offset:b[0],r:0},{rotate:t.rotation-Math.PI/2,offset:b[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],function(C,S){if(v[S]!=="none"&&v[S]!=null){var k=Rb(v[S],-y/2,-_/2,y,_,h.stroke,!0),T=C.r+C.offset,E=f?d:c;k.attr({rotation:C.rotate,x:E[0]+T*Math.cos(t.rotation),y:E[1]-T*Math.sin(t.rotation),silent:!0,z2:11}),r.add(k)}})}}},axisTickLabelEstimate:function(t,e,n,i,r,o,s,a){var l=e9(e,r,a);l&&Q7(t,e,n,i,r,o,s,ba.estimate)},axisTickLabelDetermine:function(t,e,n,i,r,o,s,a){var l=e9(e,r,a);l&&Q7(t,e,n,i,r,o,s,ba.determine);var u=Ont(t,r,o,i);Mnt(t,e.labelLayoutList,u),Lnt(t,r,o,i,t.tickDirection)},axisName:function(t,e,n,i,r,o,s,a){var l=n.ensureRecord(i);e.nameEl&&(r.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=t.axisName;if(WL(u)){var c=t.nameLocation,d=t.nameDirection,f=i.getModel("nameTextStyle"),h=i.get("nameGap")||0,m=i.axis.getExtent(),g=i.axis.inverse?-1:1,v=new qn(0,0),p=new qn(0,0);c==="start"?(v.x=m[0]-g*h,p.x=-g):c==="end"?(v.x=m[1]+g*h,p.x=g):(v.x=(m[0]+m[1])/2,v.y=t.labelOffset+d*h,p.y=d);var b=uu();p.transform(UO(b,b,t.rotation));var y=i.get("nameRotate");y!=null&&(y=y*pc/180);var _,C;og(c)?_=Sc.innerTextLayout(t.rotation,y??t.rotation,d):(_=Int(t.rotation,c,y||0,m),C=t.raw.axisNameAvailableWidth,C!=null&&(C=Math.abs(C/Math.sin(_.rotation)),!isFinite(C)&&(C=null)));var S=f.getFont(),k=i.get("nameTruncate",!0)||{},T=k.ellipsis,E=E1(t.raw.nameTruncateMaxWidth,k.maxWidth,C),x=a.nameMarginLevel||0,P=new va({x:v.x,y:v.y,rotation:_.rotation,silent:Sc.isLabelSilent(i),style:Eb(f,{text:u,font:S,overflow:"truncate",width:E,ellipsis:T,fill:f.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:f.get("align")||_.textAlign,verticalAlign:f.get("verticalAlign")||_.textVerticalAlign}),z2:1});if(uL({el:P,componentModel:i,itemName:u}),P.__fullText=u,P.anid="name",i.get("triggerEvent")){var A=Sc.makeAxisEventDataBase(i);A.targetType="axisName",A.name=u,si(P).eventData=A}o.add(P),P.updateTransform(),e.nameEl=P;var I=l.nameLayout=Vc({label:P,priority:P.z2,defaultAttr:{ignore:P.ignore},marginDefault:og(c)?Tnt[x]:Ent[x]});if(l.nameLocation=c,r.add(P),P.decomposeTransform(),t.shouldNameMoveOverlap&&I){var D=n.ensureRecord(i);n.resolveAxisNameOverlap(t,n,i,I,p,D)}}}};function Q7(t,e,n,i,r,o,s,a){Ste(e)||Dnt(t,e,r,a,i,s);var l=e.labelLayoutList;Nnt(t,i,l,o),t.rotation;var u=t.optionHideOverlap;Rnt(i,l,u),u&&dtt(gr(l,function(c){return c&&!c.label.ignore})),xnt(t,n,i,l)}function Int(t,e,n,i){var r=CZ(n-t),o,s,a=i[0]>i[1],l=e==="start"&&!a||e!=="start"&&a;return D1(r-pc/2)?(s=l?"bottom":"top",o="center"):D1(r-pc*1.5)?(s=l?"top":"bottom",o="center"):(s="middle",r<pc*1.5&&r>pc/2?o=l?"left":"right":o=l?"right":"left"),{rotation:r,textAlign:o,textVerticalAlign:s}}function Rnt(t,e,n){if(Yee(t.axis))return;function i(a,l,u){var c=Vc(e[l]),d=Vc(e[u]);if(!(!c||!d)){if(a===!1||c.suggestIgnore){Pp(c.label);return}if(d.suggestIgnore){Pp(d.label);return}var f=.1;if(!n){var h=[0,0,0,0];c=D7({marginForce:h},c),d=D7({marginForce:h},d)}zL(c,d,null,{touchThreshold:f})&&Pp(a?d.label:c.label)}}var r=t.get(["axisLabel","showMinLabel"]),o=t.get(["axisLabel","showMaxLabel"]),s=e.length;i(r,0,1),i(o,s-1,s-2)}function Mnt(t,e,n){t.showMinorTicks||ue(e,function(i){if(i&&i.label.ignore)for(var r=0;r<n.length;r++){var o=n[r],s=vte(o),a=Bb(i.label);if(s.tickValue!=null&&!s.onBand&&s.tickValue===a.tickValue){Pp(o);return}}})}function Pp(t){t&&(t.ignore=!0)}function Cte(t,e,n,i,r){for(var o=[],s=[],a=[],l=0;l<t.length;l++){var u=t[l].coord;s[0]=u,s[1]=0,a[0]=u,a[1]=n,e&&(Ds(s,s,e),Ds(a,a,e));var c=new Nc({shape:{x1:s[0],y1:s[1],x2:a[0],y2:a[1]},style:i,z2:2,autoBatch:!0,silent:!0});kb(c.shape,c.style.lineWidth),c.anid=r+"_"+t[l].tickValue,o.push(c);var d=vte(c);d.onBand=!!t[l].onBand,d.tickValue=t[l].tickValue}return o}function Ont(t,e,n,i){var r=i.axis,o=i.getModel("axisTick"),s=o.get("show");if(s==="auto"&&(s=!0,t.raw.axisTickAutoShow!=null&&(s=!!t.raw.axisTickAutoShow)),!s||r.scale.isBlank())return[];for(var a=o.getModel("lineStyle"),l=t.tickDirection*o.get("length"),u=r.getTicksCoords(),c=Cte(u,n.transform,l,Xn(a.getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])}),"ticks"),d=0;d<c.length;d++)e.add(c[d]);return c}function Lnt(t,e,n,i,r){var o=i.axis,s=i.getModel("minorTick");if(!(!t.showMinorTicks||o.scale.isBlank())){var a=o.getMinorTicksCoords();if(a.length)for(var l=s.getModel("lineStyle"),u=r*s.get("length"),c=Xn(l.getLineStyle(),Xn(i.getModel("axisTick").getLineStyle(),{stroke:i.get(["axisLine","lineStyle","color"])})),d=0;d<a.length;d++)for(var f=Cte(a[d],n.transform,u,c,"minorticks_"+d),h=0;h<f.length;h++)e.add(f[h])}}function e9(t,e,n){if(Ste(t)){var i=t.axisLabelsCreationContext,r=i.out.noPxChangeTryDetermine;if(n.noPxChange){for(var o=!0,s=0;s<r.length;s++)o=o&&r[s]();if(o)return!1}r.length&&(e.remove(t.labelGroup),dI(t,null,null,null))}return!0}function Dnt(t,e,n,i,r,o){var s=r.axis,a=E1(t.raw.axisLabelShow,r.get(["axisLabel","show"])),l=new ao;n.add(l);var u=eC(i);if(!a||s.scale.isBlank()){dI(e,[],l,u);return}var c=r.getModel("axisLabel"),d=s.getViewLabels(u),f=(E1(t.raw.labelRotate,c.get("rotate"))||0)*pc/180,h=Sc.innerTextLayout(t.rotation,f,t.labelDirection),m=r.getCategories&&r.getCategories(!0),g=[],v=r.get("triggerEvent"),p=1/0,b=-1/0;ue(d,function(_,C){var S,k=s.scale.type==="ordinal"?s.scale.getRawOrdinalNumber(_.tickValue):_.tickValue,T=_.formattedLabel,E=_.rawLabel,x=c;if(m&&m[k]){var P=m[k];Rt(P)&&P.textStyle&&(x=new Ii(P.textStyle,c,r.ecModel))}var A=x.getTextColor()||r.get(["axisLine","lineStyle","color"]),I=x.getShallow("align",!0)||h.textAlign,D=Ut(x.getShallow("alignMinLabel",!0),I),q=Ut(x.getShallow("alignMaxLabel",!0),I),z=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||h.textVerticalAlign,R=Ut(x.getShallow("verticalAlignMinLabel",!0),z),O=Ut(x.getShallow("verticalAlignMaxLabel",!0),z),N=10+(((S=_.time)===null||S===void 0?void 0:S.level)||0);p=Math.min(p,N),b=Math.max(b,N);var F=new va({x:0,y:0,rotation:0,silent:Sc.isLabelSilent(r),z2:N,style:Eb(x,{text:T,align:C===0?D:C===d.length-1?q:I,verticalAlign:C===0?R:C===d.length-1?O:z,fill:Xt(A)?A(s.type==="category"?E:s.type==="value"?k+"":k,C):A})});F.anid="label_"+k;var j=Bb(F);if(j.break=_.break,j.tickValue=k,j.layoutRotation=h.rotation,uL({el:F,componentModel:r,itemName:T,formatterParamsExtra:{isTruncated:function(){return F.isTruncated},value:E,tickIndex:C}}),v){var U=Sc.makeAxisEventDataBase(r);U.targetType="axisLabel",U.value=E,U.tickIndex=C,_.break&&(U.break={start:_.break.parsedBreak.vmin,end:_.break.parsedBreak.vmax}),s.type==="category"&&(U.dataIndex=k),si(F).eventData=U,_.break&&Vnt(r,o,F,_.break)}g.push(F),l.add(F)});var y=jt(g,function(_){return{label:_,priority:Bb(_).break?_.z2+(b-p+1):_.z2,defaultAttr:{ignore:_.ignore}}});dI(e,y,l,u)}function Ste(t){return!!t.labelLayoutList}function dI(t,e,n,i){t.labelLayoutList=e,t.labelGroup=n,t.axisLabelsCreationContext=i}function Nnt(t,e,n,i){var r=e.get(["axisLabel","margin"]);ue(n,function(o,s){var a=Vc(o);if(a){var l=a.label,u=Bb(l);a.suggestIgnore=l.ignore,l.ignore=!1,kP(Nl,Bnt),Nl.x=e.axis.dataToCoord(u.tickValue),Nl.y=t.labelOffset+t.labelDirection*r,Nl.rotation=u.layoutRotation,i.add(Nl),Nl.updateTransform(),i.remove(Nl),Nl.decomposeTransform(),kP(l,Nl),l.markRedraw(),nC(a,!0),Vc(a)}})}var Nl=new Fr,Bnt=new Fr;function WL(t){return!!t}function Vnt(t,e,n,i){n.on("click",function(r){var o={type:knt,breaks:[{start:i.parsedBreak.breakOption.start,end:i.parsedBreak.breakOption.end}]};o[t.axis.dim+"AxisIndex"]=t.componentIndex,e.dispatchAction(o)})}function rC(t,e,n){n=n||{};var i=e.axis,r={},o=i.getAxesOnZeroOf()[0],s=i.position,a=o?"onZero":s,l=i.dim,u=[t.x,t.x+t.width,t.y,t.y+t.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f=l==="x"?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(o){var h=o.toGlobalCoord(o.dataToCoord(0));f[c.onZero]=Math.max(Math.min(h,f[1]),f[0])}r.position=[l==="y"?f[c[a]]:u[0],l==="x"?f[c[a]]:u[3]],r.rotation=Math.PI/2*(l==="x"?0:1);var m={top:-1,bottom:1,left:-1,right:1};r.labelDirection=r.tickDirection=r.nameDirection=m[s],r.labelOffset=o?f[c[s]]-f[c.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),E1(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var g=e.get(["axisLabel","rotate"]);return r.labelRotate=a==="top"?-g:g,r.z2=1,r}function Fnt(t){return t.coordinateSystem&&t.coordinateSystem.type==="cartesian2d"}function t9(t){var e={xAxisModel:null,yAxisModel:null};return ue(e,function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,As).models[0];e[i]=o}),e}function $nt(t,e,n,i,r,o){for(var s=rC(t,n),a=!1,l=!1,u=0;u<e.length;u++)nI(e[u].getOtherAxis(n.axis).scale)&&(a=l=!0,n.axis.type==="category"&&n.axis.onBand&&(l=!1));return s.axisLineAutoShow=a,s.axisTickAutoShow=l,s.defaultNameMoveOverlap=o,new Sc(n,i,s,r)}function znt(t,e,n){var i=rC(e,n);t.updateCfg(i)}function Hnt(t,e,n){var i=rg.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,{expandToNicedExtent:!0}),s=r.length-1,a=i.getInterval.call(n),l=Gee(t,e),u=l.extent,c=l.fixMin,d=l.fixMax;t.type==="log"&&(u=iI(t.base,u,!0)),t.setBreaksFromOption(Xee(e)),t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:s,fixMin:c,fixMax:d});var f=i.getExtent.call(t);c&&(u[0]=f[0]),d&&(u[1]=f[1]);var h=i.getInterval.call(t),m=u[0],g=u[1];if(c&&d)h=(g-m)/s;else if(c)for(g=u[0]+h*s;g<u[1]&&isFinite(g)&&isFinite(u[1]);)h=Ix(h),g=u[0]+h*s;else if(d)for(m=u[1]-h*s;m>u[0]&&isFinite(m)&&isFinite(u[0]);)h=Ix(h),m=u[1]-h*s;else{var v=t.getTicks().length-1;v>s&&(h=Ix(h));var p=h*s;g=Math.ceil(u[1]/h)*h,m=_r(g-p),m<0&&u[0]>=0?(m=0,g=_r(p)):g>0&&u[1]<=0&&(g=0,m=-_r(p))}var b=(r[0].value-o[0].value)/a,y=(r[s].value-o[s].value)/a;i.setExtent.call(t,m+h*b,g+h*y),i.setInterval.call(t,h),(b||y)&&i.setNiceExtent.call(t,m+h,g-h)}var n9=[[3,1],[0,2]],Unt=(function(){function t(e,n,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cI,this._initCartesian(e,n,i),this.model=e}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(e,n){var i=this._axesMap;this._updateScale(e,this.model);function r(s){var a,l=hi(s),u=l.length;if(u){for(var c=[],d=u-1;d>=0;d--){var f=+l[d],h=s[f],m=h.model,g=h.scale;nI(g)&&m.get("alignTicks")&&m.get("interval")==null?c.push(h):(I7(g,m),nI(g)&&(a=h))}c.length&&(a||(a=c.pop(),I7(a.scale,a.model)),ue(c,function(v){Hnt(v.scale,v.model,a.scale)}))}}r(i.x),r(i.y);var o={};ue(i.x,function(s){i9(i,"y",s,o)}),ue(i.y,function(s){i9(i,"x",s,o)}),this.resize(this.model,n)},t.prototype.resize=function(e,n,i){var r=WXe(e,n),o=this._rect=EL(e.getBoxLayoutParams(),r.refContainer),s=this._axesMap,a=this._coordsList,l=e.get("containLabel");if(kte(s,o),!i){var u=qnt(o,a,s,l,n),c=void 0;if(l)c=s9(o.clone(),"axisLabel",null,o,s,u,r);else{var d=jnt(e,o,r),f=d.outerBoundsRect,h=d.parsedOuterBoundsContain,m=d.outerBoundsClamp;f&&(c=s9(f,h,m,o,s,u,r))}Tte(o,s,ba.determine,null,c,r)}ue(this._coordsList,function(g){g.calcAffineTransform()})},t.prototype.getAxis=function(e,n){var i=this._axesMap[e];if(i!=null)return i[n||0]},t.prototype.getAxes=function(){return this._axesList.slice()},t.prototype.getCartesian=function(e,n){if(e!=null&&n!=null){var i="x"+e+"y"+n;return this._coordsMap[i]}Rt(e)&&(n=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,o=this._coordsList;r<o.length;r++)if(o[r].getAxis("x").index===e||o[r].getAxis("y").index===n)return o[r]},t.prototype.getCartesians=function(){return this._coordsList.slice()},t.prototype.convertToPixel=function(e,n,i){var r=this._findConvertTarget(n);return r.cartesian?r.cartesian.dataToPoint(i):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(i)):null},t.prototype.convertFromPixel=function(e,n,i){var r=this._findConvertTarget(n);return r.cartesian?r.cartesian.pointToData(i):r.axis?r.axis.coordToData(r.axis.toLocalCoord(i)):null},t.prototype._findConvertTarget=function(e){var n=e.seriesModel,i=e.xAxisModel||n&&n.getReferringComponents("xAxis",As).models[0],r=e.yAxisModel||n&&n.getReferringComponents("yAxis",As).models[0],o=e.gridModel,s=this._coordsList,a,l;if(n)a=n.coordinateSystem,Dn(s,a)<0&&(a=null);else if(i&&r)a=this.getCartesian(i.componentIndex,r.componentIndex);else if(i)l=this.getAxis("x",i.componentIndex);else if(r)l=this.getAxis("y",r.componentIndex);else if(o){var u=o.coordinateSystem;u===this&&(a=this._coordsList[0])}return{cartesian:a,axis:l}},t.prototype.containPoint=function(e){var n=this._coordsList[0];if(n)return n.containPoint(e)},t.prototype._initCartesian=function(e,n,i){var r=this,o=this,s={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},l={x:0,y:0};if(n.eachComponent("xAxis",u("x"),this),n.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=a,ue(a.x,function(c,d){ue(a.y,function(f,h){var m="x"+d+"y"+h,g=new Cnt(m);g.master=r,g.model=e,r._coordsMap[m]=g,r._coordsList.push(g),g.addAxis(c),g.addAxis(f)})});function u(c){return function(d,f){if(Bx(d,e)){var h=d.get("position");c==="x"?h!=="top"&&h!=="bottom"&&(h=s.bottom?"top":"bottom"):h!=="left"&&h!=="right"&&(h=s.left?"right":"left"),s[h]=!0;var m=new Snt(c,Het(d),[0,0],d.get("type"),h),g=m.type==="category";m.onBand=g&&d.get("boundaryGap"),m.inverse=d.get("inverse"),d.axis=m,m.model=d,m.grid=o,m.index=f,o._axesList.push(m),a[c][f]=m,l[c]++}}}},t.prototype._updateScale=function(e,n){ue(this._axesList,function(r){if(r.scale.setExtent(1/0,-1/0),r.type==="category"){var o=r.model.get("categorySortInfo");r.scale.setSortInfo(o)}}),e.eachSeries(function(r){if(Fnt(r)){var o=t9(r),s=o.xAxisModel,a=o.yAxisModel;if(!Bx(s,n)||!Bx(a,n))return;var l=this.getCartesian(s.componentIndex,a.componentIndex),u=r.getData(),c=l.getAxis("x"),d=l.getAxis("y");i(u,c),i(u,d)}},this);function i(r,o){ue(Wet(r,o.dim),function(s){o.scale.unionExtentFromData(r,s)})}},t.prototype.getTooltipAxes=function(e){var n=[],i=[];return ue(this.getCartesians(),function(r){var o=e!=null&&e!=="auto"?r.getAxis(e):r.getBaseAxis(),s=r.getOtherAxis(o);Dn(n,o)<0&&n.push(o),Dn(i,s)<0&&i.push(s)}),{baseAxes:n,otherAxes:i}},t.create=function(e,n){var i=[];return e.eachComponent("grid",function(r,o){var s=new t(r,e,n);s.name="grid_"+o,s.resize(r,n,!0),r.coordinateSystem=s,i.push(s)}),e.eachSeries(function(r){zXe({targetModel:r,coordSysType:"cartesian2d",coordSysProvider:o});function o(){var s=t9(r),a=s.xAxisModel,l=s.yAxisModel,u=a.getCoordSysModel(),c=u.coordinateSystem;return c.getCartesian(a.componentIndex,l.componentIndex)}}),i},t.dimensions=cI,t})();function Bx(t,e){return t.getCoordSysModel()===e}function i9(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var r=t[e],o,s=n.model,a=s.get(["axisLine","onZero"]),l=s.get(["axisLine","onZeroAxisIndex"]);if(!a)return;if(l!=null)r9(r[l])&&(o=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&r9(r[u])&&!i[c(r[u])]){o=r[u];break}o&&(i[c(o)]=!0);function c(d){return d.dim+"_"+d.index}}function r9(t){return t&&t.type!=="category"&&t.type!=="time"&&Uet(t)}function Wnt(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord=t.dim==="x"?function(r){return r+e}:function(r){return i-r+e},t.toLocalCoord=t.dim==="x"?function(r){return r-e}:function(r){return i-r+e}}function kte(t,e){ue(t.x,function(n){return o9(n,e.x,e.width)}),ue(t.y,function(n){return o9(n,e.y,e.height)})}function o9(t,e,n){var i=[0,n],r=t.inverse?1:0;t.setExtent(i[r],i[1-r]),Wnt(t,e)}function s9(t,e,n,i,r,o,s){Tte(i,r,ba.estimate,e,!1,s);var a=[0,0,0,0];u(0),u(1),c(i,0,NaN),c(i,1,NaN);var l=Gqe(a,function(f){return f>0})==null;return U1(i,a,!0,!0,n),kte(r,i),l;function u(f){ue(r[zd[f]],function(h){if(Db(h.model)){var m=o.ensureRecord(h.model),g=m.labelInfoList;if(g)for(var v=0;v<g.length;v++){var p=g[v],b=h.scale.normalize(Bb(p.label).tickValue);b=f===1?1-b:b,c(p.rect,f,b),c(p.rect,1-f,NaN)}var y=m.nameLayout;if(y){var b=og(m.nameLocation)?.5:NaN;c(y.rect,f,b),c(y.rect,1-f,NaN)}}})}function c(f,h,m){var g=t[zd[h]]-f[zd[h]],v=f[Sb[h]]+f[zd[h]]-(t[Sb[h]]+t[zd[h]]);g=d(g,1-m),v=d(v,m);var p=n9[h][0],b=n9[h][1];a[p]=ns(a[p],g),a[b]=ns(a[b],v)}function d(f,h){return f>0&&!bb(h)&&h>1e-4&&(f/=h),f}}function qnt(t,e,n,i,r){var o=new bte(Knt);return ue(n,function(s){return ue(s,function(a){if(Db(a.model)){var l=!i;a.axisBuilder=$nt(t,e,a.model,r,o,l)}})}),o}function Tte(t,e,n,i,r,o){var s=n===ba.determine;ue(e,function(u){return ue(u,function(c){Db(c.model)&&(znt(c.axisBuilder,t,c.model),c.axisBuilder.build(s?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:r}))})});var a={x:0,y:0};l(0),l(1);function l(u){a[zd[1-u]]=t[Sb[u]]<=o.refContainer[Sb[u]]*.5?0:1-u===1?2:1}ue(e,function(u,c){return ue(u,function(d){Db(d.model)&&((i==="all"||s)&&d.axisBuilder.build({axisName:!0},{nameMarginLevel:a[c]}),s&&d.axisBuilder.build({axisLine:!0}))})})}function jnt(t,e,n){var i,r=t.get("outerBoundsMode",!0);r==="same"?i=e.clone():(r==null||r==="auto")&&(i=EL(t.get("outerBounds",!0)||gte,n.refContainer));var o=t.get("outerBoundsContain",!0),s;o==null||o==="auto"||Dn(["all","axisLabel"],o)<0?s="all":s=o;var a=[TP(Ut(t.get("outerBoundsClampWidth",!0),iC[0]),e.width),TP(Ut(t.get("outerBoundsClampHeight",!0),iC[1]),e.height)];return{outerBoundsRect:i,parsedOuterBoundsContain:s,outerBoundsClamp:a}}var Knt=function(t,e,n,i,r,o){var s=n.axis.dim==="x"?"y":"x";yte(t,e,n,i,r,o),og(t.nameLocation)||ue(e.recordMap[s],function(a){a&&a.labelInfoList&&a.dirVec&&_te(a.labelInfoList,a.dirVec,i,r)})};function Gnt(t,e){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Ynt(n,t,e),n.seriesInvolved&&Jnt(n,t),n}function Ynt(t,e,n){var i=e.getComponent("tooltip"),r=e.getComponent("axisPointer"),o=r.get("link",!0)||[],s=[];ue(n.getCoordinateSystems(),function(a){if(!a.axisPointerEnabled)return;var l=Vb(a.model),u=t.coordSysAxesInfo[l]={};t.coordSysMap[l]=a;var c=a.model,d=c.getModel("tooltip",i);if(ue(a.getAxes(),Ls(g,!1,null)),a.getTooltipAxes&&i&&d.get("show")){var f=d.get("trigger")==="axis",h=d.get(["axisPointer","type"])==="cross",m=a.getTooltipAxes(d.get(["axisPointer","axis"]));(f||h)&&ue(m.baseAxes,Ls(g,h?"cross":!0,f)),h&&ue(m.otherAxes,Ls(g,"cross",!1))}function g(v,p,b){var y=b.model.getModel("axisPointer",r),_=y.get("show");if(!(!_||_==="auto"&&!v&&!fI(y))){p==null&&(p=y.get("triggerTooltip")),y=v?Xnt(b,d,r,e,v,p):y;var C=y.get("snap"),S=y.get("triggerEmphasis"),k=Vb(b.model),T=p||C||b.type==="category",E=t.axesInfo[k]={key:k,axis:b,coordSys:a,axisPointerModel:y,triggerTooltip:p,triggerEmphasis:S,involveSeries:T,snap:C,useHandle:fI(y),seriesModels:[],linkGroup:null};u[k]=E,t.seriesInvolved=t.seriesInvolved||T;var x=Znt(o,b);if(x!=null){var P=s[x]||(s[x]={axesInfo:{}});P.axesInfo[k]=E,P.mapper=o[x].mapper,E.linkGroup=P}}}})}function Xnt(t,e,n,i,r,o){var s=e.getModel("axisPointer"),a=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};ue(a,function(f){l[f]=wn(s.get(f))}),l.snap=t.type!=="category"&&!!o,s.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),r==="cross"){var c=s.get(["label","show"]);if(u.show=c??!0,!o){var d=l.lineStyle=s.get("crossStyle");d&&Xn(u,d.textStyle)}}return t.model.getModel("axisPointer",new Ii(l,n,i))}function Jnt(t,e){e.eachSeries(function(n){var i=n.coordinateSystem,r=n.get(["tooltip","trigger"],!0),o=n.get(["tooltip","show"],!0);!i||!i.model||r==="none"||r===!1||r==="item"||o===!1||n.get(["axisPointer","show"],!0)===!1||ue(t.coordSysAxesInfo[Vb(i.model)],function(s){var a=s.axis;i.getAxis(a.dim)===a&&(s.seriesModels.push(n),s.seriesDataCount==null&&(s.seriesDataCount=0),s.seriesDataCount+=n.getData().count())})})}function Znt(t,e){for(var n=e.model,i=e.dim,r=0;r<t.length;r++){var o=t[r]||{};if(Vx(o[i+"AxisId"],n.id)||Vx(o[i+"AxisIndex"],n.componentIndex)||Vx(o[i+"AxisName"],n.name))return r}}function Vx(t,e){return t==="all"||bt(t)&&Dn(t,e)>=0||t===e}function Qnt(t){var e=qL(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),s=n.get("value");s!=null&&(s=i.parse(s));var a=fI(n);o==null&&(r.status=a?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(s==null||s>l[1])&&(s=l[1]),s<l[0]&&(s=l[0]),r.value=s,a&&(r.status=e.axis.scale.isBlank()?"hide":"show")}}function qL(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Vb(t)]}function eit(t){var e=qL(t);return e&&e.axisPointerModel}function fI(t){return!!t.get(["handle","show"])}function Vb(t){return t.type+"||"+t.id}var a9={},Ete=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n}return e.prototype.render=function(n,i,r,o){this.axisPointerClass&&Qnt(n),t.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(n,r,!0)},e.prototype.updateAxisPointer=function(n,i,r,o){this._doUpdateAxisPointerClass(n,r,!1)},e.prototype.remove=function(n,i){var r=this._axisPointer;r&&r.remove(i)},e.prototype.dispose=function(n,i){this._disposeAxisPointer(i),t.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(n,i,r){var o=e.getAxisPointerClass(this.axisPointerClass);if(o){var s=eit(n);s?(this._axisPointer||(this._axisPointer=new o)).render(n,s,i,r):this._disposeAxisPointer(i)}},e.prototype._disposeAxisPointer=function(n){this._axisPointer&&this._axisPointer.dispose(n),this._axisPointer=null},e.registerAxisPointerClass=function(n,i){a9[n]=i},e.getAxisPointerClass=function(n){return n&&a9[n]},e.type="axis",e})(Cu),hI=Di();function tit(t,e,n,i){var r=n.axis;if(!r.scale.isBlank()){var o=n.getModel("splitArea"),s=o.getModel("areaStyle"),a=s.get("color"),l=i.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:o,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(u.length){var c=a.length,d=hI(t).splitAreaColors,f=cn(),h=0;if(d)for(var m=0;m<u.length;m++){var g=d.get(u[m].tickValue);if(g!=null){h=(g+(c-1)*m)%c;break}}var v=r.toGlobalCoord(u[0].coord),p=s.getAreaStyle();a=bt(a)?a:[a];for(var m=1;m<u.length;m++){var b=r.toGlobalCoord(u[m].coord),y=void 0,_=void 0,C=void 0,S=void 0;r.isHorizontal()?(y=v,_=l.y,C=b-y,S=l.height,v=y+C):(y=l.x,_=v,C=l.width,S=b-_,v=_+S);var k=u[m-1].tickValue;k!=null&&f.set(k,h),e.add(new Fr({anid:k!=null?"area_"+k:null,shape:{x:y,y:_,width:C,height:S},style:Xn({fill:a[h]},p),autoBatch:!0,silent:!0})),h=(h+1)%c}hI(t).splitAreaColors=f}}}function nit(t){hI(t).splitAreaColors=null}var iit=["splitArea","splitLine","minorSplitLine","breakArea"],xte=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="CartesianAxisPointer",n}return e.prototype.render=function(n,i,r,o){this.group.removeAll();var s=this._axisGroup;if(this._axisGroup=new ao,this.group.add(this._axisGroup),!!Db(n)){this._axisGroup.add(n.axis.axisBuilder.group),ue(iit,function(l){n.get([l,"show"])&&rit[l](this,this._axisGroup,n,n.getCoordSysModel(),r)},this);var a=o&&o.type==="changeAxisOrder"&&o.isInitSort;a||uQ(s,this._axisGroup,n),t.prototype.render.call(this,n,i,r,o)}},e.prototype.remove=function(){nit(this)},e.type="cartesianAxis",e})(Ete),rit={splitLine:function(t,e,n,i,r){var o=n.axis;if(!o.scale.isBlank()){var s=n.getModel("splitLine"),a=s.getModel("lineStyle"),l=a.get("color"),u=s.get("showMinLine")!==!1,c=s.get("showMaxLine")!==!1;l=bt(l)?l:[l];for(var d=i.coordinateSystem.getRect(),f=o.isHorizontal(),h=0,m=o.getTicksCoords({tickModel:s,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),g=[],v=[],p=a.getLineStyle(),b=0;b<m.length;b++){var y=o.toGlobalCoord(m[b].coord);if(!(b===0&&!u||b===m.length-1&&!c)){var _=m[b].tickValue;f?(g[0]=y,g[1]=d.y,v[0]=y,v[1]=d.y+d.height):(g[0]=d.x,g[1]=y,v[0]=d.x+d.width,v[1]=y);var C=h++%l.length,S=new Nc({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:g[0],y1:g[1],x2:v[0],y2:v[1]},style:Xn({stroke:l[C]},p),silent:!0});kb(S.shape,p.lineWidth),e.add(S)}}}},minorSplitLine:function(t,e,n,i,r){var o=n.axis,s=n.getModel("minorSplitLine"),a=s.getModel("lineStyle"),l=i.coordinateSystem.getRect(),u=o.isHorizontal(),c=o.getMinorTicksCoords();if(c.length)for(var d=[],f=[],h=a.getLineStyle(),m=0;m<c.length;m++)for(var g=0;g<c[m].length;g++){var v=o.toGlobalCoord(c[m][g].coord);u?(d[0]=v,d[1]=l.y,f[0]=v,f[1]=l.y+l.height):(d[0]=l.x,d[1]=v,f[0]=l.x+l.width,f[1]=v);var p=new Nc({anid:"minor_line_"+c[m][g].tickValue,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},style:h,silent:!0});kb(p.shape,h.lineWidth),e.add(p)}},splitArea:function(t,e,n,i,r){tit(t,e,n,i)},breakArea:function(t,e,n,i,r){n.axis.scale}},Ate=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n}return e.type="xAxis",e})(xte),oit=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=Ate.type,n}return e.type="yAxis",e})(xte),sit=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="grid",n}return e.prototype.render=function(n,i){this.group.removeAll(),n.get("show")&&this.group.add(new Fr({shape:n.coordinateSystem.getRect(),style:Xn({fill:n.get("backgroundColor")},n.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e})(Cu),l9={offset:0};function ait(t){t.registerComponentView(sit),t.registerComponentModel(hnt),t.registerCoordinateSystem("cartesian2d",Unt),X7(t,"x",uI,l9),X7(t,"y",uI,l9),t.registerComponentView(Ate),t.registerComponentView(oit),t.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var Hd=Di(),u9=wn,Fx=ii,lit=(function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(e,n,i,r){var o=n.get("value"),s=n.get("status");if(this._axisModel=e,this._axisPointerModel=n,this._api=i,!(!r&&this._lastValue===o&&this._lastStatus===s)){this._lastValue=o,this._lastStatus=s;var a=this._group,l=this._handle;if(!s||s==="hide"){a&&a.hide(),l&&l.hide();return}a&&a.show(),l&&l.show();var u={};this.makeElOption(u,o,e,n,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var d=this._moveAnimation=this.determineAnimation(e,n);if(!a)a=this._group=new ao,this.createPointerEl(a,u,e,n),this.createLabelEl(a,u,e,n),i.getZr().add(a);else{var f=Ls(c9,n,d);this.updatePointerEl(a,u,f),this.updateLabelEl(a,u,f,n)}f9(a,n,!0),this._renderHandle(o)}},t.prototype.remove=function(e){this.clear(e)},t.prototype.dispose=function(e){this.clear(e)},t.prototype.determineAnimation=function(e,n){var i=n.get("animation"),r=e.axis,o=r.type==="category",s=n.get("snap");if(!s&&!o)return!1;if(i==="auto"||i==null){var a=this.animationThreshold;if(o&&r.getBandWidth()>a)return!0;if(s){var l=qL(e).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/l>a}return!1}return i===!0},t.prototype.makeElOption=function(e,n,i,r,o){},t.prototype.createPointerEl=function(e,n,i,r){var o=n.pointer;if(o){var s=Hd(e).pointerEl=new aXe[o.type](u9(n.pointer));e.add(s)}},t.prototype.createLabelEl=function(e,n,i,r){if(n.label){var o=Hd(e).labelEl=new va(u9(n.label));e.add(o),d9(o,r)}},t.prototype.updatePointerEl=function(e,n,i){var r=Hd(e).pointerEl;r&&n.pointer&&(r.setStyle(n.pointer.style),i(r,{shape:n.pointer.shape}))},t.prototype.updateLabelEl=function(e,n,i,r){var o=Hd(e).labelEl;o&&(o.setStyle(n.label.style),i(o,{x:n.label.x,y:n.label.y}),d9(o,r))},t.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),s=n.get("status");if(!o.get("show")||!s||s==="hide"){r&&i.remove(r),this._handle=null;return}var a;this._handle||(a=!0,r=this._handle=cQ(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){QJ(u.event)},onmousedown:Fx(this._onHandleDragMove,this,0,0),drift:Fx(this._onHandleDragMove,this),ondragend:Fx(this._onHandleDragEnd,this)}),i.add(r)),f9(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=o.get("size");bt(l)||(l=[l,l]),r.scaleX=l[0]/2,r.scaleY=l[1]/2,see(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,a)}},t.prototype._moveHandleToValue=function(e,n){c9(this._axisPointerModel,!n&&this._moveAnimation,this._handle,$x(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(e,n){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform($x(i),[e,n],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr($x(r)),Hd(i).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var n=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:n.cursorPoint[0],y:n.cursorPoint[1],tooltipOption:n.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var n=this._axisPointerModel.get("value");this._moveHandleToValue(n),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var n=e.getZr(),i=this._group,r=this._handle;n&&i&&(this._lastGraphicKey=null,i&&n.remove(i),r&&n.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),jP(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(e,n,i){return i=i||0,{x:e[i],y:e[1-i],width:n[i],height:n[1-i]}},t})();function c9(t,e,n,i){Pte(Hd(n).lastProp,i)||(Hd(n).lastProp=i,e?Af(n,i,t):(n.stopAnimation(),n.attr(i)))}function Pte(t,e){if(Rt(t)&&Rt(e)){var n=!0;return ue(e,function(i,r){n=n&&Pte(t[r],i)}),!!n}else return t===e}function d9(t,e){t[e.get(["label","show"])?"show":"hide"]()}function $x(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function f9(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(o){o.type!=="group"&&(i!=null&&(o.z=i),r!=null&&(o.zlevel=r),o.silent=n)})}function uit(t){var e=t.get("type"),n=t.getModel(e+"Style"),i;return e==="line"?(i=n.getLineStyle(),i.fill=null):e==="shadow"&&(i=n.getAreaStyle(),i.stroke=null),i}function cit(t,e,n,i,r){var o=n.get("value"),s=Ite(o,e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),l=kL(a.get("padding")||0),u=a.getFont(),c=vZ(s,u),d=r.position,f=c.width+l[1]+l[3],h=c.height+l[0]+l[2],m=r.align;m==="right"&&(d[0]-=f),m==="center"&&(d[0]-=f/2);var g=r.verticalAlign;g==="bottom"&&(d[1]-=h),g==="middle"&&(d[1]-=h/2),dit(d,f,h,i);var v=a.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),t.label={x:d[0],y:d[1],style:Eb(a,{text:s,font:u,fill:a.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function dit(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function Ite(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),s=r.formatter;if(s){var a={value:Q1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};ue(i,function(l){var u=n.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,d=u&&u.getDataParams(c);d&&a.seriesData.push(d)}),At(s)?o=s.replace("{value}",o):Xt(s)&&(o=s(a))}return o}function Rte(t,e,n){var i=uu();return UO(i,i,n.rotation),uP(i,i,n.position),lL([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function fit(t,e,n,i,r,o){var s=Sc.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),cit(e,i,r,o,{position:Rte(i.axis,t,n),align:s.textAlign,verticalAlign:s.textVerticalAlign})}function hit(t,e,n){return n=n||0,{x1:t[n],y1:t[1-n],x2:e[n],y2:e[1-n]}}function mit(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}}var git=(function(t){yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.makeElOption=function(n,i,r,o,s){var a=r.axis,l=a.grid,u=o.get("type"),c=h9(l,a).getOtherAxis(a).getGlobalExtent(),d=a.toGlobalCoord(a.dataToCoord(i,!0));if(u&&u!=="none"){var f=uit(o),h=pit[u](a,d,c);h.style=f,n.graphicKey=h.type,n.pointer=h}var m=rC(l.getRect(),r);fit(i,n,m,r,o,s)},e.prototype.getHandleTransform=function(n,i,r){var o=rC(i.axis.grid.getRect(),i,{labelInside:!1});o.labelMargin=r.get(["handle","margin"]);var s=Rte(i.axis,n,o);return{x:s[0],y:s[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(n,i,r,o){var s=r.axis,a=s.grid,l=s.getGlobalExtent(!0),u=h9(a,s).getOtherAxis(s).getGlobalExtent(),c=s.dim==="x"?0:1,d=[n.x,n.y];d[c]+=i[c],d[c]=Math.min(l[1],d[c]),d[c]=Math.max(l[0],d[c]);var f=(u[1]+u[0])/2,h=[f,f];h[c]=d[c];var m=[{verticalAlign:"middle"},{align:"center"}];return{x:d[0],y:d[1],rotation:n.rotation,cursorPoint:h,tooltipOption:m[c]}},e})(lit);function h9(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var pit={line:function(t,e,n){var i=hit([e,n[0]],[e,n[1]],m9(t));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:mit([e-i/2,n[0]],[i,r],m9(t))}}};function m9(t){return t.dim==="x"?0:1}var vit=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:dn.color.border,width:1,type:"dashed"},shadowStyle:{color:dn.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:dn.color.neutral00,padding:[5,7,5,7],backgroundColor:dn.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:dn.color.accent40,throttle:40}},e})(jn),iu=Di(),bit=ue;function Mte(t,e,n){if(!Kt.node){var i=e.getZr();iu(i).records||(iu(i).records={}),yit(i,e);var r=iu(i).records[t]||(iu(i).records[t]={});r.handler=n}}function yit(t,e){if(iu(t).initialized)return;iu(t).initialized=!0,n("click",Ls(g9,"click")),n("mousemove",Ls(g9,"mousemove")),n("globalout",_it);function n(i,r){t.on(i,function(o){var s=Cit(e);bit(iu(t).records,function(a){a&&r(a,o,s.dispatchAction)}),wit(s.pendings,e)})}}function wit(t,e){var n=t.showTip.length,i=t.hideTip.length,r;n?r=t.showTip[n-1]:i&&(r=t.hideTip[i-1]),r&&(r.dispatchAction=null,e.dispatchAction(r))}function _it(t,e,n){t.handler("leave",null,n)}function g9(t,e,n,i){e.handler(t,n,i)}function Cit(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}function mI(t,e){if(!Kt.node){var n=e.getZr(),i=(iu(n).records||{})[t];i&&(iu(n).records[t]=null)}}var Sit=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n}return e.prototype.render=function(n,i,r){var o=i.getComponent("tooltip"),s=n.get("triggerOn")||o&&o.get("triggerOn")||"mousemove|click";Mte("axisPointer",r,function(a,l,u){s!=="none"&&(a==="leave"||s.indexOf(a)>=0)&&u({type:"updateAxisPointer",currTrigger:a,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(n,i){mI("axisPointer",i)},e.prototype.dispose=function(n,i){mI("axisPointer",i)},e.type="axisPointer",e})(Cu);function Ote(t,e){var n=[],i=t.seriesIndex,r;if(i==null||!(r=e.getSeriesByIndex(i)))return{point:[]};var o=r.getData(),s=Ef(o,t);if(s==null||s<0||bt(s))return{point:[]};var a=o.getItemGraphicEl(s),l=r.coordinateSystem;if(r.getTooltipPosition)n=r.getTooltipPosition(s)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),d=c.dim,f=u.dim,h=d==="x"||d==="radius"?1:0,m=o.mapDimension(f),g=[];g[h]=o.get(m,s),g[1-h]=o.get(o.getCalculationInfo("stackResultDimension"),s),n=l.dataToPoint(g)||[]}else n=l.dataToPoint(o.getValues(jt(l.dimensions,function(p){return o.mapDimension(p)}),s))||[];else if(a){var v=a.getBoundingRect().clone();v.applyTransform(a.transform),n=[v.x+v.width/2,v.y+v.height/2]}return{point:n,el:a}}var p9=Di();function kit(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,s=t.dispatchAction||ii(n.dispatchAction,n),a=e.getComponent("axisPointer").coordSysAxesInfo;if(a){w_(r)&&(r=Ote({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=w_(r),u=o.axesInfo,c=a.axesInfo,d=i==="leave"||w_(r),f={},h={},m={list:[],map:{}},g={showPointer:Ls(Eit,h),showTooltip:Ls(xit,m)};ue(a.coordSysMap,function(p,b){var y=l||p.containPoint(r);ue(a.coordSysAxesInfo[b],function(_,C){var S=_.axis,k=Rit(u,_);if(!d&&y&&(!u||k)){var T=k&&k.value;T==null&&!l&&(T=S.pointToData(r)),T!=null&&v9(_,T,g,!1,f)}})});var v={};return ue(c,function(p,b){var y=p.linkGroup;y&&!h[b]&&ue(y.axesInfo,function(_,C){var S=h[C];if(_!==p&&S){var k=S.value;y.mapper&&(k=p.axis.scale.parse(y.mapper(k,b9(_),b9(p)))),v[p.key]=k}})}),ue(v,function(p,b){v9(c[b],p,g,!0,f)}),Ait(h,c,f),Pit(m,r,t,s),Iit(c,s,n),f}}function v9(t,e,n,i,r){var o=t.axis;if(!(o.scale.isBlank()||!o.containData(e))){if(!t.involveSeries){n.showPointer(t,e);return}var s=Tit(e,t),a=s.payloadBatch,l=s.snapToValue;a[0]&&r.seriesIndex==null&&lt(r,a[0]),!i&&t.snap&&o.containData(l)&&l!=null&&(e=l),n.showPointer(t,e,a),n.showTooltip(t,s,l)}}function Tit(t,e){var n=e.axis,i=n.dim,r=t,o=[],s=Number.MAX_VALUE,a=-1;return ue(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(i),d,f;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,t,n);f=h.dataIndices,d=h.nestestValue}else{if(f=l.indicesOfNearest(i,c[0],t,n.type==="category"?.5:null),!f.length)return;d=l.getData().get(c[0],f[0])}if(!(d==null||!isFinite(d))){var m=t-d,g=Math.abs(m);g<=s&&((g<s||m>=0&&a<0)&&(s=g,a=m,r=d,o.length=0),ue(f,function(v){o.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:o,snapToValue:r}}function Eit(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function xit(t,e,n,i){var r=n.payloadBatch,o=e.axis,s=o.model,a=e.axisPointerModel;if(!(!e.triggerTooltip||!r.length)){var l=e.coordSys.model,u=Vb(l),c=t.map[u];c||(c=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:a.get(["label","precision"]),formatter:a.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function Ait(t,e,n){var i=n.axesInfo=[];ue(e,function(r,o){var s=r.axisPointerModel.option,a=t[o];a?(!r.useHandle&&(s.status="show"),s.value=a.value,s.seriesDataIndices=(a.payloadBatch||[]).slice()):!r.useHandle&&(s.status="hide"),s.status==="show"&&i.push({axisDim:r.axis.dim,axisIndex:r.axis.model.componentIndex,value:s.value})})}function Pit(t,e,n,i){if(w_(e)||!t.list.length){i({type:"hideTip"});return}var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}function Iit(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=p9(i)[r]||{},s=p9(i)[r]={};ue(t,function(u,c){var d=u.axisPointerModel.option;d.status==="show"&&u.triggerEmphasis&&ue(d.seriesDataIndices,function(f){var h=f.seriesIndex+" | "+f.dataIndex;s[h]=f})});var a=[],l=[];ue(o,function(u,c){!s[c]&&l.push(u)}),ue(s,function(u,c){!o[c]&&a.push(u)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),a.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:a})}function Rit(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}function b9(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function w_(t){return!t||t[0]==null||isNaN(t[0])||t[1]==null||isNaN(t[1])}function Lte(t){Ete.registerAxisPointerClass("CartesianAxisPointer",git),t.registerComponentModel(vit),t.registerComponentView(Sit),t.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var n=e.axisPointer.link;n&&!bt(n)&&(e.axisPointer.link=[n])}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(e,n){e.getComponent("axisPointer").coordSysAxesInfo=Gnt(e,n)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},kit)}function Mit(t){Nb(ait),Nb(Lte)}var Oit=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:dn.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:dn.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:dn.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:dn.color.tertiary,fontSize:14}},e})(jn);function Dte(t){var e=t.get("confine");return e!=null?!!e:t.get("renderMode")==="richText"}function Nte(t){if(Kt.domSupported){for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}}var Bte=Nte(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Lit=Nte(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function Vte(t,e){if(!t)return e;e=PQ(e,!0);var n=t.indexOf(e);return t=n===-1?e:"-"+t.slice(0,n)+"-"+e,t.toLowerCase()}function Dit(t,e){var n=t.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(t);return n?n[e]:null}var Nit=Vte(Lit,"transition"),jL=Vte(Bte,"transform"),Bit="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Kt.transform3dSupported?"will-change:transform;":"");function Vit(t){return t=t==="left"?"right":t==="right"?"left":t==="top"?"bottom":"top",t}function Fit(t,e,n){if(!At(n)||n==="inside")return"";var i=t.get("backgroundColor"),r=t.get("borderWidth");e=Pf(e);var o=Vit(n),s=Math.max(Math.round(r)*1.5,6),a="",l=jL+":",u;Dn(["left","right"],o)>-1?(a+="top:50%",l+="translateY(-50%) rotate("+(u=o==="left"?-225:-45)+"deg)"):(a+="left:50%",l+="translateX(-50%) rotate("+(u=o==="top"?225:45)+"deg)");var c=u*Math.PI/180,d=s+r,f=d*Math.abs(Math.cos(c))+d*Math.abs(Math.sin(c)),h=Math.round(((f-Math.SQRT2*r)/2+Math.SQRT2*r-(f-d)/2)*100)/100;a+=";"+o+":-"+h+"px";var m=e+" solid "+r+"px;",g=["position:absolute;width:"+s+"px;height:"+s+"px;z-index:-1;",a+";"+l+";","border-bottom:"+m,"border-right:"+m,"background-color:"+i+";"];return'<div style="'+g.join("")+'"></div>'}function $it(t,e,n){var i="cubic-bezier(0.23,1,0.32,1)",r="",o="";return n&&(r=" "+t/2+"s "+i,o="opacity"+r+",visibility"+r),e||(r=" "+t+"s "+i,o+=(o.length?",":"")+(Kt.transformSupported?""+jL+r:",left"+r+",top"+r)),Nit+":"+o}function y9(t,e,n){var i=t.toFixed(0)+"px",r=e.toFixed(0)+"px";if(!Kt.transformSupported)return n?"top:"+r+";left:"+i+";":[["top",r],["left",i]];var o=Kt.transform3dSupported,s="translate"+(o?"3d":"")+"("+i+","+r+(o?",0":"")+")";return n?"top:0;left:0;"+jL+":"+s+";":[["top",0],["left",0],[Bte,s]]}function zit(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont());var r=Ut(t.get("lineHeight"),Math.round(n*3/2));n&&e.push("line-height:"+r+"px");var o=t.get("textShadowColor"),s=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return o&&s&&e.push("text-shadow:"+a+"px "+l+"px "+s+"px "+o),ue(["decoration","align"],function(u){var c=t.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function Hit(t,e,n,i){var r=[],o=t.get("transitionDuration"),s=t.get("backgroundColor"),a=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),c=t.get("shadowOffsetY"),d=t.getModel("textStyle"),f=iee(t,"html"),h=u+"px "+c+"px "+a+"px "+l;return r.push("box-shadow:"+h),e&&o>0&&r.push($it(o,n,i)),s&&r.push("background-color:"+s),ue(["width","color","radius"],function(m){var g="border-"+m,v=PQ(g),p=t.get(v);p!=null&&r.push(g+":"+p+(m==="color"?"":"px"))}),r.push(zit(d)),f!=null&&r.push("padding:"+kL(f).join("px ")+"px"),r.join(";")+";"}function w9(t,e,n,i,r){var o=e&&e.painter;if(n){var s=o&&o.getViewportRoot();s&&dje(t,s,n,i,r)}else{t[0]=i,t[1]=r;var a=o&&o.getViewportRootOffset();a&&(t[0]+=a.offsetLeft,t[1]+=a.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var Uit=(function(){function t(e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Kt.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=n.appendTo,s=o&&(At(o)?document.querySelector(o):vb(o)?o:Xt(o)&&o(e.getDom()));w9(this._styleCoord,r,s,e.getWidth()/2,e.getHeight()/2),(s||e.getDom()).appendChild(i),this._api=e,this._container=s;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!a._enterable){var u=r.handler,c=r.painter.getViewportRoot();_s(c,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){a._inContent=!1,a._enterable&&a._show&&a.hideLater(a._hideDelay)}}return t.prototype.update=function(e){if(!this._container){var n=this._api.getDom(),i=Dit(n,"position"),r=n.style;r.position!=="absolute"&&i!=="absolute"&&(r.position="relative")}var o=e.get("alwaysShowContent");o&&this._moveIfResized(),this._alwaysShowContent=o,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},t.prototype.show=function(e,n){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,r=i.style,o=this._styleCoord;i.innerHTML?r.cssText=Bit+Hit(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+y9(o[0],o[1],!0)+("border-color:"+Pf(n)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(e,n,i,r,o){var s=this.el;if(e==null){s.innerHTML="";return}var a="";if(At(o)&&i.get("trigger")==="item"&&!Dte(i)&&(a=Fit(i,r,o)),At(e))s.innerHTML=e+a;else if(e){s.innerHTML="",bt(e)||(e=[e]);for(var l=0;l<e.length;l++)vb(e[l])&&e[l].parentNode!==s&&s.appendChild(e[l]);if(a&&s.childNodes.length){var u=document.createElement("div");u.innerHTML=a,s.appendChild(u)}}},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},t.prototype.moveTo=function(e,n){if(this.el){var i=this._styleCoord;if(w9(i,this._zr,this._container,e,n),i[0]!=null&&i[1]!=null){var r=this.el.style,o=y9(i[0],i[1]);ue(o,function(s){r[s[0]]=s[1]})}}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],n=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),n*this._zr.getHeight())},t.prototype.hide=function(){var e=this,n=this.el.style;this._enableDisplayTransition?(n.visibility="hidden",n.opacity="0"):n.display="none",Kt.transform3dSupported&&(n.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ii(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;fje(e&&e.painter&&e.painter.getViewportRoot(),this._container);var n=this.el;if(n){n.onmouseenter=n.onmousemove=n.onmouseleave=null;var i=n.parentNode;i&&i.removeChild(n)}this.el=this._container=null},t})(),Wit=(function(){function t(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),C9(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return t.prototype.update=function(e){var n=e.get("alwaysShowContent");n&&this._moveIfResized(),this._alwaysShowContent=n},t.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},t.prototype.setContent=function(e,n,i,r,o){var s=this;Rt(e)&&_o(""),this.el&&this._zr.remove(this.el);var a=i.getModel("textStyle");this.el=new va({style:{rich:n.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:i.get(["textStyle","color"]),padding:iee(i,"richText"),verticalAlign:"top",align:"left"},z:i.get("z")}),ue(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){s.el.style[u]=i.get(u)}),ue(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){s.el.style[u]=a.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},t.prototype.setEnterable=function(e){this._enterable=e},t.prototype.getSize=function(){var e=this.el,n=this.el.getBoundingRect(),i=_9(e.style);return[n.width+i.left+i.right,n.height+i.top+i.bottom]},t.prototype.moveTo=function(e,n){var i=this.el;if(i){var r=this._styleCoord;C9(r,this._zr,e,n),e=r[0],n=r[1];var o=i.style,s=ec(o.borderWidth||0),a=_9(o);i.x=e+s+a.left,i.y=n+s+a.top,i.markRedraw()}},t.prototype._moveIfResized=function(){var e=this._styleCoord[2],n=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),n*this._zr.getHeight())},t.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},t.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(ii(this.hide,this),e)):this.hide())},t.prototype.isShow=function(){return this._show},t.prototype.dispose=function(){this._zr.remove(this.el)},t})();function ec(t){return Math.max(0,t)}function _9(t){var e=ec(t.shadowBlur||0),n=ec(t.shadowOffsetX||0),i=ec(t.shadowOffsetY||0);return{left:ec(e-n),right:ec(e+n),top:ec(e-i),bottom:ec(e+i)}}function C9(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var qit=new Fr({shape:{x:-1,y:-1,width:2,height:2}}),jit=(function(t){yt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type=e.type,n}return e.prototype.init=function(n,i){if(!(Kt.node||!i.getDom())){var r=n.getComponent("tooltip"),o=this._renderMode=WKe(r.get("renderMode"));this._tooltipContent=o==="richText"?new Wit(i):new Uit(i,{appendTo:r.get("appendToBody",!0)?"body":r.get("appendTo",!0)})}},e.prototype.render=function(n,i,r){if(!(Kt.node||!r.getDom())){this.group.removeAll(),this._tooltipModel=n,this._ecModel=i,this._api=r;var o=this._tooltipContent;o.update(n),o.setEnterable(n.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&n.get("transitionDuration")?see(this,"_updatePosition",50,"fixRate"):jP(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var n=this._tooltipModel,i=n.get("triggerOn");Mte("itemTooltip",this._api,ii(function(r,o,s){i!=="none"&&(i.indexOf(r)>=0?this._tryShow(o,s):r==="leave"&&this._hide(s))},this))},e.prototype._keepShow=function(){var n=this._tooltipModel,i=this._ecModel,r=this._api,o=n.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&o!=="none"&&o!=="click"){var s=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&s.manuallyShowTip(n,i,r,{x:s._lastX,y:s._lastY,dataByCoordSys:s._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(n,i,r,o){if(!(o.from===this.uid||Kt.node||!r.getDom())){var s=S9(o,r);this._ticket="";var a=o.dataByCoordSys,l=Xit(o,i,r);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:o.position,positionDefault:"bottom"},s)}else if(o.tooltip&&o.x!=null&&o.y!=null){var c=qit;c.x=o.x,c.y=o.y,c.update(),si(c).tooltipConfig={name:null,option:o.tooltip},this._tryShow({offsetX:o.x,offsetY:o.y,target:c},s)}else if(a)this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,dataByCoordSys:a,tooltipOption:o.tooltipOption},s);else if(o.seriesIndex!=null){if(this._manuallyAxisShowTip(n,i,r,o))return;var d=Ote(o,i),f=d.point[0],h=d.point[1];f!=null&&h!=null&&this._tryShow({offsetX:f,offsetY:h,target:d.el,position:o.position,positionDefault:"bottom"},s)}else o.x!=null&&o.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:o.x,y:o.y}),this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,target:r.getZr().findHover(o.x,o.y).target},s))}},e.prototype.manuallyHideTip=function(n,i,r,o){var s=this._tooltipContent;this._tooltipModel&&s.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,o.from!==this.uid&&this._hide(S9(o,r))},e.prototype._manuallyAxisShowTip=function(n,i,r,o){var s=o.seriesIndex,a=o.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(s==null||a==null||l==null)){var u=i.getSeriesByIndex(s);if(u){var c=u.getData(),d=gp([c.getItemModel(a),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(d.get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:s,dataIndex:a,position:o.position}),!0}}},e.prototype._tryShow=function(n,i){var r=n.target,o=this._tooltipModel;if(o){this._lastX=n.offsetX,this._lastY=n.offsetY;var s=n.dataByCoordSys;if(s&&s.length)this._showAxisTooltip(s,n);else if(r){var a=si(r);if(a.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ap(r,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(si(c).dataIndex!=null?l=c:si(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(n,l,i):u?this._showComponentItemTooltip(n,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},e.prototype._showOrMove=function(n,i){var r=n.get("showDelay");i=ii(i,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(i,r):i()},e.prototype._showAxisTooltip=function(n,i){var r=this._ecModel,o=this._tooltipModel,s=[i.offsetX,i.offsetY],a=gp([i.tooltipOption],o),l=this._renderMode,u=[],c=Pb("section",{blocks:[],noHeader:!0}),d=[],f=new bx;ue(n,function(b){ue(b.dataByAxis,function(y){var _=r.getComponent(y.axisDim+"Axis",y.axisIndex),C=y.value;if(!(!_||C==null)){var S=Ite(C,_.axis,r,y.seriesDataIndices,y.valueLabelOpt),k=Pb("section",{header:S,noHeader:!Ka(S),sortBlocks:!0,blocks:[]});c.blocks.push(k),ue(y.seriesDataIndices,function(T){var E=r.getSeriesByIndex(T.seriesIndex),x=T.dataIndexInside,P=E.getDataParams(x);if(!(P.dataIndex<0)){P.axisDim=y.axisDim,P.axisIndex=y.axisIndex,P.axisType=y.axisType,P.axisId=y.axisId,P.axisValue=Q1(_.axis,{value:C}),P.axisValueLabel=S,P.marker=f.makeTooltipMarker("item",Pf(P.color),l);var A=F$(E.formatTooltip(x,!0,null)),I=A.frag;if(I){var D=gp([E],o).get("valueFormatter");k.blocks.push(D?lt({valueFormatter:D},I):I)}A.text&&d.push(A.text),u.push(P)}})}})}),c.blocks.reverse(),d.reverse();var h=i.position,m=a.get("order"),g=W$(c,f,l,m,r.get("useUTC"),a.get("textStyle"));g&&d.unshift(g);var v=l==="richText"?`
`:"<br/>",p=d.join(v);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(n,u)?this._updatePosition(a,h,s[0],s[1],this._tooltipContent,u):this._showTooltipContent(a,p,u,Math.random()+"",s[0],s[1],h,null,f)})},e.prototype._showSeriesItemTooltip=function(n,i,r){var o=this._ecModel,s=si(i),a=s.seriesIndex,l=o.getSeriesByIndex(a),u=s.dataModel||l,c=s.dataIndex,d=s.dataType,f=u.getData(d),h=this._renderMode,m=n.positionDefault,g=gp([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var p=u.getDataParams(c,d),b=new bx;p.marker=b.makeTooltipMarker("item",Pf(p.color),h);var y=F$(u.formatTooltip(c,!1,d)),_=g.get("order"),C=g.get("valueFormatter"),S=y.frag,k=S?W$(C?lt({valueFormatter:C},S):S,b,h,_,o.get("useUTC"),g.get("textStyle")):y.text,T="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,k,p,T,n.offsetX,n.offsetY,n.position,n.target,b)}),r({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(n,i,r){var o=this._renderMode==="html",s=si(i),a=s.tooltipConfig,l=a.option||{},u=l.encodeHTMLContent;if(At(l)){var c=l;l={content:c,formatter:c},u=!0}u&&o&&l.content&&(l=wn(l),l.content=yo(l.content));var d=[l],f=this._ecModel.getComponent(s.componentMainType,s.componentIndex);f&&d.push(f),d.push({formatter:l.content});var h=n.positionDefault,m=gp(d,this._tooltipModel,h?{position:h}:null),g=m.get("content"),v=Math.random()+"",p=new bx;this._showOrMove(m,function(){var b=wn(m.get("formatterParams")||{});this._showTooltipContent(m,g,b,v,n.offsetX,n.offsetY,n.position,i,p)}),r({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(n,i,r,o,s,a,l,u,c){if(this._ticket="",!(!n.get("showContent")||!n.get("show"))){var d=this._tooltipContent;d.setEnterable(n.get("enterable"));var f=n.get("formatter");l=l||n.get("position");var h=i,m=this._getNearestPoint([s,a],r,n.get("trigger"),n.get("borderColor"),n.get("defaultBorderColor",!0)),g=m.color;if(f)if(At(f)){var v=n.ecModel.get("useUTC"),p=bt(r)?r[0]:r,b=p&&p.axisType&&p.axisType.indexOf("time")>=0;h=f,b&&(h=YS(p.axisValue,h,v)),h=IQ(h,r,!0)}else if(Xt(f)){var y=ii(function(_,C){_===this._ticket&&(d.setContent(C,c,n,g,l),this._updatePosition(n,l,s,a,d,r,u))},this);this._ticket=o,h=f(r,o,y)}else h=f;d.setContent(h,c,n,g,l),d.show(n,g),this._updatePosition(n,l,s,a,d,r,u)}},e.prototype._getNearestPoint=function(n,i,r,o,s){if(r==="axis"||bt(i))return{color:o||s};if(!bt(i))return{color:o||i.color||i.borderColor}},e.prototype._updatePosition=function(n,i,r,o,s,a,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||n.get("position");var d=s.getSize(),f=n.get("align"),h=n.get("verticalAlign"),m=l&&l.getBoundingRect().clone();if(l&&m.applyTransform(l.transform),Xt(i)&&(i=i([r,o],a,s.el,m,{viewSize:[u,c],contentSize:d.slice()})),bt(i))r=eo(i[0],u),o=eo(i[1],c);else if(Rt(i)){var g=i;g.width=d[0],g.height=d[1];var v=EL(g,{width:u,height:c});r=v.x,o=v.y,f=null,h=null}else if(At(i)&&l){var p=Yit(i,m,d,n.get("borderWidth"));r=p[0],o=p[1]}else{var p=Kit(r,o,s,u,c,f?null:20,h?null:20);r=p[0],o=p[1]}if(f&&(r-=k9(f)?d[0]/2:f==="right"?d[0]:0),h&&(o-=k9(h)?d[1]/2:h==="bottom"?d[1]:0),Dte(n)){var p=Git(r,o,s,u,c);r=p[0],o=p[1]}s.moveTo(r,o)},e.prototype._updateContentNotChangedOnAxis=function(n,i){var r=this._lastDataByCoordSys,o=this._cbParamsList,s=!!r&&r.length===n.length;return s&&ue(r,function(a,l){var u=a.dataByAxis||[],c=n[l]||{},d=c.dataByAxis||[];s=s&&u.length===d.length,s&&ue(u,function(f,h){var m=d[h]||{},g=f.seriesDataIndices||[],v=m.seriesDataIndices||[];s=s&&f.value===m.value&&f.axisType===m.axisType&&f.axisId===m.axisId&&g.length===v.length,s&&ue(g,function(p,b){var y=v[b];s=s&&p.seriesIndex===y.seriesIndex&&p.dataIndex===y.dataIndex}),o&&ue(f.seriesDataIndices,function(p){var b=p.seriesIndex,y=i[b],_=o[b];y&&_&&_.data!==y.data&&(s=!1)})})}),this._lastDataByCoordSys=n,this._cbParamsList=i,!!s},e.prototype._hide=function(n){this._lastDataByCoordSys=null,n({type:"hideTip",from:this.uid})},e.prototype.dispose=function(n,i){Kt.node||!i.getDom()||(jP(this,"_updatePosition"),this._tooltipContent.dispose(),mI("itemTooltip",i))},e.type="tooltip",e})(Cu);function gp(t,e,n){var i=e.ecModel,r;n?(r=new Ii(n,i,i),r=new Ii(e.option,r,i)):r=e;for(var o=t.length-1;o>=0;o--){var s=t[o];s&&(s instanceof Ii&&(s=s.get("tooltip",!0)),At(s)&&(s={formatter:s}),s&&(r=new Ii(s,r,i)))}return r}function S9(t,e){return t.dispatchAction||ii(e.dispatchAction,e)}function Kit(t,e,n,i,r,o,s){var a=n.getSize(),l=a[0],u=a[1];return o!=null&&(t+l+o+2>i?t-=l+o:t+=o),s!=null&&(e+u+s>r?e-=u+s:e+=s),[t,e]}function Git(t,e,n,i,r){var o=n.getSize(),s=o[0],a=o[1];return t=Math.min(t+s,i)-s,e=Math.min(e+a,r)-a,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function Yit(t,e,n,i){var r=n[0],o=n[1],s=Math.ceil(Math.SQRT2*i)+8,a=0,l=0,u=e.width,c=e.height;switch(t){case"inside":a=e.x+u/2-r/2,l=e.y+c/2-o/2;break;case"top":a=e.x+u/2-r/2,l=e.y-o-s;break;case"bottom":a=e.x+u/2-r/2,l=e.y+c+s;break;case"left":a=e.x-r-s,l=e.y+c/2-o/2;break;case"right":a=e.x+u+s,l=e.y+c/2-o/2}return[a,l]}function k9(t){return t==="center"||t==="middle"}function Xit(t,e,n){var i=KO(t).queryOptionMap,r=i.keys()[0];if(!(!r||r==="series")){var o=_0(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),s=o.models[0];if(s){var a=n.getViewOfComponentModel(s),l;if(a.group.traverse(function(u){var c=si(u).tooltipConfig;if(c&&c.name===t.name)return l=u,!0}),l)return{componentMainType:r,componentIndex:s.componentIndex,el:l}}}}function Jit(t){Nb(Lte),t.registerComponentModel(Oit),t.registerComponentView(jit),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Mo),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Mo)}const Zit="_container_7kp5x_2",Qit="_wrapper_7kp5x_6",ert="_loading_7kp5x_11",trt="_empty_7kp5x_12",nrt="_loading_spinner_7kp5x_22",irt="_greeting_7kp5x_37",rrt="_refreshBtn_7kp5x_52",ort="_overviewCards_7kp5x_68",srt="_card_7kp5x_75",art="_cardIcon_7kp5x_120",lrt="_cardContent_7kp5x_153",urt="_cardLabel_7kp5x_169",crt="_cardValue_7kp5x_175",drt="_sparkline_7kp5x_181",frt="_chartsGrid_7kp5x_191",hrt="_chartCard_7kp5x_197",mrt="_chartTitle_7kp5x_208",grt="_chart_wrapper_7kp5x_220",prt="_chartEmpty_7kp5x_225",vrt="_taskList_7kp5x_235",brt="_taskItem_7kp5x_242",yrt="_taskInfo_7kp5x_248",wrt="_taskTitle_7kp5x_254",_rt="_taskDot_7kp5x_263",Crt="_taskCount_7kp5x_271",Srt="_taskBarBg_7kp5x_277",krt="_taskBar_7kp5x_277",$t={container:Zit,wrapper:Qit,loading:ert,empty:trt,loading_spinner:nrt,greeting:irt,refreshBtn:rrt,overviewCards:ort,card:srt,cardIcon:art,cardContent:lrt,cardLabel:urt,cardValue:crt,sparkline:drt,chartsGrid:frt,chartCard:hrt,chartTitle:mrt,chart_wrapper:grt,chartEmpty:prt,taskList:vrt,taskItem:brt,taskInfo:yrt,taskTitle:wrt,taskDot:_rt,taskCount:Crt,taskBarBg:Srt,taskBar:krt};Nb([Vtt,fnt,Mit,Jit]);const Fte=vn({meta:{title:"数据统计",icon:"analysis",sort:1002}}),Trt=le(()=>{const t=H(null),e=H(!1),n=H(!1);async function i(){e.value=!0;try{const c=await it.statsControllerStats();c.data.success&&c.data.data&&(t.value=c.data.data)}finally{e.value=!1}}async function r(){n.value=!0;try{const c=await it.statsControllerStats();c.data.success&&c.data.data&&(t.value=c.data.data)}finally{n.value=!1}}Pt(()=>{i()});function o(c,d){return{tooltip:{trigger:"axis",formatter:f=>{const h=f[0];return`${h.name}<br/>${h.seriesName}: ${h.value}`}},grid:{top:16,right:20,bottom:30,left:45},xAxis:{type:"category",data:c.map(f=>ft(f.date).format("M月D日")),axisLine:{lineStyle:{color:"#f2f3f5"}},axisTick:{show:!1},axisLabel:{color:"#c0c4cc",fontSize:11}},yAxis:{type:"value",splitLine:{lineStyle:{color:"#f2f3f5",type:"dashed"}},axisLabel:{color:"#c0c4cc",fontSize:11}},series:[{name:"数量",type:"line",data:c.map(f=>f.count),smooth:!0,symbol:"circle",symbolSize:4,itemStyle:{color:d},lineStyle:{width:2},label:{show:!0,position:"top",fontSize:10,color:d,formatter:"{c}"},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:d+"40"},{offset:1,color:d+"05"}]}},animationDuration:1200,animationEasing:"cubicOut"}],animationDelay:200}}function s(c,d){return!c||c.length===0?L("div",{class:$t.chartEmpty},[dt("暂无数据")]):L("div",{class:$t.chart_wrapper},[L($7,{option:o(c,d),autoresize:!0},null)])}function a(c,d){return{grid:{top:2,right:2,bottom:2,left:2},xAxis:{type:"category",show:!1,data:c.map(()=>"")},yAxis:{type:"value",show:!1},series:[{type:"line",data:c.map(f=>f.count),smooth:!0,symbol:"none",lineStyle:{width:2,color:d},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:d+"30"},{offset:1,color:d+"05"}]}}}]}}function l(c,d){return!c||c.length===0?null:L("div",{class:$t.sparkline},[L($7,{option:a(c,d),autoresize:!0},null)])}function u(){const c=new Date().getHours();return c<12?{text:"早上好",emoji:"☀️"}:c<18?{text:"下午好",emoji:"🌤️"}:{text:"晚上好",emoji:"🌙"}}return()=>{if(e.value)return L("div",{class:$t.loading},[L("div",{class:$t.loading_spinner},null),L("span",null,[dt("加载中...")])]);if(!t.value)return L("div",{class:$t.empty},[dt("暂无数据")]);const c=t.value,d=u();return L("div",{class:$t.container},[L("div",{class:$t.wrapper},[L("div",{class:$t.greeting},[L("h2",null,[d.emoji,dt(" "),d.text,dt(",今天是 "),ft().format("YYYY年M月D日")]),L(Lo,{content:"刷新数据",placement:"bottom"},{default:()=>[L(Hi,{class:$t.refreshBtn,circle:!0,size:"default",loading:n.value,onClick:r},{default:()=>[L(He,{size:18},{default:()=>[L(Hde,null,null)]})]})]})]),L("div",{class:$t.overviewCards},[L("div",{class:$t.card},[L("div",{class:$t.cardIcon},[L(He,{size:32,color:"#409eff"},{default:()=>[L(hU,null,null)]})]),L("div",{class:$t.cardContent},[L("div",{class:$t.cardLabel},[dt("注册总人数")]),L("div",{class:$t.cardValue},[c.registerTotal.toLocaleString()]),l(c.register30Days.slice(-7),"#409eff")])]),L("div",{class:$t.card},[L("div",{class:$t.cardIcon},[L(He,{size:32,color:"#67c23a"},{default:()=>[L(DC,null,null)]})]),L("div",{class:$t.cardContent},[L("div",{class:$t.cardLabel},[dt("实名总人数")]),L("div",{class:$t.cardValue},[c.verifyTotal.toLocaleString()]),l(c.login30Days.slice(-7),"#67c23a")])]),L("div",{class:$t.card},[L("div",{class:$t.cardIcon},[L(He,{size:32,color:"#e6a23c"},{default:()=>[L(aR,null,null)]})]),L("div",{class:$t.cardContent},[L("div",{class:$t.cardLabel},[dt("实名通过人数")]),L("div",{class:$t.cardValue},[c.verifyApprovedTotal.toLocaleString()]),l(c.dailyMeeting30Days.slice(-7),"#e6a23c")])]),L("div",{class:$t.card},[L("div",{class:$t.cardIcon},[L(He,{size:32,color:"#909399"},{default:()=>[L(cU,null,null)]})]),L("div",{class:$t.cardContent},[L("div",{class:$t.cardLabel},[dt("签到任务")]),L("div",{class:$t.taskList},[c.signInTask.map((f,h)=>{const m=["#409eff","#67c23a","#e6a23c","#f56c6c","#909399"],g=m[h%m.length];return L("div",{class:$t.taskItem,key:h},[L("div",{class:$t.taskInfo},[L("span",{class:$t.taskTitle},[L("span",{class:$t.taskDot,style:{background:g}},null),f.title]),L("span",{class:$t.taskCount,style:{color:g}},[f.count,dt(" 次")])]),L("div",{class:$t.taskBarBg},[L("div",{class:$t.taskBar,style:{width:c.signInTask.length>0?`${f.count/Math.max(...c.signInTask.map(v=>v.count))*100}%`:"0%",background:g}},null)])])})])])])]),L("div",{class:$t.chartsGrid},[L("div",{class:$t.chartCard},[L("div",{class:$t.chartTitle},[L(He,{size:16,color:"#409eff"},{default:()=>[L(Mde,null,null)]}),L("span",null,[dt("最近30天登录用户统计")])]),s(c.login30Days,"#409eff")]),L("div",{class:$t.chartCard},[L("div",{class:$t.chartTitle},[L(He,{size:16,color:"#67c23a"},{default:()=>[L(Jde,null,null)]}),L("span",null,[dt("最近30天注册统计")])]),s(c.register30Days,"#67c23a")]),L("div",{class:$t.chartCard},[L("div",{class:$t.chartTitle},[L(He,{size:16,color:"#e6a23c"},{default:()=>[L(ade,null,null)]}),L("span",null,[dt("最近30天APP启动次数统计")])]),s(c.started30Days,"#e6a23c")]),L("div",{class:$t.chartCard},[L("div",{class:$t.chartTitle},[L(He,{size:16,color:"#f56c6c"},{default:()=>[L(efe,null,null)]}),L("span",null,[dt("最近30天参加会议统计(同一设备一天算一次)")])]),s(c.dailyMeeting30Days,"#f56c6c")])])])])}}),Ert=Object.freeze(Object.defineProperty({__proto__:null,default:Trt,meta:Fte},Symbol.toStringTag,{value:"Module"})),xrt=t=>_i(e=>{e.addCreateButton({onClick:t.onClickCreate}).add("latestVersion","版本号",{labelWidth:"80"}).add("title","标题",{labelWidth:"80"}).addSelect("systemType","系统",[{label:"Android",value:1},{label:"iOS",value:2}],{labelWidth:"80"})})(),Art=Ci(t=>{}),Prt=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("title","标题").addColumn("latestVersion","版本号",{width:120}).addTagColumn("systemType","系统",{width:120,tagConfig:{statusMap:{1:{label:"Android",type:"success"},2:{label:"iOS",type:"primary"}}}}).addColumn("downloadUrl","下载链接").addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),Irt=t=>Li({name:"App版本",...t,create(e){e.required("title","标题").required("latestVersion","版本号").addSelect("systemType","系统",[{label:"Android",value:1},{label:"iOS",value:2}],{required:!0}).required("downloadUrl","下载链接")}})(),Rrt=async t=>(await it.generatedAppVersionControllerList({paginated:{page:t.page,size:t.size},where:t.data})).data,Mrt=async t=>t.id?(await it.generatedAppVersionControllerUpdate({id:t.id},{title:t.title,latestVersion:t.latestVersion,systemType:t.systemType,downloadUrl:t.downloadUrl})).data.success:(await it.generatedAppVersionControllerCreate({title:t.title,latestVersion:t.latestVersion,systemType:t.systemType,downloadUrl:t.downloadUrl})).data.success,Ort=async t=>(await it.generatedAppVersionControllerDelete({ids:t})).data.success,$te=vn({meta:{title:"App版本管理",icon:"newlybuild",sort:0}}),Lrt=le(()=>{const t=Irt({async onSubmit(n){const i=await Mrt(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:xrt({onClickCreate(){t.openCreate()}}),table:Prt({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await Ort([String(n.id)])&&e.search?.onReset?.()}}),pagination:Art(),onRequest:Rrt});return()=>L(gi,{ctx:e},null)}),Drt=Object.freeze(Object.defineProperty({__proto__:null,default:Lrt,meta:$te},Symbol.toStringTag,{value:"Module"})),zte=vn({meta:{title:"系统配置",icon:"config",sort:1}}),Nrt=le(()=>{const t=H(!0),i=LO({labelWidth:"180px",showReset:!1,onSubmit:async()=>{const o=i.getFormData();await new Promise(a=>setTimeout(a,1e3)),(await it.configControllerUpdateSystemConfig(o)).data.success&&fl.showNotification("更新成功")}}).add("invitationUrl","邀请链接",{rules:Or.required}).add("customerServiceUrl","客服链接",{rules:Or.required}).addDecimal("welfarePool","福利金池",{min:0,rules:[Or.required,Or.number({unsigned:!0})]}).addDecimal("stockPrice","股票价格",{min:0,rules:[Or.required,Or.number({unsigned:!0})]}).addDecimal("minWithdrawAmount","最低提现金额",{min:0,rules:[Or.required,Or.number({unsigned:!0})]}).addDecimal("minTransferPublicityAmount","宣传金最低划转金额",{min:0,rules:[Or.required,Or.number({unsigned:!0})]}).add("depositWeixinUrl","微信支付充值渠道").add("depositAlipayUrl","支付宝支付充值渠道").add("depositYunshanfuUrl","云闪付支付充值渠道").addSwitch("openDeposit","是否打开充值").build(),r=async()=>{const o=await it.configControllerGetSystemConfig();if(t.value=!1,o.data?.data){const{data:s}=o.data;i.setValues(s)}};return Pt(()=>{r()}),()=>L("div",{style:"width:500px"},[Vt(L(aW,null,{default:()=>[L(RS,i,null)]}),[[dm,t.value]])])}),Brt=Object.freeze(Object.defineProperty({__proto__:null,default:Nrt,meta:zte},Symbol.toStringTag,{value:"Module"})),Hte=vn({redirect:"/Mgmt/System/Config",meta:{title:"系统管理",icon:"system",sort:1001}}),Vrt=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),Frt=Object.freeze(Object.defineProperty({__proto__:null,default:Vrt,meta:Hte},Symbol.toStringTag,{value:"Module"})),$rt=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"60"}).add("realName","姓名",{labelWidth:"45"}).add("phone","联系电话",{labelWidth:"80"}).addLineBreak().addSelect("status","审核状态",[{label:"待审核",value:0},{label:"审核通过",value:1},{label:"审核驳回",value:2}],{labelWidth:"80"}).addSelect("type","类型",[{label:"组织",value:0},{label:"宣传",value:1}],{labelWidth:"60"})})(),zrt=Ci(t=>{}),Hrt=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("user.id","用户ID",{width:100}).addColumn("user.phone","账号",{width:140}).addColumn("realName","姓名",{width:100}).addColumn("idCardNo","身份证号",{width:180}).addColumn("phone","联系电话",{width:140}).addTagColumn("status","审核状态",{width:100,tagConfig:{statusMap:{0:{label:"待审核",type:"warning"},1:{label:"审核通过",type:"success"},2:{label:"审核驳回",type:"danger"}}}}).addTagColumn("type","类型",{width:80,tagConfig:{statusMap:{0:{label:"组织",type:"primary"},1:{label:"宣传",type:"info"}}}}).addColumn("rejectReason","驳回原因").addTimeColumn("createTime","申请时间").addActionColumn({...t})})(),Urt=t=>Li({name:"求职申请",...t,create(e){e.add("id","ID",{disabled:!0}).add("realName","姓名",{disabled:!0}).add("idCardNo","身份证号",{disabled:!0}).add("phone","联系电话",{disabled:!0}).addSelect("status","审核状态",[{label:"待审核",value:0},{label:"审核通过",value:1},{label:"审核驳回",value:2}]).addTextarea("rejectReason","驳回原因")}})(),Wrt=async t=>(await it.generatedJobHuntingControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,qrt=async t=>t.id?(await it.generatedJobHuntingControllerUpdate({id:t.id},{status:t.status,rejectReason:t.rejectReason})).data.success:!1,jrt=async t=>(await it.generatedJobHuntingControllerDelete({ids:t})).data.success,Ute=vn({meta:{title:"应聘管理",icon:"book",sort:93}}),Krt=le(()=>{const t=Urt({async onSubmit(n){const i=await qrt(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:$rt(),table:Hrt({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await jrt([String(n.id)])&&e.search?.onReset?.()}}),pagination:zrt(),onRequest:Wrt});return()=>L(gi,{ctx:e},null)}),Grt=Object.freeze(Object.defineProperty({__proto__:null,default:Krt,meta:Ute},Symbol.toStringTag,{value:"Module"})),Yrt=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"}).add("phone","联系电话",{labelWidth:"80"})})(),Xrt=Ci(t=>{}),Jrt=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("user.id","用户ID",{width:120}).addColumn("user.phone","账号",{width:120}).addColumn("address","详细地址").addColumn("phone","联系电话").addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),Zrt=t=>Li({name:"用户地址",...t,create(e){e.required("address","详细地址").required("phone","联系电话")}})(),Qrt=async t=>{const{page:e,size:n,data:i}=t,r={paginated:{page:e,size:n},where:i,extra:{relations:{user:!0}}};return(await it.generatedUserAddressControllerList(r)).data},eot=async t=>t.id?(await it.generatedUserAddressControllerUpdate({id:t.id},t)).data.success:(await it.generatedUserAddressControllerCreate(t)).data.success,tot=async t=>(await it.generatedUserAddressControllerDelete({ids:t})).data.success,Wte=vn({meta:{title:"地址管理",icon:"connect-address-one",sort:94}}),not=le(()=>{const t=Zrt({async onSubmit(n){const i=await eot(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:Yrt(),table:Jrt({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},onDelete(n){tot([String(n.id)]).then(i=>{i&&e.search?.onReset?.()})}}),pagination:Xrt(),onRequest:Qrt});return()=>L(gi,{ctx:e},null)}),iot=Object.freeze(Object.defineProperty({__proto__:null,default:not,meta:Wte},Symbol.toStringTag,{value:"Module"})),rot=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"80"}).add("cardNo","银行卡号",{labelWidth:"80"}).add("bankName","银行名称",{labelWidth:"80"})})(),oot=Ci(t=>{}),sot=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("user.id","用户ID",{width:120}).addColumn("user.phone","账号",{width:120}).addColumn("cardNo","银行卡号").addColumn("bankName","银行名称").addColumn("phone","手机号码").addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),aot=t=>Li({name:"用户银行卡",...t,create(e){e.required("cardNo","银行卡号").required("bankName","银行名称").required("phone","手机号码")}})(),lot=async t=>{const{page:e,size:n,data:i}=t;return(await it.generatedUserBankControllerList({paginated:{page:e,size:n},where:i,extra:{relations:{user:!0}}})).data},uot=async t=>t.id?(await it.generatedUserBankControllerUpdate({id:t.id},t)).data.success:(await it.generatedUserBankControllerCreate(t)).data.success,cot=async t=>(await it.generatedUserBankControllerDelete({ids:t})).data.success,qte=vn({meta:{title:"银行卡管理",icon:"bank-card",sort:98}}),dot=le(()=>{const t=aot({async onSubmit(n){const i=await uot(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:rot(),table:sot({showDelete:!0,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},onDelete(n){cot([String(n.id)]).then(i=>{i&&e.search?.onReset?.()})}}),pagination:oot(),onRequest:lot});return()=>L(gi,{ctx:e},null)}),fot=Object.freeze(Object.defineProperty({__proto__:null,default:dot,meta:qte},Symbol.toStringTag,{value:"Module"})),hot=t=>_i(e=>{e.add("userId","用户ID",{labelWidth:"60"}).add("realName","姓名",{labelWidth:"45"}).addSelect("status","审核状态",[{label:"待审核",value:0},{label:"审核通过",value:1},{label:"审核驳回",value:2}],{labelWidth:"80"})})(),mot=Ci(t=>{}),got=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("user.id","用户ID",{width:120}).addColumn("user.phone","账号",{width:120}).addColumn("realName","姓名",{width:120}).addColumn("idCardNo","身份证号").addImageColumn("idCardFront","身份证正面",{width:120}).addImageColumn("idCardBack","身份证反面",{width:120}).addImageColumn("handHoldIdCard","手持身份证",{width:120}).addTagColumn("status","审核状态",{width:100,tagConfig:{statusMap:{0:{label:"待审核",type:"warning"},1:{label:"审核通过",type:"success"},2:{label:"审核驳回",type:"danger"}}}}).addColumn("rejectReason","驳回原因",{width:150}).addTimeColumn("createTime","创建时间").addActionColumn({...t})})(),pot=t=>Li({name:"实名认证",...t,create(e){e.required("realName","姓名").required("idCardNo","身份证号").addUpload("idCardFront","身份证正面",{rules:Or.required,...lv}).addUpload("idCardBack","身份证反面",{rules:Or.required,...lv}).addUpload("handHoldIdCard","手持身份证图片",{rules:Or.required,...lv}).addSelect("status","审核状态",[{label:"待审核",value:0},{label:"审核通过",value:1},{label:"审核驳回",value:2}],{rules:Or.required}).addTextarea("rejectReason","驳回原因")}})(),vot=async t=>(await it.generatedUserVerifyControllerList({paginated:{page:t.page,size:t.size},where:t.data,extra:{relations:{user:!0}}})).data,bot=async t=>t.id?(await it.generatedUserVerifyControllerUpdate({id:t.id},{status:t.status,rejectReason:t.rejectReason})).data.success:!1,yot=async t=>(await it.generatedUserVerifyControllerDelete({ids:t})).data.success,jte=vn({meta:{title:"实名认证",icon:"id-card-v",sort:99}}),wot=le(()=>{const t=pot({async onSubmit(n){const i=await bot(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:hot(),table:got({showDelete:!1,showEdit:!0,buttons:[],onEdit(n){t.openEdit(n)},async onDelete(n){await yot([String(n.id)])&&e.search?.onReset?.()}}),pagination:mot(),onRequest:vot});return()=>L(gi,{ctx:e},null)}),_ot=Object.freeze(Object.defineProperty({__proto__:null,default:wot,meta:jte},Symbol.toStringTag,{value:"Module"})),Cot=t=>_i(e=>{e.add("id","ID",{labelWidth:"80"}).add("phone","手机号",{labelWidth:"80"}).add("inviteCode","邀请码",{labelWidth:"80"}).addLineBreak().add("registerIp","注册 IP",{labelWidth:"80"}).addSelect("isFrozen","状态",[{label:"正常",value:0},{label:"冻结",value:1}],{labelWidth:"80"}).addSelect("verifyStatus","实名状态",[{label:"未实名",value:-1},{label:"待审核",value:0},{label:"审核通过",value:1},{label:"审核驳回",value:2}])})(),Sot=Ci(t=>{}),kot=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("nick","昵称").addColumn("phone","手机号").addColumn("inviteCode","邀请码",{width:120}).addColumn("stocks","持有股票",{width:100}).addColumn("registerIp","注册IP",{width:140}).addTagColumn("userVerify.status","实名状态",{width:100,tagConfig:{statusMap:{undefined:{label:"未实名",type:"info"},0:{label:"审核中",type:"success"},1:{label:"已实名",type:"warning"},2:{label:"驳回",type:"danger"}}}}).addCurrencyColumn("wallet.balance","余额",{width:80}).addCurrencyColumn("wallet.frozenBalance","冻结金额",{width:90}).addCurrencyColumn("wallet.publicityFund","宣传金",{width:80}).addSwitchColumn("isFrozen","状态",{fixed:"right",width:150,activeText:"冻结",inactiveText:"正常",activeValue:1,inactiveValue:0,onChange:async(n,i)=>{const r=await it.adminUserControllerToggleFreeze({userId:n.id,action:i?1:0});return r.data.success&&fl.showNotification(r.data.msg),r.data.success}}).addTimeColumn("createTime","注册时间",{fixed:"right"}).addActionColumn({...t})})(),Tot=t=>Li({name:"用户",...t,create(e){e.required("phone","手机号",{disabled:!0}).add("inviteCode","邀请码",{disabled:!0}).add("registerIp","注册 IP",{disabled:!0}).add("stocks","持有股票数量")}})(),Eot=async t=>(await it.adminUserControllerList({page:t.page,size:t.size,...t.data})).data,xot=async t=>t.id?(await it.generatedUserControllerUpdate({id:t.id},{stocks:t.stocks})).data.success:!0,Aot=()=>_i(t=>{t.addSelect("type","成员层级",[{label:"1级",value:0},{label:"2级",value:1},{label:"3级",value:2}],{width:"150px"}),t.addSelect("isFrozen","冻结状态",[{label:"未冻结",value:0},{label:"已冻结",value:1}],{width:"150px"}),t.addSelect("verifyStatus","实名状态",[{label:"未实名",value:-1},{label:"待审核",value:0},{label:"审核通过",value:1},{label:"审核驳回",value:2}],{width:"150px"}),t.add("phone","手机号")})(),Pot=Ci(t=>{}),Iot=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("relativeLevel","层级",{width:120}).addColumn("phone","手机号").addColumn("inviteCode","邀请码",{width:120}).addCurrencyColumn("wallet.balance","余额",{width:120}).addCurrencyColumn("wallet.frozenBalance","冻结金额",{width:120}).addColumn("stocks","持有股票",{width:100}).addTagColumn("userVerify.status","实名状态",{width:100,tagConfig:{statusMap:{undefined:{label:"未实名",type:"info"},0:{label:"审核中",type:"success"},1:{label:"已实名",type:"warning"},2:{label:"驳回",type:"danger"}}}}).addTagColumn("isFrozen","冻结状态",{width:100,tagConfig:{statusMap:{0:{label:"正常",type:"success"},1:{label:"冻结",type:"danger"}}}}).addColumn("registerIp","注册IP",{width:140}).addTimeColumn("createTime","注册时间")})(),Rot=t=>async e=>(await it.teamControllerMembers({userId:t,type:e.data.type,phone:e.data.phone,isFrozen:e.data.isFrozen,verifyStatus:e.data.verifyStatus,page:e.page,size:e.size})).data,Mot="_wrapper_ov66y_1",Oot="_team_members_ov66y_7",Kte={wrapper:Mot,team_members:Oot},Lot=t=>mi(e=>{e.addColumn("id","ID",{width:80}).addColumn("ancestorName","层级",{width:120}).addColumn("phone","手机号").addColumn("inviteCode","邀请码",{width:120}).addCurrencyColumn("wallet.balance","余额",{width:120}).addCurrencyColumn("wallet.frozenBalance","冻结金额",{width:120}).addColumn("stocks","持有股票",{width:100}).addTagColumn("userVerify.status","实名状态",{width:100,tagConfig:{statusMap:{undefined:{label:"未实名",type:"info"},0:{label:"审核中",type:"success"},1:{label:"已实名",type:"warning"},2:{label:"驳回",type:"danger"}}}}).addTagColumn("isFrozen","冻结状态",{width:100,tagConfig:{statusMap:{0:{label:"正常",type:"success"},1:{label:"冻结",type:"danger"}}}}).addColumn("registerIp","注册IP",{width:140}).addTimeColumn("createTime","注册时间")})(),Dot=t=>async e=>(await it.teamControllerAncestors({userId:t})).data,Not=le({props:{userId:{type:Number,required:!0}},setup(t,e){const n=pi({table:Lot(),onRequest:Dot(t.userId)});return()=>L("div",null,[L(gi,{ctx:n},null)])}}),Bot=t=>{CJ.open(e=>L(Vot,{userId:t},null),{title:"团队信息",width:"90%",closeOnClickModal:!1,draggable:!0,center:!0})},Vot=le({props:{userId:{type:Number,required:!0}},setup(t,e){return()=>L("div",{class:Kte.wrapper},[L(yN,{"content-position":"left"},{default:()=>[dt("上级信息")]}),L(Not,{userId:t.userId},null),L(yN,{"content-position":"left"},{default:()=>[dt("下级信息")]}),L(Fot,{userId:t.userId},null)])}}),Fot=le({props:{userId:{type:Number,required:!0}},setup(t,e){const n=pi({search:Aot(),table:Iot(),pagination:Pot(),onRequest:Rot(t.userId)});return()=>L("div",{class:Kte.team_members},[L(gi,{ctx:n},null)])}}),Gte=vn({meta:{title:"用户管理",icon:"people",sort:100}}),$ot=le(()=>{const t=Tot({async onSubmit(n){const i=await xot(n);return i&&e.search?.onReset?.(),i}}),e=pi({search:Cot(),table:kot({showDelete:!1,onEdit(n){t.openEdit(n)},buttons:[{width:90,type:"primary",label:"团队信息",onClick(n,i){Bot(n.id)}}]}),pagination:Sot(),onRequest:Eot});return()=>L(gi,{ctx:e},null)}),zot=Object.freeze(Object.defineProperty({__proto__:null,default:$ot,meta:Gte},Symbol.toStringTag,{value:"Module"})),Yte=vn({redirect:"/Mgmt/User",meta:{title:"用户管理",icon:"data-user",sort:1e3}}),Hot=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),Uot=Object.freeze(Object.defineProperty({__proto__:null,default:Hot,meta:Yte},Symbol.toStringTag,{value:"Module"})),Wot="_app_header_15u4u_15",qot="_header_left_15u4u_26",jot="_brand_wrapper_15u4u_31",Kot="_logo_gradient_15u4u_36",Got="_logo_glow_15u4u_55",Yot="_brand_text_15u4u_69",Xot="_tag_15u4u_86",Jot="_tag_dot_15u4u_96",Zot="_header_right_15u4u_103",Qot="_date_display_15u4u_108",est="_date_text_15u4u_108",tst="_divider_15u4u_114",nst="_icon_btn_wrapper_15u4u_119",ist="_icon_btn_15u4u_119",rst="_user_info_15u4u_139",ost="_avatar_wrapper_15u4u_155",sst="_avatar_15u4u_155",ast="_status_dot_15u4u_163",lst="_user_detail_15u4u_173",ust="_user_name_15u4u_178",cst="_user_role_15u4u_183",dst="_arrow_15u4u_188",fst="_app_menu_15u4u_197",hst="_app_main_15u4u_201",mst="_app_router_view_15u4u_210",Wn={app_header:Wot,header_left:qot,brand_wrapper:jot,logo_gradient:Kot,logo_glow:Got,brand_text:Yot,tag:Xot,tag_dot:Jot,header_right:Zot,date_display:Qot,date_text:est,divider:tst,icon_btn_wrapper:nst,icon_btn:ist,user_info:rst,avatar_wrapper:ost,avatar:sst,status_dot:ast,user_detail:lst,user_name:ust,user_role:cst,arrow:dst,app_menu:fst,app_main:hst,app_router_view:mst};function T9(t){return nt("svg",{class:"menu-icon",width:"20",height:"20",style:"margin-right: 8px; vertical-align: middle;"},nt("use",{href:`#${t}`}))}const gst=le({setup(){const t=Wq(),e=r=>r.sort((o,s)=>{const a=o.meta?.sort,l=s.meta?.sort;return a>l?-1:1}).map(o=>o.children?.length?{...o,children:e(o.children)}:o),n=gI[0].children?.find(r=>r.name==="Mgmt")?.children?.length?e(gI[0].children.find(r=>r.name==="Mgmt").children):[],i=r=>r.map(o=>{const s=o.meta;return o.children?.length?L(qwe,{index:o.path},{title:()=>L(rt,null,[T9(s.icon),L("span",null,[s.title])]),default:()=>i(o.children)}):L(Wwe,{index:o.path},{title:()=>L(rt,null,[T9(s.icon),L("span",null,[s.title])])})});return()=>L(Uwe,{"default-active":t.path,router:!0},{default:()=>[n?.length?i(n):null]})}}),pst={};function vst(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!yi(t)}const bst=le({inheritAttrs:!1,setup(t,e){const n=Wq(),i=XR();let r=-1;const o=H([]);return _ne(()=>{o.value.findIndex(a=>a.path==n.path)<0&&o.value.push({label:n.meta.title,path:n.path}),r>-1&&(r=-1,o.value.splice(r,1))}),()=>{let s;return L(DCe,{class:pst.tabs,modelValue:n.path,type:"card",closable:!0,onTabClick:a=>{if(a.active)return;const l=Number(a.index),u=o.value[l];i.push(u.path)},onTabRemove:a=>{const l=o.value.findIndex(d=>d.path==a);if(l<0||o.value.length==1)return;if(o.value[l].path!=n.path){o.value.splice(l,1);return}const c=l>o.value.length-2?o.value.length-2:l;i.push(o.value[c].path),r=l}},vst(s=o.value.map(a=>L(NCe,{label:a.label,name:a.path},null)))?s:{default:()=>[s]})}}}),Xte=vn({redirect:"/Mgmt/System",meta:{title:"管理后台"}}),yst=le(()=>{const t=s0(),e=XR();return()=>L(uN,{class:"app-wrapper"},{default:()=>[L(hve,{class:Wn.app_header},{default:()=>[L("div",{class:Wn.header_left},[L("div",{class:Wn.brand_wrapper},[L("div",{class:Wn.logo_gradient},[L("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[L("path",{d:"M12 2L2 7L12 12L22 7L12 2Z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),L("path",{d:"M2 17L12 22L22 17",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),L("path",{d:"M2 12L12 17L22 12",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null)]),L("div",{class:Wn.logo_glow},null)]),L("div",{class:Wn.brand_text},[L("h1",null,[dt("管理后台")]),L("div",{class:Wn.tag},[L("span",{class:Wn.tag_dot},null),L("span",null,[dt("ADMIN PORTAL")])])])])]),L("div",{class:Wn.header_right},[L("div",{class:Wn.date_display},[L("span",{class:Wn.date_text},[new Date().toLocaleDateString("zh-CN",{month:"long",day:"numeric",weekday:"long"})])]),L("div",{class:Wn.divider},null),L("div",{class:Wn.icon_btn_wrapper},[L("div",{class:Wn.icon_btn,onClick:()=>{e.push("/Mgmt/System/Config")}},[L(He,{size:18},{default:()=>[L(jde,null,null)]})])]),L(wye,{trigger:"click"},{default(){return L("div",{class:Wn.user_info},[L("div",{class:Wn.avatar_wrapper},[L(zme,{class:Wn.avatar},{default:()=>[dt("A")]}),L("span",{class:Wn.status_dot},null)]),L("div",{class:Wn.user_detail},[L("span",{class:Wn.user_name},[dt("Admin")]),L("span",{class:Wn.user_role},[dt("超级管理员")])]),L(He,{class:Wn.arrow},{default:()=>[L("i",{class:"el-icon-arrow-down"},null)]})])},dropdown(){return L(Cye,{class:Wn.dropdown_menu},{default:()=>[L(_ye,{divided:!0,class:Wn.logout_item,onClick:()=>{t.loginout(),e.push("/Login"),fl.showNotification("退出登录成功")}},{default:()=>[L(He,null,{default:()=>[L(Yde,null,null)]}),L("span",null,[dt("退出登录")])]})]})}})])]}),L(uN,null,{default:()=>[L(fve,{class:Wn.app_menu},{default:()=>[L(gst,null,null)]}),L(mve,{class:Wn.app_main},{default:()=>[L(bst,null,null),L("div",{class:Wn.app_router_view},[L(Bt("router-view"),null,null)])]})]})]})}),wst=Object.freeze(Object.defineProperty({__proto__:null,default:yst,meta:Xte},Symbol.toStringTag,{value:"Module"})),_st=t=>_i(e=>{e.add("phone","手机号",{labelWidth:"60"}).addSelect("role","角色",[{label:"超级管理员",value:"admin"},{label:"普通用户",value:"user"},{label:"访客",value:"guest",disabled:!0}]).addRadio("gender","性别",[{label:"男",value:"male"},{label:"女",value:"female"}]).addLineBreak().addCreateButton({onClick:t.onClickCreate}).addDate("birthday","生日").addSwitch("agreeTerms","同意条款",{inactiveValue:0,activeValue:1})})(),Cst=Ci(t=>{}),Sst=t=>mi(e=>{e.addIndexColumn().addColumn("phone","Phone").addColumn("gender","Gender",{width:80}).addColumn("role","Role",{width:80}).addColumn("birthday","Birthday",{width:180}).addColumn("agreeTerms","agreeTerms",{width:80}).addColumn("date","Date",{width:120}).addColumn("name","Name",{width:150}).addColumn("address","Address").addActionColumn({...t})})(),kst=t=>Li({name:"模板",...t,create(e){e.required("phone","手机号",{}).addSelect("role","角色",[{label:"超级管理员",value:"admin"},{label:"普通用户",value:"user"},{label:"访客",value:"guest",disabled:!0}]).addRequiredRule("role").addDecimal("gg","Decimal",{multiple:!0}).addRadio("gender","性别",[{label:"男",value:"male"},{label:"女",value:"female"}]).addRequiredRule("gender").addLineBreak().addDate("birthday","生日").addRequiredRule("birthday").addSwitch("agreeTerms","同意条款",{inactiveValue:0,activeValue:1})}})(),Tst=async t=>{const e=Math.floor(Math.random()*1e3);return{success:!0,data:{total:100,list:new Array(10).fill(1).map((i,r)=>({date:"2016-05-03",name:`Tom ${r+e}`,address:`No. 189, Grove St, Los Angeles ${r+1}`,phone:"1343434343"+ +r,gender:"male",role:"user",birthday:Date.now(),agreeTerms:1,gg:778}))}}},Est=async t=>!0,Jte=vn({meta:{title:"模板",icon:"user-business"}}),xst=le(()=>{const t=kst({async onSubmit(n){const i=await Est();return i&&e.search?.onReset?.(),i}}),e=pi({search:_st({onClickCreate(){t.openCreate()}}),table:Sst({onDelete(n,i){},onEdit(n,i){t.openEdit(n)}}),pagination:Cst(),onRequest:Tst});return()=>L(gi,{ctx:e},null)}),Ast=Object.freeze(Object.defineProperty({__proto__:null,default:xst,meta:Jte},Symbol.toStringTag,{value:"Module"})),Zte=vn({redirect:"/Mgmt/Tpl/TplSub",meta:{title:"模板",icon:"user-business",sort:1}}),Pst=le(()=>()=>L(Gc,null,{default:()=>[L(Bt("router-view"),null,null)]})),Ist=Object.freeze(Object.defineProperty({__proto__:null,default:Pst,meta:Zte},Symbol.toStringTag,{value:"Module"})),Qte=vn({redirect:"/Mgmt",meta:{title:"后台管理"}}),Rst=le(()=>()=>L("div",null,[L("div",null,null),L(Bt("router-view"),null,null)])),Mst=Object.freeze(Object.defineProperty({__proto__:null,default:Rst,meta:Qte},Symbol.toStringTag,{value:"Module"})),Ost=Object.assign({"../views/LoginView/index.tsx":mK,"../views/MgmtView/ContentView/DailyMeetingView/index.tsx":SJ,"../views/MgmtView/ContentView/DocumentView/index.tsx":TJ,"../views/MgmtView/ContentView/NewsCategoryView/index.tsx":EJ,"../views/MgmtView/ContentView/NewsView/index.tsx":xJ,"../views/MgmtView/ContentView/UserMessageView/index.tsx":PJ,"../views/MgmtView/ContentView/index.tsx":IJ,"../views/MgmtView/FinanceView/RechargeView/index.tsx":RJ,"../views/MgmtView/FinanceView/WalletBillView/index.tsx":MJ,"../views/MgmtView/FinanceView/WalletView/index.tsx":OJ,"../views/MgmtView/FinanceView/WithdrawView/index.tsx":LJ,"../views/MgmtView/FinanceView/index.tsx":DJ,"../views/MgmtView/ProductView/FinancialProductView/index.tsx":NJ,"../views/MgmtView/ProductView/GiftProductView/index.tsx":VJ,"../views/MgmtView/ProductView/UserFinancialProductView/index.tsx":FJ,"../views/MgmtView/ProductView/index.tsx":$J,"../views/MgmtView/SignInView/SignInCalendarView/index.tsx":zJ,"../views/MgmtView/SignInView/SignInRewardView/index.tsx":HJ,"../views/MgmtView/SignInView/SignInTaskView/index.tsx":UJ,"../views/MgmtView/SignInView/SignInView/index.tsx":WJ,"../views/MgmtView/SignInView/index.tsx":qJ,"../views/MgmtView/StatsView/index.tsx":Fte,"../views/MgmtView/SystemView/AppVersionView/index.tsx":$te,"../views/MgmtView/SystemView/ConfigView/index.tsx":zte,"../views/MgmtView/SystemView/index.tsx":Hte,"../views/MgmtView/UserView/JobHuntingView/index.tsx":Ute,"../views/MgmtView/UserView/UserAddressView/index.tsx":Wte,"../views/MgmtView/UserView/UserBankView/index.tsx":qte,"../views/MgmtView/UserView/UserVerifyView/index.tsx":jte,"../views/MgmtView/UserView/UserView/index.tsx":Gte,"../views/MgmtView/UserView/index.tsx":Yte,"../views/MgmtView/index.tsx":Xte,"../views/TplView/TplSubView/index.tsx":Jte,"../views/TplView/index.tsx":Zte,"../views/index.tsx":Qte}),Lst=Object.assign({"../views/LoginView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>RAe),void 0,import.meta.url),"../views/MgmtView/ContentView/DailyMeetingView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>aUe),void 0,import.meta.url),"../views/MgmtView/ContentView/DocumentView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>vUe),void 0,import.meta.url),"../views/MgmtView/ContentView/NewsCategoryView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>EUe),void 0,import.meta.url),"../views/MgmtView/ContentView/NewsView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>NUe),void 0,import.meta.url),"../views/MgmtView/ContentView/UserMessageView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>qUe),void 0,import.meta.url),"../views/MgmtView/ContentView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>KUe),void 0,import.meta.url),"../views/MgmtView/FinanceView/RechargeView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>tWe),void 0,import.meta.url),"../views/MgmtView/FinanceView/WalletBillView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>uWe),void 0,import.meta.url),"../views/MgmtView/FinanceView/WalletView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>vWe),void 0,import.meta.url),"../views/MgmtView/FinanceView/WithdrawView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>EWe),void 0,import.meta.url),"../views/MgmtView/FinanceView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>AWe),void 0,import.meta.url),"../views/MgmtView/ProductView/FinancialProductView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>BWe),void 0,import.meta.url),"../views/MgmtView/ProductView/GiftProductView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>zWe),void 0,import.meta.url),"../views/MgmtView/ProductView/UserFinancialProductView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>YWe),void 0,import.meta.url),"../views/MgmtView/ProductView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>JWe),void 0,import.meta.url),"../views/MgmtView/SignInView/SignInCalendarView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>oqe),void 0,import.meta.url),"../views/MgmtView/SignInView/SignInRewardView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>mqe),void 0,import.meta.url),"../views/MgmtView/SignInView/SignInTaskView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Sqe),void 0,import.meta.url),"../views/MgmtView/SignInView/SignInView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Rqe),void 0,import.meta.url),"../views/MgmtView/SignInView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Oqe),void 0,import.meta.url),"../views/MgmtView/StatsView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Ert),void 0,import.meta.url),"../views/MgmtView/SystemView/AppVersionView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Drt),void 0,import.meta.url),"../views/MgmtView/SystemView/ConfigView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Brt),void 0,import.meta.url),"../views/MgmtView/SystemView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Frt),void 0,import.meta.url),"../views/MgmtView/UserView/JobHuntingView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Grt),void 0,import.meta.url),"../views/MgmtView/UserView/UserAddressView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>iot),void 0,import.meta.url),"../views/MgmtView/UserView/UserBankView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>fot),void 0,import.meta.url),"../views/MgmtView/UserView/UserVerifyView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>_ot),void 0,import.meta.url),"../views/MgmtView/UserView/UserView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>zot),void 0,import.meta.url),"../views/MgmtView/UserView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Uot),void 0,import.meta.url),"../views/MgmtView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>wst),void 0,import.meta.url),"../views/TplView/TplSubView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Ast),void 0,import.meta.url),"../views/TplView/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Ist),void 0,import.meta.url),"../views/index.tsx":()=>mn(()=>Promise.resolve().then(()=>Mst),void 0,import.meta.url)}),gI=CTe(Ost,Lst),ene=wTe({routes:gI,history:Zke("./")});ene.beforeEach(t=>{document.title=t.meta?.title;const e=s0(),n="/Login";if(e.isLogin){if(t.path==n)return"/"}else if(![n].includes(t.path))return n});const Dst=le(()=>()=>L("div",{class:"app-wrapper"},[L(MW,{locale:_J,"z-index":99999999},{default:()=>[L(Bt("router-view"),null,null)]})])),{i18n:Nst}=Ixe({storeId:"commonI18n",messages:{enUS:{a:"1",b:"b"},zhCN:{a:"一",b:"BB"}}}),ek=L_(Dst);ek.use(Nst);ek.use(Ire());ek.use(ene);ek.mount("#app");